Fix shell var

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@9379 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2001-03-15 16:20:41 +00:00
parent 27f205df2f
commit f814b65e9c
4 changed files with 222 additions and 95 deletions

View file

@ -1,3 +1,9 @@
2001-03-15 Adam Fedor <fedor@gnu.org>
* configure.in: Use autoconf tests to detect CYGWIN, MINGW32,
EXEEXT, and OBJEXT. Add threading test for Mingw.
* config.make.in (OEXT): Use OBJEXT.
Thu Mar 15 00:55:19 2001 Nicola Pero <n.pero@mi.flashnet.it>
* GNUstep.sh.in, GNUstep.csh.in: Compute GNUSTEP_HOST_CPU,

View file

@ -29,7 +29,7 @@ OPTFLAG = @CFLAGS@
CPPFLAGS = @FORCE_CPPFLAGS@
EXEEXT = @EXEEXT@
OEXT = .o
OEXT = .@OBJEXT@
LIBEXT = .a
RESEXT = .res
RCEXT = .rc

273
configure vendored
View file

@ -810,40 +810,140 @@ esac
#--------------------------------------------------------------------
# Determine the host, build, and target systems
#--------------------------------------------------------------------
if test $host_os = mingw32 -o $host_os = mingw; then
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
echo "configure:815: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 820 "configure"
#include "confdefs.h"
int main() {
#ifndef __CYGWIN__
#define __CYGWIN__ __CYGWIN32__
#endif
return __CYGWIN__;
; return 0; }
EOF
if { (eval echo configure:831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_cygwin=no
fi
rm -f conftest*
rm -f conftest*
fi
echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
echo "configure:848: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 853 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
if { (eval echo configure:860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_mingw32=no
fi
rm -f conftest*
rm -f conftest*
fi
echo "$ac_t""$ac_cv_mingw32" 1>&6
MINGW32=
test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
echo "configure:879: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
ac_cv_exeext=.exe
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
if { (eval echo configure:889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
else
{ echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
fi
rm -f conftest*
test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
fi
fi
EXEEXT=""
test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
echo "$ac_t""${ac_cv_exeext}" 1>&6
ac_exeext=$EXEEXT
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
echo "configure:910: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
if { (eval echo configure:916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
*) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
esac
done
else
{ echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_objext" 1>&6
OBJEXT=$ac_cv_objext
ac_objext=$ac_cv_objext
if test $MINGW32 = yes; then
echo "hosted on mingw32 .."
export MINGW32=1
export SHELL=zsh
export CC=${CC:-gcc}
export AR=${AR:-ar}
export RANLIB=${RANLIB:-ranlib}
export DLLTOOL=${DLLTOOL:-dlltool}
export program_suffix=${program_suffix:-.exe}
if test "x$program_suffix" = "xNONE"; then
export program_suffix=.exe
fi
elif test $host_os = cygwin; then
elif $CYGWIN = yes; then
echo "hosted on cygwin .."
export MINGW32=0
export CC=${CC:-gcc}
export AR=${AR:-ar}
export RANLIB=${RANLIB:-ranlib}
export DLLTOOL=${DLLTOOL:-dlltool}
export program_suffix=${program_suffix:-.exe}
if test "x$program_suffix" = "xNONE"; then
export program_suffix=.exe
fi
else
MINGW32=0
export MINGW32
fi
EXEEXT=
if test "x$program_suffix" != "xNONE"; then
EXEEXT=$program_suffix
fi
#--------------------------------------------------------------------
# Find the binary and compile tools
#--------------------------------------------------------------------
@ -853,7 +953,7 @@ if test "x$target" != "x$host"; then
# Extract the first word of ""${targetArgument}-gcc"", so it can be a program name with args.
set dummy "${targetArgument}-gcc"; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:857: checking for $ac_word" >&5
echo "configure:957: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -883,7 +983,7 @@ fi
# Extract the first word of ""${targetArgument}-ranlib"", so it can be a program name with args.
set dummy "${targetArgument}-ranlib"; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:887: checking for $ac_word" >&5
echo "configure:987: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -913,7 +1013,7 @@ fi
# Extract the first word of ""${targetArgument}-ar"", so it can be a program name with args.
set dummy "${targetArgument}-ar"; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:917: checking for $ac_word" >&5
echo "configure:1017: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -943,7 +1043,7 @@ fi
# Extract the first word of ""${targetArgument}-dlltool"", so it can be a program name with args.
set dummy "${targetArgument}-dlltool"; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:947: checking for $ac_word" >&5
echo "configure:1047: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -974,7 +1074,7 @@ else
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:978: checking for $ac_word" >&5
echo "configure:1078: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1003,7 +1103,7 @@ fi
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1007: checking for $ac_word" >&5
echo "configure:1107: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1032,7 +1132,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1036: checking for $ac_word" >&5
echo "configure:1136: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1064,7 +1164,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1068: checking for $ac_word" >&5
echo "configure:1168: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1094,7 +1194,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1098: checking for $ac_word" >&5
echo "configure:1198: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1145,7 +1245,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1149: checking for $ac_word" >&5
echo "configure:1249: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1177,7 +1277,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1181: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:1281: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -1188,12 +1288,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 1192 "configure"
#line 1292 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:1197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -1219,12 +1319,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1223: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:1323: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1228: checking whether we are using GNU C" >&5
echo "configure:1328: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1233,7 +1333,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -1252,7 +1352,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1256: checking whether ${CC-cc} accepts -g" >&5
echo "configure:1356: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1284,7 +1384,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1288: checking how to run the C preprocessor" >&5
echo "configure:1388: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -1299,13 +1399,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1303 "configure"
#line 1403 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -1316,13 +1416,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1320 "configure"
#line 1420 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -1333,13 +1433,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 1337 "configure"
#line 1437 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -1366,7 +1466,7 @@ echo "$ac_t""$CPP" 1>&6
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1370: checking for $ac_word" >&5
echo "configure:1470: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1412,7 +1512,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1416: checking for a BSD compatible install" >&5
echo "configure:1516: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1475,7 +1575,7 @@ else
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:1479: checking whether ln -s works" >&5
echo "configure:1579: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1500,7 +1600,7 @@ TAR=
# Extract the first word of "gtar", so it can be a program name with args.
set dummy gtar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1504: checking for $ac_word" >&5
echo "configure:1604: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1559,7 +1659,7 @@ fi
# If so, there are probably other libraries that we want there also, so
# leave the proper includes in CPPFLAGS and LDFLAGS
echo $ac_n "checking for alternate objc library""... $ac_c" 1>&6
echo "configure:1563: checking for alternate objc library" >&5
echo "configure:1663: checking for alternate objc library" >&5
if eval "test \"`echo '$''{'gs_cv_objc_libdir'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1601,12 +1701,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
echo "configure:1605: checking for $ac_hdr that defines DIR" >&5
echo "configure:1705: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1610 "configure"
#line 1710 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@ -1614,7 +1714,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:1618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@ -1639,7 +1739,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
echo "configure:1643: checking for opendir in -ldir" >&5
echo "configure:1743: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1647,7 +1747,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1651 "configure"
#line 1751 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1658,7 +1758,7 @@ int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:1662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1680,7 +1780,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
echo "configure:1684: checking for opendir in -lx" >&5
echo "configure:1784: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1688,7 +1788,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1692 "configure"
#line 1792 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1699,7 +1799,7 @@ int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:1703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1725,17 +1825,17 @@ for ac_hdr in sys/param.h sys/file.h dir.h string.h stdlib.h sys/types.h sys/s
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1729: checking for $ac_hdr" >&5
echo "configure:1829: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1734 "configure"
#line 1834 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1766,7 +1866,7 @@ done
# Check if libobjc was compiled with thread support.
#--------------------------------------------------------------------
echo $ac_n "checking whether objc has thread support""... $ac_c" 1>&6
echo "configure:1770: checking whether objc has thread support" >&5
echo "configure:1870: checking whether objc has thread support" >&5
extra_LIBS=""
case "${target_os}" in
solaris*)
@ -1782,11 +1882,11 @@ if test $host_os = linux-gnu; then
objc_threaded="-lpthread"
else
cat > conftest.$ac_ext <<EOF
#line 1786 "configure"
#line 1886 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:1790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:1890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
objc_threaded="-lpthread"
else
@ -1804,11 +1904,11 @@ elif test "`echo $host_os|sed 's/[0-9].*//'|sed s/elf//`" = freebsd; then
objc_threaded="-pthread"
else
cat > conftest.$ac_ext <<EOF
#line 1808 "configure"
#line 1908 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:1912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
objc_threaded="-pthread"
else
@ -1826,11 +1926,11 @@ fi
objc_threaded="-lpthread"
else
cat > conftest.$ac_ext <<EOF
#line 1830 "configure"
#line 1930 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:1934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
objc_threaded="-lpthread"
else
@ -1849,11 +1949,11 @@ fi
objc_threaded="-lpcthread"
else
cat > conftest.$ac_ext <<EOF
#line 1853 "configure"
#line 1953 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:1857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
objc_threaded="-lpcthread"
else
@ -1866,17 +1966,40 @@ rm -fr conftest*
fi
fi
elif test $MINGW32 = yes; then
# Mingw doesn't need anything extra for threads
LIBS="-lobjc $LIBS $extra_LIBS"
if test "$cross_compiling" = yes; then
objc_threaded=""
else
cat > conftest.$ac_ext <<EOF
#line 1977 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:1981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
objc_threaded="works"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
objc_threaded=""
fi
rm -fr conftest*
fi
else
LIBS="-lobjc $LIBS -lthread $extra_LIBS"
if test "$cross_compiling" = yes; then
objc_threaded=""
else
cat > conftest.$ac_ext <<EOF
#line 1876 "configure"
#line 1999 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
objc_threaded="-lthread $extra_LIBS"
else
@ -1895,6 +2018,9 @@ if test x"$objc_threaded" = x""; then
echo "$ac_t""no" 1>&6
else
echo "$ac_t""yes" 1>&6
if test x"$objc_threaded" = x"works"; then
objc_threaded="",
fi
fi
ac_cv_objc_threaded="$objc_threaded"
@ -2075,6 +2201,7 @@ s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@ac_cv_library_combo@%$ac_cv_library_combo%g
s%@EXEEXT@%$EXEEXT%g
s%@OBJEXT@%$OBJEXT%g
s%@CC@%$CC%g
s%@RANLIB@%$RANLIB%g
s%@AR@%$AR%g

View file

@ -147,40 +147,25 @@ esac
#--------------------------------------------------------------------
# Determine the host, build, and target systems
#--------------------------------------------------------------------
if test $host_os = mingw32 -o $host_os = mingw; then
AC_CYGWIN
AC_MINGW32
AC_EXEEXT
AC_OBJEXT
if test $MINGW32 = yes; then
echo "hosted on mingw32 .."
export MINGW32=1
export SHELL=zsh
export CC=${CC:-gcc}
export AR=${AR:-ar}
export RANLIB=${RANLIB:-ranlib}
export DLLTOOL=${DLLTOOL:-dlltool}
export program_suffix=${program_suffix:-.exe}
if test "x$program_suffix" = "xNONE"; then
export program_suffix=.exe
fi
elif test $host_os = cygwin; then
elif $CYGWIN = yes; then
echo "hosted on cygwin .."
export MINGW32=0
export CC=${CC:-gcc}
export AR=${AR:-ar}
export RANLIB=${RANLIB:-ranlib}
export DLLTOOL=${DLLTOOL:-dlltool}
export program_suffix=${program_suffix:-.exe}
if test "x$program_suffix" = "xNONE"; then
export program_suffix=.exe
fi
else
MINGW32=0
export MINGW32
fi
EXEEXT=
if test "x$program_suffix" != "xNONE"; then
EXEEXT=$program_suffix
fi
AC_SUBST(EXEEXT)
#--------------------------------------------------------------------
# Find the binary and compile tools
#--------------------------------------------------------------------
@ -321,6 +306,12 @@ elif test "`echo $host_os|sed 's/[[0-9]].*//'|sed s/elf//`" = freebsd; then
AC_TRY_RUN([#include "config_thread.m"], objc_threaded="-lpcthread",
objc_threaded="", objc_threaded="-lpcthread")
fi
elif test $MINGW32 = yes; then
# Mingw doesn't need anything extra for threads
LIBS="-lobjc $LIBS $extra_LIBS"
AC_TRY_RUN([#include "config_thread.m"],
objc_threaded="works",
objc_threaded="", objc_threaded="")
else
LIBS="-lobjc $LIBS -lthread $extra_LIBS"
AC_TRY_RUN([#include "config_thread.m"],
@ -333,6 +324,9 @@ if test x"$objc_threaded" = x""; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
if test x"$objc_threaded" = x"works"; then
objc_threaded="",
fi
fi
ac_cv_objc_threaded="$objc_threaded"
AC_SUBST(objc_threaded)