Jost Martin <[EMAIL PROTECTED]> [2002-11-29 10:17:38 +0100]: > > > export CXXFLAGS="+DAportable -AA +O2" > > > ./configure -prefix=/pd/text2.1 --without-gcc > > > > The configure from textutils and the newer coreutils can correctly > > deduce the -Aa compiler flag. I would not place it here. In > > particular you probably want '-Ae -D_HPUX_SOURCE' instead of what you > > have. Better to avoid saying -Aa and let configure choose -Ae > > instead. This is very likely your problem. > > Yes, configure left to its own devices, chooses -Ae but neither > -D_POSIX_SOURCE nor -D_HPUX_SOURCE. (In fact -D_HPUX_SOURCE already is set when you >use -Ae; "Requests a compilation in ANSI C mode with HP C extensions. This option is >the same as specifying -Aa, -D_HPUX_SOURCE, and +e.")
Yes, you are right. With -Ae you don't need -D_HPUX_SOURCE. I had forgotten that. I always use -Ae. > With that (-Ae alone, no other additions) coreutils is successfully build and >checked. > > That leaves two problem for me: > How do I tell configure to add the '+DAportable' ? > Drop the '-g' and instead add '+O2' Add it to CFLAGS and CXXFLAGS. (I am sure to hear the sound of hand slapping to forehead.) Also, I used to use the method of putting those in the environment. But have recently been corrected that they should go onto the configure command line instead that way it will become a part of config.status information while the reverse isn't true. This is an improvement for the -recheck logic. Also, not sure what --without-gcc does in the general case. I usually just set CC. > > > export CXXFLAGS="+DAportable -AA +O2" > > > ./configure -prefix=/pd/text2.1 --without-gcc ./configure CC=cc CXX=aCC CFLAGS='+DAportable +O2' CXXFLAGS='+DAportable +O2' Or if you were going to force -Ae then add it to the flags as well. Generated autoconf configure scripts at autoconf-2.53 and later will know about hpux and get these flags right. But any package that uses an older version will need to have this explicitly stated. It is okay to put it on newer versions. I just like to have it do things as automatically as possible. Whenever anything is hard coded in it gets to be painful years later. ./configure CC=cc CXX=aCC CFLAGS='-Ae +DAportable +O2' CXXFLAGS='+DAportable +O2' > Jim wrote: > >If you want to add options like +O2, then > >it's better to use AM_CFLAGS. I think in this case wouldn't Martin stick with CFLAGS on the configure command line? AM_CFLAGS would be used if he were modifying the Makefile.am file and trying to make these package defaults forever. [You can't set CFLAGS in the Makefile* files as that takes away the user's ability to do so at configure time, and was surely why Jim suggested that.] But I don't think Martin wants to modify the package but just to drive the package to compile on hpux. (I am really only saying this for the list archive. Jim is a master of the autotools and much more knowledgeable about those details than I. I think that comment was just misunderstood and therefore out of context.) > > > There is one hickup during make check: > > ... > > > FAIL: slink > > > > Are you perhaps using NFS-mounted disks? > > Yes, that was the problem. > I checked with NFS (fail) and without (pass). > (Is there a note on this ? I searched for NFS, but found none) Q: 'make check' fails on an NFS mounted disk? Hmm... Will have to try that. Bob _______________________________________________ Bug-textutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-textutils