Sometimes I wish to perform multiple runs of AC_*_IFELSE using the same
source but different compiler options.

When doing that I have noticed that it seems as if only the first call
to AC_*_IFELSE needs the INPUT argument but on the other hand this seems
to be completely undocumented.

Is this a feature or a bug?

Example:

# Check for pthreads
AC_LINK_IFELSE(
  [AC_LANG_PROGRAM(
    [[@%:@include <pthread.h>]],
    [[pthread_create(0, 0, 0, 0);]])], [],
  [saved_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -pthread"
   AC_LINK_IFELSE([], [],
     [CFLAGS="$saved_CFLAGS"
      LIBS="-lpthread $LIBS"
      AC_LINK_IFELSE([], [],
        [AC_MSG_ERROR([pthreads are required but was not found])])])])



_______________________________________________
Autoconf mailing list
Autoconf@gnu.org
https://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to