blob: 184236918b91090634b8a4af58742c6a3b74bf4c [file] [log] [blame]
Fix up to work with cross-compiling ... most of these tests only
need to see if the example compiled, not whether it runs ...
--- configure
+++ configure
@@ -232,15 +232,13 @@
echo checking for POSIX.1 header files
echo "#include <unistd.h>
-main() {
#ifdef _POSIX_VERSION
-exit(0);
+main() { exit(0); }
#else
-exit(1);
-#endif
-}" > conftest.c
+# error no _POSIX_VERSION
+#endif" > conftest.c
eval $compile
-if test -s conftest && ./conftest 2>/dev/null; then
+if test -s conftest ; then
DEFS="$DEFS -DPOSIX"
fi
rm -f conftest conftest.c
@@ -249,7 +247,7 @@
echo "#include <strings.h>
main() { exit(0); rindex(0, 0); bzero(0, 0); }" > conftest.c
eval $compile
-if test -s conftest && ./conftest 2>/dev/null; then :
+if test -s conftest ; then :
else DEFS="$DEFS -DUSG"
fi
rm -f conftest conftest.c
@@ -258,7 +256,7 @@
echo '#include <sys/types.h>
main() { uid_t x; exit(0); }' > conftest.c
eval $compile
-if test -s conftest && ./conftest 2>/dev/null; then :
+if test -s conftest ; then :
else
uid_t=`awk '/pw_uid;/ {print $1}' $INCLUDEDIR/pwd.h`
DEFS="$DEFS -Duid_t=${uid_t} -Dgid_t=${uid_t}"
@@ -291,7 +289,7 @@
#endif
main() { char *p = (char *) alloca(1); exit(0); }' > conftest.c
eval $compile
-if test -s conftest && ./conftest 2>/dev/null; then :
+if test -s conftest ; then :
elif test -d /usr/ucblib; then LIBS="$LIBS -L/usr/ucblib -lucb"
elif test -f /usr/lib/libPW.a; then LIBS="$LIBS -lPW"
else DEFS="$DEFS -DALLOCA_MISSING"
@@ -321,7 +319,7 @@
struct option long_opts[] = { { "", no_argument, NULL, 0 } };
main() { exit(0); }' > conftest.c
eval $compile
-if test -s conftest && ./conftest 2>/dev/null; then
+if test -s conftest ; then
manpathoption="--path"
else
manpathoption="-w"