2 # Originally contributed by: Mark Kettenis <kettenis@phys.uva.nl> Dec 10 1998
4 # libnsl is unusable on the Hurd.
5 # XXX remove this once SUNRPC is implemented.
6 set `echo X "$libswanted "| sed -e 's/ bsd / /' -e 's/ nsl / /' -e 's/ c / pthread /'`
10 # Debian 4.0 puts ndbm in the -lgdbm_compat library.
11 libswanted="$libswanted gdbm_compat"
14 case "$usemallocwrap" in
15 '') usemallocwrap='define' ;;
18 # The system malloc() is about as fast and as frugal as perl's.
19 # Since the system malloc() has been the default since at least
20 # 5.001, we might as well leave it that way. --AD 10 Jan 2002
21 case "$usemymalloc" in
22 '') usemymalloc='n' ;;
30 '') plibpth=`gcc -print-search-dirs | grep libraries |
31 cut -f2- -d= | tr ':' $trnl | grep -v 'gcc' | sed -e 's:/$::'`
32 set X $plibpth # Collapse all entries on one line
40 # If you have glibc, then report the version for ./myconfig bug reporting.
41 # (Configure doesn't need to know the specific version since it just uses
42 # gcc to load the library for all tests.)
43 # We don't use __GLIBC__ and __GLIBC_MINOR__ because they
44 # are insufficiently precise to distinguish things like
45 # libc-2.0.6 and libc-2.0.7.
48 for trylib in libc.so.0.3 libc.so
50 if $test -e $p/$trylib; then
51 libc=`ls -l $p/$trylib | awk '{print $NF}'`
52 if $test "X$libc" != X; then
57 if $test "X$libc" != X; then
64 # Flags needed to produce shared libraries.
67 # Flags needed by programs that use dynamic linking.
70 # This script UU/usethreads.cbu will get 'called-back' by Configure
71 # after it has prompted the user for whether to use threads.
72 cat > UU/usethreads.cbu <<'EOCBU'
75 ccflags="-D_REENTRANT -D_GNU_SOURCE $ccflags"
76 if echo $libswanted | grep -v pthread >/dev/null
78 set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
83 # Somehow at least in Debian 2.2 these manage to escape
84 # the #define forest of <features.h> and <time.h> so that
85 # the hasproto macro of Configure doesn't see these protos,
86 # even with the -D_GNU_SOURCE.
88 d_asctime_r_proto="$define"
89 d_crypt_r_proto="$define"
90 d_ctime_r_proto="$define"
91 d_gmtime_r_proto="$define"
92 d_localtime_r_proto="$define"
93 d_random_r_proto="$define"
99 cat > UU/uselargefiles.cbu <<'EOCBU'
100 # This script UU/uselargefiles.cbu will get 'called-back' by Configure
101 # after it has prompted the user for whether to use large files.
102 case "$uselargefiles" in
103 ''|$define|true|[yY]*)
104 # Keep this in the left margin.
105 ccflags_uselargefiles="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
107 ccflags="$ccflags $ccflags_uselargefiles"
112 # The following routines are only available as stubs in GNU libc.
113 # XXX remove this once metaconf detects the GNU libc stubs.