autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_CHECK_LIB acts very strangely in Darwin


From: Aarno Syvänen
Subject: Re: AC_CHECK_LIB acts very strangely in Darwin
Date: Wed, 31 Aug 2005 16:21:20 +0200

Hello,

On Aug 31, 2005, at 3:26 PM, Stepan Kasal wrote:

Hello,

in general, "The Autoconf Way" is to check for feattures, not for
platform name.

For example:


  *-cygwin*)
    EXE_EXT=".exe"


A variable "EXEEXT" is provided automatically by Autoconf.
And the detection works also for mingw and all other platforms.


case "$host" in
  *-sun-solaris*)
    CFLAGS="$CFLAGS -DSunOS=1"
    ;;


This hack might be necessary, though. I'm not sure what you want to achieve.
But if you are using Automake, then
    AC_SUBST([AM_CPPFLAGS], [-DSunOS=1])
might be more appropriate here.

No automake for me yet ;)



[...] configure acts absolutely crazy

...

checking sys/ioctl.h usability... no
checking sys/ioctl.h presence... yes
configure: WARNING: sys/ioctl.h: present but cannot be compiled
configure: WARNING: sys/ioctl.h: check for missing prerequisite headers?
configure: WARNING: sys/ioctl.h: see the Autoconf documentation
configure: WARNING: sys/ioctl.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/ioctl.h: proceeding with the preprocessor's result configure: WARNING: sys/ioctl.h: in the future, the compiler will take precedence configure: WARNING: ## ------------------------------------------ ## configure: WARNING: ## Report this to the AC_PACKAGE_NAME lists. ## configure: WARNING: ## ------------------------------------------ ##


There is nothing crazy here. Perhaps there are some headers have to be included
before sys/ioctl.h?  Look into config.log, to see details.

After commenting out AC_CHECK_LIB, all header checks were ok. Really crazy things are: checking whether we are using the GNU C compiler... no (i certainly use it)

checking for ANSI C header files... no
checking for sys/types.h... no
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... no

Darwin gcc has none of C standard libraries ? It does have.

checking for short... no
checking size of short... 0
checking for int... no
checking size of int... 0
checking for long... no
checking size of long... 0
checking for long long... no
checking size of long long... 0

And no integer types ?
All this changes after commenting out.



  *-*-openbsd* | *-*-freebsd*)
    CFLAGS="$CFLAGS -pthread"
    ac_ext=c
ac_cpp='$CPP $CPPFLAGS'

...

So, autoconf just drops the end of the case statement.


No, it doesn't, the esac is somewhere below.  It just happens that the
expansion of AC_CHECK_LIB is that long.

Ok, but there must be some reason for failing of all standard tests.


But it seems AC_SEARCH_LIBS might be more appropriate here:
AC_SEARCH_LIBS([pthread_exit], [c_r kse], [pthread=yes])
It also modifies LIBS; see the manual for details.


Thanks. I try this.


HTH,
    Stepan


_______________________________________________
Autoconf mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/autoconf







reply via email to

[Prev in Thread] Current Thread [Next in Thread]