Improve finding of libraries and headers.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13171 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-03-20 14:43:51 +00:00
parent 6af0d271a6
commit 80693d8ce0
3 changed files with 100 additions and 60 deletions

View file

@ -1,3 +1,9 @@
2002-03-20 Richard Frith-Macdonald <rfm@gnu.org>
* configure.in: Use info from make package, and look in GNUstep
directories first for versions of libraries and headers to use.
* configure: regenerate
2002-03-19 Adam Fedor <fedor@gnu.org>
* Source/NSWindow.m ([NSWindow -sendEvent:]): In resize event, get

137
configure vendored
View file

@ -562,13 +562,30 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
#--------------------------------------------------------------------
# The following is so that headers and custom libraries
# in the GNUstep root are used before the standard ones
#--------------------------------------------------------------------
# Set location of GNUstep dirs for later use
GNUSTEP_HDIR=$GNUSTEP_SYSTEM_ROOT/Headers
if test "$GNUSTEP_FLATTENED" = yes; then
GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Libraries
else
clean_target_os=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_os.sh $target_os`
clean_target_cpu=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_cpu.sh $target_cpu`
obj_dir=$clean_target_cpu/$clean_target_os
GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Libraries/$obj_dir
fi
CPPFLAGS="$CPPFLAGS -I$GNUSTEP_HDIR"
LDFLAGS="$LDFLAGS -L$GNUSTEP_LDIR/$LIBRARY_COMBO -L$GNUSTEP_LDIR"
#--------------------------------------------------------------------
# Find the compiler
#--------------------------------------------------------------------
# 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:572: checking for $ac_word" >&5
echo "configure:589: 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
@ -598,7 +615,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:602: checking for $ac_word" >&5
echo "configure:619: 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
@ -649,7 +666,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:653: checking for $ac_word" >&5
echo "configure:670: 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
@ -681,7 +698,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:685: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:702: 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.
@ -692,12 +709,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 696 "configure"
#line 713 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:718: \"$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
@ -723,12 +740,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:727: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:744: 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:732: checking whether we are using GNU C" >&5
echo "configure:749: 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
@ -737,7 +754,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:741: \"$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:758: \"$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
@ -756,7 +773,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:760: checking whether ${CC-cc} accepts -g" >&5
echo "configure:777: 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
@ -788,7 +805,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:792: checking how to run the C preprocessor" >&5
echo "configure:809: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -803,23 +820,6 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 807 "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:813: \"$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
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 824 "configure"
#include "confdefs.h"
#include <assert.h>
@ -835,7 +835,7 @@ else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 841 "configure"
#include "confdefs.h"
@ -845,6 +845,23 @@ EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:847: \"$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
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 858 "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:864: \"$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
:
else
@ -899,7 +916,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:903: checking host system type" >&5
echo "configure:920: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@ -920,7 +937,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:924: checking target system type" >&5
echo "configure:941: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@ -938,7 +955,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:942: checking build system type" >&5
echo "configure:959: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@ -962,7 +979,7 @@ test "$host_alias" != "$target_alias" &&
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
echo "configure:966: checking for main in -lm" >&5
echo "configure:983: checking for main in -lm" >&5
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -970,14 +987,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 974 "configure"
#line 991 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:998: \"$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
@ -1007,12 +1024,12 @@ fi
for ac_func in rint rintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1011: checking for $ac_func" >&5
echo "configure:1028: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1016 "configure"
#line 1033 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -1035,7 +1052,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -1104,7 +1121,7 @@ jpeg_check_lib_save_header=${CPPFLAGS}
CPPFLAGS="${with_jpeg_library} ${with_jpeg_include} ${CPPFLAGS}"
echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
echo "configure:1108: checking for jpeg_destroy_decompress in -ljpeg" >&5
echo "configure:1125: checking for jpeg_destroy_decompress in -ljpeg" >&5
ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1112,7 +1129,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ljpeg $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1116 "configure"
#line 1133 "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
@ -1123,7 +1140,7 @@ int main() {
jpeg_destroy_decompress()
; return 0; }
EOF
if { (eval echo configure:1127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1144: \"$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
@ -1146,9 +1163,9 @@ fi
if test "$jpeg_ok" = yes; then
echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
echo "configure:1150: checking for jpeglib.h" >&5
echo "configure:1167: checking for jpeglib.h" >&5
cat > conftest.$ac_ext <<EOF
#line 1152 "configure"
#line 1169 "configure"
#include "confdefs.h"
#include <stdio.h>
#undef PACKAGE
@ -1157,7 +1174,7 @@ echo "configure:1150: checking for jpeglib.h" >&5
#include <jpeglib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1178: \"$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*
@ -1219,7 +1236,7 @@ tiff_check_lib_save_header=${CPPFLAGS}
tiff_check_lib_save_libs=${LIBS}
CPPFLAGS="${with_tiff_library} ${JPEG_LIB} ${with_tiff_include} ${JPEG_INCLUDE} ${CPPFLAGS}"
echo $ac_n "checking for main in -lz""... $ac_c" 1>&6
echo "configure:1223: checking for main in -lz" >&5
echo "configure:1240: checking for main in -lz" >&5
ac_lib_var=`echo z'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1227,14 +1244,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lz $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1231 "configure"
#line 1248 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:1238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1255: \"$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
@ -1257,17 +1274,17 @@ fi
echo $ac_n "checking for -ltiff without -ljpeg nor -lz""... $ac_c" 1>&6
echo "configure:1261: checking for -ltiff without -ljpeg nor -lz" >&5
echo "configure:1278: checking for -ltiff without -ljpeg nor -lz" >&5
LIBS="-ltiff -lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1264 "configure"
#line 1281 "configure"
#include "confdefs.h"
char TIFFReadScanline();
int main() {
TIFFReadScanline()
; return 0; }
EOF
if { (eval echo configure:1271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
jpeg_notneeded=yes
else
@ -1286,17 +1303,17 @@ fi
if test $HAVE_LIBZ = 1; then
echo $ac_n "checking for -ltiff without -lz""... $ac_c" 1>&6
echo "configure:1290: checking for -ltiff without -lz" >&5
echo "configure:1307: checking for -ltiff without -lz" >&5
LIBS="-ltiff $JPEG -lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1293 "configure"
#line 1310 "configure"
#include "confdefs.h"
char TIFFReadScanline();
int main() {
TIFFReadScanline()
; return 0; }
EOF
if { (eval echo configure:1300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
libz_notneeded=yes
else
@ -1314,7 +1331,7 @@ rm -f conftest*
fi
echo $ac_n "checking for TIFFReadScanline in -ltiff""... $ac_c" 1>&6
echo "configure:1318: checking for TIFFReadScanline in -ltiff" >&5
echo "configure:1335: checking for TIFFReadScanline in -ltiff" >&5
ac_lib_var=`echo tiff'_'TIFFReadScanline | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1322,7 +1339,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltiff $JPEG -lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1326 "configure"
#line 1343 "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
@ -1333,7 +1350,7 @@ int main() {
TIFFReadScanline()
; return 0; }
EOF
if { (eval echo configure:1337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1354: \"$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
@ -1357,17 +1374,17 @@ fi
if test "$tiff_ok" = yes; then
ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
echo "configure:1361: checking for tiffio.h" >&5
echo "configure:1378: checking for tiffio.h" >&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 1366 "configure"
#line 1383 "configure"
#include "confdefs.h"
#include <tiffio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1388: \"$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*
@ -1420,7 +1437,7 @@ ADDITIONAL_DEPENDS="$GRAPHIC_LIBS"
# Record the version
#--------------------------------------------------------------------
echo $ac_n "checking for the version of gnustep-gui we are compiling""... $ac_c" 1>&6
echo "configure:1424: checking for the version of gnustep-gui we are compiling" >&5
echo "configure:1441: checking for the version of gnustep-gui we are compiling" >&5
if test -f "Version"; then
. ./Version
fi

View file

@ -39,6 +39,23 @@ AC_CONFIG_AUX_DIR($GNUSTEP_SYSTEM_ROOT/Makefiles)
AC_CONFIG_HEADER(Headers/gnustep/gui/config.h)
#--------------------------------------------------------------------
# The following is so that headers and custom libraries
# in the GNUstep root are used before the standard ones
#--------------------------------------------------------------------
# Set location of GNUstep dirs for later use
GNUSTEP_HDIR=$GNUSTEP_SYSTEM_ROOT/Headers
if test "$GNUSTEP_FLATTENED" = yes; then
GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Libraries
else
clean_target_os=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_os.sh $target_os`
clean_target_cpu=`$GNUSTEP_SYSTEM_ROOT/Makefiles/clean_cpu.sh $target_cpu`
obj_dir=$clean_target_cpu/$clean_target_os
GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Libraries/$obj_dir
fi
CPPFLAGS="$CPPFLAGS -I$GNUSTEP_HDIR"
LDFLAGS="$LDFLAGS -L$GNUSTEP_LDIR/$LIBRARY_COMBO -L$GNUSTEP_LDIR"
#--------------------------------------------------------------------
# Find the compiler
#--------------------------------------------------------------------