--- a/configure +++ b/configure @@ -76,7 +76,7 @@ if [ x"$CC" = x ]; then for TRY in egcs gcc g++ CC c++ cc; do ( $TRY __conftest.c -o __conftest || exit 1; - ./__conftest || exit 1; + ${RUN_CONFTEST:-./__conftest} || exit 1; ) >/dev/null 2>&1 || continue; CC=$TRY break; @@ -92,7 +92,7 @@ else echo -n 'Checking if C compiler works... ' if ( $CC __conftest.c -o __conftest || exit 1 - ./__conftest || exit 1 + ${RUN_CONFTEST:-./__conftest} || exit 1 ) >/dev/null 2>&1; then echo 'yes' else @@ -172,13 +172,13 @@ int main() { EOF if ( $CC $CFLAGS __conftest.c -o __conftest || exit 1 - ./__conftest || exit 1 + ${RUN_CONFTEST:-./__conftest} || exit 1 ) >/dev/null 2>&1; then echo 'yes' else if ( $CC $CFLAGS -D__USE_BSD_SIGNAL __conftest.c -o __conftest || exit 1 - ./__conftest || exit 1 + ${RUN_CONFTEST:-./__conftest} || exit 1 ) >/dev/null 2>&1; then echo '-D__USE_BSD_SIGNAL' CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL" @@ -251,7 +251,7 @@ if ( else if ( $CC $CFLAGS -D_GNU_SOURCE __conftest.c -o __conftest || exit 1 - ./__conftest || exit 1 + ${RUN_CONFTEST:-./__conftest} || exit 1 ) >/dev/null 2>&1; then echo '-D_GNU_SOURCE' CFLAGS="$CFLAGS -D_GNU_SOURCE" @@ -282,20 +282,20 @@ int main() { EOF if ( $CC $CFLAGS __conftest.c $LIBBSD -o __conftest || exit 1 - ./__conftest || exit 1 + ${RUN_CONFTEST:-./__conftest} || exit 1 ) >/dev/null 2>&1; then echo 'ok' else if ( $CC $CFLAGS __conftest.c -lsnprintf $LIBBSD -o __conftest || exit 1 - ./__conftest || exit 1 + ${RUN_CONFTEST:-./__conftest} || exit 1 ) >/dev/null 2>&1; then echo '-lsnprintf' LIBS="$LIBS -lsnprintf" else if ( $CC $CFLAGS __conftest.c -ldb $LIBBSD -o __conftest || exit 1 - ./__conftest || exit 1 + ${RUN_CONFTEST:-./__conftest} || exit 1 ) >/dev/null 2>&1; then echo '-ldb' LIBS="$LIBS -ldb"