[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Avoiding to write test programs
From: |
Magnus Fromreide |
Subject: |
Avoiding to write test programs |
Date: |
Tue, 22 May 2012 08:04:58 +0200 |
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(
address@hidden:@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])])])])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Avoiding to write test programs,
Magnus Fromreide <=