From: Thomas Tanner Date: Tue, 6 Apr 1999 22:12:16 +0000 (+0000) Subject: * NEWS: improved DJGPP support X-Git-Tag: release-1-3~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73a31166163189036767758f1faf7f4cd754fc86;p=thirdparty%2Flibtool.git * NEWS: improved DJGPP support * libtool.m4: some DJGPP fixes * ltconfig.in: ditto, reverted one of my previous patches: we need to check for NM * ltmain.in: some DJGPP fixes --- diff --git a/ChangeLog b/ChangeLog index 1727ed083..7bc6656c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1999-04-06 Thomas Tanner + + * NEWS: improved DJGPP support + * libtool.m4: some DJGPP fixes + * ltconfig.in: ditto, reverted one of my previous patches: we need + to check for NM + * ltmain.in: some DJGPP fixes + 1999-04-05 Alexandre Oliva * ltconfig.in (netbsd*, GNU ld): Support a.out shared libraries diff --git a/NEWS b/NEWS index a85572fbc..8744d445e 100644 --- a/NEWS +++ b/NEWS @@ -8,7 +8,7 @@ New in 1.3: 1999-04-??; CVS version 1.2g, Libtool team: * Libltdl has a new license: LGPL with a special exception * Libltdl can be used as stand-alone package * dlopen support for BeOS -* Improved support for AIX, BeOS, Cygwin and HP/UX +* Improved support for AIX, BeOS, Cygwin, DJGPP and HP/UX * Documentation updates * New tests * Bugfixes diff --git a/libltdl/configure.in b/libltdl/configure.in index bdcb5afec..c07c9d3ef 100644 --- a/libltdl/configure.in +++ b/libltdl/configure.in @@ -231,10 +231,10 @@ EOF #endif EOF # Now try linking the two files. - mv conftest.$ac_objext conftestm.$ac_objext + mv conftest.$ac_objext conftstm.$ac_objext ac_save_LIBS="$LIBS" ac_save_CFLAGS="$CFLAGS" - LIBS="conftestm.$ac_objext" + LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" if AC_TRY_EVAL(ac_link) && test -s conftest; then ac_pipe_works=yes @@ -257,7 +257,7 @@ EOF echo "$progname: failed program was:" >&AC_FD_CC cat conftest.c >&AC_FD_CC fi - rm -rf conftest* + rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$ac_pipe_works" = yes; then diff --git a/libtool.m4 b/libtool.m4 index 2e20e203d..a69acb7f0 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -248,7 +248,7 @@ if test "$ac_cv_prog_gcc" = yes; then case "$ac_prog" in # Accept absolute paths. changequote(,)dnl - /* | [A-Za-z]:[\\/]*) + [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' changequote([,])dnl # Canonicalize the path of ld @@ -274,7 +274,7 @@ else fi AC_CACHE_VAL(ac_cv_path_LD, [if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog"; then diff --git a/ltconfig.in b/ltconfig.in index 567d0607f..7f13f223d 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -894,9 +894,9 @@ $rm conftest* if test -z "$LN_S"; then # Check to see if we can use ln -s, or we need hard links. echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 - $rm conftestdata - if ln -s X conftestdata 2>/dev/null; then - $rm conftestdata + $rm conftest.dat + if ln -s X conftest.dat 2>/dev/null; then + $rm conftest.dat LN_S="ln -s" else LN_S=ln @@ -918,7 +918,7 @@ if test -z "$LD"; then ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. - /* | [A-Za-z]:[\\/]*) + [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` @@ -1358,6 +1358,37 @@ fi echo "$ac_t$ld_shlibs" 1>&6 test "$ld_shlibs" = no && can_build_shared=no +if test -z "$NM"; then + echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 + case "$NM" in + [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" + for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/nm; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + NM="$ac_dir/nm -B" + break + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + NM="$ac_dir/nm -p" + break + else + NM=${NM="$ac_dir/nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + fi + fi + done + IFS="$ac_save_ifs" + test -z "$NM" && NM=nm + ;; + esac + echo "$ac_t$NM" 1>&6 +fi + # Check for command to grab the raw symbol name followed by C symbol from nm. echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 @@ -1472,10 +1503,10 @@ EOF #endif EOF # Now try linking the two files. - mv conftest.$objext conftestm.$objext + mv conftest.$objext conftstm.$objext save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" - LIBS="conftestm.$objext" + LIBS="conftstm.$objext" CFLAGS="$CFLAGS$no_builtin_flag" if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then pipe_works=yes @@ -1497,7 +1528,7 @@ EOF echo "$progname: failed program was:" >&5 cat conftest.c >&5 fi - $rm conftest* + $rm conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then diff --git a/ltmain.in b/ltmain.in index 16c54f8bf..eeb0e9823 100644 --- a/ltmain.in +++ b/ltmain.in @@ -921,7 +921,7 @@ compiler." rpath | xrpath) # We need an absolute path. case "$arg" in - /* | [A-Za-z]:[/\\]*) ;; + [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 @@ -1008,7 +1008,7 @@ compiler." fi # We need an absolute path. case "$dir" in - /* | [A-Za-z]:[/\\]*) ;; + [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then @@ -1088,7 +1088,7 @@ compiler." dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case "$dir" in - /* | [A-Za-z]:[/\\]*) ;; + [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 @@ -1280,7 +1280,7 @@ compiler." # We need an absolute path. case "$dir" in - /* | [A-Za-z]:[/\\]*) absdir="$dir" ;; + [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then @@ -1905,7 +1905,7 @@ EOF while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | sed 's/.* -> //'` case "$potliblink" in - /*) potlib="$potliblink";; + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done @@ -2039,7 +2039,7 @@ EOF for xlib in $convenience; do # Extract the objects. case "$xlib" in - /* | [A-Za-z]:[/\\]*) xabs="$xlib" ;; + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` @@ -2539,7 +2539,7 @@ static const void *lt_preloaded_setup() { rpath= for dir in $temp_rpath; do case "$dir" in - /* | [A-Za-z]:[/\\]*) + [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; @@ -2632,7 +2632,7 @@ static const void *lt_preloaded_setup() { # Quote $echo for shipping. if test "X$echo" = "X$SHELL $0 --fallback-echo"; then case "$0" in - /* | [A-Za-z]:[/\\]*) qecho="$SHELL $0 --fallback-echo";; + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; *) qecho="$SHELL `pwd`/$0 --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` @@ -2709,7 +2709,7 @@ else # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in - /* | [A-Za-z]:[/\\]*) thisdir=\"\$destdir\" ;; + [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi @@ -2863,7 +2863,7 @@ fi\ for xlib in $addlibs; do # Extract the objects. case "$xlib" in - /* | [A-Za-z]:[/\\]*) xabs="$xlib" ;; + [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` @@ -3093,7 +3093,7 @@ libdir='$install_libdir'\ fi fi case "$destdir" in - /* | [A-Za-z]:[/\\]*) ;; + [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case "$file" in