]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (exeext): Use $exeext when working out the names of
authorGary V. Vaughan <gary@gnu.org>
Tue, 8 Jun 1999 12:48:35 +0000 (12:48 +0000)
committerGary V. Vaughan <gary@gnu.org>
Tue, 8 Jun 1999 12:48:35 +0000 (12:48 +0000)
programs (but not the wrapper script itself due to a stupidity in
win32 which hardwires the .exe extension to the binary loader!).
* ltconfig.in (exeext): Now that the wrapper script tries to move
executables, we need to know whether they have an extension (ala
AC_EXEEXT).  Since we can't rely on AC_EXEEXT having been called
in configure.in, we must be able to check for ourselves, though we
can look for a cached result incase AC_EXEEXT was called.

ChangeLog
ltconfig.in
ltmain.in

index 365a103720b6990addea0e2ae5dc7b0ea17a39b5..37a1dfe55d57ab69f6b05d60255f3e554bef7365 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 1999-06-08  Gary V. Vaughan  <gary@oranda.demon.co.uk>
 
+       * ltmain.in (exeext): Use $exeext when working out the names of
+       programs (but not the wrapper script itself due to a stupidity in
+       win32 which hardwires the .exe extension to the binary loader!).
+       * ltconfig.in (exeext): Now that the wrapper script tries to move
+       executables, we need to know whether they have an extension (ala
+       AC_EXEEXT).  Since we can't rely on AC_EXEEXT having been called
+       in configure.in, we must be able to check for ourselves, though we
+       can look for a cached result incase AC_EXEEXT was called.
+       
        * ltconfig.in (cygwin, need_version): Set to no, otherwise module
        dll's end up with mighty long names!
        
index 1a22df6db65c2b62326e4487ed4234da2feeb336..7df23f39898221f6f135d195e41a26d2fe9da470 100755 (executable)
@@ -181,7 +181,8 @@ help="Try \`$progname --help' for more information."
 default_ofile=libtool
 can_build_shared=yes
 enable_shared=yes
-# All known linkers require a `.a' archive for static linking.
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
 enable_static=yes
 enable_fast_install=yes
 enable_dlopen=unknown
@@ -201,6 +202,7 @@ need_locks=yes
 ac_ext=c
 objext=o
 libext=a
+exeext=
 cache_file=
 
 old_AR="$AR"
@@ -617,6 +619,36 @@ fi
 $rm conftest*
 echo "$ac_t$objext" 1>&6
 
+echo $ac_n "checking for executable suffix... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_cv_exeext="none"
+  $rm conftest*
+  echo 'main () { return 0; }' > conftest.c
+  echo "$progname:@LINENO@: checking for executable suffix" >& 5
+  if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
+    # Append any warnings to the config.log.
+    cat conftest.err 1>&5
+
+    for ac_file in conftest.*; do
+      case $ac_file in
+      *.c | *.$objext ) ;;
+      *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
+      esac
+    done
+  else
+    cat conftest.err 1>&5
+    echo "$progname: failed program was:" >&5
+    cat conftest.c >&5
+  fi
+  $rm conftest*
+fi
+if test X$ac_cv_exeext != Xnone; then
+  exeext="$ac_cv_exeext"
+fi
+echo "$ac_t$ac_cv_exeext" 1>&6
+
 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
 pic_flag=
 special_shlib_compile_flags=
@@ -2733,6 +2765,9 @@ objext="$objext"
 # Old archive suffix (normally "a").
 libext="$libext"
 
+# Executable file suffix (normally "").
+exeext="$exeext"
+
 # Additional compiler flags for building library objects.
 pic_flag=$pic_flag
 
index 1f5a7e1550fdab3c3e3ddb6ddbf4b3c995b80c05..ca7e1f17dd991e50cb6ff12a93efdd5fb58e18a4 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -2816,7 +2816,7 @@ else
 
        if test "$fast_install" = yes; then
          echo >> $output "\
-  program=lt-'$outputname'
+  program=lt-'$outputname$exeext'
   progdir=\"\$thisdir/$objdir\"
   
   if test ! -f \"\$progdir/\$program\" || \\
@@ -2849,7 +2849,7 @@ else
   fi"
        else
          echo >> $output "\
-  program='$outputname'
+  program='$outputname$exeext'
   progdir=\"\$thisdir/$objdir\"
 "
        fi