[gcl] Update to 20120109 snapshot.
Jerry James
jjames at fedoraproject.org
Tue Jan 10 04:09:20 UTC 2012
commit 9eb0e10408ca61f8c0c47a1674f00ed5912e6304
Author: Jerry James <loganjerry at gmail.com>
Date: Mon Jan 9 21:08:57 2012 -0700
Update to 20120109 snapshot.
.gitignore | 4 +-
gcl-2.6.8-alloca.patch | 232 +-
gcl-2.6.8-asm-signal-h.patch | 46 +-
gcl-2.6.8-extension.patch | 349 +-
gcl-2.6.8-infrastructure.patch |14177 ++++++++++++++++++++--------------------
gcl-2.6.8-unrandomize.patch | 146 +-
gcl.spec | 29 +-
sources | 2 +-
8 files changed, 7560 insertions(+), 7425 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c95815e..e0f5145 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-gcl-2.6.8.tar.xz
-gcl-2.6.8-info.tar.xz
+/gcl-2.6.8.tar.xz
+/gcl-2.6.8-info.tar.xz
diff --git a/gcl-2.6.8-alloca.patch b/gcl-2.6.8-alloca.patch
index 7b94e15..cae7508 100644
--- a/gcl-2.6.8-alloca.patch
+++ b/gcl-2.6.8-alloca.patch
@@ -1,5 +1,116 @@
---- ./configure.orig 2011-06-01 15:29:46.654433763 -0600
-+++ ./configure 2011-06-01 15:36:13.191433769 -0600
+--- ./acconfig.h.orig 2009-02-23 12:39:42.000000000 -0700
++++ ./acconfig.h 2012-01-09 20:47:04.938687050 -0700
+@@ -53,11 +53,10 @@
+ #undef HAVE_ALLOCA
+ #endif
+
+-
+ /* define if need alloca.h */
+-#undef NEED_ALLOCA_H
++#undef HAVE_ALLOCA_H
+
+-#ifdef NEED_ALLOCA_H
++#ifdef HAVE_ALLOCA_H
+ #include <alloca.h>
+ #endif
+
+--- ./h/gclincl.h.in.orig 2010-08-04 15:44:24.000000000 -0600
++++ ./h/gclincl.h.in 2012-01-09 20:47:04.939687029 -0700
+@@ -54,11 +54,10 @@
+ #undef HAVE_ALLOCA
+ #endif
+
+-
+ /* define if need alloca.h */
+-#undef NEED_ALLOCA_H
++#undef HAVE_ALLOCA_H
+
+-#ifdef NEED_ALLOCA_H
++#ifdef HAVE_ALLOCA_H
+ #include <alloca.h>
+ #endif
+
+@@ -260,6 +259,21 @@
+ #undef HAVE_OBJC_MALLOC_H
+ #undef HAVE_OUTPUT_BFD
+
++/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
++ systems. This function is required for `alloca.c' support on those systems.
++ */
++#undef CRAY_STACKSEG_END
++
++/* Define to 1 if using `alloca.c'. */
++#undef C_ALLOCA
++
++/* Define to 1 if you have `alloca', as a function or macro. */
++#undef HAVE_ALLOCA
++
++/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
++ */
++#undef HAVE_ALLOCA_H
++
+ /* Define to 1 if you have the <asm/sigcontext.h> header file. */
+ #undef HAVE_ASM_SIGCONTEXT_H
+
+@@ -365,8 +379,19 @@
+ /* The size of `long', as computed by sizeof. */
+ #undef SIZEOF_LONG
+
++/* If using the C implementation of alloca, define if you know the
++ direction of stack growth for your system; otherwise it will be
++ automatically deduced at runtime.
++ STACK_DIRECTION > 0 => grows toward higher addresses
++ STACK_DIRECTION < 0 => grows toward lower addresses
++ STACK_DIRECTION = 0 => direction of growth unknown */
++#undef STACK_DIRECTION
++
+ /* staticly linked images */
+ #undef STATIC_LINKING
+
+ /* Define to 1 if you have the ANSI C header files. */
+ #undef STDC_HEADERS
++
++/* Define to `unsigned int' if <sys/types.h> does not define. */
++#undef size_t
+--- ./configure.in.orig 2012-01-09 20:41:39.017551755 -0700
++++ ./configure.in 2012-01-09 20:47:04.940687008 -0700
+@@ -1906,33 +1906,7 @@
+
+ # alloca
+
+-AC_MSG_CHECKING([for alloca])
+-AC_RUN_IFELSE([AC_LANG_PROGRAM([],[[exit(alloca(500) != NULL ? 0 : 1);]])],
+- ,gcl_ok=yes, gcl_ok=no,gcl_ok=no)
+-if test $gcl_ok = yes ; then
+- AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_ALLOCA)
+-else
+- AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+- #include <alloca.h>
+- ]],[[exit(alloca(500) != NULL ? 0 : 1);]])],
+- ,gcl_ok=yes, gcl_ok=no,gcl_ok=no)
+- if test $gcl_ok = yes ; then
+- AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_ALLOCA)
+- AC_DEFINE(NEED_ALLOCA_H)
+- fi
+-fi
+-if test $gcl_ok = no ; then AC_MSG_RESULT(no) ; fi
+-
+-
+-
+-
+-
+-
+-
+-
+-
++AC_FUNC_ALLOCA
+
+ # dlopen etc
+ # idea make it so you do something dlopen(libX.so,RTLD_GLOBAL)
+--- ./configure.orig 2012-01-09 20:41:41.703495184 -0700
++++ ./configure 2012-01-09 20:47:13.481507117 -0700
@@ -609,6 +609,7 @@
NIFLAGS
FINAL_CFLAGS
@@ -9,9 +120,9 @@
TCL_LIBS
TCL_DL_LIBS
@@ -2045,6 +2046,60 @@
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
- } # ac_fn_c_check_func
+ } # ac_fn_c_compute_int
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
@@ -69,7 +180,7 @@
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-@@ -7787,81 +7842,205 @@
+@@ -7882,81 +7937,205 @@
# alloca
@@ -309,114 +420,3 @@
# dlopen etc
---- ./acconfig.h.orig 2009-02-23 12:39:42.000000000 -0700
-+++ ./acconfig.h 2011-06-01 15:34:15.452433766 -0600
-@@ -53,11 +53,10 @@
- #undef HAVE_ALLOCA
- #endif
-
--
- /* define if need alloca.h */
--#undef NEED_ALLOCA_H
-+#undef HAVE_ALLOCA_H
-
--#ifdef NEED_ALLOCA_H
-+#ifdef HAVE_ALLOCA_H
- #include <alloca.h>
- #endif
-
---- ./h/gclincl.h.in.orig 2010-08-04 15:44:24.000000000 -0600
-+++ ./h/gclincl.h.in 2011-06-01 15:36:13.000000000 -0600
-@@ -54,11 +54,10 @@
- #undef HAVE_ALLOCA
- #endif
-
--
- /* define if need alloca.h */
--#undef NEED_ALLOCA_H
-+#undef HAVE_ALLOCA_H
-
--#ifdef NEED_ALLOCA_H
-+#ifdef HAVE_ALLOCA_H
- #include <alloca.h>
- #endif
-
-@@ -260,6 +259,21 @@
- #undef HAVE_OBJC_MALLOC_H
- #undef HAVE_OUTPUT_BFD
-
-+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
-+ systems. This function is required for `alloca.c' support on those systems.
-+ */
-+#undef CRAY_STACKSEG_END
-+
-+/* Define to 1 if using `alloca.c'. */
-+#undef C_ALLOCA
-+
-+/* Define to 1 if you have `alloca', as a function or macro. */
-+#undef HAVE_ALLOCA
-+
-+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
-+ */
-+#undef HAVE_ALLOCA_H
-+
- /* Define to 1 if you have the <asm/sigcontext.h> header file. */
- #undef HAVE_ASM_SIGCONTEXT_H
-
-@@ -365,8 +379,19 @@
- /* The size of `long', as computed by sizeof. */
- #undef SIZEOF_LONG
-
-+/* If using the C implementation of alloca, define if you know the
-+ direction of stack growth for your system; otherwise it will be
-+ automatically deduced at runtime.
-+ STACK_DIRECTION > 0 => grows toward higher addresses
-+ STACK_DIRECTION < 0 => grows toward lower addresses
-+ STACK_DIRECTION = 0 => direction of growth unknown */
-+#undef STACK_DIRECTION
-+
- /* staticly linked images */
- #undef STATIC_LINKING
-
- /* Define to 1 if you have the ANSI C header files. */
- #undef STDC_HEADERS
-+
-+/* Define to `unsigned int' if <sys/types.h> does not define. */
-+#undef size_t
---- ./configure.in.orig 2011-06-01 15:26:13.260433763 -0600
-+++ ./configure.in 2011-06-01 15:34:57.261433766 -0600
-@@ -1885,33 +1885,7 @@
-
- # alloca
-
--AC_MSG_CHECKING([for alloca])
--AC_RUN_IFELSE([AC_LANG_PROGRAM([],[[exit(alloca(500) != NULL ? 0 : 1);]])],
-- ,gcl_ok=yes, gcl_ok=no,gcl_ok=no)
--if test $gcl_ok = yes ; then
-- AC_MSG_RESULT(yes)
-- AC_DEFINE(HAVE_ALLOCA)
--else
-- AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-- #include <alloca.h>
-- ]],[[exit(alloca(500) != NULL ? 0 : 1);]])],
-- ,gcl_ok=yes, gcl_ok=no,gcl_ok=no)
-- if test $gcl_ok = yes ; then
-- AC_MSG_RESULT(yes)
-- AC_DEFINE(HAVE_ALLOCA)
-- AC_DEFINE(NEED_ALLOCA_H)
-- fi
--fi
--if test $gcl_ok = no ; then AC_MSG_RESULT(no) ; fi
--
--
--
--
--
--
--
--
--
-+AC_FUNC_ALLOCA
-
- # dlopen etc
- # idea make it so you do something dlopen(libX.so,RTLD_GLOBAL)
diff --git a/gcl-2.6.8-asm-signal-h.patch b/gcl-2.6.8-asm-signal-h.patch
index 066e4bf..10152f4 100644
--- a/gcl-2.6.8-asm-signal-h.patch
+++ b/gcl-2.6.8-asm-signal-h.patch
@@ -1,6 +1,25 @@
---- ./configure.orig 2011-06-01 15:49:00.462433776 -0600
-+++ ./configure 2011-06-01 15:55:30.799433783 -0600
-@@ -8135,7 +8135,8 @@
+--- ./configure.in.orig 2012-01-09 20:51:43.102828225 -0700
++++ ./configure.in 2012-01-09 20:53:17.237845506 -0700
+@@ -1624,7 +1624,7 @@
+
+ #if test $use = "386-linux" ; then
+ AC_CHECK_HEADERS(asm/sigcontext.h)
+- AC_CHECK_HEADERS(asm/signal.h)
++ AC_CHECK_HEADERS(asm/signal.h, [], [], [#define __ASSEMBLY__])
+ AC_MSG_CHECKING([for sigcontext])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <signal.h>
+@@ -1649,6 +1649,7 @@
+ #include <asm/sigcontext.h>
+ #endif
+ #ifdef HAVE_ASM_SIGNAL_H
++ #define __ASSEMBLY__
+ #include <asm/signal.h>
+ #endif
+ ]],
+--- ./configure.orig 2012-01-09 20:51:54.679584389 -0700
++++ ./configure 2012-01-09 20:53:37.292423109 -0700
+@@ -8230,7 +8230,8 @@
for ac_header in asm/signal.h
do :
@@ -10,7 +29,7 @@
if test "x$ac_cv_header_asm_signal_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_ASM_SIGNAL_H 1
-@@ -8188,6 +8189,7 @@
+@@ -8283,6 +8284,7 @@
#include <asm/sigcontext.h>
#endif
#ifdef HAVE_ASM_SIGNAL_H
@@ -18,22 +37,3 @@
#include <asm/signal.h>
#endif
---- ./configure.in.orig 2011-06-01 15:44:46.725433778 -0600
-+++ ./configure.in 2011-06-01 15:55:16.181433781 -0600
-@@ -1603,7 +1603,7 @@
-
- #if test $use = "386-linux" ; then
- AC_CHECK_HEADERS(asm/sigcontext.h)
-- AC_CHECK_HEADERS(asm/signal.h)
-+ AC_CHECK_HEADERS(asm/signal.h, [], [], [#define __ASSEMBLY__])
- AC_MSG_CHECKING([for sigcontext])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include <signal.h>
-@@ -1628,6 +1628,7 @@
- #include <asm/sigcontext.h>
- #endif
- #ifdef HAVE_ASM_SIGNAL_H
-+ #define __ASSEMBLY__
- #include <asm/signal.h>
- #endif
- ]],
diff --git a/gcl-2.6.8-extension.patch b/gcl-2.6.8-extension.patch
index 0ed0c35..885ff90 100644
--- a/gcl-2.6.8-extension.patch
+++ b/gcl-2.6.8-extension.patch
@@ -1,5 +1,120 @@
---- ./configure.orig 2011-06-01 15:36:13.191433769 -0600
-+++ ./configure 2011-06-01 15:40:10.483433770 -0600
+--- ./acconfig.h.orig 2012-01-09 20:47:04.938687050 -0700
++++ ./acconfig.h 2012-01-09 20:49:21.947801299 -0700
+@@ -1,3 +1,6 @@
++/* Whether compiling on a glibc-based system */
++#undef _GNU_SOURCE
++
+ /* define where the heap could begin. Normally should
+ be the smallest value returned by sbrk(). Underestimating
+ by 10-20 megabytes is not a problem. */
+@@ -157,7 +160,6 @@
+
+ #ifdef IN_NUM_CO
+ #ifdef HAVE_ISNORMAL
+-#define _GNU_SOURCE
+ #include <math.h>
+ #define ISNORMAL(a) isnormal(a)
+ #else
+@@ -178,7 +180,6 @@
+
+ #ifdef NEED_ISFINITE
+ #ifdef HAVE_ISFINITE
+-#define _GNU_SOURCE
+ #include <math.h>
+ #define ISFINITE(a) isfinite(a)
+ #else
+--- ./h/gclincl.h.in.orig 2012-01-09 20:47:04.939687029 -0700
++++ ./h/gclincl.h.in 2012-01-09 20:49:21.948801277 -0700
+@@ -1,4 +1,7 @@
+ /* h/gclincl.h.in. Generated from configure.in by autoheader. */
++/* Whether compiling on a glibc-based system */
++#undef _GNU_SOURCE
++
+ /* define where the heap could begin. Normally should
+ be the smallest value returned by sbrk(). Underestimating
+ by 10-20 megabytes is not a problem. */
+@@ -158,7 +161,6 @@
+
+ #ifdef IN_NUM_CO
+ #ifdef HAVE_ISNORMAL
+-#define _GNU_SOURCE
+ #include <math.h>
+ #define ISNORMAL(a) isnormal(a)
+ #else
+@@ -179,7 +181,6 @@
+
+ #ifdef NEED_ISFINITE
+ #ifdef HAVE_ISFINITE
+-#define _GNU_SOURCE
+ #include <math.h>
+ #define ISFINITE(a) isfinite(a)
+ #else
+@@ -393,5 +394,37 @@
+ /* Define to 1 if you have the ANSI C header files. */
+ #undef STDC_HEADERS
+
++/* Enable extensions on AIX 3, Interix. */
++#ifndef _ALL_SOURCE
++# undef _ALL_SOURCE
++#endif
++/* Enable GNU extensions on systems that have them. */
++#ifndef _GNU_SOURCE
++# undef _GNU_SOURCE
++#endif
++/* Enable threading extensions on Solaris. */
++#ifndef _POSIX_PTHREAD_SEMANTICS
++# undef _POSIX_PTHREAD_SEMANTICS
++#endif
++/* Enable extensions on HP NonStop. */
++#ifndef _TANDEM_SOURCE
++# undef _TANDEM_SOURCE
++#endif
++/* Enable general extensions on Solaris. */
++#ifndef __EXTENSIONS__
++# undef __EXTENSIONS__
++#endif
++
++
++/* Define to 1 if on MINIX. */
++#undef _MINIX
++
++/* Define to 2 if the system does not provide POSIX.1 features except with
++ this defined. */
++#undef _POSIX_1_SOURCE
++
++/* Define to 1 if you need to in order for `stat' and other things to work. */
++#undef _POSIX_SOURCE
++
+ /* Define to `unsigned int' if <sys/types.h> does not define. */
+ #undef size_t
+--- ./configure.in.orig 2012-01-09 20:47:04.940687008 -0700
++++ ./configure.in 2012-01-09 20:49:21.949801255 -0700
+@@ -421,6 +421,7 @@
+ LDFLAGS=" "
+ fi
+
++AC_USE_SYSTEM_EXTENSIONS
+ AC_PROG_CC
+ AC_PROG_CPP
+ AC_SUBST(CC)
+@@ -1414,7 +1415,6 @@
+ #
+ AC_MSG_CHECKING([for isnormal])
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+- #define _GNU_SOURCE
+ #include <math.h>
+ ]],[[
+ float f;
+@@ -1432,7 +1432,6 @@
+
+ AC_MSG_CHECKING([for isfinite])
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+- #define _GNU_SOURCE
+ #include <math.h>
+ ]],[[
+ float f;
+--- ./configure.orig 2012-01-09 20:47:13.481507117 -0700
++++ ./configure 2012-01-09 20:49:33.805551545 -0700
@@ -654,9 +654,9 @@
GMP
MAKEINFO
@@ -11,6 +126,104 @@
CPP
OBJEXT
EXEEXT
+@@ -1585,48 +1585,6 @@
+
+ } # ac_fn_c_try_cpp
+
+-# ac_fn_c_try_run LINENO
+-# ----------------------
+-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+-# that executables *can* be run.
+-ac_fn_c_try_run ()
+-{
+- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+- if { { ac_try="$ac_link"
+-case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+-$as_echo "$ac_try_echo"; } >&5
+- (eval "$ac_link") 2>&5
+- ac_status=$?
+- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+- { { case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+-$as_echo "$ac_try_echo"; } >&5
+- (eval "$ac_try") 2>&5
+- ac_status=$?
+- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+- test $ac_status = 0; }; }; then :
+- ac_retval=0
+-else
+- $as_echo "$as_me: program exited with status $ac_status" >&5
+- $as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+- ac_retval=$ac_status
+-fi
+- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+- as_fn_set_status $ac_retval
+-
+-} # ac_fn_c_try_run
+-
+ # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+ # -------------------------------------------------------
+ # Tests whether HEADER exists, giving a warning if it cannot be compiled using
+@@ -1714,6 +1672,48 @@
+
+ } # ac_fn_c_check_header_mongrel
+
++# ac_fn_c_try_run LINENO
++# ----------------------
++# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
++# that executables *can* be run.
++ac_fn_c_try_run ()
++{
++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++ if { { ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
++ { { case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; }; then :
++ ac_retval=0
++else
++ $as_echo "$as_me: program exited with status $ac_status" >&5
++ $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_retval=$ac_status
++fi
++ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++ as_fn_set_status $ac_retval
++
++} # ac_fn_c_try_run
++
+ # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+ # -------------------------------------------------------
+ # Tests whether HEADER exists and can be compiled using the include files in
@@ -3909,6 +3909,1005 @@
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
@@ -1017,12 +1230,21 @@
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-@@ -4311,268 +5310,7 @@
+@@ -4069,8 +5068,7 @@
+ $as_echo_n "checking for CFLAG $TMPF... " >&6; }
+ CFLAGS_ORI=$CFLAGS
+ CFLAGS="$CFLAGS $TMPF"
+-
+-if test "$cross_compiling" = yes; then :
++ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ as_fn_error $? "cannot run test program while cross compiling
+@@ -4356,267 +5354,7 @@
case $use in
*macosx)
-
--
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
@@ -1287,7 +1509,7 @@
if test "x$ac_cv_header_malloc_malloc_h" = xyes; then :
else
-@@ -6765,7 +7503,6 @@
+@@ -6860,7 +7598,6 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -1295,7 +1517,7 @@
#include <math.h>
int
-@@ -6839,7 +7576,6 @@
+@@ -6934,7 +7671,6 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -1303,118 +1525,3 @@
#include <math.h>
int
---- ./acconfig.h.orig 2011-06-01 15:34:15.452433766 -0600
-+++ ./acconfig.h 2011-06-01 15:39:02.836433769 -0600
-@@ -1,3 +1,6 @@
-+/* Whether compiling on a glibc-based system */
-+#undef _GNU_SOURCE
-+
- /* define where the heap could begin. Normally should
- be the smallest value returned by sbrk(). Underestimating
- by 10-20 megabytes is not a problem. */
-@@ -157,7 +160,6 @@
-
- #ifdef IN_NUM_CO
- #ifdef HAVE_ISNORMAL
--#define _GNU_SOURCE
- #include <math.h>
- #define ISNORMAL(a) isnormal(a)
- #else
-@@ -178,7 +180,6 @@
-
- #ifdef NEED_ISFINITE
- #ifdef HAVE_ISFINITE
--#define _GNU_SOURCE
- #include <math.h>
- #define ISFINITE(a) isfinite(a)
- #else
---- ./h/gclincl.h.in.orig 2011-06-01 15:36:13.000000000 -0600
-+++ ./h/gclincl.h.in 2011-06-01 15:40:10.000000000 -0600
-@@ -1,4 +1,7 @@
- /* h/gclincl.h.in. Generated from configure.in by autoheader. */
-+/* Whether compiling on a glibc-based system */
-+#undef _GNU_SOURCE
-+
- /* define where the heap could begin. Normally should
- be the smallest value returned by sbrk(). Underestimating
- by 10-20 megabytes is not a problem. */
-@@ -158,7 +161,6 @@
-
- #ifdef IN_NUM_CO
- #ifdef HAVE_ISNORMAL
--#define _GNU_SOURCE
- #include <math.h>
- #define ISNORMAL(a) isnormal(a)
- #else
-@@ -179,7 +181,6 @@
-
- #ifdef NEED_ISFINITE
- #ifdef HAVE_ISFINITE
--#define _GNU_SOURCE
- #include <math.h>
- #define ISFINITE(a) isfinite(a)
- #else
-@@ -393,5 +394,37 @@
- /* Define to 1 if you have the ANSI C header files. */
- #undef STDC_HEADERS
-
-+/* Enable extensions on AIX 3, Interix. */
-+#ifndef _ALL_SOURCE
-+# undef _ALL_SOURCE
-+#endif
-+/* Enable GNU extensions on systems that have them. */
-+#ifndef _GNU_SOURCE
-+# undef _GNU_SOURCE
-+#endif
-+/* Enable threading extensions on Solaris. */
-+#ifndef _POSIX_PTHREAD_SEMANTICS
-+# undef _POSIX_PTHREAD_SEMANTICS
-+#endif
-+/* Enable extensions on HP NonStop. */
-+#ifndef _TANDEM_SOURCE
-+# undef _TANDEM_SOURCE
-+#endif
-+/* Enable general extensions on Solaris. */
-+#ifndef __EXTENSIONS__
-+# undef __EXTENSIONS__
-+#endif
-+
-+
-+/* Define to 1 if on MINIX. */
-+#undef _MINIX
-+
-+/* Define to 2 if the system does not provide POSIX.1 features except with
-+ this defined. */
-+#undef _POSIX_1_SOURCE
-+
-+/* Define to 1 if you need to in order for `stat' and other things to work. */
-+#undef _POSIX_SOURCE
-+
- /* Define to `unsigned int' if <sys/types.h> does not define. */
- #undef size_t
---- ./configure.in.orig 2011-06-01 15:34:57.261433766 -0600
-+++ ./configure.in 2011-06-01 15:39:34.750433770 -0600
-@@ -421,6 +421,7 @@
- LDFLAGS=" "
- fi
-
-+AC_USE_SYSTEM_EXTENSIONS
- AC_PROG_CC
- AC_PROG_CPP
- AC_SUBST(CC)
-@@ -1393,7 +1394,6 @@
- #
- AC_MSG_CHECKING([for isnormal])
- AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-- #define _GNU_SOURCE
- #include <math.h>
- ]],[[
- float f;
-@@ -1411,7 +1411,6 @@
-
- AC_MSG_CHECKING([for isfinite])
- AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-- #define _GNU_SOURCE
- #include <math.h>
- ]],[[
- float f;
diff --git a/gcl-2.6.8-infrastructure.patch b/gcl-2.6.8-infrastructure.patch
index eba163c..79b3274 100644
--- a/gcl-2.6.8-infrastructure.patch
+++ b/gcl-2.6.8-infrastructure.patch
@@ -1,6834 +1,5610 @@
---- ./configure.orig 2011-05-11 14:02:54.000000000 -0600
-+++ ./configure 2011-06-01 15:29:46.654433763 -0600
-@@ -651,10 +651,10 @@
- XMKMF
- GMPDIR
- GMP
-+MAKEINFO
- HAVE_MALLOC_ZONE_MEMALIGN
- EGREP
- GREP
--MAKEINFO
- AWK
- CPP
- OBJEXT
-@@ -4231,51 +4231,6 @@
- $as_echo_n "checking system version (for dynamic loading)... " >&6; }
- if machine=`uname -m` ; then true; else machine=unknown ; fi
-
--for ac_prog in makeinfo
--do
-- # Extract the first word of "$ac_prog", so it can be a program name with args.
--set dummy $ac_prog; ac_word=$2
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
--$as_echo_n "checking for $ac_word... " >&6; }
--if ${ac_cv_prog_MAKEINFO+:} false; then :
-- $as_echo_n "(cached) " >&6
--else
-- if test -n "$MAKEINFO"; then
-- ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
--else
--as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH
--do
-- IFS=$as_save_IFS
-- test -z "$as_dir" && as_dir=.
-- for ac_exec_ext in '' $ac_executable_extensions; do
-- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-- ac_cv_prog_MAKEINFO="$ac_prog"
-- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-- break 2
-- fi
--done
-- done
--IFS=$as_save_IFS
--
--fi
--fi
--MAKEINFO=$ac_cv_prog_MAKEINFO
--if test -n "$MAKEINFO"; then
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
--$as_echo "$MAKEINFO" >&6; }
--else
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }
--fi
--
--
-- test -n "$MAKEINFO" && break
--done
--test -n "$MAKEINFO" || MAKEINFO=""false""
--
--
--
- if test -f /usr/lib/NextStep/software_version; then
- system=NEXTSTEP-`${AWK} '/3/,/3/' /usr/lib/NextStep/software_version`
- else
-@@ -4674,22 +4629,29 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sysconf" >&5
- $as_echo "$ac_cv_lib_c_sysconf" >&6; }
- if test "x$ac_cv_lib_c_sysconf" = xyes; then :
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for _SC_CLK_TCK\"" >&5
--$as_echo_n "checking \"for _SC_CLK_TCK\"... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _SC_CLK_TCK" >&5
-+$as_echo_n "checking for _SC_CLK_TCK... " >&6; }
- if test "$cross_compiling" = yes; then :
- hz=0
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <unistd.h>
+--- ./ltmain.sh.orig 2002-08-08 23:49:32.000000000 -0600
++++ ./ltmain.sh 2012-01-09 20:36:31.869118769 -0700
+@@ -1,199 +1,928 @@
+-# ltmain.sh - Provide generalized library-building support services.
+-# NOTE: Changing this file will not affect anything until you rerun ltconfig.
+-#
+-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+-# Free Software Foundation, Inc.
+-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+-#
+-# This program is free software; you can redistribute it and/or modify
+
-+ #include <unistd.h>
- #include <stdio.h>
-- int
-- main() {
++# libtool (GNU libtool) 2.4
++# Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+
-+int
-+main ()
-+{
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
++# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
++# This is free software; see the source for copying conditions. There is NO
++# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
- FILE *fp=fopen("conftest1","w");
- fprintf(fp,"%lu\n",sysconf(_SC_CLK_TCK));
- fclose(fp);
- return 0;
-- }
++# GNU Libtool is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or
+ # (at your option) any later version.
+ #
+-# This program is distributed in the hope that it will be useful, but
++# As a special exception to the GNU General Public License,
++# if you distribute this file as part of a program or library that
++# is built using GNU Libtool, you may include this file under the
++# same distribution terms that you use for the rest of that program.
++#
++# GNU Libtool is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ # General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++# along with GNU Libtool; see the file COPYING. If not, a copy
++# can be downloaded from http://www.gnu.org/licenses/gpl.html,
++# or obtained by writing to the Free Software Foundation, Inc.,
++# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
-+ ;
-+ return 0;
-+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- hz=`cat conftest1`
-@@ -4713,6 +4675,117 @@
++# Usage: $progname [OPTION]... [MODE-ARG]...
+ #
+-# As a special exception to the GNU General Public License, if you
+-# distribute this file as part of a program that contains a
+-# configuration script generated by Autoconf, you may include it under
+-# the same distribution terms that you use for the rest of that program.
++# Provide generalized library-building support services.
++#
++# --config show all configuration variables
++# --debug enable verbose shell tracing
++# -n, --dry-run display commands without modifying any files
++# --features display basic configuration information and exit
++# --mode=MODE use operation mode MODE
++# --preserve-dup-deps don't remove duplicate dependency libraries
++# --quiet, --silent don't print informational messages
++# --no-quiet, --no-silent
++# print informational messages (default)
++# --tag=TAG use configuration variables from tag TAG
++# -v, --verbose print more informational messages than default
++# --no-verbose don't print the extra informational messages
++# --version print version information
++# -h, --help, --help-all print short, long, or detailed help message
++#
++# MODE must be one of the following:
++#
++# clean remove files from the build directory
++# compile compile a source file into a libtool object
++# execute automatically set library path, then run a program
++# finish complete the installation of libtool libraries
++# install install libraries or executables
++# link create a library or an executable
++# uninstall remove libraries from an installed directory
++#
++# MODE-ARGS vary depending on the MODE. When passed as first option,
++# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
++# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
++#
++# When reporting a bug, please describe a test case to reproduce it and
++# include the following information:
++#
++# host-triplet: $host
++# shell: $SHELL
++# compiler: $LTCC
++# compiler flags: $LTCFLAGS
++# linker: $LD (gnu? $with_gnu_ld)
++# $progname: (GNU libtool) 2.4
++# automake: $automake_version
++# autoconf: $autoconf_version
++#
++# Report bugs to <bug-libtool at gnu.org>.
++# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
++# General help using GNU software: <http://www.gnu.org/gethelp/>.
+-# Check that we have a working $echo.
+-if test "X$1" = X--no-reexec; then
+- # Discard the --no-reexec flag, and continue.
+- shift
+-elif test "X$1" = X--fallback-echo; then
+- # Avoid inline document here, it may be left over
+- :
+-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+- # Yippee, $echo works!
+- :
++PROGRAM=libtool
++PACKAGE=libtool
++VERSION=2.4
++TIMESTAMP=""
++package_revision=1.3293
++
++# Be Bourne compatible
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++ setopt NO_GLOB_SUBST
+ else
+- # Restart under the correct shell, and then maybe $echo will work.
+- exec $SHELL "$0" --no-reexec ${1+"$@"}
++ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+ fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
+-if test "X$1" = X--fallback-echo; then
+- # used as fallback echo
+- shift
+- cat <<EOF
+-$*
+-EOF
+- exit 0
+-fi
++# A function that is used when there is no print builtin or printf.
++func_fallback_echo ()
++{
++ eval 'cat <<_LTECHO_EOF
++$1
++_LTECHO_EOF'
++}
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-+$as_echo_n "checking for egrep... " >&6; }
-+if ${ac_cv_path_EGREP+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-+ then ac_cv_path_EGREP="$GREP -E"
-+ else
-+ if test -z "$EGREP"; then
-+ ac_path_EGREP_found=false
-+ # Loop through the user's path and test for each of PROGNAME-LIST
-+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+-# The name of this program.
+-progname=`$echo "$0" | sed 's%^.*/%%'`
+-modename="$progname"
++# NLS nuisances: We save the old values to restore during execute mode.
++lt_user_locale=
++lt_safe_locale=
++for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_prog in egrep; do
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-+# Check for GNU ac_path_EGREP and select it if it is found.
-+ # Check for GNU $ac_path_EGREP
-+case `"$ac_path_EGREP" --version 2>&1` in
-+*GNU*)
-+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-+*)
-+ ac_count=0
-+ $as_echo_n 0123456789 >"conftest.in"
-+ while :
-+ do
-+ cat "conftest.in" "conftest.in" >"conftest.tmp"
-+ mv "conftest.tmp" "conftest.in"
-+ cp "conftest.in" "conftest.nl"
-+ $as_echo 'EGREP' >> "conftest.nl"
-+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-+ as_fn_arith $ac_count + 1 && ac_count=$as_val
-+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-+ # Best one so far, save it but keep looking for a better one
-+ ac_cv_path_EGREP="$ac_path_EGREP"
-+ ac_path_EGREP_max=$ac_count
-+ fi
-+ # 10*(2^10) chars as input seems more than enough
-+ test $ac_count -gt 10 && break
-+ done
-+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-+esac
++ eval "if test \"\${$lt_var+set}\" = set; then
++ save_$lt_var=\$$lt_var
++ $lt_var=C
++ export $lt_var
++ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
++ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
++ fi"
++done
++LC_ALL=C
++LANGUAGE=C
++export LANGUAGE LC_ALL
+
+-# Constants.
+-PROGRAM=ltmain.sh
+-PACKAGE=libtool
+-VERSION=1.4a-GCC3.0
+-TIMESTAMP=" (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)"
++$lt_unset CDPATH
+
+-default_mode=
+-help="Try \`$progname --help' for more information."
+-magic="%%%MAGIC variable%%%"
+-mkdir="mkdir"
+-mv="mv -f"
+-rm="rm -f"
+
+-# Sed substitution that helps us do robust quoting. It backslashifies
+-# metacharacters that are still active within double-quoted strings.
+-Xsed='sed -e 1s/^X//'
+-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+-SP2NL='tr \040 \012'
+-NL2SP='tr \015\012 \040\040'
++# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
++# is ksh but when the shell is invoked as "sh" and the current value of
++# the _XPG environment variable is not equal to 1 (one), the special
++# positional parameter $0, within a function call, is the name of the
++# function.
++progpath="$0"
+
+-# NLS nuisances.
+-# Only set LANG and LC_ALL to C if already set.
+-# These must not be set unconditionally because not all systems understand
+-# e.g. LANG=C (notably SCO).
+-# We save the old values to restore during execute mode.
+-if test "${LC_ALL+set}" = set; then
+- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+-fi
+-if test "${LANG+set}" = set; then
+- save_LANG="$LANG"; LANG=C; export LANG
+-fi
+
+-if test "$LTCONFIG_VERSION" != "$VERSION"; then
+- echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
+- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+- exit 1
+-fi
+
+-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+- echo "$modename: not configured to build any kind of library" 1>&2
+- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+- exit 1
+-fi
++: ${CP="cp -f"}
++test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
++: ${EGREP="/bin/grep -E"}
++: ${FGREP="/bin/grep -F"}
++: ${GREP="/bin/grep"}
++: ${LN_S="ln -s"}
++: ${MAKE="make"}
++: ${MKDIR="mkdir"}
++: ${MV="mv -f"}
++: ${RM="rm -f"}
++: ${SED="/bin/sed"}
++: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
++: ${Xsed="$SED -e 1s/^X//"}
+
+-# Global variables.
+-mode=$default_mode
+-nonopt=
+-prev=
+-prevopt=
+-run=
+-show="$echo"
+-show_help=
+-execute_dlfiles=
+-lo2o="s/\\.lo\$/.${objext}/"
+-o2lo="s/\\.${objext}\$/.lo/"
+-taglist=
++# Global variables:
++EXIT_SUCCESS=0
++EXIT_FAILURE=1
++EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
++EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+-# Parse our command line options once, thoroughly.
+-while test $# -gt 0
+-do
+- arg="$1"
+- shift
++exit_status=$EXIT_SUCCESS
+
+- case $arg in
+- -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+- *) optarg= ;;
+- esac
++# Make sure IFS has a sensible default
++lt_nl='
++'
++IFS=" $lt_nl"
+
+- # If the previous option needs an argument, assign it.
+- if test -n "$prev"; then
+- case $prev in
+- execute_dlfiles)
+- execute_dlfiles="$execute_dlfiles $arg"
++dirname="s,/[^/]*$,,"
++basename="s,^.*/,,"
+
-+ $ac_path_EGREP_found && break 3
-+ done
-+ done
-+ done
-+IFS=$as_save_IFS
-+ if test -z "$ac_cv_path_EGREP"; then
-+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-+ fi
-+else
-+ ac_cv_path_EGREP=$EGREP
-+fi
++# func_dirname file append nondir_replacement
++# Compute the dirname of FILE. If nonempty, add APPEND to the result,
++# otherwise set result to NONDIR_REPLACEMENT.
++func_dirname ()
++{
++ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
++ if test "X$func_dirname_result" = "X${1}"; then
++ func_dirname_result="${3}"
++ else
++ func_dirname_result="$func_dirname_result${2}"
++ fi
++} # func_dirname may be replaced by extended shell implementation
+
-+ fi
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-+$as_echo "$ac_cv_path_EGREP" >&6; }
-+ EGREP="$ac_cv_path_EGREP"
+
++# func_basename file
++func_basename ()
++{
++ func_basename_result=`$ECHO "${1}" | $SED "$basename"`
++} # func_basename may be replaced by extended shell implementation
+
-+for ac_prog in makeinfo
-+do
-+ # Extract the first word of "$ac_prog", so it can be a program name with args.
-+set dummy $ac_prog; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if ${ac_cv_prog_MAKEINFO+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$MAKEINFO"; then
-+ ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_MAKEINFO="$ac_prog"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
+
-+fi
-+fi
-+MAKEINFO=$ac_cv_prog_MAKEINFO
-+if test -n "$MAKEINFO"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
-+$as_echo "$MAKEINFO" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
++# func_dirname_and_basename file append nondir_replacement
++# perform func_basename and func_dirname in a single function
++# call:
++# dirname: Compute the dirname of FILE. If nonempty,
++# add APPEND to the result, otherwise set result
++# to NONDIR_REPLACEMENT.
++# value returned in "$func_dirname_result"
++# basename: Compute filename of FILE.
++# value retuned in "$func_basename_result"
++# Implementation must be kept synchronized with func_dirname
++# and func_basename. For efficiency, we do not delegate to
++# those functions but instead duplicate the functionality here.
++func_dirname_and_basename ()
++{
++ # Extract subdirectory from the argument.
++ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
++ if test "X$func_dirname_result" = "X${1}"; then
++ func_dirname_result="${3}"
++ else
++ func_dirname_result="$func_dirname_result${2}"
++ fi
++ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
++} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
-+ test -n "$MAKEINFO" && break
-+done
-+test -n "$MAKEINFO" || MAKEINFO=""false""
++# func_stripname prefix suffix name
++# strip PREFIX and SUFFIX off of NAME.
++# PREFIX and SUFFIX must not contain globbing or regex special
++# characters, hashes, percent signs, but SUFFIX may contain a leading
++# dot (in which case that matches only a dot).
++# func_strip_suffix prefix name
++func_stripname ()
++{
++ case ${2} in
++ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
++ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
++ esac
++} # func_stripname may be replaced by extended shell implementation
+
+
-
- #MY_SUBDIRS=
-
-@@ -4766,25 +4839,36 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_init" >&5
- $as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; }
- if test "x$ac_cv_lib_gmp___gmpz_init" = xyes; then :
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for external gmp version\"" >&5
--$as_echo_n "checking \"for external gmp version\"... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for external gmp version" >&5
-+$as_echo_n "checking for external gmp version... " >&6; }
- if test "$cross_compiling" = yes; then :
-- echo "Cannot use dynamic gmp lib"
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Cannot use dynamic gmp lib" >&5
-+$as_echo "Cannot use dynamic gmp lib" >&6; }
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <gmp.h>
-- int main() {
-+
-+ #include <gmp.h>
++# These SED scripts presuppose an absolute path with a trailing slash.
++pathcar='s,^/\([^/]*\).*$,\1,'
++pathcdr='s,^/[^/]*,,'
++removedotparts=':dotsl
++ s@/\./@/@g
++ t dotsl
++ s,/\.$,/,'
++collapseslashes='s@/\{1,\}@/@g'
++finalslash='s,/*$,/,'
+
-+int
-+main ()
++# func_normal_abspath PATH
++# Remove doubled-up and trailing slashes, "." path components,
++# and cancel out any ".." path components in PATH after making
++# it an absolute path.
++# value returned in "$func_normal_abspath_result"
++func_normal_abspath ()
+{
-+
- #if __GNU_MP_VERSION == 4 || __GNU_MP_VERSION == 5
- return 0;
- #else
- return -1;
- #endif
-- }
-+
-+ ;
-+ return 0;
++ # Start from root dir and reassemble the path.
++ func_normal_abspath_result=
++ func_normal_abspath_tpath=$1
++ func_normal_abspath_altnamespace=
++ case $func_normal_abspath_tpath in
++ "")
++ # Empty path, that just means $cwd.
++ func_stripname '' '/' "`pwd`"
++ func_normal_abspath_result=$func_stripname_result
++ return
++ ;;
++ # The next three entries are used to spot a run of precisely
++ # two leading slashes without using negated character classes;
++ # we take advantage of case's first-match behaviour.
++ ///*)
++ # Unusual form of absolute path, do nothing.
++ ;;
++ //*)
++ # Not necessarily an ordinary path; POSIX reserves leading '//'
++ # and for example Cygwin uses it to access remote file shares
++ # over CIFS/SMB, so we conserve a leading double slash if found.
++ func_normal_abspath_altnamespace=/
++ ;;
++ /*)
++ # Absolute path, do nothing.
++ ;;
++ *)
++ # Relative path, prepend $cwd.
++ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
++ ;;
++ esac
++ # Cancel out all the simple stuff to save iterations. We also want
++ # the path to end with a slash for ease of parsing, so make sure
++ # there is one (and only one) here.
++ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
++ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
++ while :; do
++ # Processed it all yet?
++ if test "$func_normal_abspath_tpath" = / ; then
++ # If we ascended to the root using ".." the result may be empty now.
++ if test -z "$func_normal_abspath_result" ; then
++ func_normal_abspath_result=/
++ fi
++ break
++ fi
++ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
++ -e "$pathcar"`
++ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
++ -e "$pathcdr"`
++ # Figure out what to do with it
++ case $func_normal_abspath_tcomponent in
++ "")
++ # Trailing empty path component, ignore it.
+ ;;
+- tag)
+- tagname="$arg"
++ ..)
++ # Parent dir; strip last assembled component from result.
++ func_dirname "$func_normal_abspath_result"
++ func_normal_abspath_result=$func_dirname_result
++ ;;
++ *)
++ # Actual path component, append it.
++ func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
++ ;;
++ esac
++ done
++ # Restore leading double-slash if one was found on entry.
++ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- # MPFILES=$GMPDIR/mpn/mul_n.o
- # PATCHED_SYMBOLS=__gmpn_toom3_mul_n
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 4/5" >&5
-+$as_echo "4/5" >&6; }
- MPFILES=
- PATCHED_SYMBOLS=
- # if test "$use" = "m68k-linux" ; then
-@@ -4797,7 +4881,8 @@
- MP_INCLUDE=`cpp foo.c | grep /gmp.h | head -n 1 | $AWK '{print $3}' | tr -d '"'`
- rm -f foo.c
- else
-- echo "Cannot use dynamic gmp lib"
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Cannot use dynamic gmp lib" >&5
-+$as_echo "Cannot use dynamic gmp lib" >&6; }
- fi
- rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-@@ -4857,8 +4942,8 @@
- fi
-
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for leading underscore in object symbols\"" >&5
--$as_echo_n "checking \"for leading underscore in object symbols\"... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for leading underscore in object symbols" >&5
-+$as_echo_n "checking for leading underscore in object symbols... " >&6; }
- cat>foo.c <<EOFF
- #include <math.h>
- #include <stdio.h>
-@@ -4869,45 +4954,53 @@
- LEADING_UNDERSCORE=1
- $as_echo "#define LEADING_UNDERSCORE 1" >>confdefs.h
+- # Check whether tagname contains only valid characters
+- case $tagname in
+- *[!-_A-Za-z0-9,/]*)
+- echo "$progname: invalid tag name: $tagname" 1>&2
+- exit 1
+- ;;
+- esac
++# func_relative_path SRCDIR DSTDIR
++# generates a relative path from SRCDIR to DSTDIR, with a trailing
++# slash if non-empty, suitable for immediately appending a filename
++# without needing to append a separator.
++# value returned in "$func_relative_path_result"
++func_relative_path ()
++{
++ func_relative_path_result=
++ func_normal_abspath "$1"
++ func_relative_path_tlibdir=$func_normal_abspath_result
++ func_normal_abspath "$2"
++ func_relative_path_tbindir=$func_normal_abspath_result
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5
--$as_echo "\"yes\"" >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
- else
- LEADING_UNDERSCORE=""
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
--$as_echo "\"no\"" >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for GNU ld option -Map\"" >&5
--$as_echo_n "checking \"for GNU ld option -Map\"... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld option -Map" >&5
-+$as_echo_n "checking for GNU ld option -Map... " >&6; }
- touch map
- $CC -o foo -Wl,-Map map foo.o >/dev/null 2>&1
- if test `cat map | wc -l` != "0" ; then
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5
--$as_echo "\"yes\"" >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-+$as_echo "yes" >&6; }
- $as_echo "#define HAVE_GNU_LD 1" >>confdefs.h
+- case $tagname in
+- CC)
+- # Don't test for the "default" C tag, as we know, it's there, but
+- # not specially marked.
+- taglist="$taglist $tagname"
+- ;;
++ # Ascend the tree starting from libdir
++ while :; do
++ # check if we have found a prefix of bindir
++ case $func_relative_path_tbindir in
++ $func_relative_path_tlibdir)
++ # found an exact match
++ func_relative_path_tcancelled=
++ break
++ ;;
++ $func_relative_path_tlibdir*)
++ # found a matching prefix
++ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
++ func_relative_path_tcancelled=$func_stripname_result
++ if test -z "$func_relative_path_result"; then
++ func_relative_path_result=.
++ fi
++ break
++ ;;
+ *)
+- if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
+- taglist="$taglist $tagname"
+- # Evaluate the configuration.
+- eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
+- else
+- echo "$progname: ignoring unknown tag $tagname" 1>&2
++ func_dirname $func_relative_path_tlibdir
++ func_relative_path_tlibdir=${func_dirname_result}
++ if test "x$func_relative_path_tlibdir" = x ; then
++ # Have to descend all the way to the root!
++ func_relative_path_result=../$func_relative_path_result
++ func_relative_path_tcancelled=$func_relative_path_tbindir
++ break
+ fi
++ func_relative_path_result=../$func_relative_path_result
+ ;;
+- esac
+- ;;
+- *)
+- eval "$prev=\$arg"
+- ;;
+ esac
++ done
- GNU_LD=1
- else
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
--$as_echo "\"no\"" >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
- GNU_LD=
- fi
- rm -f foo.c foo.o foo map
+- prev=
+- prevopt=
+- continue
++ # Now calculate path; take care to avoid doubling-up slashes.
++ func_stripname '' '/' "$func_relative_path_result"
++ func_relative_path_result=$func_stripname_result
++ func_stripname '/' '/' "$func_relative_path_tcancelled"
++ if test "x$func_stripname_result" != x ; then
++ func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+ fi
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for size of gmp limbs\"" >&5
--$as_echo_n "checking \"for size of gmp limbs\"... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for size of gmp limbs" >&5
-+$as_echo_n "checking for size of gmp limbs... " >&6; }
- if test "$cross_compiling" = yes; then :
- mpsize=0
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <stdio.h>
+- # Have we seen a non-optional argument yet?
+- case $arg in
+- --help)
+- show_help=yes
+- ;;
++ # Normalisation. If bindir is libdir, return empty string,
++ # else relative path ending with a slash; either way, target
++ # file name can be directly appended.
++ if test ! -z "$func_relative_path_result"; then
++ func_stripname './' '' "$func_relative_path_result/"
++ func_relative_path_result=$func_stripname_result
++ fi
++}
+
+- --version)
+- echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+- exit 0
++# The name of this program:
++func_dirname_and_basename "$progpath"
++progname=$func_basename_result
+
-+ #include <stdio.h>
- #include "$MP_INCLUDE"
-- int main() {
++# Make sure we have an absolute path for reexecution:
++case $progpath in
++ [\\/]*|[A-Za-z]:\\*) ;;
++ *[\\/]*)
++ progdir=$func_dirname_result
++ progdir=`cd "$progdir" && pwd`
++ progpath="$progdir/$progname"
++ ;;
++ *)
++ save_IFS="$IFS"
++ IFS=:
++ for progdir in $PATH; do
++ IFS="$save_IFS"
++ test -x "$progdir/$progname" && break
++ done
++ IFS="$save_IFS"
++ test -n "$progdir" || progdir=`pwd`
++ progpath="$progdir/$progname"
++ ;;
++esac
+
-+int
-+main ()
-+{
++# Sed substitution that helps us do robust quoting. It backslashifies
++# metacharacters that are still active within double-quoted strings.
++Xsed="${SED}"' -e 1s/^X//'
++sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
- FILE *fp=fopen("conftest1","w");
- fprintf(fp,"%u",sizeof(mp_limb_t));
- fclose(fp);
- return 0;
-- }
++# Same as above, but do not quote variable references.
++double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
-+ ;
-+ return 0;
-+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- mpsize=`cat conftest1`
-@@ -4919,8 +5012,7 @@
- fi
-
- if test "$mpsize" = "0" ; then
-- echo "Cannot determine mpsize"
-- exit 1
-+ as_fn_error 1 "Cannot determine mpsize" "$LINENO" 5
- fi
- cat >>confdefs.h <<_ACEOF
- #define MP_LIMB_BYTES $mpsize
-@@ -4929,23 +5021,31 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mpsize" >&5
- $as_echo "$mpsize" >&6; }
-
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"_SHORT_LIMB\"" >&5
--$as_echo_n "checking \"_SHORT_LIMB\"... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking _SHORT_LIMB" >&5
-+$as_echo_n "checking _SHORT_LIMB... " >&6; }
- if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <stdio.h>
++# Sed substitution that turns a string into a regex matching for the
++# string literally.
++sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
-+ #include <stdio.h>
- #include "$MP_INCLUDE"
-- int main() {
++# Sed substitution that converts a w32 file name or path
++# which contains forward slashes, into one that contains
++# (escaped) backslashes. A very naive implementation.
++lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
-+int
-+main ()
++# Re-`\' parameter expansions in output of double_quote_subst that were
++# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
++# in input to double_quote_subst, that '$' was protected from expansion.
++# Since each input `\' is now two `\'s, look for any number of runs of
++# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
++bs='\\'
++bs2='\\\\'
++bs4='\\\\\\\\'
++dollar='\$'
++sed_double_backslash="\
++ s/$bs4/&\\
++/g
++ s/^$bs2$dollar/$bs&/
++ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
++ s/\n//g"
++
++# Standard options:
++opt_dry_run=false
++opt_help=false
++opt_quiet=false
++opt_verbose=false
++opt_warning=:
++
++# func_echo arg...
++# Echo program name prefixed message, along with the current mode
++# name if it has been set yet.
++func_echo ()
+{
++ $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
++}
+
- #ifdef _SHORT_LIMB
- return 0;
- #else
- return 1;
- #endif
-- }
++# func_verbose arg...
++# Echo program name prefixed message in verbose mode only.
++func_verbose ()
++{
++ $opt_verbose && func_echo ${1+"$@"}
+
-+ ;
-+ return 0;
++ # A bug in bash halts the script if the last line of a function
++ # fails when set -e is in force, so we need another command to
++ # work around that:
++ :
+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- $as_echo "#define __SHORT_LIMB 1" >>confdefs.h
-@@ -4959,23 +5059,31 @@
- conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
-
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"_LONG_LONG_LIMB\"" >&5
--$as_echo_n "checking \"_LONG_LONG_LIMB\"... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking _LONG_LONG_LIMB" >&5
-+$as_echo_n "checking _LONG_LONG_LIMB... " >&6; }
- if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <stdio.h>
+
-+ #include <stdio.h>
- #include "$MP_INCLUDE"
-- int main() {
++# func_echo_all arg...
++# Invoke $ECHO with all args, space-separated.
++func_echo_all ()
++{
++ $ECHO "$*"
++}
+
-+int
-+main ()
++# func_error arg...
++# Echo program name prefixed message to standard error.
++func_error ()
+{
++ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
++}
+
- #ifdef _LONG_LONG_LIMB
- return 0;
- #else
- return 1;
- #endif
-- }
++# func_warning arg...
++# Echo program name prefixed warning message to standard error.
++func_warning ()
++{
++ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
+
-+ ;
-+ return 0;
++ # bash bug again:
++ :
+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- $as_echo "#define __LONG_LONG_LIMB 1" >>confdefs.h
-@@ -5314,8 +5422,7 @@
- fi
-
- if test "$have_dl" = "0" ; then
-- echo "Cannot find dlopen in -dl"
-- exit 1
-+ as_fn_error 1 "Cannot find dlopen in -dl" "$LINENO" 5
- fi
-
- TLIBS="$TLIBS -ldl -rdynamic"
-@@ -5373,9 +5480,17 @@
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#define IN_GCC
+
-+ #define IN_GCC
- #include <bfd.h>
-- int main() { symbol_info t; return 0;}
++# func_fatal_error arg...
++# Echo program name prefixed message to standard error, and exit.
++func_fatal_error ()
++{
++ func_error ${1+"$@"}
++ exit $EXIT_FAILURE
++}
+
-+int
-+main ()
++# func_fatal_help arg...
++# Echo program name prefixed message to standard error, followed by
++# a help hint, and exit.
++func_fatal_help ()
+{
-+symbol_info t; return 0;
-+ ;
-+ return 0;
++ func_error ${1+"$@"}
++ func_fatal_error "$help"
+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-@@ -5386,10 +5501,18 @@
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#define CONST const
++help="Try \`$progname --help' for more information." ## default
+
-+ #define CONST const
- #define IN_GCC
- #include <bfd.h>
-- int main() {symbol_info t; return 0;}
+
-+int
-+main ()
++# func_grep expression filename
++# Check whether EXPRESSION matches any line of FILENAME, without output.
++func_grep ()
+{
-+symbol_info t; return 0;
-+ ;
-+ return 0;
++ $GREP "$1" "$2" >/dev/null 2>&1
+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-@@ -5422,18 +5545,26 @@
- # BFD boolean syntax
- #
-
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for useable bfd_boolean" >&5
--$as_echo_n "checking for useable bfd_boolean... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable bfd_boolean" >&5
-+$as_echo_n "checking for usable bfd_boolean... " >&6; }
- if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#define IN_GCC
+
-+ #define IN_GCC
- #include <bfd.h>
- bfd_boolean foo() {return FALSE;}
-- int main() {return 0;}
+
-+int
-+main ()
++# func_mkdir_p directory-path
++# Make sure the entire path to DIRECTORY-PATH is available.
++func_mkdir_p ()
+{
-+return 0;
-+ ;
-+ return 0;
-+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-@@ -5462,9 +5593,17 @@
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <bfd.h>
++ my_directory_path="$1"
++ my_dir_list=
+
-+ #include <bfd.h>
- #include <bfdlink.h>
-- int main() {struct bfd_link_info i;i.output_bfd=0;return 0;}
++ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
-+int
-+main ()
-+{
-+struct bfd_link_info i;i.output_bfd=0;return 0;
-+ ;
-+ return 0;
-+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-@@ -5695,26 +5834,34 @@
- # work around MSYS pwd result incompatibility
- if test "$use" = "mingw" ; then
- if test "$cross_compiling" = yes; then :
-- echo Cannot find sizeof struct contblock;exit 1
-+ as_fn_error 1 "Cannot find sizeof struct contblock" "$LINENO" 5
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <stdio.h>
++ # Protect directory names starting with `-'
++ case $my_directory_path in
++ -*) my_directory_path="./$my_directory_path" ;;
++ esac
+
-+ #include <stdio.h>
- #define EXTER
- #include "$MP_INCLUDE"
- #include "h/enum.h"
- #include "h/object.h"
-- int main(int argc,char **argv,char **envp) {
++ # While some portion of DIR does not yet exist...
++ while test ! -d "$my_directory_path"; do
++ # ...make a list in topmost first order. Use a colon delimited
++ # list incase some portion of path contains whitespace.
++ my_dir_list="$my_directory_path:$my_dir_list"
+
-+int
-+main ()
-+{
++ # If the last portion added has no slash in it, the list is done
++ case $my_directory_path in */*) ;; *) break ;; esac
+
- FILE *f=fopen("conftest1","w");
- fprintf(f,"%u",sizeof(struct contblock));
- fclose(f);
- return 0;
-- }
++ # ...otherwise throw away the child directory and loop
++ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
++ done
++ my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+
-+ ;
-+ return 0;
++ save_mkdir_p_IFS="$IFS"; IFS=':'
++ for my_dir in $my_dir_list; do
++ IFS="$save_mkdir_p_IFS"
++ # mkdir can fail with a `File exist' error if two processes
++ # try to create one of the directories concurrently. Don't
++ # stop in that case!
++ $MKDIR "$my_dir" 2>/dev/null || :
++ done
++ IFS="$save_mkdir_p_IFS"
++
++ # Bail out if we (or some other process) failed to create a directory.
++ test -d "$my_directory_path" || \
++ func_fatal_error "Failed to create \`$1'"
++ fi
+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- sizeof_contblock=`cat conftest1`
- else
-- echo Cannot find sizeof struct contblock;exit 1
-+ as_fn_error 1 "Cannot find sizeof struct contblock" "$LINENO" 5
- fi
- rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-@@ -5722,26 +5869,34 @@
-
- else
- if test "$cross_compiling" = yes; then :
-- echo Cannot find sizeof struct contblock;exit 1
-+ as_fn_error 1 "Cannot find sizeof struct contblock" "$LINENO" 5
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <stdio.h>
+
-+ #include <stdio.h>
- #define EXTER
- #include "$MP_INCLUDE"
- #include "`pwd`/h/enum.h"
- #include "`pwd`/h/object.h"
-- int main(int argc,char **argv,char **envp) {
+
-+int
-+main ()
++# func_mktempdir [string]
++# Make a temporary directory that won't clash with other running
++# libtool processes, and avoids race conditions if possible. If
++# given, STRING is the basename for that directory.
++func_mktempdir ()
+{
++ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
- FILE *f=fopen("conftest1","w");
- fprintf(f,"%u",sizeof(struct contblock));
- fclose(f);
- return 0;
-- }
++ if test "$opt_dry_run" = ":"; then
++ # Return a directory name, but don't create it in dry-run mode
++ my_tmpdir="${my_template}-$$"
++ else
+
-+ ;
-+ return 0;
-+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- sizeof_contblock=`cat conftest1`
- else
-- echo Cannot find sizeof struct contblock;exit 1
-+ as_fn_error 1 "Cannot find sizeof struct contblock" "$LINENO" 5
- fi
- rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-@@ -5768,7 +5923,11 @@
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--int main () {
++ # If mktemp works, use that first and foremost
++ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
-+int
-+main ()
-+{
++ if test ! -d "$my_tmpdir"; then
++ # Failing that, at least try and use $RANDOM to avoid a race
++ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
- /* Are we little or big endian? Adapted from Harbison&Steele. */
- union
- {
-@@ -5777,6 +5936,9 @@
- } u;
- u.d = 1.0;
- return u.l[sizeof(double)/sizeof(int)-1] ? 0 : 1;
++ save_mktempdir_umask=`umask`
++ umask 0077
++ $MKDIR "$my_tmpdir"
++ umask $save_mktempdir_umask
++ fi
+
-+ ;
-+ return 0;
- }
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
-@@ -5807,15 +5969,23 @@
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <unistd.h>
-- #include <stdio.h>
-- int main() {
++ # If we're not in dry-run mode, bomb out on failure
++ test -d "$my_tmpdir" || \
++ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
++ fi
+
-+ #include <unistd.h>
-+ #include <stdio.h>
++ $ECHO "$my_tmpdir"
++}
+
-+int
-+main ()
-+{
+
- FILE *f;
- if (!(f=fopen("conftest1","w")))
- return -1;
- fprintf(f,"%u",sbrk(0));
- return 0;
-- }
++# func_quote_for_eval arg
++# Aesthetically quote ARG to be evaled later.
++# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
++# is double-quoted, suitable for a subsequent eval, whereas
++# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
++# which are still active within double quotes backslashified.
++func_quote_for_eval ()
++{
++ case $1 in
++ *[\\\`\"\$]*)
++ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
++ *)
++ func_quote_for_eval_unquoted_result="$1" ;;
++ esac
+
-+ ;
-+ return 0;
++ case $func_quote_for_eval_unquoted_result in
++ # Double-quote args containing shell metacharacters to delay
++ # word splitting, command substitution and and variable
++ # expansion for a subsequent eval.
++ # Many Bourne shells cannot handle close brackets correctly
++ # in scan sets, so we specify it separately.
++ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
++ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
++ ;;
++ *)
++ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
++ esac
+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- HAVE_SBRK=1
-@@ -5842,14 +6012,22 @@
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <sys/personality.h>
-- #include <stdio.h>
-- int main(int argc,char *argv[],char *envp[]) {
+
-+ #include <sys/personality.h>
-+ #include <stdio.h>
+
-+int
-+main ()
++# func_quote_for_expand arg
++# Aesthetically quote ARG to be evaled later; same as above,
++# but do not quote variable references.
++func_quote_for_expand ()
+{
++ case $1 in
++ *[\\\`\"]*)
++ my_arg=`$ECHO "$1" | $SED \
++ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
++ *)
++ my_arg="$1" ;;
++ esac
+
- FILE *f;
- if (!(f=fopen("conftest1","w"))) return -1;
- fprintf(f,"%x",ADDR_NO_RANDOMIZE);
- return 0;
-- }
++ case $my_arg in
++ # Double-quote args containing shell metacharacters to delay
++ # word splitting and command substitution for a subsequent eval.
++ # Many Bourne shells cannot handle close brackets correctly
++ # in scan sets, so we specify it separately.
++ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
++ my_arg="\"$my_arg\""
++ ;;
++ esac
+
-+ ;
-+ return 0;
++ func_quote_for_expand_result="$my_arg"
+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- ADDR_NO_RANDOMIZE=`cat conftest1`
-@@ -5879,7 +6057,8 @@
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--void gprof_cleanup() {};
+
-+ void gprof_cleanup() {}
- int main(int argc,char *argv[],char *envp[]) {
- #include "h/unrandomize.h"
- return 0;}
-@@ -5911,8 +6090,9 @@
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <stdio.h>
-- void gprof_cleanup() {};
+
-+ #include <stdio.h>
-+ void gprof_cleanup() {}
- int main(int argc,char * argv[],char * envp[]) {
- FILE *f;
- #ifdef CAN_UNRANDOMIZE_SBRK
-@@ -5932,17 +6112,16 @@
- fi
-
- if test "$SBRK" = "0" ; then
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot trap sbrk" >&5
--$as_echo "cannot trap sbrk" >&6; }
-- exit 1
-+ as_fn_error 1 "cannot trap sbrk" "$LINENO" 5
- fi
- if test "$cross_compiling" = yes; then :
- SBRK1=0
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <stdio.h>
-- void gprof_cleanup() {};
++# func_show_eval cmd [fail_exp]
++# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
++# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
++# is given, then evaluate it.
++func_show_eval ()
++{
++ my_cmd="$1"
++ my_fail_exp="${2-:}"
+
-+ #include <stdio.h>
-+ void gprof_cleanup() {}
- int main(int argc,char * argv[],char * envp[]) {
- FILE *f;
- #ifdef CAN_UNRANDOMIZE_SBRK
-@@ -5962,9 +6141,7 @@
- fi
-
- if test "$SBRK1" = "0" ; then
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot trap sbrk" >&5
--$as_echo "cannot trap sbrk" >&6; }
-- exit 1
-+ as_fn_error 1 "cannot trap sbrk" "$LINENO" 5
- fi
- if test "$SBRK" = "$SBRK1" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-@@ -5988,14 +6165,23 @@
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <stdio.h>
++ ${opt_silent-false} || {
++ func_quote_for_expand "$my_cmd"
++ eval "func_echo $func_quote_for_expand_result"
++ }
+
-+ #include <stdio.h>
- #include <unistd.h>
--int main() {size_t i=getpagesize(),j;
++ if ${opt_dry_run-false}; then :; else
++ eval "$my_cmd"
++ my_status=$?
++ if test "$my_status" -eq 0; then :; else
++ eval "(exit $my_status); $my_fail_exp"
++ fi
++ fi
++}
+
-+int
-+main ()
++
++# func_show_eval_locale cmd [fail_exp]
++# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
++# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
++# is given, then evaluate it. Use the saved locale for evaluation.
++func_show_eval_locale ()
+{
++ my_cmd="$1"
++ my_fail_exp="${2-:}"
+
-+ size_t i=getpagesize(),j;
- FILE *fp=fopen("conftest1","w");
- for (j=0;i>>=1;j++);
- if (j<12) {printf("pagewidth %u is too small\n",j);return -1;}
- fprintf(fp,"%u",j);
-- return 0;}
-+ return 0;
-+ ;
-+ return 0;
++ ${opt_silent-false} || {
++ func_quote_for_expand "$my_cmd"
++ eval "func_echo $func_quote_for_expand_result"
++ }
++
++ if ${opt_dry_run-false}; then :; else
++ eval "$lt_user_locale
++ $my_cmd"
++ my_status=$?
++ eval "$lt_safe_locale"
++ if test "$my_status" -eq 0; then :; else
++ eval "(exit $my_status); $my_fail_exp"
++ fi
++ fi
+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- PAGEWIDTH=`cat conftest1`
-@@ -6017,17 +6203,18 @@
-
- old_LDFLAGS="$LDFLAGS"
- LDFLAGS="$TLDFLAGS"
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"finding DBEGIN\"" >&5
--$as_echo_n "checking \"finding DBEGIN\"... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking finding DBEGIN" >&5
-+$as_echo_n "checking finding DBEGIN... " >&6; }
- if test "$cross_compiling" = yes; then :
- dbegin=0
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
+
- #include <stdio.h>
-- #include <stdlib.h>
-+#include <stdlib.h>
-
--void gprof_cleanup() {};
-+void gprof_cleanup() {}
- int
- main(int argc,char * argv[],char *envp[])
- {
-@@ -6072,21 +6259,28 @@
- LDFLAGS="$old_LDFLAGS"
-
-
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"finding CSTACK_ADDRESS\"" >&5
--$as_echo_n "checking \"finding CSTACK_ADDRESS\"... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking finding CSTACK_ADDRESS" >&5
-+$as_echo_n "checking finding CSTACK_ADDRESS... " >&6; }
- if test "$cross_compiling" = yes; then :
- cstack_address=0
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
++# func_tr_sh
++# Turn $1 into a string suitable for a shell variable name.
++# Result is stored in $func_tr_sh_result. All characters
++# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
++# if $1 begins with a digit, a '_' is prepended as well.
++func_tr_sh ()
++{
++ case $1 in
++ [0-9]* | *[!a-zA-Z0-9_]*)
++ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+ ;;
++ * )
++ func_tr_sh_result=$1
++ ;;
++ esac
++}
+
- #include <stdio.h>
--main()
+
-+int
-+main ()
- {
++# func_version
++# Echo version message to standard output and exit.
++func_version ()
++{
++ $opt_debug
+
- char *b ;
- FILE *fp = fopen("conftest1","w");
- fprintf(fp,"%ld",((long) &b));
- fclose(fp);
- return 0;
++ $SED -n '/(C)/!b go
++ :more
++ /\./!{
++ N
++ s/\n# / /
++ b more
++ }
++ :go
++ /^# '$PROGRAM' (GNU /,/# warranty; / {
++ s/^# //
++ s/^# *$//
++ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
++ p
++ }' < "$progpath"
++ exit $?
++}
+
-+ ;
-+ return 0;
- }
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
-@@ -6108,8 +6302,8 @@
-
-
-
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"sizeof long long int\"" >&5
--$as_echo_n "checking \"sizeof long long int\"... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof long long int" >&5
-+$as_echo_n "checking sizeof long long int... " >&6; }
- if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
-@@ -6117,13 +6311,19 @@
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
++# func_usage
++# Echo short help message to standard output and exit.
++func_usage ()
++{
++ $opt_debug
+
- #include <stdio.h>
--main()
++ $SED -n '/^# Usage:/,/^# *.*--help/ {
++ s/^# //
++ s/^# *$//
++ s/\$progname/'$progname'/
++ p
++ }' < "$progpath"
++ echo
++ $ECHO "run \`$progname --help | more' for full usage"
++ exit $?
++}
+
-+int
-+main ()
- {
++# func_help [NOEXIT]
++# Echo long help message to standard output and exit,
++# unless 'noexit' is passed as argument.
++func_help ()
++{
++ $opt_debug
+
- if (sizeof(long long int) == 2*sizeof(long)) return 0;
- return 1;
--}
-
-+ ;
-+ return 0;
++ $SED -n '/^# Usage:/,/# Report bugs to/ {
++ :print
++ s/^# //
++ s/^# *$//
++ s*\$progname*'$progname'*
++ s*\$host*'"$host"'*
++ s*\$SHELL*'"$SHELL"'*
++ s*\$LTCC*'"$LTCC"'*
++ s*\$LTCFLAGS*'"$LTCFLAGS"'*
++ s*\$LD*'"$LD"'*
++ s/\$with_gnu_ld/'"$with_gnu_ld"'/
++ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
++ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
++ p
++ d
++ }
++ /^# .* home page:/b print
++ /^# General help using/b print
++ ' < "$progpath"
++ ret=$?
++ if test -z "$1"; then
++ exit $ret
++ fi
+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
-@@ -6664,8 +6864,6 @@
- # To get around this problem, check for both libraries together
- # if -lsocket doesn't work by itself.
- #--------------------------------------------------------------------
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockets" >&5
--$as_echo_n "checking for sockets... " >&6; }
- tcl_checkBoth=0
- ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
- if test "x$ac_cv_func_connect" = xyes; then :
-@@ -6877,8 +7075,8 @@
++
++# func_missing_arg argname
++# Echo program name prefixed message to standard error and set global
++# exit_cmd.
++func_missing_arg ()
++{
++ $opt_debug
++
++ func_error "missing argument for $1."
++ exit_cmd=exit
++}
++
++
++# func_split_short_opt shortopt
++# Set func_split_short_opt_name and func_split_short_opt_arg shell
++# variables after splitting SHORTOPT after the 2nd character.
++func_split_short_opt ()
++{
++ my_sed_short_opt='1s/^\(..\).*$/\1/;q'
++ my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
++
++ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
++ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
++} # func_split_short_opt may be replaced by extended shell implementation
++
++
++# func_split_long_opt longopt
++# Set func_split_long_opt_name and func_split_long_opt_arg shell
++# variables after splitting LONGOPT at the `=' sign.
++func_split_long_opt ()
++{
++ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
++ my_sed_long_arg='1s/^--[^=]*=//'
++
++ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
++ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
++} # func_split_long_opt may be replaced by extended shell implementation
++
++exit_cmd=:
++
++
++
++
++
++magic="%%%MAGIC variable%%%"
++magic_exe="%%%MAGIC EXE variable%%%"
++
++# Global variables.
++nonopt=
++preserve_args=
++lo2o="s/\\.lo\$/.${objext}/"
++o2lo="s/\\.${objext}\$/.lo/"
++extracted_archives=
++extracted_serial=0
++
++# If this variable is set in any of the actions, the command in it
++# will be execed at the end. This prevents here-documents from being
++# left over by shells.
++exec_cmd=
++
++# func_append var value
++# Append VALUE to the end of shell variable VAR.
++func_append ()
++{
++ eval "${1}=\$${1}\${2}"
++} # func_append may be replaced by extended shell implementation
++
++# func_append_quoted var value
++# Quote VALUE and append to the end of shell variable VAR, separated
++# by a space.
++func_append_quoted ()
++{
++ func_quote_for_eval "${2}"
++ eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
++} # func_append_quoted may be replaced by extended shell implementation
++
++
++# func_arith arithmetic-term...
++func_arith ()
++{
++ func_arith_result=`expr "${@}"`
++} # func_arith may be replaced by extended shell implementation
++
++
++# func_len string
++# STRING may not start with a hyphen.
++func_len ()
++{
++ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
++} # func_len may be replaced by extended shell implementation
++
++
++# func_lo2o object
++func_lo2o ()
++{
++ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
++} # func_lo2o may be replaced by extended shell implementation
++
++
++# func_xform libobj-or-source
++func_xform ()
++{
++ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
++} # func_xform may be replaced by extended shell implementation
++
++
++# func_fatal_configuration arg...
++# Echo program name prefixed message to standard error, followed by
++# a configuration failure hint, and exit.
++func_fatal_configuration ()
++{
++ func_error ${1+"$@"}
++ func_error "See the $PACKAGE documentation for more information."
++ func_fatal_error "Fatal configuration error."
++}
++
++
++# func_config
++# Display the configuration for all the tags in this script.
++func_config ()
++{
++ re_begincf='^# ### BEGIN LIBTOOL'
++ re_endcf='^# ### END LIBTOOL'
++
++ # Default configuration.
++ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+- --config)
+- sed -n -e '/^### BEGIN LIBTOOL CONFIG/,/^### END LIBTOOL CONFIG/p' < "$0"
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+- sed -n -e "/^### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
++ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+- exit 0
+- ;;
+- --debug)
+- echo "$progname: enabling shell trace mode"
+- set -x
+- ;;
+-
+- --dry-run | -n)
+- run=:
+- ;;
++ exit $?
++}
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking For network code for nsocket.c" >&5
--$as_echo_n "checking For network code for nsocket.c... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for network code for nsocket.c" >&5
-+$as_echo_n "checking for network code for nsocket.c... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
+- --features)
++# func_features
++# Display the features supported by this script.
++func_features ()
++{
+ echo "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ echo "enable shared libraries"
+@@ -205,349 +934,1184 @@
+ else
+ echo "disable static libraries"
+ fi
+- exit 0
+- ;;
-@@ -6902,7 +7100,7 @@
- int
- main ()
- {
-- connect(0,(struct sockaddr *)0,0);
-+connect(0,(struct sockaddr *)0,0);
- gethostbyname("jil");
- socket(AF_INET, SOCK_STREAM, 0);
+- --finish) mode="finish" ;;
++ exit $?
++}
-@@ -6923,10 +7121,11 @@
- conftest$ac_exeext conftest.$ac_ext
+- --mode) prevopt="--mode" prev=mode ;;
+- --mode=*) mode="$optarg" ;;
++# func_enable_tag tagname
++# Verify that TAGNAME is valid, and either flag an error and exit, or
++# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
++# variable here.
++func_enable_tag ()
++{
++ # Global variable:
++ tagname="$1"
+- --quiet | --silent)
+- show=:
+- ;;
++ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
++ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
++ sed_extractcf="/$re_begincf/,/$re_endcf/p"
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking check for listen using fcntl" >&5
--$as_echo_n "checking check for listen using fcntl... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for listen using fcntl" >&5
-+$as_echo_n "checking for listen using fcntl... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
+- --tag) prevopt="--tag" prev=tag ;;
+- --tag=*)
+- set tag "$optarg" ${1+"$@"}
++ # Validate tagname.
++ case $tagname in
++ *[!-_A-Za-z0-9,/]*)
++ func_fatal_error "invalid tag name: $tagname"
++ ;;
++ esac
+
- #include <stdio.h>
- #include <fcntl.h>
-
-@@ -7002,7 +7201,7 @@
- $EGREP "LITTLE_ENDIAN" >/dev/null 2>&1; then :
- gcl_ok=yes
- else
-- gcl_ok=noo
-+ gcl_ok=no
- fi
- rm -f conftest*
-
-@@ -7046,17 +7245,17 @@
- esac
-
-
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking check for SV_ONSTACK" >&5
--$as_echo_n "checking check for SV_ONSTACK... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SV_ONSTACK" >&5
-+$as_echo_n "checking for SV_ONSTACK... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-+
- #include <signal.h>
--int joe=SV_ONSTACK;
-
- int
- main ()
- {
--
-+return SV_ONSTACK;
- ;
- return 0;
- }
-@@ -7073,17 +7272,17 @@
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking check for SIGSYS" >&5
--$as_echo_n "checking check for SIGSYS... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGSYS" >&5
-+$as_echo_n "checking for SIGSYS... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-+
- #include <signal.h>
--int joe=SIGSYS;
-
- int
- main ()
- {
--
-+return SIGSYS;
- ;
- return 0;
- }
-@@ -7101,17 +7300,17 @@
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking check for SIGEMT" >&5
--$as_echo_n "checking check for SIGEMT... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGEMT" >&5
-+$as_echo_n "checking for SIGEMT... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-+
- #include <signal.h>
--int joe=SIGEMT;
-
- int
- main ()
- {
--
-+return SIGEMT;
- ;
- return 0;
- }
-@@ -7156,11 +7355,12 @@
-
- done
-
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigcontext..." >&5
--$as_echo_n "checking for sigcontext...... " >&6; }
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigcontext" >&5
-+$as_echo_n "checking for sigcontext... " >&6; }
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <signal.h>
++ # Don't test for the "default" C tag, as we know it's
++ # there but not specially marked.
++ case $tagname in
++ CC) ;;
++ *)
++ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
++ taglist="$taglist $tagname"
+
-+ #include <signal.h>
-
- int
- main ()
-@@ -7188,11 +7388,12 @@
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "$sigcontext_works" = 0 ; then
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigcontext..." >&5
--$as_echo_n "checking for sigcontext...... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigcontext" >&5
-+$as_echo_n "checking for sigcontext... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <signal.h>
++ # Evaluate the configuration. Be careful to quote the path
++ # and the sed script, to avoid splitting on whitespace, but
++ # also don't use non-portable quotes within backquotes within
++ # quotes we have to do it in 2 steps:
++ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
++ eval "$extractedcf"
++ else
++ func_error "ignoring unknown tag $tagname"
++ fi
++ ;;
++ esac
++}
+
-+ #include <signal.h>
- #ifdef HAVE_ASM_SIGCONTEXT_H
- #include <asm/sigcontext.h>
- #endif
-@@ -7371,26 +7572,41 @@
-
- if test "$enable_tcltk" = "yes" ; then
-
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tcl/tk" >&5
--$as_echo_n "checking for tcl/tk... " >&6; }
--
--
--if test -d "${TCL_CONFIG_PREFIX}" ; then true ; else
--rm -f conftest.tcl
--cat >> conftest.tcl <<EOF
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lieee" >&5
-+$as_echo_n "checking for main in -lieee... " >&6; }
-+if ${ac_cv_lib_ieee_main+:} false; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ ac_check_lib_save_LIBS=$LIBS
-+LIBS="-lieee $LIBS"
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-
--set dir [set tcl_library]
--if { [file exists [file join [set dir] tclConfig.sh]] } {
-- puts [set dir]
-- exit
-- }
--set dir [file dirname [set tcl_library]]
--if { [file exists [file join [set dir] tclConfig.sh]] } {
-- puts [set dir]
-- }
-
--EOF
--#cp conftest.tcl foo.tcl
-+int
-+main ()
++# func_check_version_match
++# Ensure that we are using m4 macros, and libtool script from the same
++# release of libtool.
++func_check_version_match ()
+{
-+return main ();
-+ ;
-+ return 0;
++ if test "$package_revision" != "$macro_revision"; then
++ if test "$VERSION" != "$macro_version"; then
++ if test -z "$macro_version"; then
++ cat >&2 <<_LT_EOF
++$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
++$progname: definition of this LT_INIT comes from an older release.
++$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
++$progname: and run autoconf again.
++_LT_EOF
++ else
++ cat >&2 <<_LT_EOF
++$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
++$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
++$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
++$progname: and run autoconf again.
++_LT_EOF
++ fi
++ else
++ cat >&2 <<_LT_EOF
++$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
++$progname: but the definition of this LT_INIT comes from revision $macro_revision.
++$progname: You should recreate aclocal.m4 with macros from revision $package_revision
++$progname: of $PACKAGE $VERSION and run autoconf again.
++_LT_EOF
++ fi
++
++ exit $EXIT_MISMATCH
++ fi
+}
-+_ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+ ac_cv_lib_ieee_main=yes
-+else
-+ ac_cv_lib_ieee_main=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+LIBS=$ac_check_lib_save_LIBS
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee_main" >&5
-+$as_echo "$ac_cv_lib_ieee_main" >&6; }
-+if test "x$ac_cv_lib_ieee_main" = xyes; then :
-+ have_ieee=1
-+else
-+ have_ieee=0
-+fi
-
- # Extract the first word of "tclsh", so it can be a program name with args.
- set dummy tclsh; ac_word=$2
-@@ -7430,7 +7646,26 @@
- fi
-
-
--#AC_CHECK_PROG(TCLSH,tclsh8.0,tclsh8.0,${TCLSH})
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tcl/tk" >&5
-+$as_echo_n "checking for tcl/tk... " >&6; }
+
+
-+if test -d "${TCL_CONFIG_PREFIX}" ; then true ; else
-+rm -f conftest.tcl
-+cat >> conftest.tcl <<EOF
++# Shorthand for --mode=foo, only valid as the first argument
++case $1 in
++clean|clea|cle|cl)
++ shift; set dummy --mode clean ${1+"$@"}; shift
++ ;;
++compile|compil|compi|comp|com|co|c)
++ shift; set dummy --mode compile ${1+"$@"}; shift
++ ;;
++execute|execut|execu|exec|exe|ex|e)
++ shift; set dummy --mode execute ${1+"$@"}; shift
++ ;;
++finish|finis|fini|fin|fi|f)
++ shift; set dummy --mode finish ${1+"$@"}; shift
++ ;;
++install|instal|insta|inst|ins|in|i)
++ shift; set dummy --mode install ${1+"$@"}; shift
++ ;;
++link|lin|li|l)
++ shift; set dummy --mode link ${1+"$@"}; shift
++ ;;
++uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
++ shift; set dummy --mode uninstall ${1+"$@"}; shift
++ ;;
++esac
+
-+set dir [set tcl_library]
-+if { [file exists [file join [set dir] tclConfig.sh]] } {
-+ puts [set dir]
-+ exit
-+ }
-+set dir [file dirname [set tcl_library]]
-+if { [file exists [file join [set dir] tclConfig.sh]] } {
-+ puts [set dir]
-+ }
+
-+EOF
-+#cp conftest.tcl foo.tcl
-
- if test "${TCLSH}" = "" ; then true ; else
- TCL_CONFIG_PREFIX=`${TCLSH} < conftest.tcl`
-@@ -7505,42 +7740,6 @@
-
- fi
-
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -llieee" >&5
--$as_echo_n "checking for main in -llieee... " >&6; }
--if ${ac_cv_lib_lieee_main+:} false; then :
-- $as_echo_n "(cached) " >&6
--else
-- ac_check_lib_save_LIBS=$LIBS
--LIBS="-llieee $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--
--
--int
--main ()
--{
--return main ();
-- ;
-- return 0;
--}
--_ACEOF
--if ac_fn_c_try_link "$LINENO"; then :
-- ac_cv_lib_lieee_main=yes
--else
-- ac_cv_lib_lieee_main=no
--fi
--rm -f core conftest.err conftest.$ac_objext \
-- conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lieee_main" >&5
--$as_echo "$ac_cv_lib_lieee_main" >&6; }
--if test "x$ac_cv_lib_lieee_main" = xyes; then :
-- have_ieee=1
--else
-- have_ieee=0
--fi
--
- if test "$have_ieee" = "0" ; then
- TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" `
- fi
-@@ -7586,14 +7785,23 @@
-
- # the time handling for unixtime, add timezone
-
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alloca" >&5
--$as_echo_n "checking alloca... " >&6; }
-+# alloca
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
-+$as_echo_n "checking for alloca... " >&6; }
- if test "$cross_compiling" = yes; then :
- gcl_ok=no
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--int main() { exit(alloca(500) != NULL ? 0 : 1);}
+
-+int
-+main ()
-+{
-+exit(alloca(500) != NULL ? 0 : 1);
-+ ;
-+ return 0;
-+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
-
-@@ -7615,8 +7823,16 @@
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--#include <alloca.h>
-- int main() { exit(alloca(500) != NULL ? 0 : 1);}
++# Option defaults:
++opt_debug=:
++opt_dry_run=false
++opt_config=false
++opt_preserve_dup_deps=false
++opt_features=false
++opt_finish=false
++opt_help=false
++opt_help_all=false
++opt_silent=:
++opt_verbose=:
++opt_silent=false
++opt_verbose=false
+
-+ #include <alloca.h>
+
-+int
-+main ()
++# Parse options once, thoroughly. This comes as soon as possible in the
++# script to make things like `--version' happen as quickly as we can.
+{
-+exit(alloca(500) != NULL ? 0 : 1);
-+ ;
-+ return 0;
-+}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
-
-@@ -7648,8 +7864,6 @@
-
-
-
--# alloca
--
- # dlopen etc
- # idea make it so you do something dlopen(libX.so,RTLD_GLOBAL)
- # then dlload("foo.o") a lisp file can refer to things in libX.so
-@@ -7673,8 +7887,8 @@
-
- # redhat/cygnus released for some reason a buggy version of gcc,
- # which no one else released. Catch that here.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for buggy gcc version from redhat" >&5
--$as_echo_n "checking Checking for buggy gcc version from redhat... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy gcc version from redhat" >&5
-+$as_echo_n "checking for buggy gcc version from redhat... " >&6; }
- if 2>&1 $CC -v | fgrep "gcc version 2.96" > /dev/null
- then
- BROKEN_O4_OPT=1
-@@ -7714,7 +7928,7 @@
++ # this just eases exit handling
++ while test $# -gt 0; do
++ opt="$1"
+ shift
+- prev=tag
+- ;;
++ case $opt in
++ --debug|-x) opt_debug='set -x'
++ func_echo "enabling shell trace mode"
++ $opt_debug
++ ;;
++ --dry-run|--dryrun|-n)
++ opt_dry_run=:
++ ;;
++ --config)
++ opt_config=:
++func_config
++ ;;
++ --dlopen|-dlopen)
++ optarg="$1"
++ opt_dlopen="${opt_dlopen+$opt_dlopen
++}$optarg"
++ shift
++ ;;
++ --preserve-dup-deps)
++ opt_preserve_dup_deps=:
++ ;;
++ --features)
++ opt_features=:
++func_features
++ ;;
++ --finish)
++ opt_finish=:
++set dummy --mode finish ${1+"$@"}; shift
++ ;;
++ --help)
++ opt_help=:
++ ;;
++ --help-all)
++ opt_help_all=:
++opt_help=': help-all'
++ ;;
++ --mode)
++ test $# = 0 && func_missing_arg $opt && break
++ optarg="$1"
++ opt_mode="$optarg"
++case $optarg in
++ # Valid mode arguments:
++ clean|compile|execute|finish|install|link|relink|uninstall) ;;
- ac_config_files="$ac_config_files makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp"
+- -dlopen)
+- prevopt="-dlopen"
+- prev=execute_dlfiles
+- ;;
++ # Catch anything else as an error
++ *) func_error "invalid argument for $opt"
++ exit_cmd=exit
++ break
++ ;;
++esac
++ shift
++ ;;
++ --no-silent|--no-quiet)
++ opt_silent=false
++func_append preserve_args " $opt"
++ ;;
++ --no-verbose)
++ opt_verbose=false
++func_append preserve_args " $opt"
++ ;;
++ --silent|--quiet)
++ opt_silent=:
++func_append preserve_args " $opt"
++ opt_verbose=false
++ ;;
++ --verbose|-v)
++ opt_verbose=:
++func_append preserve_args " $opt"
++opt_silent=false
++ ;;
++ --tag)
++ test $# = 0 && func_missing_arg $opt && break
++ optarg="$1"
++ opt_tag="$optarg"
++func_append preserve_args " $opt $optarg"
++func_enable_tag "$optarg"
++ shift
++ ;;
--cat >confcache <<\_ACEOF
-+ cat >confcache <<\_ACEOF
- # This file is a shell script that caches the results of configure
- # tests run on this system so they can be shared between configure
- # scripts and configure runs, see configure's option --config-cache.
---- ./ltmain.sh.orig 2002-08-08 23:49:32.000000000 -0600
-+++ ./ltmain.sh 2011-02-08 05:25:07.000000000 -0700
-@@ -1,199 +1,928 @@
--# ltmain.sh - Provide generalized library-building support services.
--# NOTE: Changing this file will not affect anything until you rerun ltconfig.
--#
--# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
--# Free Software Foundation, Inc.
--# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
--#
--# This program is free software; you can redistribute it and/or modify
+- -*)
+- $echo "$modename: unrecognized option \`$arg'" 1>&2
+- $echo "$help" 1>&2
+- exit 1
++ -\?|-h) func_usage ;;
++ --help) func_help ;;
++ --version) func_version ;;
+
-+# libtool (GNU libtool) 2.4
-+# Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
++ # Separate optargs to long options:
++ --*=*)
++ func_split_long_opt "$opt"
++ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
++ shift
++ ;;
+
-+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-+# This is free software; see the source for copying conditions. There is NO
-+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
++ # Separate non-argument short options:
++ -\?*|-h*|-n*|-v*)
++ func_split_short_opt "$opt"
++ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
++ shift
++ ;;
+
-+# GNU Libtool is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or
- # (at your option) any later version.
- #
--# This program is distributed in the hope that it will be useful, but
-+# As a special exception to the GNU General Public License,
-+# if you distribute this file as part of a program or library that
-+# is built using GNU Libtool, you may include this file under the
-+# same distribution terms that you use for the rest of that program.
-+#
-+# GNU Libtool is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- # General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
--# along with this program; if not, write to the Free Software
--# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+# along with GNU Libtool; see the file COPYING. If not, a copy
-+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-+# or obtained by writing to the Free Software Foundation, Inc.,
-+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ --) break ;;
++ -*) func_fatal_help "unrecognized option \`$opt'" ;;
++ *) set dummy "$opt" ${1+"$@"}; shift; break ;;
++ esac
++ done
+
-+# Usage: $progname [OPTION]... [MODE-ARG]...
- #
--# As a special exception to the GNU General Public License, if you
--# distribute this file as part of a program that contains a
--# configuration script generated by Autoconf, you may include it under
--# the same distribution terms that you use for the rest of that program.
-+# Provide generalized library-building support services.
-+#
-+# --config show all configuration variables
-+# --debug enable verbose shell tracing
-+# -n, --dry-run display commands without modifying any files
-+# --features display basic configuration information and exit
-+# --mode=MODE use operation mode MODE
-+# --preserve-dup-deps don't remove duplicate dependency libraries
-+# --quiet, --silent don't print informational messages
-+# --no-quiet, --no-silent
-+# print informational messages (default)
-+# --tag=TAG use configuration variables from tag TAG
-+# -v, --verbose print more informational messages than default
-+# --no-verbose don't print the extra informational messages
-+# --version print version information
-+# -h, --help, --help-all print short, long, or detailed help message
-+#
-+# MODE must be one of the following:
-+#
-+# clean remove files from the build directory
-+# compile compile a source file into a libtool object
-+# execute automatically set library path, then run a program
-+# finish complete the installation of libtool libraries
-+# install install libraries or executables
-+# link create a library or an executable
-+# uninstall remove libraries from an installed directory
-+#
-+# MODE-ARGS vary depending on the MODE. When passed as first option,
-+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
-+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
-+#
-+# When reporting a bug, please describe a test case to reproduce it and
-+# include the following information:
-+#
-+# host-triplet: $host
-+# shell: $SHELL
-+# compiler: $LTCC
-+# compiler flags: $LTCFLAGS
-+# linker: $LD (gnu? $with_gnu_ld)
-+# $progname: (GNU libtool) 2.4
-+# automake: $automake_version
-+# autoconf: $autoconf_version
-+#
-+# Report bugs to <bug-libtool at gnu.org>.
-+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
-+# General help using GNU software: <http://www.gnu.org/gethelp/>.
-
--# Check that we have a working $echo.
--if test "X$1" = X--no-reexec; then
-- # Discard the --no-reexec flag, and continue.
-- shift
--elif test "X$1" = X--fallback-echo; then
-- # Avoid inline document here, it may be left over
-- :
--elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-- # Yippee, $echo works!
-- :
-+PROGRAM=libtool
-+PACKAGE=libtool
-+VERSION=2.4
-+TIMESTAMP=""
-+package_revision=1.3293
++ # Validate options:
+
-+# Be Bourne compatible
-+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-+ emulate sh
-+ NULLCMD=:
-+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-+ # is contrary to our usage. Disable this feature.
-+ alias -g '${1+"$@"}'='"$@"'
-+ setopt NO_GLOB_SUBST
- else
-- # Restart under the correct shell, and then maybe $echo will work.
-- exec $SHELL "$0" --no-reexec ${1+"$@"}
-+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
- fi
-+BIN_SH=xpg4; export BIN_SH # for Tru64
-+DUALCASE=1; export DUALCASE # for MKS sh
-
--if test "X$1" = X--fallback-echo; then
-- # used as fallback echo
-- shift
-- cat <<EOF
--$*
--EOF
-- exit 0
--fi
-+# A function that is used when there is no print builtin or printf.
-+func_fallback_echo ()
++ # save first non-option argument
++ if test "$#" -gt 0; then
++ nonopt="$opt"
++ shift
++ fi
++
++ # preserve --debug
++ test "$opt_debug" = : || func_append preserve_args " --debug"
++
++ case $host in
++ *cygwin* | *mingw* | *pw32* | *cegcc*)
++ # don't eliminate duplications in $postdeps and $predeps
++ opt_duplicate_compiler_generated_deps=:
++ ;;
++ *)
++ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
++ ;;
++ esac
++
++ $opt_help || {
++ # Sanity checks first:
++ func_check_version_match
++
++ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
++ func_fatal_configuration "not configured to build any kind of library"
++ fi
++
++ # Darwin sucks
++ eval std_shrext=\"$shrext_cmds\"
++
++ # Only execute mode is allowed to have -dlopen flags.
++ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
++ func_error "unrecognized option \`-dlopen'"
++ $ECHO "$help" 1>&2
++ exit $EXIT_FAILURE
++ fi
++
++ # Change the help message to a mode-specific one.
++ generic_help="$help"
++ help="Try \`$progname --help --mode=$opt_mode' for more information."
++ }
++
++
++ # Bail if the options were screwed
++ $exit_cmd $EXIT_FAILURE
++}
++
++
++
++
++## ----------- ##
++## Main. ##
++## ----------- ##
++
++# func_lalib_p file
++# True iff FILE is a libtool `.la' library or `.lo' object file.
++# This function is only a basic sanity check; it will hardly flush out
++# determined imposters.
++func_lalib_p ()
+{
-+ eval 'cat <<_LTECHO_EOF
-+$1
-+_LTECHO_EOF'
++ test -f "$1" &&
++ $SED -e 4q "$1" 2>/dev/null \
++ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
-
--# The name of this program.
--progname=`$echo "$0" | sed 's%^.*/%%'`
--modename="$progname"
-+# NLS nuisances: We save the old values to restore during execute mode.
-+lt_user_locale=
-+lt_safe_locale=
-+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-+do
-+ eval "if test \"\${$lt_var+set}\" = set; then
-+ save_$lt_var=\$$lt_var
-+ $lt_var=C
-+ export $lt_var
-+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
-+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
-+ fi"
-+done
-+LC_ALL=C
-+LANGUAGE=C
-+export LANGUAGE LC_ALL
-
--# Constants.
--PROGRAM=ltmain.sh
--PACKAGE=libtool
--VERSION=1.4a-GCC3.0
--TIMESTAMP=" (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)"
-+$lt_unset CDPATH
-
--default_mode=
--help="Try \`$progname --help' for more information."
--magic="%%%MAGIC variable%%%"
--mkdir="mkdir"
--mv="mv -f"
--rm="rm -f"
-
--# Sed substitution that helps us do robust quoting. It backslashifies
--# metacharacters that are still active within double-quoted strings.
--Xsed='sed -e 1s/^X//'
--sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
--SP2NL='tr \040 \012'
--NL2SP='tr \015\012 \040\040'
-+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-+# is ksh but when the shell is invoked as "sh" and the current value of
-+# the _XPG environment variable is not equal to 1 (one), the special
-+# positional parameter $0, within a function call, is the name of the
-+# function.
-+progpath="$0"
-
--# NLS nuisances.
--# Only set LANG and LC_ALL to C if already set.
--# These must not be set unconditionally because not all systems understand
--# e.g. LANG=C (notably SCO).
--# We save the old values to restore during execute mode.
--if test "${LC_ALL+set}" = set; then
-- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
--fi
--if test "${LANG+set}" = set; then
-- save_LANG="$LANG"; LANG=C; export LANG
--fi
-
--if test "$LTCONFIG_VERSION" != "$VERSION"; then
-- echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
-- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
-- exit 1
--fi
-
--if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-- echo "$modename: not configured to build any kind of library" 1>&2
-- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
-- exit 1
--fi
-+: ${CP="cp -f"}
-+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
-+: ${EGREP="/bin/grep -E"}
-+: ${FGREP="/bin/grep -F"}
-+: ${GREP="/bin/grep"}
-+: ${LN_S="ln -s"}
-+: ${MAKE="make"}
-+: ${MKDIR="mkdir"}
-+: ${MV="mv -f"}
-+: ${RM="rm -f"}
-+: ${SED="/bin/sed"}
-+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
-+: ${Xsed="$SED -e 1s/^X//"}
-
--# Global variables.
--mode=$default_mode
--nonopt=
--prev=
--prevopt=
--run=
--show="$echo"
--show_help=
--execute_dlfiles=
--lo2o="s/\\.lo\$/.${objext}/"
--o2lo="s/\\.${objext}\$/.lo/"
--taglist=
-+# Global variables:
-+EXIT_SUCCESS=0
-+EXIT_FAILURE=1
-+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
-+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
-
--# Parse our command line options once, thoroughly.
--while test $# -gt 0
--do
-- arg="$1"
-- shift
-+exit_status=$EXIT_SUCCESS
-
-- case $arg in
-- -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
-- *) optarg= ;;
-- esac
-+# Make sure IFS has a sensible default
-+lt_nl='
-+'
-+IFS=" $lt_nl"
-
-- # If the previous option needs an argument, assign it.
-- if test -n "$prev"; then
-- case $prev in
-- execute_dlfiles)
-- execute_dlfiles="$execute_dlfiles $arg"
-+dirname="s,/[^/]*$,,"
-+basename="s,^.*/,,"
+
-+# func_dirname file append nondir_replacement
-+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-+# otherwise set result to NONDIR_REPLACEMENT.
-+func_dirname ()
++# func_lalib_unsafe_p file
++# True iff FILE is a libtool `.la' library or `.lo' object file.
++# This function implements the same check as func_lalib_p without
++# resorting to external programs. To this end, it redirects stdin and
++# closes it afterwards, without saving the original file descriptor.
++# As a safety measure, use it only where a negative result would be
++# fatal anyway. Works if `file' does not exist.
++func_lalib_unsafe_p ()
+{
-+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
-+ if test "X$func_dirname_result" = "X${1}"; then
-+ func_dirname_result="${3}"
-+ else
-+ func_dirname_result="$func_dirname_result${2}"
++ lalib_p=no
++ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
++ for lalib_p_l in 1 2 3 4
++ do
++ read lalib_p_line
++ case "$lalib_p_line" in
++ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
++ esac
++ done
++ exec 0<&5 5<&-
+ fi
-+} # func_dirname may be replaced by extended shell implementation
++ test "$lalib_p" = yes
++}
+
++# func_ltwrapper_script_p file
++# True iff FILE is a libtool wrapper script
++# This function is only a basic sanity check; it will hardly flush out
++# determined imposters.
++func_ltwrapper_script_p ()
++{
++ func_lalib_p "$1"
++}
+
-+# func_basename file
-+func_basename ()
++# func_ltwrapper_executable_p file
++# True iff FILE is a libtool wrapper executable
++# This function is only a basic sanity check; it will hardly flush out
++# determined imposters.
++func_ltwrapper_executable_p ()
+{
-+ func_basename_result=`$ECHO "${1}" | $SED "$basename"`
-+} # func_basename may be replaced by extended shell implementation
++ func_ltwrapper_exec_suffix=
++ case $1 in
++ *.exe) ;;
++ *) func_ltwrapper_exec_suffix=.exe ;;
++ esac
++ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
++}
+
++# func_ltwrapper_scriptname file
++# Assumes file is an ltwrapper_executable
++# uses $file to determine the appropriate filename for a
++# temporary ltwrapper_script.
++func_ltwrapper_scriptname ()
++{
++ func_dirname_and_basename "$1" "" "."
++ func_stripname '' '.exe' "$func_basename_result"
++ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
++}
+
-+# func_dirname_and_basename file append nondir_replacement
-+# perform func_basename and func_dirname in a single function
-+# call:
-+# dirname: Compute the dirname of FILE. If nonempty,
-+# add APPEND to the result, otherwise set result
-+# to NONDIR_REPLACEMENT.
-+# value returned in "$func_dirname_result"
-+# basename: Compute filename of FILE.
-+# value retuned in "$func_basename_result"
-+# Implementation must be kept synchronized with func_dirname
-+# and func_basename. For efficiency, we do not delegate to
-+# those functions but instead duplicate the functionality here.
-+func_dirname_and_basename ()
++# func_ltwrapper_p file
++# True iff FILE is a libtool wrapper script or wrapper executable
++# This function is only a basic sanity check; it will hardly flush out
++# determined imposters.
++func_ltwrapper_p ()
+{
-+ # Extract subdirectory from the argument.
-+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
-+ if test "X$func_dirname_result" = "X${1}"; then
-+ func_dirname_result="${3}"
-+ else
-+ func_dirname_result="$func_dirname_result${2}"
-+ fi
-+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
-+} # func_dirname_and_basename may be replaced by extended shell implementation
++ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
++}
+
+
-+# func_stripname prefix suffix name
-+# strip PREFIX and SUFFIX off of NAME.
-+# PREFIX and SUFFIX must not contain globbing or regex special
-+# characters, hashes, percent signs, but SUFFIX may contain a leading
-+# dot (in which case that matches only a dot).
-+# func_strip_suffix prefix name
-+func_stripname ()
++# func_execute_cmds commands fail_cmd
++# Execute tilde-delimited COMMANDS.
++# If FAIL_CMD is given, eval that upon failure.
++# FAIL_CMD may read-access the current command in variable CMD!
++func_execute_cmds ()
+{
-+ case ${2} in
-+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
-+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
-+ esac
-+} # func_stripname may be replaced by extended shell implementation
++ $opt_debug
++ save_ifs=$IFS; IFS='~'
++ for cmd in $1; do
++ IFS=$save_ifs
++ eval cmd=\"$cmd\"
++ func_show_eval "$cmd" "${2-:}"
++ done
++ IFS=$save_ifs
++}
+
+
-+# These SED scripts presuppose an absolute path with a trailing slash.
-+pathcar='s,^/\([^/]*\).*$,\1,'
-+pathcdr='s,^/[^/]*,,'
-+removedotparts=':dotsl
-+ s@/\./@/@g
-+ t dotsl
-+ s,/\.$,/,'
-+collapseslashes='s@/\{1,\}@/@g'
-+finalslash='s,/*$,/,'
++# func_source file
++# Source FILE, adding directory component if necessary.
++# Note that it is not necessary on cygwin/mingw to append a dot to
++# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
++# behavior happens only for exec(3), not for open(2)! Also, sourcing
++# `FILE.' does not work on cygwin managed mounts.
++func_source ()
++{
++ $opt_debug
++ case $1 in
++ */* | *\\*) . "$1" ;;
++ *) . "./$1" ;;
++ esac
++}
+
-+# func_normal_abspath PATH
-+# Remove doubled-up and trailing slashes, "." path components,
-+# and cancel out any ".." path components in PATH after making
-+# it an absolute path.
-+# value returned in "$func_normal_abspath_result"
-+func_normal_abspath ()
++
++# func_resolve_sysroot PATH
++# Replace a leading = in PATH with a sysroot. Store the result into
++# func_resolve_sysroot_result
++func_resolve_sysroot ()
+{
-+ # Start from root dir and reassemble the path.
-+ func_normal_abspath_result=
-+ func_normal_abspath_tpath=$1
-+ func_normal_abspath_altnamespace=
-+ case $func_normal_abspath_tpath in
-+ "")
-+ # Empty path, that just means $cwd.
-+ func_stripname '' '/' "`pwd`"
-+ func_normal_abspath_result=$func_stripname_result
-+ return
-+ ;;
-+ # The next three entries are used to spot a run of precisely
-+ # two leading slashes without using negated character classes;
-+ # we take advantage of case's first-match behaviour.
-+ ///*)
-+ # Unusual form of absolute path, do nothing.
-+ ;;
-+ //*)
-+ # Not necessarily an ordinary path; POSIX reserves leading '//'
-+ # and for example Cygwin uses it to access remote file shares
-+ # over CIFS/SMB, so we conserve a leading double slash if found.
-+ func_normal_abspath_altnamespace=/
-+ ;;
-+ /*)
-+ # Absolute path, do nothing.
-+ ;;
-+ *)
-+ # Relative path, prepend $cwd.
-+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
-+ ;;
++ func_resolve_sysroot_result=$1
++ case $func_resolve_sysroot_result in
++ =*)
++ func_stripname '=' '' "$func_resolve_sysroot_result"
++ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+ ;;
+ esac
-+ # Cancel out all the simple stuff to save iterations. We also want
-+ # the path to end with a slash for ease of parsing, so make sure
-+ # there is one (and only one) here.
-+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
-+ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
-+ while :; do
-+ # Processed it all yet?
-+ if test "$func_normal_abspath_tpath" = / ; then
-+ # If we ascended to the root using ".." the result may be empty now.
-+ if test -z "$func_normal_abspath_result" ; then
-+ func_normal_abspath_result=/
-+ fi
-+ break
-+ fi
-+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
-+ -e "$pathcar"`
-+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
-+ -e "$pathcdr"`
-+ # Figure out what to do with it
-+ case $func_normal_abspath_tcomponent in
-+ "")
-+ # Trailing empty path component, ignore it.
- ;;
-- tag)
-- tagname="$arg"
-+ ..)
-+ # Parent dir; strip last assembled component from result.
-+ func_dirname "$func_normal_abspath_result"
-+ func_normal_abspath_result=$func_dirname_result
-+ ;;
-+ *)
-+ # Actual path component, append it.
-+ func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
-+ ;;
-+ esac
-+ done
-+ # Restore leading double-slash if one was found on entry.
-+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
-- # Check whether tagname contains only valid characters
-- case $tagname in
-- *[!-_A-Za-z0-9,/]*)
-- echo "$progname: invalid tag name: $tagname" 1>&2
-- exit 1
-- ;;
-- esac
-+# func_relative_path SRCDIR DSTDIR
-+# generates a relative path from SRCDIR to DSTDIR, with a trailing
-+# slash if non-empty, suitable for immediately appending a filename
-+# without needing to append a separator.
-+# value returned in "$func_relative_path_result"
-+func_relative_path ()
++# func_replace_sysroot PATH
++# If PATH begins with the sysroot, replace it with = and
++# store the result into func_replace_sysroot_result.
++func_replace_sysroot ()
+{
-+ func_relative_path_result=
-+ func_normal_abspath "$1"
-+ func_relative_path_tlibdir=$func_normal_abspath_result
-+ func_normal_abspath "$2"
-+ func_relative_path_tbindir=$func_normal_abspath_result
++ case "$lt_sysroot:$1" in
++ ?*:"$lt_sysroot"*)
++ func_stripname "$lt_sysroot" '' "$1"
++ func_replace_sysroot_result="=$func_stripname_result"
++ ;;
+ *)
+- nonopt="$arg"
+- break
++ # Including no sysroot.
++ func_replace_sysroot_result=$1
+ ;;
+ esac
+-done
++}
-- case $tagname in
-- CC)
-- # Don't test for the "default" C tag, as we know, it's there, but
-- # not specially marked.
-- taglist="$taglist $tagname"
-- ;;
-+ # Ascend the tree starting from libdir
-+ while :; do
-+ # check if we have found a prefix of bindir
-+ case $func_relative_path_tbindir in
-+ $func_relative_path_tlibdir)
-+ # found an exact match
-+ func_relative_path_tcancelled=
-+ break
-+ ;;
-+ $func_relative_path_tlibdir*)
-+ # found a matching prefix
-+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
-+ func_relative_path_tcancelled=$func_stripname_result
-+ if test -z "$func_relative_path_result"; then
-+ func_relative_path_result=.
-+ fi
-+ break
-+ ;;
- *)
-- if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
-- taglist="$taglist $tagname"
-- # Evaluate the configuration.
-- eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
-- else
-- echo "$progname: ignoring unknown tag $tagname" 1>&2
-+ func_dirname $func_relative_path_tlibdir
-+ func_relative_path_tlibdir=${func_dirname_result}
-+ if test "x$func_relative_path_tlibdir" = x ; then
-+ # Have to descend all the way to the root!
-+ func_relative_path_result=../$func_relative_path_result
-+ func_relative_path_tcancelled=$func_relative_path_tbindir
-+ break
- fi
-+ func_relative_path_result=../$func_relative_path_result
- ;;
-- esac
-- ;;
-- *)
-- eval "$prev=\$arg"
-- ;;
- esac
-+ done
+-if test -n "$prevopt"; then
+- $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+- $echo "$help" 1>&2
+- exit 1
+-fi
++# func_infer_tag arg
++# Infer tagged configuration to use if any are available and
++# if one wasn't chosen via the "--tag" command line option.
++# Only attempt this if the compiler in the base compile
++# command doesn't match the default compiler.
++# arg is usually of the form 'gcc ...'
++func_infer_tag ()
++{
++ $opt_debug
++ if test -n "$available_tags" && test -z "$tagname"; then
++ CC_quoted=
++ for arg in $CC; do
++ func_append_quoted CC_quoted "$arg"
++ done
++ CC_expanded=`func_echo_all $CC`
++ CC_quoted_expanded=`func_echo_all $CC_quoted`
++ case $@ in
++ # Blanks in the command may have been stripped by the calling shell,
++ # but not from the CC environment variable when configure was run.
++ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
++ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
++ # Blanks at the start of $base_compile will cause this to fail
++ # if we don't check for them as well.
++ *)
++ for z in $available_tags; do
++ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
++ # Evaluate the configuration.
++ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
++ CC_quoted=
++ for arg in $CC; do
++ # Double-quote args containing other shell metacharacters.
++ func_append_quoted CC_quoted "$arg"
++ done
++ CC_expanded=`func_echo_all $CC`
++ CC_quoted_expanded=`func_echo_all $CC_quoted`
++ case "$@ " in
++ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
++ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
++ # The compiler in the base compile command matches
++ # the one in the tagged configuration.
++ # Assume this is the tagged configuration we want.
++ tagname=$z
++ break
++ ;;
++ esac
++ fi
++ done
++ # If $tagname still isn't set, then no tagged configuration
++ # was found and let the user know that the "--tag" command
++ # line option must be used.
++ if test -z "$tagname"; then
++ func_echo "unable to infer tagged configuration"
++ func_fatal_error "specify a tag with \`--tag'"
++# else
++# func_verbose "using $tagname tagged configuration"
++ fi
++ ;;
++ esac
++ fi
++}
-- prev=
-- prevopt=
-- continue
-+ # Now calculate path; take care to avoid doubling-up slashes.
-+ func_stripname '' '/' "$func_relative_path_result"
-+ func_relative_path_result=$func_stripname_result
-+ func_stripname '/' '/' "$func_relative_path_tcancelled"
-+ if test "x$func_stripname_result" != x ; then
-+ func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
- fi
+-# If this variable is set in any of the actions, the command in it
+-# will be execed at the end. This prevents here-documents from being
+-# left over by shells.
+-exec_cmd=
-- # Have we seen a non-optional argument yet?
-- case $arg in
-- --help)
-- show_help=yes
-- ;;
-+ # Normalisation. If bindir is libdir, return empty string,
-+ # else relative path ending with a slash; either way, target
-+ # file name can be directly appended.
-+ if test ! -z "$func_relative_path_result"; then
-+ func_stripname './' '' "$func_relative_path_result/"
-+ func_relative_path_result=$func_stripname_result
-+ fi
-+}
+-if test -z "$show_help"; then
-- --version)
-- echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
-- exit 0
-+# The name of this program:
-+func_dirname_and_basename "$progpath"
-+progname=$func_basename_result
+- # Infer the operation mode.
+- if test -z "$mode"; then
+- case $nonopt in
+- *cc | *++ | gcc* | *-gcc*)
+- mode=link
+- for arg
+- do
+- case $arg in
+- -c)
+- mode=compile
+- break
+- ;;
+- esac
+- done
+- ;;
+- *db | *dbx | *strace | *truss)
+- mode=execute
+- ;;
+- *install*|cp|mv)
+- mode=install
+- ;;
+- *rm)
+- mode=uninstall
+- ;;
+- *)
+- # If we have no mode, but dlfiles were specified, then do execute mode.
+- test -n "$execute_dlfiles" && mode=execute
++# func_write_libtool_object output_name pic_name nonpic_name
++# Create a libtool object file (analogous to a ".la" file),
++# but don't create it if we're doing a dry run.
++func_write_libtool_object ()
++{
++ write_libobj=${1}
++ if test "$build_libtool_libs" = yes; then
++ write_lobj=\'${2}\'
++ else
++ write_lobj=none
++ fi
+
+- # Just use the default operation mode.
+- if test -z "$mode"; then
+- if test -n "$nonopt"; then
+- $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+- else
+- $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+- fi
++ if test "$build_old_libs" = yes; then
++ write_oldobj=\'${3}\'
++ else
++ write_oldobj=none
++ fi
+
-+# Make sure we have an absolute path for reexecution:
-+case $progpath in
-+ [\\/]*|[A-Za-z]:\\*) ;;
-+ *[\\/]*)
-+ progdir=$func_dirname_result
-+ progdir=`cd "$progdir" && pwd`
-+ progpath="$progdir/$progname"
-+ ;;
-+ *)
-+ save_IFS="$IFS"
-+ IFS=:
-+ for progdir in $PATH; do
-+ IFS="$save_IFS"
-+ test -x "$progdir/$progname" && break
-+ done
-+ IFS="$save_IFS"
-+ test -n "$progdir" || progdir=`pwd`
-+ progpath="$progdir/$progname"
-+ ;;
-+esac
-+
-+# Sed substitution that helps us do robust quoting. It backslashifies
-+# metacharacters that are still active within double-quoted strings.
-+Xsed="${SED}"' -e 1s/^X//'
-+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
++ $opt_dry_run || {
++ cat >${write_libobj}T <<EOF
++# $write_libobj - a libtool object file
++# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
++#
++# Please DO NOT delete this file!
++# It is necessary for linking the library.
+
-+# Same as above, but do not quote variable references.
-+double_quote_subst='s/\(["`\\]\)/\\\1/g'
++# Name of the PIC object.
++pic_object=$write_lobj
+
-+# Sed substitution that turns a string into a regex matching for the
-+# string literally.
-+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
++# Name of the non-PIC object
++non_pic_object=$write_oldobj
+
-+# Sed substitution that converts a w32 file name or path
-+# which contains forward slashes, into one that contains
-+# (escaped) backslashes. A very naive implementation.
-+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
++EOF
++ $MV "${write_libobj}T" "${write_libobj}"
++ }
++}
+
-+# Re-`\' parameter expansions in output of double_quote_subst that were
-+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
-+# in input to double_quote_subst, that '$' was protected from expansion.
-+# Since each input `\' is now two `\'s, look for any number of runs of
-+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
-+bs='\\'
-+bs2='\\\\'
-+bs4='\\\\\\\\'
-+dollar='\$'
-+sed_double_backslash="\
-+ s/$bs4/&\\
-+/g
-+ s/^$bs2$dollar/$bs&/
-+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
-+ s/\n//g"
+
-+# Standard options:
-+opt_dry_run=false
-+opt_help=false
-+opt_quiet=false
-+opt_verbose=false
-+opt_warning=:
++##################################################
++# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
++##################################################
+
-+# func_echo arg...
-+# Echo program name prefixed message, along with the current mode
-+# name if it has been set yet.
-+func_echo ()
++# func_convert_core_file_wine_to_w32 ARG
++# Helper function used by file name conversion functions when $build is *nix,
++# and $host is mingw, cygwin, or some other w32 environment. Relies on a
++# correctly configured wine environment available, with the winepath program
++# in $build's $PATH.
++#
++# ARG is the $build file name to be converted to w32 format.
++# Result is available in $func_convert_core_file_wine_to_w32_result, and will
++# be empty on error (or when ARG is empty)
++func_convert_core_file_wine_to_w32 ()
+{
-+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
++ $opt_debug
++ func_convert_core_file_wine_to_w32_result="$1"
++ if test -n "$1"; then
++ # Unfortunately, winepath does not exit with a non-zero error code, so we
++ # are forced to check the contents of stdout. On the other hand, if the
++ # command is not found, the shell will set an exit code of 127 and print
++ # *an error message* to stdout. So we must check for both error code of
++ # zero AND non-empty stdout, which explains the odd construction:
++ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
++ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
++ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
++ $SED -e "$lt_sed_naive_backslashify"`
++ else
++ func_convert_core_file_wine_to_w32_result=
++ fi
++ fi
+}
++# end: func_convert_core_file_wine_to_w32
+
-+# func_verbose arg...
-+# Echo program name prefixed message in verbose mode only.
-+func_verbose ()
-+{
-+ $opt_verbose && func_echo ${1+"$@"}
-+
-+ # A bug in bash halts the script if the last line of a function
-+ # fails when set -e is in force, so we need another command to
-+ # work around that:
-+ :
-+}
+
-+# func_echo_all arg...
-+# Invoke $ECHO with all args, space-separated.
-+func_echo_all ()
++# func_convert_core_path_wine_to_w32 ARG
++# Helper function used by path conversion functions when $build is *nix, and
++# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
++# configured wine environment available, with the winepath program in $build's
++# $PATH. Assumes ARG has no leading or trailing path separator characters.
++#
++# ARG is path to be converted from $build format to win32.
++# Result is available in $func_convert_core_path_wine_to_w32_result.
++# Unconvertible file (directory) names in ARG are skipped; if no directory names
++# are convertible, then the result may be empty.
++func_convert_core_path_wine_to_w32 ()
+{
-+ $ECHO "$*"
++ $opt_debug
++ # unfortunately, winepath doesn't convert paths, only file names
++ func_convert_core_path_wine_to_w32_result=""
++ if test -n "$1"; then
++ oldIFS=$IFS
++ IFS=:
++ for func_convert_core_path_wine_to_w32_f in $1; do
++ IFS=$oldIFS
++ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
++ if test -n "$func_convert_core_file_wine_to_w32_result" ; then
++ if test -z "$func_convert_core_path_wine_to_w32_result"; then
++ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
++ else
++ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
++ fi
+ fi
++ done
++ IFS=$oldIFS
++ fi
+}
++# end: func_convert_core_path_wine_to_w32
+
-+# func_error arg...
-+# Echo program name prefixed message to standard error.
-+func_error ()
-+{
-+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
-+}
+
-+# func_warning arg...
-+# Echo program name prefixed warning message to standard error.
-+func_warning ()
++# func_cygpath ARGS...
++# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
++# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
++# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
++# (2), returns the Cygwin file name or path in func_cygpath_result (input
++# file name or path is assumed to be in w32 format, as previously converted
++# from $build's *nix or MSYS format). In case (3), returns the w32 file name
++# or path in func_cygpath_result (input file name or path is assumed to be in
++# Cygwin format). Returns an empty string on error.
++#
++# ARGS are passed to cygpath, with the last one being the file name or path to
++# be converted.
++#
++# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
++# environment variable; do not put it in $PATH.
++func_cygpath ()
+{
-+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
-+
-+ # bash bug again:
-+ :
++ $opt_debug
++ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
++ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
++ if test "$?" -ne 0; then
++ # on failure, ensure result is empty
++ func_cygpath_result=
++ fi
++ else
++ func_cygpath_result=
++ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
++ fi
+}
++#end: func_cygpath
+
-+# func_fatal_error arg...
-+# Echo program name prefixed message to standard error, and exit.
-+func_fatal_error ()
-+{
-+ func_error ${1+"$@"}
-+ exit $EXIT_FAILURE
-+}
+
-+# func_fatal_help arg...
-+# Echo program name prefixed message to standard error, followed by
-+# a help hint, and exit.
-+func_fatal_help ()
++# func_convert_core_msys_to_w32 ARG
++# Convert file name or path ARG from MSYS format to w32 format. Return
++# result in func_convert_core_msys_to_w32_result.
++func_convert_core_msys_to_w32 ()
+{
-+ func_error ${1+"$@"}
-+ func_fatal_error "$help"
++ $opt_debug
++ # awkward: cmd appends spaces to result
++ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
++ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
-+help="Try \`$progname --help' for more information." ## default
++#end: func_convert_core_msys_to_w32
+
+
-+# func_grep expression filename
-+# Check whether EXPRESSION matches any line of FILENAME, without output.
-+func_grep ()
++# func_convert_file_check ARG1 ARG2
++# Verify that ARG1 (a file name in $build format) was converted to $host
++# format in ARG2. Otherwise, emit an error message, but continue (resetting
++# func_to_host_file_result to ARG1).
++func_convert_file_check ()
+{
-+ $GREP "$1" "$2" >/dev/null 2>&1
++ $opt_debug
++ if test -z "$2" && test -n "$1" ; then
++ func_error "Could not determine host file name corresponding to"
++ func_error " \`$1'"
++ func_error "Continuing, but uninstalled executables may not work."
++ # Fallback:
++ func_to_host_file_result="$1"
++ fi
+}
++# end func_convert_file_check
+
+
-+# func_mkdir_p directory-path
-+# Make sure the entire path to DIRECTORY-PATH is available.
-+func_mkdir_p ()
++# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
++# Verify that FROM_PATH (a path in $build format) was converted to $host
++# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
++# func_to_host_file_result to a simplistic fallback value (see below).
++func_convert_path_check ()
+{
-+ my_directory_path="$1"
-+ my_dir_list=
++ $opt_debug
++ if test -z "$4" && test -n "$3"; then
++ func_error "Could not determine the host path corresponding to"
++ func_error " \`$3'"
++ func_error "Continuing, but uninstalled executables may not work."
++ # Fallback. This is a deliberately simplistic "conversion" and
++ # should not be "improved". See libtool.info.
++ if test "x$1" != "x$2"; then
++ lt_replace_pathsep_chars="s|$1|$2|g"
++ func_to_host_path_result=`echo "$3" |
++ $SED -e "$lt_replace_pathsep_chars"`
++ else
++ func_to_host_path_result="$3"
++ fi
++ fi
++}
++# end func_convert_path_check
+
-+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
-+ # Protect directory names starting with `-'
-+ case $my_directory_path in
-+ -*) my_directory_path="./$my_directory_path" ;;
-+ esac
-+
-+ # While some portion of DIR does not yet exist...
-+ while test ! -d "$my_directory_path"; do
-+ # ...make a list in topmost first order. Use a colon delimited
-+ # list incase some portion of path contains whitespace.
-+ my_dir_list="$my_directory_path:$my_dir_list"
-+
-+ # If the last portion added has no slash in it, the list is done
-+ case $my_directory_path in */*) ;; *) break ;; esac
-+
-+ # ...otherwise throw away the child directory and loop
-+ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
-+ done
-+ my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
-+
-+ save_mkdir_p_IFS="$IFS"; IFS=':'
-+ for my_dir in $my_dir_list; do
-+ IFS="$save_mkdir_p_IFS"
-+ # mkdir can fail with a `File exist' error if two processes
-+ # try to create one of the directories concurrently. Don't
-+ # stop in that case!
-+ $MKDIR "$my_dir" 2>/dev/null || :
-+ done
-+ IFS="$save_mkdir_p_IFS"
-+
-+ # Bail out if we (or some other process) failed to create a directory.
-+ test -d "$my_directory_path" || \
-+ func_fatal_error "Failed to create \`$1'"
-+ fi
-+}
-+
-+
-+# func_mktempdir [string]
-+# Make a temporary directory that won't clash with other running
-+# libtool processes, and avoids race conditions if possible. If
-+# given, STRING is the basename for that directory.
-+func_mktempdir ()
++# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
++# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
++# and appending REPL if ORIG matches BACKPAT.
++func_convert_path_front_back_pathsep ()
+{
-+ my_template="${TMPDIR-/tmp}/${1-$progname}"
-+
-+ if test "$opt_dry_run" = ":"; then
-+ # Return a directory name, but don't create it in dry-run mode
-+ my_tmpdir="${my_template}-$$"
-+ else
-+
-+ # If mktemp works, use that first and foremost
-+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
-+
-+ if test ! -d "$my_tmpdir"; then
-+ # Failing that, at least try and use $RANDOM to avoid a race
-+ my_tmpdir="${my_template}-${RANDOM-0}$$"
-+
-+ save_mktempdir_umask=`umask`
-+ umask 0077
-+ $MKDIR "$my_tmpdir"
-+ umask $save_mktempdir_umask
-+ fi
++ $opt_debug
++ case $4 in
++ $1 ) func_to_host_path_result="$3$func_to_host_path_result"
++ ;;
++ esac
++ case $4 in
++ $2 ) func_append func_to_host_path_result "$3"
++ ;;
++ esac
++}
++# end func_convert_path_front_back_pathsep
+
-+ # If we're not in dry-run mode, bomb out on failure
-+ test -d "$my_tmpdir" || \
-+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
-+ fi
+
-+ $ECHO "$my_tmpdir"
-+}
++##################################################
++# $build to $host FILE NAME CONVERSION FUNCTIONS #
++##################################################
++# invoked via `$to_host_file_cmd ARG'
++#
++# In each case, ARG is the path to be converted from $build to $host format.
++# Result will be available in $func_to_host_file_result.
+
+
-+# func_quote_for_eval arg
-+# Aesthetically quote ARG to be evaled later.
-+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
-+# is double-quoted, suitable for a subsequent eval, whereas
-+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
-+# which are still active within double quotes backslashified.
-+func_quote_for_eval ()
++# func_to_host_file ARG
++# Converts the file name ARG from $build format to $host format. Return result
++# in func_to_host_file_result.
++func_to_host_file ()
+{
-+ case $1 in
-+ *[\\\`\"\$]*)
-+ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
-+ *)
-+ func_quote_for_eval_unquoted_result="$1" ;;
-+ esac
-+
-+ case $func_quote_for_eval_unquoted_result in
-+ # Double-quote args containing shell metacharacters to delay
-+ # word splitting, command substitution and and variable
-+ # expansion for a subsequent eval.
-+ # Many Bourne shells cannot handle close brackets correctly
-+ # in scan sets, so we specify it separately.
-+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
-+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
-+ ;;
-+ *)
-+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
-+ esac
++ $opt_debug
++ $to_host_file_cmd "$1"
+}
++# end func_to_host_file
+
+
-+# func_quote_for_expand arg
-+# Aesthetically quote ARG to be evaled later; same as above,
-+# but do not quote variable references.
-+func_quote_for_expand ()
++# func_to_tool_file ARG LAZY
++# converts the file name ARG from $build format to toolchain format. Return
++# result in func_to_tool_file_result. If the conversion in use is listed
++# in (the comma separated) LAZY, no conversion takes place.
++func_to_tool_file ()
+{
-+ case $1 in
-+ *[\\\`\"]*)
-+ my_arg=`$ECHO "$1" | $SED \
-+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
-+ *)
-+ my_arg="$1" ;;
-+ esac
-+
-+ case $my_arg in
-+ # Double-quote args containing shell metacharacters to delay
-+ # word splitting and command substitution for a subsequent eval.
-+ # Many Bourne shells cannot handle close brackets correctly
-+ # in scan sets, so we specify it separately.
-+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
-+ my_arg="\"$my_arg\""
-+ ;;
-+ esac
-+
-+ func_quote_for_expand_result="$my_arg"
++ $opt_debug
++ case ,$2, in
++ *,"$to_tool_file_cmd",*)
++ func_to_tool_file_result=$1
+ ;;
+- esac
++ *)
++ $to_tool_file_cmd "$1"
++ func_to_tool_file_result=$func_to_host_file_result
++ ;;
++ esac
+}
++# end func_to_tool_file
+
+
-+# func_show_eval cmd [fail_exp]
-+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
-+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
-+# is given, then evaluate it.
-+func_show_eval ()
++# func_convert_file_noop ARG
++# Copy ARG to func_to_host_file_result.
++func_convert_file_noop ()
+{
-+ my_cmd="$1"
-+ my_fail_exp="${2-:}"
-+
-+ ${opt_silent-false} || {
-+ func_quote_for_expand "$my_cmd"
-+ eval "func_echo $func_quote_for_expand_result"
-+ }
-+
-+ if ${opt_dry_run-false}; then :; else
-+ eval "$my_cmd"
-+ my_status=$?
-+ if test "$my_status" -eq 0; then :; else
-+ eval "(exit $my_status); $my_fail_exp"
-+ fi
-+ fi
++ func_to_host_file_result="$1"
+}
++# end func_convert_file_noop
+
+
-+# func_show_eval_locale cmd [fail_exp]
-+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
-+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
-+# is given, then evaluate it. Use the saved locale for evaluation.
-+func_show_eval_locale ()
++# func_convert_file_msys_to_w32 ARG
++# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
++# conversion to w32 is not available inside the cwrapper. Returns result in
++# func_to_host_file_result.
++func_convert_file_msys_to_w32 ()
+{
-+ my_cmd="$1"
-+ my_fail_exp="${2-:}"
-+
-+ ${opt_silent-false} || {
-+ func_quote_for_expand "$my_cmd"
-+ eval "func_echo $func_quote_for_expand_result"
-+ }
-+
-+ if ${opt_dry_run-false}; then :; else
-+ eval "$lt_user_locale
-+ $my_cmd"
-+ my_status=$?
-+ eval "$lt_safe_locale"
-+ if test "$my_status" -eq 0; then :; else
-+ eval "(exit $my_status); $my_fail_exp"
-+ fi
-+ fi
++ $opt_debug
++ func_to_host_file_result="$1"
++ if test -n "$1"; then
++ func_convert_core_msys_to_w32 "$1"
++ func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+ fi
++ func_convert_file_check "$1" "$func_to_host_file_result"
+}
++# end func_convert_file_msys_to_w32
+
+- # Only execute mode is allowed to have -dlopen flags.
+- if test -n "$execute_dlfiles" && test "$mode" != execute; then
+- $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+- $echo "$help" 1>&2
+- exit 1
+
-+# func_tr_sh
-+# Turn $1 into a string suitable for a shell variable name.
-+# Result is stored in $func_tr_sh_result. All characters
-+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
-+# if $1 begins with a digit, a '_' is prepended as well.
-+func_tr_sh ()
++# func_convert_file_cygwin_to_w32 ARG
++# Convert file name ARG from Cygwin to w32 format. Returns result in
++# func_to_host_file_result.
++func_convert_file_cygwin_to_w32 ()
+{
-+ case $1 in
-+ [0-9]* | *[!a-zA-Z0-9_]*)
-+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
- ;;
-+ * )
-+ func_tr_sh_result=$1
-+ ;;
-+ esac
++ $opt_debug
++ func_to_host_file_result="$1"
++ if test -n "$1"; then
++ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
++ # LT_CYGPATH in this case.
++ func_to_host_file_result=`cygpath -m "$1"`
+ fi
++ func_convert_file_check "$1" "$func_to_host_file_result"
+}
-+
-+
-+# func_version
-+# Echo version message to standard output and exit.
-+func_version ()
++# end func_convert_file_cygwin_to_w32
+
+- # Change the help message to a mode-specific one.
+- generic_help="$help"
+- help="Try \`$modename --help --mode=$mode' for more information."
+
+- # These modes are in order of execution frequency so that they run quickly.
+- case $mode in
+- # libtool compile mode
+- compile)
+- modename="$modename: compile"
+- # Get the compilation command and the source file.
+- base_compile=
+- prev=
+- lastarg=
+- srcfile="$nonopt"
+- suppress_output=
++# func_convert_file_nix_to_w32 ARG
++# Convert file name ARG from *nix to w32 format. Requires a wine environment
++# and a working winepath. Returns result in func_to_host_file_result.
++func_convert_file_nix_to_w32 ()
+{
-+ $opt_debug
-+
-+ $SED -n '/(C)/!b go
-+ :more
-+ /\./!{
-+ N
-+ s/\n# / /
-+ b more
-+ }
-+ :go
-+ /^# '$PROGRAM' (GNU /,/# warranty; / {
-+ s/^# //
-+ s/^# *$//
-+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
-+ p
-+ }' < "$progpath"
-+ exit $?
++ $opt_debug
++ func_to_host_file_result="$1"
++ if test -n "$1"; then
++ func_convert_core_file_wine_to_w32 "$1"
++ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
++ fi
++ func_convert_file_check "$1" "$func_to_host_file_result"
+}
-+
-+# func_usage
-+# Echo short help message to standard output and exit.
-+func_usage ()
++# end func_convert_file_nix_to_w32
+
+- user_target=no
+- for arg
+- do
+- case $prev in
+- "") ;;
+- xcompiler)
+- # Aesthetically quote the previous argument.
+- prev=
+- lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+
+- case $arg in
+- # Double-quote args containing other shell metacharacters.
+- # Many Bourne shells cannot handle close brackets correctly
+- # in scan sets, so we specify it separately.
+- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+- arg="\"$arg\""
+- ;;
+- esac
++# func_convert_file_msys_to_cygwin ARG
++# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
++# Returns result in func_to_host_file_result.
++func_convert_file_msys_to_cygwin ()
+{
-+ $opt_debug
-+
-+ $SED -n '/^# Usage:/,/^# *.*--help/ {
-+ s/^# //
-+ s/^# *$//
-+ s/\$progname/'$progname'/
-+ p
-+ }' < "$progpath"
-+ echo
-+ $ECHO "run \`$progname --help | more' for full usage"
-+ exit $?
++ $opt_debug
++ func_to_host_file_result="$1"
++ if test -n "$1"; then
++ func_convert_core_msys_to_w32 "$1"
++ func_cygpath -u "$func_convert_core_msys_to_w32_result"
++ func_to_host_file_result="$func_cygpath_result"
++ fi
++ func_convert_file_check "$1" "$func_to_host_file_result"
+}
-+
-+# func_help [NOEXIT]
-+# Echo long help message to standard output and exit,
-+# unless 'noexit' is passed as argument.
-+func_help ()
++# end func_convert_file_msys_to_cygwin
+
+- # Add the previous argument to base_compile.
+- if test -z "$base_compile"; then
+- base_compile="$lastarg"
+- else
+- base_compile="$base_compile $lastarg"
+- fi
+- continue
+- ;;
+- esac
+
+- # Accept any command-line options.
+- case $arg in
+- -o)
+- if test "$user_target" != "no"; then
+- $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+- exit 1
+- fi
+- user_target=next
+- ;;
++# func_convert_file_nix_to_cygwin ARG
++# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
++# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
++# in func_to_host_file_result.
++func_convert_file_nix_to_cygwin ()
+{
-+ $opt_debug
-+
-+ $SED -n '/^# Usage:/,/# Report bugs to/ {
-+ :print
-+ s/^# //
-+ s/^# *$//
-+ s*\$progname*'$progname'*
-+ s*\$host*'"$host"'*
-+ s*\$SHELL*'"$SHELL"'*
-+ s*\$LTCC*'"$LTCC"'*
-+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
-+ s*\$LD*'"$LD"'*
-+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
-+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
-+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
-+ p
-+ d
-+ }
-+ /^# .* home page:/b print
-+ /^# General help using/b print
-+ ' < "$progpath"
-+ ret=$?
-+ if test -z "$1"; then
-+ exit $ret
-+ fi
++ $opt_debug
++ func_to_host_file_result="$1"
++ if test -n "$1"; then
++ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
++ func_convert_core_file_wine_to_w32 "$1"
++ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
++ func_to_host_file_result="$func_cygpath_result"
++ fi
++ func_convert_file_check "$1" "$func_to_host_file_result"
+}
-+
-+# func_missing_arg argname
-+# Echo program name prefixed message to standard error and set global
-+# exit_cmd.
-+func_missing_arg ()
++# end func_convert_file_nix_to_cygwin
+
+- -static)
+- build_old_libs=yes
+- continue
+- ;;
+
+- -prefer-pic)
+- pic_mode=yes
+- continue
+- ;;
++#############################################
++# $build to $host PATH CONVERSION FUNCTIONS #
++#############################################
++# invoked via `$to_host_path_cmd ARG'
++#
++# In each case, ARG is the path to be converted from $build to $host format.
++# The result will be available in $func_to_host_path_result.
++#
++# Path separators are also converted from $build format to $host format. If
++# ARG begins or ends with a path separator character, it is preserved (but
++# converted to $host format) on output.
++#
++# All path conversion functions are named using the following convention:
++# file name conversion function : func_convert_file_X_to_Y ()
++# path conversion function : func_convert_path_X_to_Y ()
++# where, for any given $build/$host combination the 'X_to_Y' value is the
++# same. If conversion functions are added for new $build/$host combinations,
++# the two new functions must follow this pattern, or func_init_to_host_path_cmd
++# will break.
+
+- -prefer-non-pic)
+- pic_mode=no
+- continue
+- ;;
+
+- -Xcompiler)
+- prev=xcompiler
+- continue
+- ;;
++# func_init_to_host_path_cmd
++# Ensures that function "pointer" variable $to_host_path_cmd is set to the
++# appropriate value, based on the value of $to_host_file_cmd.
++to_host_path_cmd=
++func_init_to_host_path_cmd ()
+{
-+ $opt_debug
-+
-+ func_error "missing argument for $1."
-+ exit_cmd=exit
++ $opt_debug
++ if test -z "$to_host_path_cmd"; then
++ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
++ to_host_path_cmd="func_convert_path_${func_stripname_result}"
++ fi
+}
-+
-+
-+# func_split_short_opt shortopt
-+# Set func_split_short_opt_name and func_split_short_opt_arg shell
-+# variables after splitting SHORTOPT after the 2nd character.
-+func_split_short_opt ()
+
+- -Wc,*)
+- args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+- lastarg=
+- IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
+- for arg in $args; do
+- IFS="$save_ifs"
+
+- # Double-quote args containing other shell metacharacters.
+- # Many Bourne shells cannot handle close brackets correctly
+- # in scan sets, so we specify it separately.
+- case $arg in
+- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+- arg="\"$arg\""
+- ;;
+- esac
+- lastarg="$lastarg $arg"
+- done
+- IFS="$save_ifs"
+- lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
++# func_to_host_path ARG
++# Converts the path ARG from $build format to $host format. Return result
++# in func_to_host_path_result.
++func_to_host_path ()
+{
-+ my_sed_short_opt='1s/^\(..\).*$/\1/;q'
-+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
-+
-+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
-+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
-+} # func_split_short_opt may be replaced by extended shell implementation
-+
-+
-+# func_split_long_opt longopt
-+# Set func_split_long_opt_name and func_split_long_opt_arg shell
-+# variables after splitting LONGOPT at the `=' sign.
-+func_split_long_opt ()
-+{
-+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
-+ my_sed_long_arg='1s/^--[^=]*=//'
-+
-+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
-+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
-+} # func_split_long_opt may be replaced by extended shell implementation
-+
-+exit_cmd=:
-+
-+
-+
-+
-+
-+magic="%%%MAGIC variable%%%"
-+magic_exe="%%%MAGIC EXE variable%%%"
-+
-+# Global variables.
-+nonopt=
-+preserve_args=
-+lo2o="s/\\.lo\$/.${objext}/"
-+o2lo="s/\\.${objext}\$/.lo/"
-+extracted_archives=
-+extracted_serial=0
-+
-+# If this variable is set in any of the actions, the command in it
-+# will be execed at the end. This prevents here-documents from being
-+# left over by shells.
-+exec_cmd=
-+
-+# func_append var value
-+# Append VALUE to the end of shell variable VAR.
-+func_append ()
-+{
-+ eval "${1}=\$${1}\${2}"
-+} # func_append may be replaced by extended shell implementation
-+
-+# func_append_quoted var value
-+# Quote VALUE and append to the end of shell variable VAR, separated
-+# by a space.
-+func_append_quoted ()
++ $opt_debug
++ func_init_to_host_path_cmd
++ $to_host_path_cmd "$1"
++}
++# end func_to_host_path
+
+- # Add the arguments to base_compile.
+- if test -z "$base_compile"; then
+- base_compile="$lastarg"
+- else
+- base_compile="$base_compile $lastarg"
+- fi
+- continue
+- ;;
+- esac
+
+- case $user_target in
+- next)
+- # The next one is the -o target name
+- user_target=yes
+- continue
++# func_convert_path_noop ARG
++# Copy ARG to func_to_host_path_result.
++func_convert_path_noop ()
+{
-+ func_quote_for_eval "${2}"
-+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
-+} # func_append_quoted may be replaced by extended shell implementation
++ func_to_host_path_result="$1"
++}
++# end func_convert_path_noop
+
+
-+# func_arith arithmetic-term...
-+func_arith ()
++# func_convert_path_msys_to_w32 ARG
++# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
++# conversion to w32 is not available inside the cwrapper. Returns result in
++# func_to_host_path_result.
++func_convert_path_msys_to_w32 ()
+{
-+ func_arith_result=`expr "${@}"`
-+} # func_arith may be replaced by extended shell implementation
++ $opt_debug
++ func_to_host_path_result="$1"
++ if test -n "$1"; then
++ # Remove leading and trailing path separator characters from ARG. MSYS
++ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
++ # and winepath ignores them completely.
++ func_stripname : : "$1"
++ func_to_host_path_tmp1=$func_stripname_result
++ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
++ func_to_host_path_result="$func_convert_core_msys_to_w32_result"
++ func_convert_path_check : ";" \
++ "$func_to_host_path_tmp1" "$func_to_host_path_result"
++ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
++ fi
++}
++# end func_convert_path_msys_to_w32
+
+
-+# func_len string
-+# STRING may not start with a hyphen.
-+func_len ()
++# func_convert_path_cygwin_to_w32 ARG
++# Convert path ARG from Cygwin to w32 format. Returns result in
++# func_to_host_file_result.
++func_convert_path_cygwin_to_w32 ()
+{
-+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
-+} # func_len may be replaced by extended shell implementation
++ $opt_debug
++ func_to_host_path_result="$1"
++ if test -n "$1"; then
++ # See func_convert_path_msys_to_w32:
++ func_stripname : : "$1"
++ func_to_host_path_tmp1=$func_stripname_result
++ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
++ func_convert_path_check : ";" \
++ "$func_to_host_path_tmp1" "$func_to_host_path_result"
++ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
++ fi
++}
++# end func_convert_path_cygwin_to_w32
+
+
-+# func_lo2o object
-+func_lo2o ()
++# func_convert_path_nix_to_w32 ARG
++# Convert path ARG from *nix to w32 format. Requires a wine environment and
++# a working winepath. Returns result in func_to_host_file_result.
++func_convert_path_nix_to_w32 ()
+{
-+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
-+} # func_lo2o may be replaced by extended shell implementation
++ $opt_debug
++ func_to_host_path_result="$1"
++ if test -n "$1"; then
++ # See func_convert_path_msys_to_w32:
++ func_stripname : : "$1"
++ func_to_host_path_tmp1=$func_stripname_result
++ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
++ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
++ func_convert_path_check : ";" \
++ "$func_to_host_path_tmp1" "$func_to_host_path_result"
++ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
++ fi
++}
++# end func_convert_path_nix_to_w32
+
+
-+# func_xform libobj-or-source
-+func_xform ()
++# func_convert_path_msys_to_cygwin ARG
++# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
++# Returns result in func_to_host_file_result.
++func_convert_path_msys_to_cygwin ()
+{
-+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
-+} # func_xform may be replaced by extended shell implementation
++ $opt_debug
++ func_to_host_path_result="$1"
++ if test -n "$1"; then
++ # See func_convert_path_msys_to_w32:
++ func_stripname : : "$1"
++ func_to_host_path_tmp1=$func_stripname_result
++ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
++ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
++ func_to_host_path_result="$func_cygpath_result"
++ func_convert_path_check : : \
++ "$func_to_host_path_tmp1" "$func_to_host_path_result"
++ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
++ fi
++}
++# end func_convert_path_msys_to_cygwin
+
+
-+# func_fatal_configuration arg...
-+# Echo program name prefixed message to standard error, followed by
-+# a configuration failure hint, and exit.
-+func_fatal_configuration ()
++# func_convert_path_nix_to_cygwin ARG
++# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
++# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
++# func_to_host_file_result.
++func_convert_path_nix_to_cygwin ()
+{
-+ func_error ${1+"$@"}
-+ func_error "See the $PACKAGE documentation for more information."
-+ func_fatal_error "Fatal configuration error."
++ $opt_debug
++ func_to_host_path_result="$1"
++ if test -n "$1"; then
++ # Remove leading and trailing path separator characters from
++ # ARG. msys behavior is inconsistent here, cygpath turns them
++ # into '.;' and ';.', and winepath ignores them completely.
++ func_stripname : : "$1"
++ func_to_host_path_tmp1=$func_stripname_result
++ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
++ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
++ func_to_host_path_result="$func_cygpath_result"
++ func_convert_path_check : : \
++ "$func_to_host_path_tmp1" "$func_to_host_path_result"
++ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
++ fi
+}
++# end func_convert_path_nix_to_cygwin
+
+
-+# func_config
-+# Display the configuration for all the tags in this script.
-+func_config ()
++# func_mode_compile arg...
++func_mode_compile ()
+{
-+ re_begincf='^# ### BEGIN LIBTOOL'
-+ re_endcf='^# ### END LIBTOOL'
++ $opt_debug
++ # Get the compilation command and the source file.
++ base_compile=
++ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
++ suppress_opt=yes
++ suppress_output=
++ arg_mode=normal
++ libobj=
++ later=
++ pie_flag=
+
-+ # Default configuration.
-+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
++ for arg
++ do
++ case $arg_mode in
++ arg )
++ # do not "continue". Instead, add this to base_compile
++ lastarg="$arg"
++ arg_mode=normal
+ ;;
+- yes)
+- # We got the output file
+- user_target=set
++
++ target )
+ libobj="$arg"
++ arg_mode=normal
+ continue
+ ;;
+- esac
-- --config)
-- sed -n -e '/^### BEGIN LIBTOOL CONFIG/,/^### END LIBTOOL CONFIG/p' < "$0"
- # Now print the configurations for the tags.
- for tagname in $taglist; do
-- sed -n -e "/^### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
-+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
- done
-- exit 0
-- ;;
+- # Accept the current argument as the source file.
+- lastarg="$srcfile"
+- srcfile="$arg"
++ normal )
++ # Accept any command-line options.
++ case $arg in
++ -o)
++ test -n "$libobj" && \
++ func_fatal_error "you cannot specify \`-o' more than once"
++ arg_mode=target
++ continue
++ ;;
-- --debug)
-- echo "$progname: enabling shell trace mode"
-- set -x
-- ;;
--
-- --dry-run | -n)
-- run=:
-- ;;
-+ exit $?
-+}
+- # Aesthetically quote the previous argument.
++ -pie | -fpie | -fPIE)
++ func_append pie_flag " $arg"
++ continue
++ ;;
-- --features)
-+# func_features
-+# Display the features supported by this script.
-+func_features ()
-+{
- echo "host: $host"
- if test "$build_libtool_libs" = yes; then
- echo "enable shared libraries"
-@@ -205,349 +934,1184 @@
- else
- echo "disable static libraries"
- fi
-- exit 0
-- ;;
+- # Backslashify any backslashes, double quotes, and dollar signs.
+- # These are the only characters that are still specially
+- # interpreted inside of double-quoted scrings.
+- lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
++ -shared | -static | -prefer-pic | -prefer-non-pic)
++ func_append later " $arg"
++ continue
++ ;;
-- --finish) mode="finish" ;;
-+ exit $?
-+}
+- # Double-quote args containing other shell metacharacters.
+- # Many Bourne shells cannot handle close brackets correctly
+- # in scan sets, so we specify it separately.
+- case $lastarg in
+- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+- lastarg="\"$lastarg\""
++ -no-suppress)
++ suppress_opt=no
++ continue
++ ;;
++
++ -Xcompiler)
++ arg_mode=arg # the next one goes into the "base_compile" arg list
++ continue # The current "srcfile" will either be retained or
++ ;; # replaced later. I would guess that would be a bug.
++
++ -Wc,*)
++ func_stripname '-Wc,' '' "$arg"
++ args=$func_stripname_result
++ lastarg=
++ save_ifs="$IFS"; IFS=','
++ for arg in $args; do
++ IFS="$save_ifs"
++ func_append_quoted lastarg "$arg"
++ done
++ IFS="$save_ifs"
++ func_stripname ' ' '' "$lastarg"
++ lastarg=$func_stripname_result
++
++ # Add the arguments to base_compile.
++ func_append base_compile " $lastarg"
++ continue
++ ;;
++
++ *)
++ # Accept the current argument as the source file.
++ # The previous "srcfile" becomes the current argument.
++ #
++ lastarg="$srcfile"
++ srcfile="$arg"
++ ;;
++ esac # case $arg
+ ;;
+- esac
++ esac # case $arg_mode
-- --mode) prevopt="--mode" prev=mode ;;
-- --mode=*) mode="$optarg" ;;
-+# func_enable_tag tagname
-+# Verify that TAGNAME is valid, and either flag an error and exit, or
-+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
-+# variable here.
-+func_enable_tag ()
-+{
-+ # Global variable:
-+ tagname="$1"
+- # Add the previous argument to base_compile.
+- if test -z "$base_compile"; then
+- base_compile="$lastarg"
+- else
+- base_compile="$base_compile $lastarg"
+- fi
+- done
++ # Aesthetically quote the previous argument.
++ func_append_quoted base_compile "$lastarg"
++ done # for arg
-- --quiet | --silent)
-- show=:
-- ;;
-+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
-+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
-+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
+- case $user_target in
+- set)
++ case $arg_mode in
++ arg)
++ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+- no)
+- # Get the name of the library object.
+- libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
++ target)
++ func_fatal_error "you must specify a target with \`-o'"
+ ;;
+ *)
+- $echo "$modename: you must specify a target with \`-o'" 1>&2
+- exit 1
++ # Get the name of the library object.
++ test -z "$libobj" && {
++ func_basename "$srcfile"
++ libobj="$func_basename_result"
++ }
+ ;;
+ esac
-- --tag) prevopt="--tag" prev=tag ;;
-- --tag=*)
-- set tag "$optarg" ${1+"$@"}
-+ # Validate tagname.
-+ case $tagname in
-+ *[!-_A-Za-z0-9,/]*)
-+ func_fatal_error "invalid tag name: $tagname"
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+- xform='[cCFSfmso]'
+ case $libobj in
+- *.ada) xform=ada ;;
+- *.adb) xform=adb ;;
+- *.ads) xform=ads ;;
+- *.asm) xform=asm ;;
+- *.c++) xform=c++ ;;
+- *.cc) xform=cc ;;
+- *.class) xform=class ;;
+- *.cpp) xform=cpp ;;
+- *.cxx) xform=cxx ;;
+- *.f90) xform=f90 ;;
+- *.for) xform=for ;;
+- *.java) xform=java ;;
++ *.[cCFSifmso] | \
++ *.ada | *.adb | *.ads | *.asm | \
++ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
++ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
++ func_xform "$libobj"
++ libobj=$func_xform_result
+ ;;
-+ esac
+ esac
+
+- libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+-
+ case $libobj in
+- *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
++ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+- $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+- exit 1
++ func_fatal_error "cannot determine name of library object from \`$libobj'"
+ ;;
+ esac
+
+- # Infer tagged configuration to use if any are available and
+- # if one wasn't chosen via the "--tag" command line option.
+- # Only attempt this if the compiler in the base compile
+- # command doesn't match the default compiler.
+- if test -n "$available_tags" && test -z "$tagname"; then
+- case $base_compile in
+- "$CC "*) ;;
+- # Blanks in the command may have been stripped by the calling shell,
+- # but not from the CC environment variable when ltconfig was run.
+- "`$echo $CC` "*) ;;
+- *)
+- for z in $available_tags; do
+- if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
+- # Evaluate the configuration.
+- eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
+- case $base_compile in
+- "$CC "*)
+- # The compiler in the base compile command matches
+- # the one in the tagged configuration.
+- # Assume this is the tagged configuration we want.
+- tagname=$z
+- break
+- ;;
+- "`$echo $CC` "*)
+- tagname=$z
+- break
+- ;;
+- esac
+- fi
+- done
+- # If $tagname still isn't set, then no tagged configuration
+- # was found and let the user know that the "--tag" command
+- # line option must be used.
+- if test -z "$tagname"; then
+- echo "$modename: unable to infer tagged configuration"
+- echo "$modename: specify a tag with \`--tag'" 1>&2
+- exit 1
+-# else
+-# echo "$modename: using $tagname tagged configuration"
+- fi
++ func_infer_tag $base_compile
+
-+ # Don't test for the "default" C tag, as we know it's
-+ # there but not specially marked.
-+ case $tagname in
-+ CC) ;;
-+ *)
-+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
-+ taglist="$taglist $tagname"
++ for arg in $later; do
++ case $arg in
++ -shared)
++ test "$build_libtool_libs" != yes && \
++ func_fatal_configuration "can not build a shared library"
++ build_old_libs=no
++ continue
++ ;;
+
-+ # Evaluate the configuration. Be careful to quote the path
-+ # and the sed script, to avoid splitting on whitespace, but
-+ # also don't use non-portable quotes within backquotes within
-+ # quotes we have to do it in 2 steps:
-+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
-+ eval "$extractedcf"
-+ else
-+ func_error "ignoring unknown tag $tagname"
-+ fi
-+ ;;
-+ esac
-+}
-+
-+# func_check_version_match
-+# Ensure that we are using m4 macros, and libtool script from the same
-+# release of libtool.
-+func_check_version_match ()
-+{
-+ if test "$package_revision" != "$macro_revision"; then
-+ if test "$VERSION" != "$macro_version"; then
-+ if test -z "$macro_version"; then
-+ cat >&2 <<_LT_EOF
-+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-+$progname: definition of this LT_INIT comes from an older release.
-+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-+$progname: and run autoconf again.
-+_LT_EOF
-+ else
-+ cat >&2 <<_LT_EOF
-+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
-+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-+$progname: and run autoconf again.
-+_LT_EOF
-+ fi
-+ else
-+ cat >&2 <<_LT_EOF
-+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
-+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
-+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
-+$progname: of $PACKAGE $VERSION and run autoconf again.
-+_LT_EOF
-+ fi
-+
-+ exit $EXIT_MISMATCH
-+ fi
-+}
-+
-+
-+# Shorthand for --mode=foo, only valid as the first argument
-+case $1 in
-+clean|clea|cle|cl)
-+ shift; set dummy --mode clean ${1+"$@"}; shift
-+ ;;
-+compile|compil|compi|comp|com|co|c)
-+ shift; set dummy --mode compile ${1+"$@"}; shift
-+ ;;
-+execute|execut|execu|exec|exe|ex|e)
-+ shift; set dummy --mode execute ${1+"$@"}; shift
-+ ;;
-+finish|finis|fini|fin|fi|f)
-+ shift; set dummy --mode finish ${1+"$@"}; shift
-+ ;;
-+install|instal|insta|inst|ins|in|i)
-+ shift; set dummy --mode install ${1+"$@"}; shift
-+ ;;
-+link|lin|li|l)
-+ shift; set dummy --mode link ${1+"$@"}; shift
-+ ;;
-+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
-+ shift; set dummy --mode uninstall ${1+"$@"}; shift
-+ ;;
-+esac
-+
-+
-+
-+# Option defaults:
-+opt_debug=:
-+opt_dry_run=false
-+opt_config=false
-+opt_preserve_dup_deps=false
-+opt_features=false
-+opt_finish=false
-+opt_help=false
-+opt_help_all=false
-+opt_silent=:
-+opt_verbose=:
-+opt_silent=false
-+opt_verbose=false
++ -static)
++ build_libtool_libs=no
++ build_old_libs=yes
++ continue
++ ;;
+
++ -prefer-pic)
++ pic_mode=yes
++ continue
++ ;;
+
-+# Parse options once, thoroughly. This comes as soon as possible in the
-+# script to make things like `--version' happen as quickly as we can.
-+{
-+ # this just eases exit handling
-+ while test $# -gt 0; do
-+ opt="$1"
- shift
-- prev=tag
-- ;;
-+ case $opt in
-+ --debug|-x) opt_debug='set -x'
-+ func_echo "enabling shell trace mode"
-+ $opt_debug
-+ ;;
-+ --dry-run|--dryrun|-n)
-+ opt_dry_run=:
-+ ;;
-+ --config)
-+ opt_config=:
-+func_config
-+ ;;
-+ --dlopen|-dlopen)
-+ optarg="$1"
-+ opt_dlopen="${opt_dlopen+$opt_dlopen
-+}$optarg"
-+ shift
-+ ;;
-+ --preserve-dup-deps)
-+ opt_preserve_dup_deps=:
-+ ;;
-+ --features)
-+ opt_features=:
-+func_features
-+ ;;
-+ --finish)
-+ opt_finish=:
-+set dummy --mode finish ${1+"$@"}; shift
-+ ;;
-+ --help)
-+ opt_help=:
-+ ;;
-+ --help-all)
-+ opt_help_all=:
-+opt_help=': help-all'
-+ ;;
-+ --mode)
-+ test $# = 0 && func_missing_arg $opt && break
-+ optarg="$1"
-+ opt_mode="$optarg"
-+case $optarg in
-+ # Valid mode arguments:
-+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
++ -prefer-non-pic)
++ pic_mode=no
++ continue
+ ;;
+ esac
+- fi
++ done
-- -dlopen)
-- prevopt="-dlopen"
-- prev=execute_dlfiles
-- ;;
-+ # Catch anything else as an error
-+ *) func_error "invalid argument for $opt"
-+ exit_cmd=exit
-+ break
-+ ;;
-+esac
-+ shift
-+ ;;
-+ --no-silent|--no-quiet)
-+ opt_silent=false
-+func_append preserve_args " $opt"
-+ ;;
-+ --no-verbose)
-+ opt_verbose=false
-+func_append preserve_args " $opt"
-+ ;;
-+ --silent|--quiet)
-+ opt_silent=:
-+func_append preserve_args " $opt"
-+ opt_verbose=false
-+ ;;
-+ --verbose|-v)
-+ opt_verbose=:
-+func_append preserve_args " $opt"
-+opt_silent=false
-+ ;;
-+ --tag)
-+ test $# = 0 && func_missing_arg $opt && break
-+ optarg="$1"
-+ opt_tag="$optarg"
-+func_append preserve_args " $opt $optarg"
-+func_enable_tag "$optarg"
-+ shift
-+ ;;
+- objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+- if test "X$xdir" = "X$obj"; then
+- xdir=
+- else
+- xdir=$xdir/
+- fi
++ func_quote_for_eval "$libobj"
++ test "X$libobj" != "X$func_quote_for_eval_result" \
++ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
++ && func_warning "libobj name \`$libobj' may not contain shell special characters."
++ func_dirname_and_basename "$obj" "/" ""
++ objname="$func_basename_result"
++ xdir="$func_dirname_result"
+ lobj=${xdir}$objdir/$objname
-- -*)
-- $echo "$modename: unrecognized option \`$arg'" 1>&2
-- $echo "$help" 1>&2
-- exit 1
-+ -\?|-h) func_usage ;;
-+ --help) func_help ;;
-+ --version) func_version ;;
-+
-+ # Separate optargs to long options:
-+ --*=*)
-+ func_split_long_opt "$opt"
-+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
-+ shift
-+ ;;
-+
-+ # Separate non-argument short options:
-+ -\?*|-h*|-n*|-v*)
-+ func_split_short_opt "$opt"
-+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
-+ shift
-+ ;;
-+
-+ --) break ;;
-+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
-+ *) set dummy "$opt" ${1+"$@"}; shift; break ;;
-+ esac
-+ done
-+
-+ # Validate options:
-+
-+ # save first non-option argument
-+ if test "$#" -gt 0; then
-+ nonopt="$opt"
-+ shift
-+ fi
-+
-+ # preserve --debug
-+ test "$opt_debug" = : || func_append preserve_args " --debug"
-+
-+ case $host in
-+ *cygwin* | *mingw* | *pw32* | *cegcc*)
-+ # don't eliminate duplications in $postdeps and $predeps
-+ opt_duplicate_compiler_generated_deps=:
-+ ;;
-+ *)
-+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
-+ ;;
-+ esac
-+
-+ $opt_help || {
-+ # Sanity checks first:
-+ func_check_version_match
-+
-+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-+ func_fatal_configuration "not configured to build any kind of library"
-+ fi
-+
-+ # Darwin sucks
-+ eval std_shrext=\"$shrext_cmds\"
-+
-+ # Only execute mode is allowed to have -dlopen flags.
-+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
-+ func_error "unrecognized option \`-dlopen'"
-+ $ECHO "$help" 1>&2
-+ exit $EXIT_FAILURE
-+ fi
-+
-+ # Change the help message to a mode-specific one.
-+ generic_help="$help"
-+ help="Try \`$progname --help --mode=$opt_mode' for more information."
-+ }
-+
-+
-+ # Bail if the options were screwed
-+ $exit_cmd $EXIT_FAILURE
-+}
+- if test -z "$base_compile"; then
+- $echo "$modename: you must specify a compilation command" 1>&2
+- $echo "$help" 1>&2
+- exit 1
+- fi
++ test -z "$base_compile" && \
++ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+@@ -556,16 +2120,13 @@
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+- $run $rm $removelist
+- trap "$run $rm $removelist; exit 1" 1 2 15
+-
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+- cygwin* | mingw* | pw32* | os2*)
++ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+- if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
++ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+@@ -573,10 +2134,8 @@
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+- output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
++ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+- removelist="$removelist $output_obj $lockfile"
+- trap "$run $rm $removelist; exit 1" 1 2 15
+ else
+ output_obj=
+ need_locks=no
+@@ -586,13 +2145,13 @@
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+- until $run ln "$0" "$lockfile" 2>/dev/null; do
+- $show "Waiting for $lockfile to be removed"
++ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
++ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+- echo "\
++ $ECHO "\
+ *** ERROR, $lockfile exists and contains:
+ `cat $lockfile 2>/dev/null`
+
+@@ -603,29 +2162,21 @@
+ avoid parallel builds (make -j) in this platform, or get a better
+ compiler."
+
+- $run $rm $removelist
+- exit 1
++ $opt_dry_run || $RM $removelist
++ exit $EXIT_FAILURE
+ fi
+- echo $srcfile > "$lockfile"
+- fi
+-
+- if test -n "$fix_srcfile_path"; then
+- eval srcfile=\"$fix_srcfile_path\"
++ func_append removelist " $output_obj"
++ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+- $run $rm "$libobj" "${libobj}T"
+-
+- # Create a libtool object file (analogous to a ".la" file),
+- # but don't create it if we're doing a dry run.
+- test -z "$run" && cat > ${libobj}T <<EOF
+-# $libobj - a libtool object file
+-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+-#
+-# Please DO NOT delete this file!
+-# It is necessary for linking the library.
++ $opt_dry_run || $RM $removelist
++ func_append removelist " $lockfile"
++ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+-# Name of the PIC object.
+-EOF
++ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
++ srcfile=$func_to_tool_file_result
++ func_quote_for_eval "$srcfile"
++ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+@@ -633,38 +2184,25 @@
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+- command="$base_compile $srcfile $pic_flag"
++ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+- command="$base_compile $srcfile"
++ command="$base_compile $qsrcfile"
+ fi
+
+- if test ! -d ${xdir}$objdir; then
+- $show "$mkdir ${xdir}$objdir"
+- $run $mkdir ${xdir}$objdir
+- status=$?
+- if test $status -ne 0 && test ! -d ${xdir}$objdir; then
+- exit $status
+- fi
+- fi
++ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+- # Place PIC objects in $objdir
+- command="$command -o $lobj"
++ # Place PIC objects in $objdir
++ func_append command " -o $lobj"
+ fi
+
+- $run $rm "$lobj" "$output_obj"
+-
+- $show "$command"
+- if $run eval "$command"; then :
+- else
+- test -n "$output_obj" && $run $rm $removelist
+- exit 1
+- fi
++ func_show_eval_locale "$command" \
++ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+- test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+- echo "\
++ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
++ $ECHO "\
+ *** ERROR, $lockfile contains:
+ `cat $lockfile 2>/dev/null`
+
+@@ -678,63 +2216,42 @@
+ avoid parallel builds (make -j) in this platform, or get a better
+ compiler."
+
+- $run $rm $removelist
+- exit 1
++ $opt_dry_run || $RM $removelist
++ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+- if test -n "$output_obj" && test "x$output_obj" != "x$lobj"; then
+- $show "$mv $output_obj $lobj"
+- if $run $mv $output_obj $lobj; then :
+- else
+- error=$?
+- $run $rm $removelist
+- exit $error
+- fi
++ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
++ func_show_eval '$MV "$output_obj" "$lobj"' \
++ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+- # Append the name of the PIC object to the libtool object file.
+- test -z "$run" && cat >> ${libobj}T <<EOF
+-pic_object='$objdir/$objname'
+-
+-EOF
+-
+ # Allow error messages only from the first compilation.
+- suppress_output=' >/dev/null 2>&1'
+- else
+- # No PIC object so indicate it doesn't exist in the libtool
+- # object file.
+- test -z "$run" && cat >> ${libobj}T <<EOF
+-pic_object=none
+-
+-EOF
++ if test "$suppress_opt" = yes; then
++ suppress_output=' >/dev/null 2>&1'
++ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+- command="$base_compile $srcfile"
++ command="$base_compile $qsrcfile$pie_flag"
+ else
+- command="$base_compile $srcfile $pic_flag"
++ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; then
+- command="$command -o $obj"
++ func_append command " -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+- command="$command$suppress_output"
+- $run $rm "$obj" "$output_obj"
+- $show "$command"
+- if $run eval "$command"; then :
+- else
+- $run $rm $removelist
+- exit 1
+- fi
++ func_append command "$suppress_output"
++ func_show_eval_locale "$command" \
++ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+- test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+- echo "\
++ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
++ $ECHO "\
+ *** ERROR, $lockfile contains:
+ `cat $lockfile 2>/dev/null`
+
+@@ -748,57 +2265,2828 @@
+ avoid parallel builds (make -j) in this platform, or get a better
+ compiler."
+
+- $run $rm $removelist
+- exit 1
++ $opt_dry_run || $RM $removelist
++ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+- if test -n "$output_obj" && test "x$output_obj" != "x$obj"; then
+- $show "$mv $output_obj $obj"
+- if $run $mv $output_obj $obj; then :
++ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
++ func_show_eval '$MV "$output_obj" "$obj"' \
++ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
++ fi
++ fi
+
++ $opt_dry_run || {
++ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
++ # Unlock the critical section if it was locked
++ if test "$need_locks" != no; then
++ removelist=$lockfile
++ $RM "$lockfile"
++ fi
++ }
+
-+
-+## ----------- ##
-+## Main. ##
-+## ----------- ##
-+
-+# func_lalib_p file
-+# True iff FILE is a libtool `.la' library or `.lo' object file.
-+# This function is only a basic sanity check; it will hardly flush out
-+# determined imposters.
-+func_lalib_p ()
-+{
-+ test -f "$1" &&
-+ $SED -e 4q "$1" 2>/dev/null \
-+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
++ exit $EXIT_SUCCESS
+}
+
-+# func_lalib_unsafe_p file
-+# True iff FILE is a libtool `.la' library or `.lo' object file.
-+# This function implements the same check as func_lalib_p without
-+# resorting to external programs. To this end, it redirects stdin and
-+# closes it afterwards, without saving the original file descriptor.
-+# As a safety measure, use it only where a negative result would be
-+# fatal anyway. Works if `file' does not exist.
-+func_lalib_unsafe_p ()
-+{
-+ lalib_p=no
-+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
-+ for lalib_p_l in 1 2 3 4
-+ do
-+ read lalib_p_line
-+ case "$lalib_p_line" in
-+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
-+ esac
-+ done
-+ exec 0<&5 5<&-
-+ fi
-+ test "$lalib_p" = yes
++$opt_help || {
++ test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
+}
+
-+# func_ltwrapper_script_p file
-+# True iff FILE is a libtool wrapper script
-+# This function is only a basic sanity check; it will hardly flush out
-+# determined imposters.
-+func_ltwrapper_script_p ()
++func_mode_help ()
+{
-+ func_lalib_p "$1"
-+}
++ # We need to display help for each of the modes.
++ case $opt_mode in
++ "")
++ # Generic help is extracted from the usage comments
++ # at the start of this file.
++ func_help
++ ;;
+
-+# func_ltwrapper_executable_p file
-+# True iff FILE is a libtool wrapper executable
-+# This function is only a basic sanity check; it will hardly flush out
-+# determined imposters.
-+func_ltwrapper_executable_p ()
-+{
-+ func_ltwrapper_exec_suffix=
-+ case $1 in
-+ *.exe) ;;
-+ *) func_ltwrapper_exec_suffix=.exe ;;
-+ esac
-+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
-+}
++ clean)
++ $ECHO \
++"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
-+# func_ltwrapper_scriptname file
-+# Assumes file is an ltwrapper_executable
-+# uses $file to determine the appropriate filename for a
-+# temporary ltwrapper_script.
-+func_ltwrapper_scriptname ()
-+{
-+ func_dirname_and_basename "$1" "" "."
-+ func_stripname '' '.exe' "$func_basename_result"
-+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
-+}
++Remove files from the build directory.
+
-+# func_ltwrapper_p file
-+# True iff FILE is a libtool wrapper script or wrapper executable
-+# This function is only a basic sanity check; it will hardly flush out
-+# determined imposters.
-+func_ltwrapper_p ()
-+{
-+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
-+}
++RM is the name of the program to use to delete files associated with each FILE
++(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
++to RM.
+
++If FILE is a libtool library, object or program, all the files associated
++with it are deleted. Otherwise, only FILE itself is deleted using RM."
++ ;;
+
-+# func_execute_cmds commands fail_cmd
-+# Execute tilde-delimited COMMANDS.
-+# If FAIL_CMD is given, eval that upon failure.
-+# FAIL_CMD may read-access the current command in variable CMD!
-+func_execute_cmds ()
-+{
-+ $opt_debug
-+ save_ifs=$IFS; IFS='~'
-+ for cmd in $1; do
-+ IFS=$save_ifs
-+ eval cmd=\"$cmd\"
-+ func_show_eval "$cmd" "${2-:}"
-+ done
-+ IFS=$save_ifs
-+}
++ compile)
++ $ECHO \
++"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
++Compile a source file into a libtool library object.
+
-+# func_source file
-+# Source FILE, adding directory component if necessary.
-+# Note that it is not necessary on cygwin/mingw to append a dot to
-+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
-+# behavior happens only for exec(3), not for open(2)! Also, sourcing
-+# `FILE.' does not work on cygwin managed mounts.
-+func_source ()
-+{
-+ $opt_debug
-+ case $1 in
-+ */* | *\\*) . "$1" ;;
-+ *) . "./$1" ;;
-+ esac
-+}
++This mode accepts the following additional options:
+
++ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
++ -no-suppress do not suppress compiler output for multiple passes
++ -prefer-pic try to build PIC objects only
++ -prefer-non-pic try to build non-PIC objects only
++ -shared do not build a \`.o' file suitable for static linking
++ -static only build a \`.o' file suitable for static linking
++ -Wc,FLAG pass FLAG directly to the compiler
+
-+# func_resolve_sysroot PATH
-+# Replace a leading = in PATH with a sysroot. Store the result into
-+# func_resolve_sysroot_result
-+func_resolve_sysroot ()
-+{
-+ func_resolve_sysroot_result=$1
-+ case $func_resolve_sysroot_result in
-+ =*)
-+ func_stripname '=' '' "$func_resolve_sysroot_result"
-+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
- ;;
-+ esac
-+}
-
-+# func_replace_sysroot PATH
-+# If PATH begins with the sysroot, replace it with = and
-+# store the result into func_replace_sysroot_result.
-+func_replace_sysroot ()
-+{
-+ case "$lt_sysroot:$1" in
-+ ?*:"$lt_sysroot"*)
-+ func_stripname "$lt_sysroot" '' "$1"
-+ func_replace_sysroot_result="=$func_stripname_result"
-+ ;;
- *)
-- nonopt="$arg"
-- break
-+ # Including no sysroot.
-+ func_replace_sysroot_result=$1
- ;;
- esac
--done
-+}
-
--if test -n "$prevopt"; then
-- $echo "$modename: option \`$prevopt' requires an argument" 1>&2
-- $echo "$help" 1>&2
-- exit 1
--fi
-+# func_infer_tag arg
-+# Infer tagged configuration to use if any are available and
-+# if one wasn't chosen via the "--tag" command line option.
-+# Only attempt this if the compiler in the base compile
-+# command doesn't match the default compiler.
-+# arg is usually of the form 'gcc ...'
-+func_infer_tag ()
-+{
-+ $opt_debug
-+ if test -n "$available_tags" && test -z "$tagname"; then
-+ CC_quoted=
-+ for arg in $CC; do
-+ func_append_quoted CC_quoted "$arg"
-+ done
-+ CC_expanded=`func_echo_all $CC`
-+ CC_quoted_expanded=`func_echo_all $CC_quoted`
-+ case $@ in
-+ # Blanks in the command may have been stripped by the calling shell,
-+ # but not from the CC environment variable when configure was run.
-+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
-+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
-+ # Blanks at the start of $base_compile will cause this to fail
-+ # if we don't check for them as well.
-+ *)
-+ for z in $available_tags; do
-+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
-+ # Evaluate the configuration.
-+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
-+ CC_quoted=
-+ for arg in $CC; do
-+ # Double-quote args containing other shell metacharacters.
-+ func_append_quoted CC_quoted "$arg"
-+ done
-+ CC_expanded=`func_echo_all $CC`
-+ CC_quoted_expanded=`func_echo_all $CC_quoted`
-+ case "$@ " in
-+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
-+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
-+ # The compiler in the base compile command matches
-+ # the one in the tagged configuration.
-+ # Assume this is the tagged configuration we want.
-+ tagname=$z
-+ break
-+ ;;
-+ esac
-+ fi
-+ done
-+ # If $tagname still isn't set, then no tagged configuration
-+ # was found and let the user know that the "--tag" command
-+ # line option must be used.
-+ if test -z "$tagname"; then
-+ func_echo "unable to infer tagged configuration"
-+ func_fatal_error "specify a tag with \`--tag'"
-+# else
-+# func_verbose "using $tagname tagged configuration"
-+ fi
-+ ;;
-+ esac
-+ fi
-+}
-
--# If this variable is set in any of the actions, the command in it
--# will be execed at the end. This prevents here-documents from being
--# left over by shells.
--exec_cmd=
-
--if test -z "$show_help"; then
-
-- # Infer the operation mode.
-- if test -z "$mode"; then
-- case $nonopt in
-- *cc | *++ | gcc* | *-gcc*)
-- mode=link
-- for arg
-- do
-- case $arg in
-- -c)
-- mode=compile
-- break
-- ;;
-- esac
-- done
-- ;;
-- *db | *dbx | *strace | *truss)
-- mode=execute
-- ;;
-- *install*|cp|mv)
-- mode=install
-- ;;
-- *rm)
-- mode=uninstall
-- ;;
-- *)
-- # If we have no mode, but dlfiles were specified, then do execute mode.
-- test -n "$execute_dlfiles" && mode=execute
-+# func_write_libtool_object output_name pic_name nonpic_name
-+# Create a libtool object file (analogous to a ".la" file),
-+# but don't create it if we're doing a dry run.
-+func_write_libtool_object ()
-+{
-+ write_libobj=${1}
-+ if test "$build_libtool_libs" = yes; then
-+ write_lobj=\'${2}\'
-+ else
-+ write_lobj=none
-+ fi
-
-- # Just use the default operation mode.
-- if test -z "$mode"; then
-- if test -n "$nonopt"; then
-- $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
-- else
-- $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
-- fi
-+ if test "$build_old_libs" = yes; then
-+ write_oldobj=\'${3}\'
-+ else
-+ write_oldobj=none
-+ fi
++COMPILE-COMMAND is a command to be used in creating a \`standard' object file
++from the given SOURCEFILE.
+
-+ $opt_dry_run || {
-+ cat >${write_libobj}T <<EOF
-+# $write_libobj - a libtool object file
-+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-+#
-+# Please DO NOT delete this file!
-+# It is necessary for linking the library.
++The output file name is determined by removing the directory component from
++SOURCEFILE, then substituting the C source code suffix \`.c' with the
++library object suffix, \`.lo'."
++ ;;
+
-+# Name of the PIC object.
-+pic_object=$write_lobj
++ execute)
++ $ECHO \
++"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
-+# Name of the non-PIC object
-+non_pic_object=$write_oldobj
++Automatically set library path, then run a program.
+
-+EOF
-+ $MV "${write_libobj}T" "${write_libobj}"
-+ }
-+}
++This mode accepts the following additional options:
+
++ -dlopen FILE add the directory containing FILE to the library path
+
-+##################################################
-+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
-+##################################################
++This mode sets the library path environment variable according to \`-dlopen'
++flags.
+
-+# func_convert_core_file_wine_to_w32 ARG
-+# Helper function used by file name conversion functions when $build is *nix,
-+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
-+# correctly configured wine environment available, with the winepath program
-+# in $build's $PATH.
-+#
-+# ARG is the $build file name to be converted to w32 format.
-+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
-+# be empty on error (or when ARG is empty)
-+func_convert_core_file_wine_to_w32 ()
-+{
-+ $opt_debug
-+ func_convert_core_file_wine_to_w32_result="$1"
-+ if test -n "$1"; then
-+ # Unfortunately, winepath does not exit with a non-zero error code, so we
-+ # are forced to check the contents of stdout. On the other hand, if the
-+ # command is not found, the shell will set an exit code of 127 and print
-+ # *an error message* to stdout. So we must check for both error code of
-+ # zero AND non-empty stdout, which explains the odd construction:
-+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
-+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
-+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
-+ $SED -e "$lt_sed_naive_backslashify"`
-+ else
-+ func_convert_core_file_wine_to_w32_result=
-+ fi
-+ fi
-+}
-+# end: func_convert_core_file_wine_to_w32
++If any of the ARGS are libtool executable wrappers, then they are translated
++into their corresponding uninstalled binary, and any of their required library
++directories are added to the library path.
+
++Then, COMMAND is executed, with ARGS as arguments."
++ ;;
+
-+# func_convert_core_path_wine_to_w32 ARG
-+# Helper function used by path conversion functions when $build is *nix, and
-+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
-+# configured wine environment available, with the winepath program in $build's
-+# $PATH. Assumes ARG has no leading or trailing path separator characters.
-+#
-+# ARG is path to be converted from $build format to win32.
-+# Result is available in $func_convert_core_path_wine_to_w32_result.
-+# Unconvertible file (directory) names in ARG are skipped; if no directory names
-+# are convertible, then the result may be empty.
-+func_convert_core_path_wine_to_w32 ()
-+{
-+ $opt_debug
-+ # unfortunately, winepath doesn't convert paths, only file names
-+ func_convert_core_path_wine_to_w32_result=""
-+ if test -n "$1"; then
-+ oldIFS=$IFS
-+ IFS=:
-+ for func_convert_core_path_wine_to_w32_f in $1; do
-+ IFS=$oldIFS
-+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
-+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then
-+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
-+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
-+ else
-+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
-+ fi
- fi
-+ done
-+ IFS=$oldIFS
-+ fi
-+}
-+# end: func_convert_core_path_wine_to_w32
++ finish)
++ $ECHO \
++"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
++Complete the installation of libtool libraries.
+
-+# func_cygpath ARGS...
-+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
-+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
-+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
-+# (2), returns the Cygwin file name or path in func_cygpath_result (input
-+# file name or path is assumed to be in w32 format, as previously converted
-+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
-+# or path in func_cygpath_result (input file name or path is assumed to be in
-+# Cygwin format). Returns an empty string on error.
-+#
-+# ARGS are passed to cygpath, with the last one being the file name or path to
-+# be converted.
-+#
-+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
-+# environment variable; do not put it in $PATH.
-+func_cygpath ()
-+{
-+ $opt_debug
-+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
-+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
-+ if test "$?" -ne 0; then
-+ # on failure, ensure result is empty
-+ func_cygpath_result=
-+ fi
-+ else
-+ func_cygpath_result=
-+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
-+ fi
-+}
-+#end: func_cygpath
++Each LIBDIR is a directory that contains libtool libraries.
+
++The commands that this mode executes may require superuser privileges. Use
++the \`--dry-run' option if you just want to see what would be executed."
++ ;;
+
-+# func_convert_core_msys_to_w32 ARG
-+# Convert file name or path ARG from MSYS format to w32 format. Return
-+# result in func_convert_core_msys_to_w32_result.
-+func_convert_core_msys_to_w32 ()
-+{
-+ $opt_debug
-+ # awkward: cmd appends spaces to result
-+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
-+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
-+}
-+#end: func_convert_core_msys_to_w32
++ install)
++ $ECHO \
++"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
++Install executables or libraries.
+
-+# func_convert_file_check ARG1 ARG2
-+# Verify that ARG1 (a file name in $build format) was converted to $host
-+# format in ARG2. Otherwise, emit an error message, but continue (resetting
-+# func_to_host_file_result to ARG1).
-+func_convert_file_check ()
-+{
-+ $opt_debug
-+ if test -z "$2" && test -n "$1" ; then
-+ func_error "Could not determine host file name corresponding to"
-+ func_error " \`$1'"
-+ func_error "Continuing, but uninstalled executables may not work."
-+ # Fallback:
-+ func_to_host_file_result="$1"
-+ fi
-+}
-+# end func_convert_file_check
++INSTALL-COMMAND is the installation command. The first component should be
++either the \`install' or \`cp' program.
+
++The following components of INSTALL-COMMAND are treated specially:
+
-+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
-+# Verify that FROM_PATH (a path in $build format) was converted to $host
-+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
-+# func_to_host_file_result to a simplistic fallback value (see below).
-+func_convert_path_check ()
-+{
-+ $opt_debug
-+ if test -z "$4" && test -n "$3"; then
-+ func_error "Could not determine the host path corresponding to"
-+ func_error " \`$3'"
-+ func_error "Continuing, but uninstalled executables may not work."
-+ # Fallback. This is a deliberately simplistic "conversion" and
-+ # should not be "improved". See libtool.info.
-+ if test "x$1" != "x$2"; then
-+ lt_replace_pathsep_chars="s|$1|$2|g"
-+ func_to_host_path_result=`echo "$3" |
-+ $SED -e "$lt_replace_pathsep_chars"`
-+ else
-+ func_to_host_path_result="$3"
-+ fi
-+ fi
-+}
-+# end func_convert_path_check
++ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
++The rest of the components are interpreted as arguments to that command (only
++BSD-compatible install options are recognized)."
++ ;;
+
-+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
-+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
-+# and appending REPL if ORIG matches BACKPAT.
-+func_convert_path_front_back_pathsep ()
-+{
-+ $opt_debug
-+ case $4 in
-+ $1 ) func_to_host_path_result="$3$func_to_host_path_result"
-+ ;;
-+ esac
-+ case $4 in
-+ $2 ) func_append func_to_host_path_result "$3"
-+ ;;
-+ esac
-+}
-+# end func_convert_path_front_back_pathsep
++ link)
++ $ECHO \
++"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
++Link object files or libraries together to form another library, or to
++create an executable program.
+
-+##################################################
-+# $build to $host FILE NAME CONVERSION FUNCTIONS #
-+##################################################
-+# invoked via `$to_host_file_cmd ARG'
-+#
-+# In each case, ARG is the path to be converted from $build to $host format.
-+# Result will be available in $func_to_host_file_result.
++LINK-COMMAND is a command using the C compiler that you would use to create
++a program from several object files.
+
++The following components of LINK-COMMAND are treated specially:
+
-+# func_to_host_file ARG
-+# Converts the file name ARG from $build format to $host format. Return result
-+# in func_to_host_file_result.
-+func_to_host_file ()
-+{
-+ $opt_debug
-+ $to_host_file_cmd "$1"
-+}
-+# end func_to_host_file
++ -all-static do not do any dynamic linking at all
++ -avoid-version do not add a version suffix if possible
++ -bindir BINDIR specify path to binaries directory (for systems where
++ libraries must be found in the PATH setting at runtime)
++ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
++ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
++ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
++ -export-symbols SYMFILE
++ try to export only the symbols listed in SYMFILE
++ -export-symbols-regex REGEX
++ try to export only the symbols matching REGEX
++ -LLIBDIR search LIBDIR for required installed libraries
++ -lNAME OUTPUT-FILE requires the installed library libNAME
++ -module build a library that can dlopened
++ -no-fast-install disable the fast-install mode
++ -no-install link a not-installable executable
++ -no-undefined declare that a library does not refer to external symbols
++ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
++ -objectlist FILE Use a list of object files found in FILE to specify objects
++ -precious-files-regex REGEX
++ don't remove output files matching REGEX
++ -release RELEASE specify package release information
++ -rpath LIBDIR the created library will eventually be installed in LIBDIR
++ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
++ -shared only do dynamic linking of libtool libraries
++ -shrext SUFFIX override the standard shared library file extension
++ -static do not do any dynamic linking of uninstalled libtool libraries
++ -static-libtool-libs
++ do not do any dynamic linking of libtool libraries
++ -version-info CURRENT[:REVISION[:AGE]]
++ specify library version info [each variable defaults to 0]
++ -weak LIBNAME declare that the target provides the LIBNAME interface
++ -Wc,FLAG
++ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
++ -Wl,FLAG
++ -Xlinker FLAG pass linker-specific FLAG directly to the linker
++ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
+
++All other options (arguments beginning with \`-') are ignored.
+
-+# func_to_tool_file ARG LAZY
-+# converts the file name ARG from $build format to toolchain format. Return
-+# result in func_to_tool_file_result. If the conversion in use is listed
-+# in (the comma separated) LAZY, no conversion takes place.
-+func_to_tool_file ()
-+{
-+ $opt_debug
-+ case ,$2, in
-+ *,"$to_tool_file_cmd",*)
-+ func_to_tool_file_result=$1
- ;;
-- esac
-+ *)
-+ $to_tool_file_cmd "$1"
-+ func_to_tool_file_result=$func_to_host_file_result
-+ ;;
-+ esac
-+}
-+# end func_to_tool_file
++Every other argument is treated as a filename. Files ending in \`.la' are
++treated as uninstalled libtool libraries, other files are standard or library
++object files.
+
++If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
++only library objects (\`.lo' files) may be specified, and \`-rpath' is
++required, except when creating a convenience library.
+
-+# func_convert_file_noop ARG
-+# Copy ARG to func_to_host_file_result.
-+func_convert_file_noop ()
-+{
-+ func_to_host_file_result="$1"
-+}
-+# end func_convert_file_noop
++If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
++using \`ar' and \`ranlib', or on Windows using \`lib'.
+
++If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
++is created, otherwise an executable program is created."
++ ;;
+
-+# func_convert_file_msys_to_w32 ARG
-+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
-+# conversion to w32 is not available inside the cwrapper. Returns result in
-+# func_to_host_file_result.
-+func_convert_file_msys_to_w32 ()
-+{
-+ $opt_debug
-+ func_to_host_file_result="$1"
-+ if test -n "$1"; then
-+ func_convert_core_msys_to_w32 "$1"
-+ func_to_host_file_result="$func_convert_core_msys_to_w32_result"
- fi
-+ func_convert_file_check "$1" "$func_to_host_file_result"
-+}
-+# end func_convert_file_msys_to_w32
-
-- # Only execute mode is allowed to have -dlopen flags.
-- if test -n "$execute_dlfiles" && test "$mode" != execute; then
-- $echo "$modename: unrecognized option \`-dlopen'" 1>&2
-- $echo "$help" 1>&2
-- exit 1
++ uninstall)
++ $ECHO \
++"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
-+# func_convert_file_cygwin_to_w32 ARG
-+# Convert file name ARG from Cygwin to w32 format. Returns result in
-+# func_to_host_file_result.
-+func_convert_file_cygwin_to_w32 ()
-+{
-+ $opt_debug
-+ func_to_host_file_result="$1"
-+ if test -n "$1"; then
-+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
-+ # LT_CYGPATH in this case.
-+ func_to_host_file_result=`cygpath -m "$1"`
- fi
-+ func_convert_file_check "$1" "$func_to_host_file_result"
++Remove libraries from an installation directory.
++
++RM is the name of the program to use to delete files associated with each FILE
++(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
++to RM.
++
++If FILE is a libtool library, all the files associated with it are deleted.
++Otherwise, only FILE itself is deleted using RM."
++ ;;
++
++ *)
++ func_fatal_help "invalid operation mode \`$opt_mode'"
++ ;;
++ esac
++
++ echo
++ $ECHO "Try \`$progname --help' for more information about other modes."
+}
-+# end func_convert_file_cygwin_to_w32
-
-- # Change the help message to a mode-specific one.
-- generic_help="$help"
-- help="Try \`$modename --help --mode=$mode' for more information."
-
-- # These modes are in order of execution frequency so that they run quickly.
-- case $mode in
-- # libtool compile mode
-- compile)
-- modename="$modename: compile"
-- # Get the compilation command and the source file.
-- base_compile=
-- prev=
-- lastarg=
-- srcfile="$nonopt"
-- suppress_output=
-+# func_convert_file_nix_to_w32 ARG
-+# Convert file name ARG from *nix to w32 format. Requires a wine environment
-+# and a working winepath. Returns result in func_to_host_file_result.
-+func_convert_file_nix_to_w32 ()
-+{
-+ $opt_debug
-+ func_to_host_file_result="$1"
-+ if test -n "$1"; then
-+ func_convert_core_file_wine_to_w32 "$1"
-+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
++
++# Now that we've collected a possible --mode arg, show help if necessary
++if $opt_help; then
++ if test "$opt_help" = :; then
++ func_mode_help
++ else
++ {
++ func_help noexit
++ for opt_mode in compile link execute install finish uninstall clean; do
++ func_mode_help
++ done
++ } | sed -n '1p; 2,$s/^Usage:/ or: /p'
++ {
++ func_help noexit
++ for opt_mode in compile link execute install finish uninstall clean; do
++ echo
++ func_mode_help
++ done
++ } |
++ sed '1d
++ /^When reporting/,/^Report/{
++ H
++ d
++ }
++ $x
++ /information about other modes/d
++ /more detailed .*MODE/d
++ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+ fi
-+ func_convert_file_check "$1" "$func_to_host_file_result"
-+}
-+# end func_convert_file_nix_to_w32
-
-- user_target=no
-- for arg
-- do
-- case $prev in
-- "") ;;
-- xcompiler)
-- # Aesthetically quote the previous argument.
-- prev=
-- lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-
-- case $arg in
-- # Double-quote args containing other shell metacharacters.
-- # Many Bourne shells cannot handle close brackets correctly
-- # in scan sets, so we specify it separately.
-- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
-- arg="\"$arg\""
-- ;;
-- esac
-+# func_convert_file_msys_to_cygwin ARG
-+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
-+# Returns result in func_to_host_file_result.
-+func_convert_file_msys_to_cygwin ()
++ exit $?
++fi
++
++
++# func_mode_execute arg...
++func_mode_execute ()
+{
-+ $opt_debug
-+ func_to_host_file_result="$1"
-+ if test -n "$1"; then
-+ func_convert_core_msys_to_w32 "$1"
-+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
-+ func_to_host_file_result="$func_cygpath_result"
-+ fi
-+ func_convert_file_check "$1" "$func_to_host_file_result"
-+}
-+# end func_convert_file_msys_to_cygwin
-
-- # Add the previous argument to base_compile.
-- if test -z "$base_compile"; then
-- base_compile="$lastarg"
-- else
-- base_compile="$base_compile $lastarg"
-- fi
-- continue
-- ;;
-- esac
-
-- # Accept any command-line options.
-- case $arg in
-- -o)
-- if test "$user_target" != "no"; then
-- $echo "$modename: you cannot specify \`-o' more than once" 1>&2
-- exit 1
-- fi
-- user_target=next
-- ;;
-+# func_convert_file_nix_to_cygwin ARG
-+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
-+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
-+# in func_to_host_file_result.
-+func_convert_file_nix_to_cygwin ()
-+{
-+ $opt_debug
-+ func_to_host_file_result="$1"
-+ if test -n "$1"; then
-+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
-+ func_convert_core_file_wine_to_w32 "$1"
-+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
-+ func_to_host_file_result="$func_cygpath_result"
-+ fi
-+ func_convert_file_check "$1" "$func_to_host_file_result"
-+}
-+# end func_convert_file_nix_to_cygwin
-
-- -static)
-- build_old_libs=yes
-- continue
-- ;;
-
-- -prefer-pic)
-- pic_mode=yes
-- continue
-- ;;
-+#############################################
-+# $build to $host PATH CONVERSION FUNCTIONS #
-+#############################################
-+# invoked via `$to_host_path_cmd ARG'
-+#
-+# In each case, ARG is the path to be converted from $build to $host format.
-+# The result will be available in $func_to_host_path_result.
-+#
-+# Path separators are also converted from $build format to $host format. If
-+# ARG begins or ends with a path separator character, it is preserved (but
-+# converted to $host format) on output.
-+#
-+# All path conversion functions are named using the following convention:
-+# file name conversion function : func_convert_file_X_to_Y ()
-+# path conversion function : func_convert_path_X_to_Y ()
-+# where, for any given $build/$host combination the 'X_to_Y' value is the
-+# same. If conversion functions are added for new $build/$host combinations,
-+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
-+# will break.
-
-- -prefer-non-pic)
-- pic_mode=no
-- continue
-- ;;
-
-- -Xcompiler)
-- prev=xcompiler
-- continue
-- ;;
-+# func_init_to_host_path_cmd
-+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
-+# appropriate value, based on the value of $to_host_file_cmd.
-+to_host_path_cmd=
-+func_init_to_host_path_cmd ()
-+{
-+ $opt_debug
-+ if test -z "$to_host_path_cmd"; then
-+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
-+ to_host_path_cmd="func_convert_path_${func_stripname_result}"
-+ fi
-+}
-
-- -Wc,*)
-- args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
-- lastarg=
-- IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
-- for arg in $args; do
-- IFS="$save_ifs"
-
-- # Double-quote args containing other shell metacharacters.
-- # Many Bourne shells cannot handle close brackets correctly
-- # in scan sets, so we specify it separately.
-- case $arg in
-- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
-- arg="\"$arg\""
-- ;;
-- esac
-- lastarg="$lastarg $arg"
-- done
-- IFS="$save_ifs"
-- lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
-+# func_to_host_path ARG
-+# Converts the path ARG from $build format to $host format. Return result
-+# in func_to_host_path_result.
-+func_to_host_path ()
-+{
-+ $opt_debug
-+ func_init_to_host_path_cmd
-+ $to_host_path_cmd "$1"
-+}
-+# end func_to_host_path
-
-- # Add the arguments to base_compile.
-- if test -z "$base_compile"; then
-- base_compile="$lastarg"
-- else
-- base_compile="$base_compile $lastarg"
-- fi
-- continue
-- ;;
-- esac
-
-- case $user_target in
-- next)
-- # The next one is the -o target name
-- user_target=yes
-- continue
-+# func_convert_path_noop ARG
-+# Copy ARG to func_to_host_path_result.
-+func_convert_path_noop ()
-+{
-+ func_to_host_path_result="$1"
-+}
-+# end func_convert_path_noop
-+
++ $opt_debug
++ # The first argument is the command name.
++ cmd="$nonopt"
++ test -z "$cmd" && \
++ func_fatal_help "you must specify a COMMAND"
+
-+# func_convert_path_msys_to_w32 ARG
-+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
-+# conversion to w32 is not available inside the cwrapper. Returns result in
-+# func_to_host_path_result.
-+func_convert_path_msys_to_w32 ()
-+{
-+ $opt_debug
-+ func_to_host_path_result="$1"
-+ if test -n "$1"; then
-+ # Remove leading and trailing path separator characters from ARG. MSYS
-+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
-+ # and winepath ignores them completely.
-+ func_stripname : : "$1"
-+ func_to_host_path_tmp1=$func_stripname_result
-+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
-+ func_to_host_path_result="$func_convert_core_msys_to_w32_result"
-+ func_convert_path_check : ";" \
-+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
-+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
-+ fi
-+}
-+# end func_convert_path_msys_to_w32
++ # Handle -dlopen flags immediately.
++ for file in $opt_dlopen; do
++ test -f "$file" \
++ || func_fatal_help "\`$file' is not a file"
+
++ dir=
++ case $file in
++ *.la)
++ func_resolve_sysroot "$file"
++ file=$func_resolve_sysroot_result
+
-+# func_convert_path_cygwin_to_w32 ARG
-+# Convert path ARG from Cygwin to w32 format. Returns result in
-+# func_to_host_file_result.
-+func_convert_path_cygwin_to_w32 ()
-+{
-+ $opt_debug
-+ func_to_host_path_result="$1"
-+ if test -n "$1"; then
-+ # See func_convert_path_msys_to_w32:
-+ func_stripname : : "$1"
-+ func_to_host_path_tmp1=$func_stripname_result
-+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
-+ func_convert_path_check : ";" \
-+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
-+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
-+ fi
-+}
-+# end func_convert_path_cygwin_to_w32
++ # Check to see that this really is a libtool archive.
++ func_lalib_unsafe_p "$file" \
++ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
++ # Read the libtool library.
++ dlname=
++ library_names=
++ func_source "$file"
+
-+# func_convert_path_nix_to_w32 ARG
-+# Convert path ARG from *nix to w32 format. Requires a wine environment and
-+# a working winepath. Returns result in func_to_host_file_result.
-+func_convert_path_nix_to_w32 ()
-+{
-+ $opt_debug
-+ func_to_host_path_result="$1"
-+ if test -n "$1"; then
-+ # See func_convert_path_msys_to_w32:
-+ func_stripname : : "$1"
-+ func_to_host_path_tmp1=$func_stripname_result
-+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
-+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
-+ func_convert_path_check : ";" \
-+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
-+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
-+ fi
-+}
-+# end func_convert_path_nix_to_w32
++ # Skip this library if it cannot be dlopened.
++ if test -z "$dlname"; then
++ # Warn if it was a shared library.
++ test -n "$library_names" && \
++ func_warning "\`$file' was not linked with \`-export-dynamic'"
++ continue
++ fi
+
++ func_dirname "$file" "" "."
++ dir="$func_dirname_result"
+
-+# func_convert_path_msys_to_cygwin ARG
-+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
-+# Returns result in func_to_host_file_result.
-+func_convert_path_msys_to_cygwin ()
-+{
-+ $opt_debug
-+ func_to_host_path_result="$1"
-+ if test -n "$1"; then
-+ # See func_convert_path_msys_to_w32:
-+ func_stripname : : "$1"
-+ func_to_host_path_tmp1=$func_stripname_result
-+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
-+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
-+ func_to_host_path_result="$func_cygpath_result"
-+ func_convert_path_check : : \
-+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
-+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
-+ fi
-+}
-+# end func_convert_path_msys_to_cygwin
++ if test -f "$dir/$objdir/$dlname"; then
++ func_append dir "/$objdir"
+ else
+- error=$?
+- $run $rm $removelist
+- exit $error
++ if test ! -f "$dir/$dlname"; then
++ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
++ fi
+ fi
++ ;;
+
++ *.lo)
++ # Just add the directory containing the .lo file.
++ func_dirname "$file" "" "."
++ dir="$func_dirname_result"
++ ;;
+
-+# func_convert_path_nix_to_cygwin ARG
-+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
-+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
-+# func_to_host_file_result.
-+func_convert_path_nix_to_cygwin ()
-+{
-+ $opt_debug
-+ func_to_host_path_result="$1"
-+ if test -n "$1"; then
-+ # Remove leading and trailing path separator characters from
-+ # ARG. msys behavior is inconsistent here, cygpath turns them
-+ # into '.;' and ';.', and winepath ignores them completely.
-+ func_stripname : : "$1"
-+ func_to_host_path_tmp1=$func_stripname_result
-+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
-+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
-+ func_to_host_path_result="$func_cygpath_result"
-+ func_convert_path_check : : \
-+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
-+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
-+ fi
++ *)
++ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
++ continue
++ ;;
++ esac
++
++ # Get the absolute pathname.
++ absdir=`cd "$dir" && pwd`
++ test -n "$absdir" && dir="$absdir"
++
++ # Now add the directory to shlibpath_var.
++ if eval "test -z \"\$$shlibpath_var\""; then
++ eval "$shlibpath_var=\"\$dir\""
++ else
++ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
++ done
+
+- # Append the name of the non-PIC object the libtool object file.
+- # Only append if the libtool object file exists.
+- test -z "$run" && cat >> ${libobj}T <<EOF
+-# Name of the non-PIC object.
+-non_pic_object='$objname'
++ # This variable tells wrapper scripts just to set shlibpath_var
++ # rather than running their programs.
++ libtool_execute_magic="$magic"
+
+-EOF
++ # Check if any of the arguments is a wrapper script.
++ args=
++ for file
++ do
++ case $file in
++ -* | *.la | *.lo ) ;;
++ *)
++ # Do a test to see if this is really a libtool program.
++ if func_ltwrapper_script_p "$file"; then
++ func_source "$file"
++ # Transform arg to wrapped name.
++ file="$progdir/$program"
++ elif func_ltwrapper_executable_p "$file"; then
++ func_ltwrapper_scriptname "$file"
++ func_source "$func_ltwrapper_scriptname_result"
++ # Transform arg to wrapped name.
++ file="$progdir/$program"
++ fi
++ ;;
++ esac
++ # Quote arguments (to preserve shell metacharacters).
++ func_append_quoted args "$file"
++ done
++
++ if test "X$opt_dry_run" = Xfalse; then
++ if test -n "$shlibpath_var"; then
++ # Export the shlibpath_var.
++ eval "export $shlibpath_var"
++ fi
++
++ # Restore saved environment variables
++ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
++ do
++ eval "if test \"\${save_$lt_var+set}\" = set; then
++ $lt_var=\$save_$lt_var; export $lt_var
++ else
++ $lt_unset $lt_var
++ fi"
++ done
++
++ # Now prepare to actually exec the command.
++ exec_cmd="\$cmd$args"
+ else
+- # Append the name of the non-PIC object the libtool object file.
+- # Only append if the libtool object file exists.
+- test -z "$run" && cat >> ${libobj}T <<EOF
+-# Name of the non-PIC object.
+-non_pic_object=none
++ # Display what would be done.
++ if test -n "$shlibpath_var"; then
++ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
++ echo "export $shlibpath_var"
++ fi
++ $ECHO "$cmd$args"
++ exit $EXIT_SUCCESS
++ fi
+}
-+# end func_convert_path_nix_to_cygwin
+
+-EOF
++test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+
+
-+# func_mode_compile arg...
-+func_mode_compile ()
++# func_mode_finish arg...
++func_mode_finish ()
+{
+ $opt_debug
-+ # Get the compilation command and the source file.
-+ base_compile=
-+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
-+ suppress_opt=yes
-+ suppress_output=
-+ arg_mode=normal
-+ libobj=
-+ later=
-+ pie_flag=
++ libs=
++ libdirs=
++ admincmds=
+
-+ for arg
++ for opt in "$nonopt" ${1+"$@"}
+ do
-+ case $arg_mode in
-+ arg )
-+ # do not "continue". Instead, add this to base_compile
-+ lastarg="$arg"
-+ arg_mode=normal
- ;;
-- yes)
-- # We got the output file
-- user_target=set
-+
-+ target )
- libobj="$arg"
-+ arg_mode=normal
- continue
- ;;
-- esac
-
-- # Accept the current argument as the source file.
-- lastarg="$srcfile"
-- srcfile="$arg"
-+ normal )
-+ # Accept any command-line options.
-+ case $arg in
-+ -o)
-+ test -n "$libobj" && \
-+ func_fatal_error "you cannot specify \`-o' more than once"
-+ arg_mode=target
-+ continue
-+ ;;
-
-- # Aesthetically quote the previous argument.
-+ -pie | -fpie | -fPIE)
-+ func_append pie_flag " $arg"
-+ continue
-+ ;;
-
-- # Backslashify any backslashes, double quotes, and dollar signs.
-- # These are the only characters that are still specially
-- # interpreted inside of double-quoted scrings.
-- lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
-+ -shared | -static | -prefer-pic | -prefer-non-pic)
-+ func_append later " $arg"
-+ continue
-+ ;;
-
-- # Double-quote args containing other shell metacharacters.
-- # Many Bourne shells cannot handle close brackets correctly
-- # in scan sets, so we specify it separately.
-- case $lastarg in
-- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
-- lastarg="\"$lastarg\""
-+ -no-suppress)
-+ suppress_opt=no
-+ continue
-+ ;;
++ if test -d "$opt"; then
++ func_append libdirs " $opt"
+
-+ -Xcompiler)
-+ arg_mode=arg # the next one goes into the "base_compile" arg list
-+ continue # The current "srcfile" will either be retained or
-+ ;; # replaced later. I would guess that would be a bug.
++ elif test -f "$opt"; then
++ if func_lalib_unsafe_p "$opt"; then
++ func_append libs " $opt"
++ else
++ func_warning "\`$opt' is not a valid libtool archive"
++ fi
+
-+ -Wc,*)
-+ func_stripname '-Wc,' '' "$arg"
-+ args=$func_stripname_result
-+ lastarg=
-+ save_ifs="$IFS"; IFS=','
-+ for arg in $args; do
-+ IFS="$save_ifs"
-+ func_append_quoted lastarg "$arg"
-+ done
-+ IFS="$save_ifs"
-+ func_stripname ' ' '' "$lastarg"
-+ lastarg=$func_stripname_result
++ else
++ func_fatal_error "invalid argument \`$opt'"
++ fi
++ done
+
-+ # Add the arguments to base_compile.
-+ func_append base_compile " $lastarg"
-+ continue
-+ ;;
++ if test -n "$libs"; then
++ if test -n "$lt_sysroot"; then
++ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
++ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
++ else
++ sysroot_cmd=
++ fi
+
-+ *)
-+ # Accept the current argument as the source file.
-+ # The previous "srcfile" becomes the current argument.
-+ #
-+ lastarg="$srcfile"
-+ srcfile="$arg"
-+ ;;
-+ esac # case $arg
- ;;
-- esac
-+ esac # case $arg_mode
++ # Remove sysroot references
++ if $opt_dry_run; then
++ for lib in $libs; do
++ echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
++ done
++ else
++ tmpdir=`func_mktempdir`
++ for lib in $libs; do
++ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
++ > $tmpdir/tmp-la
++ mv -f $tmpdir/tmp-la $lib
++ done
++ ${RM}r "$tmpdir"
++ fi
+ fi
-- # Add the previous argument to base_compile.
-- if test -z "$base_compile"; then
-- base_compile="$lastarg"
-- else
-- base_compile="$base_compile $lastarg"
-- fi
-- done
-+ # Aesthetically quote the previous argument.
-+ func_append_quoted base_compile "$lastarg"
-+ done # for arg
-
-- case $user_target in
-- set)
-+ case $arg_mode in
-+ arg)
-+ func_fatal_error "you must specify an argument for -Xcompile"
- ;;
-- no)
-- # Get the name of the library object.
-- libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
-+ target)
-+ func_fatal_error "you must specify a target with \`-o'"
- ;;
- *)
-- $echo "$modename: you must specify a target with \`-o'" 1>&2
-- exit 1
-+ # Get the name of the library object.
-+ test -z "$libobj" && {
-+ func_basename "$srcfile"
-+ libobj="$func_basename_result"
-+ }
- ;;
- esac
-
- # Recognize several different file suffixes.
- # If the user specifies -o file.o, it is replaced with file.lo
-- xform='[cCFSfmso]'
- case $libobj in
-- *.ada) xform=ada ;;
-- *.adb) xform=adb ;;
-- *.ads) xform=ads ;;
-- *.asm) xform=asm ;;
-- *.c++) xform=c++ ;;
-- *.cc) xform=cc ;;
-- *.class) xform=class ;;
-- *.cpp) xform=cpp ;;
-- *.cxx) xform=cxx ;;
-- *.f90) xform=f90 ;;
-- *.for) xform=for ;;
-- *.java) xform=java ;;
-+ *.[cCFSifmso] | \
-+ *.ada | *.adb | *.ads | *.asm | \
-+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
-+ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
-+ func_xform "$libobj"
-+ libobj=$func_xform_result
-+ ;;
- esac
+- $run $mv "${libobj}T" "${libobj}"
++ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
++ for libdir in $libdirs; do
++ if test -n "$finish_cmds"; then
++ # Do each command in the finish commands.
++ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
++'"$cmd"'"'
++ fi
++ if test -n "$finish_eval"; then
++ # Do the single finish_eval.
++ eval cmds=\"$finish_eval\"
++ $opt_dry_run || eval "$cmds" || func_append admincmds "
++ $cmds"
++ fi
++ done
++ fi
-- libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
--
- case $libobj in
-- *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
-+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
- *)
-- $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
-- exit 1
-+ func_fatal_error "cannot determine name of library object from \`$libobj'"
- ;;
- esac
+- # Unlock the critical section if it was locked
+- if test "$need_locks" != no; then
+- $run $rm "$lockfile"
++ # Exit here if they wanted silent mode.
++ $opt_silent && exit $EXIT_SUCCESS
++
++ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
++ echo "----------------------------------------------------------------------"
++ echo "Libraries have been installed in:"
++ for libdir in $libdirs; do
++ $ECHO " $libdir"
++ done
++ echo
++ echo "If you ever happen to want to link against installed libraries"
++ echo "in a given directory, LIBDIR, you must either use libtool, and"
++ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
++ echo "flag during linking and do at least one of the following:"
++ if test -n "$shlibpath_var"; then
++ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
++ echo " during execution"
++ fi
++ if test -n "$runpath_var"; then
++ echo " - add LIBDIR to the \`$runpath_var' environment variable"
++ echo " during linking"
++ fi
++ if test -n "$hardcode_libdir_flag_spec"; then
++ libdir=LIBDIR
++ eval flag=\"$hardcode_libdir_flag_spec\"
++
++ $ECHO " - use the \`$flag' linker flag"
++ fi
++ if test -n "$admincmds"; then
++ $ECHO " - have your system administrator run these commands:$admincmds"
++ fi
++ if test -f /etc/ld.so.conf; then
++ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
++ fi
++ echo
++
++ echo "See any operating system documentation about shared libraries for"
++ case $host in
++ solaris2.[6789]|solaris2.1[0-9])
++ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
++ echo "pages."
++ ;;
++ *)
++ echo "more information, such as the ld(1) and ld.so(8) manual pages."
++ ;;
++ esac
++ echo "----------------------------------------------------------------------"
+ fi
++ exit $EXIT_SUCCESS
++}
-- # Infer tagged configuration to use if any are available and
-- # if one wasn't chosen via the "--tag" command line option.
-- # Only attempt this if the compiler in the base compile
-- # command doesn't match the default compiler.
-- if test -n "$available_tags" && test -z "$tagname"; then
-- case $base_compile in
-- "$CC "*) ;;
-- # Blanks in the command may have been stripped by the calling shell,
-- # but not from the CC environment variable when ltconfig was run.
-- "`$echo $CC` "*) ;;
-- *)
-- for z in $available_tags; do
-- if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
-- # Evaluate the configuration.
-- eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
-- case $base_compile in
-- "$CC "*)
-- # The compiler in the base compile command matches
-- # the one in the tagged configuration.
-- # Assume this is the tagged configuration we want.
-- tagname=$z
-- break
-- ;;
-- "`$echo $CC` "*)
-- tagname=$z
-- break
-- ;;
-- esac
-- fi
-- done
-- # If $tagname still isn't set, then no tagged configuration
-- # was found and let the user know that the "--tag" command
-- # line option must be used.
-- if test -z "$tagname"; then
-- echo "$modename: unable to infer tagged configuration"
-- echo "$modename: specify a tag with \`--tag'" 1>&2
-- exit 1
--# else
--# echo "$modename: using $tagname tagged configuration"
-- fi
-+ func_infer_tag $base_compile
+- exit 0
++test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
+
-+ for arg in $later; do
-+ case $arg in
-+ -shared)
-+ test "$build_libtool_libs" != yes && \
-+ func_fatal_configuration "can not build a shared library"
-+ build_old_libs=no
-+ continue
-+ ;;
+
-+ -static)
-+ build_libtool_libs=no
-+ build_old_libs=yes
-+ continue
-+ ;;
++# func_mode_install arg...
++func_mode_install ()
++{
++ $opt_debug
++ # There may be an optional sh(1) argument at the beginning of
++ # install_prog (especially on Windows NT).
++ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
++ # Allow the use of GNU shtool's install command.
++ case $nonopt in *shtool*) :;; *) false;; esac; then
++ # Aesthetically quote it.
++ func_quote_for_eval "$nonopt"
++ install_prog="$func_quote_for_eval_result "
++ arg=$1
++ shift
++ else
++ install_prog=
++ arg=$nonopt
++ fi
+
-+ -prefer-pic)
-+ pic_mode=yes
++ # The real first argument should be the name of the installation program.
++ # Aesthetically quote it.
++ func_quote_for_eval "$arg"
++ func_append install_prog "$func_quote_for_eval_result"
++ install_shared_prog=$install_prog
++ case " $install_prog " in
++ *[\\\ /]cp\ *) install_cp=: ;;
++ *) install_cp=false ;;
++ esac
++
++ # We need to accept at least all the BSD install flags.
++ dest=
++ files=
++ opts=
++ prev=
++ install_type=
++ isdir=no
++ stripme=
++ no_mode=:
++ for arg
++ do
++ arg2=
++ if test -n "$dest"; then
++ func_append files " $dest"
++ dest=$arg
+ continue
-+ ;;
++ fi
+
-+ -prefer-non-pic)
-+ pic_mode=no
++ case $arg in
++ -d) isdir=yes ;;
++ -f)
++ if $install_cp; then :; else
++ prev=$arg
++ fi
++ ;;
++ -g | -m | -o)
++ prev=$arg
++ ;;
++ -s)
++ stripme=" -s"
+ continue
- ;;
- esac
-- fi
-+ done
-
-- objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
-- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
-- if test "X$xdir" = "X$obj"; then
-- xdir=
-- else
-- xdir=$xdir/
-- fi
-+ func_quote_for_eval "$libobj"
-+ test "X$libobj" != "X$func_quote_for_eval_result" \
-+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
-+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
-+ func_dirname_and_basename "$obj" "/" ""
-+ objname="$func_basename_result"
-+ xdir="$func_dirname_result"
- lobj=${xdir}$objdir/$objname
-
-- if test -z "$base_compile"; then
-- $echo "$modename: you must specify a compilation command" 1>&2
-- $echo "$help" 1>&2
-- exit 1
-- fi
-+ test -z "$base_compile" && \
-+ func_fatal_help "you must specify a compilation command"
-
- # Delete any leftover library objects.
- if test "$build_old_libs" = yes; then
-@@ -556,16 +2120,13 @@
- removelist="$lobj $libobj ${libobj}T"
- fi
-
-- $run $rm $removelist
-- trap "$run $rm $removelist; exit 1" 1 2 15
--
- # On Cygwin there's no "real" PIC flag so we must build both object types
- case $host_os in
-- cygwin* | mingw* | pw32* | os2*)
-+ cygwin* | mingw* | pw32* | os2* | cegcc*)
- pic_mode=default
- ;;
- esac
-- if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
-+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
- # non-PIC code in shared libraries is not supported
- pic_mode=default
- fi
-@@ -573,10 +2134,8 @@
- # Calculate the filename of the output object if compiler does
- # not support -o with -c
- if test "$compiler_c_o" = no; then
-- output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
-+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
- lockfile="$output_obj.lock"
-- removelist="$removelist $output_obj $lockfile"
-- trap "$run $rm $removelist; exit 1" 1 2 15
- else
- output_obj=
- need_locks=no
-@@ -586,13 +2145,13 @@
- # Lock this critical section if it is needed
- # We use this script file to make the link, it avoids creating a new file
- if test "$need_locks" = yes; then
-- until $run ln "$0" "$lockfile" 2>/dev/null; do
-- $show "Waiting for $lockfile to be removed"
-+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
-+ func_echo "Waiting for $lockfile to be removed"
- sleep 2
- done
- elif test "$need_locks" = warn; then
- if test -f "$lockfile"; then
-- echo "\
-+ $ECHO "\
- *** ERROR, $lockfile exists and contains:
- `cat $lockfile 2>/dev/null`
-
-@@ -603,29 +2162,21 @@
- avoid parallel builds (make -j) in this platform, or get a better
- compiler."
-
-- $run $rm $removelist
-- exit 1
-+ $opt_dry_run || $RM $removelist
-+ exit $EXIT_FAILURE
- fi
-- echo $srcfile > "$lockfile"
-- fi
--
-- if test -n "$fix_srcfile_path"; then
-- eval srcfile=\"$fix_srcfile_path\"
-+ func_append removelist " $output_obj"
-+ $ECHO "$srcfile" > "$lockfile"
- fi
-
-- $run $rm "$libobj" "${libobj}T"
--
-- # Create a libtool object file (analogous to a ".la" file),
-- # but don't create it if we're doing a dry run.
-- test -z "$run" && cat > ${libobj}T <<EOF
--# $libobj - a libtool object file
--# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
--#
--# Please DO NOT delete this file!
--# It is necessary for linking the library.
-+ $opt_dry_run || $RM $removelist
-+ func_append removelist " $lockfile"
-+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
-
--# Name of the PIC object.
--EOF
-+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
-+ srcfile=$func_to_tool_file_result
-+ func_quote_for_eval "$srcfile"
-+ qsrcfile=$func_quote_for_eval_result
-
- # Only build a PIC object if we are building libtool libraries.
- if test "$build_libtool_libs" = yes; then
-@@ -633,38 +2184,25 @@
- fbsd_hideous_sh_bug=$base_compile
-
- if test "$pic_mode" != no; then
-- command="$base_compile $srcfile $pic_flag"
-+ command="$base_compile $qsrcfile $pic_flag"
- else
- # Don't build PIC code
-- command="$base_compile $srcfile"
-+ command="$base_compile $qsrcfile"
- fi
-
-- if test ! -d ${xdir}$objdir; then
-- $show "$mkdir ${xdir}$objdir"
-- $run $mkdir ${xdir}$objdir
-- status=$?
-- if test $status -ne 0 && test ! -d ${xdir}$objdir; then
-- exit $status
-- fi
-- fi
-+ func_mkdir_p "$xdir$objdir"
-
- if test -z "$output_obj"; then
-- # Place PIC objects in $objdir
-- command="$command -o $lobj"
-+ # Place PIC objects in $objdir
-+ func_append command " -o $lobj"
- fi
-
-- $run $rm "$lobj" "$output_obj"
--
-- $show "$command"
-- if $run eval "$command"; then :
-- else
-- test -n "$output_obj" && $run $rm $removelist
-- exit 1
-- fi
-+ func_show_eval_locale "$command" \
-+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
-
- if test "$need_locks" = warn &&
-- test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
-- echo "\
-+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-+ $ECHO "\
- *** ERROR, $lockfile contains:
- `cat $lockfile 2>/dev/null`
-
-@@ -678,63 +2216,42 @@
- avoid parallel builds (make -j) in this platform, or get a better
- compiler."
-
-- $run $rm $removelist
-- exit 1
-+ $opt_dry_run || $RM $removelist
-+ exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed, then go on to compile the next one
-- if test -n "$output_obj" && test "x$output_obj" != "x$lobj"; then
-- $show "$mv $output_obj $lobj"
-- if $run $mv $output_obj $lobj; then :
-- else
-- error=$?
-- $run $rm $removelist
-- exit $error
-- fi
-+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
-+ func_show_eval '$MV "$output_obj" "$lobj"' \
-+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
- fi
-
-- # Append the name of the PIC object to the libtool object file.
-- test -z "$run" && cat >> ${libobj}T <<EOF
--pic_object='$objdir/$objname'
--
--EOF
--
- # Allow error messages only from the first compilation.
-- suppress_output=' >/dev/null 2>&1'
-- else
-- # No PIC object so indicate it doesn't exist in the libtool
-- # object file.
-- test -z "$run" && cat >> ${libobj}T <<EOF
--pic_object=none
--
--EOF
-+ if test "$suppress_opt" = yes; then
-+ suppress_output=' >/dev/null 2>&1'
++ ;;
++ -*)
++ ;;
++ *)
++ # If the previous option needed an argument, then skip it.
++ if test -n "$prev"; then
++ if test "x$prev" = x-m && test -n "$install_override_mode"; then
++ arg2=$install_override_mode
++ no_mode=false
++ fi
++ prev=
++ else
++ dest=$arg
++ continue
++ fi
++ ;;
++ esac
++
++ # Aesthetically quote the argument.
++ func_quote_for_eval "$arg"
++ func_append install_prog " $func_quote_for_eval_result"
++ if test -n "$arg2"; then
++ func_quote_for_eval "$arg2"
+ fi
- fi
-
- # Only build a position-dependent object if we build old libraries.
- if test "$build_old_libs" = yes; then
- if test "$pic_mode" != yes; then
- # Don't build PIC code
-- command="$base_compile $srcfile"
-+ command="$base_compile $qsrcfile$pie_flag"
- else
-- command="$base_compile $srcfile $pic_flag"
-+ command="$base_compile $qsrcfile $pic_flag"
- fi
- if test "$compiler_c_o" = yes; then
-- command="$command -o $obj"
-+ func_append command " -o $obj"
- fi
-
- # Suppress compiler output if we already did a PIC compilation.
-- command="$command$suppress_output"
-- $run $rm "$obj" "$output_obj"
-- $show "$command"
-- if $run eval "$command"; then :
-- else
-- $run $rm $removelist
-- exit 1
-- fi
-+ func_append command "$suppress_output"
-+ func_show_eval_locale "$command" \
-+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
-
- if test "$need_locks" = warn &&
-- test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
-- echo "\
-+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-+ $ECHO "\
- *** ERROR, $lockfile contains:
- `cat $lockfile 2>/dev/null`
-
-@@ -748,57 +2265,2828 @@
- avoid parallel builds (make -j) in this platform, or get a better
- compiler."
-
-- $run $rm $removelist
-- exit 1
-+ $opt_dry_run || $RM $removelist
-+ exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed
-- if test -n "$output_obj" && test "x$output_obj" != "x$obj"; then
-- $show "$mv $output_obj $obj"
-- if $run $mv $output_obj $obj; then :
-+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
-+ func_show_eval '$MV "$output_obj" "$obj"' \
-+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
-+ fi
-+ fi
-+
-+ $opt_dry_run || {
-+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
++ func_append install_shared_prog " $func_quote_for_eval_result"
++ done
+
-+ # Unlock the critical section if it was locked
-+ if test "$need_locks" != no; then
-+ removelist=$lockfile
-+ $RM "$lockfile"
-+ fi
-+ }
++ test -z "$install_prog" && \
++ func_fatal_help "you must specify an install program"
+
-+ exit $EXIT_SUCCESS
-+}
++ test -n "$prev" && \
++ func_fatal_help "the \`$prev' option requires an argument"
+
-+$opt_help || {
-+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
-+}
++ if test -n "$install_override_mode" && $no_mode; then
++ if $install_cp; then :; else
++ func_quote_for_eval "$install_override_mode"
++ func_append install_shared_prog " -m $func_quote_for_eval_result"
++ fi
++ fi
+
-+func_mode_help ()
-+{
-+ # We need to display help for each of the modes.
-+ case $opt_mode in
-+ "")
-+ # Generic help is extracted from the usage comments
-+ # at the start of this file.
-+ func_help
-+ ;;
++ if test -z "$files"; then
++ if test -z "$dest"; then
++ func_fatal_help "no file or destination specified"
++ else
++ func_fatal_help "you must specify a destination"
++ fi
++ fi
+
-+ clean)
-+ $ECHO \
-+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
++ # Strip any trailing slash from the destination.
++ func_stripname '' '/' "$dest"
++ dest=$func_stripname_result
+
-+Remove files from the build directory.
++ # Check to see that the destination is a directory.
++ test -d "$dest" && isdir=yes
++ if test "$isdir" = yes; then
++ destdir="$dest"
++ destname=
++ else
++ func_dirname_and_basename "$dest" "" "."
++ destdir="$func_dirname_result"
++ destname="$func_basename_result"
+
-+RM is the name of the program to use to delete files associated with each FILE
-+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-+to RM.
++ # Not a directory, so check to see that there is only one file specified.
++ set dummy $files; shift
++ test "$#" -gt 1 && \
++ func_fatal_help "\`$dest' is not a directory"
++ fi
++ case $destdir in
++ [\\/]* | [A-Za-z]:[\\/]*) ;;
++ *)
++ for file in $files; do
++ case $file in
++ *.lo) ;;
++ *)
++ func_fatal_help "\`$destdir' must be an absolute directory name"
++ ;;
++ esac
++ done
++ ;;
++ esac
+
-+If FILE is a libtool library, object or program, all the files associated
-+with it are deleted. Otherwise, only FILE itself is deleted using RM."
-+ ;;
++ # This variable tells wrapper scripts just to set variables rather
++ # than running their programs.
++ libtool_install_magic="$magic"
+
-+ compile)
-+ $ECHO \
-+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
++ staticlibs=
++ future_libdirs=
++ current_libdirs=
++ for file in $files; do
+
-+Compile a source file into a libtool library object.
++ # Do each installation.
++ case $file in
++ *.$libext)
++ # Do the static libraries later.
++ func_append staticlibs " $file"
++ ;;
+
-+This mode accepts the following additional options:
++ *.la)
++ func_resolve_sysroot "$file"
++ file=$func_resolve_sysroot_result
+
-+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
-+ -no-suppress do not suppress compiler output for multiple passes
-+ -prefer-pic try to build PIC objects only
-+ -prefer-non-pic try to build non-PIC objects only
-+ -shared do not build a \`.o' file suitable for static linking
-+ -static only build a \`.o' file suitable for static linking
-+ -Wc,FLAG pass FLAG directly to the compiler
++ # Check to see that this really is a libtool archive.
++ func_lalib_unsafe_p "$file" \
++ || func_fatal_help "\`$file' is not a valid libtool archive"
+
-+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-+from the given SOURCEFILE.
++ library_names=
++ old_library=
++ relink_command=
++ func_source "$file"
+
-+The output file name is determined by removing the directory component from
-+SOURCEFILE, then substituting the C source code suffix \`.c' with the
-+library object suffix, \`.lo'."
-+ ;;
++ # Add the libdir to current_libdirs if it is the destination.
++ if test "X$destdir" = "X$libdir"; then
++ case "$current_libdirs " in
++ *" $libdir "*) ;;
++ *) func_append current_libdirs " $libdir" ;;
++ esac
++ else
++ # Note the libdir as a future libdir.
++ case "$future_libdirs " in
++ *" $libdir "*) ;;
++ *) func_append future_libdirs " $libdir" ;;
++ esac
++ fi
+
-+ execute)
-+ $ECHO \
-+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
++ func_dirname "$file" "/" ""
++ dir="$func_dirname_result"
++ func_append dir "$objdir"
+
-+Automatically set library path, then run a program.
++ if test -n "$relink_command"; then
++ # Determine the prefix the user has applied to our future dir.
++ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
-+This mode accepts the following additional options:
++ # Don't allow the user to place us outside of our expected
++ # location b/c this prevents finding dependent libraries that
++ # are installed to the same prefix.
++ # At present, this check doesn't affect windows .dll's that
++ # are installed into $libdir/../bin (currently, that works fine)
++ # but it's something to keep an eye on.
++ test "$inst_prefix_dir" = "$destdir" && \
++ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
-+ -dlopen FILE add the directory containing FILE to the library path
++ if test -n "$inst_prefix_dir"; then
++ # Stick the inst_prefix_dir data into the link command.
++ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
++ else
++ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
++ fi
+
-+This mode sets the library path environment variable according to \`-dlopen'
-+flags.
++ func_warning "relinking \`$file'"
++ func_show_eval "$relink_command" \
++ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
++ fi
+
-+If any of the ARGS are libtool executable wrappers, then they are translated
-+into their corresponding uninstalled binary, and any of their required library
-+directories are added to the library path.
++ # See the names of the shared library.
++ set dummy $library_names; shift
++ if test -n "$1"; then
++ realname="$1"
++ shift
+
-+Then, COMMAND is executed, with ARGS as arguments."
-+ ;;
++ srcname="$realname"
++ test -n "$relink_command" && srcname="$realname"T
+
-+ finish)
-+ $ECHO \
-+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
++ # Install the shared library and build the symlinks.
++ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
++ 'exit $?'
++ tstripme="$stripme"
++ case $host_os in
++ cygwin* | mingw* | pw32* | cegcc*)
++ case $realname in
++ *.dll.a)
++ tstripme=""
++ ;;
++ esac
++ ;;
++ esac
++ if test -n "$tstripme" && test -n "$striplib"; then
++ func_show_eval "$striplib $destdir/$realname" 'exit $?'
++ fi
+
-+Complete the installation of libtool libraries.
++ if test "$#" -gt 0; then
++ # Delete the old symlinks, and create new ones.
++ # Try `ln -sf' first, because the `ln' binary might depend on
++ # the symlink we replace! Solaris /bin/ln does not understand -f,
++ # so we also need to try rm && ln -s.
++ for linkname
++ do
++ test "$linkname" != "$realname" \
++ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
++ done
++ fi
+
-+Each LIBDIR is a directory that contains libtool libraries.
++ # Do each command in the postinstall commands.
++ lib="$destdir/$realname"
++ func_execute_cmds "$postinstall_cmds" 'exit $?'
++ fi
+
-+The commands that this mode executes may require superuser privileges. Use
-+the \`--dry-run' option if you just want to see what would be executed."
-+ ;;
++ # Install the pseudo-library for information purposes.
++ func_basename "$file"
++ name="$func_basename_result"
++ instname="$dir/$name"i
++ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
-+ install)
-+ $ECHO \
-+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
++ # Maybe install the static library, too.
++ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
++ ;;
+
-+Install executables or libraries.
++ *.lo)
++ # Install (i.e. copy) a libtool object.
+
-+INSTALL-COMMAND is the installation command. The first component should be
-+either the \`install' or \`cp' program.
++ # Figure out destination file name, if it wasn't already specified.
++ if test -n "$destname"; then
++ destfile="$destdir/$destname"
++ else
++ func_basename "$file"
++ destfile="$func_basename_result"
++ destfile="$destdir/$destfile"
++ fi
+
-+The following components of INSTALL-COMMAND are treated specially:
++ # Deduce the name of the destination old-style object file.
++ case $destfile in
++ *.lo)
++ func_lo2o "$destfile"
++ staticdest=$func_lo2o_result
++ ;;
++ *.$objext)
++ staticdest="$destfile"
++ destfile=
++ ;;
++ *)
++ func_fatal_help "cannot copy a libtool object to \`$destfile'"
++ ;;
++ esac
+
-+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
++ # Install the libtool object if requested.
++ test -n "$destfile" && \
++ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
-+The rest of the components are interpreted as arguments to that command (only
-+BSD-compatible install options are recognized)."
-+ ;;
++ # Install the old object if enabled.
++ if test "$build_old_libs" = yes; then
++ # Deduce the name of the old-style object file.
++ func_lo2o "$file"
++ staticobj=$func_lo2o_result
++ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
++ fi
++ exit $EXIT_SUCCESS
++ ;;
+
-+ link)
-+ $ECHO \
-+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
++ *)
++ # Figure out destination file name, if it wasn't already specified.
++ if test -n "$destname"; then
++ destfile="$destdir/$destname"
++ else
++ func_basename "$file"
++ destfile="$func_basename_result"
++ destfile="$destdir/$destfile"
++ fi
+
-+Link object files or libraries together to form another library, or to
-+create an executable program.
++ # If the file is missing, and there is a .exe on the end, strip it
++ # because it is most likely a libtool script we actually want to
++ # install
++ stripped_ext=""
++ case $file in
++ *.exe)
++ if test ! -f "$file"; then
++ func_stripname '' '.exe' "$file"
++ file=$func_stripname_result
++ stripped_ext=".exe"
++ fi
++ ;;
++ esac
+
-+LINK-COMMAND is a command using the C compiler that you would use to create
-+a program from several object files.
++ # Do a test to see if this is really a libtool program.
++ case $host in
++ *cygwin* | *mingw*)
++ if func_ltwrapper_executable_p "$file"; then
++ func_ltwrapper_scriptname "$file"
++ wrapper=$func_ltwrapper_scriptname_result
++ else
++ func_stripname '' '.exe' "$file"
++ wrapper=$func_stripname_result
++ fi
++ ;;
++ *)
++ wrapper=$file
++ ;;
++ esac
++ if func_ltwrapper_script_p "$wrapper"; then
++ notinst_deplibs=
++ relink_command=
+
-+The following components of LINK-COMMAND are treated specially:
++ func_source "$wrapper"
+
-+ -all-static do not do any dynamic linking at all
-+ -avoid-version do not add a version suffix if possible
-+ -bindir BINDIR specify path to binaries directory (for systems where
-+ libraries must be found in the PATH setting at runtime)
-+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
-+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-+ -export-symbols SYMFILE
-+ try to export only the symbols listed in SYMFILE
-+ -export-symbols-regex REGEX
-+ try to export only the symbols matching REGEX
-+ -LLIBDIR search LIBDIR for required installed libraries
-+ -lNAME OUTPUT-FILE requires the installed library libNAME
-+ -module build a library that can dlopened
-+ -no-fast-install disable the fast-install mode
-+ -no-install link a not-installable executable
-+ -no-undefined declare that a library does not refer to external symbols
-+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
-+ -objectlist FILE Use a list of object files found in FILE to specify objects
-+ -precious-files-regex REGEX
-+ don't remove output files matching REGEX
-+ -release RELEASE specify package release information
-+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
-+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
-+ -shared only do dynamic linking of libtool libraries
-+ -shrext SUFFIX override the standard shared library file extension
-+ -static do not do any dynamic linking of uninstalled libtool libraries
-+ -static-libtool-libs
-+ do not do any dynamic linking of libtool libraries
-+ -version-info CURRENT[:REVISION[:AGE]]
-+ specify library version info [each variable defaults to 0]
-+ -weak LIBNAME declare that the target provides the LIBNAME interface
-+ -Wc,FLAG
-+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
-+ -Wl,FLAG
-+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
-+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
++ # Check the variables that should have been set.
++ test -z "$generated_by_libtool_version" && \
++ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
-+All other options (arguments beginning with \`-') are ignored.
++ finalize=yes
++ for lib in $notinst_deplibs; do
++ # Check to see that each library is installed.
++ libdir=
++ if test -f "$lib"; then
++ func_source "$lib"
++ fi
++ libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
++ if test -n "$libdir" && test ! -f "$libfile"; then
++ func_warning "\`$lib' has not been installed in \`$libdir'"
++ finalize=no
++ fi
++ done
+
-+Every other argument is treated as a filename. Files ending in \`.la' are
-+treated as uninstalled libtool libraries, other files are standard or library
-+object files.
++ relink_command=
++ func_source "$wrapper"
+
-+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-+only library objects (\`.lo' files) may be specified, and \`-rpath' is
-+required, except when creating a convenience library.
++ outputname=
++ if test "$fast_install" = no && test -n "$relink_command"; then
++ $opt_dry_run || {
++ if test "$finalize" = yes; then
++ tmpdir=`func_mktempdir`
++ func_basename "$file$stripped_ext"
++ file="$func_basename_result"
++ outputname="$tmpdir/$file"
++ # Replace the output file specification.
++ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
-+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-+using \`ar' and \`ranlib', or on Windows using \`lib'.
++ $opt_silent || {
++ func_quote_for_expand "$relink_command"
++ eval "func_echo $func_quote_for_expand_result"
++ }
++ if eval "$relink_command"; then :
++ else
++ func_error "error: relink \`$file' with the above command before installing it"
++ $opt_dry_run || ${RM}r "$tmpdir"
++ continue
++ fi
++ file="$outputname"
++ else
++ func_warning "cannot relink \`$file'"
++ fi
++ }
++ else
++ # Install the binary that we compiled earlier.
++ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
++ fi
++ fi
+
-+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-+is created, otherwise an executable program is created."
-+ ;;
++ # remove .exe since cygwin /usr/bin/install will append another
++ # one anyway
++ case $install_prog,$host in
++ */usr/bin/install*,*cygwin*)
++ case $file:$destfile in
++ *.exe:*.exe)
++ # this is ok
++ ;;
++ *.exe:*)
++ destfile=$destfile.exe
++ ;;
++ *:*.exe)
++ func_stripname '' '.exe' "$destfile"
++ destfile=$func_stripname_result
++ ;;
++ esac
++ ;;
++ esac
++ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
++ $opt_dry_run || if test -n "$outputname"; then
++ ${RM}r "$tmpdir"
++ fi
++ ;;
++ esac
++ done
+
-+ uninstall)
-+ $ECHO \
-+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
++ for file in $staticlibs; do
++ func_basename "$file"
++ name="$func_basename_result"
+
-+Remove libraries from an installation directory.
++ # Set up the ranlib parameters.
++ oldlib="$destdir/$name"
+
-+RM is the name of the program to use to delete files associated with each FILE
-+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-+to RM.
++ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
-+If FILE is a libtool library, all the files associated with it are deleted.
-+Otherwise, only FILE itself is deleted using RM."
-+ ;;
++ if test -n "$stripme" && test -n "$old_striplib"; then
++ func_show_eval "$old_striplib $oldlib" 'exit $?'
++ fi
+
-+ *)
-+ func_fatal_help "invalid operation mode \`$opt_mode'"
-+ ;;
-+ esac
++ # Do each command in the postinstall commands.
++ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
++ done
+
-+ echo
-+ $ECHO "Try \`$progname --help' for more information about other modes."
++ test -n "$future_libdirs" && \
++ func_warning "remember to run \`$progname --finish$future_libdirs'"
++
++ if test -n "$current_libdirs"; then
++ # Maybe just do a dry run.
++ $opt_dry_run && current_libdirs=" -n$current_libdirs"
++ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
++ else
++ exit $EXIT_SUCCESS
++ fi
+}
+
-+# Now that we've collected a possible --mode arg, show help if necessary
-+if $opt_help; then
-+ if test "$opt_help" = :; then
-+ func_mode_help
-+ else
-+ {
-+ func_help noexit
-+ for opt_mode in compile link execute install finish uninstall clean; do
-+ func_mode_help
-+ done
-+ } | sed -n '1p; 2,$s/^Usage:/ or: /p'
-+ {
-+ func_help noexit
-+ for opt_mode in compile link execute install finish uninstall clean; do
-+ echo
-+ func_mode_help
-+ done
-+ } |
-+ sed '1d
-+ /^When reporting/,/^Report/{
-+ H
-+ d
-+ }
-+ $x
-+ /information about other modes/d
-+ /more detailed .*MODE/d
-+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
-+ fi
-+ exit $?
-+fi
++test "$opt_mode" = install && func_mode_install ${1+"$@"}
+
+
-+# func_mode_execute arg...
-+func_mode_execute ()
++# func_generate_dlsyms outputname originator pic_p
++# Extract symbols from dlprefiles and create ${outputname}S.o with
++# a dlpreopen symbol table.
++func_generate_dlsyms ()
+{
+ $opt_debug
-+ # The first argument is the command name.
-+ cmd="$nonopt"
-+ test -z "$cmd" && \
-+ func_fatal_help "you must specify a COMMAND"
++ my_outputname="$1"
++ my_originator="$2"
++ my_pic_p="${3-no}"
++ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
++ my_dlsyms=
+
-+ # Handle -dlopen flags immediately.
-+ for file in $opt_dlopen; do
-+ test -f "$file" \
-+ || func_fatal_help "\`$file' is not a file"
++ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
++ if test -n "$NM" && test -n "$global_symbol_pipe"; then
++ my_dlsyms="${my_outputname}S.c"
++ else
++ func_error "not configured to extract global symbols from dlpreopened files"
++ fi
++ fi
+
-+ dir=
-+ case $file in
-+ *.la)
-+ func_resolve_sysroot "$file"
-+ file=$func_resolve_sysroot_result
++ if test -n "$my_dlsyms"; then
++ case $my_dlsyms in
++ "") ;;
++ *.c)
++ # Discover the nlist of each of the dlfiles.
++ nlist="$output_objdir/${my_outputname}.nm"
+
-+ # Check to see that this really is a libtool archive.
-+ func_lalib_unsafe_p "$file" \
-+ || func_fatal_help "\`$lib' is not a valid libtool archive"
++ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
-+ # Read the libtool library.
-+ dlname=
-+ library_names=
-+ func_source "$file"
++ # Parse the name list into a source file.
++ func_verbose "creating $output_objdir/$my_dlsyms"
+
-+ # Skip this library if it cannot be dlopened.
-+ if test -z "$dlname"; then
-+ # Warn if it was a shared library.
-+ test -n "$library_names" && \
-+ func_warning "\`$file' was not linked with \`-export-dynamic'"
-+ continue
-+ fi
++ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
++/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
++/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
-+ func_dirname "$file" "" "."
-+ dir="$func_dirname_result"
++#ifdef __cplusplus
++extern \"C\" {
++#endif
+
-+ if test -f "$dir/$objdir/$dlname"; then
-+ func_append dir "/$objdir"
- else
-- error=$?
-- $run $rm $removelist
-- exit $error
-+ if test ! -f "$dir/$dlname"; then
-+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
-+ fi
- fi
-+ ;;
++#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
++#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
++#endif
+
-+ *.lo)
-+ # Just add the directory containing the .lo file.
-+ func_dirname "$file" "" "."
-+ dir="$func_dirname_result"
-+ ;;
++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
++/* DATA imports from DLLs on WIN32 con't be const, because runtime
++ relocations are performed -- see ld's documentation on pseudo-relocs. */
++# define LT_DLSYM_CONST
++#elif defined(__osf__)
++/* This system does not cope well with relocations in const data. */
++# define LT_DLSYM_CONST
++#else
++# define LT_DLSYM_CONST const
++#endif
+
-+ *)
-+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
-+ continue
-+ ;;
-+ esac
++/* External symbol declarations for the compiler. */\
++"
+
-+ # Get the absolute pathname.
-+ absdir=`cd "$dir" && pwd`
-+ test -n "$absdir" && dir="$absdir"
++ if test "$dlself" = yes; then
++ func_verbose "generating symbol list for \`$output'"
+
-+ # Now add the directory to shlibpath_var.
-+ if eval "test -z \"\$$shlibpath_var\""; then
-+ eval "$shlibpath_var=\"\$dir\""
-+ else
-+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
- fi
-+ done
-
-- # Append the name of the non-PIC object the libtool object file.
-- # Only append if the libtool object file exists.
-- test -z "$run" && cat >> ${libobj}T <<EOF
--# Name of the non-PIC object.
--non_pic_object='$objname'
-+ # This variable tells wrapper scripts just to set shlibpath_var
-+ # rather than running their programs.
-+ libtool_execute_magic="$magic"
-
--EOF
-+ # Check if any of the arguments is a wrapper script.
-+ args=
-+ for file
-+ do
-+ case $file in
-+ -* | *.la | *.lo ) ;;
-+ *)
-+ # Do a test to see if this is really a libtool program.
-+ if func_ltwrapper_script_p "$file"; then
-+ func_source "$file"
-+ # Transform arg to wrapped name.
-+ file="$progdir/$program"
-+ elif func_ltwrapper_executable_p "$file"; then
-+ func_ltwrapper_scriptname "$file"
-+ func_source "$func_ltwrapper_scriptname_result"
-+ # Transform arg to wrapped name.
-+ file="$progdir/$program"
-+ fi
-+ ;;
-+ esac
-+ # Quote arguments (to preserve shell metacharacters).
-+ func_append_quoted args "$file"
-+ done
++ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
-+ if test "X$opt_dry_run" = Xfalse; then
-+ if test -n "$shlibpath_var"; then
-+ # Export the shlibpath_var.
-+ eval "export $shlibpath_var"
-+ fi
++ # Add our own program objects to the symbol list.
++ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
++ for progfile in $progfiles; do
++ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
++ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
++ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
++ done
+
-+ # Restore saved environment variables
-+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-+ do
-+ eval "if test \"\${save_$lt_var+set}\" = set; then
-+ $lt_var=\$save_$lt_var; export $lt_var
-+ else
-+ $lt_unset $lt_var
-+ fi"
-+ done
++ if test -n "$exclude_expsyms"; then
++ $opt_dry_run || {
++ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
++ eval '$MV "$nlist"T "$nlist"'
++ }
++ fi
+
-+ # Now prepare to actually exec the command.
-+ exec_cmd="\$cmd$args"
- else
-- # Append the name of the non-PIC object the libtool object file.
-- # Only append if the libtool object file exists.
-- test -z "$run" && cat >> ${libobj}T <<EOF
--# Name of the non-PIC object.
--non_pic_object=none
-+ # Display what would be done.
-+ if test -n "$shlibpath_var"; then
-+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
-+ echo "export $shlibpath_var"
-+ fi
-+ $ECHO "$cmd$args"
-+ exit $EXIT_SUCCESS
-+ fi
-+}
-
--EOF
-+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
++ if test -n "$export_symbols_regex"; then
++ $opt_dry_run || {
++ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
++ eval '$MV "$nlist"T "$nlist"'
++ }
++ fi
+
++ # Prepare the list of exported symbols
++ if test -z "$export_symbols"; then
++ export_symbols="$output_objdir/$outputname.exp"
++ $opt_dry_run || {
++ $RM $export_symbols
++ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
++ case $host in
++ *cygwin* | *mingw* | *cegcc* )
++ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
++ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
++ ;;
++ esac
++ }
++ else
++ $opt_dry_run || {
++ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
++ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
++ eval '$MV "$nlist"T "$nlist"'
++ case $host in
++ *cygwin* | *mingw* | *cegcc* )
++ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
++ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
++ ;;
++ esac
++ }
++ fi
++ fi
+
-+# func_mode_finish arg...
-+func_mode_finish ()
-+{
-+ $opt_debug
-+ libs=
-+ libdirs=
-+ admincmds=
++ for dlprefile in $dlprefiles; do
++ func_verbose "extracting global C symbols from \`$dlprefile'"
++ func_basename "$dlprefile"
++ name="$func_basename_result"
++ case $host in
++ *cygwin* | *mingw* | *cegcc* )
++ # if an import library, we need to obtain dlname
++ if func_win32_import_lib_p "$dlprefile"; then
++ func_tr_sh "$dlprefile"
++ eval "curr_lafile=\$libfile_$func_tr_sh_result"
++ dlprefile_dlbasename=""
++ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
++ # Use subshell, to avoid clobbering current variable values
++ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
++ if test -n "$dlprefile_dlname" ; then
++ func_basename "$dlprefile_dlname"
++ dlprefile_dlbasename="$func_basename_result"
++ else
++ # no lafile. user explicitly requested -dlpreopen <import library>.
++ $sharedlib_from_linklib_cmd "$dlprefile"
++ dlprefile_dlbasename=$sharedlib_from_linklib_result
++ fi
++ fi
++ $opt_dry_run || {
++ if test -n "$dlprefile_dlbasename" ; then
++ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
++ else
++ func_warning "Could not compute DLL name from $name"
++ eval '$ECHO ": $name " >> "$nlist"'
++ fi
++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
++ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
++ }
++ else # not an import lib
++ $opt_dry_run || {
++ eval '$ECHO ": $name " >> "$nlist"'
++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
++ }
++ fi
++ ;;
++ *)
++ $opt_dry_run || {
++ eval '$ECHO ": $name " >> "$nlist"'
++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
++ }
++ ;;
++ esac
++ done
+
-+ for opt in "$nonopt" ${1+"$@"}
-+ do
-+ if test -d "$opt"; then
-+ func_append libdirs " $opt"
++ $opt_dry_run || {
++ # Make sure we have at least an empty file.
++ test -f "$nlist" || : > "$nlist"
+
-+ elif test -f "$opt"; then
-+ if func_lalib_unsafe_p "$opt"; then
-+ func_append libs " $opt"
-+ else
-+ func_warning "\`$opt' is not a valid libtool archive"
-+ fi
++ if test -n "$exclude_expsyms"; then
++ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
++ $MV "$nlist"T "$nlist"
++ fi
+
-+ else
-+ func_fatal_error "invalid argument \`$opt'"
-+ fi
-+ done
++ # Try sorting and uniquifying the output.
++ if $GREP -v "^: " < "$nlist" |
++ if sort -k 3 </dev/null >/dev/null 2>&1; then
++ sort -k 3
++ else
++ sort +2
++ fi |
++ uniq > "$nlist"S; then
++ :
++ else
++ $GREP -v "^: " < "$nlist" > "$nlist"S
++ fi
+
-+ if test -n "$libs"; then
-+ if test -n "$lt_sysroot"; then
-+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
-+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
-+ else
-+ sysroot_cmd=
-+ fi
++ if test -f "$nlist"S; then
++ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
++ else
++ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
++ fi
+
-+ # Remove sysroot references
-+ if $opt_dry_run; then
-+ for lib in $libs; do
-+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
-+ done
-+ else
-+ tmpdir=`func_mktempdir`
-+ for lib in $libs; do
-+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
-+ > $tmpdir/tmp-la
-+ mv -f $tmpdir/tmp-la $lib
-+ done
-+ ${RM}r "$tmpdir"
-+ fi
- fi
-
-- $run $mv "${libobj}T" "${libobj}"
-+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-+ for libdir in $libdirs; do
-+ if test -n "$finish_cmds"; then
-+ # Do each command in the finish commands.
-+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
-+'"$cmd"'"'
-+ fi
-+ if test -n "$finish_eval"; then
-+ # Do the single finish_eval.
-+ eval cmds=\"$finish_eval\"
-+ $opt_dry_run || eval "$cmds" || func_append admincmds "
-+ $cmds"
-+ fi
-+ done
-+ fi
-
-- # Unlock the critical section if it was locked
-- if test "$need_locks" != no; then
-- $run $rm "$lockfile"
-+ # Exit here if they wanted silent mode.
-+ $opt_silent && exit $EXIT_SUCCESS
++ echo >> "$output_objdir/$my_dlsyms" "\
+
-+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-+ echo "----------------------------------------------------------------------"
-+ echo "Libraries have been installed in:"
-+ for libdir in $libdirs; do
-+ $ECHO " $libdir"
-+ done
-+ echo
-+ echo "If you ever happen to want to link against installed libraries"
-+ echo "in a given directory, LIBDIR, you must either use libtool, and"
-+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
-+ echo "flag during linking and do at least one of the following:"
-+ if test -n "$shlibpath_var"; then
-+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
-+ echo " during execution"
-+ fi
-+ if test -n "$runpath_var"; then
-+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
-+ echo " during linking"
-+ fi
-+ if test -n "$hardcode_libdir_flag_spec"; then
-+ libdir=LIBDIR
-+ eval flag=\"$hardcode_libdir_flag_spec\"
++/* The mapping between symbol names and symbols. */
++typedef struct {
++ const char *name;
++ void *address;
++} lt_dlsymlist;
++extern LT_DLSYM_CONST lt_dlsymlist
++lt_${my_prefix}_LTX_preloaded_symbols[];
++LT_DLSYM_CONST lt_dlsymlist
++lt_${my_prefix}_LTX_preloaded_symbols[] =
++{\
++ { \"$my_originator\", (void *) 0 },"
+
-+ $ECHO " - use the \`$flag' linker flag"
-+ fi
-+ if test -n "$admincmds"; then
-+ $ECHO " - have your system administrator run these commands:$admincmds"
-+ fi
-+ if test -f /etc/ld.so.conf; then
-+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-+ fi
-+ echo
++ case $need_lib_prefix in
++ no)
++ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
++ ;;
++ *)
++ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
++ ;;
++ esac
++ echo >> "$output_objdir/$my_dlsyms" "\
++ {0, (void *) 0}
++};
+
-+ echo "See any operating system documentation about shared libraries for"
-+ case $host in
-+ solaris2.[6789]|solaris2.1[0-9])
-+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
-+ echo "pages."
-+ ;;
++/* This works around a problem in FreeBSD linker */
++#ifdef FREEBSD_WORKAROUND
++static const void *lt_preloaded_setup() {
++ return lt_${my_prefix}_LTX_preloaded_symbols;
++}
++#endif
++
++#ifdef __cplusplus
++}
++#endif\
++"
++ } # !$opt_dry_run
++
++ pic_flag_for_symtable=
++ case "$compile_command " in
++ *" -static "*) ;;
+ *)
-+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
++ case $host in
++ # compiling the symbol table file with pic_flag works around
++ # a FreeBSD bug that causes programs to crash when -lm is
++ # linked before any other PIC object. But we must not use
++ # pic_flag when linking with -static. The problem exists in
++ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
++ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
++ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
++ *-*-hpux*)
++ pic_flag_for_symtable=" $pic_flag" ;;
++ *)
++ if test "X$my_pic_p" != Xno; then
++ pic_flag_for_symtable=" $pic_flag"
++ fi
++ ;;
++ esac
+ ;;
-+ esac
-+ echo "----------------------------------------------------------------------"
- fi
-+ exit $EXIT_SUCCESS
-+}
-
-- exit 0
-+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
++ esac
++ symtab_cflags=
++ for arg in $LTCFLAGS; do
++ case $arg in
++ -pie | -fpie | -fPIE) ;;
++ *) func_append symtab_cflags " $arg" ;;
++ esac
++ done
+
++ # Now compile the dynamic symbol file.
++ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
-+# func_mode_install arg...
-+func_mode_install ()
-+{
-+ $opt_debug
-+ # There may be an optional sh(1) argument at the beginning of
-+ # install_prog (especially on Windows NT).
-+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
-+ # Allow the use of GNU shtool's install command.
-+ case $nonopt in *shtool*) :;; *) false;; esac; then
-+ # Aesthetically quote it.
-+ func_quote_for_eval "$nonopt"
-+ install_prog="$func_quote_for_eval_result "
-+ arg=$1
-+ shift
-+ else
-+ install_prog=
-+ arg=$nonopt
-+ fi
-+
-+ # The real first argument should be the name of the installation program.
-+ # Aesthetically quote it.
-+ func_quote_for_eval "$arg"
-+ func_append install_prog "$func_quote_for_eval_result"
-+ install_shared_prog=$install_prog
-+ case " $install_prog " in
-+ *[\\\ /]cp\ *) install_cp=: ;;
-+ *) install_cp=false ;;
-+ esac
-+
-+ # We need to accept at least all the BSD install flags.
-+ dest=
-+ files=
-+ opts=
-+ prev=
-+ install_type=
-+ isdir=no
-+ stripme=
-+ no_mode=:
-+ for arg
-+ do
-+ arg2=
-+ if test -n "$dest"; then
-+ func_append files " $dest"
-+ dest=$arg
-+ continue
-+ fi
++ # Clean up the generated files.
++ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
-+ case $arg in
-+ -d) isdir=yes ;;
-+ -f)
-+ if $install_cp; then :; else
-+ prev=$arg
-+ fi
-+ ;;
-+ -g | -m | -o)
-+ prev=$arg
-+ ;;
-+ -s)
-+ stripme=" -s"
-+ continue
-+ ;;
-+ -*)
++ # Transform the symbol file into the correct name.
++ symfileobj="$output_objdir/${my_outputname}S.$objext"
++ case $host in
++ *cygwin* | *mingw* | *cegcc* )
++ if test -f "$output_objdir/$my_outputname.def"; then
++ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
++ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
++ else
++ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
++ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
++ fi
++ ;;
++ *)
++ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
++ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
++ ;;
++ esac
+ ;;
+ *)
-+ # If the previous option needed an argument, then skip it.
-+ if test -n "$prev"; then
-+ if test "x$prev" = x-m && test -n "$install_override_mode"; then
-+ arg2=$install_override_mode
-+ no_mode=false
-+ fi
-+ prev=
-+ else
-+ dest=$arg
-+ continue
-+ fi
++ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
++ else
++ # We keep going just in case the user didn't refer to
++ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
++ # really was required.
+
-+ # Aesthetically quote the argument.
-+ func_quote_for_eval "$arg"
-+ func_append install_prog " $func_quote_for_eval_result"
-+ if test -n "$arg2"; then
-+ func_quote_for_eval "$arg2"
-+ fi
-+ func_append install_shared_prog " $func_quote_for_eval_result"
-+ done
-+
-+ test -z "$install_prog" && \
-+ func_fatal_help "you must specify an install program"
-+
-+ test -n "$prev" && \
-+ func_fatal_help "the \`$prev' option requires an argument"
-+
-+ if test -n "$install_override_mode" && $no_mode; then
-+ if $install_cp; then :; else
-+ func_quote_for_eval "$install_override_mode"
-+ func_append install_shared_prog " -m $func_quote_for_eval_result"
-+ fi
-+ fi
-+
-+ if test -z "$files"; then
-+ if test -z "$dest"; then
-+ func_fatal_help "no file or destination specified"
-+ else
-+ func_fatal_help "you must specify a destination"
-+ fi
++ # Nullify the symbol file.
++ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
++ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+ fi
++}
+
-+ # Strip any trailing slash from the destination.
-+ func_stripname '' '/' "$dest"
-+ dest=$func_stripname_result
-+
-+ # Check to see that the destination is a directory.
-+ test -d "$dest" && isdir=yes
-+ if test "$isdir" = yes; then
-+ destdir="$dest"
-+ destname=
-+ else
-+ func_dirname_and_basename "$dest" "" "."
-+ destdir="$func_dirname_result"
-+ destname="$func_basename_result"
-+
-+ # Not a directory, so check to see that there is only one file specified.
-+ set dummy $files; shift
-+ test "$#" -gt 1 && \
-+ func_fatal_help "\`$dest' is not a directory"
++# func_win32_libid arg
++# return the library type of file 'arg'
++#
++# Need a lot of goo to handle *both* DLLs and import libs
++# Has to be a shell function in order to 'eat' the argument
++# that is supplied when $file_magic_command is called.
++# Despite the name, also deal with 64 bit binaries.
++func_win32_libid ()
++{
++ $opt_debug
++ win32_libid_type="unknown"
++ win32_fileres=`file -L $1 2>/dev/null`
++ case $win32_fileres in
++ *ar\ archive\ import\ library*) # definitely import
++ win32_libid_type="x86 archive import"
++ ;;
++ *ar\ archive*) # could be an import, or static
++ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
++ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
++ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
++ func_to_tool_file "$1" func_convert_file_msys_to_w32
++ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
++ $SED -n -e '
++ 1,100{
++ / I /{
++ s,.*,import,
++ p
++ q
++ }
++ }'`
++ case $win32_nmres in
++ import*) win32_libid_type="x86 archive import";;
++ *) win32_libid_type="x86 archive static";;
++ esac
+ fi
-+ case $destdir in
-+ [\\/]* | [A-Za-z]:[\\/]*) ;;
-+ *)
-+ for file in $files; do
-+ case $file in
-+ *.lo) ;;
-+ *)
-+ func_fatal_help "\`$destdir' must be an absolute directory name"
-+ ;;
-+ esac
-+ done
++ ;;
++ *DLL*)
++ win32_libid_type="x86 DLL"
++ ;;
++ *executable*) # but shell scripts are "executable" too...
++ case $win32_fileres in
++ *MS\ Windows\ PE\ Intel*)
++ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
++ esac
++ $ECHO "$win32_libid_type"
++}
+
+- # libtool link mode
+- link | relink)
+- modename="$modename: link"
++# func_cygming_dll_for_implib ARG
++#
++# Platform-specific function to extract the
++# name of the DLL associated with the specified
++# import library ARG.
++# Invoked by eval'ing the libtool variable
++# $sharedlib_from_linklib_cmd
++# Result is available in the variable
++# $sharedlib_from_linklib_result
++func_cygming_dll_for_implib ()
++{
++ $opt_debug
++ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
++}
+
-+ # This variable tells wrapper scripts just to set variables rather
-+ # than running their programs.
-+ libtool_install_magic="$magic"
-+
-+ staticlibs=
-+ future_libdirs=
-+ current_libdirs=
-+ for file in $files; do
-+
-+ # Do each installation.
-+ case $file in
-+ *.$libext)
-+ # Do the static libraries later.
-+ func_append staticlibs " $file"
-+ ;;
-+
-+ *.la)
-+ func_resolve_sysroot "$file"
-+ file=$func_resolve_sysroot_result
-+
-+ # Check to see that this really is a libtool archive.
-+ func_lalib_unsafe_p "$file" \
-+ || func_fatal_help "\`$file' is not a valid libtool archive"
-+
-+ library_names=
-+ old_library=
-+ relink_command=
-+ func_source "$file"
-+
-+ # Add the libdir to current_libdirs if it is the destination.
-+ if test "X$destdir" = "X$libdir"; then
-+ case "$current_libdirs " in
-+ *" $libdir "*) ;;
-+ *) func_append current_libdirs " $libdir" ;;
-+ esac
-+ else
-+ # Note the libdir as a future libdir.
-+ case "$future_libdirs " in
-+ *" $libdir "*) ;;
-+ *) func_append future_libdirs " $libdir" ;;
-+ esac
-+ fi
-+
-+ func_dirname "$file" "/" ""
-+ dir="$func_dirname_result"
-+ func_append dir "$objdir"
-+
-+ if test -n "$relink_command"; then
-+ # Determine the prefix the user has applied to our future dir.
-+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
-+
-+ # Don't allow the user to place us outside of our expected
-+ # location b/c this prevents finding dependent libraries that
-+ # are installed to the same prefix.
-+ # At present, this check doesn't affect windows .dll's that
-+ # are installed into $libdir/../bin (currently, that works fine)
-+ # but it's something to keep an eye on.
-+ test "$inst_prefix_dir" = "$destdir" && \
-+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
-+
-+ if test -n "$inst_prefix_dir"; then
-+ # Stick the inst_prefix_dir data into the link command.
-+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
-+ else
-+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
-+ fi
-+
-+ func_warning "relinking \`$file'"
-+ func_show_eval "$relink_command" \
-+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
-+ fi
++# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
++#
++# The is the core of a fallback implementation of a
++# platform-specific function to extract the name of the
++# DLL associated with the specified import library LIBNAME.
++#
++# SECTION_NAME is either .idata$6 or .idata$7, depending
++# on the platform and compiler that created the implib.
++#
++# Echos the name of the DLL associated with the
++# specified import library.
++func_cygming_dll_for_implib_fallback_core ()
++{
++ $opt_debug
++ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
++ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
++ $SED '/^Contents of section '"$match_literal"':/{
++ # Place marker at beginning of archive member dllname section
++ s/.*/====MARK====/
++ p
++ d
++ }
++ # These lines can sometimes be longer than 43 characters, but
++ # are always uninteresting
++ /:[ ]*file format pe[i]\{,1\}-/d
++ /^In archive [^:]*:/d
++ # Ensure marker is printed
++ /^====MARK====/p
++ # Remove all lines with less than 43 characters
++ /^.\{43\}/!d
++ # From remaining lines, remove first 43 characters
++ s/^.\{43\}//' |
++ $SED -n '
++ # Join marker and all lines until next marker into a single line
++ /^====MARK====/ b para
++ H
++ $ b para
++ b
++ :para
++ x
++ s/\n//g
++ # Remove the marker
++ s/^====MARK====//
++ # Remove trailing dots and whitespace
++ s/[\. \t]*$//
++ # Print
++ /./p' |
++ # we now have a list, one entry per line, of the stringified
++ # contents of the appropriate section of all members of the
++ # archive which possess that section. Heuristic: eliminate
++ # all those which have a first or second character that is
++ # a '.' (that is, objdump's representation of an unprintable
++ # character.) This should work for all archives with less than
++ # 0x302f exports -- but will fail for DLLs whose name actually
++ # begins with a literal '.' or a single character followed by
++ # a '.'.
++ #
++ # Of those that remain, print the first one.
++ $SED -e '/^\./d;/^.\./d;q'
++}
+
-+ # See the names of the shared library.
-+ set dummy $library_names; shift
-+ if test -n "$1"; then
-+ realname="$1"
-+ shift
++# func_cygming_gnu_implib_p ARG
++# This predicate returns with zero status (TRUE) if
++# ARG is a GNU/binutils-style import library. Returns
++# with nonzero status (FALSE) otherwise.
++func_cygming_gnu_implib_p ()
++{
++ $opt_debug
++ func_to_tool_file "$1" func_convert_file_msys_to_w32
++ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
++ test -n "$func_cygming_gnu_implib_tmp"
++}
+
-+ srcname="$realname"
-+ test -n "$relink_command" && srcname="$realname"T
++# func_cygming_ms_implib_p ARG
++# This predicate returns with zero status (TRUE) if
++# ARG is an MS-style import library. Returns
++# with nonzero status (FALSE) otherwise.
++func_cygming_ms_implib_p ()
++{
++ $opt_debug
++ func_to_tool_file "$1" func_convert_file_msys_to_w32
++ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
++ test -n "$func_cygming_ms_implib_tmp"
++}
+
-+ # Install the shared library and build the symlinks.
-+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
-+ 'exit $?'
-+ tstripme="$stripme"
-+ case $host_os in
-+ cygwin* | mingw* | pw32* | cegcc*)
-+ case $realname in
-+ *.dll.a)
-+ tstripme=""
-+ ;;
-+ esac
-+ ;;
-+ esac
-+ if test -n "$tstripme" && test -n "$striplib"; then
-+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
-+ fi
++# func_cygming_dll_for_implib_fallback ARG
++# Platform-specific function to extract the
++# name of the DLL associated with the specified
++# import library ARG.
++#
++# This fallback implementation is for use when $DLLTOOL
++# does not support the --identify-strict option.
++# Invoked by eval'ing the libtool variable
++# $sharedlib_from_linklib_cmd
++# Result is available in the variable
++# $sharedlib_from_linklib_result
++func_cygming_dll_for_implib_fallback ()
++{
++ $opt_debug
++ if func_cygming_gnu_implib_p "$1" ; then
++ # binutils import library
++ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
++ elif func_cygming_ms_implib_p "$1" ; then
++ # ms-generated import library
++ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
++ else
++ # unknown
++ sharedlib_from_linklib_result=""
++ fi
++}
+
-+ if test "$#" -gt 0; then
-+ # Delete the old symlinks, and create new ones.
-+ # Try `ln -sf' first, because the `ln' binary might depend on
-+ # the symlink we replace! Solaris /bin/ln does not understand -f,
-+ # so we also need to try rm && ln -s.
-+ for linkname
-+ do
-+ test "$linkname" != "$realname" \
-+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
-+ done
-+ fi
+
-+ # Do each command in the postinstall commands.
-+ lib="$destdir/$realname"
-+ func_execute_cmds "$postinstall_cmds" 'exit $?'
-+ fi
++# func_extract_an_archive dir oldlib
++func_extract_an_archive ()
++{
++ $opt_debug
++ f_ex_an_ar_dir="$1"; shift
++ f_ex_an_ar_oldlib="$1"
++ if test "$lock_old_archive_extraction" = yes; then
++ lockfile=$f_ex_an_ar_oldlib.lock
++ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
++ func_echo "Waiting for $lockfile to be removed"
++ sleep 2
++ done
++ fi
++ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
++ 'stat=$?; rm -f "$lockfile"; exit $stat'
++ if test "$lock_old_archive_extraction" = yes; then
++ $opt_dry_run || rm -f "$lockfile"
++ fi
++ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
++ :
++ else
++ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
++ fi
++}
+
-+ # Install the pseudo-library for information purposes.
-+ func_basename "$file"
-+ name="$func_basename_result"
-+ instname="$dir/$name"i
-+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
-+ # Maybe install the static library, too.
-+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
-+ ;;
++# func_extract_archives gentop oldlib ...
++func_extract_archives ()
++{
++ $opt_debug
++ my_gentop="$1"; shift
++ my_oldlibs=${1+"$@"}
++ my_oldobjs=""
++ my_xlib=""
++ my_xabs=""
++ my_xdir=""
+
-+ *.lo)
-+ # Install (i.e. copy) a libtool object.
++ for my_xlib in $my_oldlibs; do
++ # Extract the objects.
++ case $my_xlib in
++ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
++ *) my_xabs=`pwd`"/$my_xlib" ;;
++ esac
++ func_basename "$my_xlib"
++ my_xlib="$func_basename_result"
++ my_xlib_u=$my_xlib
++ while :; do
++ case " $extracted_archives " in
++ *" $my_xlib_u "*)
++ func_arith $extracted_serial + 1
++ extracted_serial=$func_arith_result
++ my_xlib_u=lt$extracted_serial-$my_xlib ;;
++ *) break ;;
++ esac
++ done
++ extracted_archives="$extracted_archives $my_xlib_u"
++ my_xdir="$my_gentop/$my_xlib_u"
+
-+ # Figure out destination file name, if it wasn't already specified.
-+ if test -n "$destname"; then
-+ destfile="$destdir/$destname"
-+ else
-+ func_basename "$file"
-+ destfile="$func_basename_result"
-+ destfile="$destdir/$destfile"
-+ fi
++ func_mkdir_p "$my_xdir"
+
-+ # Deduce the name of the destination old-style object file.
-+ case $destfile in
-+ *.lo)
-+ func_lo2o "$destfile"
-+ staticdest=$func_lo2o_result
-+ ;;
-+ *.$objext)
-+ staticdest="$destfile"
-+ destfile=
-+ ;;
-+ *)
-+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
-+ ;;
-+ esac
-+
-+ # Install the libtool object if requested.
-+ test -n "$destfile" && \
-+ func_show_eval "$install_prog $file $destfile" 'exit $?'
-+
-+ # Install the old object if enabled.
-+ if test "$build_old_libs" = yes; then
-+ # Deduce the name of the old-style object file.
-+ func_lo2o "$file"
-+ staticobj=$func_lo2o_result
-+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
-+ fi
-+ exit $EXIT_SUCCESS
++ case $host in
++ *-darwin*)
++ func_verbose "Extracting $my_xabs"
++ # Do not bother doing anything if just a dry run
++ $opt_dry_run || {
++ darwin_orig_dir=`pwd`
++ cd $my_xdir || exit $?
++ darwin_archive=$my_xabs
++ darwin_curdir=`pwd`
++ darwin_base_archive=`basename "$darwin_archive"`
++ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
++ if test -n "$darwin_arches"; then
++ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
++ darwin_arch=
++ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
++ for darwin_arch in $darwin_arches ; do
++ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
++ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
++ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
++ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
++ cd "$darwin_curdir"
++ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
++ done # $darwin_arches
++ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
++ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
++ darwin_file=
++ darwin_files=
++ for darwin_file in $darwin_filelist; do
++ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
++ $LIPO -create -output "$darwin_file" $darwin_files
++ done # $darwin_filelist
++ $RM -rf unfat-$$
++ cd "$darwin_orig_dir"
++ else
++ cd $darwin_orig_dir
++ func_extract_an_archive "$my_xdir" "$my_xabs"
++ fi # $darwin_arches
++ } # !$opt_dry_run
+ ;;
-+
+ *)
-+ # Figure out destination file name, if it wasn't already specified.
-+ if test -n "$destname"; then
-+ destfile="$destdir/$destname"
-+ else
-+ func_basename "$file"
-+ destfile="$func_basename_result"
-+ destfile="$destdir/$destfile"
-+ fi
-+
-+ # If the file is missing, and there is a .exe on the end, strip it
-+ # because it is most likely a libtool script we actually want to
-+ # install
-+ stripped_ext=""
-+ case $file in
-+ *.exe)
-+ if test ! -f "$file"; then
-+ func_stripname '' '.exe' "$file"
-+ file=$func_stripname_result
-+ stripped_ext=".exe"
-+ fi
-+ ;;
-+ esac
-+
-+ # Do a test to see if this is really a libtool program.
-+ case $host in
-+ *cygwin* | *mingw*)
-+ if func_ltwrapper_executable_p "$file"; then
-+ func_ltwrapper_scriptname "$file"
-+ wrapper=$func_ltwrapper_scriptname_result
-+ else
-+ func_stripname '' '.exe' "$file"
-+ wrapper=$func_stripname_result
-+ fi
-+ ;;
-+ *)
-+ wrapper=$file
-+ ;;
-+ esac
-+ if func_ltwrapper_script_p "$wrapper"; then
-+ notinst_deplibs=
-+ relink_command=
-+
-+ func_source "$wrapper"
-+
-+ # Check the variables that should have been set.
-+ test -z "$generated_by_libtool_version" && \
-+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
-+
-+ finalize=yes
-+ for lib in $notinst_deplibs; do
-+ # Check to see that each library is installed.
-+ libdir=
-+ if test -f "$lib"; then
-+ func_source "$lib"
-+ fi
-+ libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
-+ if test -n "$libdir" && test ! -f "$libfile"; then
-+ func_warning "\`$lib' has not been installed in \`$libdir'"
-+ finalize=no
-+ fi
-+ done
-+
-+ relink_command=
-+ func_source "$wrapper"
-+
-+ outputname=
-+ if test "$fast_install" = no && test -n "$relink_command"; then
-+ $opt_dry_run || {
-+ if test "$finalize" = yes; then
-+ tmpdir=`func_mktempdir`
-+ func_basename "$file$stripped_ext"
-+ file="$func_basename_result"
-+ outputname="$tmpdir/$file"
-+ # Replace the output file specification.
-+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
-+
-+ $opt_silent || {
-+ func_quote_for_expand "$relink_command"
-+ eval "func_echo $func_quote_for_expand_result"
-+ }
-+ if eval "$relink_command"; then :
-+ else
-+ func_error "error: relink \`$file' with the above command before installing it"
-+ $opt_dry_run || ${RM}r "$tmpdir"
-+ continue
-+ fi
-+ file="$outputname"
-+ else
-+ func_warning "cannot relink \`$file'"
-+ fi
-+ }
-+ else
-+ # Install the binary that we compiled earlier.
-+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
-+ fi
-+ fi
-+
-+ # remove .exe since cygwin /usr/bin/install will append another
-+ # one anyway
-+ case $install_prog,$host in
-+ */usr/bin/install*,*cygwin*)
-+ case $file:$destfile in
-+ *.exe:*.exe)
-+ # this is ok
-+ ;;
-+ *.exe:*)
-+ destfile=$destfile.exe
-+ ;;
-+ *:*.exe)
-+ func_stripname '' '.exe' "$destfile"
-+ destfile=$func_stripname_result
-+ ;;
-+ esac
-+ ;;
-+ esac
-+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
-+ $opt_dry_run || if test -n "$outputname"; then
-+ ${RM}r "$tmpdir"
-+ fi
++ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
++ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+ done
+
-+ for file in $staticlibs; do
-+ func_basename "$file"
-+ name="$func_basename_result"
++ func_extract_archives_result="$my_oldobjs"
++}
+
-+ # Set up the ranlib parameters.
-+ oldlib="$destdir/$name"
+
-+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
++# func_emit_wrapper [arg=no]
++#
++# Emit a libtool wrapper script on stdout.
++# Don't directly open a file because we may want to
++# incorporate the script contents within a cygwin/mingw
++# wrapper executable. Must ONLY be called from within
++# func_mode_link because it depends on a number of variables
++# set therein.
++#
++# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
++# variable will take. If 'yes', then the emitted script
++# will assume that the directory in which it is stored is
++# the $objdir directory. This is a cygwin/mingw-specific
++# behavior.
++func_emit_wrapper ()
++{
++ func_emit_wrapper_arg1=${1-no}
+
-+ if test -n "$stripme" && test -n "$old_striplib"; then
-+ func_show_eval "$old_striplib $oldlib" 'exit $?'
-+ fi
++ $ECHO "\
++#! $SHELL
+
-+ # Do each command in the postinstall commands.
-+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
-+ done
++# $output - temporary wrapper script for $objdir/$outputname
++# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
++#
++# The $output program cannot be directly executed until all the libtool
++# libraries that it depends on are installed.
++#
++# This wrapper script should never be moved out of the build directory.
++# If it is, it will not operate correctly.
+
-+ test -n "$future_libdirs" && \
-+ func_warning "remember to run \`$progname --finish$future_libdirs'"
++# Sed substitution that helps us do robust quoting. It backslashifies
++# metacharacters that are still active within double-quoted strings.
++sed_quote_subst='$sed_quote_subst'
+
-+ if test -n "$current_libdirs"; then
-+ # Maybe just do a dry run.
-+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
-+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
-+ else
-+ exit $EXIT_SUCCESS
-+ fi
-+}
++# Be Bourne compatible
++if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '\${1+\"\$@\"}'='\"\$@\"'
++ setopt NO_GLOB_SUBST
++else
++ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
++fi
++BIN_SH=xpg4; export BIN_SH # for Tru64
++DUALCASE=1; export DUALCASE # for MKS sh
+
-+test "$opt_mode" = install && func_mode_install ${1+"$@"}
++# The HP-UX ksh and POSIX shell print the target directory to stdout
++# if CDPATH is set.
++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
++relink_command=\"$relink_command\"
+
-+# func_generate_dlsyms outputname originator pic_p
-+# Extract symbols from dlprefiles and create ${outputname}S.o with
-+# a dlpreopen symbol table.
-+func_generate_dlsyms ()
-+{
-+ $opt_debug
-+ my_outputname="$1"
-+ my_originator="$2"
-+ my_pic_p="${3-no}"
-+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
-+ my_dlsyms=
++# This environment variable determines our operation mode.
++if test \"\$libtool_install_magic\" = \"$magic\"; then
++ # install mode needs the following variables:
++ generated_by_libtool_version='$macro_version'
++ notinst_deplibs='$notinst_deplibs'
++else
++ # When we are sourced in execute mode, \$file and \$ECHO are already set.
++ if test \"\$libtool_execute_magic\" != \"$magic\"; then
++ file=\"\$0\""
+
-+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
-+ my_dlsyms="${my_outputname}S.c"
-+ else
-+ func_error "not configured to extract global symbols from dlpreopened files"
++ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
++ $ECHO "\
++
++# A function that is used when there is no print builtin or printf.
++func_fallback_echo ()
++{
++ eval 'cat <<_LTECHO_EOF
++\$1
++_LTECHO_EOF'
++}
++ ECHO=\"$qECHO\"
++ fi
++
++# Very basic option parsing. These options are (a) specific to
++# the libtool wrapper, (b) are identical between the wrapper
++# /script/ and the wrapper /executable/ which is used only on
++# windows platforms, and (c) all begin with the string "--lt-"
++# (application programs are unlikely to have options which match
++# this pattern).
++#
++# There are only two supported options: --lt-debug and
++# --lt-dump-script. There is, deliberately, no --lt-help.
++#
++# The first argument to this parsing function should be the
++# script's $0 value, followed by "$@".
++lt_option_debug=
++func_parse_lt_options ()
++{
++ lt_script_arg0=\$0
++ shift
++ for lt_opt
++ do
++ case \"\$lt_opt\" in
++ --lt-debug) lt_option_debug=1 ;;
++ --lt-dump-script)
++ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
++ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
++ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
++ cat \"\$lt_dump_D/\$lt_dump_F\"
++ exit 0
++ ;;
++ --lt-*)
++ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
++ exit 1
++ ;;
++ esac
++ done
++
++ # Print the debug banner immediately:
++ if test -n \"\$lt_option_debug\"; then
++ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
++ fi
++}
++
++# Used when --lt-debug. Prints its arguments to stdout
++# (redirection is the responsibility of the caller)
++func_lt_dump_args ()
++{
++ lt_dump_args_N=1;
++ for lt_arg
++ do
++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
++ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
++ done
++}
++
++# Core function for launching the target application
++func_exec_program_core ()
++{
++"
++ case $host in
++ # Backslashes separate directories on plain windows
++ *-*-mingw | *-*-os2* | *-cegcc*)
++ $ECHO "\
++ if test -n \"\$lt_option_debug\"; then
++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
++ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
-+ fi
++ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
++"
++ ;;
+
-+ if test -n "$my_dlsyms"; then
-+ case $my_dlsyms in
-+ "") ;;
-+ *.c)
-+ # Discover the nlist of each of the dlfiles.
-+ nlist="$output_objdir/${my_outputname}.nm"
++ *)
++ $ECHO "\
++ if test -n \"\$lt_option_debug\"; then
++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
++ func_lt_dump_args \${1+\"\$@\"} 1>&2
++ fi
++ exec \"\$progdir/\$program\" \${1+\"\$@\"}
++"
++ ;;
++ esac
++ $ECHO "\
++ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
++ exit 1
++}
+
-+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
++# A function to encapsulate launching the target application
++# Strips options in the --lt-* namespace from \$@ and
++# launches target application with the remaining arguments.
++func_exec_program ()
++{
++ for lt_wr_arg
++ do
++ case \$lt_wr_arg in
++ --lt-*) ;;
++ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
++ esac
++ shift
++ done
++ func_exec_program_core \${1+\"\$@\"}
++}
+
-+ # Parse the name list into a source file.
-+ func_verbose "creating $output_objdir/$my_dlsyms"
++ # Parse options
++ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
-+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
-+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
-+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
++ # Find the directory that this script lives in.
++ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
++ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
-+#ifdef __cplusplus
-+extern \"C\" {
-+#endif
++ # Follow symbolic links until we get to the real thisdir.
++ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
++ while test -n \"\$file\"; do
++ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
-+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
-+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
-+#endif
++ # If there was a directory component, then change thisdir.
++ if test \"x\$destdir\" != \"x\$file\"; then
++ case \"\$destdir\" in
++ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
++ *) thisdir=\"\$thisdir/\$destdir\" ;;
++ esac
++ fi
+
-+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-+/* DATA imports from DLLs on WIN32 con't be const, because runtime
-+ relocations are performed -- see ld's documentation on pseudo-relocs. */
-+# define LT_DLSYM_CONST
-+#elif defined(__osf__)
-+/* This system does not cope well with relocations in const data. */
-+# define LT_DLSYM_CONST
-+#else
-+# define LT_DLSYM_CONST const
-+#endif
++ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
++ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
++ done
+
-+/* External symbol declarations for the compiler. */\
++ # Usually 'no', except on cygwin/mingw when embedded into
++ # the cwrapper.
++ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
++ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
++ # special case for '.'
++ if test \"\$thisdir\" = \".\"; then
++ thisdir=\`pwd\`
++ fi
++ # remove .libs from thisdir
++ case \"\$thisdir\" in
++ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
++ $objdir ) thisdir=. ;;
++ esac
++ fi
++
++ # Try to get the absolute directory name.
++ absdir=\`cd \"\$thisdir\" && pwd\`
++ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
-+ if test "$dlself" = yes; then
-+ func_verbose "generating symbol list for \`$output'"
++ if test "$fast_install" = yes; then
++ $ECHO "\
++ program=lt-'$outputname'$exeext
++ progdir=\"\$thisdir/$objdir\"
+
-+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
++ if test ! -f \"\$progdir/\$program\" ||
++ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
++ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
-+ # Add our own program objects to the symbol list.
-+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
-+ for progfile in $progfiles; do
-+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
-+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
-+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
-+ done
++ file=\"\$\$-\$program\"
+
-+ if test -n "$exclude_expsyms"; then
-+ $opt_dry_run || {
-+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
-+ eval '$MV "$nlist"T "$nlist"'
-+ }
-+ fi
++ if test ! -d \"\$progdir\"; then
++ $MKDIR \"\$progdir\"
++ else
++ $RM \"\$progdir/\$file\"
++ fi"
+
-+ if test -n "$export_symbols_regex"; then
-+ $opt_dry_run || {
-+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
-+ eval '$MV "$nlist"T "$nlist"'
-+ }
-+ fi
++ $ECHO "\
+
-+ # Prepare the list of exported symbols
-+ if test -z "$export_symbols"; then
-+ export_symbols="$output_objdir/$outputname.exp"
-+ $opt_dry_run || {
-+ $RM $export_symbols
-+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
-+ case $host in
-+ *cygwin* | *mingw* | *cegcc* )
-+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
-+ ;;
-+ esac
-+ }
-+ else
-+ $opt_dry_run || {
-+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
-+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
-+ eval '$MV "$nlist"T "$nlist"'
-+ case $host in
-+ *cygwin* | *mingw* | *cegcc* )
-+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
-+ ;;
-+ esac
-+ }
-+ fi
++ # relink executable if necessary
++ if test -n \"\$relink_command\"; then
++ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
++ else
++ $ECHO \"\$relink_command_output\" >&2
++ $RM \"\$progdir/\$file\"
++ exit 1
++ fi
++ fi
++
++ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
++ { $RM \"\$progdir/\$program\";
++ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
++ $RM \"\$progdir/\$file\"
++ fi"
++ else
++ $ECHO "\
++ program='$outputname'
++ progdir=\"\$thisdir/$objdir\"
++"
+ fi
+
-+ for dlprefile in $dlprefiles; do
-+ func_verbose "extracting global C symbols from \`$dlprefile'"
-+ func_basename "$dlprefile"
-+ name="$func_basename_result"
-+ case $host in
-+ *cygwin* | *mingw* | *cegcc* )
-+ # if an import library, we need to obtain dlname
-+ if func_win32_import_lib_p "$dlprefile"; then
-+ func_tr_sh "$dlprefile"
-+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
-+ dlprefile_dlbasename=""
-+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
-+ # Use subshell, to avoid clobbering current variable values
-+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
-+ if test -n "$dlprefile_dlname" ; then
-+ func_basename "$dlprefile_dlname"
-+ dlprefile_dlbasename="$func_basename_result"
-+ else
-+ # no lafile. user explicitly requested -dlpreopen <import library>.
-+ $sharedlib_from_linklib_cmd "$dlprefile"
-+ dlprefile_dlbasename=$sharedlib_from_linklib_result
-+ fi
-+ fi
-+ $opt_dry_run || {
-+ if test -n "$dlprefile_dlbasename" ; then
-+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
-+ else
-+ func_warning "Could not compute DLL name from $name"
-+ eval '$ECHO ": $name " >> "$nlist"'
-+ fi
-+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
-+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
-+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
-+ }
-+ else # not an import lib
-+ $opt_dry_run || {
-+ eval '$ECHO ": $name " >> "$nlist"'
-+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
-+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
-+ }
-+ fi
-+ ;;
-+ *)
-+ $opt_dry_run || {
-+ eval '$ECHO ": $name " >> "$nlist"'
-+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
-+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
-+ }
-+ ;;
-+ esac
-+ done
++ $ECHO "\
+
-+ $opt_dry_run || {
-+ # Make sure we have at least an empty file.
-+ test -f "$nlist" || : > "$nlist"
++ if test -f \"\$progdir/\$program\"; then"
+
-+ if test -n "$exclude_expsyms"; then
-+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
-+ $MV "$nlist"T "$nlist"
-+ fi
++ # fixup the dll searchpath if we need to.
++ #
++ # Fix the DLL searchpath if we need to. Do this before prepending
++ # to shlibpath, because on Windows, both are PATH and uninstalled
++ # libraries must come first.
++ if test -n "$dllsearchpath"; then
++ $ECHO "\
++ # Add the dll search path components to the executable PATH
++ PATH=$dllsearchpath:\$PATH
++"
++ fi
+
-+ # Try sorting and uniquifying the output.
-+ if $GREP -v "^: " < "$nlist" |
-+ if sort -k 3 </dev/null >/dev/null 2>&1; then
-+ sort -k 3
-+ else
-+ sort +2
-+ fi |
-+ uniq > "$nlist"S; then
-+ :
-+ else
-+ $GREP -v "^: " < "$nlist" > "$nlist"S
-+ fi
++ # Export our shlibpath_var if we have one.
++ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
++ $ECHO "\
++ # Add our own library path to $shlibpath_var
++ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
-+ if test -f "$nlist"S; then
-+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
-+ else
-+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
-+ fi
++ # Some systems cannot cope with colon-terminated $shlibpath_var
++ # The second colon is a workaround for a bug in BeOS R4 sed
++ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
-+ echo >> "$output_objdir/$my_dlsyms" "\
++ export $shlibpath_var
++"
++ fi
+
-+/* The mapping between symbol names and symbols. */
-+typedef struct {
-+ const char *name;
-+ void *address;
-+} lt_dlsymlist;
-+extern LT_DLSYM_CONST lt_dlsymlist
-+lt_${my_prefix}_LTX_preloaded_symbols[];
-+LT_DLSYM_CONST lt_dlsymlist
-+lt_${my_prefix}_LTX_preloaded_symbols[] =
-+{\
-+ { \"$my_originator\", (void *) 0 },"
++ $ECHO "\
++ if test \"\$libtool_execute_magic\" != \"$magic\"; then
++ # Run the actual program with our arguments.
++ func_exec_program \${1+\"\$@\"}
++ fi
++ else
++ # The program doesn't exist.
++ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
++ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
++ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
++ exit 1
++ fi
++fi\
++"
++}
+
-+ case $need_lib_prefix in
-+ no)
-+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
-+ ;;
-+ *)
-+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
-+ ;;
-+ esac
-+ echo >> "$output_objdir/$my_dlsyms" "\
-+ {0, (void *) 0}
-+};
+
-+/* This works around a problem in FreeBSD linker */
-+#ifdef FREEBSD_WORKAROUND
-+static const void *lt_preloaded_setup() {
-+ return lt_${my_prefix}_LTX_preloaded_symbols;
-+}
-+#endif
++# func_emit_cwrapperexe_src
++# emit the source code for a wrapper executable on stdout
++# Must ONLY be called from within func_mode_link because
++# it depends on a number of variable set therein.
++func_emit_cwrapperexe_src ()
++{
++ cat <<EOF
+
-+#ifdef __cplusplus
-+}
-+#endif\
-+"
-+ } # !$opt_dry_run
++/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
++ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
-+ pic_flag_for_symtable=
-+ case "$compile_command " in
-+ *" -static "*) ;;
-+ *)
-+ case $host in
-+ # compiling the symbol table file with pic_flag works around
-+ # a FreeBSD bug that causes programs to crash when -lm is
-+ # linked before any other PIC object. But we must not use
-+ # pic_flag when linking with -static. The problem exists in
-+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
-+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
-+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
-+ *-*-hpux*)
-+ pic_flag_for_symtable=" $pic_flag" ;;
-+ *)
-+ if test "X$my_pic_p" != Xno; then
-+ pic_flag_for_symtable=" $pic_flag"
-+ fi
-+ ;;
-+ esac
-+ ;;
-+ esac
-+ symtab_cflags=
-+ for arg in $LTCFLAGS; do
-+ case $arg in
-+ -pie | -fpie | -fPIE) ;;
-+ *) func_append symtab_cflags " $arg" ;;
-+ esac
-+ done
++ The $output program cannot be directly executed until all the libtool
++ libraries that it depends on are installed.
+
-+ # Now compile the dynamic symbol file.
-+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
++ This wrapper executable should never be moved out of the build directory.
++ If it is, it will not operate correctly.
++*/
++EOF
++ cat <<"EOF"
++#ifdef _MSC_VER
++# define _CRT_SECURE_NO_DEPRECATE 1
++#endif
++#include <stdio.h>
++#include <stdlib.h>
++#ifdef _MSC_VER
++# include <direct.h>
++# include <process.h>
++# include <io.h>
++#else
++# include <unistd.h>
++# include <stdint.h>
++# ifdef __CYGWIN__
++# include <io.h>
++# endif
++#endif
++#include <malloc.h>
++#include <stdarg.h>
++#include <assert.h>
++#include <string.h>
++#include <ctype.h>
++#include <errno.h>
++#include <fcntl.h>
++#include <sys/stat.h>
+
-+ # Clean up the generated files.
-+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
++/* declarations of non-ANSI functions */
++#if defined(__MINGW32__)
++# ifdef __STRICT_ANSI__
++int _putenv (const char *);
++# endif
++#elif defined(__CYGWIN__)
++# ifdef __STRICT_ANSI__
++char *realpath (const char *, char *);
++int putenv (char *);
++int setenv (const char *, const char *, int);
++# endif
++/* #elif defined (other platforms) ... */
++#endif
+
-+ # Transform the symbol file into the correct name.
-+ symfileobj="$output_objdir/${my_outputname}S.$objext"
-+ case $host in
-+ *cygwin* | *mingw* | *cegcc* )
-+ if test -f "$output_objdir/$my_outputname.def"; then
-+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
-+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
-+ else
-+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
-+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
-+ fi
-+ ;;
-+ *)
-+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
-+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
-+ ;;
-+ esac
-+ ;;
-+ *)
-+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
-+ ;;
-+ esac
-+ else
-+ # We keep going just in case the user didn't refer to
-+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
-+ # really was required.
++/* portability defines, excluding path handling macros */
++#if defined(_MSC_VER)
++# define setmode _setmode
++# define stat _stat
++# define chmod _chmod
++# define getcwd _getcwd
++# define putenv _putenv
++# define S_IXUSR _S_IEXEC
++# ifndef _INTPTR_T_DEFINED
++# define _INTPTR_T_DEFINED
++# define intptr_t int
++# endif
++#elif defined(__MINGW32__)
++# define setmode _setmode
++# define stat _stat
++# define chmod _chmod
++# define getcwd _getcwd
++# define putenv _putenv
++#elif defined(__CYGWIN__)
++# define HAVE_SETENV
++# define FOPEN_WB "wb"
++/* #elif defined (other platforms) ... */
++#endif
+
-+ # Nullify the symbol file.
-+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
-+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
-+ fi
-+}
++#if defined(PATH_MAX)
++# define LT_PATHMAX PATH_MAX
++#elif defined(MAXPATHLEN)
++# define LT_PATHMAX MAXPATHLEN
++#else
++# define LT_PATHMAX 1024
++#endif
+
-+# func_win32_libid arg
-+# return the library type of file 'arg'
-+#
-+# Need a lot of goo to handle *both* DLLs and import libs
-+# Has to be a shell function in order to 'eat' the argument
-+# that is supplied when $file_magic_command is called.
-+# Despite the name, also deal with 64 bit binaries.
-+func_win32_libid ()
-+{
-+ $opt_debug
-+ win32_libid_type="unknown"
-+ win32_fileres=`file -L $1 2>/dev/null`
-+ case $win32_fileres in
-+ *ar\ archive\ import\ library*) # definitely import
-+ win32_libid_type="x86 archive import"
-+ ;;
-+ *ar\ archive*) # could be an import, or static
-+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
-+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
-+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
-+ func_to_tool_file "$1" func_convert_file_msys_to_w32
-+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
-+ $SED -n -e '
-+ 1,100{
-+ / I /{
-+ s,.*,import,
-+ p
-+ q
-+ }
-+ }'`
-+ case $win32_nmres in
-+ import*) win32_libid_type="x86 archive import";;
-+ *) win32_libid_type="x86 archive static";;
-+ esac
-+ fi
-+ ;;
-+ *DLL*)
-+ win32_libid_type="x86 DLL"
-+ ;;
-+ *executable*) # but shell scripts are "executable" too...
-+ case $win32_fileres in
-+ *MS\ Windows\ PE\ Intel*)
-+ win32_libid_type="x86 DLL"
-+ ;;
-+ esac
- ;;
-+ esac
-+ $ECHO "$win32_libid_type"
-+}
-
-- # libtool link mode
-- link | relink)
-- modename="$modename: link"
-+# func_cygming_dll_for_implib ARG
-+#
-+# Platform-specific function to extract the
-+# name of the DLL associated with the specified
-+# import library ARG.
-+# Invoked by eval'ing the libtool variable
-+# $sharedlib_from_linklib_cmd
-+# Result is available in the variable
-+# $sharedlib_from_linklib_result
-+func_cygming_dll_for_implib ()
-+{
-+ $opt_debug
-+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
-+}
++#ifndef S_IXOTH
++# define S_IXOTH 0
++#endif
++#ifndef S_IXGRP
++# define S_IXGRP 0
++#endif
+
-+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
-+#
-+# The is the core of a fallback implementation of a
-+# platform-specific function to extract the name of the
-+# DLL associated with the specified import library LIBNAME.
-+#
-+# SECTION_NAME is either .idata$6 or .idata$7, depending
-+# on the platform and compiler that created the implib.
-+#
-+# Echos the name of the DLL associated with the
-+# specified import library.
-+func_cygming_dll_for_implib_fallback_core ()
-+{
-+ $opt_debug
-+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
-+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
-+ $SED '/^Contents of section '"$match_literal"':/{
-+ # Place marker at beginning of archive member dllname section
-+ s/.*/====MARK====/
-+ p
-+ d
-+ }
-+ # These lines can sometimes be longer than 43 characters, but
-+ # are always uninteresting
-+ /:[ ]*file format pe[i]\{,1\}-/d
-+ /^In archive [^:]*:/d
-+ # Ensure marker is printed
-+ /^====MARK====/p
-+ # Remove all lines with less than 43 characters
-+ /^.\{43\}/!d
-+ # From remaining lines, remove first 43 characters
-+ s/^.\{43\}//' |
-+ $SED -n '
-+ # Join marker and all lines until next marker into a single line
-+ /^====MARK====/ b para
-+ H
-+ $ b para
-+ b
-+ :para
-+ x
-+ s/\n//g
-+ # Remove the marker
-+ s/^====MARK====//
-+ # Remove trailing dots and whitespace
-+ s/[\. \t]*$//
-+ # Print
-+ /./p' |
-+ # we now have a list, one entry per line, of the stringified
-+ # contents of the appropriate section of all members of the
-+ # archive which possess that section. Heuristic: eliminate
-+ # all those which have a first or second character that is
-+ # a '.' (that is, objdump's representation of an unprintable
-+ # character.) This should work for all archives with less than
-+ # 0x302f exports -- but will fail for DLLs whose name actually
-+ # begins with a literal '.' or a single character followed by
-+ # a '.'.
-+ #
-+ # Of those that remain, print the first one.
-+ $SED -e '/^\./d;/^.\./d;q'
-+}
++/* path handling portability macros */
++#ifndef DIR_SEPARATOR
++# define DIR_SEPARATOR '/'
++# define PATH_SEPARATOR ':'
++#endif
+
-+# func_cygming_gnu_implib_p ARG
-+# This predicate returns with zero status (TRUE) if
-+# ARG is a GNU/binutils-style import library. Returns
-+# with nonzero status (FALSE) otherwise.
-+func_cygming_gnu_implib_p ()
-+{
-+ $opt_debug
-+ func_to_tool_file "$1" func_convert_file_msys_to_w32
-+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
-+ test -n "$func_cygming_gnu_implib_tmp"
-+}
++#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
++ defined (__OS2__)
++# define HAVE_DOS_BASED_FILE_SYSTEM
++# define FOPEN_WB "wb"
++# ifndef DIR_SEPARATOR_2
++# define DIR_SEPARATOR_2 '\\'
++# endif
++# ifndef PATH_SEPARATOR_2
++# define PATH_SEPARATOR_2 ';'
++# endif
++#endif
+
-+# func_cygming_ms_implib_p ARG
-+# This predicate returns with zero status (TRUE) if
-+# ARG is an MS-style import library. Returns
-+# with nonzero status (FALSE) otherwise.
-+func_cygming_ms_implib_p ()
-+{
-+ $opt_debug
-+ func_to_tool_file "$1" func_convert_file_msys_to_w32
-+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
-+ test -n "$func_cygming_ms_implib_tmp"
-+}
++#ifndef DIR_SEPARATOR_2
++# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
++#else /* DIR_SEPARATOR_2 */
++# define IS_DIR_SEPARATOR(ch) \
++ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
++#endif /* DIR_SEPARATOR_2 */
+
-+# func_cygming_dll_for_implib_fallback ARG
-+# Platform-specific function to extract the
-+# name of the DLL associated with the specified
-+# import library ARG.
-+#
-+# This fallback implementation is for use when $DLLTOOL
-+# does not support the --identify-strict option.
-+# Invoked by eval'ing the libtool variable
-+# $sharedlib_from_linklib_cmd
-+# Result is available in the variable
-+# $sharedlib_from_linklib_result
-+func_cygming_dll_for_implib_fallback ()
-+{
-+ $opt_debug
-+ if func_cygming_gnu_implib_p "$1" ; then
-+ # binutils import library
-+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
-+ elif func_cygming_ms_implib_p "$1" ; then
-+ # ms-generated import library
-+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
-+ else
-+ # unknown
-+ sharedlib_from_linklib_result=""
-+ fi
-+}
++#ifndef PATH_SEPARATOR_2
++# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
++#else /* PATH_SEPARATOR_2 */
++# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
++#endif /* PATH_SEPARATOR_2 */
+
++#ifndef FOPEN_WB
++# define FOPEN_WB "w"
++#endif
++#ifndef _O_BINARY
++# define _O_BINARY 0
++#endif
+
-+# func_extract_an_archive dir oldlib
-+func_extract_an_archive ()
-+{
-+ $opt_debug
-+ f_ex_an_ar_dir="$1"; shift
-+ f_ex_an_ar_oldlib="$1"
-+ if test "$lock_old_archive_extraction" = yes; then
-+ lockfile=$f_ex_an_ar_oldlib.lock
-+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
-+ func_echo "Waiting for $lockfile to be removed"
-+ sleep 2
-+ done
-+ fi
-+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
-+ 'stat=$?; rm -f "$lockfile"; exit $stat'
-+ if test "$lock_old_archive_extraction" = yes; then
-+ $opt_dry_run || rm -f "$lockfile"
-+ fi
-+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
-+ :
-+ else
-+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
-+ fi
-+}
++#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
++#define XFREE(stale) do { \
++ if (stale) { free ((void *) stale); stale = 0; } \
++} while (0)
+
++#if defined(LT_DEBUGWRAPPER)
++static int lt_debug = 1;
++#else
++static int lt_debug = 0;
++#endif
+
-+# func_extract_archives gentop oldlib ...
-+func_extract_archives ()
-+{
-+ $opt_debug
-+ my_gentop="$1"; shift
-+ my_oldlibs=${1+"$@"}
-+ my_oldobjs=""
-+ my_xlib=""
-+ my_xabs=""
-+ my_xdir=""
++const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
-+ for my_xlib in $my_oldlibs; do
-+ # Extract the objects.
-+ case $my_xlib in
-+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
-+ *) my_xabs=`pwd`"/$my_xlib" ;;
-+ esac
-+ func_basename "$my_xlib"
-+ my_xlib="$func_basename_result"
-+ my_xlib_u=$my_xlib
-+ while :; do
-+ case " $extracted_archives " in
-+ *" $my_xlib_u "*)
-+ func_arith $extracted_serial + 1
-+ extracted_serial=$func_arith_result
-+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
-+ *) break ;;
-+ esac
-+ done
-+ extracted_archives="$extracted_archives $my_xlib_u"
-+ my_xdir="$my_gentop/$my_xlib_u"
++void *xmalloc (size_t num);
++char *xstrdup (const char *string);
++const char *base_name (const char *name);
++char *find_executable (const char *wrapper);
++char *chase_symlinks (const char *pathspec);
++int make_executable (const char *path);
++int check_executable (const char *path);
++char *strendzap (char *str, const char *pat);
++void lt_debugprintf (const char *file, int line, const char *fmt, ...);
++void lt_fatal (const char *file, int line, const char *message, ...);
++static const char *nonnull (const char *s);
++static const char *nonempty (const char *s);
++void lt_setenv (const char *name, const char *value);
++char *lt_extend_str (const char *orig_value, const char *add, int to_end);
++void lt_update_exe_path (const char *name, const char *value);
++void lt_update_lib_path (const char *name, const char *value);
++char **prepare_spawn (char **argv);
++void lt_dump_script (FILE *f);
++EOF
+
-+ func_mkdir_p "$my_xdir"
++ cat <<EOF
++volatile const char * MAGIC_EXE = "$magic_exe";
++const char * LIB_PATH_VARNAME = "$shlibpath_var";
++EOF
+
-+ case $host in
-+ *-darwin*)
-+ func_verbose "Extracting $my_xabs"
-+ # Do not bother doing anything if just a dry run
-+ $opt_dry_run || {
-+ darwin_orig_dir=`pwd`
-+ cd $my_xdir || exit $?
-+ darwin_archive=$my_xabs
-+ darwin_curdir=`pwd`
-+ darwin_base_archive=`basename "$darwin_archive"`
-+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
-+ if test -n "$darwin_arches"; then
-+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
-+ darwin_arch=
-+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
-+ for darwin_arch in $darwin_arches ; do
-+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
-+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
-+ cd "$darwin_curdir"
-+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
-+ done # $darwin_arches
-+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
-+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
-+ darwin_file=
-+ darwin_files=
-+ for darwin_file in $darwin_filelist; do
-+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
-+ $LIPO -create -output "$darwin_file" $darwin_files
-+ done # $darwin_filelist
-+ $RM -rf unfat-$$
-+ cd "$darwin_orig_dir"
-+ else
-+ cd $darwin_orig_dir
-+ func_extract_an_archive "$my_xdir" "$my_xabs"
-+ fi # $darwin_arches
-+ } # !$opt_dry_run
-+ ;;
-+ *)
-+ func_extract_an_archive "$my_xdir" "$my_xabs"
-+ ;;
-+ esac
-+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
-+ done
++ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
++ func_to_host_path "$temp_rpath"
++ cat <<EOF
++const char * LIB_PATH_VALUE = "$func_to_host_path_result";
++EOF
++ else
++ cat <<"EOF"
++const char * LIB_PATH_VALUE = "";
++EOF
++ fi
+
-+ func_extract_archives_result="$my_oldobjs"
-+}
++ if test -n "$dllsearchpath"; then
++ func_to_host_path "$dllsearchpath:"
++ cat <<EOF
++const char * EXE_PATH_VARNAME = "PATH";
++const char * EXE_PATH_VALUE = "$func_to_host_path_result";
++EOF
++ else
++ cat <<"EOF"
++const char * EXE_PATH_VARNAME = "";
++const char * EXE_PATH_VALUE = "";
++EOF
++ fi
+
++ if test "$fast_install" = yes; then
++ cat <<EOF
++const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
++EOF
++ else
++ cat <<EOF
++const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
++EOF
++ fi
+
-+# func_emit_wrapper [arg=no]
-+#
-+# Emit a libtool wrapper script on stdout.
-+# Don't directly open a file because we may want to
-+# incorporate the script contents within a cygwin/mingw
-+# wrapper executable. Must ONLY be called from within
-+# func_mode_link because it depends on a number of variables
-+# set therein.
-+#
-+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
-+# variable will take. If 'yes', then the emitted script
-+# will assume that the directory in which it is stored is
-+# the $objdir directory. This is a cygwin/mingw-specific
-+# behavior.
-+func_emit_wrapper ()
-+{
-+ func_emit_wrapper_arg1=${1-no}
+
-+ $ECHO "\
-+#! $SHELL
++ cat <<"EOF"
+
-+# $output - temporary wrapper script for $objdir/$outputname
-+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-+#
-+# The $output program cannot be directly executed until all the libtool
-+# libraries that it depends on are installed.
-+#
-+# This wrapper script should never be moved out of the build directory.
-+# If it is, it will not operate correctly.
++#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
-+# Sed substitution that helps us do robust quoting. It backslashifies
-+# metacharacters that are still active within double-quoted strings.
-+sed_quote_subst='$sed_quote_subst'
++static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
++static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
++static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
-+# Be Bourne compatible
-+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
-+ emulate sh
-+ NULLCMD=:
-+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
-+ # is contrary to our usage. Disable this feature.
-+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
-+ setopt NO_GLOB_SUBST
-+else
-+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
-+fi
-+BIN_SH=xpg4; export BIN_SH # for Tru64
-+DUALCASE=1; export DUALCASE # for MKS sh
++int
++main (int argc, char *argv[])
++{
++ char **newargz;
++ int newargc;
++ char *tmp_pathspec;
++ char *actual_cwrapper_path;
++ char *actual_cwrapper_name;
++ char *target_name;
++ char *lt_argv_zero;
++ intptr_t rval = 127;
+
-+# The HP-UX ksh and POSIX shell print the target directory to stdout
-+# if CDPATH is set.
-+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
++ int i;
+
-+relink_command=\"$relink_command\"
++ program_name = (char *) xstrdup (base_name (argv[0]));
++ newargz = XMALLOC (char *, argc + 1);
+
-+# This environment variable determines our operation mode.
-+if test \"\$libtool_install_magic\" = \"$magic\"; then
-+ # install mode needs the following variables:
-+ generated_by_libtool_version='$macro_version'
-+ notinst_deplibs='$notinst_deplibs'
-+else
-+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
-+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
-+ file=\"\$0\""
++ /* very simple arg parsing; don't want to rely on getopt
++ * also, copy all non cwrapper options to newargz, except
++ * argz[0], which is handled differently
++ */
++ newargc=0;
++ for (i = 1; i < argc; i++)
++ {
++ if (strcmp (argv[i], dumpscript_opt) == 0)
++ {
++EOF
++ case "$host" in
++ *mingw* | *cygwin* )
++ # make stdout use "unix" line endings
++ echo " setmode(1,_O_BINARY);"
++ ;;
++ esac
+
-+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
-+ $ECHO "\
++ cat <<"EOF"
++ lt_dump_script (stdout);
++ return 0;
++ }
++ if (strcmp (argv[i], debug_opt) == 0)
++ {
++ lt_debug = 1;
++ continue;
++ }
++ if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
++ {
++ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
++ namespace, but it is not one of the ones we know about and
++ have already dealt with, above (inluding dump-script), then
++ report an error. Otherwise, targets might begin to believe
++ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
++ namespace. The first time any user complains about this, we'll
++ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
++ or a configure.ac-settable value.
++ */
++ lt_fatal (__FILE__, __LINE__,
++ "unrecognized %s option: '%s'",
++ ltwrapper_option_prefix, argv[i]);
++ }
++ /* otherwise ... */
++ newargz[++newargc] = xstrdup (argv[i]);
++ }
++ newargz[++newargc] = NULL;
+
-+# A function that is used when there is no print builtin or printf.
-+func_fallback_echo ()
-+{
-+ eval 'cat <<_LTECHO_EOF
-+\$1
-+_LTECHO_EOF'
-+}
-+ ECHO=\"$qECHO\"
-+ fi
++EOF
++ cat <<EOF
++ /* The GNU banner must be the first non-error debug message */
++ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
++EOF
++ cat <<"EOF"
++ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
++ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
-+# Very basic option parsing. These options are (a) specific to
-+# the libtool wrapper, (b) are identical between the wrapper
-+# /script/ and the wrapper /executable/ which is used only on
-+# windows platforms, and (c) all begin with the string "--lt-"
-+# (application programs are unlikely to have options which match
-+# this pattern).
-+#
-+# There are only two supported options: --lt-debug and
-+# --lt-dump-script. There is, deliberately, no --lt-help.
-+#
-+# The first argument to this parsing function should be the
-+# script's $0 value, followed by "$@".
-+lt_option_debug=
-+func_parse_lt_options ()
-+{
-+ lt_script_arg0=\$0
-+ shift
-+ for lt_opt
-+ do
-+ case \"\$lt_opt\" in
-+ --lt-debug) lt_option_debug=1 ;;
-+ --lt-dump-script)
-+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
-+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
-+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
-+ cat \"\$lt_dump_D/\$lt_dump_F\"
-+ exit 0
-+ ;;
-+ --lt-*)
-+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
-+ exit 1
-+ ;;
-+ esac
-+ done
++ tmp_pathspec = find_executable (argv[0]);
++ if (tmp_pathspec == NULL)
++ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
++ lt_debugprintf (__FILE__, __LINE__,
++ "(main) found exe (before symlink chase) at: %s\n",
++ tmp_pathspec);
+
-+ # Print the debug banner immediately:
-+ if test -n \"\$lt_option_debug\"; then
-+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
-+ fi
-+}
++ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
++ lt_debugprintf (__FILE__, __LINE__,
++ "(main) found exe (after symlink chase) at: %s\n",
++ actual_cwrapper_path);
++ XFREE (tmp_pathspec);
+
-+# Used when --lt-debug. Prints its arguments to stdout
-+# (redirection is the responsibility of the caller)
-+func_lt_dump_args ()
-+{
-+ lt_dump_args_N=1;
-+ for lt_arg
-+ do
-+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
-+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
-+ done
-+}
++ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
++ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
-+# Core function for launching the target application
-+func_exec_program_core ()
-+{
-+"
-+ case $host in
-+ # Backslashes separate directories on plain windows
-+ *-*-mingw | *-*-os2* | *-cegcc*)
-+ $ECHO "\
-+ if test -n \"\$lt_option_debug\"; then
-+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
-+ func_lt_dump_args \${1+\"\$@\"} 1>&2
-+ fi
-+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-+"
-+ ;;
++ /* wrapper name transforms */
++ strendzap (actual_cwrapper_name, ".exe");
++ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
++ XFREE (actual_cwrapper_name);
++ actual_cwrapper_name = tmp_pathspec;
++ tmp_pathspec = 0;
+
-+ *)
-+ $ECHO "\
-+ if test -n \"\$lt_option_debug\"; then
-+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
-+ func_lt_dump_args \${1+\"\$@\"} 1>&2
-+ fi
-+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
-+"
-+ ;;
-+ esac
-+ $ECHO "\
-+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
-+ exit 1
-+}
++ /* target_name transforms -- use actual target program name; might have lt- prefix */
++ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
++ strendzap (target_name, ".exe");
++ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
++ XFREE (target_name);
++ target_name = tmp_pathspec;
++ tmp_pathspec = 0;
+
-+# A function to encapsulate launching the target application
-+# Strips options in the --lt-* namespace from \$@ and
-+# launches target application with the remaining arguments.
-+func_exec_program ()
-+{
-+ for lt_wr_arg
-+ do
-+ case \$lt_wr_arg in
-+ --lt-*) ;;
-+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
-+ esac
-+ shift
-+ done
-+ func_exec_program_core \${1+\"\$@\"}
-+}
++ lt_debugprintf (__FILE__, __LINE__,
++ "(main) libtool target name: %s\n",
++ target_name);
++EOF
+
-+ # Parse options
-+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
++ cat <<EOF
++ newargz[0] =
++ XMALLOC (char, (strlen (actual_cwrapper_path) +
++ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
++ strcpy (newargz[0], actual_cwrapper_path);
++ strcat (newargz[0], "$objdir");
++ strcat (newargz[0], "/");
++EOF
+
-+ # Find the directory that this script lives in.
-+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
-+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
++ cat <<"EOF"
++ /* stop here, and copy so we don't have to do this twice */
++ tmp_pathspec = xstrdup (newargz[0]);
+
-+ # Follow symbolic links until we get to the real thisdir.
-+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
-+ while test -n \"\$file\"; do
-+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
++ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
++ strcat (newargz[0], actual_cwrapper_name);
+
-+ # If there was a directory component, then change thisdir.
-+ if test \"x\$destdir\" != \"x\$file\"; then
-+ case \"\$destdir\" in
-+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
-+ *) thisdir=\"\$thisdir/\$destdir\" ;;
-+ esac
-+ fi
++ /* DO want the lt- prefix here if it exists, so use target_name */
++ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
++ XFREE (tmp_pathspec);
++ tmp_pathspec = NULL;
++EOF
+
-+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
-+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
-+ done
++ case $host_os in
++ mingw*)
++ cat <<"EOF"
++ {
++ char* p;
++ while ((p = strchr (newargz[0], '\\')) != NULL)
++ {
++ *p = '/';
++ }
++ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
++ {
++ *p = '/';
++ }
++ }
++EOF
++ ;;
++ esac
+
-+ # Usually 'no', except on cygwin/mingw when embedded into
-+ # the cwrapper.
-+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
-+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
-+ # special case for '.'
-+ if test \"\$thisdir\" = \".\"; then
-+ thisdir=\`pwd\`
-+ fi
-+ # remove .libs from thisdir
-+ case \"\$thisdir\" in
-+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
-+ $objdir ) thisdir=. ;;
-+ esac
-+ fi
-+
-+ # Try to get the absolute directory name.
-+ absdir=\`cd \"\$thisdir\" && pwd\`
-+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
-+"
++ cat <<"EOF"
++ XFREE (target_name);
++ XFREE (actual_cwrapper_path);
++ XFREE (actual_cwrapper_name);
+
-+ if test "$fast_install" = yes; then
-+ $ECHO "\
-+ program=lt-'$outputname'$exeext
-+ progdir=\"\$thisdir/$objdir\"
++ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
++ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
++ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
++ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
++ because on Windows, both *_VARNAMEs are PATH but uninstalled
++ libraries must come first. */
++ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
++ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
-+ if test ! -f \"\$progdir/\$program\" ||
-+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
-+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
++ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
++ nonnull (lt_argv_zero));
++ for (i = 0; i < newargc; i++)
++ {
++ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
++ i, nonnull (newargz[i]));
++ }
+
-+ file=\"\$\$-\$program\"
++EOF
+
-+ if test ! -d \"\$progdir\"; then
-+ $MKDIR \"\$progdir\"
-+ else
-+ $RM \"\$progdir/\$file\"
-+ fi"
++ case $host_os in
++ mingw*)
++ cat <<"EOF"
++ /* execv doesn't actually work on mingw as expected on unix */
++ newargz = prepare_spawn (newargz);
++ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
++ if (rval == -1)
++ {
++ /* failed to start process */
++ lt_debugprintf (__FILE__, __LINE__,
++ "(main) failed to launch target \"%s\": %s\n",
++ lt_argv_zero, nonnull (strerror (errno)));
++ return 127;
++ }
++ return rval;
++EOF
++ ;;
++ *)
++ cat <<"EOF"
++ execv (lt_argv_zero, newargz);
++ return rval; /* =127, but avoids unused variable warning */
++EOF
++ ;;
++ esac
+
-+ $ECHO "\
++ cat <<"EOF"
++}
+
-+ # relink executable if necessary
-+ if test -n \"\$relink_command\"; then
-+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
-+ else
-+ $ECHO \"\$relink_command_output\" >&2
-+ $RM \"\$progdir/\$file\"
-+ exit 1
-+ fi
-+ fi
++void *
++xmalloc (size_t num)
++{
++ void *p = (void *) malloc (num);
++ if (!p)
++ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
-+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
-+ { $RM \"\$progdir/\$program\";
-+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
-+ $RM \"\$progdir/\$file\"
-+ fi"
-+ else
-+ $ECHO "\
-+ program='$outputname'
-+ progdir=\"\$thisdir/$objdir\"
-+"
-+ fi
++ return p;
++}
+
-+ $ECHO "\
++char *
++xstrdup (const char *string)
++{
++ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
++ string) : NULL;
++}
+
-+ if test -f \"\$progdir/\$program\"; then"
++const char *
++base_name (const char *name)
++{
++ const char *base;
+
-+ # fixup the dll searchpath if we need to.
-+ #
-+ # Fix the DLL searchpath if we need to. Do this before prepending
-+ # to shlibpath, because on Windows, both are PATH and uninstalled
-+ # libraries must come first.
-+ if test -n "$dllsearchpath"; then
-+ $ECHO "\
-+ # Add the dll search path components to the executable PATH
-+ PATH=$dllsearchpath:\$PATH
-+"
-+ fi
++#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
++ /* Skip over the disk name in MSDOS pathnames. */
++ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
++ name += 2;
++#endif
+
-+ # Export our shlibpath_var if we have one.
-+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-+ $ECHO "\
-+ # Add our own library path to $shlibpath_var
-+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
++ for (base = name; *name; name++)
++ if (IS_DIR_SEPARATOR (*name))
++ base = name + 1;
++ return base;
++}
+
-+ # Some systems cannot cope with colon-terminated $shlibpath_var
-+ # The second colon is a workaround for a bug in BeOS R4 sed
-+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
++int
++check_executable (const char *path)
++{
++ struct stat st;
+
-+ export $shlibpath_var
-+"
-+ fi
++ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
++ nonempty (path));
++ if ((!path) || (!*path))
++ return 0;
+
-+ $ECHO "\
-+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
-+ # Run the actual program with our arguments.
-+ func_exec_program \${1+\"\$@\"}
-+ fi
++ if ((stat (path, &st) >= 0)
++ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
++ return 1;
+ else
-+ # The program doesn't exist.
-+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
-+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
-+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
-+ exit 1
-+ fi
-+fi\
-+"
++ return 0;
+}
+
-+
-+# func_emit_cwrapperexe_src
-+# emit the source code for a wrapper executable on stdout
-+# Must ONLY be called from within func_mode_link because
-+# it depends on a number of variable set therein.
-+func_emit_cwrapperexe_src ()
++int
++make_executable (const char *path)
+{
-+ cat <<EOF
++ int rval = 0;
++ struct stat st;
+
-+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
-+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
++ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
++ nonempty (path));
++ if ((!path) || (!*path))
++ return 0;
+
-+ The $output program cannot be directly executed until all the libtool
-+ libraries that it depends on are installed.
++ if (stat (path, &st) >= 0)
++ {
++ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
++ }
++ return rval;
++}
+
-+ This wrapper executable should never be moved out of the build directory.
-+ If it is, it will not operate correctly.
++/* Searches for the full path of the wrapper. Returns
++ newly allocated full path name if found, NULL otherwise
++ Does not chase symlinks, even on platforms that support them.
+*/
-+EOF
-+ cat <<"EOF"
-+#ifdef _MSC_VER
-+# define _CRT_SECURE_NO_DEPRECATE 1
++char *
++find_executable (const char *wrapper)
++{
++ int has_slash = 0;
++ const char *p;
++ const char *p_next;
++ /* static buffer for getcwd */
++ char tmp[LT_PATHMAX + 1];
++ int tmp_len;
++ char *concat_name;
++
++ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
++ nonempty (wrapper));
++
++ if ((wrapper == NULL) || (*wrapper == '\0'))
++ return NULL;
++
++ /* Absolute path? */
++#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
++ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
++ {
++ concat_name = xstrdup (wrapper);
++ if (check_executable (concat_name))
++ return concat_name;
++ XFREE (concat_name);
++ }
++ else
++ {
+#endif
-+#include <stdio.h>
-+#include <stdlib.h>
-+#ifdef _MSC_VER
-+# include <direct.h>
-+# include <process.h>
-+# include <io.h>
-+#else
-+# include <unistd.h>
-+# include <stdint.h>
-+# ifdef __CYGWIN__
-+# include <io.h>
-+# endif
++ if (IS_DIR_SEPARATOR (wrapper[0]))
++ {
++ concat_name = xstrdup (wrapper);
++ if (check_executable (concat_name))
++ return concat_name;
++ XFREE (concat_name);
++ }
++#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
++ }
+#endif
-+#include <malloc.h>
-+#include <stdarg.h>
-+#include <assert.h>
-+#include <string.h>
-+#include <ctype.h>
-+#include <errno.h>
-+#include <fcntl.h>
-+#include <sys/stat.h>
+
-+/* declarations of non-ANSI functions */
-+#if defined(__MINGW32__)
-+# ifdef __STRICT_ANSI__
-+int _putenv (const char *);
-+# endif
-+#elif defined(__CYGWIN__)
-+# ifdef __STRICT_ANSI__
-+char *realpath (const char *, char *);
-+int putenv (char *);
-+int setenv (const char *, const char *, int);
-+# endif
-+/* #elif defined (other platforms) ... */
-+#endif
++ for (p = wrapper; *p; p++)
++ if (*p == '/')
++ {
++ has_slash = 1;
++ break;
++ }
++ if (!has_slash)
++ {
++ /* no slashes; search PATH */
++ const char *path = getenv ("PATH");
++ if (path != NULL)
++ {
++ for (p = path; *p; p = p_next)
++ {
++ const char *q;
++ size_t p_len;
++ for (q = p; *q; q++)
++ if (IS_PATH_SEPARATOR (*q))
++ break;
++ p_len = q - p;
++ p_next = (*q == '\0' ? q : q + 1);
++ if (p_len == 0)
++ {
++ /* empty path: current directory */
++ if (getcwd (tmp, LT_PATHMAX) == NULL)
++ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
++ nonnull (strerror (errno)));
++ tmp_len = strlen (tmp);
++ concat_name =
++ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
++ memcpy (concat_name, tmp, tmp_len);
++ concat_name[tmp_len] = '/';
++ strcpy (concat_name + tmp_len + 1, wrapper);
++ }
++ else
++ {
++ concat_name =
++ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
++ memcpy (concat_name, p, p_len);
++ concat_name[p_len] = '/';
++ strcpy (concat_name + p_len + 1, wrapper);
++ }
++ if (check_executable (concat_name))
++ return concat_name;
++ XFREE (concat_name);
++ }
++ }
++ /* not found in PATH; assume curdir */
++ }
++ /* Relative path | not found in path: prepend cwd */
++ if (getcwd (tmp, LT_PATHMAX) == NULL)
++ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
++ nonnull (strerror (errno)));
++ tmp_len = strlen (tmp);
++ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
++ memcpy (concat_name, tmp, tmp_len);
++ concat_name[tmp_len] = '/';
++ strcpy (concat_name + tmp_len + 1, wrapper);
+
-+/* portability defines, excluding path handling macros */
-+#if defined(_MSC_VER)
-+# define setmode _setmode
-+# define stat _stat
-+# define chmod _chmod
-+# define getcwd _getcwd
-+# define putenv _putenv
-+# define S_IXUSR _S_IEXEC
-+# ifndef _INTPTR_T_DEFINED
-+# define _INTPTR_T_DEFINED
-+# define intptr_t int
-+# endif
-+#elif defined(__MINGW32__)
-+# define setmode _setmode
-+# define stat _stat
-+# define chmod _chmod
-+# define getcwd _getcwd
-+# define putenv _putenv
-+#elif defined(__CYGWIN__)
-+# define HAVE_SETENV
-+# define FOPEN_WB "wb"
-+/* #elif defined (other platforms) ... */
-+#endif
++ if (check_executable (concat_name))
++ return concat_name;
++ XFREE (concat_name);
++ return NULL;
++}
+
-+#if defined(PATH_MAX)
-+# define LT_PATHMAX PATH_MAX
-+#elif defined(MAXPATHLEN)
-+# define LT_PATHMAX MAXPATHLEN
++char *
++chase_symlinks (const char *pathspec)
++{
++#ifndef S_ISLNK
++ return xstrdup (pathspec);
+#else
-+# define LT_PATHMAX 1024
-+#endif
++ char buf[LT_PATHMAX];
++ struct stat s;
++ char *tmp_pathspec = xstrdup (pathspec);
++ char *p;
++ int has_symlinks = 0;
++ while (strlen (tmp_pathspec) && !has_symlinks)
++ {
++ lt_debugprintf (__FILE__, __LINE__,
++ "checking path component for symlinks: %s\n",
++ tmp_pathspec);
++ if (lstat (tmp_pathspec, &s) == 0)
++ {
++ if (S_ISLNK (s.st_mode) != 0)
++ {
++ has_symlinks = 1;
++ break;
++ }
+
-+#ifndef S_IXOTH
-+# define S_IXOTH 0
-+#endif
-+#ifndef S_IXGRP
-+# define S_IXGRP 0
-+#endif
++ /* search backwards for last DIR_SEPARATOR */
++ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
++ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
++ p--;
++ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
++ {
++ /* no more DIR_SEPARATORS left */
++ break;
++ }
++ *p = '\0';
++ }
++ else
++ {
++ lt_fatal (__FILE__, __LINE__,
++ "error accessing file \"%s\": %s",
++ tmp_pathspec, nonnull (strerror (errno)));
++ }
++ }
++ XFREE (tmp_pathspec);
+
-+/* path handling portability macros */
-+#ifndef DIR_SEPARATOR
-+# define DIR_SEPARATOR '/'
-+# define PATH_SEPARATOR ':'
-+#endif
++ if (!has_symlinks)
++ {
++ return xstrdup (pathspec);
++ }
+
-+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
-+ defined (__OS2__)
-+# define HAVE_DOS_BASED_FILE_SYSTEM
-+# define FOPEN_WB "wb"
-+# ifndef DIR_SEPARATOR_2
-+# define DIR_SEPARATOR_2 '\\'
-+# endif
-+# ifndef PATH_SEPARATOR_2
-+# define PATH_SEPARATOR_2 ';'
-+# endif
++ tmp_pathspec = realpath (pathspec, buf);
++ if (tmp_pathspec == 0)
++ {
++ lt_fatal (__FILE__, __LINE__,
++ "could not follow symlinks for %s", pathspec);
++ }
++ return xstrdup (tmp_pathspec);
+#endif
++}
+
-+#ifndef DIR_SEPARATOR_2
-+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-+#else /* DIR_SEPARATOR_2 */
-+# define IS_DIR_SEPARATOR(ch) \
-+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-+#endif /* DIR_SEPARATOR_2 */
++char *
++strendzap (char *str, const char *pat)
++{
++ size_t len, patlen;
+
-+#ifndef PATH_SEPARATOR_2
-+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
-+#else /* PATH_SEPARATOR_2 */
-+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
-+#endif /* PATH_SEPARATOR_2 */
++ assert (str != NULL);
++ assert (pat != NULL);
+
-+#ifndef FOPEN_WB
-+# define FOPEN_WB "w"
-+#endif
-+#ifndef _O_BINARY
-+# define _O_BINARY 0
-+#endif
++ len = strlen (str);
++ patlen = strlen (pat);
+
-+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
-+#define XFREE(stale) do { \
-+ if (stale) { free ((void *) stale); stale = 0; } \
-+} while (0)
++ if (patlen <= len)
++ {
++ str += len - patlen;
++ if (strcmp (str, pat) == 0)
++ *str = '\0';
++ }
++ return str;
++}
+
-+#if defined(LT_DEBUGWRAPPER)
-+static int lt_debug = 1;
-+#else
-+static int lt_debug = 0;
-+#endif
++void
++lt_debugprintf (const char *file, int line, const char *fmt, ...)
++{
++ va_list args;
++ if (lt_debug)
++ {
++ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
++ va_start (args, fmt);
++ (void) vfprintf (stderr, fmt, args);
++ va_end (args);
++ }
++}
+
-+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
++static void
++lt_error_core (int exit_status, const char *file,
++ int line, const char *mode,
++ const char *message, va_list ap)
++{
++ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
++ vfprintf (stderr, message, ap);
++ fprintf (stderr, ".\n");
+
-+void *xmalloc (size_t num);
-+char *xstrdup (const char *string);
-+const char *base_name (const char *name);
-+char *find_executable (const char *wrapper);
-+char *chase_symlinks (const char *pathspec);
-+int make_executable (const char *path);
-+int check_executable (const char *path);
-+char *strendzap (char *str, const char *pat);
-+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
-+void lt_fatal (const char *file, int line, const char *message, ...);
-+static const char *nonnull (const char *s);
-+static const char *nonempty (const char *s);
-+void lt_setenv (const char *name, const char *value);
-+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
-+void lt_update_exe_path (const char *name, const char *value);
-+void lt_update_lib_path (const char *name, const char *value);
-+char **prepare_spawn (char **argv);
-+void lt_dump_script (FILE *f);
-+EOF
-+
-+ cat <<EOF
-+volatile const char * MAGIC_EXE = "$magic_exe";
-+const char * LIB_PATH_VARNAME = "$shlibpath_var";
-+EOF
-+
-+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-+ func_to_host_path "$temp_rpath"
-+ cat <<EOF
-+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
-+EOF
-+ else
-+ cat <<"EOF"
-+const char * LIB_PATH_VALUE = "";
-+EOF
-+ fi
-+
-+ if test -n "$dllsearchpath"; then
-+ func_to_host_path "$dllsearchpath:"
-+ cat <<EOF
-+const char * EXE_PATH_VARNAME = "PATH";
-+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
-+EOF
-+ else
-+ cat <<"EOF"
-+const char * EXE_PATH_VARNAME = "";
-+const char * EXE_PATH_VALUE = "";
-+EOF
-+ fi
-+
-+ if test "$fast_install" = yes; then
-+ cat <<EOF
-+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
-+EOF
-+ else
-+ cat <<EOF
-+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
-+EOF
-+ fi
-+
-+
-+ cat <<"EOF"
-+
-+#define LTWRAPPER_OPTION_PREFIX "--lt-"
++ if (exit_status >= 0)
++ exit (exit_status);
++}
+
-+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
-+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
-+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
++void
++lt_fatal (const char *file, int line, const char *message, ...)
++{
++ va_list ap;
++ va_start (ap, message);
++ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
++ va_end (ap);
++}
+
-+int
-+main (int argc, char *argv[])
++static const char *
++nonnull (const char *s)
+{
-+ char **newargz;
-+ int newargc;
-+ char *tmp_pathspec;
-+ char *actual_cwrapper_path;
-+ char *actual_cwrapper_name;
-+ char *target_name;
-+ char *lt_argv_zero;
-+ intptr_t rval = 127;
++ return s ? s : "(null)";
++}
+
-+ int i;
++static const char *
++nonempty (const char *s)
++{
++ return (s && !*s) ? "(empty)" : nonnull (s);
++}
+
-+ program_name = (char *) xstrdup (base_name (argv[0]));
-+ newargz = XMALLOC (char *, argc + 1);
++void
++lt_setenv (const char *name, const char *value)
++{
++ lt_debugprintf (__FILE__, __LINE__,
++ "(lt_setenv) setting '%s' to '%s'\n",
++ nonnull (name), nonnull (value));
++ {
++#ifdef HAVE_SETENV
++ /* always make a copy, for consistency with !HAVE_SETENV */
++ char *str = xstrdup (value);
++ setenv (name, str, 1);
++#else
++ int len = strlen (name) + 1 + strlen (value) + 1;
++ char *str = XMALLOC (char, len);
++ sprintf (str, "%s=%s", name, value);
++ if (putenv (str) != EXIT_SUCCESS)
++ {
++ XFREE (str);
++ }
++#endif
++ }
++}
+
-+ /* very simple arg parsing; don't want to rely on getopt
-+ * also, copy all non cwrapper options to newargz, except
-+ * argz[0], which is handled differently
-+ */
-+ newargc=0;
-+ for (i = 1; i < argc; i++)
++char *
++lt_extend_str (const char *orig_value, const char *add, int to_end)
++{
++ char *new_value;
++ if (orig_value && *orig_value)
+ {
-+ if (strcmp (argv[i], dumpscript_opt) == 0)
-+ {
-+EOF
-+ case "$host" in
-+ *mingw* | *cygwin* )
-+ # make stdout use "unix" line endings
-+ echo " setmode(1,_O_BINARY);"
-+ ;;
-+ esac
-+
-+ cat <<"EOF"
-+ lt_dump_script (stdout);
-+ return 0;
-+ }
-+ if (strcmp (argv[i], debug_opt) == 0)
-+ {
-+ lt_debug = 1;
-+ continue;
-+ }
-+ if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
++ int orig_value_len = strlen (orig_value);
++ int add_len = strlen (add);
++ new_value = XMALLOC (char, add_len + orig_value_len + 1);
++ if (to_end)
+ {
-+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
-+ namespace, but it is not one of the ones we know about and
-+ have already dealt with, above (inluding dump-script), then
-+ report an error. Otherwise, targets might begin to believe
-+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
-+ namespace. The first time any user complains about this, we'll
-+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
-+ or a configure.ac-settable value.
-+ */
-+ lt_fatal (__FILE__, __LINE__,
-+ "unrecognized %s option: '%s'",
-+ ltwrapper_option_prefix, argv[i]);
++ strcpy (new_value, orig_value);
++ strcpy (new_value + orig_value_len, add);
++ }
++ else
++ {
++ strcpy (new_value, add);
++ strcpy (new_value + add_len, orig_value);
+ }
-+ /* otherwise ... */
-+ newargz[++newargc] = xstrdup (argv[i]);
+ }
-+ newargz[++newargc] = NULL;
-+
-+EOF
-+ cat <<EOF
-+ /* The GNU banner must be the first non-error debug message */
-+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
-+EOF
-+ cat <<"EOF"
-+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
-+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
-+
-+ tmp_pathspec = find_executable (argv[0]);
-+ if (tmp_pathspec == NULL)
-+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
-+ lt_debugprintf (__FILE__, __LINE__,
-+ "(main) found exe (before symlink chase) at: %s\n",
-+ tmp_pathspec);
++ else
++ {
++ new_value = xstrdup (add);
++ }
++ return new_value;
++}
+
-+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
++void
++lt_update_exe_path (const char *name, const char *value)
++{
+ lt_debugprintf (__FILE__, __LINE__,
-+ "(main) found exe (after symlink chase) at: %s\n",
-+ actual_cwrapper_path);
-+ XFREE (tmp_pathspec);
-+
-+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
-+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
-+
-+ /* wrapper name transforms */
-+ strendzap (actual_cwrapper_name, ".exe");
-+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
-+ XFREE (actual_cwrapper_name);
-+ actual_cwrapper_name = tmp_pathspec;
-+ tmp_pathspec = 0;
++ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
++ nonnull (name), nonnull (value));
+
-+ /* target_name transforms -- use actual target program name; might have lt- prefix */
-+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
-+ strendzap (target_name, ".exe");
-+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
-+ XFREE (target_name);
-+ target_name = tmp_pathspec;
-+ tmp_pathspec = 0;
++ if (name && *name && value && *value)
++ {
++ char *new_value = lt_extend_str (getenv (name), value, 0);
++ /* some systems can't cope with a ':'-terminated path #' */
++ int len = strlen (new_value);
++ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
++ {
++ new_value[len-1] = '\0';
++ }
++ lt_setenv (name, new_value);
++ XFREE (new_value);
++ }
++}
+
++void
++lt_update_lib_path (const char *name, const char *value)
++{
+ lt_debugprintf (__FILE__, __LINE__,
-+ "(main) libtool target name: %s\n",
-+ target_name);
-+EOF
-+
-+ cat <<EOF
-+ newargz[0] =
-+ XMALLOC (char, (strlen (actual_cwrapper_path) +
-+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
-+ strcpy (newargz[0], actual_cwrapper_path);
-+ strcat (newargz[0], "$objdir");
-+ strcat (newargz[0], "/");
-+EOF
-+
-+ cat <<"EOF"
-+ /* stop here, and copy so we don't have to do this twice */
-+ tmp_pathspec = xstrdup (newargz[0]);
++ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
++ nonnull (name), nonnull (value));
+
-+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
-+ strcat (newargz[0], actual_cwrapper_name);
++ if (name && *name && value && *value)
++ {
++ char *new_value = lt_extend_str (getenv (name), value, 0);
++ lt_setenv (name, new_value);
++ XFREE (new_value);
++ }
++}
+
-+ /* DO want the lt- prefix here if it exists, so use target_name */
-+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
-+ XFREE (tmp_pathspec);
-+ tmp_pathspec = NULL;
+EOF
-+
+ case $host_os in
+ mingw*)
-+ cat <<"EOF"
-+ {
-+ char* p;
-+ while ((p = strchr (newargz[0], '\\')) != NULL)
-+ {
-+ *p = '/';
-+ }
-+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
-+ {
-+ *p = '/';
-+ }
-+ }
-+EOF
-+ ;;
-+ esac
-+
-+ cat <<"EOF"
-+ XFREE (target_name);
-+ XFREE (actual_cwrapper_path);
-+ XFREE (actual_cwrapper_name);
++ cat <<"EOF"
+
-+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
-+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
-+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
-+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
-+ because on Windows, both *_VARNAMEs are PATH but uninstalled
-+ libraries must come first. */
-+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
-+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
++/* Prepares an argument vector before calling spawn().
++ Note that spawn() does not by itself call the command interpreter
++ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
++ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
++ GetVersionEx(&v);
++ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
++ }) ? "cmd.exe" : "command.com").
++ Instead it simply concatenates the arguments, separated by ' ', and calls
++ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
++ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
++ special way:
++ - Space and tab are interpreted as delimiters. They are not treated as
++ delimiters if they are surrounded by double quotes: "...".
++ - Unescaped double quotes are removed from the input. Their only effect is
++ that within double quotes, space and tab are treated like normal
++ characters.
++ - Backslashes not followed by double quotes are not special.
++ - But 2*n+1 backslashes followed by a double quote become
++ n backslashes followed by a double quote (n >= 0):
++ \" -> "
++ \\\" -> \"
++ \\\\\" -> \\"
++ */
++#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
++#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
++char **
++prepare_spawn (char **argv)
++{
++ size_t argc;
++ char **new_argv;
++ size_t i;
+
-+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
-+ nonnull (lt_argv_zero));
-+ for (i = 0; i < newargc; i++)
-+ {
-+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
-+ i, nonnull (newargz[i]));
-+ }
++ /* Count number of arguments. */
++ for (argc = 0; argv[argc] != NULL; argc++)
++ ;
+
-+EOF
++ /* Allocate new argument vector. */
++ new_argv = XMALLOC (char *, argc + 1);
+
-+ case $host_os in
-+ mingw*)
-+ cat <<"EOF"
-+ /* execv doesn't actually work on mingw as expected on unix */
-+ newargz = prepare_spawn (newargz);
-+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
-+ if (rval == -1)
++ /* Put quoted arguments into the new argument vector. */
++ for (i = 0; i < argc; i++)
+ {
-+ /* failed to start process */
-+ lt_debugprintf (__FILE__, __LINE__,
-+ "(main) failed to launch target \"%s\": %s\n",
-+ lt_argv_zero, nonnull (strerror (errno)));
-+ return 127;
-+ }
-+ return rval;
-+EOF
-+ ;;
-+ *)
-+ cat <<"EOF"
-+ execv (lt_argv_zero, newargz);
-+ return rval; /* =127, but avoids unused variable warning */
-+EOF
-+ ;;
-+ esac
-+
-+ cat <<"EOF"
-+}
++ const char *string = argv[i];
+
-+void *
-+xmalloc (size_t num)
-+{
-+ void *p = (void *) malloc (num);
-+ if (!p)
-+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
++ if (string[0] == '\0')
++ new_argv[i] = xstrdup ("\"\"");
++ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
++ {
++ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
++ size_t length;
++ unsigned int backslashes;
++ const char *s;
++ char *quoted_string;
++ char *p;
+
-+ return p;
-+}
++ length = 0;
++ backslashes = 0;
++ if (quote_around)
++ length++;
++ for (s = string; *s != '\0'; s++)
++ {
++ char c = *s;
++ if (c == '"')
++ length += backslashes + 1;
++ length++;
++ if (c == '\\')
++ backslashes++;
++ else
++ backslashes = 0;
++ }
++ if (quote_around)
++ length += backslashes + 1;
+
-+char *
-+xstrdup (const char *string)
-+{
-+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
-+ string) : NULL;
-+}
++ quoted_string = XMALLOC (char, length + 1);
+
-+const char *
-+base_name (const char *name)
-+{
-+ const char *base;
++ p = quoted_string;
++ backslashes = 0;
++ if (quote_around)
++ *p++ = '"';
++ for (s = string; *s != '\0'; s++)
++ {
++ char c = *s;
++ if (c == '"')
++ {
++ unsigned int j;
++ for (j = backslashes + 1; j > 0; j--)
++ *p++ = '\\';
++ }
++ *p++ = c;
++ if (c == '\\')
++ backslashes++;
++ else
++ backslashes = 0;
++ }
++ if (quote_around)
++ {
++ unsigned int j;
++ for (j = backslashes; j > 0; j--)
++ *p++ = '\\';
++ *p++ = '"';
++ }
++ *p = '\0';
+
-+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-+ /* Skip over the disk name in MSDOS pathnames. */
-+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
-+ name += 2;
-+#endif
++ new_argv[i] = quoted_string;
++ }
++ else
++ new_argv[i] = (char *) string;
++ }
++ new_argv[argc] = NULL;
+
-+ for (base = name; *name; name++)
-+ if (IS_DIR_SEPARATOR (*name))
-+ base = name + 1;
-+ return base;
++ return new_argv;
+}
++EOF
++ ;;
++ esac
+
-+int
-+check_executable (const char *path)
++ cat <<"EOF"
++void lt_dump_script (FILE* f)
+{
-+ struct stat st;
-+
-+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
-+ nonempty (path));
-+ if ((!path) || (!*path))
-+ return 0;
++EOF
++ func_emit_wrapper yes |
++ $SED -e 's/\([\\"]\)/\\\1/g' \
++ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
+
-+ if ((stat (path, &st) >= 0)
-+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
-+ return 1;
-+ else
-+ return 0;
++ cat <<"EOF"
++}
++EOF
+}
++# end: func_emit_cwrapperexe_src
+
-+int
-+make_executable (const char *path)
++# func_win32_import_lib_p ARG
++# True if ARG is an import lib, as indicated by $file_magic_cmd
++func_win32_import_lib_p ()
+{
-+ int rval = 0;
-+ struct stat st;
-+
-+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
-+ nonempty (path));
-+ if ((!path) || (!*path))
-+ return 0;
-+
-+ if (stat (path, &st) >= 0)
-+ {
-+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
-+ }
-+ return rval;
++ $opt_debug
++ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
++ *import*) : ;;
++ *) false ;;
++ esac
+}
+
-+/* Searches for the full path of the wrapper. Returns
-+ newly allocated full path name if found, NULL otherwise
-+ Does not chase symlinks, even on platforms that support them.
-+*/
-+char *
-+find_executable (const char *wrapper)
-+{
-+ int has_slash = 0;
-+ const char *p;
-+ const char *p_next;
-+ /* static buffer for getcwd */
-+ char tmp[LT_PATHMAX + 1];
-+ int tmp_len;
-+ char *concat_name;
-+
-+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
-+ nonempty (wrapper));
-+
-+ if ((wrapper == NULL) || (*wrapper == '\0'))
-+ return NULL;
-+
-+ /* Absolute path? */
-+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
-+ {
-+ concat_name = xstrdup (wrapper);
-+ if (check_executable (concat_name))
-+ return concat_name;
-+ XFREE (concat_name);
-+ }
-+ else
-+ {
-+#endif
-+ if (IS_DIR_SEPARATOR (wrapper[0]))
-+ {
-+ concat_name = xstrdup (wrapper);
-+ if (check_executable (concat_name))
-+ return concat_name;
-+ XFREE (concat_name);
-+ }
-+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-+ }
-+#endif
-+
-+ for (p = wrapper; *p; p++)
-+ if (*p == '/')
-+ {
-+ has_slash = 1;
-+ break;
-+ }
-+ if (!has_slash)
-+ {
-+ /* no slashes; search PATH */
-+ const char *path = getenv ("PATH");
-+ if (path != NULL)
-+ {
-+ for (p = path; *p; p = p_next)
-+ {
-+ const char *q;
-+ size_t p_len;
-+ for (q = p; *q; q++)
-+ if (IS_PATH_SEPARATOR (*q))
-+ break;
-+ p_len = q - p;
-+ p_next = (*q == '\0' ? q : q + 1);
-+ if (p_len == 0)
-+ {
-+ /* empty path: current directory */
-+ if (getcwd (tmp, LT_PATHMAX) == NULL)
-+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
-+ nonnull (strerror (errno)));
-+ tmp_len = strlen (tmp);
-+ concat_name =
-+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
-+ memcpy (concat_name, tmp, tmp_len);
-+ concat_name[tmp_len] = '/';
-+ strcpy (concat_name + tmp_len + 1, wrapper);
-+ }
-+ else
-+ {
-+ concat_name =
-+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
-+ memcpy (concat_name, p, p_len);
-+ concat_name[p_len] = '/';
-+ strcpy (concat_name + p_len + 1, wrapper);
-+ }
-+ if (check_executable (concat_name))
-+ return concat_name;
-+ XFREE (concat_name);
-+ }
-+ }
-+ /* not found in PATH; assume curdir */
-+ }
-+ /* Relative path | not found in path: prepend cwd */
-+ if (getcwd (tmp, LT_PATHMAX) == NULL)
-+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
-+ nonnull (strerror (errno)));
-+ tmp_len = strlen (tmp);
-+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
-+ memcpy (concat_name, tmp, tmp_len);
-+ concat_name[tmp_len] = '/';
-+ strcpy (concat_name + tmp_len + 1, wrapper);
-+
-+ if (check_executable (concat_name))
-+ return concat_name;
-+ XFREE (concat_name);
-+ return NULL;
-+}
-+
-+char *
-+chase_symlinks (const char *pathspec)
-+{
-+#ifndef S_ISLNK
-+ return xstrdup (pathspec);
-+#else
-+ char buf[LT_PATHMAX];
-+ struct stat s;
-+ char *tmp_pathspec = xstrdup (pathspec);
-+ char *p;
-+ int has_symlinks = 0;
-+ while (strlen (tmp_pathspec) && !has_symlinks)
-+ {
-+ lt_debugprintf (__FILE__, __LINE__,
-+ "checking path component for symlinks: %s\n",
-+ tmp_pathspec);
-+ if (lstat (tmp_pathspec, &s) == 0)
-+ {
-+ if (S_ISLNK (s.st_mode) != 0)
-+ {
-+ has_symlinks = 1;
-+ break;
-+ }
-+
-+ /* search backwards for last DIR_SEPARATOR */
-+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
-+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
-+ p--;
-+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
-+ {
-+ /* no more DIR_SEPARATORS left */
-+ break;
-+ }
-+ *p = '\0';
-+ }
-+ else
-+ {
-+ lt_fatal (__FILE__, __LINE__,
-+ "error accessing file \"%s\": %s",
-+ tmp_pathspec, nonnull (strerror (errno)));
-+ }
-+ }
-+ XFREE (tmp_pathspec);
-+
-+ if (!has_symlinks)
-+ {
-+ return xstrdup (pathspec);
-+ }
-+
-+ tmp_pathspec = realpath (pathspec, buf);
-+ if (tmp_pathspec == 0)
-+ {
-+ lt_fatal (__FILE__, __LINE__,
-+ "could not follow symlinks for %s", pathspec);
-+ }
-+ return xstrdup (tmp_pathspec);
-+#endif
-+}
-+
-+char *
-+strendzap (char *str, const char *pat)
-+{
-+ size_t len, patlen;
-+
-+ assert (str != NULL);
-+ assert (pat != NULL);
-+
-+ len = strlen (str);
-+ patlen = strlen (pat);
-+
-+ if (patlen <= len)
-+ {
-+ str += len - patlen;
-+ if (strcmp (str, pat) == 0)
-+ *str = '\0';
-+ }
-+ return str;
-+}
-+
-+void
-+lt_debugprintf (const char *file, int line, const char *fmt, ...)
-+{
-+ va_list args;
-+ if (lt_debug)
-+ {
-+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
-+ va_start (args, fmt);
-+ (void) vfprintf (stderr, fmt, args);
-+ va_end (args);
-+ }
-+}
-+
-+static void
-+lt_error_core (int exit_status, const char *file,
-+ int line, const char *mode,
-+ const char *message, va_list ap)
-+{
-+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
-+ vfprintf (stderr, message, ap);
-+ fprintf (stderr, ".\n");
-+
-+ if (exit_status >= 0)
-+ exit (exit_status);
-+}
-+
-+void
-+lt_fatal (const char *file, int line, const char *message, ...)
-+{
-+ va_list ap;
-+ va_start (ap, message);
-+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
-+ va_end (ap);
-+}
-+
-+static const char *
-+nonnull (const char *s)
-+{
-+ return s ? s : "(null)";
-+}
-+
-+static const char *
-+nonempty (const char *s)
-+{
-+ return (s && !*s) ? "(empty)" : nonnull (s);
-+}
-+
-+void
-+lt_setenv (const char *name, const char *value)
-+{
-+ lt_debugprintf (__FILE__, __LINE__,
-+ "(lt_setenv) setting '%s' to '%s'\n",
-+ nonnull (name), nonnull (value));
-+ {
-+#ifdef HAVE_SETENV
-+ /* always make a copy, for consistency with !HAVE_SETENV */
-+ char *str = xstrdup (value);
-+ setenv (name, str, 1);
-+#else
-+ int len = strlen (name) + 1 + strlen (value) + 1;
-+ char *str = XMALLOC (char, len);
-+ sprintf (str, "%s=%s", name, value);
-+ if (putenv (str) != EXIT_SUCCESS)
-+ {
-+ XFREE (str);
-+ }
-+#endif
-+ }
-+}
-+
-+char *
-+lt_extend_str (const char *orig_value, const char *add, int to_end)
-+{
-+ char *new_value;
-+ if (orig_value && *orig_value)
-+ {
-+ int orig_value_len = strlen (orig_value);
-+ int add_len = strlen (add);
-+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
-+ if (to_end)
-+ {
-+ strcpy (new_value, orig_value);
-+ strcpy (new_value + orig_value_len, add);
-+ }
-+ else
-+ {
-+ strcpy (new_value, add);
-+ strcpy (new_value + add_len, orig_value);
-+ }
-+ }
-+ else
-+ {
-+ new_value = xstrdup (add);
-+ }
-+ return new_value;
-+}
-+
-+void
-+lt_update_exe_path (const char *name, const char *value)
-+{
-+ lt_debugprintf (__FILE__, __LINE__,
-+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
-+ nonnull (name), nonnull (value));
-+
-+ if (name && *name && value && *value)
-+ {
-+ char *new_value = lt_extend_str (getenv (name), value, 0);
-+ /* some systems can't cope with a ':'-terminated path #' */
-+ int len = strlen (new_value);
-+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
-+ {
-+ new_value[len-1] = '\0';
-+ }
-+ lt_setenv (name, new_value);
-+ XFREE (new_value);
-+ }
-+}
-+
-+void
-+lt_update_lib_path (const char *name, const char *value)
-+{
-+ lt_debugprintf (__FILE__, __LINE__,
-+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
-+ nonnull (name), nonnull (value));
-+
-+ if (name && *name && value && *value)
-+ {
-+ char *new_value = lt_extend_str (getenv (name), value, 0);
-+ lt_setenv (name, new_value);
-+ XFREE (new_value);
-+ }
-+}
-+
-+EOF
-+ case $host_os in
-+ mingw*)
-+ cat <<"EOF"
-+
-+/* Prepares an argument vector before calling spawn().
-+ Note that spawn() does not by itself call the command interpreter
-+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
-+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-+ GetVersionEx(&v);
-+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
-+ }) ? "cmd.exe" : "command.com").
-+ Instead it simply concatenates the arguments, separated by ' ', and calls
-+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
-+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
-+ special way:
-+ - Space and tab are interpreted as delimiters. They are not treated as
-+ delimiters if they are surrounded by double quotes: "...".
-+ - Unescaped double quotes are removed from the input. Their only effect is
-+ that within double quotes, space and tab are treated like normal
-+ characters.
-+ - Backslashes not followed by double quotes are not special.
-+ - But 2*n+1 backslashes followed by a double quote become
-+ n backslashes followed by a double quote (n >= 0):
-+ \" -> "
-+ \\\" -> \"
-+ \\\\\" -> \\"
-+ */
-+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
-+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
-+char **
-+prepare_spawn (char **argv)
-+{
-+ size_t argc;
-+ char **new_argv;
-+ size_t i;
-+
-+ /* Count number of arguments. */
-+ for (argc = 0; argv[argc] != NULL; argc++)
-+ ;
-+
-+ /* Allocate new argument vector. */
-+ new_argv = XMALLOC (char *, argc + 1);
-+
-+ /* Put quoted arguments into the new argument vector. */
-+ for (i = 0; i < argc; i++)
-+ {
-+ const char *string = argv[i];
-+
-+ if (string[0] == '\0')
-+ new_argv[i] = xstrdup ("\"\"");
-+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
-+ {
-+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
-+ size_t length;
-+ unsigned int backslashes;
-+ const char *s;
-+ char *quoted_string;
-+ char *p;
-+
-+ length = 0;
-+ backslashes = 0;
-+ if (quote_around)
-+ length++;
-+ for (s = string; *s != '\0'; s++)
-+ {
-+ char c = *s;
-+ if (c == '"')
-+ length += backslashes + 1;
-+ length++;
-+ if (c == '\\')
-+ backslashes++;
-+ else
-+ backslashes = 0;
-+ }
-+ if (quote_around)
-+ length += backslashes + 1;
-+
-+ quoted_string = XMALLOC (char, length + 1);
-+
-+ p = quoted_string;
-+ backslashes = 0;
-+ if (quote_around)
-+ *p++ = '"';
-+ for (s = string; *s != '\0'; s++)
-+ {
-+ char c = *s;
-+ if (c == '"')
-+ {
-+ unsigned int j;
-+ for (j = backslashes + 1; j > 0; j--)
-+ *p++ = '\\';
-+ }
-+ *p++ = c;
-+ if (c == '\\')
-+ backslashes++;
-+ else
-+ backslashes = 0;
-+ }
-+ if (quote_around)
-+ {
-+ unsigned int j;
-+ for (j = backslashes; j > 0; j--)
-+ *p++ = '\\';
-+ *p++ = '"';
-+ }
-+ *p = '\0';
-+
-+ new_argv[i] = quoted_string;
-+ }
-+ else
-+ new_argv[i] = (char *) string;
-+ }
-+ new_argv[argc] = NULL;
-+
-+ return new_argv;
-+}
-+EOF
-+ ;;
-+ esac
-+
-+ cat <<"EOF"
-+void lt_dump_script (FILE* f)
-+{
-+EOF
-+ func_emit_wrapper yes |
-+ $SED -e 's/\([\\"]\)/\\\1/g' \
-+ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
-+
-+ cat <<"EOF"
-+}
-+EOF
-+}
-+# end: func_emit_cwrapperexe_src
-+
-+# func_win32_import_lib_p ARG
-+# True if ARG is an import lib, as indicated by $file_magic_cmd
-+func_win32_import_lib_p ()
-+{
-+ $opt_debug
-+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
-+ *import*) : ;;
-+ *) false ;;
-+ esac
-+}
-+
-+# func_mode_link arg...
-+func_mode_link ()
++# func_mode_link arg...
++func_mode_link ()
+{
+ $opt_debug
case $host in
@@ -10392,7 +9168,7 @@
case "$perm_rpath " in
*" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
-+ *) func_apped perm_rpath " $libdir" ;;
++ *) func_append perm_rpath " $libdir" ;;
esac
fi
done
@@ -13690,7 +12466,7 @@
+# vi:sw=2
+
--- ./install.sh.orig 1999-12-06 15:43:54.000000000 -0700
-+++ ./install.sh 2010-03-29 05:21:24.000000000 -0600
++++ ./install.sh 2012-01-09 20:36:31.871118727 -0700
@@ -1,19 +1,38 @@
-#! /bin/sh
-#
@@ -14395,7 +13171,7 @@
+# time-stamp-end: "; # UTC"
+# End:
--- ./info/texinfo.tex.orig 2002-10-26 09:14:15.000000000 -0600
-+++ ./info/texinfo.tex 2008-05-22 06:11:32.000000000 -0600
++++ ./info/texinfo.tex 2012-01-09 20:36:31.879118561 -0700
@@ -3,15 +3,16 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
@@ -24870,841 +23646,1947 @@
+ \relax
+}
+
-+% Make non-ASCII characters printable again for compatibility with
-+% existing Texinfo documents that may use them, even without declaring a
-+% document encoding.
-+%
-+\setnonasciicharscatcode \other
-+
-+
-+\message{formatting,}
++% Make non-ASCII characters printable again for compatibility with
++% existing Texinfo documents that may use them, even without declaring a
++% document encoding.
++%
++\setnonasciicharscatcode \other
++
++
++\message{formatting,}
++
+ \newdimen\defaultparindent \defaultparindent = 15pt
+
+ \chapheadingskip = 15pt plus 4pt minus 2pt
+@@ -5695,7 +8621,7 @@
+ % Don't be so finicky about underfull hboxes, either.
+ \hbadness = 2000
+
+-% Following George Bush, just get rid of widows and orphans.
++% Following George Bush, get rid of widows and orphans.
+ \widowpenalty=10000
+ \clubpenalty=10000
+
+@@ -5713,11 +8639,14 @@
+ \fi
+ }
+
+-% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
+-% 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can
+-% set \parskip and call \setleading for \baselineskip.
++% Parameters in order: 1) textheight; 2) textwidth;
++% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
++% 7) physical page height; 8) physical page width.
+ %
+-\def\internalpagesizes#1#2#3#4#5#6{%
++% We also call \setleading{\textleading}, so the caller should define
++% \textleading. The caller should also set \parskip.
++%
++\def\internalpagesizes#1#2#3#4#5#6#7#8{%
+ \voffset = #3\relax
+ \topskip = #6\relax
+ \splittopskip = \topskip
+@@ -5736,6 +8665,17 @@
+ \normaloffset = #4\relax
+ \bindingoffset = #5\relax
+ %
++ \ifpdf
++ \pdfpageheight #7\relax
++ \pdfpagewidth #8\relax
++ % if we don't reset these, they will remain at "1 true in" of
++ % whatever layout pdftex was dumped with.
++ \pdfhorigin = 1 true in
++ \pdfvorigin = 1 true in
++ \fi
++ %
++ \setleading{\textleading}
++ %
+ \parindent = \defaultparindent
+ \setemergencystretch
+ }
+@@ -5743,76 +8683,140 @@
+ % @letterpaper (the default).
+ \def\letterpaper{{\globaldefs = 1
+ \parskip = 3pt plus 2pt minus 1pt
+- \setleading{13.2pt}%
++ \textleading = 13.2pt
+ %
+ % If page is nothing but text, make it come out even.
+- \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}%
++ \internalpagesizes{607.2pt}{6in}% that's 46 lines
++ {\voffset}{.25in}%
++ {\bindingoffset}{36pt}%
++ {11in}{8.5in}%
+ }}
+
+-% Use @smallbook to reset parameters for 7x9.5 (or so) format.
++% Use @smallbook to reset parameters for 7x9.25 trim size.
+ \def\smallbook{{\globaldefs = 1
+ \parskip = 2pt plus 1pt
+- \setleading{12pt}%
++ \textleading = 12pt
+ %
+- \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}%
++ \internalpagesizes{7.5in}{5in}%
++ {-.2in}{0in}%
++ {\bindingoffset}{16pt}%
++ {9.25in}{7in}%
+ %
+ \lispnarrowing = 0.3in
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+- \deftypemargin = 0pt
+ \defbodyindent = .5cm
++}}
++
++% Use @smallerbook to reset parameters for 6x9 trim size.
++% (Just testing, parameters still in flux.)
++\def\smallerbook{{\globaldefs = 1
++ \parskip = 1.5pt plus 1pt
++ \textleading = 12pt
+ %
+- \let\smalldisplay = \smalldisplayx
+- \let\smallexample = \smalllispx
+- \let\smallformat = \smallformatx
+- \let\smalllisp = \smalllispx
++ \internalpagesizes{7.4in}{4.8in}%
++ {-.2in}{-.4in}%
++ {0pt}{14pt}%
++ {9in}{6in}%
++ %
++ \lispnarrowing = 0.25in
++ \tolerance = 700
++ \hfuzz = 1pt
++ \contentsrightmargin = 0pt
++ \defbodyindent = .4cm
+ }}
+
+ % Use @afourpaper to print on European A4 paper.
+ \def\afourpaper{{\globaldefs = 1
+- \setleading{12pt}%
+ \parskip = 3pt plus 2pt minus 1pt
++ \textleading = 13.2pt
+ %
+- \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}%
++ % Double-side printing via postscript on Laserjet 4050
++ % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
++ % To change the settings for a different printer or situation, adjust
++ % \normaloffset until the front-side and back-side texts align. Then
++ % do the same for \bindingoffset. You can set these for testing in
++ % your texinfo source file like this:
++ % @tex
++ % \global\normaloffset = -6mm
++ % \global\bindingoffset = 10mm
++ % @end tex
++ \internalpagesizes{673.2pt}{160mm}% that's 51 lines
++ {\voffset}{\hoffset}%
++ {\bindingoffset}{44pt}%
++ {297mm}{210mm}%
+ %
+ \tolerance = 700
+ \hfuzz = 1pt
++ \contentsrightmargin = 0pt
++ \defbodyindent = 5mm
+ }}
+
+-% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
+-% 29mm, hence bottom margin 28mm, nominal side margin 3cm.
+-\def\afourlatex{{\globaldefs = 1
+- \setleading{13.6pt}%
++% Use @afivepaper to print on European A5 paper.
++% From romildo at urano.iceb.ufop.br, 2 July 2000.
++% He also recommends making @example and @lisp be small.
++\def\afivepaper{{\globaldefs = 1
++ \parskip = 2pt plus 1pt minus 0.1pt
++ \textleading = 12.5pt
+ %
++ \internalpagesizes{160mm}{120mm}%
++ {\voffset}{\hoffset}%
++ {\bindingoffset}{8pt}%
++ {210mm}{148mm}%
++ %
++ \lispnarrowing = 0.2in
++ \tolerance = 800
++ \hfuzz = 1.2pt
++ \contentsrightmargin = 0pt
++ \defbodyindent = 2mm
++ \tableindent = 12mm
++}}
++
++% A specific text layout, 24x15cm overall, intended for A4 paper.
++\def\afourlatex{{\globaldefs = 1
+ \afourpaper
+- \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
++ \internalpagesizes{237mm}{150mm}%
++ {\voffset}{4.6mm}%
++ {\bindingoffset}{7mm}%
++ {297mm}{210mm}%
+ %
++ % Must explicitly reset to 0 because we call \afourpaper.
+ \globaldefs = 0
+ }}
+
+-% Use @afourwide to print on European A4 paper in wide format.
+-\def\afourwide{%
++% Use @afourwide to print on A4 paper in landscape format.
++\def\afourwide{{\globaldefs = 1
+ \afourpaper
+- \internalpagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}%
+- %
++ \internalpagesizes{241mm}{165mm}%
++ {\voffset}{-2.95mm}%
++ {\bindingoffset}{7mm}%
++ {297mm}{210mm}%
+ \globaldefs = 0
+-}
++}}
+
+ % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
+ % Perhaps we should allow setting the margins, \topskip, \parskip,
+ % and/or leading, also. Or perhaps we should compute them somehow.
+ %
+-\def\pagesizes{\parsearg\pagesizesxxx}
+-\def\pagesizesxxx#1{\pagesizesyyy #1,,\finish}
++\parseargdef\pagesizes{\pagesizesyyy #1,,\finish}
+ \def\pagesizesyyy#1,#2,#3\finish{{%
+ \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
+ \globaldefs = 1
+ %
+ \parskip = 3pt plus 2pt minus 1pt
+- \setleading{13.2pt}%
++ \setleading{\textleading}%
+ %
+- \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}%
++ \dimen0 = #1\relax
++ \advance\dimen0 by \voffset
++ %
++ \dimen2 = \hsize
++ \advance\dimen2 by \normaloffset
++ %
++ \internalpagesizes{#1}{\hsize}%
++ {\voffset}{\normaloffset}%
++ {\bindingoffset}{44pt}%
++ {\dimen0}{\dimen2}%
+ }}
+
+ % Set default to letter.
+@@ -5840,10 +8844,10 @@
+ \def\normalless{<}
+ \def\normalgreater{>}
+ \def\normalplus{+}
+-\def\normaldollar{$}
++\def\normaldollar{$}%$ font-lock fix
+
+-% This macro is used to make a character print one way in ttfont
+-% where it can probably just be output, and another way in other fonts,
++% This macro is used to make a character print one way in \tt
++% (where it can probably be output as-is), and another way in other fonts,
+ % where something hairier probably needs to be done.
+ %
+ % #1 is what to print if we are indeed using \tt; #2 is what to print
+@@ -5875,8 +8879,9 @@
+
+ \catcode`\_=\active
+ \def_{\ifusingtt\normalunderscore\_}
++\let\realunder=_
+ % Subroutine for the previous macro.
+-\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}}
++\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
+
+ \catcode`\|=\active
+ \def|{{\tt\char124}}
+@@ -5889,16 +8894,7 @@
+ \catcode`\+=\active
+ \def+{{\tt \char 43}}
+ \catcode`\$=\active
+-\def${\ifusingit{{\sl\$}}\normaldollar}
+-%\catcode 27=\active
+-%\def^^[{$\diamondsuit$}
+-
+-% Set up an active definition for =, but don't enable it most of the time.
+-{\catcode`\==\active
+-\global\def={{\tt \char 61}}}
+-
+-\catcode`+=\active
+-\catcode`\_=\active
++\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+
+ % If a .fmt file is being used, characters that might appear in a file
+ % name cannot be active until we have parsed the command line.
+@@ -5906,46 +8902,53 @@
+ % \otherifyactive is called near the end of this file.
+ \def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
+
+-\catcode`\@=0
++% Used sometimes to turn off (effectively) the active characters even after
++% parsing them.
++\def\turnoffactive{%
++ \normalturnoffactive
++ \otherbackslash
++}
+
+-% \rawbackslashxx output one backslash character in current font
+-\global\chardef\rawbackslashxx=`\\
+-%{\catcode`\\=\other
+-%@gdef at rawbackslashxx{\}}
++\catcode`\@=0
+
+-% \rawbackslash redefines \ as input to do \rawbackslashxx.
+-{\catcode`\\=\active
+- at gdef@rawbackslash{@let\=@rawbackslashxx }}
++% \backslashcurfont outputs one backslash character in current font,
++% as in \char`\\.
++\global\chardef\backslashcurfont=`\\
++\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
+
+-% \normalbackslash outputs one backslash in fixed width font.
+-\def\normalbackslash{{\tt\rawbackslashxx}}
++% \realbackslash is an actual character `\' with catcode other, and
++% \doublebackslash is two of them (for the pdf outlines).
++{\catcode`\\=\other @gdef at realbackslash{\} @gdef at doublebackslash{\\}}
+
+-% \catcode 17=0 % Define control-q
++% In texinfo, backslash is an active character; it prints the backslash
++% in fixed width font.
+ \catcode`\\=\active
++ at def@normalbackslash{{@tt at backslashcurfont}}
++% On startup, @fixbackslash assigns:
++% @let \ = @normalbackslash
+
+-% Used sometimes to turn off (effectively) the active characters
+-% even after parsing them.
+- at def@turnoffactive{@let"=@normaldoublequote
+- at let\=@realbackslash
+- at let~=@normaltilde
+- at let^=@normalcaret
+- at let_=@normalunderscore
+- at let|=@normalverticalbar
+- at let<=@normalless
+- at let>=@normalgreater
+- at let+=@normalplus
+- at let$=@normaldollar}
++% \rawbackslash defines an active \ to do \backslashcurfont.
++% \otherbackslash defines an active \ to be a literal `\' character with
++% catcode other.
++ at gdef@rawbackslash{@let\=@backslashcurfont}
++ at gdef@otherbackslash{@let\=@realbackslash}
+
+- at def@normalturnoffactive{@let"=@normaldoublequote
+- at let\=@normalbackslash
+- at let~=@normaltilde
+- at let^=@normalcaret
+- at let_=@normalunderscore
+- at let|=@normalverticalbar
+- at let<=@normalless
+- at let>=@normalgreater
+- at let+=@normalplus
+- at let$=@normaldollar}
++% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
++% the literal character `\'.
++%
++ at def@normalturnoffactive{%
++ @let\=@normalbackslash
++ @let"=@normaldoublequote
++ @let~=@normaltilde
++ @let^=@normalcaret
++ @let_=@normalunderscore
++ @let|=@normalverticalbar
++ @let<=@normalless
++ @let>=@normalgreater
++ @let+=@normalplus
++ @let$=@normaldollar %$ font-lock fix
++ @unsepspaces
++}
+
+ % Make _ and + \other characters, temporarily.
+ % This is canceled by @fixbackslash.
+@@ -5959,9 +8962,9 @@
+ @global at let\ = @eatinput
+
+ % On the other hand, perhaps the file did not have a `\input texinfo'. Then
+-% the first `\{ in the file would cause an error. This macro tries to fix
++% the first `\' in the file would cause an error. This macro tries to fix
+ % that, assuming it is called before the first `\' could plausibly occur.
+-% Also back turn on active characters that might appear in the input
++% Also turn back on active characters that might appear in the input
+ % file name, in case not using a pre-dumped format.
+ %
+ @gdef at fixbackslash{%
+@@ -5973,15 +8976,11 @@
+ % Say @foo, not \foo, in error messages.
+ @escapechar = `@@
+
+-% These look ok in all fonts, so just make them not special.
++% These look ok in all fonts, so just make them not special.
+ @catcode`@& = @other
+ @catcode`@# = @other
+ @catcode`@% = @other
+
+- at c Set initial fonts.
+- at textfonts
+- at rm
+-
+
+ @c Local variables:
+ @c eval: (add-hook 'write-file-hooks 'time-stamp)
+@@ -5990,3 +8989,9 @@
+ @c time-stamp-format: "%:y-%02m-%02d.%02H"
+ @c time-stamp-end: "}"
+ @c End:
++
++ at c vim:sw=2:
+
- \newdimen\defaultparindent \defaultparindent = 15pt
++ at ignore
++ arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
++ at end ignore
+--- ./configure.in.orig 2012-01-09 20:21:02.000000000 -0700
++++ ./configure.in 2012-01-09 20:41:39.017551755 -0700
+@@ -1,4 +1,4 @@
+-AC_INIT()
++AC_INIT
+ AC_PREREQ([2.61])
+ AC_CONFIG_HEADER(h/gclincl.h)
+
+@@ -445,7 +445,7 @@
+ AC_MSG_CHECKING([for CFLAG $TMPF])
+ CFLAGS_ORI=$CFLAGS
+ CFLAGS="$CFLAGS $TMPF"
+- AC_TRY_RUN([int main() {return 0;}],TCFLAGS="$TCFLAGS $TMPF";AC_MSG_RESULT(yes),AC_MSG_RESULT(no))
++ AC_RUN_IFELSE([AC_LANG_PROGRAM([],[[return 0;]])],TCFLAGS="$TCFLAGS $TMPF";AC_MSG_RESULT(yes),AC_MSG_RESULT(no))
+ CFLAGS=$CFLAGS_ORI
+
+ else
+@@ -629,9 +629,6 @@
+ AC_MSG_CHECKING([system version (for dynamic loading)])
+ if machine=`uname -m` ; then true; else machine=unknown ; fi
+
+-AC_CHECK_PROGS(MAKEINFO,makeinfo,"false")
+-AC_SUBST(MAKEINFO)
+-
+ if test -f /usr/lib/NextStep/software_version; then
+ system=NEXTSTEP-`${AWK} '/3/,/3/' /usr/lib/NextStep/software_version`
+ else
+@@ -672,21 +669,24 @@
+
+ AC_CHECK_HEADER(unistd.h,
+ AC_CHECK_LIB(c,sysconf,
+- AC_MSG_CHECKING("for _SC_CLK_TCK")
+- AC_TRY_RUN([#include <unistd.h>
++ AC_MSG_CHECKING([for _SC_CLK_TCK])
++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #include <unistd.h>
+ #include <stdio.h>
+- int
+- main() {
++ ]],[[
+ FILE *fp=fopen("conftest1","w");
+ fprintf(fp,"%lu\n",sysconf(_SC_CLK_TCK));
+ fclose(fp);
+ return 0;
+- }],
++ ]])],
+ hz=`cat conftest1`
+ AC_DEFINE_UNQUOTED(HZ,$hz)
+ ,hz=0,hz=0)
+ [AC_MSG_RESULT($hz)]))
+
++AC_PROG_EGREP
++AC_CHECK_PROGS(MAKEINFO,makeinfo,"false")
++AC_SUBST(MAKEINFO)
+
+ #MY_SUBDIRS=
+
+@@ -703,17 +703,19 @@
+ if test "$enable_dynsysgmp" = "yes" ; then
+ AC_CHECK_HEADER(gmp.h,
+ AC_CHECK_LIB(gmp,__gmpz_init,
+- AC_MSG_CHECKING("for external gmp version")
+- AC_TRY_RUN([#include <gmp.h>
+- int main() {
++ AC_MSG_CHECKING([for external gmp version])
++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #include <gmp.h>
++ ]],[[
+ #if __GNU_MP_VERSION == 4 || __GNU_MP_VERSION == 5
+ return 0;
+ #else
+ return -1;
+ #endif
+- }],
++ ]])],
+ # MPFILES=$GMPDIR/mpn/mul_n.o
+ # PATCHED_SYMBOLS=__gmpn_toom3_mul_n
++ AC_MSG_RESULT([4/5])
+ MPFILES=
+ PATCHED_SYMBOLS=
+ # if test "$use" = "m68k-linux" ; then
+@@ -725,7 +727,8 @@
+ echo "int main() {return 0;}" >>foo.c
+ MP_INCLUDE=`cpp foo.c | grep /gmp.h | head -n 1 | $AWK '{print $3}' | tr -d '"'`
+ rm -f foo.c,
+- echo "Cannot use dynamic gmp lib" , echo "Cannot use dynamic gmp lib" ),
++ AC_MSG_RESULT([Cannot use dynamic gmp lib]),
++ AC_MSG_RESULT([Cannot use dynamic gmp lib])),
+ echo "Cannot use dynamic gmp lib" ,),
+ echo "Cannot use dynamic gmp lib" ,)
+ fi
+@@ -772,7 +775,7 @@
+
+ fi
+
+-AC_MSG_CHECKING("for leading underscore in object symbols")
++AC_MSG_CHECKING([for leading underscore in object symbols])
+ cat>foo.c <<EOFF
+ #include <math.h>
+ #include <stdio.h>
+@@ -782,60 +785,62 @@
+ if nm foo.o |grep " U " | grep "_cos" >/dev/null || nm foo.o |grep " U " | grep " _getc" >/dev/null ; then
+ LEADING_UNDERSCORE=1
+ AC_DEFINE(LEADING_UNDERSCORE)
+- AC_MSG_RESULT("yes")
++ AC_MSG_RESULT([yes])
+ else
+ LEADING_UNDERSCORE=""
+- AC_MSG_RESULT("no")
++ AC_MSG_RESULT([no])
+ fi
+-AC_MSG_CHECKING("for GNU ld option -Map")
++AC_MSG_CHECKING([for GNU ld option -Map])
+ touch map
+ $CC -o foo [ -Wl,-Map ] map foo.o >/dev/null 2>&1
+ if test `cat map | wc -l` != "0" ; then
+- AC_MSG_RESULT("yes")
++ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_GNU_LD)
+ GNU_LD=1
+ else
+- AC_MSG_RESULT("no")
++ AC_MSG_RESULT([no])
+ GNU_LD=
+ fi
+ rm -f foo.c foo.o foo map
+
+- AC_MSG_CHECKING("for size of gmp limbs")
+- AC_TRY_RUN([#include <stdio.h>
++ AC_MSG_CHECKING([for size of gmp limbs])
++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #include <stdio.h>
+ #include "$MP_INCLUDE"
+- int main() {
++ ]],[[
+ FILE *fp=fopen("conftest1","w");
+ fprintf(fp,"%u",sizeof(mp_limb_t));
+ fclose(fp);
+ return 0;
+- }],mpsize=`cat conftest1`,mpsize=0,mpsize=0)
++ ]])],mpsize=`cat conftest1`,mpsize=0,mpsize=0)
+ if test "$mpsize" = "0" ; then
+- echo "Cannot determine mpsize"
+- exit 1
++ AC_MSG_ERROR([Cannot determine mpsize], 1)
+ fi
+ AC_DEFINE_UNQUOTED(MP_LIMB_BYTES,$mpsize)
+ AC_MSG_RESULT($mpsize)
+
+- AC_MSG_CHECKING("_SHORT_LIMB")
+- AC_TRY_RUN([#include <stdio.h>
++ AC_MSG_CHECKING([_SHORT_LIMB])
++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #include <stdio.h>
+ #include "$MP_INCLUDE"
+- int main() {
++ ]],[[
+ #ifdef _SHORT_LIMB
+ return 0;
+ #else
+ return 1;
+ #endif
+- }],AC_DEFINE(__SHORT_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no))
+- AC_MSG_CHECKING("_LONG_LONG_LIMB")
+- AC_TRY_RUN([#include <stdio.h>
++ ]])],AC_DEFINE(__SHORT_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no))
++ AC_MSG_CHECKING([_LONG_LONG_LIMB])
++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #include <stdio.h>
+ #include "$MP_INCLUDE"
+- int main() {
++ ]],[[
+ #ifdef _LONG_LONG_LIMB
+ return 0;
+ #else
+ return 1;
+ #endif
+- }],AC_DEFINE(__LONG_LONG_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no))
++ ]])],AC_DEFINE(__LONG_LONG_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no))
+
+ GMP=1
+ AC_DEFINE(GMP)
+@@ -891,10 +896,9 @@
+
+ AC_CHECK_LIB(dl,dlopen,have_dl=1,have_dl=0)
+ if test "$have_dl" = "0" ; then
+- echo "Cannot find dlopen in -dl"
+- exit 1
++ AC_MSG_ERROR([Cannot find dlopen in -dl], 1)
+ fi
+-dnl AC_SEARCH_LIBS(dlopen, dl, have_dl=1, AC_ERROR(dlopen not found))
++dnl AC_SEARCH_LIBS(dlopen, dl, have_dl=1, AC_MSG_ERROR([dlopen not found]))
+ dnl LIBS and TLIBS - why not merged from the beginning?
+
+ TLIBS="$TLIBS -ldl -rdynamic"
+@@ -908,15 +912,17 @@
+ #
+ # Old binutils appear to need CONST defined to const
+ #
+- AC_MSG_CHECKING(if need to define CONST for bfd)
+- AC_TRY_RUN([#define IN_GCC
++ AC_MSG_CHECKING([if need to define CONST for bfd])
++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #define IN_GCC
+ #include <bfd.h>
+- int main() { symbol_info t; return 0;}],
++ ]],[[symbol_info t; return 0;]])],
+ AC_MSG_RESULT(no),
+- AC_TRY_RUN([#define CONST const
++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #define CONST const
+ #define IN_GCC
+ #include <bfd.h>
+- int main() {symbol_info t; return 0;}],
++ ]],[[symbol_info t; return 0;]])],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(NEED_CONST),
+ AC_MSG_ERROR([cannot use bfd]),
+@@ -930,11 +936,12 @@
+ # BFD boolean syntax
+ #
+
+- AC_MSG_CHECKING(for useable bfd_boolean)
+- AC_TRY_RUN([#define IN_GCC
++ AC_MSG_CHECKING([for usable bfd_boolean])
++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #define IN_GCC
+ #include <bfd.h>
+ bfd_boolean foo() {return FALSE;}
+- int main() {return 0;}],
++ ]],[[return 0;]])],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_BFD_BOOLEAN),
+ AC_MSG_RESULT(no),
+@@ -945,10 +952,11 @@
+ # bfd_link_info.output_bfd minimal configure change check
+ #
+
+- AC_MSG_CHECKING(for bfd_link_info.output_bfd)
+- AC_TRY_RUN([#include <bfd.h>
++ AC_MSG_CHECKING([for bfd_link_info.output_bfd])
++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #include <bfd.h>
+ #include <bfdlink.h>
+- int main() {struct bfd_link_info i;i.output_bfd=0;return 0;}],
++ ]],[[struct bfd_link_info i;i.output_bfd=0;return 0;]])],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_OUTPUT_BFD),
+ AC_MSG_RESULT(no),
+@@ -1056,45 +1064,47 @@
+ # mechanism, in the PAGE macro. This offset is subtracted from
+ # addresses, in calculating a page for an address in the heap.
+
+-AC_CHECK_SIZEOF(long,0)
++AC_CHECK_SIZEOF(long)
+ AC_MSG_CHECKING(sizeof struct contblock)
+
+ # work around MSYS pwd result incompatibility
+ if test "$use" = "mingw" ; then
+-AC_TRY_RUN([#include <stdio.h>
++AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #include <stdio.h>
+ #define EXTER
+ #include "$MP_INCLUDE"
+ #include "h/enum.h"
+ #include "h/object.h"
+- int main(int argc,char **argv,char **envp) {
++ ]],[[
+ FILE *f=fopen("conftest1","w");
+ fprintf(f,"%u",sizeof(struct contblock));
+ fclose(f);
+ return 0;
+- }],sizeof_contblock=`cat conftest1`,
+- echo Cannot find sizeof struct contblock;exit 1,
+- echo Cannot find sizeof struct contblock;exit 1)
++ ]])],sizeof_contblock=`cat conftest1`,
++ AC_MSG_ERROR([Cannot find sizeof struct contblock], 1),
++ AC_MSG_ERROR([Cannot find sizeof struct contblock], 1))
+ else
+-AC_TRY_RUN([#include <stdio.h>
++AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #include <stdio.h>
+ #define EXTER
+ #include "$MP_INCLUDE"
+ #include "`pwd`/h/enum.h"
+ #include "`pwd`/h/object.h"
+- int main(int argc,char **argv,char **envp) {
++ ]],[[
+ FILE *f=fopen("conftest1","w");
+ fprintf(f,"%u",sizeof(struct contblock));
+ fclose(f);
+ return 0;
+- }],sizeof_contblock=`cat conftest1`,
+- echo Cannot find sizeof struct contblock;exit 1,
+- echo Cannot find sizeof struct contblock;exit 1)
++ ]])],sizeof_contblock=`cat conftest1`,
++ AC_MSG_ERROR([Cannot find sizeof struct contblock], 1),
++ AC_MSG_ERROR([Cannot find sizeof struct contblock], 1))
+ fi
+ AC_MSG_RESULT($sizeof_contblock)
+ AC_DEFINE_UNQUOTED(SIZEOF_CONTBLOCK,$sizeof_contblock)
+
+
+-AC_MSG_CHECKING(for word order)
+-AC_TRY_RUN([int main () {
++AC_MSG_CHECKING([for word order])
++AC_RUN_IFELSE([AC_LANG_PROGRAM([],[[
+ /* Are we little or big endian? Adapted from Harbison&Steele. */
+ union
+ {
+@@ -1103,7 +1113,7 @@
+ } u;
+ u.d = 1.0;
+ return u.l[sizeof(double)/sizeof(int)-1] ? 0 : 1;
+-}],AC_MSG_RESULT(little)
++]])],AC_MSG_RESULT(little)
+ AC_DEFINE(LITTLE_END),
+ AC_MSG_RESULT(big),
+ AC_MSG_RESULT([WARNING: ASSUMING LITTLE ENDIAN FOR CROSS COMPILING !!!]
+@@ -1116,15 +1126,16 @@
+
+ AC_MSG_CHECKING([for sbrk])
+ HAVE_SBRK=""
+-AC_TRY_RUN([#include <unistd.h>
+- #include <stdio.h>
+- int main() {
++AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #include <unistd.h>
++ #include <stdio.h>
++ ]],[[
+ FILE *f;
+ if (!(f=fopen("conftest1","w")))
+ return -1;
+ fprintf(f,"%u",sbrk(0));
+ return 0;
+- }],
++ ]])],
+ HAVE_SBRK=1
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT([no: WARNING you must be able to emulate sbrk: as on mingw or macosx]),
+@@ -1136,14 +1147,15 @@
+ # AC_MSG_RESULT(sys/personality.h not found))
+
+ AC_MSG_CHECKING([for ADDR_NO_RANDOMIZE constant])
+- AC_TRY_RUN([#include <sys/personality.h>
+- #include <stdio.h>
+- int main(int argc,char *argv[],char *envp[]) {
++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #include <sys/personality.h>
++ #include <stdio.h>
++ ]],[[
+ FILE *f;
+ if (!(f=fopen("conftest1","w"))) return -1;
+ fprintf(f,"%x",ADDR_NO_RANDOMIZE);
+ return 0;
+- }],
++ ]])],
+ ADDR_NO_RANDOMIZE=`cat conftest1`,ADDR_NO_RANDOMIZE=0,ADDR_NO_RANDOMIZE=0)
+ if test "$ADDR_NO_RANDOMIZE" = "0" ; then
+ AC_MSG_RESULT([no, assuming 0x40000])
+@@ -1153,10 +1165,11 @@
+ fi
- \chapheadingskip = 15pt plus 4pt minus 2pt
-@@ -5695,7 +8621,7 @@
- % Don't be so finicky about underfull hboxes, either.
- \hbadness = 2000
+ AC_MSG_CHECKING([for personality(ADDR_NO_RANDOMIZE) support])
+- AC_TRY_RUN([void gprof_cleanup() {};
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
++ void gprof_cleanup() {}
+ int main(int argc,char *argv[],char *envp[]) {
+ #include "h/unrandomize.h"
+- return 0;}],CAN_UNRANDOMIZE_SBRK=1,CAN_UNRANDOMIZE_SBRK=0,CAN_UNRANDOMIZE_SBRK=0)
++ return 0;}]])],CAN_UNRANDOMIZE_SBRK=1,CAN_UNRANDOMIZE_SBRK=0,CAN_UNRANDOMIZE_SBRK=0)
--% Following George Bush, just get rid of widows and orphans.
-+% Following George Bush, get rid of widows and orphans.
- \widowpenalty=10000
- \clubpenalty=10000
+ if test "$CAN_UNRANDOMIZE_SBRK" != 0 ; then
+ AC_MSG_RESULT(yes)
+@@ -1166,8 +1179,9 @@
+ fi
-@@ -5713,11 +8639,14 @@
- \fi
- }
+ AC_MSG_CHECKING([that sbrk is (now) non-random])
+- AC_TRY_RUN([#include <stdio.h>
+- void gprof_cleanup() {};
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
++ #include <stdio.h>
++ void gprof_cleanup() {}
+ int main(int argc,char * argv[],char * envp[]) {
+ FILE *f;
+ #ifdef CAN_UNRANDOMIZE_SBRK
+@@ -1175,13 +1189,13 @@
+ #endif
+ if (!(f=fopen("conftest1","w"))) return -1;
+ fprintf(f,"%u",sbrk(0));
+- return 0;}],SBRK=`cat conftest1`,SBRK=0,SBRK=0)
++ return 0;}]])],SBRK=`cat conftest1`,SBRK=0,SBRK=0)
+ if test "$SBRK" = "0" ; then
+- AC_MSG_RESULT(cannot trap sbrk)
+- exit 1
++ AC_MSG_ERROR([cannot trap sbrk], 1)
+ fi
+- AC_TRY_RUN([#include <stdio.h>
+- void gprof_cleanup() {};
++ AC_RUN_IFELSE([AC_LANG_SOURCE([[
++ #include <stdio.h>
++ void gprof_cleanup() {}
+ int main(int argc,char * argv[],char * envp[]) {
+ FILE *f;
+ #ifdef CAN_UNRANDOMIZE_SBRK
+@@ -1189,10 +1203,9 @@
+ #endif
+ if (!(f=fopen("conftest1","w"))) return -1;
+ fprintf(f,"%u",sbrk(0));
+- return 0;}],SBRK1=`cat conftest1`,SBRK1=0,SBRK1=0)
++ return 0;}]])],SBRK1=`cat conftest1`,SBRK1=0,SBRK1=0)
+ if test "$SBRK1" = "0" ; then
+- AC_MSG_RESULT(cannot trap sbrk)
+- exit 1
++ AC_MSG_ERROR([cannot trap sbrk], 1)
+ fi
+ if test "$SBRK" = "$SBRK1" ; then
+ AC_MSG_RESULT(yes)
+@@ -1207,15 +1220,17 @@
+ fi
--% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
--% 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can
--% set \parskip and call \setleading for \baselineskip.
-+% Parameters in order: 1) textheight; 2) textwidth;
-+% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
-+% 7) physical page height; 8) physical page width.
- %
--\def\internalpagesizes#1#2#3#4#5#6{%
-+% We also call \setleading{\textleading}, so the caller should define
-+% \textleading. The caller should also set \parskip.
-+%
-+\def\internalpagesizes#1#2#3#4#5#6#7#8{%
- \voffset = #3\relax
- \topskip = #6\relax
- \splittopskip = \topskip
-@@ -5736,6 +8665,17 @@
- \normaloffset = #4\relax
- \bindingoffset = #5\relax
- %
-+ \ifpdf
-+ \pdfpageheight #7\relax
-+ \pdfpagewidth #8\relax
-+ % if we don't reset these, they will remain at "1 true in" of
-+ % whatever layout pdftex was dumped with.
-+ \pdfhorigin = 1 true in
-+ \pdfvorigin = 1 true in
-+ \fi
-+ %
-+ \setleading{\textleading}
-+ %
- \parindent = \defaultparindent
- \setemergencystretch
- }
-@@ -5743,76 +8683,140 @@
- % @letterpaper (the default).
- \def\letterpaper{{\globaldefs = 1
- \parskip = 3pt plus 2pt minus 1pt
-- \setleading{13.2pt}%
-+ \textleading = 13.2pt
- %
- % If page is nothing but text, make it come out even.
-- \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}%
-+ \internalpagesizes{607.2pt}{6in}% that's 46 lines
-+ {\voffset}{.25in}%
-+ {\bindingoffset}{36pt}%
-+ {11in}{8.5in}%
- }}
+ # pagewidth
+-AC_MSG_CHECKING(for pagewidth)
+-AC_TRY_RUN([#include <stdio.h>
++AC_MSG_CHECKING([for pagewidth])
++AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #include <stdio.h>
+ #include <unistd.h>
+-int main() {size_t i=getpagesize(),j;
++ ]],[[
++ size_t i=getpagesize(),j;
+ FILE *fp=fopen("conftest1","w");
+ for (j=0;i>>=1;j++);
+ if (j<12) {printf("pagewidth %u is too small\n",j);return -1;}
+ fprintf(fp,"%u",j);
+- return 0;}],PAGEWIDTH=`cat conftest1`,PAGEWIDTH=0,PAGEWIDTH=0)
++ return 0;]])],PAGEWIDTH=`cat conftest1`,PAGEWIDTH=0,PAGEWIDTH=0)
+ AC_MSG_RESULT($PAGEWIDTH)
+ AC_DEFINE_UNQUOTED(PAGEWIDTH,$PAGEWIDTH)
+ AC_SUBST(PAGEWIDTH)
+@@ -1223,11 +1238,12 @@
--% Use @smallbook to reset parameters for 7x9.5 (or so) format.
-+% Use @smallbook to reset parameters for 7x9.25 trim size.
- \def\smallbook{{\globaldefs = 1
- \parskip = 2pt plus 1pt
-- \setleading{12pt}%
-+ \textleading = 12pt
- %
-- \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}%
-+ \internalpagesizes{7.5in}{5in}%
-+ {-.2in}{0in}%
-+ {\bindingoffset}{16pt}%
-+ {9.25in}{7in}%
- %
- \lispnarrowing = 0.3in
- \tolerance = 700
- \hfuzz = 1pt
- \contentsrightmargin = 0pt
-- \deftypemargin = 0pt
- \defbodyindent = .5cm
-+}}
-+
-+% Use @smallerbook to reset parameters for 6x9 trim size.
-+% (Just testing, parameters still in flux.)
-+\def\smallerbook{{\globaldefs = 1
-+ \parskip = 1.5pt plus 1pt
-+ \textleading = 12pt
- %
-- \let\smalldisplay = \smalldisplayx
-- \let\smallexample = \smalllispx
-- \let\smallformat = \smallformatx
-- \let\smalllisp = \smalllispx
-+ \internalpagesizes{7.4in}{4.8in}%
-+ {-.2in}{-.4in}%
-+ {0pt}{14pt}%
-+ {9in}{6in}%
-+ %
-+ \lispnarrowing = 0.25in
-+ \tolerance = 700
-+ \hfuzz = 1pt
-+ \contentsrightmargin = 0pt
-+ \defbodyindent = .4cm
- }}
+ old_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$TLDFLAGS"
+-AC_MSG_CHECKING("finding DBEGIN")
+-AC_TRY_RUN([#include <stdio.h>
+- #include <stdlib.h>
++AC_MSG_CHECKING([finding DBEGIN])
++AC_RUN_IFELSE([AC_LANG_SOURCE([[
++#include <stdio.h>
++#include <stdlib.h>
+
+-void gprof_cleanup() {};
++void gprof_cleanup() {}
+ int
+ main(int argc,char * argv[],char *envp[])
+ {
+@@ -1252,36 +1268,35 @@
+ #endif
+ fclose(fp);
+ return 0;
+-}],dbegin=`cat conftest1`,dbegin=0,dbegin=0)
++}]])],dbegin=`cat conftest1`,dbegin=0,dbegin=0)
+ AC_DEFINE_UNQUOTED(DBEGIN,$dbegin /* where data begins */)
+ AC_MSG_RESULT(got $dbegin)
+ LDFLAGS="$old_LDFLAGS"
+
+
+-AC_MSG_CHECKING("finding CSTACK_ADDRESS")
+-AC_TRY_RUN([#include <stdio.h>
+-main()
+-{
++AC_MSG_CHECKING([finding CSTACK_ADDRESS])
++AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++#include <stdio.h>
++]],[[
+ char *b ;
+ FILE *fp = fopen("conftest1","w");
+ fprintf(fp,"%ld",((long) &b));
+ fclose(fp);
+ return 0;
+-}],cstack_address=`cat conftest1`,cstack_address=0,cstack_address=0)
++]])],cstack_address=`cat conftest1`,cstack_address=0,cstack_address=0)
+ AC_DEFINE_UNQUOTED(CSTACK_ADDRESS,$cstack_address \
+ )
+ AC_MSG_RESULT(got $cstack_address)
+
+
+
+-AC_MSG_CHECKING("sizeof long long int")
+-AC_TRY_RUN([#include <stdio.h>
+-main()
+-{
++AC_MSG_CHECKING([sizeof long long int])
++AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++#include <stdio.h>
++]],[[
+ if (sizeof(long long int) == 2*sizeof(long)) return 0;
+ return 1;
+-}
+-],[AC_DEFINE(HAVE_LONG_LONG)
++]])],[AC_DEFINE(HAVE_LONG_LONG)
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no),
+ AC_MSG_RESULT(no)
+@@ -1450,7 +1465,6 @@
+ # To get around this problem, check for both libraries together
+ # if -lsocket doesn't work by itself.
+ #--------------------------------------------------------------------
+-AC_MSG_CHECKING([for sockets])
+ tcl_checkBoth=0
+ AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
+ if test "$tcl_checkSocket" = 1; then
+@@ -1487,8 +1501,8 @@
+ AC_SUBST(RL_OBJS)
+ AC_SUBST(RL_LIB)
+
+-AC_MSG_CHECKING(For network code for nsocket.c)
+-AC_TRY_LINK([
++AC_MSG_CHECKING([for network code for nsocket.c])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+@@ -1505,24 +1519,25 @@
+ #include <netinet/in.h> /* struct in_addr, struct sockaddr_in */
+ #include <arpa/inet.h> /* inet_ntoa() */
+ #include <netdb.h> /* gethostbyname() */
+-],[ connect(0,(struct sockaddr *)0,0);
++]],[[connect(0,(struct sockaddr *)0,0);
+ gethostbyname("jil");
+ socket(AF_INET, SOCK_STREAM, 0);
+- ],
++ ]])],
+ [AC_DEFINE(HAVE_NSOCKET)
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no))
- % Use @afourpaper to print on European A4 paper.
- \def\afourpaper{{\globaldefs = 1
-- \setleading{12pt}%
- \parskip = 3pt plus 2pt minus 1pt
-+ \textleading = 13.2pt
- %
-- \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}%
-+ % Double-side printing via postscript on Laserjet 4050
-+ % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
-+ % To change the settings for a different printer or situation, adjust
-+ % \normaloffset until the front-side and back-side texts align. Then
-+ % do the same for \bindingoffset. You can set these for testing in
-+ % your texinfo source file like this:
-+ % @tex
-+ % \global\normaloffset = -6mm
-+ % \global\bindingoffset = 10mm
-+ % @end tex
-+ \internalpagesizes{673.2pt}{160mm}% that's 51 lines
-+ {\voffset}{\hoffset}%
-+ {\bindingoffset}{44pt}%
-+ {297mm}{210mm}%
- %
- \tolerance = 700
- \hfuzz = 1pt
-+ \contentsrightmargin = 0pt
-+ \defbodyindent = 5mm
- }}
--% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
--% 29mm, hence bottom margin 28mm, nominal side margin 3cm.
--\def\afourlatex{{\globaldefs = 1
-- \setleading{13.6pt}%
-+% Use @afivepaper to print on European A5 paper.
-+% From romildo at urano.iceb.ufop.br, 2 July 2000.
-+% He also recommends making @example and @lisp be small.
-+\def\afivepaper{{\globaldefs = 1
-+ \parskip = 2pt plus 1pt minus 0.1pt
-+ \textleading = 12.5pt
- %
-+ \internalpagesizes{160mm}{120mm}%
-+ {\voffset}{\hoffset}%
-+ {\bindingoffset}{8pt}%
-+ {210mm}{148mm}%
-+ %
-+ \lispnarrowing = 0.2in
-+ \tolerance = 800
-+ \hfuzz = 1.2pt
-+ \contentsrightmargin = 0pt
-+ \defbodyindent = 2mm
-+ \tableindent = 12mm
-+}}
-+
-+% A specific text layout, 24x15cm overall, intended for A4 paper.
-+\def\afourlatex{{\globaldefs = 1
- \afourpaper
-- \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
-+ \internalpagesizes{237mm}{150mm}%
-+ {\voffset}{4.6mm}%
-+ {\bindingoffset}{7mm}%
-+ {297mm}{210mm}%
- %
-+ % Must explicitly reset to 0 because we call \afourpaper.
- \globaldefs = 0
- }}
+-AC_MSG_CHECKING(check for listen using fcntl)
+-AC_TRY_COMPILE([#include <stdio.h>
++AC_MSG_CHECKING([for listen using fcntl])
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++#include <stdio.h>
+ #include <fcntl.h>
+-],
+-[FILE *fp=fopen("configure.in","r");
++]],
++[[FILE *fp=fopen("configure.in","r");
+ int orig;
+ orig = fcntl(fileno(fp), F_GETFL);
+ if (! (orig & O_NONBLOCK )) return 0;
+-],
++]])],
+ [AC_DEFINE(LISTEN_USE_FCNTL)
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no))
+@@ -1543,7 +1558,7 @@
+ AC_SUBST(USE_CLEANUP)
+ gcl_ok=no
--% Use @afourwide to print on European A4 paper in wide format.
--\def\afourwide{%
-+% Use @afourwide to print on A4 paper in landscape format.
-+\def\afourwide{{\globaldefs = 1
- \afourpaper
-- \internalpagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}%
-- %
-+ \internalpagesizes{241mm}{165mm}%
-+ {\voffset}{-2.95mm}%
-+ {\bindingoffset}{7mm}%
-+ {297mm}{210mm}%
- \globaldefs = 0
--}
-+}}
+-AC_HEADER_EGREP(LITTLE_ENDIAN, ctype.h, gcl_ok=yes, gcl_ok=noo)
++AC_EGREP_HEADER(LITTLE_ENDIAN, ctype.h, gcl_ok=yes, gcl_ok=no)
+ if test $gcl_ok = yes ; then
+ AC_DEFINE(ENDIAN_ALREADY_DEFINED)
+ fi
+@@ -1575,32 +1590,32 @@
+ esac
- % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
- % Perhaps we should allow setting the margins, \topskip, \parskip,
- % and/or leading, also. Or perhaps we should compute them somehow.
- %
--\def\pagesizes{\parsearg\pagesizesxxx}
--\def\pagesizesxxx#1{\pagesizesyyy #1,,\finish}
-+\parseargdef\pagesizes{\pagesizesyyy #1,,\finish}
- \def\pagesizesyyy#1,#2,#3\finish{{%
- \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
- \globaldefs = 1
- %
- \parskip = 3pt plus 2pt minus 1pt
-- \setleading{13.2pt}%
-+ \setleading{\textleading}%
- %
-- \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}%
-+ \dimen0 = #1\relax
-+ \advance\dimen0 by \voffset
-+ %
-+ \dimen2 = \hsize
-+ \advance\dimen2 by \normaloffset
-+ %
-+ \internalpagesizes{#1}{\hsize}%
-+ {\voffset}{\normaloffset}%
-+ {\bindingoffset}{44pt}%
-+ {\dimen0}{\dimen2}%
- }}
- % Set default to letter.
-@@ -5840,10 +8844,10 @@
- \def\normalless{<}
- \def\normalgreater{>}
- \def\normalplus{+}
--\def\normaldollar{$}
-+\def\normaldollar{$}%$ font-lock fix
+-AC_MSG_CHECKING(check for SV_ONSTACK)
+-AC_TRY_COMPILE([#include <signal.h>
+-int joe=SV_ONSTACK;
+-],
+-[],
++AC_MSG_CHECKING([for SV_ONSTACK])
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++#include <signal.h>
++]],
++[[return SV_ONSTACK;]])],
+ [AC_DEFINE(HAVE_SV_ONSTACK)
+ AC_SUBST(HAVE_SV_ONSTACK)
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no))
--% This macro is used to make a character print one way in ttfont
--% where it can probably just be output, and another way in other fonts,
-+% This macro is used to make a character print one way in \tt
-+% (where it can probably be output as-is), and another way in other fonts,
- % where something hairier probably needs to be done.
- %
- % #1 is what to print if we are indeed using \tt; #2 is what to print
-@@ -5875,8 +8879,9 @@
+-AC_MSG_CHECKING(check for SIGSYS)
+-AC_TRY_COMPILE([#include <signal.h>
+-int joe=SIGSYS;
+-],
+-[],
++AC_MSG_CHECKING([for SIGSYS])
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++#include <signal.h>
++]],
++[[return SIGSYS;]])],
+ [AC_DEFINE(HAVE_SIGSYS)
+ AC_SUBST(HAVE_SIGSYS)
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no))
- \catcode`\_=\active
- \def_{\ifusingtt\normalunderscore\_}
-+\let\realunder=_
- % Subroutine for the previous macro.
--\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}}
-+\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
- \catcode`\|=\active
- \def|{{\tt\char124}}
-@@ -5889,16 +8894,7 @@
- \catcode`\+=\active
- \def+{{\tt \char 43}}
- \catcode`\$=\active
--\def${\ifusingit{{\sl\$}}\normaldollar}
--%\catcode 27=\active
--%\def^^[{$\diamondsuit$}
--
--% Set up an active definition for =, but don't enable it most of the time.
--{\catcode`\==\active
--\global\def={{\tt \char 61}}}
--
--\catcode`+=\active
--\catcode`\_=\active
-+\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+-AC_MSG_CHECKING(check for SIGEMT)
+-AC_TRY_COMPILE([#include <signal.h>
+-int joe=SIGEMT;
+-],
+-[],
++AC_MSG_CHECKING([for SIGEMT])
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++#include <signal.h>
++]],
++[[return SIGEMT;]])],
+ [AC_DEFINE(HAVE_SIGEMT)
+ AC_SUBST(HAVE_SIGEMT)
+ AC_MSG_RESULT(yes)],
+@@ -1612,12 +1627,13 @@
+ #if test $use = "386-linux" ; then
+ AC_CHECK_HEADERS(asm/sigcontext.h)
+ AC_CHECK_HEADERS(asm/signal.h)
+- AC_MSG_CHECKING([for sigcontext...])
+- AC_TRY_COMPILE([#include <signal.h>
+- ],
+- [
++ AC_MSG_CHECKING([for sigcontext])
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++ #include <signal.h>
++ ]],
++ [[
+ struct sigcontext foo;
+- ],
++ ]])],
+ [
+ sigcontext_works=1;
+ AC_DEFINE(SIGNAL_H_HAS_SIGCONTEXT)
+@@ -1628,18 +1644,19 @@
+ AC_MSG_RESULT(sigcontext NOT in signal.h)]
+ )
+ if test "$sigcontext_works" = 0 ; then
+- AC_MSG_CHECKING([for sigcontext...])
+- AC_TRY_COMPILE([#include <signal.h>
++ AC_MSG_CHECKING([for sigcontext])
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++ #include <signal.h>
+ #ifdef HAVE_ASM_SIGCONTEXT_H
+ #include <asm/sigcontext.h>
+ #endif
+ #ifdef HAVE_ASM_SIGNAL_H
+ #include <asm/signal.h>
+ #endif
+- ],
+- [
++ ]],
++ [[
+ struct sigcontext foo;
+- ],
++ ]])],
+ [
+ AC_DEFINE(HAVE_SIGCONTEXT)
+ AC_MSG_RESULT(sigcontext in asm files)
+@@ -1749,6 +1766,8 @@
- % If a .fmt file is being used, characters that might appear in a file
- % name cannot be active until we have parsed the command line.
-@@ -5906,46 +8902,53 @@
- % \otherifyactive is called near the end of this file.
- \def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
+ if test "$enable_tcltk" = "yes" ; then
--\catcode`\@=0
-+% Used sometimes to turn off (effectively) the active characters even after
-+% parsing them.
-+\def\turnoffactive{%
-+ \normalturnoffactive
-+ \otherbackslash
-+}
++AC_CHECK_LIB(ieee,main,have_ieee=1,have_ieee=0)
++AC_CHECK_PROG(TCLSH,tclsh,tclsh,${TCLSH})
+ AC_MSG_CHECKING([for tcl/tk])
--% \rawbackslashxx output one backslash character in current font
--\global\chardef\rawbackslashxx=`\\
--%{\catcode`\\=\other
--%@gdef at rawbackslashxx{\}}
-+\catcode`\@=0
--% \rawbackslash redefines \ as input to do \rawbackslashxx.
--{\catcode`\\=\active
-- at gdef@rawbackslash{@let\=@rawbackslashxx }}
-+% \backslashcurfont outputs one backslash character in current font,
-+% as in \char`\\.
-+\global\chardef\backslashcurfont=`\\
-+\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
+@@ -1769,9 +1788,6 @@
+ EOF
+ #cp conftest.tcl foo.tcl
--% \normalbackslash outputs one backslash in fixed width font.
--\def\normalbackslash{{\tt\rawbackslashxx}}
-+% \realbackslash is an actual character `\' with catcode other, and
-+% \doublebackslash is two of them (for the pdf outlines).
-+{\catcode`\\=\other @gdef at realbackslash{\} @gdef at doublebackslash{\\}}
+-AC_CHECK_PROG(TCLSH,tclsh,tclsh,${TCLSH})
+-#AC_CHECK_PROG(TCLSH,tclsh8.0,tclsh8.0,${TCLSH})
+-
+ if test "${TCLSH}" = "" ; then true ; else
+ TCL_CONFIG_PREFIX=`${TCLSH} < conftest.tcl`
+ fi
+@@ -1845,7 +1861,6 @@
--% \catcode 17=0 % Define control-q
-+% In texinfo, backslash is an active character; it prints the backslash
-+% in fixed width font.
- \catcode`\\=\active
-+ at def@normalbackslash{{@tt at backslashcurfont}}
-+% On startup, @fixbackslash assigns:
-+% @let \ = @normalbackslash
+ fi
--% Used sometimes to turn off (effectively) the active characters
--% even after parsing them.
-- at def@turnoffactive{@let"=@normaldoublequote
-- at let\=@realbackslash
-- at let~=@normaltilde
-- at let^=@normalcaret
-- at let_=@normalunderscore
-- at let|=@normalverticalbar
-- at let<=@normalless
-- at let>=@normalgreater
-- at let+=@normalplus
-- at let$=@normaldollar}
-+% \rawbackslash defines an active \ to do \backslashcurfont.
-+% \otherbackslash defines an active \ to be a literal `\' character with
-+% catcode other.
-+ at gdef@rawbackslash{@let\=@backslashcurfont}
-+ at gdef@otherbackslash{@let\=@realbackslash}
+-AC_CHECK_LIB(lieee,main,have_ieee=1,have_ieee=0)
+ if test "$have_ieee" = "0" ; then
+ TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" `
+ fi
+@@ -1889,15 +1904,18 @@
-- at def@normalturnoffactive{@let"=@normaldoublequote
-- at let\=@normalbackslash
-- at let~=@normaltilde
-- at let^=@normalcaret
-- at let_=@normalunderscore
-- at let|=@normalverticalbar
-- at let<=@normalless
-- at let>=@normalgreater
-- at let+=@normalplus
-- at let$=@normaldollar}
-+% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
-+% the literal character `\'.
-+%
-+ at def@normalturnoffactive{%
-+ @let\=@normalbackslash
-+ @let"=@normaldoublequote
-+ @let~=@normaltilde
-+ @let^=@normalcaret
-+ @let_=@normalunderscore
-+ @let|=@normalverticalbar
-+ @let<=@normalless
-+ @let>=@normalgreater
-+ @let+=@normalplus
-+ @let$=@normaldollar %$ font-lock fix
-+ @unsepspaces
-+}
+ # the time handling for unixtime, add timezone
- % Make _ and + \other characters, temporarily.
- % This is canceled by @fixbackslash.
-@@ -5959,9 +8962,9 @@
- @global at let\ = @eatinput
+-AC_MSG_CHECKING([alloca])
+-AC_TRY_RUN([int main() { exit(alloca(500) != NULL ? 0 : 1);}],
++# alloca
++
++AC_MSG_CHECKING([for alloca])
++AC_RUN_IFELSE([AC_LANG_PROGRAM([],[[exit(alloca(500) != NULL ? 0 : 1);]])],
+ ,gcl_ok=yes, gcl_ok=no,gcl_ok=no)
+ if test $gcl_ok = yes ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_ALLOCA)
+ else
+- AC_TRY_RUN([#include <alloca.h>
+- int main() { exit(alloca(500) != NULL ? 0 : 1);}],
++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++ #include <alloca.h>
++ ]],[[exit(alloca(500) != NULL ? 0 : 1);]])],
+ ,gcl_ok=yes, gcl_ok=no,gcl_ok=no)
+ if test $gcl_ok = yes ; then
+ AC_MSG_RESULT(yes)
+@@ -1916,8 +1934,6 @@
- % On the other hand, perhaps the file did not have a `\input texinfo'. Then
--% the first `\{ in the file would cause an error. This macro tries to fix
-+% the first `\' in the file would cause an error. This macro tries to fix
- % that, assuming it is called before the first `\' could plausibly occur.
--% Also back turn on active characters that might appear in the input
-+% Also turn back on active characters that might appear in the input
- % file name, in case not using a pre-dumped format.
- %
- @gdef at fixbackslash{%
-@@ -5973,15 +8976,11 @@
- % Say @foo, not \foo, in error messages.
- @escapechar = `@@
--% These look ok in all fonts, so just make them not special.
-+% These look ok in all fonts, so just make them not special.
- @catcode`@& = @other
- @catcode`@# = @other
- @catcode`@% = @other
-- at c Set initial fonts.
-- at textfonts
-- at rm
+-# alloca
-
+ # dlopen etc
+ # idea make it so you do something dlopen(libX.so,RTLD_GLOBAL)
+ # then dlload("foo.o") a lisp file can refer to things in libX.so
+@@ -1941,7 +1957,7 @@
- @c Local variables:
- @c eval: (add-hook 'write-file-hooks 'time-stamp)
-@@ -5990,3 +8989,9 @@
- @c time-stamp-format: "%:y-%02m-%02d.%02H"
- @c time-stamp-end: "}"
- @c End:
-+
-+ at c vim:sw=2:
-+
-+ at ignore
-+ arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
-+ at end ignore
---- ./configure.in.orig 2011-05-11 14:02:54.000000000 -0600
-+++ ./configure.in 2011-06-01 15:26:13.260433763 -0600
-@@ -1,4 +1,4 @@
--AC_INIT()
-+AC_INIT
- AC_PREREQ([2.61])
- AC_CONFIG_HEADER(h/gclincl.h)
+ # redhat/cygnus released for some reason a buggy version of gcc,
+ # which no one else released. Catch that here.
+-AC_MSG_CHECKING([Checking for buggy gcc version from redhat])
++AC_MSG_CHECKING([for buggy gcc version from redhat])
+ if 2>&1 $CC -v | fgrep "gcc version 2.96" > /dev/null
+ then
+ BROKEN_O4_OPT=1
+@@ -1976,7 +1992,8 @@
+ if test -f h/$use.defs ; then
-@@ -613,9 +613,6 @@
- AC_MSG_CHECKING([system version (for dynamic loading)])
+ AC_SUBST(use)
+- AC_OUTPUT(makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp )
++ AC_CONFIG_FILES(makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp )
++ AC_OUTPUT
+ echo makedefc
+ cat makedefc
+
+--- ./configure.orig 2012-01-09 20:21:02.000000000 -0700
++++ ./configure 2012-01-09 20:41:41.703495184 -0700
+@@ -651,10 +651,10 @@
+ XMKMF
+ GMPDIR
+ GMP
++MAKEINFO
+ HAVE_MALLOC_ZONE_MEMALIGN
+ EGREP
+ GREP
+-MAKEINFO
+ AWK
+ CPP
+ OBJEXT
+@@ -4023,7 +4023,14 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-int main() {return 0;}
++
++int
++main ()
++{
++return 0;
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ TCFLAGS="$TCFLAGS $TMPF";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+@@ -4269,51 +4276,6 @@
+ $as_echo_n "checking system version (for dynamic loading)... " >&6; }
if machine=`uname -m` ; then true; else machine=unknown ; fi
--AC_CHECK_PROGS(MAKEINFO,makeinfo,"false")
--AC_SUBST(MAKEINFO)
+-for ac_prog in makeinfo
+-do
+- # Extract the first word of "$ac_prog", so it can be a program name with args.
+-set dummy $ac_prog; ac_word=$2
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if ${ac_cv_prog_MAKEINFO+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- if test -n "$MAKEINFO"; then
+- ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
+-else
+-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- for ac_exec_ext in '' $ac_executable_extensions; do
+- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+- ac_cv_prog_MAKEINFO="$ac_prog"
+- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+- break 2
+- fi
+-done
+- done
+-IFS=$as_save_IFS
+-
+-fi
+-fi
+-MAKEINFO=$ac_cv_prog_MAKEINFO
+-if test -n "$MAKEINFO"; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
+-$as_echo "$MAKEINFO" >&6; }
+-else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+- test -n "$MAKEINFO" && break
+-done
+-test -n "$MAKEINFO" || MAKEINFO=""false""
+-
+-
-
if test -f /usr/lib/NextStep/software_version; then
system=NEXTSTEP-`${AWK} '/3/,/3/' /usr/lib/NextStep/software_version`
else
-@@ -656,21 +653,24 @@
-
- AC_CHECK_HEADER(unistd.h,
- AC_CHECK_LIB(c,sysconf,
-- AC_MSG_CHECKING("for _SC_CLK_TCK")
-- AC_TRY_RUN([#include <unistd.h>
-+ AC_MSG_CHECKING([for _SC_CLK_TCK])
-+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+@@ -4711,22 +4673,29 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sysconf" >&5
+ $as_echo "$ac_cv_lib_c_sysconf" >&6; }
+ if test "x$ac_cv_lib_c_sysconf" = xyes; then :
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for _SC_CLK_TCK\"" >&5
+-$as_echo_n "checking \"for _SC_CLK_TCK\"... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _SC_CLK_TCK" >&5
++$as_echo_n "checking for _SC_CLK_TCK... " >&6; }
+ if test "$cross_compiling" = yes; then :
+ hz=0
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <unistd.h>
++
+ #include <unistd.h>
#include <stdio.h>
- int
- main() {
-+ ]],[[
++
++int
++main ()
++{
++
FILE *fp=fopen("conftest1","w");
fprintf(fp,"%lu\n",sysconf(_SC_CLK_TCK));
fclose(fp);
return 0;
-- }],
-+ ]])],
- hz=`cat conftest1`
- AC_DEFINE_UNQUOTED(HZ,$hz)
- ,hz=0,hz=0)
- [AC_MSG_RESULT($hz)]))
+- }
++
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ hz=`cat conftest1`
+@@ -4750,6 +4719,117 @@
-+AC_PROG_EGREP
-+AC_CHECK_PROGS(MAKEINFO,makeinfo,"false")
-+AC_SUBST(MAKEINFO)
+
+
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
++$as_echo_n "checking for egrep... " >&6; }
++if ${ac_cv_path_EGREP+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
++ then ac_cv_path_EGREP="$GREP -E"
++ else
++ if test -z "$EGREP"; then
++ ac_path_EGREP_found=false
++ # Loop through the user's path and test for each of PROGNAME-LIST
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_prog in egrep; do
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
++ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
++# Check for GNU ac_path_EGREP and select it if it is found.
++ # Check for GNU $ac_path_EGREP
++case `"$ac_path_EGREP" --version 2>&1` in
++*GNU*)
++ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
++*)
++ ac_count=0
++ $as_echo_n 0123456789 >"conftest.in"
++ while :
++ do
++ cat "conftest.in" "conftest.in" >"conftest.tmp"
++ mv "conftest.tmp" "conftest.in"
++ cp "conftest.in" "conftest.nl"
++ $as_echo 'EGREP' >> "conftest.nl"
++ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++ as_fn_arith $ac_count + 1 && ac_count=$as_val
++ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
++ # Best one so far, save it but keep looking for a better one
++ ac_cv_path_EGREP="$ac_path_EGREP"
++ ac_path_EGREP_max=$ac_count
++ fi
++ # 10*(2^10) chars as input seems more than enough
++ test $ac_count -gt 10 && break
++ done
++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++ $ac_path_EGREP_found && break 3
++ done
++ done
++ done
++IFS=$as_save_IFS
++ if test -z "$ac_cv_path_EGREP"; then
++ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
++ fi
++else
++ ac_cv_path_EGREP=$EGREP
++fi
++
++ fi
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
++$as_echo "$ac_cv_path_EGREP" >&6; }
++ EGREP="$ac_cv_path_EGREP"
++
++
++for ac_prog in makeinfo
++do
++ # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_MAKEINFO+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test -n "$MAKEINFO"; then
++ ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_MAKEINFO="$ac_prog"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++fi
++fi
++MAKEINFO=$ac_cv_prog_MAKEINFO
++if test -n "$MAKEINFO"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
++$as_echo "$MAKEINFO" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++ test -n "$MAKEINFO" && break
++done
++test -n "$MAKEINFO" || MAKEINFO=""false""
++
++
#MY_SUBDIRS=
-@@ -687,17 +687,19 @@
- if test "$enable_dynsysgmp" = "yes" ; then
- AC_CHECK_HEADER(gmp.h,
- AC_CHECK_LIB(gmp,__gmpz_init,
-- AC_MSG_CHECKING("for external gmp version")
-- AC_TRY_RUN([#include <gmp.h>
+@@ -4803,25 +4883,36 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_init" >&5
+ $as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; }
+ if test "x$ac_cv_lib_gmp___gmpz_init" = xyes; then :
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for external gmp version\"" >&5
+-$as_echo_n "checking \"for external gmp version\"... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for external gmp version" >&5
++$as_echo_n "checking for external gmp version... " >&6; }
+ if test "$cross_compiling" = yes; then :
+- echo "Cannot use dynamic gmp lib"
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Cannot use dynamic gmp lib" >&5
++$as_echo "Cannot use dynamic gmp lib" >&6; }
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <gmp.h>
- int main() {
-+ AC_MSG_CHECKING([for external gmp version])
-+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++
+ #include <gmp.h>
-+ ]],[[
++
++int
++main ()
++{
++
#if __GNU_MP_VERSION == 4 || __GNU_MP_VERSION == 5
return 0;
#else
return -1;
#endif
-- }],
-+ ]])],
- # MPFILES=$GMPDIR/mpn/mul_n.o
+- }
++
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ # MPFILES=$GMPDIR/mpn/mul_n.o
# PATCHED_SYMBOLS=__gmpn_toom3_mul_n
-+ AC_MSG_RESULT([4/5])
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 4/5" >&5
++$as_echo "4/5" >&6; }
MPFILES=
PATCHED_SYMBOLS=
# if test "$use" = "m68k-linux" ; then
-@@ -709,7 +711,8 @@
- echo "int main() {return 0;}" >>foo.c
+@@ -4834,7 +4925,8 @@
MP_INCLUDE=`cpp foo.c | grep /gmp.h | head -n 1 | $AWK '{print $3}' | tr -d '"'`
- rm -f foo.c,
-- echo "Cannot use dynamic gmp lib" , echo "Cannot use dynamic gmp lib" ),
-+ AC_MSG_RESULT([Cannot use dynamic gmp lib]),
-+ AC_MSG_RESULT([Cannot use dynamic gmp lib])),
- echo "Cannot use dynamic gmp lib" ,),
- echo "Cannot use dynamic gmp lib" ,)
+ rm -f foo.c
+ else
+- echo "Cannot use dynamic gmp lib"
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Cannot use dynamic gmp lib" >&5
++$as_echo "Cannot use dynamic gmp lib" >&6; }
fi
-@@ -756,7 +759,7 @@
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+@@ -4894,8 +4986,8 @@
fi
--AC_MSG_CHECKING("for leading underscore in object symbols")
-+AC_MSG_CHECKING([for leading underscore in object symbols])
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for leading underscore in object symbols\"" >&5
+-$as_echo_n "checking \"for leading underscore in object symbols\"... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for leading underscore in object symbols" >&5
++$as_echo_n "checking for leading underscore in object symbols... " >&6; }
cat>foo.c <<EOFF
#include <math.h>
#include <stdio.h>
-@@ -766,60 +769,62 @@
- if nm foo.o |grep " U " | grep "_cos" >/dev/null || nm foo.o |grep " U " | grep " _getc" >/dev/null ; then
+@@ -4906,45 +4998,53 @@
LEADING_UNDERSCORE=1
- AC_DEFINE(LEADING_UNDERSCORE)
-- AC_MSG_RESULT("yes")
-+ AC_MSG_RESULT([yes])
+ $as_echo "#define LEADING_UNDERSCORE 1" >>confdefs.h
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5
+-$as_echo "\"yes\"" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
else
LEADING_UNDERSCORE=""
-- AC_MSG_RESULT("no")
-+ AC_MSG_RESULT([no])
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
+-$as_echo "\"no\"" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
fi
--AC_MSG_CHECKING("for GNU ld option -Map")
-+AC_MSG_CHECKING([for GNU ld option -Map])
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for GNU ld option -Map\"" >&5
+-$as_echo_n "checking \"for GNU ld option -Map\"... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld option -Map" >&5
++$as_echo_n "checking for GNU ld option -Map... " >&6; }
touch map
- $CC -o foo [ -Wl,-Map ] map foo.o >/dev/null 2>&1
+ $CC -o foo -Wl,-Map map foo.o >/dev/null 2>&1
if test `cat map | wc -l` != "0" ; then
-- AC_MSG_RESULT("yes")
-+ AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_GNU_LD)
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5
+-$as_echo "\"yes\"" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ $as_echo "#define HAVE_GNU_LD 1" >>confdefs.h
+
GNU_LD=1
else
-- AC_MSG_RESULT("no")
-+ AC_MSG_RESULT([no])
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
+-$as_echo "\"no\"" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
GNU_LD=
fi
rm -f foo.c foo.o foo map
-- AC_MSG_CHECKING("for size of gmp limbs")
-- AC_TRY_RUN([#include <stdio.h>
-+ AC_MSG_CHECKING([for size of gmp limbs])
-+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for size of gmp limbs\"" >&5
+-$as_echo_n "checking \"for size of gmp limbs\"... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for size of gmp limbs" >&5
++$as_echo_n "checking for size of gmp limbs... " >&6; }
+ if test "$cross_compiling" = yes; then :
+ mpsize=0
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <stdio.h>
++
+ #include <stdio.h>
#include "$MP_INCLUDE"
- int main() {
-+ ]],[[
++
++int
++main ()
++{
++
FILE *fp=fopen("conftest1","w");
fprintf(fp,"%u",sizeof(mp_limb_t));
fclose(fp);
return 0;
-- }],mpsize=`cat conftest1`,mpsize=0,mpsize=0)
-+ ]])],mpsize=`cat conftest1`,mpsize=0,mpsize=0)
+- }
++
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ mpsize=`cat conftest1`
+@@ -4956,8 +5056,7 @@
+ fi
+
if test "$mpsize" = "0" ; then
- echo "Cannot determine mpsize"
- exit 1
-+ AC_MSG_ERROR([Cannot determine mpsize], 1)
++ as_fn_error 1 "Cannot determine mpsize" "$LINENO" 5
fi
- AC_DEFINE_UNQUOTED(MP_LIMB_BYTES,$mpsize)
- AC_MSG_RESULT($mpsize)
+ cat >>confdefs.h <<_ACEOF
+ #define MP_LIMB_BYTES $mpsize
+@@ -4966,23 +5065,31 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mpsize" >&5
+ $as_echo "$mpsize" >&6; }
-- AC_MSG_CHECKING("_SHORT_LIMB")
-- AC_TRY_RUN([#include <stdio.h>
-+ AC_MSG_CHECKING([_SHORT_LIMB])
-+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"_SHORT_LIMB\"" >&5
+-$as_echo_n "checking \"_SHORT_LIMB\"... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking _SHORT_LIMB" >&5
++$as_echo_n "checking _SHORT_LIMB... " >&6; }
+ if test "$cross_compiling" = yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <stdio.h>
++
+ #include <stdio.h>
#include "$MP_INCLUDE"
- int main() {
-+ ]],[[
++
++int
++main ()
++{
++
#ifdef _SHORT_LIMB
return 0;
#else
return 1;
#endif
-- }],AC_DEFINE(__SHORT_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no))
-- AC_MSG_CHECKING("_LONG_LONG_LIMB")
-- AC_TRY_RUN([#include <stdio.h>
-+ ]])],AC_DEFINE(__SHORT_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no))
-+ AC_MSG_CHECKING([_LONG_LONG_LIMB])
-+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+- }
++
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ $as_echo "#define __SHORT_LIMB 1" >>confdefs.h
+@@ -4996,23 +5103,31 @@
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"_LONG_LONG_LIMB\"" >&5
+-$as_echo_n "checking \"_LONG_LONG_LIMB\"... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking _LONG_LONG_LIMB" >&5
++$as_echo_n "checking _LONG_LONG_LIMB... " >&6; }
+ if test "$cross_compiling" = yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <stdio.h>
++
+ #include <stdio.h>
#include "$MP_INCLUDE"
- int main() {
-+ ]],[[
++
++int
++main ()
++{
++
#ifdef _LONG_LONG_LIMB
return 0;
#else
return 1;
#endif
-- }],AC_DEFINE(__LONG_LONG_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no))
-+ ]])],AC_DEFINE(__LONG_LONG_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no))
-
- GMP=1
- AC_DEFINE(GMP)
-@@ -875,10 +880,9 @@
+- }
++
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ $as_echo "#define __LONG_LONG_LIMB 1" >>confdefs.h
+@@ -5351,8 +5466,7 @@
+ fi
- AC_CHECK_LIB(dl,dlopen,have_dl=1,have_dl=0)
if test "$have_dl" = "0" ; then
- echo "Cannot find dlopen in -dl"
- exit 1
-+ AC_MSG_ERROR([Cannot find dlopen in -dl], 1)
++ as_fn_error 1 "Cannot find dlopen in -dl" "$LINENO" 5
fi
--dnl AC_SEARCH_LIBS(dlopen, dl, have_dl=1, AC_ERROR(dlopen not found))
-+dnl AC_SEARCH_LIBS(dlopen, dl, have_dl=1, AC_MSG_ERROR([dlopen not found]))
- dnl LIBS and TLIBS - why not merged from the beginning?
TLIBS="$TLIBS -ldl -rdynamic"
-@@ -892,15 +896,17 @@
- #
- # Old binutils appear to need CONST defined to const
- #
-- AC_MSG_CHECKING(if need to define CONST for bfd)
-- AC_TRY_RUN([#define IN_GCC
-+ AC_MSG_CHECKING([if need to define CONST for bfd])
-+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+@@ -5410,9 +5524,17 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#define IN_GCC
++
+ #define IN_GCC
#include <bfd.h>
-- int main() { symbol_info t; return 0;}],
-+ ]],[[symbol_info t; return 0;]])],
- AC_MSG_RESULT(no),
-- AC_TRY_RUN([#define CONST const
-+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+- int main() { symbol_info t; return 0;}
++
++int
++main ()
++{
++symbol_info t; return 0;
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+@@ -5423,10 +5545,18 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#define CONST const
++
+ #define CONST const
#define IN_GCC
#include <bfd.h>
-- int main() {symbol_info t; return 0;}],
-+ ]],[[symbol_info t; return 0;]])],
- AC_MSG_RESULT(yes)
- AC_DEFINE(NEED_CONST),
- AC_MSG_ERROR([cannot use bfd]),
-@@ -914,11 +920,12 @@
+- int main() {symbol_info t; return 0;}
++
++int
++main ()
++{
++symbol_info t; return 0;
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+@@ -5459,18 +5589,26 @@
# BFD boolean syntax
#
-- AC_MSG_CHECKING(for useable bfd_boolean)
-- AC_TRY_RUN([#define IN_GCC
-+ AC_MSG_CHECKING([for usable bfd_boolean])
-+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for useable bfd_boolean" >&5
+-$as_echo_n "checking for useable bfd_boolean... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable bfd_boolean" >&5
++$as_echo_n "checking for usable bfd_boolean... " >&6; }
+ if test "$cross_compiling" = yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#define IN_GCC
++
+ #define IN_GCC
#include <bfd.h>
bfd_boolean foo() {return FALSE;}
-- int main() {return 0;}],
-+ ]],[[return 0;]])],
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_BFD_BOOLEAN),
- AC_MSG_RESULT(no),
-@@ -929,10 +936,11 @@
- # bfd_link_info.output_bfd minimal configure change check
- #
-
-- AC_MSG_CHECKING(for bfd_link_info.output_bfd)
-- AC_TRY_RUN([#include <bfd.h>
-+ AC_MSG_CHECKING([for bfd_link_info.output_bfd])
-+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+- int main() {return 0;}
++
++int
++main ()
++{
++return 0;
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+@@ -5499,9 +5637,17 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <bfd.h>
++
+ #include <bfd.h>
#include <bfdlink.h>
-- int main() {struct bfd_link_info i;i.output_bfd=0;return 0;}],
-+ ]],[[struct bfd_link_info i;i.output_bfd=0;return 0;]])],
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_OUTPUT_BFD),
- AC_MSG_RESULT(no),
-@@ -1035,45 +1043,47 @@
- # mechanism, in the PAGE macro. This offset is subtracted from
- # addresses, in calculating a page for an address in the heap.
-
--AC_CHECK_SIZEOF(long,0)
-+AC_CHECK_SIZEOF(long)
- AC_MSG_CHECKING(sizeof struct contblock)
-
+- int main() {struct bfd_link_info i;i.output_bfd=0;return 0;}
++
++int
++main ()
++{
++struct bfd_link_info i;i.output_bfd=0;return 0;
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+@@ -5783,26 +5929,34 @@
# work around MSYS pwd result incompatibility
if test "$use" = "mingw" ; then
--AC_TRY_RUN([#include <stdio.h>
-+AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+ if test "$cross_compiling" = yes; then :
+- echo Cannot find sizeof struct contblock;exit 1
++ as_fn_error 1 "Cannot find sizeof struct contblock" "$LINENO" 5
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <stdio.h>
++
+ #include <stdio.h>
#define EXTER
#include "$MP_INCLUDE"
#include "h/enum.h"
#include "h/object.h"
- int main(int argc,char **argv,char **envp) {
-+ ]],[[
++
++int
++main ()
++{
++
FILE *f=fopen("conftest1","w");
fprintf(f,"%u",sizeof(struct contblock));
fclose(f);
return 0;
-- }],sizeof_contblock=`cat conftest1`,
-- echo Cannot find sizeof struct contblock;exit 1,
-- echo Cannot find sizeof struct contblock;exit 1)
-+ ]])],sizeof_contblock=`cat conftest1`,
-+ AC_MSG_ERROR([Cannot find sizeof struct contblock], 1),
-+ AC_MSG_ERROR([Cannot find sizeof struct contblock], 1))
+- }
++
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ sizeof_contblock=`cat conftest1`
else
--AC_TRY_RUN([#include <stdio.h>
-+AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+- echo Cannot find sizeof struct contblock;exit 1
++ as_fn_error 1 "Cannot find sizeof struct contblock" "$LINENO" 5
+ fi
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+@@ -5810,26 +5964,34 @@
+
+ else
+ if test "$cross_compiling" = yes; then :
+- echo Cannot find sizeof struct contblock;exit 1
++ as_fn_error 1 "Cannot find sizeof struct contblock" "$LINENO" 5
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <stdio.h>
++
+ #include <stdio.h>
#define EXTER
#include "$MP_INCLUDE"
#include "`pwd`/h/enum.h"
#include "`pwd`/h/object.h"
- int main(int argc,char **argv,char **envp) {
-+ ]],[[
++
++int
++main ()
++{
++
FILE *f=fopen("conftest1","w");
fprintf(f,"%u",sizeof(struct contblock));
fclose(f);
return 0;
-- }],sizeof_contblock=`cat conftest1`,
-- echo Cannot find sizeof struct contblock;exit 1,
-- echo Cannot find sizeof struct contblock;exit 1)
-+ ]])],sizeof_contblock=`cat conftest1`,
-+ AC_MSG_ERROR([Cannot find sizeof struct contblock], 1),
-+ AC_MSG_ERROR([Cannot find sizeof struct contblock], 1))
+- }
++
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ sizeof_contblock=`cat conftest1`
+ else
+- echo Cannot find sizeof struct contblock;exit 1
++ as_fn_error 1 "Cannot find sizeof struct contblock" "$LINENO" 5
fi
- AC_MSG_RESULT($sizeof_contblock)
- AC_DEFINE_UNQUOTED(SIZEOF_CONTBLOCK,$sizeof_contblock)
-
-
--AC_MSG_CHECKING(for word order)
--AC_TRY_RUN([int main () {
-+AC_MSG_CHECKING([for word order])
-+AC_RUN_IFELSE([AC_LANG_PROGRAM([],[[
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+@@ -5856,7 +6018,11 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-int main () {
++
++int
++main ()
++{
++
/* Are we little or big endian? Adapted from Harbison&Steele. */
union
{
-@@ -1082,7 +1092,7 @@
+@@ -5865,6 +6031,9 @@
} u;
u.d = 1.0;
return u.l[sizeof(double)/sizeof(int)-1] ? 0 : 1;
--}],AC_MSG_RESULT(little)
-+]])],AC_MSG_RESULT(little)
- AC_DEFINE(LITTLE_END),
- AC_MSG_RESULT(big),
- AC_MSG_RESULT([WARNING: ASSUMING LITTLE ENDIAN FOR CROSS COMPILING !!!]
-@@ -1095,15 +1105,16 @@
-
- AC_MSG_CHECKING([for sbrk])
- HAVE_SBRK=""
--AC_TRY_RUN([#include <unistd.h>
++
++ ;
++ return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+@@ -5895,15 +6064,23 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <unistd.h>
- #include <stdio.h>
- int main() {
-+AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++
+ #include <unistd.h>
+ #include <stdio.h>
-+ ]],[[
++
++int
++main ()
++{
++
FILE *f;
if (!(f=fopen("conftest1","w")))
return -1;
fprintf(f,"%u",sbrk(0));
return 0;
-- }],
-+ ]])],
- HAVE_SBRK=1
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT([no: WARNING you must be able to emulate sbrk: as on mingw or macosx]),
-@@ -1115,14 +1126,15 @@
- # AC_MSG_RESULT(sys/personality.h not found))
-
- AC_MSG_CHECKING([for ADDR_NO_RANDOMIZE constant])
-- AC_TRY_RUN([#include <sys/personality.h>
+- }
++
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ HAVE_SBRK=1
+@@ -5930,14 +6107,22 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <sys/personality.h>
- #include <stdio.h>
- int main(int argc,char *argv[],char *envp[]) {
-+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++
+ #include <sys/personality.h>
+ #include <stdio.h>
-+ ]],[[
++
++int
++main ()
++{
++
FILE *f;
if (!(f=fopen("conftest1","w"))) return -1;
fprintf(f,"%x",ADDR_NO_RANDOMIZE);
return 0;
-- }],
-+ ]])],
- ADDR_NO_RANDOMIZE=`cat conftest1`,ADDR_NO_RANDOMIZE=0,ADDR_NO_RANDOMIZE=0)
- if test "$ADDR_NO_RANDOMIZE" = "0" ; then
- AC_MSG_RESULT([no, assuming 0x40000])
-@@ -1132,10 +1144,11 @@
- fi
-
- AC_MSG_CHECKING([for personality(ADDR_NO_RANDOMIZE) support])
-- AC_TRY_RUN([void gprof_cleanup() {};
-+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+- }
++
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ ADDR_NO_RANDOMIZE=`cat conftest1`
+@@ -5967,7 +6152,8 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-void gprof_cleanup() {};
++
+ void gprof_cleanup() {}
int main(int argc,char *argv[],char *envp[]) {
#include "h/unrandomize.h"
-- return 0;}],CAN_UNRANDOMIZE_SBRK=1,CAN_UNRANDOMIZE_SBRK=0,CAN_UNRANDOMIZE_SBRK=0)
-+ return 0;}]])],CAN_UNRANDOMIZE_SBRK=1,CAN_UNRANDOMIZE_SBRK=0,CAN_UNRANDOMIZE_SBRK=0)
-
- if test "$CAN_UNRANDOMIZE_SBRK" != 0 ; then
- AC_MSG_RESULT(yes)
-@@ -1145,8 +1158,9 @@
- fi
-
- AC_MSG_CHECKING([that sbrk is (now) non-random])
-- AC_TRY_RUN([#include <stdio.h>
+ return 0;}
+@@ -5999,8 +6185,9 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <stdio.h>
- void gprof_cleanup() {};
-+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
++
+ #include <stdio.h>
+ void gprof_cleanup() {}
int main(int argc,char * argv[],char * envp[]) {
FILE *f;
#ifdef CAN_UNRANDOMIZE_SBRK
-@@ -1154,13 +1168,13 @@
- #endif
- if (!(f=fopen("conftest1","w"))) return -1;
- fprintf(f,"%u",sbrk(0));
-- return 0;}],SBRK=`cat conftest1`,SBRK=0,SBRK=0)
-+ return 0;}]])],SBRK=`cat conftest1`,SBRK=0,SBRK=0)
+@@ -6020,17 +6207,16 @@
+ fi
+
if test "$SBRK" = "0" ; then
-- AC_MSG_RESULT(cannot trap sbrk)
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot trap sbrk" >&5
+-$as_echo "cannot trap sbrk" >&6; }
- exit 1
-+ AC_MSG_ERROR([cannot trap sbrk], 1)
++ as_fn_error 1 "cannot trap sbrk" "$LINENO" 5
fi
-- AC_TRY_RUN([#include <stdio.h>
+ if test "$cross_compiling" = yes; then :
+ SBRK1=0
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <stdio.h>
- void gprof_cleanup() {};
-+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
++
+ #include <stdio.h>
+ void gprof_cleanup() {}
int main(int argc,char * argv[],char * envp[]) {
FILE *f;
#ifdef CAN_UNRANDOMIZE_SBRK
-@@ -1168,10 +1182,9 @@
- #endif
- if (!(f=fopen("conftest1","w"))) return -1;
- fprintf(f,"%u",sbrk(0));
-- return 0;}],SBRK1=`cat conftest1`,SBRK1=0,SBRK1=0)
-+ return 0;}]])],SBRK1=`cat conftest1`,SBRK1=0,SBRK1=0)
+@@ -6050,9 +6236,7 @@
+ fi
+
if test "$SBRK1" = "0" ; then
-- AC_MSG_RESULT(cannot trap sbrk)
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot trap sbrk" >&5
+-$as_echo "cannot trap sbrk" >&6; }
- exit 1
-+ AC_MSG_ERROR([cannot trap sbrk], 1)
++ as_fn_error 1 "cannot trap sbrk" "$LINENO" 5
fi
if test "$SBRK" = "$SBRK1" ; then
- AC_MSG_RESULT(yes)
-@@ -1186,15 +1199,17 @@
- fi
-
- # pagewidth
--AC_MSG_CHECKING(for pagewidth)
--AC_TRY_RUN([#include <stdio.h>
-+AC_MSG_CHECKING([for pagewidth])
-+AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+@@ -6076,14 +6260,23 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <stdio.h>
++
+ #include <stdio.h>
#include <unistd.h>
--int main() {size_t i=getpagesize(),j;
-+ ]],[[
-+ size_t i=getpagesize(),j;
+-int main() {size_t i=getpagesize(),j;
++
++int
++main ()
++{
++
++ size_t i=getpagesize(),j;
FILE *fp=fopen("conftest1","w");
for (j=0;i>>=1;j++);
if (j<12) {printf("pagewidth %u is too small\n",j);return -1;}
fprintf(fp,"%u",j);
-- return 0;}],PAGEWIDTH=`cat conftest1`,PAGEWIDTH=0,PAGEWIDTH=0)
-+ return 0;]])],PAGEWIDTH=`cat conftest1`,PAGEWIDTH=0,PAGEWIDTH=0)
- AC_MSG_RESULT($PAGEWIDTH)
- AC_DEFINE_UNQUOTED(PAGEWIDTH,$PAGEWIDTH)
- AC_SUBST(PAGEWIDTH)
-@@ -1202,11 +1217,12 @@
+- return 0;}
++ return 0;
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ PAGEWIDTH=`cat conftest1`
+@@ -6105,17 +6298,18 @@
old_LDFLAGS="$LDFLAGS"
LDFLAGS="$TLDFLAGS"
--AC_MSG_CHECKING("finding DBEGIN")
--AC_TRY_RUN([#include <stdio.h>
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"finding DBEGIN\"" >&5
+-$as_echo_n "checking \"finding DBEGIN\"... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking finding DBEGIN" >&5
++$as_echo_n "checking finding DBEGIN... " >&6; }
+ if test "$cross_compiling" = yes; then :
+ dbegin=0
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++
+ #include <stdio.h>
- #include <stdlib.h>
-+AC_MSG_CHECKING([finding DBEGIN])
-+AC_RUN_IFELSE([AC_LANG_SOURCE([[
-+#include <stdio.h>
+#include <stdlib.h>
-void gprof_cleanup() {};
@@ -25712,258 +25594,400 @@
int
main(int argc,char * argv[],char *envp[])
{
-@@ -1231,36 +1247,35 @@
- #endif
- fclose(fp);
- return 0;
--}],dbegin=`cat conftest1`,dbegin=0,dbegin=0)
-+}]])],dbegin=`cat conftest1`,dbegin=0,dbegin=0)
- AC_DEFINE_UNQUOTED(DBEGIN,$dbegin /* where data begins */)
- AC_MSG_RESULT(got $dbegin)
+@@ -6160,21 +6354,28 @@
LDFLAGS="$old_LDFLAGS"
--AC_MSG_CHECKING("finding CSTACK_ADDRESS")
--AC_TRY_RUN([#include <stdio.h>
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"finding CSTACK_ADDRESS\"" >&5
+-$as_echo_n "checking \"finding CSTACK_ADDRESS\"... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking finding CSTACK_ADDRESS" >&5
++$as_echo_n "checking finding CSTACK_ADDRESS... " >&6; }
+ if test "$cross_compiling" = yes; then :
+ cstack_address=0
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++
+ #include <stdio.h>
-main()
--{
-+AC_MSG_CHECKING([finding CSTACK_ADDRESS])
-+AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-+#include <stdio.h>
-+]],[[
++
++int
++main ()
+ {
++
char *b ;
FILE *fp = fopen("conftest1","w");
fprintf(fp,"%ld",((long) &b));
fclose(fp);
return 0;
--}],cstack_address=`cat conftest1`,cstack_address=0,cstack_address=0)
-+]])],cstack_address=`cat conftest1`,cstack_address=0,cstack_address=0)
- AC_DEFINE_UNQUOTED(CSTACK_ADDRESS,$cstack_address \
- )
- AC_MSG_RESULT(got $cstack_address)
++
++ ;
++ return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+@@ -6196,8 +6397,8 @@
--AC_MSG_CHECKING("sizeof long long int")
--AC_TRY_RUN([#include <stdio.h>
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"sizeof long long int\"" >&5
+-$as_echo_n "checking \"sizeof long long int\"... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof long long int" >&5
++$as_echo_n "checking sizeof long long int... " >&6; }
+ if test "$cross_compiling" = yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+@@ -6205,13 +6406,19 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++
+ #include <stdio.h>
-main()
--{
-+AC_MSG_CHECKING([sizeof long long int])
-+AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-+#include <stdio.h>
-+]],[[
++
++int
++main ()
+ {
++
if (sizeof(long long int) == 2*sizeof(long)) return 0;
return 1;
-}
--],[AC_DEFINE(HAVE_LONG_LONG)
-+]])],[AC_DEFINE(HAVE_LONG_LONG)
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no),
- AC_MSG_RESULT(no)
-@@ -1429,7 +1444,6 @@
+
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+ $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
+@@ -6752,8 +6959,6 @@
# To get around this problem, check for both libraries together
# if -lsocket doesn't work by itself.
#--------------------------------------------------------------------
--AC_MSG_CHECKING([for sockets])
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockets" >&5
+-$as_echo_n "checking for sockets... " >&6; }
tcl_checkBoth=0
- AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
- if test "$tcl_checkSocket" = 1; then
-@@ -1466,8 +1480,8 @@
- AC_SUBST(RL_OBJS)
- AC_SUBST(RL_LIB)
+ ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
+ if test "x$ac_cv_func_connect" = xyes; then :
+@@ -6965,8 +7170,8 @@
--AC_MSG_CHECKING(For network code for nsocket.c)
--AC_TRY_LINK([
-+AC_MSG_CHECKING([for network code for nsocket.c])
-+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- #include <sys/time.h>
- #include <sys/types.h>
- #include <unistd.h>
-@@ -1484,24 +1498,25 @@
- #include <netinet/in.h> /* struct in_addr, struct sockaddr_in */
- #include <arpa/inet.h> /* inet_ntoa() */
- #include <netdb.h> /* gethostbyname() */
--],[ connect(0,(struct sockaddr *)0,0);
-+]],[[connect(0,(struct sockaddr *)0,0);
+
+
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking For network code for nsocket.c" >&5
+-$as_echo_n "checking For network code for nsocket.c... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for network code for nsocket.c" >&5
++$as_echo_n "checking for network code for nsocket.c... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -6990,7 +7195,7 @@
+ int
+ main ()
+ {
+- connect(0,(struct sockaddr *)0,0);
++connect(0,(struct sockaddr *)0,0);
gethostbyname("jil");
socket(AF_INET, SOCK_STREAM, 0);
-- ],
-+ ]])],
- [AC_DEFINE(HAVE_NSOCKET)
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no))
+@@ -7011,10 +7216,11 @@
+ conftest$ac_exeext conftest.$ac_ext
--AC_MSG_CHECKING(check for listen using fcntl)
--AC_TRY_COMPILE([#include <stdio.h>
-+AC_MSG_CHECKING([for listen using fcntl])
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-+#include <stdio.h>
+
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking check for listen using fcntl" >&5
+-$as_echo_n "checking check for listen using fcntl... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for listen using fcntl" >&5
++$as_echo_n "checking for listen using fcntl... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++
+ #include <stdio.h>
#include <fcntl.h>
--],
--[FILE *fp=fopen("configure.in","r");
-+]],
-+[[FILE *fp=fopen("configure.in","r");
- int orig;
- orig = fcntl(fileno(fp), F_GETFL);
- if (! (orig & O_NONBLOCK )) return 0;
--],
-+]])],
- [AC_DEFINE(LISTEN_USE_FCNTL)
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no))
-@@ -1522,7 +1537,7 @@
- AC_SUBST(USE_CLEANUP)
- gcl_ok=no
--AC_HEADER_EGREP(LITTLE_ENDIAN, ctype.h, gcl_ok=yes, gcl_ok=noo)
-+AC_EGREP_HEADER(LITTLE_ENDIAN, ctype.h, gcl_ok=yes, gcl_ok=no)
- if test $gcl_ok = yes ; then
- AC_DEFINE(ENDIAN_ALREADY_DEFINED)
+@@ -7090,7 +7296,7 @@
+ $EGREP "LITTLE_ENDIAN" >/dev/null 2>&1; then :
+ gcl_ok=yes
+ else
+- gcl_ok=noo
++ gcl_ok=no
fi
-@@ -1554,32 +1569,32 @@
+ rm -f conftest*
+
+@@ -7134,17 +7340,17 @@
esac
--AC_MSG_CHECKING(check for SV_ONSTACK)
--AC_TRY_COMPILE([#include <signal.h>
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking check for SV_ONSTACK" >&5
+-$as_echo_n "checking check for SV_ONSTACK... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SV_ONSTACK" >&5
++$as_echo_n "checking for SV_ONSTACK... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++
+ #include <signal.h>
-int joe=SV_ONSTACK;
--],
--[],
-+AC_MSG_CHECKING([for SV_ONSTACK])
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-+#include <signal.h>
-+]],
-+[[return SV_ONSTACK;]])],
- [AC_DEFINE(HAVE_SV_ONSTACK)
- AC_SUBST(HAVE_SV_ONSTACK)
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no))
--AC_MSG_CHECKING(check for SIGSYS)
--AC_TRY_COMPILE([#include <signal.h>
+ int
+ main ()
+ {
+-
++return SV_ONSTACK;
+ ;
+ return 0;
+ }
+@@ -7161,17 +7367,17 @@
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking check for SIGSYS" >&5
+-$as_echo_n "checking check for SIGSYS... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGSYS" >&5
++$as_echo_n "checking for SIGSYS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++
+ #include <signal.h>
-int joe=SIGSYS;
--],
--[],
-+AC_MSG_CHECKING([for SIGSYS])
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-+#include <signal.h>
-+]],
-+[[return SIGSYS;]])],
- [AC_DEFINE(HAVE_SIGSYS)
- AC_SUBST(HAVE_SIGSYS)
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no))
+ int
+ main ()
+ {
+-
++return SIGSYS;
+ ;
+ return 0;
+ }
+@@ -7189,17 +7395,17 @@
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--AC_MSG_CHECKING(check for SIGEMT)
--AC_TRY_COMPILE([#include <signal.h>
+
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking check for SIGEMT" >&5
+-$as_echo_n "checking check for SIGEMT... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGEMT" >&5
++$as_echo_n "checking for SIGEMT... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++
+ #include <signal.h>
-int joe=SIGEMT;
--],
--[],
-+AC_MSG_CHECKING([for SIGEMT])
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-+#include <signal.h>
-+]],
-+[[return SIGEMT;]])],
- [AC_DEFINE(HAVE_SIGEMT)
- AC_SUBST(HAVE_SIGEMT)
- AC_MSG_RESULT(yes)],
-@@ -1591,12 +1606,13 @@
- #if test $use = "386-linux" ; then
- AC_CHECK_HEADERS(asm/sigcontext.h)
- AC_CHECK_HEADERS(asm/signal.h)
-- AC_MSG_CHECKING([for sigcontext...])
-- AC_TRY_COMPILE([#include <signal.h>
-- ],
-- [
-+ AC_MSG_CHECKING([for sigcontext])
-+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+
+ int
+ main ()
+ {
+-
++return SIGEMT;
+ ;
+ return 0;
+ }
+@@ -7244,11 +7450,12 @@
+
+ done
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigcontext..." >&5
+-$as_echo_n "checking for sigcontext...... " >&6; }
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigcontext" >&5
++$as_echo_n "checking for sigcontext... " >&6; }
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <signal.h>
++
+ #include <signal.h>
-+ ]],
-+ [[
- struct sigcontext foo;
-- ],
-+ ]])],
- [
- sigcontext_works=1;
- AC_DEFINE(SIGNAL_H_HAS_SIGCONTEXT)
-@@ -1607,18 +1623,19 @@
- AC_MSG_RESULT(sigcontext NOT in signal.h)]
- )
+
+ int
+ main ()
+@@ -7276,11 +7483,12 @@
+ fi
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "$sigcontext_works" = 0 ; then
-- AC_MSG_CHECKING([for sigcontext...])
-- AC_TRY_COMPILE([#include <signal.h>
-+ AC_MSG_CHECKING([for sigcontext])
-+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigcontext..." >&5
+-$as_echo_n "checking for sigcontext...... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigcontext" >&5
++$as_echo_n "checking for sigcontext... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <signal.h>
++
+ #include <signal.h>
- #ifdef HAVE_ASM_SIGCONTEXT_H
+ #ifdef HAVE_ASM_SIGCONTEXT_H
#include <asm/sigcontext.h>
#endif
- #ifdef HAVE_ASM_SIGNAL_H
- #include <asm/signal.h>
- #endif
-- ],
-- [
-+ ]],
-+ [[
- struct sigcontext foo;
-- ],
-+ ]])],
- [
- AC_DEFINE(HAVE_SIGCONTEXT)
- AC_MSG_RESULT(sigcontext in asm files)
-@@ -1728,6 +1745,8 @@
+@@ -7459,26 +7667,41 @@
if test "$enable_tcltk" = "yes" ; then
-+AC_CHECK_LIB(ieee,main,have_ieee=1,have_ieee=0)
-+AC_CHECK_PROG(TCLSH,tclsh,tclsh,${TCLSH})
- AC_MSG_CHECKING([for tcl/tk])
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tcl/tk" >&5
+-$as_echo_n "checking for tcl/tk... " >&6; }
+-
+-
+-if test -d "${TCL_CONFIG_PREFIX}" ; then true ; else
+-rm -f conftest.tcl
+-cat >> conftest.tcl <<EOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lieee" >&5
++$as_echo_n "checking for main in -lieee... " >&6; }
++if ${ac_cv_lib_ieee_main+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lieee $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
+-set dir [set tcl_library]
+-if { [file exists [file join [set dir] tclConfig.sh]] } {
+- puts [set dir]
+- exit
+- }
+-set dir [file dirname [set tcl_library]]
+-if { [file exists [file join [set dir] tclConfig.sh]] } {
+- puts [set dir]
+- }
+
+-EOF
+-#cp conftest.tcl foo.tcl
++int
++main ()
++{
++return main ();
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_lib_ieee_main=yes
++else
++ ac_cv_lib_ieee_main=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee_main" >&5
++$as_echo "$ac_cv_lib_ieee_main" >&6; }
++if test "x$ac_cv_lib_ieee_main" = xyes; then :
++ have_ieee=1
++else
++ have_ieee=0
++fi
+
+ # Extract the first word of "tclsh", so it can be a program name with args.
+ set dummy tclsh; ac_word=$2
+@@ -7518,7 +7741,26 @@
+ fi
-@@ -1748,9 +1767,6 @@
- EOF
- #cp conftest.tcl foo.tcl
--AC_CHECK_PROG(TCLSH,tclsh,tclsh,${TCLSH})
-#AC_CHECK_PROG(TCLSH,tclsh8.0,tclsh8.0,${TCLSH})
--
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tcl/tk" >&5
++$as_echo_n "checking for tcl/tk... " >&6; }
++
++
++if test -d "${TCL_CONFIG_PREFIX}" ; then true ; else
++rm -f conftest.tcl
++cat >> conftest.tcl <<EOF
++
++set dir [set tcl_library]
++if { [file exists [file join [set dir] tclConfig.sh]] } {
++ puts [set dir]
++ exit
++ }
++set dir [file dirname [set tcl_library]]
++if { [file exists [file join [set dir] tclConfig.sh]] } {
++ puts [set dir]
++ }
++
++EOF
++#cp conftest.tcl foo.tcl
+
if test "${TCLSH}" = "" ; then true ; else
TCL_CONFIG_PREFIX=`${TCLSH} < conftest.tcl`
- fi
-@@ -1824,7 +1840,6 @@
+@@ -7593,42 +7835,6 @@
fi
--AC_CHECK_LIB(lieee,main,have_ieee=1,have_ieee=0)
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -llieee" >&5
+-$as_echo_n "checking for main in -llieee... " >&6; }
+-if ${ac_cv_lib_lieee_main+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- ac_check_lib_save_LIBS=$LIBS
+-LIBS="-llieee $LIBS"
+-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-
+-
+-int
+-main ()
+-{
+-return main ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-if ac_fn_c_try_link "$LINENO"; then :
+- ac_cv_lib_lieee_main=yes
+-else
+- ac_cv_lib_lieee_main=no
+-fi
+-rm -f core conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lieee_main" >&5
+-$as_echo "$ac_cv_lib_lieee_main" >&6; }
+-if test "x$ac_cv_lib_lieee_main" = xyes; then :
+- have_ieee=1
+-else
+- have_ieee=0
+-fi
+-
if test "$have_ieee" = "0" ; then
TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" `
fi
-@@ -1868,15 +1883,18 @@
+@@ -7674,14 +7880,23 @@
# the time handling for unixtime, add timezone
--AC_MSG_CHECKING([alloca])
--AC_TRY_RUN([int main() { exit(alloca(500) != NULL ? 0 : 1);}],
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alloca" >&5
+-$as_echo_n "checking alloca... " >&6; }
+# alloca
+
-+AC_MSG_CHECKING([for alloca])
-+AC_RUN_IFELSE([AC_LANG_PROGRAM([],[[exit(alloca(500) != NULL ? 0 : 1);]])],
- ,gcl_ok=yes, gcl_ok=no,gcl_ok=no)
- if test $gcl_ok = yes ; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_ALLOCA)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
++$as_echo_n "checking for alloca... " >&6; }
+ if test "$cross_compiling" = yes; then :
+ gcl_ok=no
else
-- AC_TRY_RUN([#include <alloca.h>
-- int main() { exit(alloca(500) != NULL ? 0 : 1);}],
-+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-int main() { exit(alloca(500) != NULL ? 0 : 1);}
++
++int
++main ()
++{
++exit(alloca(500) != NULL ? 0 : 1);
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+
+@@ -7703,8 +7918,16 @@
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+-#include <alloca.h>
+- int main() { exit(alloca(500) != NULL ? 0 : 1);}
++
+ #include <alloca.h>
-+ ]],[[exit(alloca(500) != NULL ? 0 : 1);]])],
- ,gcl_ok=yes, gcl_ok=no,gcl_ok=no)
- if test $gcl_ok = yes ; then
- AC_MSG_RESULT(yes)
-@@ -1895,8 +1913,6 @@
++
++int
++main ()
++{
++exit(alloca(500) != NULL ? 0 : 1);
++ ;
++ return 0;
++}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+
+@@ -7736,8 +7959,6 @@
@@ -25972,22 +25996,23 @@
# dlopen etc
# idea make it so you do something dlopen(libX.so,RTLD_GLOBAL)
# then dlload("foo.o") a lisp file can refer to things in libX.so
-@@ -1920,7 +1936,7 @@
+@@ -7761,8 +7982,8 @@
# redhat/cygnus released for some reason a buggy version of gcc,
# which no one else released. Catch that here.
--AC_MSG_CHECKING([Checking for buggy gcc version from redhat])
-+AC_MSG_CHECKING([for buggy gcc version from redhat])
- if 2>&1 $CC -v | fgrep "gcc version 2.96" > /dev/null
- then
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for buggy gcc version from redhat" >&5
+-$as_echo_n "checking Checking for buggy gcc version from redhat... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy gcc version from redhat" >&5
++$as_echo_n "checking for buggy gcc version from redhat... " >&6; }
+ if 2>&1 $CC -v | fgrep "gcc version 2.96" > /dev/null
+ then
BROKEN_O4_OPT=1
-@@ -1955,7 +1971,8 @@
- if test -f h/$use.defs ; then
+@@ -7802,7 +8023,7 @@
- AC_SUBST(use)
-- AC_OUTPUT(makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp )
-+ AC_CONFIG_FILES(makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp )
-+ AC_OUTPUT
- echo makedefc
- cat makedefc
+ ac_config_files="$ac_config_files makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp"
+-cat >confcache <<\_ACEOF
++ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+ # scripts and configure runs, see configure's option --config-cache.
diff --git a/gcl-2.6.8-unrandomize.patch b/gcl-2.6.8-unrandomize.patch
index ce5085c..46b4638 100644
--- a/gcl-2.6.8-unrandomize.patch
+++ b/gcl-2.6.8-unrandomize.patch
@@ -1,5 +1,5 @@
--- ./o/main.c.orig 2010-11-02 15:56:45.000000000 -0600
-+++ ./o/main.c 2011-06-01 15:48:42.269433777 -0600
++++ ./o/main.c 2012-01-09 20:51:43.097828330 -0700
@@ -51,6 +51,7 @@
#include <signal.h>
#endif
@@ -21,72 +21,8 @@
#ifdef LD_BIND_NOW
#include <stdio.h>
---- ./configure.orig 2011-06-01 15:40:10.483433770 -0600
-+++ ./configure 2011-06-01 15:49:00.462433776 -0600
-@@ -6851,9 +6851,11 @@
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
-+ #define CAN_UNRANDOMIZE_SBRK 1
-+ #include "h/unrandomize.h"
- void gprof_cleanup() {}
- int main(int argc,char *argv[],char *envp[]) {
-- #include "h/unrandomize.h"
-+ UNRANDOMIZE_SBRK;
- return 0;}
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
-@@ -6885,12 +6887,11 @@
- /* end confdefs.h. */
-
- #include <stdio.h>
-+ #include "h/unrandomize.h"
- void gprof_cleanup() {}
- int main(int argc,char * argv[],char * envp[]) {
- FILE *f;
-- #ifdef CAN_UNRANDOMIZE_SBRK
-- #include "h/unrandomize.h"
-- #endif
-+ UNRANDOMIZE_SBRK;
- if (!(f=fopen("conftest1","w"))) return -1;
- fprintf(f,"%u",sbrk(0));
- return 0;}
-@@ -6914,12 +6915,11 @@
- /* end confdefs.h. */
-
- #include <stdio.h>
-+ #include "h/unrandomize.h"
- void gprof_cleanup() {}
- int main(int argc,char * argv[],char * envp[]) {
- FILE *f;
-- #ifdef CAN_UNRANDOMIZE_SBRK
-- #include "h/unrandomize.h"
-- #endif
-+ UNRANDOMIZE_SBRK;
- if (!(f=fopen("conftest1","w"))) return -1;
- fprintf(f,"%u",sbrk(0));
- return 0;}
-@@ -7006,6 +7006,7 @@
-
- #include <stdio.h>
- #include <stdlib.h>
-+#include "h/unrandomize.h"
-
- void gprof_cleanup() {}
- int
-@@ -7014,9 +7015,7 @@
- char *b,*b1;
- FILE *fp;
-
--#ifdef CAN_UNRANDOMIZE_SBRK
--#include "h/unrandomize.h"
--#endif
-+ UNRANDOMIZE_SBRK;
- b = (void *) malloc(1000);
- fp = fopen("conftest1","w");
-
--- ./h/unrandomize.h.orig 2010-01-12 07:19:15.000000000 -0700
-+++ ./h/unrandomize.h 2011-06-01 15:47:46.957433777 -0600
++++ ./h/unrandomize.h 2012-01-09 20:51:43.101828245 -0700
@@ -1,39 +1,45 @@
+#include <stdio.h>
+#include <stdlib.h>
@@ -165,9 +101,9 @@
- }
- }
-}
---- ./configure.in.orig 2011-06-01 15:39:34.750433770 -0600
-+++ ./configure.in 2011-06-01 15:44:46.725433778 -0600
-@@ -1146,9 +1146,11 @@
+--- ./configure.in.orig 2012-01-09 20:49:21.949801255 -0700
++++ ./configure.in 2012-01-09 20:51:43.102828225 -0700
+@@ -1167,9 +1167,11 @@
AC_MSG_CHECKING([for personality(ADDR_NO_RANDOMIZE) support])
AC_RUN_IFELSE([AC_LANG_SOURCE([[
@@ -180,7 +116,7 @@
return 0;}]])],CAN_UNRANDOMIZE_SBRK=1,CAN_UNRANDOMIZE_SBRK=0,CAN_UNRANDOMIZE_SBRK=0)
if test "$CAN_UNRANDOMIZE_SBRK" != 0 ; then
-@@ -1161,12 +1163,11 @@
+@@ -1182,12 +1184,11 @@
AC_MSG_CHECKING([that sbrk is (now) non-random])
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
@@ -195,7 +131,7 @@
if (!(f=fopen("conftest1","w"))) return -1;
fprintf(f,"%u",sbrk(0));
return 0;}]])],SBRK=`cat conftest1`,SBRK=0,SBRK=0)
-@@ -1175,12 +1176,11 @@
+@@ -1196,12 +1197,11 @@
fi
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
@@ -210,7 +146,7 @@
if (!(f=fopen("conftest1","w"))) return -1;
fprintf(f,"%u",sbrk(0));
return 0;}]])],SBRK1=`cat conftest1`,SBRK1=0,SBRK1=0)
-@@ -1222,6 +1222,7 @@
+@@ -1243,6 +1243,7 @@
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <stdlib.h>
@@ -218,7 +154,71 @@
void gprof_cleanup() {}
int
-@@ -1230,9 +1231,7 @@
+@@ -1251,9 +1252,7 @@
+ char *b,*b1;
+ FILE *fp;
+
+-#ifdef CAN_UNRANDOMIZE_SBRK
+-#include "h/unrandomize.h"
+-#endif
++ UNRANDOMIZE_SBRK;
+ b = (void *) malloc(1000);
+ fp = fopen("conftest1","w");
+
+--- ./configure.orig 2012-01-09 20:49:33.805551545 -0700
++++ ./configure 2012-01-09 20:51:54.679584389 -0700
+@@ -6946,9 +6946,11 @@
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
++ #define CAN_UNRANDOMIZE_SBRK 1
++ #include "h/unrandomize.h"
+ void gprof_cleanup() {}
+ int main(int argc,char *argv[],char *envp[]) {
+- #include "h/unrandomize.h"
++ UNRANDOMIZE_SBRK;
+ return 0;}
+ _ACEOF
+ if ac_fn_c_try_run "$LINENO"; then :
+@@ -6980,12 +6982,11 @@
+ /* end confdefs.h. */
+
+ #include <stdio.h>
++ #include "h/unrandomize.h"
+ void gprof_cleanup() {}
+ int main(int argc,char * argv[],char * envp[]) {
+ FILE *f;
+- #ifdef CAN_UNRANDOMIZE_SBRK
+- #include "h/unrandomize.h"
+- #endif
++ UNRANDOMIZE_SBRK;
+ if (!(f=fopen("conftest1","w"))) return -1;
+ fprintf(f,"%u",sbrk(0));
+ return 0;}
+@@ -7009,12 +7010,11 @@
+ /* end confdefs.h. */
+
+ #include <stdio.h>
++ #include "h/unrandomize.h"
+ void gprof_cleanup() {}
+ int main(int argc,char * argv[],char * envp[]) {
+ FILE *f;
+- #ifdef CAN_UNRANDOMIZE_SBRK
+- #include "h/unrandomize.h"
+- #endif
++ UNRANDOMIZE_SBRK;
+ if (!(f=fopen("conftest1","w"))) return -1;
+ fprintf(f,"%u",sbrk(0));
+ return 0;}
+@@ -7101,6 +7101,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include "h/unrandomize.h"
+
+ void gprof_cleanup() {}
+ int
+@@ -7109,9 +7110,7 @@
char *b,*b1;
FILE *fp;
diff --git a/gcl.spec b/gcl.spec
index e7acae6..d9da709 100644
--- a/gcl.spec
+++ b/gcl.spec
@@ -1,13 +1,13 @@
# -fstack-protector leads to segfaults because GCL uses its own conflicting
-# stack protection scheme. GCL code violates C99 aliasing rules.
+# stack protection scheme.
%global __global_cflags %(printf %%s '%__global_cflags' | sed 's/-fstack-protector --param=ssp-buffer-size=4//')
# Prerelease of 2.6.8
-%global alphatag 20110516cvs
+%global alphatag 20120109cvs
Name: gcl
Version: 2.6.8
-Release: 0.9.%{alphatag}%{?dist}.2
+Release: 0.10.%{alphatag}%{?dist}
Summary: GNU Common Lisp
Group: Development/Languages
@@ -16,7 +16,7 @@ URL: http://www.gnu.org/software/gcl/
# The source for this package was pulled from upstream's CVS repository. Use
# the following commands to generate the tarball:
# cvs -d:pserver:anonymous at cvs.savannah.gnu.org:/sources/gcl export \
-# -r Version_2_6_8pre -D 2011-05-17 -d gcl-2.6.8 gcl
+# -r Version_2_6_8pre -D 2012-01-10 -d gcl-2.6.8 gcl
# tar cvf gcl-2.6.8.tar gcl-2.6.8
# xz gcl-2.6.8.tar
Source0: gcl-%{version}.tar.xz
@@ -95,12 +95,13 @@ BuildRequires: tcl-devel
BuildRequires: gmp-devel
BuildRequires: tex(latex)
BuildRequires: texinfo
-BuildRequires: emacs, emacs-el
-BuildRequires: xemacs, xemacs-devel, xemacs-packages-extra
+BuildRequires: emacs
+BuildRequires: xemacs
+BuildRequires: xemacs-packages-extra
BuildRequires: selinux-policy
Requires: gcl-selinux%{?_isa} = %{version}-%{release}
-Requires(post): /sbin/install-info
-Requires(postun): /sbin/install-info
+Requires(post): info
+Requires(postun): info
# GCL currently fails to build on PPC64 platforms. See bugzilla #480519.
ExcludeArch: ppc64
@@ -115,7 +116,8 @@ facile portability. Currently uses TCL/Tk as GUI.
%package emacs
Group: Development/Languages
Summary: Emacs mode for interacting with GCL
-Requires: %{name} = %{version}-%{release}, emacs(bin) >= %{_emacs_version}
+Requires: %{name} = %{version}-%{release}
+Requires: emacs(bin) >= %{_emacs_version}
BuildArch: noarch
%description emacs
@@ -240,8 +242,7 @@ rm -f $RPM_BUILD_ROOT%{_emacs_sitelispdir}/gcl/readme
mkdir -p $RPM_BUILD_ROOT%{_emacs_sitestartdir}
sed -e "s|%LISP_DIR%|%{_emacs_sitelispdir}|" %{SOURCE1} > $RPM_BUILD_ROOT%{_emacs_sitestartdir}/gcl.el
pushd $RPM_BUILD_ROOT%{_emacs_sitelispdir}/gcl
-emacs -batch --no-init-file --no-site-file \
- --eval "(push \"`pwd`\" load-path)" -f batch-byte-compile *.el
+%{_emacs_bytecompile} *.el
popd
# Install and compile the XEmacs code
@@ -252,8 +253,7 @@ rm -f $RPM_BUILD_ROOT%{_xemacs_sitelispdir}/gcl/readme
mkdir -p $RPM_BUILD_ROOT%{_xemacs_sitestartdir}
sed -e "s|%LISP_DIR%|%{_xemacs_sitelispdir}|" %{SOURCE1} > $RPM_BUILD_ROOT%{_xemacs_sitestartdir}/gcl.el
pushd $RPM_BUILD_ROOT%{_xemacs_sitelispdir}/gcl
-xemacs -q -no-site-file -batch -eval "(push \"`pwd`\" load-path)" \
- -f batch-byte-compile *.el
+%{_xemacs_bytecompile} *.el
popd
# Save the policy file away for later installation
@@ -333,6 +333,9 @@ fi
%changelog
+* Mon Jan 9 2012 Jerry James <loganjerry at gmail.com> - 2.6.8-0.10.20120109cvs
+- Update to 20120109 snapshot
+
* Thu Oct 20 2011 Marcela Mašláňová <mmaslano at redhat.com> - 2.6.8-0.9.20110516cvs.2
- rebuild with new gmp without compat lib
diff --git a/sources b/sources
index adfbcf1..328a24c 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-f83a05fea51c5812f422eb103da14b56 gcl-2.6.8.tar.xz
+bdff1c588d92a1e9f8db797fd53a9ddd gcl-2.6.8.tar.xz
b965d4ea561a9c3e019c65be69fcfb1e gcl-2.6.8-info.tar.xz
More information about the scm-commits
mailing list