From 4b6dc2369490e37d810fdc0768731a4d3ef9a9ba Mon Sep 17 00:00:00 2001 From: Jerry James Date: Aug 11 2009 21:28:46 +0000 Subject: - Update to 20090701 CVS snapshot, fixes bz 511483 - Break fix for out into a separate patch and do it right - Add -plt patch to fix reading of PLT info - Add -ellipsis patch to eliminate nondeterministic behavior - Use xz payloads instead of bz2 - Minor spec file cleanups --- diff --git a/.cvsignore b/.cvsignore index 85f5533..c95815e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -gcl-2.6.8.tar.bz2 -gcl-2.6.8-info.tar.bz2 +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 6b80ae3..216391b 100644 --- a/gcl-2.6.8-alloca.patch +++ b/gcl-2.6.8-alloca.patch @@ -1,6 +1,6 @@ diff -dur gcl-2.6.8.ORIG/acconfig.h gcl-2.6.8/acconfig.h --- gcl-2.6.8.ORIG/acconfig.h 2009-02-23 12:39:42.000000000 -0700 -+++ gcl-2.6.8/acconfig.h 2009-04-27 09:46:14.000000000 -0600 ++++ gcl-2.6.8/acconfig.h 2009-08-11 10:55:32.525471470 -0600 @@ -53,11 +53,10 @@ #undef HAVE_ALLOCA #endif @@ -16,8 +16,8 @@ diff -dur gcl-2.6.8.ORIG/acconfig.h gcl-2.6.8/acconfig.h #endif diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure ---- gcl-2.6.8.ORIG/configure 2009-04-27 09:45:41.000000000 -0600 -+++ gcl-2.6.8/configure 2009-04-27 09:47:15.000000000 -0600 +--- gcl-2.6.8.ORIG/configure 2009-08-11 10:55:12.612470012 -0600 ++++ gcl-2.6.8/configure 2009-08-11 10:55:32.540470956 -0600 @@ -645,6 +645,7 @@ NIFLAGS FINAL_CFLAGS @@ -26,7 +26,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure NOTIFY TCL_LIBS TCL_DL_LIBS -@@ -13928,10 +13929,12 @@ +@@ -14045,10 +14046,12 @@ # alloca @@ -43,7 +43,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ -@@ -13939,16 +13942,17 @@ +@@ -14056,16 +14059,17 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @@ -64,7 +64,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -@@ -13956,44 +13960,141 @@ +@@ -14073,44 +14077,141 @@ esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 @@ -223,7 +223,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ -@@ -14001,17 +14102,163 @@ +@@ -14118,17 +14219,163 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @@ -389,7 +389,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in -@@ -14034,43 +14281,30 @@ +@@ -14151,43 +14398,30 @@ ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -442,8 +442,8 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure # dlopen etc diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in ---- gcl-2.6.8.ORIG/configure.in 2009-04-27 09:45:41.000000000 -0600 -+++ gcl-2.6.8/configure.in 2009-04-27 09:46:14.000000000 -0600 +--- gcl-2.6.8.ORIG/configure.in 2009-08-11 10:55:12.621467749 -0600 ++++ gcl-2.6.8/configure.in 2009-08-11 10:55:32.543471585 -0600 @@ -1869,33 +1869,7 @@ # alloca @@ -480,8 +480,8 @@ diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in # dlopen etc # idea make it so you do something dlopen(libX.so,RTLD_GLOBAL) diff -dur gcl-2.6.8.ORIG/h/gclincl.h.in gcl-2.6.8/h/gclincl.h.in ---- gcl-2.6.8.ORIG/h/gclincl.h.in 2009-04-27 09:45:41.000000000 -0600 -+++ gcl-2.6.8/h/gclincl.h.in 2009-04-27 09:46:14.000000000 -0600 +--- gcl-2.6.8.ORIG/h/gclincl.h.in 2009-08-11 10:55:12.622464351 -0600 ++++ gcl-2.6.8/h/gclincl.h.in 2009-08-11 10:55:32.545474389 -0600 @@ -54,11 +54,10 @@ #undef HAVE_ALLOCA #endif @@ -518,7 +518,7 @@ diff -dur gcl-2.6.8.ORIG/h/gclincl.h.in gcl-2.6.8/h/gclincl.h.in /* Define to 1 if you have the header file. */ #undef HAVE_ASM_SIGCONTEXT_H -@@ -344,6 +358,14 @@ +@@ -347,6 +361,14 @@ /* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG diff --git a/gcl-2.6.8-asm-signal-h.patch b/gcl-2.6.8-asm-signal-h.patch new file mode 100644 index 0000000..0b315cb --- /dev/null +++ b/gcl-2.6.8-asm-signal-h.patch @@ -0,0 +1,195 @@ +diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +--- gcl-2.6.8.ORIG/configure 2009-08-11 10:57:23.131471438 -0600 ++++ gcl-2.6.8/configure 2009-08-11 11:01:13.331496734 -0600 +@@ -14608,27 +14608,19 @@ + for ac_header in asm/signal.h + do + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 ++{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 + $as_echo_n "checking for $ac_header... " >&6; } + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } + else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-$ac_includes_default ++#define __ASSEMBLY__ ++ + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext +@@ -14649,96 +14641,20 @@ + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes ++ eval "$as_ac_Header=yes" + else + $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_header_compiler=no ++ eval "$as_ac_Header=no" + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" + fi + ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +- +-fi + as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then +@@ -14824,6 +14740,7 @@ + #include + #endif + #ifdef HAVE_ASM_SIGNAL_H ++ #define __ASSEMBLY__ + #include + #endif + +diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in +--- gcl-2.6.8.ORIG/configure.in 2009-08-11 10:57:23.139471057 -0600 ++++ gcl-2.6.8/configure.in 2009-08-11 10:59:52.436473014 -0600 +@@ -1592,7 +1592,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 +@@ -1617,6 +1617,7 @@ + #include + #endif + #ifdef HAVE_ASM_SIGNAL_H ++ #define __ASSEMBLY__ + #include + #endif + ]], +diff -dur gcl-2.6.8.ORIG/h/386-linux.h gcl-2.6.8/h/386-linux.h +--- gcl-2.6.8.ORIG/h/386-linux.h 2005-01-15 09:28:16.000000000 -0700 ++++ gcl-2.6.8/h/386-linux.h 2009-08-11 11:00:56.755526333 -0600 +@@ -23,6 +23,7 @@ + #include + #endif + #ifdef HAVE_ASM_SIGNAL_H ++#define __ASSEMBLY__ + #include + #endif + #endif +diff -dur gcl-2.6.8.ORIG/h/m68k-linux.h gcl-2.6.8/h/m68k-linux.h +--- gcl-2.6.8.ORIG/h/m68k-linux.h 2004-06-24 09:16:54.000000000 -0600 ++++ gcl-2.6.8/h/m68k-linux.h 2009-08-11 11:00:43.653478300 -0600 +@@ -23,6 +23,7 @@ + #include + #endif + #ifdef HAVE_ASM_SIGNAL_H ++#define __ASSEMBLY__ + #include + #endif + #endif +diff -dur gcl-2.6.8.ORIG/o/test_memprotect.c gcl-2.6.8/o/test_memprotect.c +--- gcl-2.6.8.ORIG/o/test_memprotect.c 1999-12-06 15:44:13.000000000 -0700 ++++ gcl-2.6.8/o/test_memprotect.c 2009-08-11 11:00:26.419472680 -0600 +@@ -38,6 +38,7 @@ + + char *malloc(); + ++#define __ASSEMBLY__ + #include + #include + diff --git a/gcl-2.6.8-ellipsis.patch b/gcl-2.6.8-ellipsis.patch new file mode 100644 index 0000000..9e1aee2 --- /dev/null +++ b/gcl-2.6.8-ellipsis.patch @@ -0,0 +1,46 @@ +diff -dur gcl-2.6.8.ORIG/o/bind.c gcl-2.6.8/o/bind.c +--- gcl-2.6.8.ORIG/o/bind.c 2006-06-21 14:03:05.000000000 -0600 ++++ gcl-2.6.8/o/bind.c 2009-08-11 14:11:56.982474159 -0600 +@@ -708,7 +708,7 @@ + #define NOT_KEYWORD 1 + + void +-parse_key(object *base, bool rest, bool allow_other_keys, register int n, ...) ++parse_key(object *base, bool rest, bool allow_other_keys, int n, ...) + { + object temporary; + va_list ap; +diff -dur gcl-2.6.8.ORIG/o/external_funs.h gcl-2.6.8/o/external_funs.h +--- gcl-2.6.8.ORIG/o/external_funs.h 2003-08-29 14:41:59.000000000 -0600 ++++ gcl-2.6.8/o/external_funs.h 2009-08-11 14:17:35.000473249 -0600 +@@ -167,8 +167,8 @@ + extern object find_special GPR((object body, struct bind_temp *start, struct bind_temp *end));; + extern object let_bind GPR((object body, struct bind_temp *start, struct bind_temp *end));; + extern object letA_bind GPR((object body, struct bind_temp *start, struct bind_temp *end));; +-extern int parse_key GPR((object *base, bool rest, bool allow_other_keys, register int n, int __builtin_va_alist));; +-extern int check_other_key GPR((object l, int n, int __builtin_va_alist));; ++extern int parse_key GPR((object *base, bool rest, bool allow_other_keys, int n, ...));; ++extern int check_other_key GPR((object l, int n, ...));; + extern int parse_key_new GPR((int n, object *base, struct key *keys, ...));; + extern int parse_key_rest GPR((object rest, int n, object *base, struct key *keys, ...));; + extern int set_key_struct GPR((struct key *ks, object data));; +@@ -380,7 +380,6 @@ + extern int not_a_variable GPR((int obj));; + extern int illegal_index GPR((object x, object i));; + extern int Lerror GPR((void));; +-extern object LVerror GPR((int __builtin_va_alist));; + extern int Lcerror GPR((void));; + extern int vfun_wrong_number_of_args GPR((object x));; + extern int init_error GPR((void));; +@@ -415,9 +414,6 @@ + extern object ifuncall2 GPR((object fun, object arg1, object arg2));; + extern object ifuncall3 GPR((object fun, object arg1, object arg2, object arg3));; + extern int funcall_with_catcher GPR((object fname, object fun));; +-extern object fcalln_cclosure GPR((...));; +-extern object fcalln_general GPR((...));; +-extern object fcalln_vfun GPR((va_list vl));; +-extern object fcalln GPR((int __builtin_va_alist));; +-extern object funcall_cfun GPR((funcvoid fn, int n, int __builtin_va_alist));; ++extern object fcalln GPR((object first, ...));; ++extern object funcall_cfun GPR((funcvoid fn, int n, ...));; + extern int init_eval GPR((void));; diff --git a/gcl-2.6.8-extension.patch b/gcl-2.6.8-extension.patch index 29b7118..d9ca5ac 100644 --- a/gcl-2.6.8-extension.patch +++ b/gcl-2.6.8-extension.patch @@ -1,6 +1,6 @@ diff -dur gcl-2.6.8.ORIG/acconfig.h gcl-2.6.8/acconfig.h ---- gcl-2.6.8.ORIG/acconfig.h 2009-04-27 09:49:00.000000000 -0600 -+++ gcl-2.6.8/acconfig.h 2009-04-27 09:49:25.000000000 -0600 +--- gcl-2.6.8.ORIG/acconfig.h 2009-08-11 10:56:39.718557844 -0600 ++++ gcl-2.6.8/acconfig.h 2009-08-11 10:56:49.066471771 -0600 @@ -1,3 +1,6 @@ +/* Whether compiling on a glibc-based system */ +#undef _GNU_SOURCE @@ -25,8 +25,8 @@ diff -dur gcl-2.6.8.ORIG/acconfig.h gcl-2.6.8/acconfig.h #define ISFINITE(a) isfinite(a) #else diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure ---- gcl-2.6.8.ORIG/configure 2009-04-27 09:49:00.000000000 -0600 -+++ gcl-2.6.8/configure 2009-04-27 09:49:53.000000000 -0600 +--- gcl-2.6.8.ORIG/configure 2009-08-11 10:56:39.730500620 -0600 ++++ gcl-2.6.8/configure 2009-08-11 10:56:49.084463683 -0600 @@ -691,9 +691,9 @@ GMPDIR GMP @@ -1822,8 +1822,8 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure int diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in ---- gcl-2.6.8.ORIG/configure.in 2009-04-27 09:49:00.000000000 -0600 -+++ gcl-2.6.8/configure.in 2009-04-27 09:49:25.000000000 -0600 +--- gcl-2.6.8.ORIG/configure.in 2009-08-11 10:56:39.736470510 -0600 ++++ gcl-2.6.8/configure.in 2009-08-11 10:56:49.107463193 -0600 @@ -442,6 +442,7 @@ LDFLAGS=" " fi @@ -1849,8 +1849,8 @@ diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in ]],[[ float f; diff -dur gcl-2.6.8.ORIG/h/gclincl.h.in gcl-2.6.8/h/gclincl.h.in ---- gcl-2.6.8.ORIG/h/gclincl.h.in 2009-04-27 09:49:00.000000000 -0600 -+++ gcl-2.6.8/h/gclincl.h.in 2009-04-27 09:49:25.000000000 -0600 +--- gcl-2.6.8.ORIG/h/gclincl.h.in 2009-08-11 10:56:39.738473077 -0600 ++++ gcl-2.6.8/h/gclincl.h.in 2009-08-11 10:56:49.109472547 -0600 @@ -1,4 +1,7 @@ /* h/gclincl.h.in. Generated from configure.in by autoheader. */ +/* Whether compiling on a glibc-based system */ @@ -1875,7 +1875,7 @@ diff -dur gcl-2.6.8.ORIG/h/gclincl.h.in gcl-2.6.8/h/gclincl.h.in #include #define ISFINITE(a) isfinite(a) #else -@@ -369,5 +370,37 @@ +@@ -372,5 +373,37 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS diff --git a/gcl-2.6.8-infrastructure.patch b/gcl-2.6.8-infrastructure.patch index 939652b..380d3fd 100644 --- a/gcl-2.6.8-infrastructure.patch +++ b/gcl-2.6.8-infrastructure.patch @@ -1,6 +1,6 @@ -diff -dur gcl-2.6.8.ORIG/config.guess gcl-2.6.8/config.guess +diff -durN gcl-2.6.8.ORIG/config.guess gcl-2.6.8/config.guess --- gcl-2.6.8.ORIG/config.guess 2005-08-11 09:02:25.000000000 -0600 -+++ gcl-2.6.8/config.guess 2009-04-27 09:34:38.000000000 -0600 ++++ gcl-2.6.8/config.guess 2009-08-11 10:39:53.975471624 -0600 @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. @@ -1356,9 +1356,9 @@ diff -dur gcl-2.6.8.ORIG/config.guess gcl-2.6.8/config.guess If the version you run ($0) is already up to date, please send the following data and any information you think might be -diff -dur gcl-2.6.8.ORIG/config.sub gcl-2.6.8/config.sub +diff -durN gcl-2.6.8.ORIG/config.sub gcl-2.6.8/config.sub --- gcl-2.6.8.ORIG/config.sub 2005-08-11 09:02:25.000000000 -0600 -+++ gcl-2.6.8/config.sub 2009-04-27 09:34:58.000000000 -0600 ++++ gcl-2.6.8/config.sub 2009-08-11 10:39:54.032472302 -0600 @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. @@ -1926,9 +1926,9 @@ diff -dur gcl-2.6.8.ORIG/config.sub gcl-2.6.8/config.sub # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) -diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +diff -durN gcl-2.6.8.ORIG/configure gcl-2.6.8/configure --- gcl-2.6.8.ORIG/configure 2009-02-23 20:12:22.000000000 -0700 -+++ gcl-2.6.8/configure 2009-04-27 09:42:42.000000000 -0600 ++++ gcl-2.6.8/configure 2009-08-11 10:44:39.723496642 -0600 @@ -1,97 +1,809 @@ #! /bin/sh - @@ -3372,12 +3372,12 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + esac fi -exec 5>./config.log - +- -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 -- + -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= @@ -5697,9 +5697,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + va_end (v); + return s; +} - --echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 --echo "configure:1432: checking how to run the C preprocessor" >&5 ++ +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated @@ -5757,7 +5755,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + + +fi -+ + +-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:1432: checking how to run the C preprocessor" >&5 +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done @@ -6265,7 +6265,10 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -+ + +-# Step 1: set the variable "system" to hold the name and version number +-# for the system. This can usually be done via the "uname" command, but +-# there are a few systems, like Next, where this doesn't work. + $ac_path_GREP_found && break 3 + done + done @@ -6284,14 +6287,8 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" - --# Step 1: set the variable "system" to hold the name and version number --# for the system. This can usually be done via the "uname" command, but --# there are a few systems, like Next, where this doesn't work. - --echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6 --echo "configure:1689: checking system version (for dynamic loading)" >&5 --if machine=`uname -m` ; then true; else machine=unknown ; fi ++ ++ +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then @@ -6359,7 +6356,10 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -+ + +-echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6 +-echo "configure:1689: checking system version (for dynamic loading)" >&5 +-if machine=`uname -m` ; then true; else machine=unknown ; fi for ac_prog in makeinfo do @@ -8255,12 +8255,12 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +/usr/include/X11R6 +/usr/include/X11R5 +/usr/include/X11R4 -+ + +/usr/local/X11/include +/usr/local/X11R6/include +/usr/local/X11R5/include +/usr/local/X11R4/include - ++ +/usr/local/include/X11 +/usr/local/include/X11R6 +/usr/local/include/X11R5 @@ -9282,8 +9282,8 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_bsd_gethostbyname=no - fi - ++fi ++ +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext @@ -9293,8 +9293,8 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } +if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" -+fi -+ + fi + + fi fi @@ -9348,9 +9348,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +#else +# include +#endif - -+#undef connect + ++#undef connect + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ @@ -13338,9 +13338,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +#else +# include +#endif - -+#undef uname + ++#undef uname + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ @@ -13465,9 +13465,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +#else +# include +#endif -+ -+#undef gettimeofday ++#undef gettimeofday ++ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ @@ -13894,7 +13894,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure else - echo "$ac_t""no" 1>&6 + eval "$as_ac_Header=\$ac_header_preproc" - fi ++fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 @@ -13908,7 +13908,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + -+fi + fi + done @@ -14078,7 +14078,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + - fi ++fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then @@ -14086,7 +14086,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + -+fi + fi + done @@ -14258,9 +14258,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +#else +# include +#endif - -+#undef gettimeofday + ++#undef gettimeofday + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ @@ -14935,13 +14935,13 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure else - echo "$ac_t""no" 1>&6 + eval "$as_ac_Header=\$ac_header_preproc" -+fi + fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + - fi ++fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then @@ -15122,13 +15122,13 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure else - echo "$ac_t""no" 1>&6 + eval "$as_ac_Header=\$ac_header_preproc" -+fi + fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + - fi ++fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then @@ -15312,7 +15312,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure else - echo "$ac_t""no" 1>&6 + eval "$as_ac_Header=\$ac_header_preproc" -+fi + fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 @@ -15329,7 +15329,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +#define HAVE_MATH_H 1 +_ACEOF + - fi ++fi + done @@ -15498,13 +15498,13 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure else - echo "$ac_t""no" 1>&6 + eval "$as_ac_Header=\$ac_header_preproc" -+fi + fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + - fi ++fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then @@ -15690,7 +15690,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + - fi ++fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then @@ -15701,7 +15701,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +#define HAVE_FLOAT_H 1 +_ACEOF + -+fi + fi + done @@ -16467,9 +16467,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +#else +# include +#endif -+ -+#undef gethostbyname ++#undef gethostbyname ++ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ @@ -17249,9 +17249,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +#else +# include +#endif -+ -+#undef profil ++#undef profil ++ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ @@ -17377,9 +17377,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +#else +# include +#endif - -+#undef setenv + ++#undef setenv + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ @@ -17760,7 +17760,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure fi -@@ -5958,282 +13038,516 @@ +@@ -5958,282 +13038,633 @@ # if test "x$enable_machine" = "x" ; then @@ -18107,13 +18107,52 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" --fi --rm -f conftest* + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi +-rm -f conftest* ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ++$as_echo "$ac_header_compiler" >&6; } ++ ++# Is the header present? ++{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 ++$as_echo_n "checking $ac_header presence... " >&6; } ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#include <$ac_header> ++_ACEOF ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then ++ ac_header_preproc=yes ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_header_preproc=no + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` @@ -18122,6 +18161,136 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure -EOF - + ++rm -f conftest.err conftest.$ac_ext ++{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ++$as_echo "$ac_header_preproc" >&6; } ++ ++# So? What about this header? ++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in ++ yes:no: ) ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 ++$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 ++$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ++ ac_header_preproc=yes ++ ;; ++ no:yes:* ) ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 ++$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 ++$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 ++$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 ++$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 ++$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 ++$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ++ ++ ;; ++esac ++{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 ++$as_echo_n "checking for $ac_header... " >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ $as_echo_n "(cached) " >&6 + else +- echo "$ac_t""no" 1>&6 ++ eval "$as_ac_Header=\$ac_header_preproc" ++fi ++ac_res=`eval 'as_val=${'$as_ac_Header'} ++ $as_echo "$as_val"'` ++ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ ++fi ++as_val=`eval 'as_val=${'$as_ac_Header'} ++ $as_echo "$as_val"'` ++ if test "x$as_val" = x""yes; then ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++_ACEOF ++ + fi ++ + done + +- for ac_hdr in asm/signal.h ++ ++for ac_header in asm/signal.h + do +-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:6126: checking for $ac_hdr" >&5 +-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 ++as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 ++$as_echo_n "checking for $ac_header... " >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ $as_echo_n "(cached) " >&6 ++fi ++ac_res=`eval 'as_val=${'$as_ac_Header'} ++ $as_echo "$as_val"'` ++ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } + else +- cat > conftest.$ac_ext < +-EOF +-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:6136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +-if test -z "$ac_err"; then +- rm -rf conftest* +- eval "ac_cv_header_$ac_safe=yes" ++ # Is the header compilable? ++{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 ++$as_echo_n "checking $ac_header usability... " >&6; } ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++#include <$ac_header> ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_header_compiler=yes + else +- echo "$ac_err" >&5 +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_header_$ac_safe=no" ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_header_compiler=no + fi +-rm -f conftest* ++ +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } @@ -18155,34 +18324,20 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + test ! -s conftest.err + }; then + ac_header_preproc=yes - else -- echo "$ac_t""no" 1>&6 ++else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi --done - -- for ac_hdr in asm/signal.h --do --ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:6126: checking for $ac_hdr" >&5 --if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 --else -- cat > conftest.$ac_ext < +-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +- cat >> confdefs.h <&5; (eval $ac_try) 2>&5; } --ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` --if test -z "$ac_err"; then -- rm -rf conftest* -- eval "ac_cv_header_$ac_safe=yes" +- ++ +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } @@ -18217,29 +18372,15 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else -- echo "$ac_err" >&5 -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_header_$ac_safe=no" +- echo "$ac_t""no" 1>&6 + eval "$as_ac_Header=\$ac_header_preproc" - fi --rm -f conftest* ++fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + - fi --if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -- cat >> confdefs.h <&6 ++fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then @@ -18259,35 +18400,6 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure -#include - -int main() { -+ cat >conftest.$ac_ext <<_ACEOF -+asm/signal.h -+_ACEOF -+if { (ac_try="$ac_cpp conftest.$ac_ext" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then -+ : -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+fi -+ -+rm -f conftest.err conftest.$ac_ext + { $as_echo "$as_me:$LINENO: checking for sigcontext" >&5 +$as_echo_n "checking for sigcontext... " >&6; } + cat >conftest.$ac_ext <<_ACEOF @@ -18467,7 +18579,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure # if fgrep _foo conftest1.s ; then use_underscore=1 ; fi # if test $use_underscore = 0 ; then # MPI_FILE=mpi-386_no_under.o -@@ -6251,41 +13565,46 @@ +@@ -6251,41 +13682,46 @@ # Extract the first word of "emacs", so it can be a program name with args. set dummy emacs; ac_word=$2 @@ -18536,7 +18648,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure # check for where the emacs site lisp directory is. rm -f conftest.el cat >> conftest.el <&1 | grep -v ^Warning: | sed -e /Loading/d | sed -e /load/d ` -@@ -6308,7 +13627,8 @@ +@@ -6308,7 +13744,8 @@ EMACS_SITE_LISP="" fi fi @@ -18557,7 +18669,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure # check for where the emacs site lisp default.el is -@@ -6323,8 +13643,8 @@ +@@ -6323,8 +13760,8 @@ (message ans)) EOF @@ -18568,7 +18680,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure if [ "$EMACS" != "" ] ; then EMACS_DEFAULT_EL=`$EMACS -q -batch --no-site-file -l conftest.el 2>&1 | sed -e /Loading/d | sed -e /load/d ` else -@@ -6335,7 +13655,8 @@ +@@ -6335,7 +13772,8 @@ EMACS_DEFAULT_EL=${EMACS_SITE_LISP}/default.el fi fi @@ -18578,7 +18690,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure -@@ -6346,14 +13667,14 @@ +@@ -6346,14 +13784,14 @@ (let ((ans "") file (tem Info-default-directory-list)) (while tem (cond ((file-exists-p (setq file (expand-file-name "dir" (car tem)))) @@ -18596,7 +18708,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure if test "$use" = "mingw" ; then INFO_DIR=\$\(prefix\)/lib/gcl-$VERSION/info/ else -@@ -6362,61 +13683,133 @@ +@@ -6362,61 +13800,133 @@ fi fi @@ -18765,7 +18877,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure if test "${TCLSH}" = "" ; then true ; else TCL_CONFIG_PREFIX=`${TCLSH} < conftest.tcl` -@@ -6479,7 +13872,7 @@ +@@ -6479,7 +13989,7 @@ else if test -f /usr/include/tcl${TCL_VERSION}/tk.h ; then TK_INCLUDE=-I/usr/include/tcl${TCL_VERSION} @@ -18774,7 +18886,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure fi if test -f ${TCL_CONFIG_PREFIX}/../include/tcl.h ; then TCL_INCLUDE=-I${TCL_CONFIG_PREFIX}/../include -@@ -6488,43 +13881,6 @@ +@@ -6488,43 +13998,6 @@ TCL_INCLUDE=-I/usr/include/tcl${TCL_VERSION} fi fi @@ -18818,7 +18930,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure if test "$have_ieee" = "0" ; then TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" ` fi -@@ -6553,85 +13909,160 @@ +@@ -6553,85 +14026,160 @@ if test -d "${TK_CONFIG_PREFIX}" ; then @@ -19019,7 +19131,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure -@@ -6641,12 +14072,11 @@ +@@ -6641,12 +14189,11 @@ @@ -19033,7 +19145,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure # what machine this is, and include then a machine specific hdr. # and machine specific defs. -@@ -6666,22 +14096,24 @@ +@@ -6666,22 +14213,24 @@ # redhat/cygnus released for some reason a buggy version of gcc, # which no one else released. Catch that here. @@ -19068,7 +19180,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure LIBS="$LDFLAGS $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $TLDFLAGS $LIBS $TLIBS" -@@ -6702,415 +14134,1249 @@ +@@ -6702,415 +14251,1249 @@ if test -f h/$use.defs ; then @@ -20660,9 +20772,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure echo makedefc cat makedefc -diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in +diff -durN gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in --- gcl-2.6.8.ORIG/configure.in 2009-02-23 12:39:42.000000000 -0700 -+++ gcl-2.6.8/configure.in 2009-04-27 09:42:33.000000000 -0600 ++++ gcl-2.6.8/configure.in 2009-08-11 10:44:28.190507407 -0600 @@ -1,4 +1,5 @@ AC_INIT() +AC_PREREQ([2.61]) @@ -21589,16 +21701,14 @@ diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in [AC_DEFINE(HAVE_SIGEMT) AC_SUBST(HAVE_SIGEMT) AC_MSG_RESULT(yes)], -@@ -1511,13 +1594,14 @@ - +@@ -1512,12 +1595,13 @@ #if test $use = "386-linux" ; then AC_CHECK_HEADERS(asm/sigcontext.h) -- AC_CHECK_HEADERS(asm/signal.h) + AC_CHECK_HEADERS(asm/signal.h) - AC_MSG_CHECKING([for sigcontext...]) - AC_TRY_COMPILE([#include - ], - [ -+ AC_PREPROC_IFELSE(asm/signal.h) + AC_MSG_CHECKING([for sigcontext]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include @@ -21713,9 +21823,9 @@ diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in echo makedefc cat makedefc -diff -dur gcl-2.6.8.ORIG/h/gclincl.h.in gcl-2.6.8/h/gclincl.h.in +diff -durN gcl-2.6.8.ORIG/h/gclincl.h.in gcl-2.6.8/h/gclincl.h.in --- gcl-2.6.8.ORIG/h/gclincl.h.in 2009-02-23 12:39:43.000000000 -0700 -+++ gcl-2.6.8/h/gclincl.h.in 2009-04-27 09:41:02.000000000 -0600 ++++ gcl-2.6.8/h/gclincl.h.in 2009-08-11 10:44:40.138462377 -0600 @@ -1,15 +1,15 @@ -/* h/gclincl.h.in. Generated automatically from configure.in by autoheader 2.13. */ +/* h/gclincl.h.in. Generated from configure.in by autoheader. */ @@ -21871,7 +21981,7 @@ diff -dur gcl-2.6.8.ORIG/h/gclincl.h.in gcl-2.6.8/h/gclincl.h.in #undef USE_DLOPEN #define MP_LIMB_BYTES 0 -@@ -213,47 +260,92 @@ +@@ -213,47 +260,95 @@ #undef HAVE_OBJC_MALLOC_H #undef HAVE_OUTPUT_BFD @@ -21889,18 +21999,20 @@ diff -dur gcl-2.6.8.ORIG/h/gclincl.h.in gcl-2.6.8/h/gclincl.h.in #undef HAVE_ASM_SIGCONTEXT_H -/* Define if you have the header file. */ --#undef HAVE_ASM_SIGNAL_H -+/* Define to 1 if you have the header file. */ -+#undef HAVE_ELF_ABI_H ++/* Define to 1 if you have the header file. */ + #undef HAVE_ASM_SIGNAL_H -/* Define if you have the header file. */ -+/* Define to 1 if you have the header file. */ - #undef HAVE_ELF_H - --/* Define if you have the header file. */ --#undef HAVE_ELF_ABI_H +-#undef HAVE_ELF_H - +-/* Define if you have the header file. */ ++/* Define to 1 if you have the header file. */ + #undef HAVE_ELF_ABI_H + -/* Define if you have the header file. */ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_ELF_H ++ +/* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H @@ -21988,32 +22100,40 @@ diff -dur gcl-2.6.8.ORIG/h/gclincl.h.in gcl-2.6.8/h/gclincl.h.in + +/* Define to 1 if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING -diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +diff -durN gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex --- gcl-2.6.8.ORIG/info/texinfo.tex 2002-10-26 09:14:15.000000000 -0600 -+++ gcl-2.6.8/info/texinfo.tex 2009-04-27 09:37:11.000000000 -0600 -@@ -3,10 +3,11 @@ ++++ gcl-2.6.8/info/texinfo.tex 2009-07-24 14:49:33.000000000 -0600 +@@ -3,15 +3,16 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{1999-09-25.10} -+\def\texinfoversion{2007-06-24.14} ++\def\texinfoversion{2009-05-16.16} % -% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 -% Free Software Foundation, Inc. -+% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, ++% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -+% 2007 Free Software Foundation, Inc. ++% 2007, 2008, 2009 Free Software Foundation, Inc. % - % This texinfo.tex file is free software; you can redistribute it and/or +-% This texinfo.tex file is free software; you can redistribute it and/or ++% This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as -@@ -20,24 +21,20 @@ +-% published by the Free Software Foundation; either version 2, or (at +-% your option) any later version. ++% published by the Free Software Foundation, either version 3 of the ++% License, or (at your option) any later version. + % + % This texinfo.tex file is distributed in the hope that it will be + % useful, but WITHOUT ANY WARRANTY; without even the implied warranty +@@ -19,25 +20,19 @@ + % General Public License for more details. % % You should have received a copy of the GNU General Public License - % along with this texinfo.tex file; see the file COPYING. If not, write +-% along with this texinfo.tex file; see the file COPYING. If not, write -% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -% Boston, MA 02111-1307, USA. -+% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -+% Boston, MA 02110-1301, USA. ++% along with this program. If not, see . % -% In other words, you are welcome to use, share and improve this program. -% You are forbidden to forbid anyone else to use, share and improve @@ -22040,7 +22160,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the -@@ -50,13 +47,17 @@ +@@ -50,13 +45,17 @@ % texindex foo.?? % tex foo.texi % tex foo.texi @@ -22062,7 +22182,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \message{Loading texinfo [version \texinfoversion]:} -@@ -66,7 +67,14 @@ +@@ -66,7 +65,14 @@ \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} @@ -22078,7 +22198,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c -@@ -76,23 +84,35 @@ +@@ -76,23 +82,39 @@ \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! @@ -22097,14 +22217,18 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t - +- -% We never want plain's outer \+ definition in Texinfo. -% For @tex, we can use \tabalign. -\let\+ = \relax - -\message{Basics,} -\chardef\other=12 -- ++\let\ptextop=\top ++{\catcode`\'=\active ++\global\let\ptexquoteright'}% Math-mode def from plain.tex. ++\let\ptexraggedright=\raggedright + % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J @@ -22121,7 +22245,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi -@@ -131,44 +151,119 @@ +@@ -131,44 +153,119 @@ \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi @@ -22264,7 +22388,68 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % For @cropmarks command. % Do @cropmarks to get crop marks. -@@ -209,11 +304,18 @@ +@@ -184,6 +281,50 @@ + \newdimen\cornerthick \cornerthick=.3pt + \newdimen\topandbottommargin \topandbottommargin=.75in + ++% Output a mark which sets \thischapter, \thissection and \thiscolor. ++% We dump everything together because we only have one kind of mark. ++% This works because we only use \botmark / \topmark, not \firstmark. ++% ++% A mark contains a subexpression of the \ifcase ... \fi construct. ++% \get*marks macros below extract the needed part using \ifcase. ++% ++% Another complication is to let the user choose whether \thischapter ++% (\thissection) refers to the chapter (section) in effect at the top ++% of a page, or that at the bottom of a page. The solution is ++% described on page 260 of The TeXbook. It involves outputting two ++% marks for the sectioning macros, one before the section break, and ++% one after. I won't pretend I can describe this better than DEK... ++\def\domark{% ++ \toks0=\expandafter{\lastchapterdefs}% ++ \toks2=\expandafter{\lastsectiondefs}% ++ \toks4=\expandafter{\prevchapterdefs}% ++ \toks6=\expandafter{\prevsectiondefs}% ++ \toks8=\expandafter{\lastcolordefs}% ++ \mark{% ++ \the\toks0 \the\toks2 ++ \noexpand\or \the\toks4 \the\toks6 ++ \noexpand\else \the\toks8 ++ }% ++} ++% \topmark doesn't work for the very first chapter (after the title ++% page or the contents), so we use \firstmark there -- this gets us ++% the mark with the chapter defs, unless the user sneaks in, e.g., ++% @setcolor (or @url, or @link, etc.) between @contents and the very ++% first @chapter. ++\def\gettopheadingmarks{% ++ \ifcase0\topmark\fi ++ \ifx\thischapter\empty \ifcase0\firstmark\fi \fi ++} ++\def\getbottomheadingmarks{\ifcase1\botmark\fi} ++\def\getcolormarks{\ifcase2\topmark\fi} ++ ++% Avoid "undefined control sequence" errors. ++\def\lastchapterdefs{} ++\def\lastsectiondefs{} ++\def\prevchapterdefs{} ++\def\prevsectiondefs{} ++\def\lastcolordefs{} ++ + % Main output routine. + \chardef\PAGE = 255 + \output = {\onepageout{\pagecontents\PAGE}} +@@ -201,7 +342,9 @@ + % + % Do this outside of the \shipout so @code etc. will be expanded in + % the headline as they should be, not taken literally (outputting ''code). ++ \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi + \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% ++ \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi + \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% + % + {% +@@ -209,11 +352,18 @@ % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % @@ -22276,7 +22461,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % We don't want .vr (or whatever) entries like this: + % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} + % "\acronym" won't work when it's read back in; -+ % it needs to be ++ % it needs to be + % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% + % Do this early so pdf references go to the beginning of the page. @@ -22285,7 +22470,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin -@@ -237,14 +339,12 @@ +@@ -237,14 +387,12 @@ \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. @@ -22302,7 +22487,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup -@@ -262,7 +362,7 @@ +@@ -262,7 +410,7 @@ \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox @@ -22311,7 +22496,16 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } -@@ -295,143 +395,161 @@ +@@ -275,7 +423,7 @@ + % marginal hacks, juha@viisa.uucp (Juha Takala) + \ifvoid\margin\else % marginal info is present + \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi +-\dimen@=\dp#1 \unvbox#1 ++\dimen@=\dp#1\relax \unvbox#1\relax + \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi + \ifr@ggedbottom \kern-\dimen@ \vfil \fi} + } +@@ -295,143 +443,161 @@ % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % @@ -22373,7 +22567,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -% will have two active spaces as part of the argument with the -% `itemize'. Here we remove all active spaces from #1, and assign the -% result to \toks0. -+% Each occurence of `\^^M' or `\^^M' is replaced by a single space. ++% Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % -% This loses if there are any *other* active characters besides spaces -% in the argument -- _ ^ +, for example -- since they get expanded. @@ -22412,7 +22606,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% to get _exactly_ the rest of the line, we had to prevent such situation. +% We prepended an \empty token at the very beginning and we expand it now, +% just before passing the control to \argtorun. -+% (Similarily, we have to think about #3 of \argcheckspacesY above: it is ++% (Similarly, we have to think about #3 of \argcheckspacesY above: it is +% either the null string, or it ends with \^^M---thus there is no danger +% that a pair of braces would be stripped. % @@ -22478,7 +22672,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% used to check whether the current environment is the one expected. +% +% Non-false conditionals (@iftex, @ifset) don't fit into this, so they -+% are not treated as enviroments; they don't open a group. (The ++% are not treated as environments; they don't open a group. (The +% implementation of @end takes care not to call \endgroup in this +% special case.) @@ -22486,7 +22680,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -\newhelp\EMsimple{Press RETURN to continue.} -\outer\def\begin{\parsearg\beginxxx} -+% At runtime, environments start with this: ++% At run-time, environments start with this: +\def\startenvironment#1{\begingroup\def\thisenv{#1}} +% initialize +\let\thisenv\empty @@ -22528,7 +22722,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -% There is an environment #1, but it hasn't been started. Give an error. -% -\def\unmatchedenderror#1{% -+% Evironment mismatch, #1 expected: ++% Environment mismatch, #1 expected: +\def\badenverr{% \errhelp = \EMsimple - \errmessage{This `@end #1' doesn't have a matching `@#1'}% @@ -22574,7 +22768,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex %% Simple single-character @ commands -@@ -452,16 +570,22 @@ +@@ -452,16 +618,22 @@ \let\{=\mylbrace \let\}=\myrbrace \begingroup @@ -22604,7 +22798,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \let\, = \c \let\dotaccent = \. \def\ringaccent#1{{\accent23 #1}} -@@ -469,10 +593,12 @@ +@@ -469,22 +641,43 @@ \let\ubaraccent = \b \let\udotaccent = \d @@ -22619,7 +22813,14 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % Dotless i and dotless j, used for accents. \def\imacro{i} -@@ -485,6 +611,25 @@ + \def\jmacro{j} + \def\dotless#1{% + \def\temp{#1}% +- \ifx\temp\imacro \ptexi +- \else\ifx\temp\jmacro \j ++ \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi ++ \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi + \else \errmessage{@dotless can be used only with i or j}% \fi\fi } @@ -22645,7 +22846,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and -@@ -503,14 +648,32 @@ +@@ -503,14 +696,32 @@ % @* forces a line break. \def\*{\hfil\break\hbox{}\ignorespaces} @@ -22665,7 +22866,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\def\?{?\spacefactor=\endofsentencespacefactor\space} + +% @frenchspacing on|off says whether to put extra space after punctuation. -+% ++% +\def\onword{on} +\def\offword{off} +% @@ -22681,7 +22882,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would -@@ -525,47 +688,24 @@ +@@ -525,47 +736,24 @@ % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % @@ -22743,7 +22944,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after -@@ -575,6 +715,32 @@ +@@ -575,6 +763,32 @@ \comment } % @@ -22776,7 +22977,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % -@@ -587,10 +753,8 @@ +@@ -587,10 +801,8 @@ \newdimen\mil \mil=0.001in @@ -22788,7 +22989,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex %% This method tries to make TeX break the page naturally %% if the depth of the box does not fit. %{\baselineskip=0pt% -@@ -598,7 +762,7 @@ +@@ -598,7 +810,7 @@ %\prevdepth=-1000pt %}} @@ -22797,7 +22998,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par -@@ -637,37 +801,11 @@ +@@ -637,37 +849,11 @@ \fi } @@ -22837,7 +23038,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % \def\page{\par\vfill\supereject} -@@ -679,57 +817,127 @@ +@@ -679,57 +865,134 @@ \newskip\exdentamount % This defn is used inside fill environments such as @defun. @@ -22864,8 +23065,6 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} -- --%\hbox{{\rm#1}}\hfil\break}} +% +\def\doinmargin#1#2{\strut\vadjust{% + \nobreak @@ -22909,7 +23108,9 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \temp +} - % @include file insert text of that file as input. +-%\hbox{{\rm#1}}\hfil\break}} +- +-% @include file insert text of that file as input. -% Allow normal characters that we make active in the argument (a file name). -\def\include{\begingroup - \catcode`\\=12 @@ -22924,6 +23125,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -% Restore active chars for included file. -\def\includezzz#1{\endgroup\begingroup - % Read the included file in a group so nested @include's work. ++% @include FILE -- \input text of FILE. +% +\def\include{\parseargusing\filenamecatcodes\includezzz} +\def\includezzz#1{% @@ -22932,8 +23134,13 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex - \input\thisfile -\endgroup} + {% -+ \makevalueexpandable -+ \def\temp{\input #1 }% ++ \makevalueexpandable % we want to expand any @value in FILE. ++ \turnoffactive % and allow special characters in the expansion ++ \indexnofonts % Allow `@@' and other weird things in file names. ++ \edef\temp{\noexpand\input #1 }% ++ % ++ % This trickery is to read FILE outside of a group, in case it makes ++ % definitions, etc. + \expandafter + }\temp + \popthisfilestack @@ -22948,6 +23155,8 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \catcode`>=\other + \catcode`+=\other + \catcode`-=\other ++ \catcode`\`=\other ++ \catcode`\'=\other +} -\def\thisfile{} @@ -23002,7 +23211,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % @comment ...line which is ignored... % @c is the same as @comment -@@ -744,13 +952,13 @@ +@@ -744,13 +1007,13 @@ % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. @@ -23020,7 +23229,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \def\temp{#1}% \ifx\temp\asisword \else -@@ -767,8 +975,7 @@ +@@ -767,8 +1030,7 @@ % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. @@ -23030,7 +23239,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \def\temp{#1}% \ifx\temp\asisword \else -@@ -780,26 +987,147 @@ +@@ -780,26 +1042,161 @@ \fi } @@ -23127,10 +23336,23 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \mathunderscore + \let\\ = \mathbackslash + \mathactive ++ % make the texinfo accent commands work in math mode ++ \let\"=\ddot ++ \let\'=\acute ++ \let\==\bar ++ \let\^=\hat ++ \let\`=\grave ++ \let\u=\breve ++ \let\v=\check ++ \let\~=\tilde ++ \let\dotaccent=\dot + $\finishmath +} +\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. -+ + +-% @bullet and @minus need the same treatment as @math, just above. +-\def\bullet{\implicitmath\ptexbullet\implicitmath} +-\def\minus{\implicitmath-\implicitmath} +% Some active characters (such as <) are spaced differently in math. +% We have to reset their definitions in case the @math was an argument +% to a command which sets the catcodes (such as @item or @section). @@ -23140,19 +23362,21 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \catcode`< = \active + \catcode`> = \active + \catcode`+ = \active ++ \catcode`' = \active + \gdef\mathactive{% + \let^ = \ptexhat + \let< = \ptexless + \let> = \ptexgtr + \let+ = \ptexplus ++ \let' = \ptexquoteright + } +} - - % @bullet and @minus need the same treatment as @math, just above. --\def\bullet{\implicitmath\ptexbullet\implicitmath} --\def\minus{\implicitmath-\implicitmath} ++ ++% Some math mode symbols. +\def\bullet{$\ptexbullet$} -+\def\minus{$-$} ++\def\geq{\ifmmode \ge\else $\ge$\fi} ++\def\leq{\ifmmode \le\else $\le$\fi} ++\def\minus{\ifmmode -\else $-$\fi} + +% @dots{} outputs an ellipsis using the current font. +% We do .5em per period so that it has the same spacing in the cm @@ -23190,7 +23414,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % @refill is a no-op. \let\refill=\relax -@@ -815,20 +1143,20 @@ +@@ -815,20 +1212,20 @@ % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% @@ -23218,7 +23442,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % \comment % Ignore the actual filename. } -@@ -864,111 +1192,253 @@ +@@ -864,111 +1261,297 @@ \newif\ifpdf \newif\ifpdfmakepagedest @@ -23235,6 +23459,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \else - \pdftrue - \pdfoutput = 1 +- \input pdfcolor + \ifx\pdfoutput\relax + \else + \ifcase\pdfoutput @@ -23254,7 +23479,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% that's what we do). + +% double active backslashes. -+% ++% +{\catcode`\@=0 \catcode`\\=\active + @gdef@activebackslashdouble{% + @catcode`@\=@active @@ -23266,11 +23491,11 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% us) handles it with this amazing macro to replace tokens, with minor +% changes for Texinfo. It is included here under the GPL by permission +% from the author, Heiko Oberdiek. -+% ++% +% #1 is the tokens to replace. +% #2 is the replacement. +% #3 is the control sequence with the string. -+% ++% +\def\HyPsdSubst#1#2#3{% + \def\HyPsdReplace##1#1##2\END{% + ##1% @@ -23300,7 +23525,49 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +output) for that.)} + +\ifpdf - \input pdfcolor ++ % ++ % Color manipulation macros based on pdfcolor.tex. ++ \def\cmykDarkRed{0.28 1 1 0.35} ++ \def\cmykBlack{0 0 0 1} ++ % ++ % k sets the color for filling (usual text, etc.); ++ % K sets the color for stroking (thin rules, e.g., normal _'s). ++ \def\pdfsetcolor#1{\pdfliteral{#1 k #1 K}} ++ % ++ % Set color, and create a mark which defines \thiscolor accordingly, ++ % so that \makeheadline knows which color to restore. ++ \def\setcolor#1{% ++ \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% ++ \domark ++ \pdfsetcolor{#1}% ++ } ++ % ++ \def\maincolor{\cmykBlack} ++ \pdfsetcolor{\maincolor} ++ \edef\thiscolor{\maincolor} ++ \def\lastcolordefs{} ++ % ++ \def\makefootline{% ++ \baselineskip24pt ++ \line{\pdfsetcolor{\maincolor}\the\footline}% ++ } ++ % ++ \def\makeheadline{% ++ \vbox to 0pt{% ++ \vskip-22.5pt ++ \line{% ++ \vbox to8.5pt{}% ++ % Extract \thiscolor definition from the marks. ++ \getcolormarks ++ % Typeset the headline with \maincolor, then restore the color. ++ \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% ++ }% ++ \vss ++ }% ++ \nointerlineskip ++ } ++ % ++ % + \pdfcatalog{/PageMode /UseOutlines} + % + % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). @@ -23319,8 +23586,11 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 + \openin 1 #1.pdf \ifeof 1 -+ \errhelp = \nopdfimagehelp -+ \errmessage{Could not find image file #1 for pdf}% ++ \openin 1 #1.PDF \ifeof 1 ++ \errhelp = \nopdfimagehelp ++ \errmessage{Could not find image file #1 for pdf}% ++ \else \gdef\pdfimgext{PDF}% ++ \fi + \else \gdef\pdfimgext{pdf}% + \fi + \else \gdef\pdfimgext{JPG}% @@ -23334,7 +23604,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \closein 1 + \endgroup + % -+ % without \immediate, pdftex seg faults when the same image is ++ % without \immediate, ancient pdftex seg faults when the same image is + % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 - \pdfimage @@ -23359,6 +23629,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex - \def\pdfmkdest#1{\pdfdest name{#1@} xyz} - \def\pdfmkpgn#1{#1@} - \let\linkcolor = \Cyan +- \def\endlink{\Black\pdfendlink} + % + \def\pdfmkdest#1{{% + % We have to set dummies so commands such as @code, and characters @@ -23377,10 +23648,9 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % + % by default, use a color that is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. -+ % (Defined in pdfcolor.tex.) -+ \let\urlcolor = \BrickRed -+ \let\linkcolor = \BrickRed - \def\endlink{\Black\pdfendlink} ++ \def\urlcolor{\cmykDarkRed} ++ \def\linkcolor{\cmykDarkRed} ++ \def\endlink{\setcolor{\maincolor}\pdfendlink} + % % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak @@ -23556,7 +23826,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces -@@ -983,24 +1453,32 @@ +@@ -983,24 +1566,36 @@ \else \let \startlink \pdfstartlink \fi @@ -23569,12 +23839,16 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % tried to figure out what each command should do in the context + % of @url. for now, just make @/ a no-op, that's the only one + % people have actually reported a problem with. -+ % ++ % + \normalturnoffactive + \def\@{@}% + \let\/=\empty + \makevalueexpandable -+ \leavevmode\urlcolor ++ % do we want to go so far as to use \indexnofonts instead of just ++ % special-casing \var here? ++ \def\var##1{##1}% ++ % ++ \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% - % #1 @@ -23594,21 +23868,24 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else -@@ -1013,33 +1491,341 @@ +@@ -1013,33 +1608,353 @@ \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% - \startlink attr{/Border [0 0 0]} goto name{\mkpgn{#1}} -+ \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} - \linkcolor #1\endlink} +- \linkcolor #1\endlink} - \def\mkpgn#1{#1@} ++ \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} ++ \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} -\fi % \ifx\pdfoutput +\else ++ % non-pdf mode + \let\pdfmkdest = \gobble + \let\pdfurl = \gobble + \let\endlink = \relax -+ \let\linkcolor = \relax ++ \let\setcolor = \gobble ++ \let\pdfsetcolor = \gobble + \let\pdfmakeoutlines = \relax +\fi % \ifx\pdfoutput @@ -23634,6 +23911,10 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\def\sl{\fam=\slfam \setfontstyle{sl}} +\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} +\def\tt{\fam=\ttfam \setfontstyle{tt}} ++ ++% Unfortunately, we have to override this for titles and the like, since ++% in those cases "rm" is bold. Sigh. ++\def\rmisbold{\rm\def\curfontstyle{bf}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. -% So we set up a \sf analogous to plain's \rm, etc. @@ -23660,8 +23941,12 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\def\strutheightpercent{.70833} +\def\strutdepthpercent {.29167} +% ++% can get a sort of poor man's double spacing by redefining this. ++\def\baselinefactor{1} ++% +\def\setleading#1{% -+ \normalbaselineskip = #1\relax ++ \dimen0 = #1\relax ++ \normalbaselineskip = \baselinefactor\dimen0 + \normallineskip = \lineskipfactor\normalbaselineskip + \normalbaselines + \setbox\strutbox =\hbox{% @@ -23670,11 +23955,17 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + }% +} + -+% +% PDF CMaps. See also LaTeX's t1.cmap. +% -+% \cmapOT1 -+\ifpdf ++% do nothing with this by default. ++\expandafter\let\csname cmapOT1\endcsname\gobble ++\expandafter\let\csname cmapOT1IT\endcsname\gobble ++\expandafter\let\csname cmapOT1TT\endcsname\gobble ++ ++% if we are producing pdf, and we have \pdffontattr, then define cmaps. ++% (\pdffontattr was introduced many years ago, but people still run ++% older pdftex's; it's easy to conditionalize, so we do.) ++\ifpdf \ifx\pdffontattr\undefined \else + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap @@ -23922,11 +24213,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \expandafter\edef\csname cmapOT1TT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% -+\else -+ \expandafter\let\csname cmapOT1\endcsname\gobble -+ \expandafter\let\csname cmapOT1IT\endcsname\gobble -+ \expandafter\let\csname cmapOT1TT\endcsname\gobble -+\fi ++\fi\fi -% Use Computer Modern fonts at \magstephalf (11pt). -\newcount\mainmagstep @@ -23945,11 +24232,11 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +} +% This is what gets called when #5 of \setfont is empty. +\let\cmap\gobble -+ ++% emacs-page end of cmaps % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix -@@ -1064,165 +1850,393 @@ +@@ -1064,196 +1979,565 @@ \def\scshape{csc} \def\scbshape{csc} @@ -23972,7 +24259,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -\setfont\textttsl\ttslshape{10}{\mainmagstep} +% Definitions for a main text size of 11pt. This is the default in +% Texinfo. -+% ++% +\def\definetextfontsizexi{% +% Text fonts (11.2pt, magstep1). +\def\textnominalsize{11pt} @@ -23987,6 +24274,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep ++\def\textecsize{1095} -% A few fonts for @defun, etc. -\setfont\defbf\bxshape{10}{\magstep1} %was 1314 @@ -24018,6 +24306,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 ++\def\smallecsize{0900} -% Fonts for title page: -\setfont\titlerm\rmbshape{12}{\magstep3} @@ -24038,6 +24327,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 ++\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} @@ -24052,8 +24342,8 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 - \def\authorrm{\secrm} -+\def\authortt{\sectt} +-\def\authorrm{\secrm} ++\def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). -\setfont\chaprm\rmbshape{12}{\magstep2} @@ -24074,6 +24364,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 ++\def\chapecsize{1728} % Section fonts (14.4pt). -\setfont\secrm\rmbshape{12}{\magstep1} @@ -24094,7 +24385,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 - +- -% \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad. -% \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded. -% \setfont\ssecsl\slshape{10}{\magstep1} @@ -24108,7 +24399,8 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -%\setfont\ssecsf\sfshape{10}{1315} - -%\let\ssecbf=\ssecrm -- ++\def\sececsize{1440} + % Subsection fonts (13.15pt). -\setfont\ssecrm\rmbshape{12}{\magstephalf} -\setfont\ssecit\itbshape{10}{1315} @@ -24130,6 +24422,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \font\ssecsy=cmsy10 scaled 1315 -% The smallcaps and symbol fonts should actually be scaled \magstep1.5, -% but that is not a standard magnification. ++\def\ssececsize{1200} + +% Reduced fonts for @acro in text (10pt). +\def\reducednominalsize{10pt} @@ -24143,6 +24436,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} +\font\reducedi=cmmi10 +\font\reducedsy=cmsy10 ++\def\reducedecsize{1000} + +% reset the current fonts +\textfonts @@ -24154,7 +24448,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% section, chapter, etc., sizes following suit. This is for the GNU +% Press printing of the Emacs 22 manual. Maybe other manuals in the +% future. Used with @smallbook, which sets the leading to 12pt. -+% ++% +\def\definetextfontsizex{% +% Text fonts (10pt). +\def\textnominalsize{10pt} @@ -24169,6 +24463,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep ++\def\textecsize{1000} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstephalf}{OT1} @@ -24188,6 +24483,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 ++\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} @@ -24201,6 +24497,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 ++\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} @@ -24214,8 +24511,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 -+\def\authorrm{\secrm} -+\def\authortt{\sectt} ++\def\titleecsize{2074} + +% Chapter fonts (14.4pt). +\def\chapnominalsize{14pt} @@ -24229,6 +24525,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\chapsc\scbshape{10}{\magstep2}{OT1} +\font\chapi=cmmi12 scaled \magstep1 +\font\chapsy=cmsy10 scaled \magstep2 ++\def\chapecsize{1440} + +% Section fonts (12pt). +\def\secnominalsize{12pt} @@ -24240,8 +24537,9 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\secsf\sfbshape{12}{1000}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep1}{OT1} -+\font\seci=cmmi12 ++\font\seci=cmmi12 +\font\secsy=cmsy10 scaled \magstep1 ++\def\sececsize{1200} + +% Subsection fonts (10pt). +\def\ssecnominalsize{10pt} @@ -24255,6 +24553,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\ssecsc\scbshape{10}{1000}{OT1} +\font\sseci=cmmi10 +\font\ssecsy=cmsy10 ++\def\ssececsize{1000} + +% Reduced fonts for @acro in text (9pt). +\def\reducednominalsize{9pt} @@ -24268,6 +24567,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} +\font\reducedi=cmmi9 +\font\reducedsy=cmsy9 ++\def\reducedecsize{0900} + +% reduce space between paragraphs +\divide\parskip by 2 @@ -24281,7 +24581,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% We provide the user-level command +% @fonttextsize 10 +% (or 11) to redefine the text font size. pt is assumed. -+% ++% +\def\xword{10} +\def\xiword{11} +% @@ -24291,7 +24591,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % + % Set \globaldefs so that documents can use this inside @tex, since + % makeinfo 4.8 does not support it, but we need it nonetheless. -+ % ++ % + \begingroup \globaldefs=1 + \ifx\textsizearg\xword \definetextfontsizex + \else \ifx\textsizearg\xiword \definetextfontsizexi @@ -24356,7 +24656,8 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \def\curfontsize{title}% + \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{25pt}} - \def\titlefont#1{{\titlefonts\rm #1}} +-\def\titlefont#1{{\titlefonts\rm #1}} ++\def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc @@ -24411,7 +24712,21 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \def\curfontsize{smaller}% + \def\lsize{smaller}\def\lllsize{smaller}% + \resetmathfonts \setleading{9.5pt}} -+ + +-% Set up the default fonts, so we can use them for creating boxes. +-% +-\textfonts ++% Fonts for short table of contents. ++\setfont\shortcontrm\rmshape{12}{1000}{OT1} ++\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 ++\setfont\shortcontsl\slshape{12}{1000}{OT1} ++\setfont\shortconttt\ttshape{12}{1000}{OT1TT} + +-% Define these so they can be easily changed for other fonts. ++% Define these just so they can be easily changed for other fonts. + \def\angleleft{$\langle$} + \def\angleright{$\rangle$} + +% Set the fonts to use with the @small... environments. +\let\smallexamplefonts = \smallfonts + @@ -24425,30 +24740,133 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% +% By the way, for comparison, here's what fits with @example (10pt): +% 8.5x11=71 smallbook=60 a4=75 a5=58 -+% -+% I wish the USA used A4 paper. +% --karl, 24jan03. + - - % Set up the default fonts, so we can use them for creating boxes. - % --\textfonts ++% Set up the default fonts, so we can use them for creating boxes. ++% +\definetextfontsizexi - - % Define these so they can be easily changed for other fonts. - \def\angleleft{$\langle$} -@@ -1232,28 +2246,42 @@ ++ ++ ++\message{markup,} ++ ++% Check if we are currently using a typewriter font. Since all the ++% Computer Modern typewriter fonts have zero interword stretch (and ++% shrink), and it is reasonable to expect all typewriter fonts to have ++% this property, we can check that font parameter. ++% ++\def\ifmonospace{\ifdim\fontdimen3\font=0pt } ++ ++% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will ++% define and register \INITMACRO to be called on markup style changes. ++% \INITMACRO can check \currentmarkupstyle for the innermost ++% style and the set of \ifmarkupSTYLE switches for all styles ++% currently in effect. ++\newif\ifmarkupvar ++\newif\ifmarkupsamp ++\newif\ifmarkupkey ++%\newif\ifmarkupfile % @file == @samp. ++%\newif\ifmarkupoption % @option == @samp. ++\newif\ifmarkupcode ++\newif\ifmarkupkbd ++%\newif\ifmarkupenv % @env == @code. ++%\newif\ifmarkupcommand % @command == @code. ++\newif\ifmarkuptex % @tex (and part of @math, for now). ++\newif\ifmarkupexample ++\newif\ifmarkupverb ++\newif\ifmarkupverbatim ++ ++\let\currentmarkupstyle\empty ++ ++\def\setupmarkupstyle#1{% ++ \csname markup#1true\endcsname ++ \def\currentmarkupstyle{#1}% ++ \markupstylesetup ++} ++ ++\let\markupstylesetup\empty ++ ++\def\defmarkupstylesetup#1{% ++ \expandafter\def\expandafter\markupstylesetup ++ \expandafter{\markupstylesetup #1}% ++ \def#1% ++} ++ ++% Markup style setup for left and right quotes. ++\defmarkupstylesetup\markupsetuplq{% ++ \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname ++ \ifx\temp\relax \markupsetuplqdefault \else \temp \fi ++} ++ ++\defmarkupstylesetup\markupsetuprq{% ++ \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname ++ \ifx\temp\relax \markupsetuprqdefault \else \temp \fi ++} ++ ++{ ++\catcode`\'=\active ++\catcode`\`=\active ++ ++\gdef\markupsetuplqdefault{\let`\lq} ++\gdef\markupsetuprqdefault{\let'\rq} ++ ++\gdef\markupsetcodequoteleft{\let`\codequoteleft} ++\gdef\markupsetcodequoteright{\let'\codequoteright} ++ ++\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} ++} ++ ++\let\markupsetuplqcode \markupsetcodequoteleft ++\let\markupsetuprqcode \markupsetcodequoteright ++\let\markupsetuplqexample \markupsetcodequoteleft ++\let\markupsetuprqexample \markupsetcodequoteright ++\let\markupsetuplqverb \markupsetcodequoteleft ++\let\markupsetuprqverb \markupsetcodequoteright ++\let\markupsetuplqverbatim \markupsetcodequoteleft ++\let\markupsetuprqverbatim \markupsetcodequoteright ++ ++\let\markupsetuplqsamp \markupsetnoligaturesquoteleft ++\let\markupsetuplqkbd \markupsetnoligaturesquoteleft ++ ++% Allow an option to not replace quotes with a regular directed right ++% quote/apostrophe (char 0x27), but instead use the undirected quote ++% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it ++% the default, but it works for pasting with more pdf viewers (at least ++% evince), the lilypond developers report. xpdf does work with the ++% regular 0x27. ++% ++\def\codequoteright{% ++ \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax ++ \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax ++ '% ++ \else \char'15 \fi ++ \else \char'15 \fi ++} ++% ++% and a similar option for the left quote char vs. a grave accent. ++% Modern fonts display ASCII 0x60 as a grave accent, so some people like ++% the code environments to do likewise. ++% ++\def\codequoteleft{% ++ \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax ++ \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax ++ % [Knuth] pp. 380,381,391 ++ % \relax disables Spanish ligatures ?` and !` of \tt font. ++ \relax`% ++ \else \char'22 \fi ++ \else \char'22 \fi ++} ++ ++% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. ++\def\noligaturesquoteleft{\relax\lq} ++ + % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 - % Fonts for short table of contents. +-% Fonts for short table of contents. -\setfont\shortcontrm\rmshape{12}{1000} -\setfont\shortcontbf\bxshape{12}{1000} -\setfont\shortcontsl\slshape{12}{1000} -+\setfont\shortcontrm\rmshape{12}{1000}{OT1} -+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 -+\setfont\shortcontsl\slshape{12}{1000}{OT1} -+\setfont\shortconttt\ttshape{12}{1000}{OT1TT} - +- %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic @@ -24466,18 +24884,24 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% @var is set to this for defun arguments. +\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} + -+% like \smartslanted except unconditionally use \sl. We never want ++% @cite is like \smartslanted except unconditionally use \sl. We never want +% ttsl for book titles, do we? +\def\cite#1{{\sl #1}\futurelet\next\smartitalicx} \let\i=\smartitalic +-\let\var=\smartslanted +\let\slanted=\smartslanted - \let\var=\smartslanted ++\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}} \let\dfn=\smartslanted \let\emph=\smartitalic -\let\cite=\smartslanted -+% @b, explicit bold. ++% Explicit font changes: @r, @sc, undocumented @ii. ++\def\r#1{{\rm #1}} % roman font ++\def\sc#1{{\smallcaps#1}} % smallcaps font ++\def\ii#1{{\it #1}} % italic font ++ ++% @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b @@ -24487,7 +24911,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. -@@ -1261,13 +2289,30 @@ +@@ -1261,22 +2545,53 @@ \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } @@ -24509,27 +24933,52 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\catcode`@=\other +\def\endofsentencespacefactor{3000}% default + ++% @t, explicit typewriter. \def\t#1{% - {\tt \rawbackslash \frenchspacing #1}% + {\tt \rawbackslash \plainfrenchspacing #1}% \null } -\let\ttfont=\t - \def\samp#1{`\tclose{#1}'\null} +-\def\samp#1{`\tclose{#1}'\null} -\setfont\keyrm\rmshape{8}{1000} -+\setfont\keyrm\rmshape{8}{1000}{OT1} - \font\keysy=cmsy9 - \def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% - \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% -@@ -1275,6 +2320,7 @@ - \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% - \kern-0.4pt\hrule}% - \kern-.06em\raise0.4pt\hbox{\angleright}}}} -+\def\key #1{{\nohyphenation \uppercase{#1}}\null} - % The old definition, with no lozenge: - %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} +-\font\keysy=cmsy9 +-\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% +- \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% +- \vbox{\hrule\kern-0.4pt +- \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% +- \kern-0.4pt\hrule}% +- \kern-.06em\raise0.4pt\hbox{\angleright}}}} +-% The old definition, with no lozenge: +-%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} ++ ++% @samp. ++\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} ++ ++% definition of @key that produces a lozenge. Doesn't adjust to text size. ++%\setfont\keyrm\rmshape{8}{1000}{OT1} ++%\font\keysy=cmsy9 ++%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% ++% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% ++% \vbox{\hrule\kern-0.4pt ++% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% ++% \kern-0.4pt\hrule}% ++% \kern-.06em\raise0.4pt\hbox{\angleright}}}} ++ ++% definition of @key with no lozenge. If the current font is already ++% monospace, don't change it; that way, we respect @kbdinputstyle. But ++% if it isn't monospace, then use \tt. ++% ++\def\key#1{{\setupmarkupstyle{key}% ++ \nohyphenation ++ \ifmonospace\else\tt\fi ++ #1}\null} ++ ++% ctrl is no longer a Texinfo command. \def\ctrl #1{{\tt \rawbackslash \hat}#1} -@@ -1300,13 +2346,13 @@ + + % @file, @option are the same as @samp. +@@ -1300,13 +2615,13 @@ \nohyphenation % \rawbackslash @@ -24545,7 +24994,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. -@@ -1316,26 +2362,61 @@ +@@ -1316,63 +2631,107 @@ % and arrange explicitly to hyphenate at a dash. % -- rms. { @@ -24553,13 +25002,13 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex - \catcode`\_=\active + \catcode`\-=\active \catcode`\_=\active + \catcode`\'=\active \catcode`\`=\active ++ \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup - \catcode`\-=\active \let-\codedash - \catcode`\_=\active \let_\codeunder -+ \catcode\rquoteChar=\active \catcode\lquoteChar=\active -+ \let'\codequoteright \let`\codequoteleft -+ % ++ \setupmarkupstyle{code}% ++ % The following should really be moved into \setupmarkupstyle handlers. + \catcode\dashChar=\active \catcode\underChar=\active + \ifallowcodebreaks + \let-\codedash @@ -24597,7 +25046,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% each of the four underscores in __typeof__. This is undesirable in +% some manuals, especially if they don't have long identifiers in +% general. @allowcodebreaks provides a way to control this. -+% ++% +\newif\ifallowcodebreaks \allowcodebreakstrue + +\def\keywordtrue{true} @@ -24617,7 +25066,8 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. -@@ -1343,24 +2424,25 @@ ++\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} + % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). @@ -24647,14 +25097,16 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -% Default is kbdinputdistinct. (Too much of a hassle to call the macro, -% the catcodes are wrong for parsearg to work.) -\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl} -+% Default is `distinct.' ++% Default is `distinct'. +\kbdinputstyle distinct \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% -@@ -1368,8 +2450,8 @@ - \else{\tclose{\kbdfont\look}}\fi - \else{\tclose{\kbdfont\look}}\fi} + \ifx\one\xkey\ifx\threex\three \key{#2}% +-\else{\tclose{\kbdfont\look}}\fi +-\else{\tclose{\kbdfont\look}}\fi} ++\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi ++\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} -% For @url, @env, @command quotes seem unnecessary, so use \code. -\let\url=\code @@ -24663,7 +25115,17 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \let\env=\code \let\command=\code -@@ -1401,9 +2483,13 @@ ++% @clicksequence{File @click{} Open ...} ++\def\clicksequence#1{\begingroup #1\endgroup} ++ ++% @clickstyle @arrow (by default) ++\parseargdef\clickstyle{\def\click{#1}} ++\def\click{\arrow} ++ + % @uref (abbreviation for `urlref') takes an optional (comma-separated) + % second argument specifying the text to display and an optional third + % arg as text to display instead of (rather than in addition to) the url +@@ -1401,9 +2760,13 @@ \endlink \endgroup} @@ -24678,16 +25140,37 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} -@@ -1442,12 +2528,105 @@ - \def\sc#1{{\smallcaps#1}} % smallcaps font - \def\ii#1{{\it #1}} % italic font +@@ -1418,36 +2781,223 @@ + \let\email=\uref + \fi --% @acronym downcases the argument and prints in smallcaps. --\def\acronym#1{{\smallcaps \lowercase{#1}}} +-% Check if we are currently using a typewriter font. Since all the +-% Computer Modern typewriter fonts have zero interword stretch (and +-% shrink), and it is reasonable to expect all typewriter fonts to have +-% this property, we can check that font parameter. +-% +-\def\ifmonospace{\ifdim\fontdimen3\font=0pt } +- + % Typeset a dimension, e.g., `in' or `pt'. The only reason for the + % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. + % + \def\dmn#1{\thinspace #1} + +-\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} +- + % @l was never documented to mean ``switch to the Lisp font'', + % and it is not used as such in any manual I can find. We need it for + % Polish suppressed-l. --karl, 22sep96. + %\def\l#1{{\li #1}\null} + +-% Explicit font changes: @r, @sc, undocumented @ii. +-\def\r#1{{\rm #1}} % roman font +-\def\sc#1{{\smallcaps#1}} % smallcaps font +-\def\ii#1{{\it #1}} % italic font +% @acronym for "FBI", "NATO", and the like. +% We print this one point size smaller, since it's intended for +% all-uppercase. -+% ++% +\def\acronym#1{\doacronym #1,,\finish} +\def\doacronym#1,#2,#3\finish{% + {\selectfonts\lsize #1}% @@ -24697,10 +25180,11 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \fi +} --% @pounds{} is a sterling sign. +-% @acronym downcases the argument and prints in smallcaps. +-\def\acronym#1{{\smallcaps \lowercase{#1}}} +% @abbr for "Comput. J." and the like. +% No font change, but don't do end-of-sentence spacing. -+% ++% +\def\abbr#1{\doabbr #1,,\finish} +\def\doabbr#1,#2,#3\finish{% + {\plainfrenchspacing #1}% @@ -24709,6 +25193,45 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi +} + +-% @pounds{} is a sterling sign. ++ ++\message{glyphs,} ++ ++% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. ++% ++% Since these characters are used in examples, they should be an even number of ++% \tt widths. Each \tt character is 1en, so two makes it 1em. ++% ++\def\point{$\star$} ++\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} ++\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} ++\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} ++\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} ++\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} ++ ++% The @error{} command. ++% Adapted from the TeXbook's \boxit. ++% ++\newbox\errorbox ++% ++{\tentt \global\dimen0 = 3em}% Width of the box. ++\dimen2 = .55pt % Thickness of rules ++% The text. (`r' is open on the right, `e' somewhat less so on the left.) ++\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} ++% ++\setbox\errorbox=\hbox to \dimen0{\hfil ++ \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. ++ \advance\hsize by -2\dimen2 % Rules. ++ \vbox{% ++ \hrule height\dimen2 ++ \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. ++ \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. ++ \kern3pt\vrule width\dimen2}% Space to right. ++ \hrule height\dimen2} ++ \hfil} ++% ++\def\error{\leavevmode\lower.7ex\copy\errorbox} + +% @pounds{} is a sterling sign, which Knuth put in the CM italic font. +% @@ -24719,49 +25242,113 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% Theiling, which support regular, slanted, bold and bold slanted (and +% "outlined" (blackboard board, sort of) versions, which we don't need). +% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. -+% ++% +% Although only regular is the truly official Euro symbol, we ignore +% that. The Euro is designed to be slightly taller than the regular +% font height. -+% ++% +% feymr - regular +% feymo - slanted +% feybr - bold +% feybo - bold slanted -+% ++% +% There is no good (free) typewriter version, to my knowledge. +% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. +% Hmm. -+% ++% +% Also doesn't work in math. Do we need to do math with euro symbols? +% Hope not. -+% -+% ++% ++% +\def\euro{{\eurofont e}} +\def\eurofont{% + % We set the font at each command, rather than predefining it in + % \textfonts and the other font-switching commands, so that + % installations which never need the symbol don't have to have the + % font installed. -+ % ++ % + % There is only one designed size (nominal 10pt), so we always scale + % that to the current nominal size. -+ % ++ % + % By the way, simply using "at 1em" works for cmr10 and the like, but + % does not work for cmbx10 and other extended/shrunken fonts. -+ % ++ % + \def\eurosize{\csname\curfontsize nominalsize\endcsname}% + % -+ \ifx\curfontstyle\bfstylename ++ \ifx\curfontstyle\bfstylename + % bold: + \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize -+ \else ++ \else + % regular: + \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize + \fi + \thiseurofont +} + ++% Glyphs from the EC fonts. We don't use \let for the aliases, because ++% sometimes we redefine the original macro, and the alias should reflect ++% the redefinition. ++% ++% Use LaTeX names for the Icelandic letters. ++\def\DH{{\ecfont \char"D0}} % Eth ++\def\dh{{\ecfont \char"F0}} % eth ++\def\TH{{\ecfont \char"DE}} % Thorn ++\def\th{{\ecfont \char"FE}} % thorn ++% ++\def\guillemetleft{{\ecfont \char"13}} ++\def\guillemotleft{\guillemetleft} ++\def\guillemetright{{\ecfont \char"14}} ++\def\guillemotright{\guillemetright} ++\def\guilsinglleft{{\ecfont \char"0E}} ++\def\guilsinglright{{\ecfont \char"0F}} ++\def\quotedblbase{{\ecfont \char"12}} ++\def\quotesinglbase{{\ecfont \char"0D}} ++% ++% This positioning is not perfect (see the ogonek LaTeX package), but ++% we have the precomposed glyphs for the most common cases. We put the ++% tests to use those glyphs in the single \ogonek macro so we have fewer ++% dummy definitions to worry about for index entries, etc. ++% ++% ogonek is also used with other letters in Lithuanian (IOU), but using ++% the precomposed glyphs for those is not so easy since they aren't in ++% the same EC font. ++\def\ogonek#1{{% ++ \def\temp{#1}% ++ \ifx\temp\macrocharA\Aogonek ++ \else\ifx\temp\macrochara\aogonek ++ \else\ifx\temp\macrocharE\Eogonek ++ \else\ifx\temp\macrochare\eogonek ++ \else ++ \ecfont \setbox0=\hbox{#1}% ++ \ifdim\ht0=1ex\accent"0C #1% ++ \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% ++ \fi ++ \fi\fi\fi\fi ++ }% ++} ++\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} ++\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} ++\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} ++\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} ++% ++% Use the ec* fonts (cm-super in outline format) for non-CM glyphs. ++\def\ecfont{% ++ % We can't distinguish serif/sans and italic/slanted, but this ++ % is used for crude hacks anyway (like adding French and German ++ % quotes to documents typeset with CM, where we lose kerning), so ++ % hopefully nobody will notice/care. ++ \edef\ecsize{\csname\curfontsize ecsize\endcsname}% ++ \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% ++ \ifx\curfontstyle\bfstylename ++ % bold: ++ \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize ++ \else ++ % regular: ++ \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize ++ \fi ++ \thisecfont ++} ++ +% @registeredsymbol - R in a circle. The font for the R should really +% be smaller yet, but lllsize is the best we can do for now. +% Adapted from the plain.tex definition of \copyright. @@ -24779,15 +25366,21 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% Laurent Siebenmann reports \Orb undefined with: +% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 +% so we'll define it if necessary. -+% ++% +\ifx\Orb\undefined +\def\Orb{\mathhexbox20D} +\fi + ++% Quotes. ++\chardef\quotedblleft="5C ++\chardef\quotedblright=`\" ++\chardef\quoteleft=`\` ++\chardef\quoteright=`\' ++ \message{page headings,} -@@ -1466,86 +2645,103 @@ +@@ -1466,86 +3016,100 @@ \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue @@ -24924,22 +25517,19 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\let\subtitlerm=\tenrm +\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} + -+\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines -+ \let\tt=\authortt} -+ +\parseargdef\title{% + \checkenv\titlepage -+ \leftline{\titlefonts\rm #1} ++ \leftline{\titlefonts\rmisbold #1} + % print a rule at the page bottom also. + \finishedtitlepagefalse + \vskip4pt \hrule height 4pt width \hsize \vskip4pt - } - ++} ++ +\parseargdef\subtitle{% + \checkenv\titlepage + {\subtitlefont \rightline{#1}}% -+} -+ + } + +% @author should come last, but may come many times. +% It can also be used inside @quotation. +% @@ -24950,7 +25540,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \else + \checkenv\titlepage + \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi -+ {\authorfont \leftline{#1}}% ++ {\secfonts\rmisbold \leftline{#1}}% + \fi +} + @@ -24958,7 +25548,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex %%% Set up page headings and footings. \let\thispage=\folio -@@ -1555,7 +2751,7 @@ +@@ -1555,7 +3119,7 @@ \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages @@ -24967,7 +25557,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline -@@ -1569,43 +2765,37 @@ +@@ -1569,43 +3133,64 @@ % @evenfooting @thisfile|| % @oddfooting ||@thisfile @@ -24978,9 +25568,9 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -\def\evenfooting{\parsearg\evenfootingxxx} -\def\oddfooting{\parsearg\oddfootingxxx} -\def\everyfooting{\parsearg\everyfootingxxx} -- --{\catcode`\@=0 % +-{\catcode`\@=0 % +- -\gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish} -\gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{% +\def\evenheading{\parsearg\evenheadingxxx} @@ -25021,14 +25611,40 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex } -\gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}} --% --}% unbind the catcode of @. +\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} + ++% @evenheadingmarks top \thischapter <- chapter at the top of a page ++% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page + % +-}% unbind the catcode of @. ++% The same set of arguments for: ++% ++% @oddheadingmarks ++% @evenfootingmarks ++% @oddfootingmarks ++% @everyheadingmarks ++% @everyfootingmarks ++ ++\def\evenheadingmarks{\headingmarks{even}{heading}} ++\def\oddheadingmarks{\headingmarks{odd}{heading}} ++\def\evenfootingmarks{\headingmarks{even}{footing}} ++\def\oddfootingmarks{\headingmarks{odd}{footing}} ++\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} ++ \headingmarks{odd}{heading}{#1} } ++\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} ++ \headingmarks{odd}{footing}{#1} } ++% #1 = even/odd, #2 = heading/footing, #3 = top/bottom. ++\def\headingmarks#1#2#3 {% ++ \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname ++ \global\expandafter\let\csname get#1#2marks\endcsname \temp ++} ++ ++\everyheadingmarks bottom ++\everyfootingmarks bottom % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. -@@ -1619,7 +2809,7 @@ +@@ -1619,7 +3204,7 @@ \def\headings #1 {\csname HEADINGS#1\endcsname} @@ -25037,7 +25653,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \global\evenheadline={\hfil} \global\evenfootline={\hfil} \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff -@@ -1628,7 +2818,7 @@ +@@ -1628,7 +3213,7 @@ % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. @@ -25046,7 +25662,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} -@@ -1640,7 +2830,7 @@ +@@ -1640,7 +3225,7 @@ % For single-sided printing, chapter title goes across top left of page, % page number on top right. @@ -25055,7 +25671,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} -@@ -1670,7 +2860,10 @@ +@@ -1670,7 +3255,10 @@ } % Subroutines used in generating headings @@ -25067,7 +25683,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \def\today{% \number\day\space \ifcase\month -@@ -1679,16 +2872,16 @@ +@@ -1679,16 +3267,16 @@ \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} @@ -25087,7 +25703,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % default indentation of table text \newdimen\tableindent \tableindent=.8in -@@ -1700,7 +2893,7 @@ +@@ -1700,7 +3288,7 @@ % used internally for \itemindent minus \itemmargin \newdimen\itemmax @@ -25096,7 +25712,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). -@@ -1712,22 +2905,10 @@ +@@ -1712,22 +3300,10 @@ \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} @@ -25120,7 +25736,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \itemindex{#1}% \nobreak % This prevents a break before @itemx. % -@@ -1751,10 +2932,14 @@ +@@ -1751,10 +3327,14 @@ % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % @@ -25134,12 +25750,12 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % cause the example and the item to crash together. So we use this + % bizarre value of 10001 as a signal to \aboveenvbreak to insert + % \parskip glue after all. Section titles are handled this way also. -+ % ++ % + \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else -@@ -1773,97 +2958,106 @@ +@@ -1773,97 +3353,116 @@ \fi } @@ -25280,9 +25896,18 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \parindent=0pt + \parskip=\smallskipamount + \ifdim\parskip=0pt \parskip=2pt \fi ++ % ++ % Try typesetting the item mark that if the document erroneously says ++ % something like @itemize @samp (intending @table), there's an error ++ % right away at the @itemize. It's not the best error message in the ++ % world, but it's better than leaving it to the @item. This means if ++ % the user wants an empty mark, they have to say @w{} not just @w. + \def\itemcontents{#1}% ++ \setbox0 = \hbox{\itemcontents}% ++ % + % @itemize with no arg is equivalent to @itemize @bullet. + \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi ++ % + \let\item=\itemizeitem } @@ -25320,13 +25945,14 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \ifnum\lastpenalty<10000 \parskip=0in \fi + \noindent + \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% ++ % + \vadjust{\penalty 1200}}% not good to break after first line of item. + \flushcr +} % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. -@@ -1874,11 +3068,8 @@ +@@ -1874,11 +3473,8 @@ % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % @@ -25339,7 +25965,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi -@@ -1949,13 +3140,13 @@ +@@ -1949,13 +3545,13 @@ }% } @@ -25355,7 +25981,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg -@@ -1966,16 +3157,6 @@ +@@ -1966,16 +3562,6 @@ \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} @@ -25372,7 +25998,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 -@@ -2002,24 +3183,14 @@ +@@ -2002,24 +3588,14 @@ % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. @@ -25399,7 +26025,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % Sample multitable: -@@ -2063,13 +3234,12 @@ +@@ -2063,13 +3639,12 @@ \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent @@ -25418,7 +26044,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \setuptable } -@@ -2086,8 +3256,8 @@ +@@ -2086,8 +3661,8 @@ \let\go\pickupwholefraction \else \global\advance\colcount by 1 @@ -25429,7 +26055,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi -@@ -2102,18 +3272,33 @@ +@@ -2102,18 +3677,40 @@ \go } @@ -25442,12 +26068,19 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% +% @headitem starts a heading row, which we typeset in bold. +% Assignments have to be global since we are inside the implicit group -+% of an alignment entry. Note that \everycr resets \everytab. -+\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}% ++% of an alignment entry. \everycr resets \everytab so we don't have to ++% undo it ourselves. ++\def\headitemfont{\b}% for people to use in the template row; not changeable ++\def\headitem{% ++ \checkenv\multitable ++ \crcr ++ \global\everytab={\bf}% can't use \headitemfont since the parsing differs ++ \the\everytab % for the first item ++}% +% +% A \tab used to include \hskip1sp. But then the space in a template +% line is not enough. That is bad. So let's go back to just `&' until -+% we encounter the problem it was intended to solve again. ++% we again encounter the problem the 1sp was intended to solve. +% --karl, nathan@acm.org, 20apr99. +\def\tab{\checkenv\multitable &\the\everytab}% @@ -25471,7 +26104,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \tolerance=9500 \hbadness=9500 \setmultitablespacing -@@ -2121,81 +3306,93 @@ +@@ -2121,81 +3718,93 @@ \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 @@ -25627,7 +26260,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex %% Test to see if parskip is larger than space between lines of %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. -@@ -2212,282 +3409,178 @@ +@@ -2212,282 +3821,178 @@ \message{conditionals,} @@ -25902,8 +26535,8 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % And now expand that command. + \doignoretext ^^M% + }% - } - ++} ++ +\def\doignoreyyy#1{% + \def\temp{#1}% + \ifx\temp\empty % Nothing found. @@ -25934,8 +26567,8 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % environments, where otherwise the newline after an ignored conditional + % would result in a blank line in the output. + \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% -+} -+ + } + + % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. @@ -26036,7 +26669,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \else \csname SET#1\endcsname \fi -@@ -2496,66 +3589,36 @@ +@@ -2496,66 +4001,36 @@ % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % @@ -26126,7 +26759,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % @defininfoenclose. \let\definfoenclose=\comment -@@ -2565,9 +3628,8 @@ +@@ -2565,9 +4040,8 @@ % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite @@ -26138,7 +26771,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that -@@ -2587,42 +3649,48 @@ +@@ -2587,42 +4061,48 @@ } % @defindex foo == \newindex{foo} @@ -26193,11 +26826,11 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\def\dosynindex#1#2#3{% + % Only do \closeout if we haven't already done it, else we'll end up + % closing the target index. -+ \expandafter \ifx\csname donesynindex#2\endcsname \undefined ++ \expandafter \ifx\csname donesynindex#2\endcsname \relax + % The \closeout helps reduce unnecessary open files; the limit on the + % Acorn RISC OS is a mere 16 files. + \expandafter\closeout\csname#2indfile\endcsname -+ \expandafter\let\csname\donesynindex#2\endcsname = 1 ++ \expandafter\let\csname donesynindex#2\endcsname = 1 + \fi + % redefine \fooindfile: + \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname @@ -26207,7 +26840,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex } % Define \doindex, the driver for all \fooindex macros. -@@ -2642,265 +3710,425 @@ +@@ -2642,265 +4122,455 @@ \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} @@ -26317,7 +26950,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % processing continues to some further point. On the other hand, it + % seems \endinput does not hurt in the printed index arg, since that + % is still getting written without apparent harm. -+ % ++ % + % Sample source (mac-idx3.tex, reported by Graham Percival to + % help-texinfo, 22may06): + % @macro funindex {WORD} @@ -26325,12 +26958,12 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % @end macro + % ... + % @funindex commtest -+ % ++ % + % The above is not enough to reproduce the bug, but it gives the flavor. -+ % ++ % + % Sample whatsit resulting: + % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} -+ % ++ % + % So: + \let\endinput = \empty + % @@ -26390,19 +27023,23 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % Non-English letters. + \definedummyword\AA + \definedummyword\AE ++ \definedummyword\DH + \definedummyword\L -+ \definedummyword\OE + \definedummyword\O ++ \definedummyword\OE ++ \definedummyword\TH + \definedummyword\aa + \definedummyword\ae ++ \definedummyword\dh ++ \definedummyword\exclamdown + \definedummyword\l -+ \definedummyword\oe + \definedummyword\o -+ \definedummyword\ss -+ \definedummyword\exclamdown -+ \definedummyword\questiondown ++ \definedummyword\oe + \definedummyword\ordf + \definedummyword\ordm ++ \definedummyword\questiondown ++ \definedummyword\ss ++ \definedummyword\th + % + % Although these internal commands shouldn't show up, sometimes they do. + \definedummyword\bf @@ -26427,11 +27064,22 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \definedummyword\equiv + \definedummyword\error + \definedummyword\euro ++ \definedummyword\guillemetleft ++ \definedummyword\guillemetright ++ \definedummyword\guilsinglleft ++ \definedummyword\guilsinglright + \definedummyword\expansion + \definedummyword\minus ++ \definedummyword\ogonek + \definedummyword\pounds + \definedummyword\point + \definedummyword\print ++ \definedummyword\quotedblbase ++ \definedummyword\quotedblleft ++ \definedummyword\quotedblright ++ \definedummyword\quoteleft ++ \definedummyword\quoteright ++ \definedummyword\quotesinglbase + \definedummyword\result + \definedummyword\textdegree + % @@ -26471,6 +27119,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \definedummyword\v + \definedummyword\H + \definedummyword\dotaccent ++ \definedummyword\ogonek + \definedummyword\ringaccent + \definedummyword\tieaccent + \definedummyword\ubaraccent @@ -26593,19 +27242,23 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % Non-English letters. + \def\AA{AA}% + \def\AE{AE}% ++ \def\DH{DZZ}% + \def\L{L}% + \def\OE{OE}% + \def\O{O}% ++ \def\TH{ZZZ}% + \def\aa{aa}% + \def\ae{ae}% ++ \def\dh{dzz}% ++ \def\exclamdown{!}% + \def\l{l}% + \def\oe{oe}% -+ \def\o{o}% -+ \def\ss{ss}% -+ \def\exclamdown{!}% -+ \def\questiondown{?}% + \def\ordf{a}% + \def\ordm{o}% ++ \def\o{o}% ++ \def\questiondown{?}% ++ \def\ss{ss}% ++ \def\th{zzz}% + % + \def\LaTeX{LaTeX}% + \def\TeX{TeX}% @@ -26615,30 +27268,40 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \def\bullet{bullet}% + \def\comma{,}% + \def\copyright{copyright}% -+ \def\registeredsymbol{R}% + \def\dots{...}% + \def\enddots{...}% + \def\equiv{==}% + \def\error{error}% + \def\euro{euro}% + \def\expansion{==>}% ++ \def\guillemetleft{<<}% ++ \def\guillemetright{>>}% ++ \def\guilsinglleft{<}% ++ \def\guilsinglright{>}% + \def\minus{-}% -+ \def\pounds{pounds}% + \def\point{.}% ++ \def\pounds{pounds}% + \def\print{-|}% ++ \def\quotedblbase{"}% ++ \def\quotedblleft{"}% ++ \def\quotedblright{"}% ++ \def\quoteleft{`}% ++ \def\quoteright{'}% ++ \def\quotesinglbase{,}% ++ \def\registeredsymbol{R}% + \def\result{=>}% -+ \def\textdegree{degrees}% ++ \def\textdegree{o}% + % + % We need to get rid of all macros, leaving only the arguments (if present). + % Of course this is not nearly correct, but it is the best we can do for now. + % makeinfo does not expand macros in the argument to @deffn, which ends up + % writing an index entry, and texindex isn't prepared for an index sort entry + % that starts with \. -+ % ++ % + % Since macro invocations are followed by braces, we can just redefine them + % to take a single TeX argument. The case of a macro invocation that + % goes to end-of-line is not handled. -+ % ++ % + \macrolist } @@ -26777,7 +27440,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + {\indexnofonts + \edef\temp{\the\toks0}% need full expansion + \xdef\indexsorttmp{\temp}% -+ }% + }% + % + % Set up the complete index entry, with both the sort key and + % the original text, including any font commands. We write @@ -26787,7 +27450,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \edef\temp{% + \write\writeto{% + \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% - }% ++ }% + \temp +} + @@ -26837,7 +27500,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % + % If \lastskip is nonzero, that means the last item was a + % skip. And since a skip is discardable, that means this -+ % -\skip0 glue we're inserting is preceded by a ++ % -\whatsitskip glue we're inserting is preceded by a + % non-discardable item, therefore it is not a potential + % breakpoint, therefore no \nobreak needed. + \ifx\lastskipmacro\zeroskipmacro @@ -26853,7 +27516,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % to re-insert the same penalty (values >10000 are used for various + % signals); since we just inserted a non-discardable item, any + % following glue (such as a \parskip) would be a breakpoint. For example: -+ % ++ % + % @deffn deffn-whatever + % @vindex index-whatever + % Description. @@ -26870,7 +27533,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex } % The index entry written in the file actually looks like -@@ -2938,13 +4166,13 @@ +@@ -2938,13 +4608,13 @@ % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % @@ -26887,7 +27550,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains -@@ -2971,7 +4199,7 @@ +@@ -2971,7 +4641,7 @@ % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. @@ -26896,7 +27559,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns -@@ -2993,7 +4221,10 @@ +@@ -2993,7 +4663,10 @@ \removelastskip % % We like breaks before the index initials, so insert a bonus. @@ -26908,7 +27571,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column -@@ -3003,93 +4234,117 @@ +@@ -3003,93 +4676,117 @@ % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% @@ -26974,7 +27637,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex - \ifx\tempc\tempd\ \else% +% A straightforward implementation would start like this: +% \def\entry#1#2{... -+% But this frozes the catcodes in the argument, and can cause problems to ++% But this freezes the catcodes in the argument, and can cause problems to +% @code, which sets - active. This problem was fixed by a kludge--- +% ``-'' was active throughout whole index, but this isn't really right. +% @@ -27098,7 +27761,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex }} % Define two-column mode, which we use to typeset indexes. -@@ -3149,7 +4404,6 @@ +@@ -3149,7 +4846,6 @@ % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) @@ -27106,7 +27769,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \vsize = 2\vsize } -@@ -3163,6 +4417,7 @@ +@@ -3163,6 +4859,7 @@ % previous page. \dimen@ = \vsize \divide\dimen@ by 2 @@ -27114,7 +27777,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ -@@ -3170,16 +4425,47 @@ +@@ -3170,16 +4867,47 @@ \unvbox255 \penalty\outputpenalty } @@ -27164,7 +27827,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. -@@ -3203,8 +4489,9 @@ +@@ -3203,8 +4931,9 @@ % \endgroup where \vsize got restored). \pagegoal = \vsize } @@ -27175,7 +27838,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip -@@ -3234,6 +4521,12 @@ +@@ -3234,6 +4963,12 @@ \message{sectioning,} % Chapters, sections, etc. @@ -27188,7 +27851,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 -@@ -3241,9 +4534,12 @@ +@@ -3241,9 +4976,12 @@ % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ @@ -27202,13 +27865,21 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% -@@ -3281,11 +4577,12 @@ - - % Each @chapter defines this as the name of the chapter. - % page headings and footings can use it. @section does likewise. -+% However, they are not reliable, because we don't use marks. +@@ -3279,13 +5017,18 @@ + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} + +-% Each @chapter defines this as the name of the chapter. +-% page headings and footings can use it. @section does likewise. ++% Each @chapter defines these (using marks) as the number+name, number ++% and name of the chapter. Page headings and footings can use ++% these. @section does likewise. \def\thischapter{} ++\def\thischapternum{} ++\def\thischaptername{} \def\thissection{} ++\def\thissectionnum{} ++\def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level -\newcount\secbase\secbase=0 % @raise/lowersections modify this count @@ -27216,7 +27887,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} -@@ -3295,287 +4592,246 @@ +@@ -3295,287 +5038,250 @@ \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name @@ -27392,7 +28063,9 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \gdef\chaplevelprefix{\the\chapno.}% + \resetallfloatnos + % -+ \message{\putwordChapter\space \the\chapno}% ++ % \putwordChapter can contain complex things in translations. ++ \toks0=\expandafter{\putwordChapter}% ++ \message{\the\toks0 \space \the\chapno}% + % + % Write the actual heading. + \chapmacro{#1}{Ynumbered}{\the\chapno}% @@ -27421,15 +28094,17 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -\global\let\section = \appendixsec -\global\let\subsection = \appendixsubsec -\global\let\subsubsection = \appendixsubsubsec -+\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz ++\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz ++% +\def\appendixzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\appendixno by 1 + \gdef\chaplevelprefix{\appendixletter.}% + \resetallfloatnos + % -+ \def\appendixnum{\putwordAppendix\space \appendixletter}% -+ \message{\appendixnum}% ++ % \putwordAppendix can contain complex things in translations. ++ \toks0=\expandafter{\putwordAppendix}% ++ \message{\the\toks0 \space \appendixletter}% + % + \chapmacro{#1}{Yappendix}{\appendixletter}% + % @@ -27704,9 +28379,14 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % Define @majorheading, @heading and @subheading -@@ -3588,23 +4844,27 @@ +@@ -3587,24 +5293,27 @@ + % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. ++\def\majorheading{% ++ {\advance\chapheadingskip by 10pt \chapbreak }% ++ \parsearg\chapheadingzzz ++} -\def\majorheading{\parsearg\majorheadingzzz} -\def\majorheadingzzz #1{% @@ -27714,11 +28394,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\penalty 200} -+\def\majorheading{% -+ {\advance\chapheadingskip by 10pt \chapbreak }% -+ \parsearg\chapheadingzzz -+} - +- -\def\chapheading{\parsearg\chapheadingzzz} -\def\chapheadingzzz #1{\chapbreak % -{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 @@ -27727,8 +28403,8 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\def\chapheading{\chapbreak \parsearg\chapheadingzzz} +\def\chapheadingzzz#1{% + {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 -+ \parindent=0pt\raggedright -+ \rm #1\hfill}}% ++ \parindent=0pt\ptexraggedright ++ \rmisbold #1\hfill}}% + \bigskip \par\penalty 200\relax + \suppressfirstparagraphindent +} @@ -27746,7 +28422,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), -@@ -3613,8 +4873,6 @@ +@@ -3613,8 +5322,6 @@ %%% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} @@ -27755,7 +28431,29 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex %%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) -@@ -3637,7 +4895,7 @@ +@@ -3622,7 +5329,20 @@ + + \def\chapbreak{\dobreak \chapheadingskip {-4000}} + \def\chappager{\par\vfill\supereject} +-\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} ++% Because \domark is called before \chapoddpage, the filler page will ++% get the headings for the next chapter, which is wrong. But we don't ++% care -- we just disable all headings on the filler page. ++\def\chapoddpage{% ++ \chappager ++ \ifodd\pageno \else ++ \begingroup ++ \evenheadline={\hfil}\evenfootline={\hfil}% ++ \oddheadline={\hfil}\oddfootline={\hfil}% ++ \hbox to 0pt{}% ++ \chappager ++ \endgroup ++ \fi ++} + + \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} + +@@ -3637,7 +5357,7 @@ \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} @@ -27764,7 +28462,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage -@@ -3645,107 +4903,205 @@ +@@ -3645,107 +5365,292 @@ \CHAPPAGon @@ -27787,47 +28485,83 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\def\Yappendixkeyword{Yappendix} +% +\def\chapmacro#1#2#3{% ++ % Insert the first mark before the heading break (see notes for \domark). ++ \let\prevchapterdefs=\lastchapterdefs ++ \let\prevsectiondefs=\lastsectiondefs ++ \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% ++ \gdef\thissection{}}% ++ % ++ \def\temptype{#2}% ++ \ifx\temptype\Ynothingkeyword ++ \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% ++ \gdef\thischapter{\thischaptername}}% ++ \else\ifx\temptype\Yomitfromtockeyword ++ \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% ++ \gdef\thischapter{}}% ++ \else\ifx\temptype\Yappendixkeyword ++ \toks0={#1}% ++ \xdef\lastchapterdefs{% ++ \gdef\noexpand\thischaptername{\the\toks0}% ++ \gdef\noexpand\thischapternum{\appendixletter}% ++ % \noexpand\putwordAppendix avoids expanding indigestible ++ % commands in some of the translations. ++ \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} ++ \noexpand\thischapternum: ++ \noexpand\thischaptername}% ++ }% ++ \else ++ \toks0={#1}% ++ \xdef\lastchapterdefs{% ++ \gdef\noexpand\thischaptername{\the\toks0}% ++ \gdef\noexpand\thischapternum{\the\chapno}% ++ % \noexpand\putwordChapter avoids expanding indigestible ++ % commands in some of the translations. ++ \gdef\noexpand\thischapter{\noexpand\putwordChapter{} ++ \noexpand\thischapternum: ++ \noexpand\thischaptername}% ++ }% ++ \fi\fi\fi ++ % ++ % Output the mark. Pass it through \safewhatsit, to take care of ++ % the preceding space. ++ \safewhatsit\domark ++ % ++ % Insert the chapter heading break. \pchapsepmacro ++ % ++ % Now the second mark, after the heading break. No break points ++ % between here and the heading. ++ \let\prevchapterdefs=\lastchapterdefs ++ \let\prevsectiondefs=\lastsectiondefs ++ \domark ++ % {% - \chapfonts \rm +- \chapfonts \rm - \def\chapnum{#2}% - \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}% +- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright +- \hangindent = \wd0 \centerparametersmaybe ++ \chapfonts \rmisbold + % -+ % Have to define \thissection before calling \donoderef, because the ++ % Have to define \lastsection before calling \donoderef, because the + % xref code eventually uses it. On the other hand, it has to be called + % after \pchapsepmacro, or the headline will change too soon. -+ \gdef\thissection{#1}% -+ \gdef\thischaptername{#1}% ++ \gdef\lastsection{#1}% + % + % Only insert the separating space if we have a chapter/appendix + % number, and don't print the unnumbered ``number''. -+ \def\temptype{#2}% + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unnchap}% -+ \gdef\thischapternum{}% -+ \gdef\thischapter{#1}% + \else\ifx\temptype\Yomitfromtockeyword + \setbox0 = \hbox{}% contents like unnumbered, but no toc entry + \def\toctype{omit}% -+ \gdef\thischapternum{}% -+ \gdef\thischapter{}% + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% + \def\toctype{app}% -+ \xdef\thischapternum{\appendixletter}% -+ % We don't substitute the actual chapter name into \thischapter -+ % because we don't want its macros evaluated now. And we don't -+ % use \thissection because that changes with each section. -+ % -+ \xdef\thischapter{\putwordAppendix{} \appendixletter: -+ \noexpand\thischaptername}% + \else + \setbox0 = \hbox{#3\enspace}% + \def\toctype{numchap}% -+ \xdef\thischapternum{\the\chapno}% -+ \xdef\thischapter{\putwordChapter{} \the\chapno: -+ \noexpand\thischaptername}% + \fi\fi\fi + % + % Write the toc entry for this chapter. Must come before the @@ -27843,8 +28577,8 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \donoderef{#2}% + % + % Typeset the actual heading. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright -- \hangindent = \wd0 \centerparametersmaybe ++ \nobreak % Avoid page breaks at the interline glue. ++ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright + \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% @@ -27880,8 +28614,10 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\nobreak +- \parindent=0pt\raggedright +- \rm #1\hfill}}\bigskip \par\nobreak ++ \parindent=0pt\ptexraggedright ++ \rmisbold #1\hfill}}\bigskip \par\nobreak } - \def\chfopen #1#2{\chapoddpage {\chapfonts @@ -27892,7 +28628,8 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt - \hfill {\rm #1}\hfill}}\bigskip \par\nobreak +- \hfill {\rm #1}\hfill}}\bigskip \par\nobreak ++ \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak } - -\def\CHAPFopen{ @@ -27945,40 +28682,96 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the +% section number. +% ++\def\seckeyword{sec} ++% +\def\sectionheading#1#2#3#4{% {% % Switch to the right set of fonts. - \csname #1fonts\endcsname \rm -+ \csname #2fonts\endcsname \rm ++ \csname #2fonts\endcsname \rmisbold % - % Only insert the separating space if we have a section number. - \def\secnum{#2}% - \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}% -+ % Insert space above the heading. -+ \csname #2headingbreak\endcsname - % -+ % Only insert the space after the number if we have a section number. + \def\sectionlevel{#2}% + \def\temptype{#3}% + % +- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright +- \hangindent = \wd0 % zero if no section number +- \unhbox0 #3}% ++ % Insert first mark before the heading break (see notes for \domark). ++ \let\prevsectiondefs=\lastsectiondefs ++ \ifx\temptype\Ynothingkeyword ++ \ifx\sectionlevel\seckeyword ++ \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% ++ \gdef\thissection{\thissectionname}}% ++ \fi ++ \else\ifx\temptype\Yomitfromtockeyword ++ % Don't redefine \thissection. ++ \else\ifx\temptype\Yappendixkeyword ++ \ifx\sectionlevel\seckeyword ++ \toks0={#1}% ++ \xdef\lastsectiondefs{% ++ \gdef\noexpand\thissectionname{\the\toks0}% ++ \gdef\noexpand\thissectionnum{#4}% ++ % \noexpand\putwordSection avoids expanding indigestible ++ % commands in some of the translations. ++ \gdef\noexpand\thissection{\noexpand\putwordSection{} ++ \noexpand\thissectionnum: ++ \noexpand\thissectionname}% ++ }% ++ \fi ++ \else ++ \ifx\sectionlevel\seckeyword ++ \toks0={#1}% ++ \xdef\lastsectiondefs{% ++ \gdef\noexpand\thissectionname{\the\toks0}% ++ \gdef\noexpand\thissectionnum{#4}% ++ % \noexpand\putwordSection avoids expanding indigestible ++ % commands in some of the translations. ++ \gdef\noexpand\thissection{\noexpand\putwordSection{} ++ \noexpand\thissectionnum: ++ \noexpand\thissectionname}% ++ }% ++ \fi ++ \fi\fi\fi ++ % ++ % Go into vertical mode. Usually we'll already be there, but we ++ % don't want the following whatsit to end up in a preceding paragraph ++ % if the document didn't happen to have a blank line. ++ \par ++ % ++ % Output the mark. Pass it through \safewhatsit, to take care of ++ % the preceding space. ++ \safewhatsit\domark ++ % ++ % Insert space above the heading. ++ \csname #2headingbreak\endcsname + % ++ % Now the second mark, after the heading break. No break points ++ % between here and the heading. ++ \let\prevsectiondefs=\lastsectiondefs ++ \domark ++ % ++ % Only insert the space after the number if we have a section number. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unn}% -+ \gdef\thissection{#1}% ++ \gdef\lastsection{#1}% + \else\ifx\temptype\Yomitfromtockeyword + % for @headings -- no section number, don't include in toc, -+ % and don't redefine \thissection. ++ % and don't redefine \lastsection. + \setbox0 = \hbox{}% + \def\toctype{omit}% + \let\sectionlevel=\empty + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{#4\enspace}% + \def\toctype{app}% -+ \gdef\thissection{#1}% ++ \gdef\lastsection{#1}% + \else + \setbox0 = \hbox{#4\enspace}% + \def\toctype{num}% -+ \gdef\thissection{#1}% ++ \gdef\lastsection{#1}% + \fi\fi\fi + % + % Write the toc entry (before \donoderef). See comments in \chapmacro. @@ -27997,9 +28790,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \nobreak + % + % Output the actual section heading. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright -- \hangindent = \wd0 % zero if no section number -- \unhbox0 #3}% ++ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright + \hangindent=\wd0 % zero if no section number + \unhbox0 #1}% }% @@ -28016,18 +28807,18 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % glue accumulate. (Not a breakpoint because it's preceded by a + % discardable item.) + \vskip-\parskip -+ % ++ % + % This is purely so the last item on the list is a known \penalty > + % 10000. This is so \startdefun can avoid allowing breakpoints after + % section headings. Otherwise, it would insert a valid breakpoint between: -+ % ++ % + % @section sec-whatever + % @deffn def-whatever + \penalty 10001 } -@@ -3754,161 +5110,225 @@ +@@ -3754,161 +5659,224 @@ \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. @@ -28086,7 +28877,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% These characters do not print properly in the Computer Modern roman +% fonts, so we must take special care. This is more or less redundant +% with the Texinfo input format setup at the end of this file. -+% ++% +\def\activecatcodes{% + \catcode`\"=\active + \catcode`\$=\active @@ -28146,7 +28937,6 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % + % Don't need to put `Contents' or `Short Contents' in the headline. + % It is abundantly clear what they are. -+ \def\thischapter{}% + \chapmacro{#1}{Yomitfromtoc}{}% + % + \savepageno = \pageno @@ -28160,7 +28950,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% redefined for the two-volume lispref. We always output on +% \jobname.toc even if this is redefined. -+% ++% +\def\tocreadfilename{\jobname.toc} % Normal (long) toc. @@ -28365,7 +29155,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. -@@ -3939,17 +5359,8 @@ +@@ -3939,17 +5907,8 @@ \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} @@ -28385,7 +29175,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} -@@ -3959,72 +5370,61 @@ +@@ -3959,72 +5918,30 @@ \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} @@ -28398,10 +29188,8 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \message{environments,} % @foo ... @end foo. -+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. -+% - % Since these characters are used in examples, it should be an even number of - % \tt widths. Each \tt character is 1en, so two makes it 1em. +-% Since these characters are used in examples, it should be an even number of +-% \tt widths. Each \tt character is 1en, so two makes it 1em. -% Furthermore, these definitions must come after we define our fonts. -\newbox\dblarrowbox \newbox\longdblarrowbox -\newbox\pushcharbox \newbox\bullbox @@ -28418,48 +29206,39 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -%} - -% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. -+% - \def\point{$\star$} - \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} - \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} - \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} - \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} - -+% The @error{} command. - % Adapted from the TeXbook's \boxit. -+% -+\newbox\errorbox -+% - {\tentt \global\dimen0 = 3em}% Width of the box. - \dimen2 = .55pt % Thickness of rules - % The text. (`r' is open on the right, `e' somewhat less so on the left.) +-\def\point{$\star$} +-\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} +-\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} +-\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} +-\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} +- +-% Adapted from the TeXbook's \boxit. +-{\tentt \global\dimen0 = 3em}% Width of the box. +-\dimen2 = .55pt % Thickness of rules +-% The text. (`r' is open on the right, `e' somewhat less so on the left.) -\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} - -\global\setbox\errorbox=\hbox to \dimen0{\hfil -+\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} -+% -+\setbox\errorbox=\hbox to \dimen0{\hfil - \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. - \advance\hsize by -2\dimen2 % Rules. +- \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. +- \advance\hsize by -2\dimen2 % Rules. - \vbox{ -+ \vbox{% - \hrule height\dimen2 - \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. - \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. - \kern3pt\vrule width\dimen2}% Space to right. - \hrule height\dimen2} - \hfil} +- \hrule height\dimen2 +- \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. +- \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. +- \kern3pt\vrule width\dimen2}% Space to right. +- \hrule height\dimen2} +- \hfil} - -% The @error{} command. -+% - \def\error{\leavevmode\lower.7ex\copy\errorbox} - +-\def\error{\leavevmode\lower.7ex\copy\errorbox} +- % @tex ... @end tex escapes into raw Tex temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. -\def\tex{\begingroup +\envdef\tex{% ++ \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 - \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie @@ -28476,10 +29255,12 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \catcode `\|=\other + \catcode `\<=\other + \catcode `\>=\other ++ \catcode`\`=\other ++ \catcode`\'=\other \escapechar=`\\ % \let\b=\ptexb -@@ -4036,20 +5436,25 @@ +@@ -4036,20 +5953,26 @@ \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi @@ -28491,6 +29272,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext ++ \expandafter \let\csname top\endcsname=\ptextop % outer + \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% @@ -28509,7 +29291,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in -@@ -4059,34 +5464,34 @@ +@@ -4059,34 +5982,34 @@ % have any width. \def\lisppar{\null\endgraf} @@ -28562,7 +29344,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around -@@ -4110,738 +5515,731 @@ +@@ -4110,738 +6033,756 @@ % \newskip\lskip\newskip\rskip @@ -28647,6 +29429,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % This macro is called at the beginning of all the @example variants, % inside a group. ++\newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak - \inENV % This group ends at the end of the body @@ -28656,7 +29439,12 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt ++ % Turn off paragraph indentation but redefine \indent to emulate ++ % the normal \indent. ++ \nonfillparindent=\parindent \parindent = 0pt ++ \let\indent\nonfillindent ++ % \emergencystretch = 0pt % don't try to avoid overfull boxes - % @cartouche defines \nonarrowing to inhibit narrowing - % at next level down. @@ -28679,6 +29467,24 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -% the zero \parskip that the environments set -- \parskip glue will be -% inserted at the beginning of the next paragraph in the document, after -% the environment. ++\begingroup ++\obeyspaces ++% We want to swallow spaces (but not other tokens) after the fake ++% @indent in our nonfill-environments, where spaces are normally ++% active and set to @tie, resulting in them not being ignored after ++% @indent. ++\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% ++\gdef\nonfillindentcheck{% ++\ifx\temp % ++\expandafter\nonfillindentgobble% ++\else% ++\leavevmode\nonfillindentbox% ++\fi% ++}% ++\endgroup ++\def\nonfillindentgobble#1{\nonfillindent} ++\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} ++ +% If you want all examples etc. small: @set dispenvsize small. +% If you want even small examples the full size: @set dispenvsize nosmall. +% This affects the following displayed environments: @@ -28761,7 +29567,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \nonfillstart - \let\Edisplay = \nonfillfinish - \gobble -+ \tt\quoteexpand ++ \tt\setupmarkupstyle{example}% + \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. + \gobble % eat return } @@ -28821,6 +29627,30 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex } +\let\Eflushright = \afterenvbreak + ++ ++% @raggedright does more-or-less normal line breaking but no right ++% justification. From plain.tex. ++\envdef\raggedright{% ++ \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax ++} ++\let\Eraggedright\par ++ ++\envdef\raggedleft{% ++ \parindent=0pt \leftskip0pt plus2em ++ \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt ++ \hbadness=10000 % Last line will usually be underfull, so turn off ++ % badness reporting. ++} ++\let\Eraggedleft\par ++ ++\envdef\raggedcenter{% ++ \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em ++ \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt ++ \hbadness=10000 % Last line will usually be underfull, so turn off ++ % badness reporting. ++} ++\let\Eraggedcenter\par ++ % @quotation does normal linebreaking (hence we can't use \nonfillstart) -% and narrows the margins. @@ -28830,7 +29660,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % -\def\quotation{% - \begingroup\inENV %This group ends at the end of the @quotation body -+\envdef\quotation{% ++\def\quotationstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip - \singlespace \parindent=0pt @@ -28849,16 +29679,9 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \parsearg\quotationlabel } -+% We have retained a nonzero parskip for the environment, since we're -+% doing normal filling. -+% -+\def\Equotation{% -+ \par -+ \ifx\quotationauthor\undefined\else -+ % indent a bit. -+ \leftline{\kern 2\leftskip \sl ---\quotationauthor}% -+ \fi -+ {\parskip=0pt \afterenvbreak}% ++\envdef\quotation{% ++ \setnormaldispenv ++ \quotationstart +} -\message{defuns,} @@ -28881,9 +29704,25 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex - -% Make control sequences which act like normal parenthesis chars. -\let\lparen = ( \let\rparen = ) -- ++\envdef\smallquotation{% ++ \setsmalldispenv ++ \quotationstart ++} ++\let\Esmallquotation = \Equotation + -{\activeparens % Now, smart parens don't turn on until &foo (see \amprm) -- ++% We have retained a nonzero parskip for the environment, since we're ++% doing normal filling. ++% ++\def\Equotation{% ++ \par ++ \ifx\quotationauthor\undefined\else ++ % indent a bit. ++ \leftline{\kern 2\leftskip \sl ---\quotationauthor}% ++ \fi ++ {\parskip=0pt \afterenvbreak}% ++} + -% Be sure that we always have a definition for `(', etc. For example, -% if the fn name has parens in it, \boldbrax will not be in effect yet, -% so TeX would otherwise complain about undefined control sequence. @@ -28921,6 +29760,10 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \do\ \do\\\do\{\do\}\do\$\do\&% + \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% + \do\<\do\>\do\|\do\@\do+\do\"% ++ % Don't do the quotes -- if we do, @set txicodequoteundirected and ++ % @set txicodequotebacktick will not have effect on @verb and ++ % @verbatim, and ?` and !` ligatures won't get disabled. ++ %\do\`\do\'% } % -% This is the definition of ( when already inside a level of parens. @@ -28935,11 +29778,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex - \global\advance \parencount by -1 } -% If we encounter &foo, then turn on ()-hacking afterwards -\gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } -+% [Knuth] pp. 380,381,391 -+% Disable Spanish ligatures ?` and !` of \tt font -+\begingroup -+ \catcode`\`=\active\gdef`{\relax\lq} -+\endgroup ++% Setup for the @verb command. % -\gdef\normalparens{\boldbrax\let&=\ampnr} -} % End of definition inside \activeparens @@ -28955,8 +29794,6 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -{ - \catcode`& = 13 - \global\let& = \ampnr -+% Setup for the @verb command. -+% +% Eight spaces for a tab +\begingroup + \catcode`\^^I=\active @@ -28966,7 +29803,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\def\setupverb{% + \tt % easiest (and conventionally used) font for verbatim + \def\par{\leavevmode\endgraf}% -+ \catcode`\`=\active ++ \setupmarkupstyle{verb}% + \tabeightspaces + % Respect line breaks, + % print special symbols as themselves, and @@ -28984,6 +29821,20 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount +% +\def\starttabbox{\setbox0=\hbox\bgroup} ++% ++\begingroup ++ \catcode`\^^I=\active ++ \gdef\tabexpand{% ++ \catcode`\^^I=\active ++ \def^^I{\leavevmode\egroup ++ \dimen0=\wd0 % the width so far, or since the previous tab ++ \divide\dimen0 by\tabw ++ \multiply\dimen0 by\tabw % compute previous multiple of \tabw ++ \advance\dimen0 by\tabw % advance to next multiple of \tabw ++ \wd0=\dimen0 \box0 \starttabbox ++ }% ++ } ++\endgroup -\def\defname #1#2{% -% Get the values of \leftskip and \rightskip as they were @@ -29007,72 +29858,6 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -\advance\leftskip by -\defbodyindent -\exdentamount=\defbodyindent -{\df #1}\enskip % Generate function name -+% Allow an option to not replace quotes with a regular directed right -+% quote/apostrophe (char 0x27), but instead use the undirected quote -+% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it -+% the default, but it works for pasting with more pdf viewers (at least -+% evince), the lilypond developers report. xpdf does work with the -+% regular 0x27. -+% -+\def\codequoteright{% -+ \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax -+ \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax -+ '% -+ \else \char'15 \fi -+ \else \char'15 \fi - } -+% -+% and a similar option for the left quote char vs. a grave accent. -+% Modern fonts display ASCII 0x60 as a grave accent, so some people like -+% the code environments to do likewise. -+% -+\def\codequoteleft{% -+ \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax -+ \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax -+ `% -+ \else \char'22 \fi -+ \else \char'22 \fi -+} -+% -+\begingroup -+ \catcode`\^^I=\active -+ \gdef\tabexpand{% -+ \catcode`\^^I=\active -+ \def^^I{\leavevmode\egroup -+ \dimen0=\wd0 % the width so far, or since the previous tab -+ \divide\dimen0 by\tabw -+ \multiply\dimen0 by\tabw % compute previous multiple of \tabw -+ \advance\dimen0 by\tabw % advance to next multiple of \tabw -+ \wd0=\dimen0 \box0 \starttabbox -+ }% -+ } -+ \catcode`\'=\active -+ \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}% -+ % -+ \catcode`\`=\active -+ \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}% -+ % -+ \gdef\quoteexpand{\rquoteexpand \lquoteexpand}% -+\endgroup - --% Actually process the body of a definition --% #1 should be the terminating control sequence, such as \Edefun. --% #2 should be the "another name" control sequence, such as \defunx. --% #3 should be the control sequence that actually processes the header, --% such as \defunheader. -- --\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody --\medbreak % --% Define the end token that this defining construct specifies --% so that it will exit this group. --\def#1{\endgraf\endgroup\medbreak}% --\def#2{\begingroup\obeylines\activeparens\spacesplit#3}% --\parindent=0in --\advance\leftskip by \defbodyindent --\exdentamount=\defbodyindent --\begingroup % --\catcode 61=\active % 61 is `=' --\obeylines\activeparens\spacesplit#3} +% start the verbatim environment. +\def\setupverbatim{% + \let\nonarrowing = t% @@ -29080,35 +29865,25 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % Easiest (and conventionally used) font for verbatim + \tt + \def\par{\leavevmode\egroup\box0\endgraf}% -+ \catcode`\`=\active + \tabexpand -+ \quoteexpand ++ \setupmarkupstyle{verbatim}% + % Respect line breaks, + % print special symbols as themselves, and + % make each space count + % must do in this order: + \obeylines \uncatcodespecials \sepspaces + \everypar{\starttabbox}% -+} + } --% #1 is the \E... control sequence to end the definition (which we define). --% #2 is the \...x control sequence for consecutive fns (which we define). --% #3 is the control sequence to call to resume processing. --% #4, delimited by the space, is the class name. +-% Actually process the body of a definition +-% #1 should be the terminating control sequence, such as \Edefun. +-% #2 should be the "another name" control sequence, such as \defunx. +-% #3 should be the control sequence that actually processes the header, +-% such as \defunheader. +% Do the @verb magic: verbatim text is quoted by unique +% delimiter characters. Before first delimiter expect a +% right brace, after last delimiter expect closing brace: - % --\def\defmethparsebody#1#2#3#4 {\begingroup\inENV % --\medbreak % --% Define the end token that this defining construct specifies --% so that it will exit this group. --\def#1{\endgraf\endgroup\medbreak}% --\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}% --\parindent=0in --\advance\leftskip by \defbodyindent --\exdentamount=\defbodyindent --\begingroup\obeylines\activeparens\spacesplit{#3{#4}}} ++% +% \def\doverb'{'#1'}'{#1} +% +% [Knuth] p. 382; only eat outer {} @@ -29147,14 +29922,43 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +} +\let\Everbatim = \afterenvbreak +-\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody +-\medbreak % +-% Define the end token that this defining construct specifies +-% so that it will exit this group. +-\def#1{\endgraf\endgroup\medbreak}% +-\def#2{\begingroup\obeylines\activeparens\spacesplit#3}% +-\parindent=0in +-\advance\leftskip by \defbodyindent +-\exdentamount=\defbodyindent +-\begingroup % +-\catcode 61=\active % 61 is `=' +-\obeylines\activeparens\spacesplit#3} + +-% #1 is the \E... control sequence to end the definition (which we define). +-% #2 is the \...x control sequence for consecutive fns (which we define). +-% #3 is the control sequence to call to resume processing. +-% #4, delimited by the space, is the class name. ++% @verbatiminclude FILE - insert text of file in verbatim environment. + % +-\def\defmethparsebody#1#2#3#4 {\begingroup\inENV % +-\medbreak % +-% Define the end token that this defining construct specifies +-% so that it will exit this group. +-\def#1{\endgraf\endgroup\medbreak}% +-\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}% +-\parindent=0in +-\advance\leftskip by \defbodyindent +-\exdentamount=\defbodyindent +-\begingroup\obeylines\activeparens\spacesplit{#3{#4}}} +- -% Used for @deftypemethod and @deftypeivar. -% #1 is the \E... control sequence to end the definition (which we define). -% #2 is the \...x control sequence for consecutive fns (which we define). -% #3 is the control sequence to call to resume processing. -% #4, delimited by a space, is the class name. -% #5 is the method's return type. -+ -+% @verbatiminclude FILE - insert text of file in verbatim environment. ++\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % -\def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV - \medbreak @@ -29164,12 +29968,11 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex - \advance\leftskip by \defbodyindent - \exdentamount=\defbodyindent - \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}} -+\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} -+% +\def\doverbatiminclude#1{% + {% + \makevalueexpandable + \setupverbatim ++ \indexnofonts % Allow `@@' and other weird things in file names. + \input #1 + \afterenvbreak + }% @@ -29344,7 +30147,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -% thing to call, #2 the type name (which starts with \empty), and #3 -% (which might be empty) the arguments. +% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; -+% the only thing remainnig is to define \deffnheader. ++% the only thing remaining is to define \deffnheader. % -\def\parsetpheaderline#1#2#3{% - #1{\removeemptybraces#2\relax}{#3}% @@ -29652,7 +30455,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % + % On the other hand, if an argument has two dashes (for instance), we + % want a way to get ttsl. Let's try @var for that. -+ \let\var=\ttslanted ++ \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% + #1% + \sl\hyphenchar\font=45 } @@ -29872,18 +30675,20 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \ifnum\parencount=0 \else \badparencount \fi + \ifnum\brackcount=0 \else \badbrackcount \fi +} ++% these should not use \errmessage; the glibc manual, at least, actually ++% has such constructs (when documenting function pointers). +\def\badparencount{% -+ \errmessage{Unbalanced parentheses in @def}% ++ \message{Warning: unbalanced parentheses in @def...}% + \global\parencount=0 +} +\def\badbrackcount{% -+ \errmessage{Unbalanced square braces in @def}% ++ \message{Warning: unbalanced square brackets in @def...}% + \global\brackcount=0 +} \message{macros,} -@@ -4850,42 +6248,68 @@ +@@ -4850,42 +6791,68 @@ % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\undefined @@ -29966,7 +30771,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% This does \let #1 = #2, with \csnames; that is, +% \let \csname#1\endcsname = \csname#2\endcsname +% (except of course we have to play expansion games). -+% ++% \def\cslet#1#2{% -\expandafter\expandafter -\expandafter\let @@ -29980,7 +30785,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). -@@ -4898,7 +6322,7 @@ +@@ -4898,7 +6865,7 @@ } % Trim a single trailing ^^M off a string. @@ -29989,7 +30794,15 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% -@@ -4912,30 +6336,36 @@ +@@ -4908,34 +6875,45 @@ + % all characters are catcode 10, 11 or 12, except \ which is active + % (as in normal texinfo). It is necessary to change the definition of \. + ++% Non-ASCII encodings make 8-bit characters active, so un-activate ++% them to avoid their expansion. Must do this non-globally, to ++% confine the change to the current group. ++ + % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. @@ -30003,6 +30816,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \catcode`\_=\other + \catcode`\|=\other + \catcode`\~=\other ++ \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi +} + +\def\scanargctxt{% @@ -30047,7 +30861,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N -@@ -4963,45 +6393,42 @@ +@@ -4963,45 +6941,42 @@ \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax @@ -30111,7 +30925,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. -@@ -5111,34 +6538,31 @@ +@@ -5111,34 +7086,31 @@ % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg) @@ -30157,7 +30971,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. -@@ -5147,56 +6571,68 @@ +@@ -5147,56 +7119,68 @@ \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} @@ -30230,7 +31044,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -% first place, but there's so many layers that that is hard to do. +% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an +% anchor), which consists of three parts: -+% 1) NAME-title - the current sectioning name taken from \thissection, ++% 1) NAME-title - the current sectioning name taken from \lastsection, +% or the anchor name. +% 2) NAME-snt - section number and type, passed as the SNT arg, or +% empty for anchors. @@ -30255,7 +31069,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef + ##1}{##2}}% these are parameters of \writexrdef + }% -+ \toks0 = \expandafter{\thissection}% ++ \toks0 = \expandafter{\lastsection}% + \immediate \writexrdef{title}{\the\toks0 }% + \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. + \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout @@ -30265,7 +31079,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed -@@ -5209,135 +6645,160 @@ +@@ -5209,135 +7193,162 @@ \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces \def\printedmanual{\ignorespaces #5}% @@ -30310,8 +31124,8 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex - % is as if TeX is seeing it for the first time. + % Make link in pdf output. \ifpdf - \leavevmode - \getfilename{#4}% +- \leavevmode +- \getfilename{#4}% - \ifnum\filenamelength>0 - \startlink attr{/Border [0 0 0]}% - goto file{\the\filename.pdf} name{#1@}% @@ -30319,21 +31133,26 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex - \startlink attr{/Border [0 0 0]}% - goto name{#1@}% - \fi +- \linkcolor + {\indexnofonts + \turnoffactive ++ % This expands tokens, so do it after making catcode changes, so _ ++ % etc. don't get their TeX definitions. ++ \getfilename{#4}% ++ % + % See comments at \activebackslashdouble. + {\activebackslashdouble \xdef\pdfxrefdest{#1}% + \backslashparens\pdfxrefdest}% + % ++ \leavevmode ++ \startlink attr{/Border [0 0 0]}% + \ifnum\filenamelength>0 -+ \startlink attr{/Border [0 0 0]}% -+ goto file{\the\filename.pdf} name{\pdfxrefdest}% ++ goto file{\the\filename.pdf} name{\pdfxrefdest}% + \else -+ \startlink attr{/Border [0 0 0]}% -+ goto name{\pdfmkpgn{\pdfxrefdest}}% ++ goto name{\pdfmkpgn{\pdfxrefdest}}% + \fi + }% - \linkcolor ++ \setcolor{\linkcolor}% \fi % - \ifdim \wd1 > 0pt @@ -30388,7 +31207,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % is a loss. Therefore, we give the text of the node name again, so it + % is as if TeX is seeing it for the first time. + \ifdim \wd1 > 0pt -+ \putwordsection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% ++ \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% + \else + % _ (for example) has to be the character _ for the purposes of the + % control sequence corresponding to the node, but it has to expand @@ -30519,7 +31338,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks -@@ -5352,22 +6813,59 @@ +@@ -5352,22 +7363,59 @@ \fi \else % It's defined, so just use it. @@ -30587,7 +31406,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other -@@ -5395,9 +6893,7 @@ +@@ -5395,9 +7443,7 @@ \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other @@ -30598,7 +31417,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ -@@ -5410,6 +6906,9 @@ +@@ -5410,6 +7456,9 @@ % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % @@ -30608,7 +31427,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other -@@ -5421,41 +6920,43 @@ +@@ -5421,41 +7470,43 @@ \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other @@ -30677,7 +31496,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \newcount \footnoteno -@@ -5469,37 +6970,39 @@ +@@ -5469,37 +7520,39 @@ % @footnotestyle is meaningful for info output only. \let\footnotestyle=\comment @@ -30724,7 +31543,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox -@@ -5512,8 +7015,15 @@ +@@ -5512,8 +7565,15 @@ % \smallfonts \rm % @@ -30742,7 +31561,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this -@@ -5522,66 +7032,68 @@ +@@ -5522,66 +7582,68 @@ \footstrut \futurelet\next\fo@t } @@ -30764,7 +31583,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% In case a @footnote appears in a vbox, save the footnote text and create +% the real \insert just after the vbox finished. Otherwise, the insertion +% would be lost. -+% Similarily, if a @footnote appears inside an alignment, save the footnote ++% Similarly, if a @footnote appears inside an alignment, save the footnote +% text to a box and make the \insert when a row of the table is finished. +% And the same can be done for other insert classes. --kasal, 16nov03. + @@ -30863,7 +31682,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. -@@ -5591,12 +7103,12 @@ +@@ -5591,12 +7653,12 @@ % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else @@ -30879,7 +31698,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf -@@ -5612,77 +7124,1158 @@ +@@ -5612,77 +7674,1218 @@ \global\warnednoepsftrue \fi \else @@ -30903,15 +31722,19 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % If the image is by itself, center it. + \ifvmode + \imagevmodetrue -+ \nobreak\bigskip ++ \nobreak\medskip + % Usually we'll have text after the image which will insert + % \parskip glue, so insert it here too to equalize the space + % above and below. + \nobreak\vskip\parskip + \nobreak -+ \line\bgroup + \fi + % ++ % Leave vertical mode so that indentation from an enclosing ++ % environment such as @quotation is respected. On the other hand, if ++ % it's at the top level, we don't want the normal paragraph indentation. ++ \noindent ++ % + % Output the image. \ifpdf - \centerline{\dopdfimage{#1}{#2}{#3}}% @@ -30938,7 +31761,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \epsfbox{#1.eps}% + \fi + % -+ \ifimagevmode \egroup \bigbreak \fi % space after the image ++ \ifimagevmode \medskip \fi % space after the standalone image +\endgroup} + + @@ -31005,13 +31828,13 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \global\advance\floatno by 1 + % + {% -+ % This magic value for \thissection is output by \setref as the ++ % This magic value for \lastsection is output by \setref as the + % XREFLABEL-title value. \xrefX uses it to distinguish float + % labels (which have a completely different output format) from + % node and anchor labels. And \xrdef uses it to construct the + % lists of floats. + % -+ \edef\thissection{\floatmagic=\safefloattype}% ++ \edef\lastsection{\floatmagic=\safefloattype}% + \setref{\floatlabel}{Yfloat}% + }% + \fi @@ -31043,7 +31866,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \ifx\floatlabel\empty \else + \ifx\floattype\empty \else % if also had float type, need tie first. + \appendtomacro\floatident{\tie}% - \fi ++ \fi + % the number. + \appendtomacro\floatident{\chaplevelprefix\the\floatno}% + \fi @@ -31055,7 +31878,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \ifx\thiscaption\empty \else + \ifx\floatident\empty \else + \appendtomacro\captionline{: }% had ident, so need a colon between -+ \fi + \fi + % + % caption text. + \appendtomacro\captionline{\scanexp\thiscaption}% @@ -31146,7 +31969,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + +% #1 is the control sequence we are passed; we expand into a conditional +% which is true if #1 represents a float ref. That is, the magic -+% \thissection value which we \setref above. ++% \lastsection value which we \setref above. +% +\def\iffloat#1{\expandafter\doiffloat#1==\finish} +% @@ -31211,12 +32034,13 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \message{localization,} -% and i18n. - % @documentlanguage is usually given very early, just after - % @setfilename. If done too late, it may not override everything +-% @documentlanguage is usually given very early, just after +-% @setfilename. If done too late, it may not override everything -% properly. Single argument is the language abbreviation. -% It would be nice if we could set up a hyphenation file here. -+% properly. Single argument is the language (de) or locale (de_DE) -+% abbreviation. It would be nice if we could set up a hyphenation file. ++% For single-language documents, @documentlanguage is usually given very ++% early, just after @documentencoding. Single argument is the language ++% (de) or locale (de_DE) abbreviation. % -\def\documentlanguage{\parsearg\dodocumentlanguage} -\def\dodocumentlanguage#1{% @@ -31232,17 +32056,17 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \ifeof 1 + \documentlanguagetrywithoutunderscore{#1_\finish}% + \else ++ \globaldefs = 1 % everything in the txi-LL files needs to persist + \input txi-#1.tex + \fi + \closein 1 -+ \endgroup ++ \endgroup % end raw TeX +\endgroup} -+} +% +% If they passed de_DE, and txi-de_DE.tex doesn't exist, +% try txi-de.tex. -+% -+\def\documentlanguagetrywithoutunderscore#1_#2\finish{% ++% ++\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex - \ifeof1 + \ifeof 1 @@ -31251,23 +32075,54 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex - \let\temp = \relax \else - \def\temp{\input txi-#1.tex }% ++ \globaldefs = 1 % everything in the txi-LL files needs to persist + \input txi-#1.tex \fi - \temp - \endgroup + \closein 1 } ++}% end of special _ catcode +% \newhelp\nolanghelp{The given language definition file cannot be found or - is empty. Maybe you need to install it? In the current directory - should work if nowhere else does.} +-is empty. Maybe you need to install it? In the current directory +-should work if nowhere else does.} ++is empty. Maybe you need to install it? Putting it in the current ++directory should work if nowhere else does.} ++ ++% This macro is called from txi-??.tex files; the first argument is the ++% \language name to set (without the "\lang@" prefix), the second and ++% third args are \{left,right}hyphenmin. ++% ++% The language names to pass are determined when the format is built. ++% See the etex.log file created at that time, e.g., ++% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. ++% ++% With TeX Live 2008, etex now includes hyphenation patterns for all ++% available languages. This means we can support hyphenation in ++% Texinfo, at least to some extent. (This still doesn't solve the ++% accented characters problem.) ++% ++\catcode`@=11 ++\def\txisetlanguage#1#2#3{% ++ % do not set the language if the name is undefined in the current TeX. ++ \expandafter\ifx\csname lang@#1\endcsname \relax ++ \message{no patterns for #1}% ++ \else ++ \global\language = \csname lang@#1\endcsname ++ \fi ++ % but there is no harm in adjusting the hyphenmin values regardless. ++ \global\lefthyphenmin = #2\relax ++ \global\righthyphenmin = #3\relax ++} ++% Helpers for encodings. +% Set the catcode of characters 128 through 255 to the specified number. +% +\def\setnonasciicharscatcode#1{% + \count255=128 + \loop\ifnum\count255<256 -+ \global\catcode\count255=#1 ++ \global\catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} @@ -31275,6 +32130,14 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -% @documentencoding should change something in TeX eventually, most -% likely, but for now just recognize it. -\let\documentencoding = \comment ++\def\setnonasciicharscatcodenonglobal#1{% ++ \count255=128 ++ \loop\ifnum\count255<256 ++ \catcode\count255=#1\relax ++ \advance\count255 by 1 ++ \repeat ++} + +% @documentencoding sets the definition of non-ASCII characters +% according to the specified encoding. +% @@ -31297,7 +32160,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \setnonasciicharscatcode\active + \lattwochardefs + % -+ \else \ifx \declaredencoding \latone ++ \else \ifx \declaredencoding \latone + \setnonasciicharscatcode\active + \latonechardefs + % @@ -31309,7 +32172,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \setnonasciicharscatcode\active + \utfeightchardefs + % -+ \else ++ \else + \message{Unknown document encoding #1, ignoring.}% + % + \fi % utfeight @@ -31318,16 +32181,16 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \fi % lattwo + \fi % ascii +} -+ + +-% Page size parameters. +% A message to be logged when using a character that isn't available +% the default font encoding (OT1). -+% + % +\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} - ++ +% Take account of \c (plain) vs. \, (Texinfo) difference. +\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} - --% Page size parameters. ++ +% First, make active non-ASCII characters in order for them to be +% correctly categorized when TeX reads the replacement text of +% macros containing the character definitions. @@ -31335,21 +32198,21 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% +% Latin1 (ISO-8859-1) character definitions. +\def\latonechardefs{% -+ \gdef^^a0{~} ++ \gdef^^a0{~} + \gdef^^a1{\exclamdown} -+ \gdef^^a2{\missingcharmsg{CENT SIGN}} ++ \gdef^^a2{\missingcharmsg{CENT SIGN}} + \gdef^^a3{{\pounds}} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\missingcharmsg{YEN SIGN}} -+ \gdef^^a6{\missingcharmsg{BROKEN BAR}} ++ \gdef^^a6{\missingcharmsg{BROKEN BAR}} + \gdef^^a7{\S} -+ \gdef^^a8{\"{}} -+ \gdef^^a9{\copyright} ++ \gdef^^a8{\"{}} ++ \gdef^^a9{\copyright} + \gdef^^aa{\ordf} -+ \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} ++ \gdef^^ab{\guillemetleft} + \gdef^^ac{$\lnot$} -+ \gdef^^ad{\-} -+ \gdef^^ae{\registeredsymbol} ++ \gdef^^ad{\-} ++ \gdef^^ae{\registeredsymbol} + \gdef^^af{\={}} + % + \gdef^^b0{\textdegree} @@ -31365,7 +32228,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \gdef^^b9{$^1$} + \gdef^^ba{\ordm} + % -+ \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}} ++ \gdef^^bb{\guilletright} + \gdef^^bc{$1\over4$} + \gdef^^bd{$1\over2$} + \gdef^^be{$3\over4$} @@ -31376,7 +32239,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \gdef^^c2{\^A} + \gdef^^c3{\~A} + \gdef^^c4{\"A} -+ \gdef^^c5{\ringaccent A} ++ \gdef^^c5{\ringaccent A} + \gdef^^c6{\AE} + \gdef^^c7{\cedilla C} + \gdef^^c8{\`E} @@ -31388,7 +32251,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \gdef^^ce{\^I} + \gdef^^cf{\"I} + % -+ \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}} ++ \gdef^^d0{\DH} + \gdef^^d1{\~N} + \gdef^^d2{\`O} + \gdef^^d3{\'O} @@ -31402,7 +32265,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \gdef^^db{\^U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} -+ \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}} ++ \gdef^^de{\TH} + \gdef^^df{\ss} + % + \gdef^^e0{\`a} @@ -31422,7 +32285,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \gdef^^ee{\^{\dotless i}} + \gdef^^ef{\"{\dotless i}} + % -+ \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}} ++ \gdef^^f0{\dh} + \gdef^^f1{\~n} + \gdef^^f2{\`o} + \gdef^^f3{\'o} @@ -31436,7 +32299,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \gdef^^fb{\^u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} -+ \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}} ++ \gdef^^fe{\th} + \gdef^^ff{\"y} +} + @@ -31458,7 +32321,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% Latin2 (ISO-8859-2) character definitions. +\def\lattwochardefs{% + \gdef^^a0{~} -+ \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}} ++ \gdef^^a1{\ogonek{A}} + \gdef^^a2{\u{}} + \gdef^^a3{\L} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} @@ -31475,8 +32338,8 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \gdef^^af{\dotaccent Z} + % + \gdef^^b0{\textdegree} -+ \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}} -+ \gdef^^b2{\missingcharmsg{OGONEK}} ++ \gdef^^b1{\ogonek{a}} ++ \gdef^^b2{\ogonek{ }} + \gdef^^b3{\l} + \gdef^^b4{\'{}} + \gdef^^b5{\v l} @@ -31501,14 +32364,14 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \gdef^^c7{\cedilla C} + \gdef^^c8{\v C} + \gdef^^c9{\'E} -+ \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}} ++ \gdef^^ca{\ogonek{E}} + \gdef^^cb{\"E} + \gdef^^cc{\v E} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\v D} + % -+ \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}} ++ \gdef^^d0{\DH} + \gdef^^d1{\'N} + \gdef^^d2{\v N} + \gdef^^d3{\'O} @@ -31517,7 +32380,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\v R} -+ \gdef^^d9{\ringaccent U} ++ \gdef^^d9{\ringaccent U} + \gdef^^da{\'U} + \gdef^^db{\H U} + \gdef^^dc{\"U} @@ -31535,14 +32398,14 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \gdef^^e7{\cedilla c} + \gdef^^e8{\v c} + \gdef^^e9{\'e} -+ \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}} ++ \gdef^^ea{\ogonek{e}} + \gdef^^eb{\"e} + \gdef^^ec{\v e} + \gdef^^ed{\'\i} + \gdef^^ee{\^\i} + \gdef^^ef{\v d} + % -+ \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}} ++ \gdef^^f0{\dh} + \gdef^^f1{\'n} + \gdef^^f2{\v n} + \gdef^^f3{\'o} @@ -31561,11 +32424,11 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +} + +% UTF-8 character definitions. -+% ++% +% This code to support UTF-8 is based on LaTeX's utf8.def, with some +% changes for Texinfo conventions. It is included here under the GPL by +% permission from Frank Mittelbach and the LaTeX team. -+% ++% +\newcount\countUTFx +\newcount\countUTFy +\newcount\countUTFz @@ -31686,6 +32549,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \DeclareUnicodeCharacter{00A8}{\"{ }} + \DeclareUnicodeCharacter{00A9}{\copyright} + \DeclareUnicodeCharacter{00AA}{\ordf} ++ \DeclareUnicodeCharacter{00AB}{\guillemetleft} + \DeclareUnicodeCharacter{00AD}{\-} + \DeclareUnicodeCharacter{00AE}{\registeredsymbol} + \DeclareUnicodeCharacter{00AF}{\={ }} @@ -31694,6 +32558,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \DeclareUnicodeCharacter{00B4}{\'{ }} + \DeclareUnicodeCharacter{00B8}{\cedilla{ }} + \DeclareUnicodeCharacter{00BA}{\ordm} ++ \DeclareUnicodeCharacter{00BB}{\guillemetright} + \DeclareUnicodeCharacter{00BF}{\questiondown} + + \DeclareUnicodeCharacter{00C0}{\`A} @@ -31713,6 +32578,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \DeclareUnicodeCharacter{00CE}{\^I} + \DeclareUnicodeCharacter{00CF}{\"I} + ++ \DeclareUnicodeCharacter{00D0}{\DH} + \DeclareUnicodeCharacter{00D1}{\~N} + \DeclareUnicodeCharacter{00D2}{\`O} + \DeclareUnicodeCharacter{00D3}{\'O} @@ -31725,6 +32591,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \DeclareUnicodeCharacter{00DB}{\^U} + \DeclareUnicodeCharacter{00DC}{\"U} + \DeclareUnicodeCharacter{00DD}{\'Y} ++ \DeclareUnicodeCharacter{00DE}{\TH} + \DeclareUnicodeCharacter{00DF}{\ss} + + \DeclareUnicodeCharacter{00E0}{\`a} @@ -31744,6 +32611,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} + \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} + ++ \DeclareUnicodeCharacter{00F0}{\dh} + \DeclareUnicodeCharacter{00F1}{\~n} + \DeclareUnicodeCharacter{00F2}{\`o} + \DeclareUnicodeCharacter{00F3}{\'o} @@ -31756,16 +32624,21 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \DeclareUnicodeCharacter{00FB}{\^u} + \DeclareUnicodeCharacter{00FC}{\"u} + \DeclareUnicodeCharacter{00FD}{\'y} ++ \DeclareUnicodeCharacter{00FE}{\th} + \DeclareUnicodeCharacter{00FF}{\"y} + + \DeclareUnicodeCharacter{0100}{\=A} + \DeclareUnicodeCharacter{0101}{\=a} + \DeclareUnicodeCharacter{0102}{\u{A}} + \DeclareUnicodeCharacter{0103}{\u{a}} ++ \DeclareUnicodeCharacter{0104}{\ogonek{A}} ++ \DeclareUnicodeCharacter{0105}{\ogonek{a}} + \DeclareUnicodeCharacter{0106}{\'C} + \DeclareUnicodeCharacter{0107}{\'c} + \DeclareUnicodeCharacter{0108}{\^C} + \DeclareUnicodeCharacter{0109}{\^c} ++ \DeclareUnicodeCharacter{0118}{\ogonek{E}} ++ \DeclareUnicodeCharacter{0119}{\ogonek{e}} + \DeclareUnicodeCharacter{010A}{\dotaccent{C}} + \DeclareUnicodeCharacter{010B}{\dotaccent{c}} + \DeclareUnicodeCharacter{010C}{\v{C}} @@ -31913,6 +32786,8 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \DeclareUnicodeCharacter{0233}{\=y} + \DeclareUnicodeCharacter{0237}{\dotless{j}} + ++ \DeclareUnicodeCharacter{02DB}{\ogonek{ }} ++ + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} + \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} + \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} @@ -32042,8 +32917,16 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + + \DeclareUnicodeCharacter{2013}{--} + \DeclareUnicodeCharacter{2014}{---} ++ \DeclareUnicodeCharacter{2018}{\quoteleft} ++ \DeclareUnicodeCharacter{2019}{\quoteright} ++ \DeclareUnicodeCharacter{201A}{\quotesinglbase} ++ \DeclareUnicodeCharacter{201C}{\quotedblleft} ++ \DeclareUnicodeCharacter{201D}{\quotedblright} ++ \DeclareUnicodeCharacter{201E}{\quotedblbase} + \DeclareUnicodeCharacter{2022}{\bullet} + \DeclareUnicodeCharacter{2026}{\dots} ++ \DeclareUnicodeCharacter{2039}{\guilsinglleft} ++ \DeclareUnicodeCharacter{203A}{\guilsinglright} + \DeclareUnicodeCharacter{20AC}{\euro} + + \DeclareUnicodeCharacter{2192}{\expansion} @@ -32063,7 +32946,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +% Make non-ASCII characters printable again for compatibility with +% existing Texinfo documents that may use them, even without declaring a +% document encoding. - % ++% +\setnonasciicharscatcode \other + + @@ -32072,7 +32955,16 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt -@@ -5713,11 +8306,14 @@ +@@ -5695,7 +8898,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 +8916,14 @@ \fi } @@ -32091,7 +32983,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip -@@ -5736,6 +8332,17 @@ +@@ -5736,6 +8942,17 @@ \normaloffset = #4\relax \bindingoffset = #5\relax % @@ -32109,7 +33001,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \parindent = \defaultparindent \setemergencystretch } -@@ -5743,76 +8350,140 @@ +@@ -5743,76 +8960,140 @@ % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt @@ -32118,7 +33010,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % % If page is nothing but text, make it come out even. - \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}% -+ \internalpagesizes{46\baselineskip}{6in}% ++ \internalpagesizes{607.2pt}{6in}% that's 46 lines + {\voffset}{.25in}% + {\bindingoffset}{36pt}% + {11in}{8.5in}% @@ -32184,7 +33076,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + % \global\normaloffset = -6mm + % \global\bindingoffset = 10mm + % @end tex -+ \internalpagesizes{51\baselineskip}{160mm} ++ \internalpagesizes{673.2pt}{160mm}% that's 51 lines + {\voffset}{\hoffset}% + {\bindingoffset}{44pt}% + {297mm}{210mm}% @@ -32263,7 +33155,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + \setleading{\textleading}% % - \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}% -+ \dimen0 = #1 ++ \dimen0 = #1\relax + \advance\dimen0 by \voffset + % + \dimen2 = \hsize @@ -32276,7 +33168,17 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex }} % Set default to letter. -@@ -5840,10 +8511,10 @@ +@@ -5822,6 +9103,9 @@ + + \message{and turning on texinfo input format.} + ++% DEL is a comment character, in case @c does not suffice. ++\catcode`\^^? = 14 ++ + % Define macros to output various characters with catcode for normal text. + \catcode`\"=\other + \catcode`\~=\other +@@ -5840,10 +9124,10 @@ \def\normalless{<} \def\normalgreater{>} \def\normalplus{+} @@ -32290,7 +33192,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % 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 +8546,9 @@ +@@ -5875,8 +9159,9 @@ \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} @@ -32301,7 +33203,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex \catcode`\|=\active \def|{{\tt\char124}} -@@ -5889,16 +8561,7 @@ +@@ -5889,16 +9174,7 @@ \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active @@ -32319,7 +33221,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % 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 +8569,53 @@ +@@ -5906,46 +9182,55 @@ % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} @@ -32389,7 +33291,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -@let$=@normaldollar} +% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of +% the literal character `\'. -+% ++% +@def@normalturnoffactive{% + @let\=@normalbackslash + @let"=@normaldoublequote @@ -32401,12 +33303,14 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex + @let>=@normalgreater + @let+=@normalplus + @let$=@normaldollar %$ font-lock fix ++ @markupsetuplqdefault ++ @markupsetuprqdefault + @unsepspaces +} % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. -@@ -5959,9 +8629,9 @@ +@@ -5959,9 +9244,9 @@ @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then @@ -32418,7 +33322,7 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% -@@ -5973,15 +8643,11 @@ +@@ -5973,20 +9258,34 @@ % Say @foo, not \foo, in error messages. @escapechar = `@@ @@ -32431,11 +33335,23 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex -@c Set initial fonts. -@textfonts -@rm -- ++@c Finally, make ` and ' active, so that txicodequoteundirected and ++@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we ++@c don't make ` and ' active, @code will not get them as active chars. ++@c Do this last of all since we use ` in the previous @catcode assignments. ++@catcode`@'=@active ++@catcode`@`=@active ++@markupsetuplqdefault ++@markupsetuprqdefault + ++@c Gnulib now utterly and painfully insists on no trailing whitespace. ++@c So we have to nuke it. @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) -@@ -5990,3 +8656,9 @@ ++@c eval: (add-hook 'write-file-hooks 'nuke-trailing-whitespace) + @c page-delimiter: "^\\\\message" + @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @@ -32445,9 +33361,9 @@ diff -dur gcl-2.6.8.ORIG/info/texinfo.tex gcl-2.6.8/info/texinfo.tex +@ignore + arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 +@end ignore -diff -dur gcl-2.6.8.ORIG/install.sh gcl-2.6.8/install.sh +diff -durN gcl-2.6.8.ORIG/install.sh gcl-2.6.8/install.sh --- gcl-2.6.8.ORIG/install.sh 1999-12-06 15:43:54.000000000 -0700 -+++ gcl-2.6.8/install.sh 2009-04-27 09:37:11.000000000 -0600 ++++ gcl-2.6.8/install.sh 2009-07-24 14:49:33.000000000 -0600 @@ -1,19 +1,38 @@ -#! /bin/sh -# @@ -32455,7 +33371,7 @@ diff -dur gcl-2.6.8.ORIG/install.sh gcl-2.6.8/install.sh # install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). + -+scriptversion=2006-12-25.00 ++scriptversion=2009-04-28.21; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the @@ -32500,7 +33416,7 @@ diff -dur gcl-2.6.8.ORIG/install.sh gcl-2.6.8/install.sh # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it -@@ -21,230 +40,480 @@ +@@ -21,230 +40,481 @@ # # This script is compatible with the BSD install script, but was written # from scratch. @@ -33148,58 +34064,109 @@ diff -dur gcl-2.6.8.ORIG/install.sh gcl-2.6.8/install.sh +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" -+# time-stamp-end: "$" ++# time-stamp-time-zone: "UTC" ++# time-stamp-end: "; # UTC" +# End: -diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh +diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh --- gcl-2.6.8.ORIG/ltmain.sh 2002-08-08 23:49:32.000000000 -0600 -+++ gcl-2.6.8/ltmain.sh 2009-04-27 09:37:11.000000000 -0600 -@@ -1,8 +1,8 @@ - # ltmain.sh - Provide generalized library-building support services. ++++ gcl-2.6.8/ltmain.sh 2009-07-26 16:39:21.000000000 -0600 +@@ -1,42 +1,574 @@ +-# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun ltconfig. -+# NOTE: Changing this file will not affect anything until you rerun configure. - # +-# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. -+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -+# 2007, 2008 Free Software Foundation, Inc. - # Originally by Gordon Matzigkeit , 1996 +-# Originally by Gordon Matzigkeit , 1996 +-# +-# This program is free software; you can redistribute it and/or modify ++# Generated from ltmain.m4sh. ++ ++# ltmain.sh (GNU libtool) 2.2.6 ++# Written by Gordon Matzigkeit , 1996 ++ ++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 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. ++ ++# 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 free software; you can redistribute it and/or modify -@@ -17,13 +17,49 @@ +-# 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 +-# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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. ++ ++# 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. +-# 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 ++# --tag=TAG use configuration variables from tag TAG ++# -v, --verbose print informational messages (default) ++# --version print version information ++# -h, --help print short or long 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. ++# 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.2.6 ++# automake: $automake_version ++# autoconf: $autoconf_version ++# ++# Report bugs to . -+basename="s,^.*/,,g" -+ -+# 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" -+ -+# The name of this program: -+progname=`echo "$progpath" | $SED $basename` -+modename="$progname" -+ -+# Global variables: -+EXIT_SUCCESS=0 -+EXIT_FAILURE=1 -+ +-# Check that we have a working $echo. +PROGRAM=ltmain.sh +PACKAGE=libtool -+VERSION=1.5.26 -+TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)" ++VERSION=2.2.6 ++TIMESTAMP="" ++package_revision=1.3012 + -+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). ++# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: @@ -33213,19 +34180,492 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + - # Check that we have a working $echo. ++# NLS nuisances: We save the old values to restore during execute mode. ++# 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). ++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 ++ ++$lt_unset CDPATH ++ ++ ++ ++ ++ ++: ${CP="cp -f"} ++: ${ECHO="echo"} ++: ${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: ++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. ++ ++exit_status=$EXIT_SUCCESS ++ ++# Make sure IFS has a sensible default ++lt_nl=' ++' ++IFS=" $lt_nl" ++ ++dirname="s,/[^/]*$,," ++basename="s,^.*/,," ++ ++# 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 "X${1}" | $Xsed -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 "X${1}" | $Xsed -e "$basename"` ++} ++ ++# Generated shell functions inserted here. ++ ++# 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" ++ ++# The name of this program: ++# In the unlikely event $progname began with a '-', it would play havoc with ++# func_echo (imagine progname=-n), so we prepend ./ in that case: ++func_dirname_and_basename "$progpath" ++progname=$func_basename_result ++case $progname in ++ -*) progname=./$progname ;; ++esac ++ ++# 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' ++ ++# Same as above, but do not quote variable references. ++double_quote_subst='s/\(["`\\]\)/\\\1/g' ++ ++# 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${mode+: }$mode: $*" ++} ++ ++# 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_error arg... ++# Echo program name prefixed message to standard error. ++func_error () ++{ ++ $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 ++} ++ ++# func_warning arg... ++# Echo program name prefixed warning message to standard error. ++func_warning () ++{ ++ $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 ++ ++ # bash bug again: ++ : ++} ++ ++# 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_error ${1+"$@"} ++ func_fatal_error "$help" ++} ++help="Try \`$progname --help' for more information." ## default ++ ++ ++# func_grep expression filename ++# Check whether EXPRESSION matches any line of FILENAME, without output. ++func_grep () ++{ ++ $GREP "$1" "$2" >/dev/null 2>&1 ++} ++ ++ ++# func_mkdir_p directory-path ++# Make sure the entire path to DIRECTORY-PATH is available. ++func_mkdir_p () ++{ ++ my_directory_path="$1" ++ my_dir_list= ++ ++ 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 "X$my_directory_path" | $Xsed -e "$dirname"` ++ done ++ my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e '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 () ++{ ++ 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 ++ ++ # 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 "X$my_tmpdir" | $Xsed ++} ++ ++ ++# 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 "X$1" | $Xsed -e "$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 ++} ++ ++ ++# 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 "X$1" | $Xsed \ ++ -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" ++} ++ ++ ++# 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-:}" ++ ++ ${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_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-:}" ++ ++ ${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 ++} ++ ++ ++ ++ ++ ++# func_version ++# Echo version message to standard output and exit. ++func_version () ++{ ++ $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { ++ s/^# // ++ s/^# *$// ++ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ ++ p ++ }' < "$progpath" ++ exit $? ++} ++ ++# func_usage ++# Echo short help message to standard output and exit. ++func_usage () ++{ ++ $SED -n '/^# Usage:/,/# -h/ { ++ s/^# // ++ s/^# *$// ++ s/\$progname/'$progname'/ ++ p ++ }' < "$progpath" ++ $ECHO ++ $ECHO "run \`$progname --help | more' for full usage" ++ exit $? ++} ++ ++# func_help ++# Echo long help message to standard output and exit. ++func_help () ++{ ++ $SED -n '/^# Usage:/,/# Report bugs to/ { ++ 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 ++ }' < "$progpath" ++ exit $? ++} ++ ++# func_missing_arg argname ++# Echo program name prefixed message to standard error and set global ++# exit_cmd. ++func_missing_arg () ++{ ++ func_error "missing argument for $1" ++ exit_cmd=exit ++} ++ ++exit_cmd=: ++ ++ ++ ++ ++ ++# Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. -@@ -36,7 +72,7 @@ + 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! ++elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then ++ # Yippee, $ECHO works! : else - # Restart under the correct shell, and then maybe $echo will work. +- # Restart under the correct shell, and then maybe $echo will work. - exec $SHELL "$0" --no-reexec ${1+"$@"} ++ # Restart under the correct shell, and then maybe $ECHO will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then -@@ -45,19 +81,9 @@ +@@ -45,509 +577,695 @@ cat <&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 -+if test -n "$lt_env"; then -+ lt_env="env $lt_env" - fi - -+# Make sure IFS has a sensible default -+lt_nl=' -+' -+IFS=" $lt_nl" -+ - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then +-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 -+ $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 $EXIT_FAILURE - fi +-fi ++magic_exe="%%%MAGIC EXE variable%%%" # Global variables. -@@ -105,12 +148,286 @@ - show="$echo" - show_help= +-mode=$default_mode ++# $mode is unset + nonopt= +-prev= +-prevopt= +-run= +-show="$echo" +-show_help= execute_dlfiles= -+duplicate_deps=no +preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" -taglist= +- +-# Parse our command line options once, thoroughly. +-while test $# -gt 0 +-do +- arg="$1" +- shift +- +- case $arg in +- -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; +- *) optarg= ;; +- esac +extracted_archives= +extracted_serial=0 -+ -+##################################### -+# Shell function definitions: -+# This seems to be the best place for them -+ -+# 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}" -+ -+ if test "$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 -+ -+ # If we're not in dry-run mode, bomb out on failure -+ test -d "$my_tmpdir" || { -+ $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 -+ exit $EXIT_FAILURE -+ } -+ fi -+ -+ $echo "X$my_tmpdir" | $Xsed -+} -+ -+ -+# 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. -+func_win32_libid () -+{ -+ 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 -+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ -+ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then -+ win32_nmres=`eval $NM -f posix -A $1 | \ -+ $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 -+} -+ -+ -+# 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 () -+{ -+ if test -n "$available_tags" && test -z "$tagname"; then -+ CC_quoted= -+ for arg in $CC; do -+ case $arg in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ arg="\"$arg\"" -+ ;; -+ esac -+ CC_quoted="$CC_quoted $arg" -+ done -+ 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 "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; -+ # 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. -+ case $arg in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ arg="\"$arg\"" -+ ;; -+ esac -+ CC_quoted="$CC_quoted $arg" -+ done -+ case "$@ " in -+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) -+ # 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 -+ $echo "$modename: unable to infer tagged configuration" -+ $echo "$modename: specify a tag with \`--tag'" 1>&2 -+ exit $EXIT_FAILURE -+# else -+# $echo "$modename: using $tagname tagged configuration" -+ fi -+ ;; -+ esac -+ fi -+} -+ -+ -+# func_extract_an_archive dir oldlib -+func_extract_an_archive () -+{ -+ f_ex_an_ar_dir="$1"; shift -+ f_ex_an_ar_oldlib="$1" -+ -+ $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" -+ $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? -+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then -+ : -+ else -+ $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 -+ exit $EXIT_FAILURE -+ fi -+} -+ -+# func_extract_archives gentop oldlib ... -+func_extract_archives () -+{ -+ my_gentop="$1"; shift -+ my_oldlibs=${1+"$@"} -+ my_oldobjs="" -+ my_xlib="" -+ my_xabs="" -+ my_xdir="" -+ my_status="" -+ -+ $show "${rm}r $my_gentop" -+ $run ${rm}r "$my_gentop" -+ $show "$mkdir $my_gentop" -+ $run $mkdir "$my_gentop" -+ my_status=$? -+ if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then -+ exit $my_status -+ fi -+ -+ 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 -+ my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` -+ my_xlib_u=$my_xlib -+ while :; do -+ case " $extracted_archives " in -+ *" $my_xlib_u "*) -+ extracted_serial=`expr $extracted_serial + 1` -+ 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" -+ -+ $show "${rm}r $my_xdir" -+ $run ${rm}r "$my_xdir" -+ $show "$mkdir $my_xdir" -+ $run $mkdir "$my_xdir" -+ exit_status=$? -+ if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then -+ exit $exit_status -+ fi -+ case $host in -+ *-darwin*) -+ $show "Extracting $my_xabs" -+ # Do not bother doing anything if just a dry run -+ if test -z "$run"; then -+ darwin_orig_dir=`pwd` -+ cd $my_xdir || exit $? -+ darwin_archive=$my_xabs -+ darwin_curdir=`pwd` -+ darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` -+ darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` -+ if test -n "$darwin_arches"; then -+ darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` -+ darwin_arch= -+ $show "$darwin_base_archive has multiple architectures $darwin_arches" -+ for darwin_arch in $darwin_arches ; do -+ 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 have a bunch of thin objects, gotta fatten them up :) -+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` -+ darwin_file= -+ darwin_files= -+ for darwin_file in $darwin_filelist; do -+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` -+ lipo -create -output "$darwin_file" $darwin_files -+ done # $darwin_filelist -+ ${rm}r unfat-$$ -+ cd "$darwin_orig_dir" -+ else -+ cd "$darwin_orig_dir" -+ func_extract_an_archive "$my_xdir" "$my_xabs" -+ fi # $darwin_arches -+ fi # $run -+ ;; -+ *) -+ func_extract_an_archive "$my_xdir" "$my_xabs" -+ ;; -+ esac -+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` -+ done -+ func_extract_archives_result="$my_oldobjs" -+} -+# End of Shell function definitions -+##################################### -+ -+# Darwin sucks -+eval std_shrext=\"$shrext_cmds\" -+ -+disable_libs=no - - # Parse our command line options once, thoroughly. --while test $# -gt 0 -+while test "$#" -gt 0 - do - arg="$1" - shift -@@ -128,30 +445,30 @@ - ;; - tag) - tagname="$arg" -+ preserve_args="${preserve_args}=$arg" - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) +- # If the previous option needs an argument, assign it. +- if test -n "$prev"; then +- case $prev in +- execute_dlfiles) +- execute_dlfiles="$execute_dlfiles $arg" +- ;; +- tag) +- tagname="$arg" ++opt_dry_run=false ++opt_duplicate_deps=false ++opt_silent=false ++opt_debug=: + +- # Check whether tagname contains only valid characters +- case $tagname in +- *[!-_A-Za-z0-9,/]*) - echo "$progname: invalid tag name: $tagname" 1>&2 - exit 1 - ;; -+ $echo "$progname: invalid tag name: $tagname" 1>&2 -+ exit $EXIT_FAILURE -+ ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. +- esac ++# 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= + +- 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" - ;; - *) +- ;; +- *) - if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then - taglist="$taglist $tagname" -+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then -+ taglist="$taglist $tagname" - # Evaluate the configuration. +- # 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 - fi - ;; -+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" -+ else -+ $echo "$progname: ignoring unknown tag $tagname" 1>&2 -+ fi -+ ;; - esac - ;; - *) -@@ -171,22 +488,28 @@ - ;; +- esac +- ;; +- *) +- eval "$prev=\$arg" +- ;; +- esac ++# 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." ++} + +- prev= +- prevopt= +- continue +- fi + +- # Have we seen a non-optional argument yet? +- case $arg in +- --help) +- show_help=yes +- ;; ++# func_config ++# Display the configuration for all the tags in this script. ++func_config () ++{ ++ re_begincf='^# ### BEGIN LIBTOOL' ++ re_endcf='^# ### END LIBTOOL' - --version) +- --version) - echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - exit 0 -+ echo "\ -+$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP -+ -+Copyright (C) 2008 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." -+ exit $? - ;; +- ;; ++ # Default configuration. ++ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - --config) +- --config) - sed -n -e '/^### BEGIN LIBTOOL CONFIG/,/^### END LIBTOOL CONFIG/p' < "$0" -+ ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # 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 -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" ++ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done - exit 0 -+ exit $? - ;; +- ;; - --debug) +- --debug) - echo "$progname: enabling shell trace mode" -+ $echo "$progname: enabling shell trace mode" - set -x -+ preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) -@@ -194,18 +517,18 @@ - ;; +- set -x +- ;; +- +- --dry-run | -n) +- run=: +- ;; ++ exit $? ++} - --features) +- --features) - echo "host: $host" -+ $echo "host: $host" ++# 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" -+ $echo "enable shared libraries" ++ $ECHO "enable shared libraries" else - echo "disable shared libraries" -+ $echo "disable shared libraries" ++ $ECHO "disable shared libraries" fi if test "$build_old_libs" = yes; then - echo "enable static libraries" -+ $echo "enable static libraries" ++ $ECHO "enable static libraries" else - echo "disable static libraries" -+ $echo "disable static libraries" ++ $ECHO "disable static libraries" fi - exit 0 +- ;; + +- --finish) mode="finish" ;; + exit $? - ;; ++} - --finish) mode="finish" ;; -@@ -213,15 +536,23 @@ - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; +- --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" -+ --preserve-dup-deps) duplicate_deps="yes" ;; -+ - --quiet | --silent) - show=: -+ preserve_args="$preserve_args $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" - --tag) prevopt="--tag" prev=tag ;; -+ --tag) -+ prevopt="--tag" -+ prev=tag -+ preserve_args="$preserve_args --tag" -+ ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag -+ preserve_args="$preserve_args --tag" - ;; +- --tag=*) +- set tag "$optarg" ${1+"$@"} +- shift +- prev=tag +- ;; ++ # Validate tagname. ++ case $tagname in ++ *[!-_A-Za-z0-9,/]*) ++ func_fatal_error "invalid tag name: $tagname" ++ ;; ++ esac - -dlopen) -@@ -232,7 +563,7 @@ - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 +- -dlopen) +- prevopt="-dlopen" +- prev=execute_dlfiles +- ;; ++ # 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" + +- -*) +- $echo "$modename: unrecognized option \`$arg'" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE +- ;; ++ # 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 ++} + +- *) +- nonopt="$arg" +- break ++# Parse options once, thoroughly. This comes as soon as possible in ++# the script to make things like `libtool --version' happen quickly. ++{ ++ ++ # 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 +-done - *) -@@ -245,9 +576,21 @@ - if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 +-if test -n "$prevopt"; then +- $echo "$modename: option \`$prevopt' requires an argument" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi +-fi ++ # Parse non-mode specific arguments: ++ while test "$#" -gt 0; do ++ opt="$1" ++ shift + +-# 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= ++ case $opt in ++ --config) func_config ;; + +-if test -z "$show_help"; then ++ --debug) preserve_args="$preserve_args $opt" ++ func_echo "enabling shell trace mode" ++ opt_debug='set -x' ++ $opt_debug ++ ;; -+case $disable_libs in -+no) -+ ;; -+shared) -+ build_libtool_libs=no -+ build_old_libs=yes -+ ;; -+static) -+ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -+ ;; -+esac +- # 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 ++ -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break ++ execute_dlfiles="$execute_dlfiles $1" ++ shift ++ ;; ++ ++ --dry-run | -n) opt_dry_run=: ;; ++ --features) func_features ;; ++ --finish) mode="finish" ;; ++ ++ --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break ++ case $1 in ++ # Valid mode arguments: ++ clean) ;; ++ compile) ;; ++ execute) ;; ++ finish) ;; ++ install) ;; ++ link) ;; ++ relink) ;; ++ uninstall) ;; ++ ++ # Catch anything else as an error ++ *) func_error "invalid argument for $opt" ++ exit_cmd=exit ++ break ++ ;; ++ esac ++ ++ mode="$1" ++ shift ++ ;; + - # 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. -@@ -257,8 +600,10 @@ ++ --preserve-dup-deps) ++ opt_duplicate_deps=: ;; ++ ++ --quiet|--silent) preserve_args="$preserve_args $opt" ++ opt_silent=: ++ ;; ++ ++ --verbose| -v) preserve_args="$preserve_args $opt" ++ opt_silent=false ++ ;; ++ ++ --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break ++ preserve_args="$preserve_args $opt $1" ++ func_enable_tag "$1" # tagname is set here ++ shift ++ ;; ++ ++ # Separate optargs to long options: ++ -dlopen=*|--mode=*|--tag=*) ++ func_opt_split "$opt" ++ set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} ++ shift ++ ;; ++ ++ -\?|-h) func_usage ;; ++ --help) opt_help=: ;; ++ --version) func_version ;; ++ ++ -*) func_fatal_help "unrecognized option \`$opt'" ;; ++ ++ *) nonopt="$opt" ++ break ++ ;; ++ esac ++ done ++ ++ ++ case $host in ++ *cygwin* | *mingw* | *pw32* | *cegcc*) ++ # don't eliminate duplications in $postdeps and $predeps ++ opt_duplicate_compiler_generated_deps=: + ;; + *) +- # If we have no mode, but dlfiles were specified, then do execute mode. +- test -n "$execute_dlfiles" && mode=execute ++ opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ++ ;; ++ esac - # Infer the operation mode. - if test -z "$mode"; then -+ $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 -+ $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in -- *cc | *++ | gcc* | *-gcc*) -+ *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do -@@ -299,7 +644,7 @@ +- # 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 ++ # Having warned about all mis-specified options, bail out if ++ # anything was wrong. ++ $exit_cmd $EXIT_FAILURE ++} ++ ++# 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 +- ;; +- esac ++ 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 ++} ++ ++ ++## ----------- ## ++## Main. ## ++## ----------- ## ++ ++$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 + ++ test -z "$mode" && func_fatal_error "error: you must specify a MODE." ++ ++ ++ # Darwin sucks ++ eval std_shrext=\"$shrext_cmds\" ++ ++ + # 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 +- $echo "$modename: unrecognized option \`-dlopen'" 1>&2 +- $echo "$help" 1>&2 - exit 1 ++ func_error "unrecognized option \`-dlopen'" ++ $ECHO "$help" 1>&2 + exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. -@@ -313,158 +658,127 @@ - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= + generic_help="$help" +- help="Try \`$modename --help --mode=$mode' for more information." ++ help="Try \`$progname --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" -+ srcfile="$nonopt" # always keep a non-empty value in "srcfile" -+ suppress_opt=yes - suppress_output= -+ arg_mode=normal -+ libobj= -+ later= +- suppress_output= - user_target=no - for arg - do +- for arg +- do - case $prev in - "") ;; - xcompiler) - # Aesthetically quote the previous argument. - prev= - lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -- ++# 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 ++} + - case $arg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly @@ -33814,12 +35226,28 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - arg="\"$arg\"" - ;; - esac -+ case $arg_mode in -+ arg ) -+ # do not "continue". Instead, add this to base_compile -+ lastarg="$arg" -+ arg_mode=normal -+ ;; ++# 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 ++} - # Add the previous argument to base_compile. - if test -z "$base_compile"; then @@ -33827,12 +35255,17 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - else - base_compile="$base_compile $lastarg" - fi -+ target ) -+ libobj="$arg" -+ arg_mode=normal - continue - ;; +- continue +- ;; - esac ++# 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" ++} - # Accept any command-line options. - case $arg in @@ -33843,73 +35276,82 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - fi - user_target=next - ;; -+ normal ) -+ # Accept any command-line options. -+ case $arg in -+ -o) -+ if test -n "$libobj" ; then -+ $echo "$modename: you cannot specify \`-o' more than once" 1>&2 -+ exit $EXIT_FAILURE -+ fi -+ arg_mode=target -+ continue -+ ;; ++# 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 ++} - -static) - build_old_libs=yes - continue - ;; -+ -static | -prefer-pic | -prefer-non-pic) -+ later="$later $arg" -+ continue -+ ;; ++# 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_ltwrapper_scriptname_result="" ++ if func_ltwrapper_executable_p "$1"; then ++ func_dirname_and_basename "$1" "" "." ++ func_stripname '' '.exe' "$func_basename_result" ++ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" ++ fi ++} - -prefer-pic) - pic_mode=yes - continue - ;; -+ -no-suppress) -+ suppress_opt=no -+ continue -+ ;; ++# 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" ++} - -prefer-non-pic) - pic_mode=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. - -Xcompiler) - prev=xcompiler - continue - ;; -+ -Wc,*) -+ args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` -+ lastarg= -+ save_ifs="$IFS"; IFS=',' -+ for arg in $args; do -+ IFS="$save_ifs" ++# 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 ++} - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' - for arg in $args; do -+ # 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/^ //"` +- IFS="$save_ifs" - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly @@ -33923,67 +35365,236 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - done - IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "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 ++} + - # Add the arguments to base_compile. - if test -z "$base_compile"; then - base_compile="$lastarg" - else -+ # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" -- fi +- base_compile="$base_compile $lastarg" ++ ++# 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_quote_for_eval "$arg" ++ CC_quoted="$CC_quoted $func_quote_for_eval_result" ++ done ++ 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 "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; ++ # 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_quote_for_eval "$arg" ++ CC_quoted="$CC_quoted $func_quote_for_eval_result" ++ done ++ case "$@ " in ++ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ++ # 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 - continue -- ;; -- esac -+ continue -+ ;; + ;; + esac ++ fi ++} - case $user_target in - next) - # The next one is the -o target name - user_target=yes - continue -- ;; -- yes) -- # We got the output file -- user_target=set -- libobj="$arg" -- continue -+ * ) -+ # Accept the current argument as the source file. -+ # The previous "srcfile" becomes the current argument. -+ # -+ lastarg="$srcfile" -+ srcfile="$arg" -+ ;; -+ esac # case $arg - ;; -- esac -- -- # Accept the current argument as the source file. -- lastarg="$srcfile" -- srcfile="$arg" -+ esac # case $arg_mode ++ ++ ++# 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 ++ ++ if test "$build_old_libs" = yes; then ++ write_oldobj=\'${3}\' ++ else ++ write_oldobj=none ++ fi ++ ++ $opt_dry_run || { ++ cat >${write_libobj}T <\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" +- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") +- 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_quote_for_eval "$arg" ++ lastarg="$lastarg $func_quote_for_eval_result" ++ done ++ IFS="$save_ifs" ++ func_stripname ' ' '' "$lastarg" ++ lastarg=$func_stripname_result ++ ++ # Add the arguments to base_compile. ++ base_compile="$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 ++ esac # case $arg_mode - # Add the previous argument to base_compile. - if test -z "$base_compile"; then @@ -33992,61 +35603,68 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - base_compile="$base_compile $lastarg" - fi - done -+ base_compile="$base_compile $lastarg" ++ # Aesthetically quote the previous argument. ++ func_quote_for_eval "$lastarg" ++ base_compile="$base_compile $func_quote_for_eval_result" + done # for arg - case $user_target in - set) + case $arg_mode in + arg) -+ $echo "$modename: you must specify an argument for -Xcompile" -+ exit $EXIT_FAILURE ++ 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) -+ $echo "$modename: you must specify a target with \`-o'" 1>&2 -+ exit $EXIT_FAILURE ++ 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. -+ [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ++ 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]' -+ xform='[cCFSifmso]' case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; -@@ -472,12 +786,15 @@ - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; -+ *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; +- *.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 ;; -+ *.[fF][09]?) xform=[fF][09]. ;; - *.for) xform=for ;; - *.java) xform=java ;; -+ *.obj) xform=obj ;; -+ *.sx) xform=sx ;; +- *.for) xform=for ;; +- *.java) xform=java ;; ++ *.[cCFSifmso] | \ ++ *.ada | *.adb | *.ads | *.asm | \ ++ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ ++ *.[fF][09]? | *.for | *.java | *.obj | *.sx) ++ func_xform "$libobj" ++ libobj=$func_xform_result ++ ;; esac - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` -@@ -486,54 +803,39 @@ - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; +- 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 +- $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit 1 -+ exit $EXIT_FAILURE ++ func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac @@ -34094,7 +35712,15 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + + 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 + ;; @@ -34112,36 +35738,43 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - fi + done -+ qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` -+ case $qlibobj in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ qlibobj="\"$qlibobj\"" ;; -+ esac -+ test "X$libobj" != "X$qlibobj" \ -+ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ -+ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then -@@ -546,7 +848,7 @@ - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 +- 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 -+ exit $EXIT_FAILURE - fi +- fi ++ test -z "$base_compile" && \ ++ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. -@@ -557,7 +859,7 @@ + if test "$build_old_libs" = yes; then +@@ -556,16 +1274,13 @@ + removelist="$lobj $libobj ${libobj}T" fi - $run $rm $removelist +- $run $rm $removelist - trap "$run $rm $removelist; exit 1" 1 2 15 -+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - +- # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in -@@ -565,7 +867,7 @@ +- cygwin* | mingw* | pw32* | os2*) ++ cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac @@ -34150,54 +35783,76 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh # non-PIC code in shared libraries is not supported pic_mode=default fi -@@ -576,7 +878,7 @@ - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} +@@ -573,10 +1288,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 "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" +- removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit 1" 1 2 15 -+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no -@@ -586,13 +888,13 @@ +@@ -586,13 +1299,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 -+ until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" +- $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 "\ ++ $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` -@@ -604,14 +906,19 @@ +@@ -603,29 +1316,22 @@ + avoid parallel builds (make -j) in this platform, or get a better compiler." - $run $rm $removelist +- $run $rm $removelist - exit 1 ++ $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE fi - echo $srcfile > "$lockfile" -+ $echo "$srcfile" > "$lockfile" ++ removelist="$removelist $output_obj" ++ $ECHO "$srcfile" > "$lockfile" fi ++ $opt_dry_run || $RM $removelist ++ removelist="$removelist $lockfile" ++ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 ++ if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi -+ qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` -+ case $qsrcfile in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ qsrcfile="\"$qsrcfile\"" ;; -+ esac - - $run $rm "$libobj" "${libobj}T" +- +- $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 </dev/null`" != x"$srcfile"; then - echo "\ + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then -+ $echo "\ ++ $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` -@@ -679,11 +986,11 @@ +@@ -678,45 +1371,29 @@ + avoid parallel builds (make -j) in this platform, or get a better compiler." - $run $rm $removelist +- $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 - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else -@@ -700,7 +1007,9 @@ - EOF ++ 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 <> ${libobj}T </dev/null`" != x"$srcfile"; then - echo "\ + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then -+ $echo "\ ++ $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` -@@ -749,11 +1058,11 @@ +@@ -748,57 +1420,2624 @@ + avoid parallel builds (make -j) in this platform, or get a better compiler." - $run $rm $removelist +- $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 - $show "$mv $output_obj $obj" - if $run $mv $output_obj $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 ++ } ++ ++ exit $EXIT_SUCCESS ++} ++ ++$opt_help || { ++test "$mode" = compile && func_mode_compile ${1+"$@"} ++} ++ ++func_mode_help () ++{ ++ # We need to display help for each of the modes. ++ case $mode in ++ "") ++ # Generic help is extracted from the usage comments ++ # at the start of this file. ++ func_help ++ ;; ++ ++ clean) ++ $ECHO \ ++"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... ++ ++Remove files from the build 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, object or program, all the files associated ++with it are deleted. Otherwise, only FILE itself is deleted using RM." ++ ;; ++ ++ compile) ++ $ECHO \ ++"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE ++ ++Compile a source file into a libtool library object. ++ ++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 building PIC objects only ++ -prefer-non-pic try to building 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 ++ ++COMPILE-COMMAND is a command to be used in creating a \`standard' object file ++from the given SOURCEFILE. ++ ++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'." ++ ;; ++ ++ execute) ++ $ECHO \ ++"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... ++ ++Automatically set library path, then run a program. ++ ++This mode accepts the following additional options: ++ ++ -dlopen FILE add the directory containing FILE to the library path ++ ++This mode sets the library path environment variable according to \`-dlopen' ++flags. ++ ++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." ++ ;; ++ ++ finish) ++ $ECHO \ ++"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... ++ ++Complete the installation of libtool libraries. ++ ++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." ++ ;; ++ ++ install) ++ $ECHO \ ++"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... ++ ++Install executables or libraries. ++ ++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: ++ ++ -inst-prefix 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)." ++ ;; ++ ++ 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. ++ ++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: ++ ++ -all-static do not do any dynamic linking at all ++ -avoid-version do not add a version suffix if possible ++ -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 ++ ++All other options (arguments beginning with \`-') are ignored. ++ ++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. ++ ++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." ++ ;; ++ ++ uninstall) ++ $ECHO \ ++"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... ++ ++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 \`$mode'" ++ ;; ++ esac ++ ++ $ECHO ++ $ECHO "Try \`$progname --help' for more information about other modes." ++ ++ exit $? ++} ++ ++ # Now that we've collected a possible --mode arg, show help if necessary ++ $opt_help && func_mode_help ++ ++ ++# func_mode_execute arg... ++func_mode_execute () ++{ ++ $opt_debug ++ # The first argument is the command name. ++ cmd="$nonopt" ++ test -z "$cmd" && \ ++ func_fatal_help "you must specify a COMMAND" ++ ++ # Handle -dlopen flags immediately. ++ for file in $execute_dlfiles; do ++ test -f "$file" \ ++ || func_fatal_help "\`$file' is not a file" ++ ++ dir= ++ case $file in ++ *.la) ++ # 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" ++ ++ # 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" ++ ++ if test -f "$dir/$objdir/$dlname"; then ++ dir="$dir/$objdir" else -@@ -787,7 +1096,7 @@ - $run $rm "$lockfile" - fi +- 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_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 -- exit 0 -+ exit $EXIT_SUCCESS - ;; +- # 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 <> ${libobj}T </dev/null; 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" ++ install_prog="$install_prog$func_quote_for_eval_result" ++ ++ # We need to accept at least all the BSD install flags. ++ dest= ++ files= ++ opts= ++ prev= ++ install_type= ++ isdir=no ++ stripme= ++ for arg ++ do ++ if test -n "$dest"; then ++ files="$files $dest" ++ dest=$arg ++ continue ++ fi ++ ++ case $arg in ++ -d) isdir=yes ;; ++ -f) ++ case " $install_prog " in ++ *[\\\ /]cp\ *) ;; ++ *) prev=$arg ;; ++ esac ++ ;; ++ -g | -m | -o) ++ prev=$arg ++ ;; ++ -s) ++ stripme=" -s" ++ continue ++ ;; ++ -*) ++ ;; ++ *) ++ # If the previous option needed an argument, then skip it. ++ if test -n "$prev"; then ++ prev= ++ else ++ dest=$arg ++ continue ++ fi ++ ;; ++ esac ++ ++ # Aesthetically quote the argument. ++ func_quote_for_eval "$arg" ++ install_prog="$install_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 -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 ++ ++ # 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" ++ 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 ++ ++ # 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. ++ staticlibs="$staticlibs $file" ++ ;; ++ ++ *.la) ++ # 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 "*) ;; ++ *) current_libdirs="$current_libdirs $libdir" ;; ++ esac ++ else ++ # Note the libdir as a future libdir. ++ case "$future_libdirs " in ++ *" $libdir "*) ;; ++ *) future_libdirs="$future_libdirs $libdir" ;; ++ esac ++ fi ++ ++ func_dirname "$file" "/" "" ++ dir="$func_dirname_result" ++ dir="$dir$objdir" ++ ++ if test -n "$relink_command"; then ++ # Determine the prefix the user has applied to our future dir. ++ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -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 "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` ++ else ++ relink_command=`$ECHO "X$relink_command" | $Xsed -e "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 ++ ++ # See the names of the shared library. ++ set dummy $library_names; shift ++ if test -n "$1"; then ++ realname="$1" ++ shift ++ ++ srcname="$realname" ++ test -n "$relink_command" && srcname="$realname"T ++ ++ # Install the shared library and build the symlinks. ++ func_show_eval "$install_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 ++ ++ 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 ++ ++ # 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" && staticlibs="$staticlibs $dir/$old_library" ++ ;; ++ ++ *.lo) ++ # Install (i.e. copy) a libtool object. ++ ++ # 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 ++ ++ # 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 ++ ;; ++ ++ *) ++ # 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 "X$lib" | $Xsed -e '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 "X$relink_command" | $Xsed -e '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 "X$file$stripped_ext" | $Xsed -e "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 ++ ;; ++ esac ++ done ++ ++ for file in $staticlibs; do ++ func_basename "$file" ++ name="$func_basename_result" ++ ++ # Set up the ranlib parameters. ++ oldlib="$destdir/$name" ++ ++ func_show_eval "$install_prog \$file \$oldlib" 'exit $?' ++ ++ if test -n "$stripme" && test -n "$old_striplib"; then ++ func_show_eval "$old_striplib $oldlib" 'exit $?' ++ fi ++ ++ # Do each command in the postinstall commands. ++ func_execute_cmds "$old_postinstall_cmds" 'exit $?' ++ done ++ ++ 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 ++} ++ ++test "$mode" = install && func_mode_install ${1+"$@"} ++ ++ ++# 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= ++ ++ 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 ++ ++ 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" ++ ++ func_show_eval "$RM $nlist ${nlist}S ${nlist}T" ++ ++ # Parse the name list into a source file. ++ func_verbose "creating $output_objdir/$my_dlsyms" ++ ++ $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 */ ++ ++#ifdef __cplusplus ++extern \"C\" { ++#endif ++ ++/* External symbol declarations for the compiler. */\ ++" ++ ++ if test "$dlself" = yes; then ++ func_verbose "generating symbol list for \`$output'" ++ ++ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" ++ ++ # Add our own program objects to the symbol list. ++ progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` ++ for progfile in $progfiles; do ++ func_verbose "extracting global C symbols from \`$progfile'" ++ $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" ++ done ++ ++ 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 -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 ++ ++ for dlprefile in $dlprefiles; do ++ func_verbose "extracting global C symbols from \`$dlprefile'" ++ func_basename "$dlprefile" ++ name="$func_basename_result" ++ $opt_dry_run || { ++ eval '$ECHO ": $name " >> "$nlist"' ++ eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" ++ } ++ done ++ ++ $opt_dry_run || { ++ # Make sure we have at least an empty file. ++ test -f "$nlist" || : > "$nlist" ++ ++ if test -n "$exclude_expsyms"; then ++ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T ++ $MV "$nlist"T "$nlist" ++ fi ++ ++ # Try sorting and uniquifying the output. ++ if $GREP -v "^: " < "$nlist" | ++ if sort -k 3 /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 -f "$nlist"S; then ++ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' ++ else ++ $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" ++ fi ++ ++ $ECHO >> "$output_objdir/$my_dlsyms" "\ ++ ++/* The mapping between symbol names and symbols. */ ++typedef struct { ++ const char *name; ++ void *address; ++} lt_dlsymlist; ++" ++ case $host in ++ *cygwin* | *mingw* | *cegcc* ) ++ $ECHO >> "$output_objdir/$my_dlsyms" "\ ++/* DATA imports from DLLs on WIN32 con't be const, because ++ runtime relocations are performed -- see ld's documentation ++ on pseudo-relocs. */" ++ lt_dlsym_const= ;; ++ *osf5*) ++ echo >> "$output_objdir/$my_dlsyms" "\ ++/* This system does not cope well with relocations in const data */" ++ lt_dlsym_const= ;; ++ *) ++ lt_dlsym_const=const ;; ++ esac ++ ++ $ECHO >> "$output_objdir/$my_dlsyms" "\ ++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 }," ++ ++ 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 ++ ++#ifdef __cplusplus ++} ++#endif\ ++" ++ } # !$opt_dry_run ++ ++ 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) ;; ++ *) symtab_cflags="$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 $?' ++ ++ # Clean up the generated files. ++ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' ++ ++ # 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 "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` ++ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` ++ else ++ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ++ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ++ fi ++ ;; ++ *) ++ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ++ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "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. ++ ++ # Nullify the symbol file. ++ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` ++ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` ++ fi ++} ++ ++# 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. ++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 ++ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | ++ $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then ++ win32_nmres=`eval $NM -f posix -A $1 | ++ $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_extract_an_archive dir oldlib ++func_extract_an_archive () ++{ ++ $opt_debug ++ f_ex_an_ar_dir="$1"; shift ++ f_ex_an_ar_oldlib="$1" ++ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' ++ 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 ++} ++ ++ ++# 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="" ++ ++ 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" ++ ++ func_mkdir_p "$my_xdir" ++ ++ 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 | $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 | $NL2SP` ++ done ++ ++ func_extract_archives_result="$my_oldobjs" ++} ++ ++ ++ ++# func_emit_wrapper_part1 [arg=no] ++# ++# Emit the first part of a libtool wrapper script on stdout. ++# For more information, see the description associated with ++# func_emit_wrapper(), below. ++func_emit_wrapper_part1 () ++{ ++ func_emit_wrapper_part1_arg1=no ++ if test -n "$1" ; then ++ func_emit_wrapper_part1_arg1=$1 ++ fi ++ ++ $ECHO "\ ++#! $SHELL ++ ++# $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. ++ ++# 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='$sed_quote_subst' ++ ++# 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 ++ ++# 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\" ++ ++# 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 ++ ECHO=\"$qecho\" ++ file=\"\$0\" ++ # Make sure echo works. ++ if test \"X\$1\" = X--no-reexec; then ++ # Discard the --no-reexec flag, and continue. ++ shift ++ elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then ++ # Yippee, \$ECHO works! ++ : ++ else ++ # Restart under the correct shell, and then maybe \$ECHO will work. ++ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} ++ fi ++ fi\ ++" ++ $ECHO "\ ++ ++ # Find the directory that this script lives in. ++ thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` ++ test \"x\$thisdir\" = \"x\$file\" && thisdir=. ++ ++ # 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 \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` ++ ++ # 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 ++ ++ file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` ++ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` ++ done ++" ++} ++# end: func_emit_wrapper_part1 ++ ++# func_emit_wrapper_part2 [arg=no] ++# ++# Emit the second part of a libtool wrapper script on stdout. ++# For more information, see the description associated with ++# func_emit_wrapper(), below. ++func_emit_wrapper_part2 () ++{ ++ func_emit_wrapper_part2_arg1=no ++ if test -n "$1" ; then ++ func_emit_wrapper_part2_arg1=$1 ++ fi ++ ++ $ECHO "\ ++ ++ # Usually 'no', except on cygwin/mingw when embedded into ++ # the cwrapper. ++ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_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 \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; ++ $objdir ) thisdir=. ;; ++ esac ++ fi ++ ++ # Try to get the absolute directory name. ++ absdir=\`cd \"\$thisdir\" && pwd\` ++ test -n \"\$absdir\" && thisdir=\"\$absdir\" ++" ++ ++ if test "$fast_install" = yes; then ++ $ECHO "\ ++ program=lt-'$outputname'$exeext ++ progdir=\"\$thisdir/$objdir\" ++ ++ if test ! -f \"\$progdir/\$program\" || ++ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ ++ test \"X\$file\" != \"X\$progdir/\$program\"; }; then ++ ++ file=\"\$\$-\$program\" ++ ++ if test ! -d \"\$progdir\"; then ++ $MKDIR \"\$progdir\" ++ else ++ $RM \"\$progdir/\$file\" ++ fi" ++ ++ $ECHO "\ ++ ++ # 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 ++ ++ $ECHO "\ ++ ++ if test -f \"\$progdir/\$program\"; then" ++ ++ # 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\" ++ ++ # 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 \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` ++ ++ export $shlibpath_var ++" ++ fi ++ ++ # fixup the dll searchpath if we need to. ++ if test -n "$dllsearchpath"; then ++ $ECHO "\ ++ # Add the dll search path components to the executable PATH ++ PATH=$dllsearchpath:\$PATH ++" ++ fi ++ ++ $ECHO "\ ++ if test \"\$libtool_execute_magic\" != \"$magic\"; then ++ # Run the actual program with our arguments. ++" ++ case $host in ++ # Backslashes separate directories on plain windows ++ *-*-mingw | *-*-os2* | *-cegcc*) ++ $ECHO "\ ++ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} ++" ++ ;; ++ ++ *) ++ $ECHO "\ ++ exec \"\$progdir/\$program\" \${1+\"\$@\"} ++" ++ ;; ++ esac ++ $ECHO "\ ++ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 ++ exit 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\ ++" ++} ++# end: func_emit_wrapper_part2 ++ ++ ++# 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=no ++ if test -n "$1" ; then ++ func_emit_wrapper_arg1=$1 ++ fi ++ ++ # split this up so that func_emit_cwrapperexe_src ++ # can call each part independently. ++ func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" ++ func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" ++} ++ ++ ++# func_to_host_path arg ++# ++# Convert paths to host format when used with build tools. ++# Intended for use with "native" mingw (where libtool itself ++# is running under the msys shell), or in the following cross- ++# build environments: ++# $build $host ++# mingw (msys) mingw [e.g. native] ++# cygwin mingw ++# *nix + wine mingw ++# where wine is equipped with the `winepath' executable. ++# In the native mingw case, the (msys) shell automatically ++# converts paths for any non-msys applications it launches, ++# but that facility isn't available from inside the cwrapper. ++# Similar accommodations are necessary for $host mingw and ++# $build cygwin. Calling this function does no harm for other ++# $host/$build combinations not listed above. ++# ++# ARG is the path (on $build) that should be converted to ++# the proper representation for $host. The result is stored ++# in $func_to_host_path_result. ++func_to_host_path () ++{ ++ func_to_host_path_result="$1" ++ if test -n "$1" ; then + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) ++ *mingw* ) ++ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' ++ case $build in ++ *mingw* ) # actually, msys ++ # awkward: cmd appends spaces to result ++ lt_sed_strip_trailing_spaces="s/[ ]*\$//" ++ func_to_host_path_tmp1=`( cmd //c echo "$1" |\ ++ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` ++ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ ++ $SED -e "$lt_sed_naive_backslashify"` ++ ;; ++ *cygwin* ) ++ func_to_host_path_tmp1=`cygpath -w "$1"` ++ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ ++ $SED -e "$lt_sed_naive_backslashify"` ++ ;; ++ * ) ++ # 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_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` ++ if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then ++ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ ++ $SED -e "$lt_sed_naive_backslashify"` ++ else ++ # Allow warning below. ++ func_to_host_path_result="" ++ fi ++ ;; ++ esac ++ if test -z "$func_to_host_path_result" ; then ++ func_error "Could not determine host path corresponding to" ++ func_error " '$1'" ++ func_error "Continuing, but uninstalled executables may not work." ++ # Fallback: ++ func_to_host_path_result="$1" ++ fi ++ ;; ++ esac ++ fi ++} ++# end: func_to_host_path ++ ++# func_to_host_pathlist arg ++# ++# Convert pathlists to host format when used with build tools. ++# See func_to_host_path(), above. This function supports the ++# following $build/$host combinations (but does no harm for ++# combinations not listed here): ++# $build $host ++# mingw (msys) mingw [e.g. native] ++# cygwin mingw ++# *nix + wine mingw ++# ++# 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. ++# ++# ARG is a pathlist (on $build) that should be converted to ++# the proper representation on $host. The result is stored ++# in $func_to_host_pathlist_result. ++func_to_host_pathlist () ++{ ++ func_to_host_pathlist_result="$1" ++ if test -n "$1" ; then ++ case $host in ++ *mingw* ) ++ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' ++ # 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_to_host_pathlist_tmp2="$1" ++ # Once set for this call, this variable should not be ++ # reassigned. It is used in tha fallback case. ++ func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ ++ $SED -e 's|^:*||' -e 's|:*$||'` ++ case $build in ++ *mingw* ) # Actually, msys. ++ # Awkward: cmd appends spaces to result. ++ lt_sed_strip_trailing_spaces="s/[ ]*\$//" ++ func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ ++ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` ++ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ ++ $SED -e "$lt_sed_naive_backslashify"` ++ ;; ++ *cygwin* ) ++ func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` ++ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ ++ $SED -e "$lt_sed_naive_backslashify"` ++ ;; ++ * ) ++ # unfortunately, winepath doesn't convert pathlists ++ func_to_host_pathlist_result="" ++ func_to_host_pathlist_oldIFS=$IFS ++ IFS=: ++ for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do ++ IFS=$func_to_host_pathlist_oldIFS ++ if test -n "$func_to_host_pathlist_f" ; then ++ func_to_host_path "$func_to_host_pathlist_f" ++ if test -n "$func_to_host_path_result" ; then ++ if test -z "$func_to_host_pathlist_result" ; then ++ func_to_host_pathlist_result="$func_to_host_path_result" ++ else ++ func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" ++ fi ++ fi ++ fi ++ IFS=: ++ done ++ IFS=$func_to_host_pathlist_oldIFS ++ ;; ++ esac ++ if test -z "$func_to_host_pathlist_result" ; then ++ func_error "Could not determine the host path(s) corresponding to" ++ func_error " '$1'" ++ func_error "Continuing, but uninstalled executables may not work." ++ # Fallback. This may break if $1 contains DOS-style drive ++ # specifications. The fix is not to complicate the expression ++ # below, but for the user to provide a working wine installation ++ # with winepath so that path translation in the cross-to-mingw ++ # case works properly. ++ lt_replace_pathsep_nix_to_dos="s|:|;|g" ++ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ ++ $SED -e "$lt_replace_pathsep_nix_to_dos"` ++ fi ++ # Now, add the leading and trailing path separators back ++ case "$1" in ++ :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ++ ;; ++ esac ++ case "$1" in ++ *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ++ ;; ++ esac ++ ;; ++ esac ++ fi ++} ++# end: func_to_host_pathlist ++ ++# 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 < ++#include ++#ifdef _MSC_VER ++# include ++# include ++# include ++# define setmode _setmode ++#else ++# include ++# include ++# ifdef __CYGWIN__ ++# include ++# define HAVE_SETENV ++# ifdef __STRICT_ANSI__ ++char *realpath (const char *, char *); ++int putenv (char *); ++int setenv (const char *, const char *, int); ++# endif ++# endif ++#endif ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#if defined(PATH_MAX) ++# define LT_PATHMAX PATH_MAX ++#elif defined(MAXPATHLEN) ++# define LT_PATHMAX MAXPATHLEN ++#else ++# define LT_PATHMAX 1024 ++#endif ++ ++#ifndef S_IXOTH ++# define S_IXOTH 0 ++#endif ++#ifndef S_IXGRP ++# define S_IXGRP 0 ++#endif ++ ++#ifdef _MSC_VER ++# define S_IXUSR _S_IEXEC ++# define stat _stat ++# ifndef _INTPTR_T_DEFINED ++# define intptr_t int ++# endif ++#endif ++ ++#ifndef DIR_SEPARATOR ++# define DIR_SEPARATOR '/' ++# define PATH_SEPARATOR ':' ++#endif ++ ++#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 ++ ++#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 */ ++ ++#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 */ ++ ++#ifdef __CYGWIN__ ++# define FOPEN_WB "wb" ++#endif ++ ++#ifndef FOPEN_WB ++# define FOPEN_WB "w" ++#endif ++#ifndef _O_BINARY ++# define _O_BINARY 0 ++#endif ++ ++#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) ++#define XFREE(stale) do { \ ++ if (stale) { free ((void *) stale); stale = 0; } \ ++} while (0) ++ ++#undef LTWRAPPER_DEBUGPRINTF ++#if defined DEBUGWRAPPER ++# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args ++static void ++ltwrapper_debugprintf (const char *fmt, ...) ++{ ++ va_list args; ++ va_start (args, fmt); ++ (void) vfprintf (stderr, fmt, args); ++ va_end (args); ++} ++#else ++# define LTWRAPPER_DEBUGPRINTF(args) ++#endif ++ ++const char *program_name = NULL; ++ ++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_fatal (const char *message, ...); ++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_opt_process_env_set (const char *arg); ++void lt_opt_process_env_prepend (const char *arg); ++void lt_opt_process_env_append (const char *arg); ++int lt_split_name_value (const char *arg, char** name, char** value); ++void lt_update_exe_path (const char *name, const char *value); ++void lt_update_lib_path (const char *name, const char *value); ++ ++static const char *script_text_part1 = ++EOF ++ ++ func_emit_wrapper_part1 yes | ++ $SED -e 's/\([\\"]\)/\\\1/g' \ ++ -e 's/^/ "/' -e 's/$/\\n"/' ++ echo ";" ++ cat <"))); ++ for (i = 0; i < newargc; i++) ++ { ++ LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); ++ } ++ ++EOF ++ ++ case $host_os in ++ mingw*) ++ cat <<"EOF" ++ /* execv doesn't actually work on mingw as expected on unix */ ++ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); ++ if (rval == -1) ++ { ++ /* failed to start process */ ++ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, 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" ++} ++ ++void * ++xmalloc (size_t num) ++{ ++ void *p = (void *) malloc (num); ++ if (!p) ++ lt_fatal ("Memory exhausted"); ++ ++ return p; ++} ++ ++char * ++xstrdup (const char *string) ++{ ++ return string ? strcpy ((char *) xmalloc (strlen (string) + 1), ++ string) : NULL; ++} ++ ++const char * ++base_name (const char *name) ++{ ++ const char *base; ++ ++#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 ++ ++ for (base = name; *name; name++) ++ if (IS_DIR_SEPARATOR (*name)) ++ base = name + 1; ++ return base; ++} ++ ++int ++check_executable (const char *path) ++{ ++ struct stat st; ++ ++ LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", ++ path ? (*path ? path : "EMPTY!") : "NULL!")); ++ if ((!path) || (!*path)) ++ return 0; ++ ++ if ((stat (path, &st) >= 0) ++ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) ++ return 1; ++ else ++ return 0; ++} ++ ++int ++make_executable (const char *path) ++{ ++ int rval = 0; ++ struct stat st; ++ ++ LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", ++ path ? (*path ? path : "EMPTY!") : "NULL!")); ++ if ((!path) || (!*path)) ++ return 0; ++ ++ if (stat (path, &st) >= 0) ++ { ++ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); ++ } ++ return rval; ++} ++ ++/* 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; ++ ++ LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", ++ wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); ++ ++ 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 ("getcwd failed"); ++ 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 ("getcwd failed"); ++ 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) ++ { ++ LTWRAPPER_DEBUGPRINTF (("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 ++ { ++ char *errstr = strerror (errno); ++ lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); ++ } ++ } ++ XFREE (tmp_pathspec); ++ ++ if (!has_symlinks) ++ { ++ return xstrdup (pathspec); ++ } ++ ++ tmp_pathspec = realpath (pathspec, buf); ++ if (tmp_pathspec == 0) ++ { ++ lt_fatal ("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; ++} ++ ++static void ++lt_error_core (int exit_status, const char *mode, ++ const char *message, va_list ap) ++{ ++ fprintf (stderr, "%s: %s: ", program_name, mode); ++ vfprintf (stderr, message, ap); ++ fprintf (stderr, ".\n"); ++ ++ if (exit_status >= 0) ++ exit (exit_status); ++} ++ ++void ++lt_fatal (const char *message, ...) ++{ ++ va_list ap; ++ va_start (ap, message); ++ lt_error_core (EXIT_FAILURE, "FATAL", message, ap); ++ va_end (ap); ++} ++ ++void ++lt_setenv (const char *name, const char *value) ++{ ++ LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", ++ (name ? name : ""), ++ (value ? 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; ++} ++ ++int ++lt_split_name_value (const char *arg, char** name, char** value) ++{ ++ const char *p; ++ int len; ++ if (!arg || !*arg) ++ return 1; ++ ++ p = strchr (arg, (int)'='); ++ ++ if (!p) ++ return 1; ++ ++ *value = xstrdup (++p); ++ ++ len = strlen (arg) - strlen (*value); ++ *name = XMALLOC (char, len); ++ strncpy (*name, arg, len-1); ++ (*name)[len - 1] = '\0'; ++ ++ return 0; ++} ++ ++void ++lt_opt_process_env_set (const char *arg) ++{ ++ char *name = NULL; ++ char *value = NULL; ++ ++ if (lt_split_name_value (arg, &name, &value) != 0) ++ { ++ XFREE (name); ++ XFREE (value); ++ lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); ++ } ++ ++ lt_setenv (name, value); ++ XFREE (name); ++ XFREE (value); ++} ++ ++void ++lt_opt_process_env_prepend (const char *arg) ++{ ++ char *name = NULL; ++ char *value = NULL; ++ char *new_value = NULL; ++ ++ if (lt_split_name_value (arg, &name, &value) != 0) ++ { ++ XFREE (name); ++ XFREE (value); ++ lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); ++ } ++ ++ new_value = lt_extend_str (getenv (name), value, 0); ++ lt_setenv (name, new_value); ++ XFREE (new_value); ++ XFREE (name); ++ XFREE (value); ++} ++ ++void ++lt_opt_process_env_append (const char *arg) ++{ ++ char *name = NULL; ++ char *value = NULL; ++ char *new_value = NULL; ++ ++ if (lt_split_name_value (arg, &name, &value) != 0) ++ { ++ XFREE (name); ++ XFREE (value); ++ lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); ++ } ++ ++ new_value = lt_extend_str (getenv (name), value, 1); ++ lt_setenv (name, new_value); ++ XFREE (new_value); ++ XFREE (name); ++ XFREE (value); ++} ++ ++void ++lt_update_exe_path (const char *name, const char *value) ++{ ++ LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", ++ (name ? name : ""), ++ (value ? 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) ++{ ++ LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", ++ (name ? name : ""), ++ (value ? 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 ++} ++# end: func_emit_cwrapperexe_src ++ ++# func_mode_link arg... ++func_mode_link () ++{ ++ $opt_debug ++ case $host in ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra +- # flag for every libtool invokation. ++ # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying +@@ -812,10 +4051,10 @@ + allow_undefined=yes + ;; + esac +- libtool_args="$nonopt" +- base_compile="$nonopt" +- compile_command="$nonopt" +- finalize_command="$nonopt" ++ libtool_args=$nonopt ++ base_compile="$nonopt $@" ++ compile_command=$nonopt ++ finalize_command=$nonopt + + compile_rpath= + finalize_rpath= +@@ -829,6 +4068,8 @@ + linker_flags= + dllsearchpath= + lib_search_path=`pwd` ++ inst_prefix_dir= ++ new_inherited_linker_flags= + + avoid_version=no + dlfiles= +@@ -844,6 +4085,7 @@ + no_install=no + objs= + non_pic_objects= ++ precious_files_regex= + prefer_static_libs=no + preload=no + prev= +@@ -855,27 +4097,47 @@ + temp_rpath= + thread_safe=no + vinfo= ++ vinfo_number=no ++ weak_libs= ++ single_module="${wl}-single_module" ++ func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in +- -all-static | -static) +- if test "X$arg" = "X-all-static"; then ++ -shared) ++ test "$build_libtool_libs" != yes && \ ++ func_fatal_configuration "can not build a shared library" ++ build_old_libs=no ++ break ++ ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 +- $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 ++ func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static @@ -34412,7 +38719,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh break ;; esac -@@ -885,9 +1211,8 @@ +@@ -885,24 +4147,19 @@ test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. @@ -34421,42 +38728,83 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh arg="$1" - base_compile="$base_compile $arg" shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -@@ -951,7 +1276,7 @@ +- case $arg in +- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") +- qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test +- ;; +- *) qarg=$arg ;; +- esac +- libtool_args="$libtool_args $qarg" ++ func_quote_for_eval "$arg" ++ qarg=$func_quote_for_eval_unquoted_result ++ func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) +- compile_command="$compile_command @OUTPUT@" +- finalize_command="$finalize_command @OUTPUT@" ++ func_append compile_command " @OUTPUT@" ++ func_append finalize_command " @OUTPUT@" + ;; + esac + +@@ -910,8 +4167,8 @@ + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. +- compile_command="$compile_command @SYMFILE@" +- finalize_command="$finalize_command @SYMFILE@" ++ func_append compile_command " @SYMFILE@" ++ func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in +@@ -949,10 +4206,8 @@ + ;; + expsyms) export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" +- if test ! -f "$arg"; then +- $echo "$modename: symbol file \`$arg' does not exist" - exit 1 -+ exit $EXIT_FAILURE - fi +- fi ++ test -f "$arg" \ ++ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue -@@ -961,6 +1286,16 @@ + ;; +@@ -961,115 +4216,127 @@ prev= continue ;; -+ inst_prefix) -+ inst_prefix_dir="$arg" -+ prev= -+ continue -+ ;; -+ precious_regex) -+ precious_files_regex="$arg" +- release) +- release="-$arg" ++ framework) ++ case $host in ++ *-*-darwin*) ++ case "$deplibs " in ++ *" $qarg.ltframework "*) ;; ++ *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ++ ;; ++ esac ++ ;; ++ esac + prev= + continue + ;; - release) - release="-$arg" ++ inst_prefix) ++ inst_prefix_dir="$arg" prev= -@@ -968,108 +1303,113 @@ + continue ;; objectlist) if test -f "$arg"; then - save_arg=$arg + save_arg=$arg moreargs= - for fil in `cat $save_arg` +- for fil in `cat $save_arg` ++ for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" - arg=$fil @@ -34468,22 +38816,16 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= -+ if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -+ pic_object= -+ non_pic_object= - +- - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac -+ # Read the .lo file -+ # If there is no directory component, then add one. -+ case $arg in -+ */* | *\\*) . $arg ;; -+ *) . ./$arg ;; -+ esac ++ if func_lalib_unsafe_p "$arg"; then ++ pic_object= ++ non_pic_object= - if test -z "$pic_object" || \ - test -z "$non_pic_object" || @@ -34492,13 +38834,8 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit 1 - fi -+ if test -z "$pic_object" || \ -+ test -z "$non_pic_object" || -+ test "$pic_object" = none && \ -+ test "$non_pic_object" = none; then -+ $echo "$modename: cannot find name of object for \`$arg'" 1>&2 -+ exit $EXIT_FAILURE -+ fi ++ # Read the .lo file ++ func_source "$arg" - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` @@ -34507,20 +38844,19 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - else - xdir="$xdir/" - fi -+ # Extract subdirectory from the argument. -+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` -+ if test "X$xdir" = "X$arg"; then -+ xdir= -+ else -+ xdir="$xdir/" ++ if test -z "$pic_object" || ++ test -z "$non_pic_object" || ++ test "$pic_object" = none && ++ test "$non_pic_object" = none; then ++ func_fatal_error "cannot find name of object for \`$arg'" + fi - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" -+ if test "$pic_object" != none; then -+ # Prepend the subdirectory the object is found in. -+ pic_object="$xdir$pic_object" ++ # Extract subdirectory from the argument. ++ func_dirname "$arg" "/" "" ++ xdir="$func_dirname_result" - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then @@ -34532,6 +38868,16 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - prev=dlprefiles - fi - fi ++ if test "$pic_object" != none; then ++ # Prepend the subdirectory the object is found in. ++ pic_object="$xdir$pic_object" + +- # CHECK ME: I think I busted this. -Ossama +- if test "$prev" = dlprefiles; then +- # Preload the old-style object. +- dlprefiles="$dlprefiles $pic_object" +- prev= +- fi + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" @@ -34543,12 +38889,10 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + fi + fi -- # CHECK ME: I think I busted this. -Ossama -- if test "$prev" = dlprefiles; then -- # Preload the old-style object. -- dlprefiles="$dlprefiles $pic_object" -- prev= -- fi +- # A PIC object. +- libobjs="$libobjs $pic_object" +- arg="$pic_object" +- fi + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. @@ -34556,23 +38900,14 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + prev= + fi -- # A PIC object. -- libobjs="$libobjs $pic_object" -- arg="$pic_object" -- fi -+ # A PIC object. -+ libobjs="$libobjs $pic_object" -+ arg="$pic_object" -+ fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" -+ # Non-PIC object. -+ if test "$non_pic_object" != none; then -+ # Prepend the subdirectory the object is found in. -+ non_pic_object="$xdir$non_pic_object" ++ # A PIC object. ++ func_append libobjs " $pic_object" ++ arg="$pic_object" ++ fi - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" @@ -34587,8 +38922,20 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - exit 1 - else - # Dry-run case. ++ # Non-PIC object. ++ if test "$non_pic_object" != none; then ++ # Prepend the subdirectory the object is found in. ++ non_pic_object="$xdir$non_pic_object" + +- # Extract subdirectory from the argument. +- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` +- if test "X$xdir" = "X$arg"; then +- xdir= +- else +- xdir="$xdir/" +- fi + # A standard non-PIC object -+ non_pic_objects="$non_pic_objects $non_pic_object" ++ func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi @@ -34596,89 +38943,103 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" -+ non_pic_objects="$non_pic_objects $non_pic_object" ++ func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. -+ if test -z "$run"; then -+ $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 -+ exit $EXIT_FAILURE -+ else -+ # Dry-run case. - -- # Extract subdirectory from the argument. -- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` -- if test "X$xdir" = "X$arg"; then -- xdir= -- else -- xdir="$xdir/" -- fi ++ if $opt_dry_run; then + # Extract subdirectory from the argument. -+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` -+ if test "X$xdir" = "X$arg"; then -+ xdir= -+ else -+ xdir="$xdir/" -+ fi ++ func_dirname "$arg" "/" "" ++ xdir="$func_dirname_result" - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi -+ pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` -+ non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` -+ libobjs="$libobjs $pic_object" -+ non_pic_objects="$non_pic_objects $non_pic_object" ++ func_lo2o "$arg" ++ pic_object=$xdir$objdir/$func_lo2o_result ++ non_pic_object=$xdir$func_lo2o_result ++ func_append libobjs " $pic_object" ++ func_append non_pic_objects " $non_pic_object" ++ else ++ func_fatal_error "\`$arg' is not a valid libtool object" + fi fi done else - $echo "$modename: link input file \`$save_arg' does not exist" +- $echo "$modename: link input file \`$save_arg' does not exist" - exit 1 -+ exit $EXIT_FAILURE ++ func_fatal_error "link input file \`$arg' does not exist" fi - arg=$save_arg + arg=$save_arg ++ prev= ++ continue ++ ;; ++ precious_regex) ++ precious_files_regex="$arg" ++ prev= ++ continue ++ ;; ++ release) ++ release="-$arg" prev= continue ;; -@@ -1079,7 +1419,7 @@ +@@ -1078,8 +4345,7 @@ + case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 +- $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit 1 -+ exit $EXIT_FAILURE ++ func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then -@@ -1111,13 +1451,33 @@ - finalize_command="$finalize_command $wl$qarg" +@@ -1096,19 +4362,37 @@ + prev= continue ;; -+ xcclinker) -+ linker_flags="$linker_flags $qarg" -+ compiler_flags="$compiler_flags $qarg" ++ shrext) ++ shrext_cmds="$arg" + prev= -+ compile_command="$compile_command $qarg" -+ finalize_command="$finalize_command $qarg" + continue + ;; -+ shrext) -+ shrext_cmds="$arg" ++ weak) ++ weak_libs="$weak_libs $arg" + prev= + continue + ;; -+ darwin_framework|darwin_framework_skip) -+ test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" -+ compile_command="$compile_command $arg" -+ finalize_command="$finalize_command $arg" ++ xcclinker) ++ linker_flags="$linker_flags $qarg" ++ compiler_flags="$compiler_flags $qarg" + prev= ++ func_append compile_command " $qarg" ++ func_append finalize_command " $qarg" + continue + ;; - *) - eval "$prev=\"\$arg\"" + xcompiler) + compiler_flags="$compiler_flags $qarg" prev= +- compile_command="$compile_command $qarg" +- finalize_command="$finalize_command $qarg" ++ func_append compile_command " $qarg" ++ func_append finalize_command " $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= +- compile_command="$compile_command $wl$qarg" +- finalize_command="$finalize_command $wl$qarg" ++ func_append compile_command " $wl$qarg" ++ func_append finalize_command " $wl$qarg" + continue + ;; + *) +@@ -1117,23 +4401,23 @@ continue ;; esac @@ -34687,28 +39048,42 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh prevarg="$arg" -@@ -1159,7 +1519,7 @@ + case $arg in + -all-static) + if test -n "$link_static_flag"; then +- compile_command="$compile_command $link_static_flag" +- finalize_command="$finalize_command $link_static_flag" ++ # See comment for -static flag below, for more details. ++ func_append compile_command " $link_static_flag" ++ func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. +- $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 +- continue ++ func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) +@@ -1158,8 +4442,7 @@ + -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" +- $echo "$modename: more than one -exported-symbols argument is not allowed" - exit 1 -+ exit $EXIT_FAILURE ++ func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms -@@ -1169,11 +1529,28 @@ +@@ -1169,29 +4452,45 @@ continue ;; -+ -framework|-arch|-isysroot) -+ case " $CC " in -+ *" ${arg} ${1} "* | *" ${arg} ${1} "*) -+ prev=darwin_framework_skip ;; -+ *) compiler_flags="$compiler_flags $arg" -+ prev=darwin_framework ;; -+ esac -+ compile_command="$compile_command $arg" -+ finalize_command="$finalize_command $arg" ++ -framework) ++ prev=framework + continue + ;; + @@ -34722,42 +39097,67 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh -L[A-Z][A-Z]*:*) case $with_gcc/$host in - no/*-*-irix*) +- compile_command="$compile_command $arg" +- finalize_command="$finalize_command $arg" + no/*-*-irix* | /*-*-irix*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" ++ func_append compile_command " $arg" ++ func_append finalize_command " $arg" ;; -@@ -1190,7 +1567,8 @@ + esac + continue + ;; + + -L*) +- dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` ++ func_stripname '-L' '' "$arg" ++ dir=$func_stripname_result ++ if test -z "$dir"; then ++ if test "$#" -gt 0; then ++ func_fatal_error "require no space between \`-L' and \`$1'" ++ else ++ func_fatal_error "need path for \`-L' option" ++ fi ++ fi + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 +- if test -z "$absdir"; then +- $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - exit 1 -+ absdir="$dir" -+ notinst_path="$notinst_path $dir" - fi +- fi ++ test -z "$absdir" && \ ++ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; -@@ -1204,10 +1582,15 @@ + esac +@@ -1203,11 +4502,18 @@ + ;; esac case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -+ testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ++ ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; ++ ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac ;; esac continue -@@ -1216,25 +1599,104 @@ +@@ -1216,15 +4522,39 @@ -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in - *-*-cygwin* | *-*-pw32* | *-*-beos*) -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; @@ -34772,7 +39172,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework -+ deplibs="$deplibs -framework System" ++ deplibs="$deplibs System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) @@ -34794,22 +39194,29 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh fi deplibs="$deplibs $arg" continue +@@ -1235,6 +4565,33 @@ + continue ;; + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. -+ -model) -+ compile_command="$compile_command $arg" ++ # Darwin uses the -arch flag to determine output architecture. ++ -model|-arch|-isysroot) + compiler_flags="$compiler_flags $arg" -+ finalize_command="$finalize_command $arg" ++ func_append compile_command " $arg" ++ func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + -+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) ++ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + compiler_flags="$compiler_flags $arg" -+ compile_command="$compile_command $arg" -+ finalize_command="$finalize_command $arg" ++ func_append compile_command " $arg" ++ func_append finalize_command " $arg" ++ case "$new_inherited_linker_flags " in ++ *" $arg "*) ;; ++ * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; ++ esac + continue + ;; + @@ -34818,60 +39225,26 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + continue + ;; + - -module) - module=yes - continue - ;; - -+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler -+ # -r[0-9][0-9]* specifies the processor on the SGI compiler -+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler -+ # +DA*, +DD* enable 64-bit mode on the HP compiler -+ # -q* pass through compiler args for the IBM compiler -+ # -m* pass through architecture-specific compiler args for GCC -+ # -m*, -t[45]*, -txscale* pass through architecture-specific -+ # compiler args for GCC -+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC -+ # -F/path gives path to uninstalled frameworks, gcc on darwin -+ # @file GCC response files -+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) -+ -+ # Unknown arguments in both finalize_command and compile_command need -+ # to be aesthetically quoted because they are evaled later. -+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -+ case $arg in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ arg="\"$arg\"" -+ ;; -+ esac -+ compile_command="$compile_command $arg" -+ finalize_command="$finalize_command $arg" -+ compiler_flags="$compiler_flags $arg" -+ continue -+ ;; -+ -+ -shrext) -+ prev=shrext -+ continue -+ ;; -+ -no-fast-install) fast_install=no continue -@@ -1242,9 +1704,9 @@ +@@ -1242,11 +4599,11 @@ -no-install) case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows - # in order for the loader to find any dlls it needs. +- $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 +- $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + # and Darwin in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 ++ func_warning "\`-no-install' is ignored for $host" ++ func_warning "assuming \`-no-fast-install' instead" fast_install=no -@@ -1266,6 +1728,11 @@ + ;; + *) no_install=yes ;; +@@ -1266,6 +4623,11 @@ -o) prev=output ;; @@ -34883,52 +39256,113 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh -release) prev=release continue -@@ -1288,7 +1755,7 @@ +@@ -1282,13 +4644,13 @@ + ;; + + -R*) +- dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` ++ func_stripname '-R' '' "$arg" ++ dir=$func_stripname_result + # We need an absolute path. + case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 +- $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit 1 -+ exit $EXIT_FAILURE ++ func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in -@@ -1298,7 +1765,7 @@ +@@ -1298,7 +4660,17 @@ continue ;; - -static) ++ -shared) ++ # The effects of -shared are defined in a previous loop. ++ continue ++ ;; ++ ++ -shrext) ++ prev=shrext ++ continue ++ ;; ++ + -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects -@@ -1316,11 +1783,16 @@ - prev=vinfo +@@ -1317,41 +4689,48 @@ continue ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; - ++ ++ -weak) ++ prev=weak ++ continue ++ ;; ++ -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` +- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` ++ func_stripname '-Wc,' '' "$arg" ++ args=$func_stripname_result arg= - IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' + save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" - case $flag in -@@ -1338,7 +1810,7 @@ +- case $flag in +- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") +- flag="\"$flag\"" +- ;; +- esac +- arg="$arg $wl$flag" +- compiler_flags="$compiler_flags $flag" ++ func_quote_for_eval "$flag" ++ arg="$arg $wl$func_quote_for_eval_result" ++ compiler_flags="$compiler_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" +- arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ++ func_stripname ' ' '' "$arg" ++ arg=$func_stripname_result + ;; + -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` +- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` ++ func_stripname '-Wl,' '' "$arg" ++ args=$func_stripname_result arg= - IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' + save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" - case $flag in -@@ -1364,6 +1836,11 @@ +- case $flag in +- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") +- flag="\"$flag\"" +- ;; +- esac +- arg="$arg $wl$flag" +- compiler_flags="$compiler_flags $wl$flag" +- linker_flags="$linker_flags $flag" ++ func_quote_for_eval "$flag" ++ arg="$arg $wl$func_quote_for_eval_result" ++ compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" ++ linker_flags="$linker_flags $func_quote_for_eval_result" + done + IFS="$save_ifs" +- arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ++ func_stripname ' ' '' "$arg" ++ arg=$func_stripname_result + ;; + + -Xcompiler) +@@ -1364,16 +4743,41 @@ continue ;; @@ -34937,17 +39371,55 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + continue + ;; + ++ # -msg_* for osf cc ++ -msg_*) ++ func_quote_for_eval "$arg" ++ arg="$func_quote_for_eval_result" ++ ;; ++ ++ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler ++ # -r[0-9][0-9]* specifies the processor on the SGI compiler ++ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler ++ # +DA*, +DD* enable 64-bit mode on the HP compiler ++ # -q* pass through compiler args for the IBM compiler ++ # -m*, -t[45]*, -txscale* pass through architecture-specific ++ # compiler args for GCC ++ # -F/path gives path to uninstalled frameworks, gcc on darwin ++ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC ++ # @file GCC response files ++ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ ++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) ++ func_quote_for_eval "$arg" ++ arg="$func_quote_for_eval_result" ++ func_append compile_command " $arg" ++ func_append finalize_command " $arg" ++ compiler_flags="$compiler_flags $arg" ++ continue ++ ;; ++ # Some other compiler flag. -* | +*) - # Unknown arguments in both finalize_command and compile_command need -@@ -1385,78 +1862,83 @@ +- # Unknown arguments in both finalize_command and compile_command need +- # to be aesthetically quoted because they are evaled later. +- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` +- case $arg in +- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") +- arg="\"$arg\"" +- ;; +- esac ++ func_quote_for_eval "$arg" ++ arg="$func_quote_for_eval_result" + ;; + + *.$objext) +@@ -1385,92 +4789,82 @@ # A libtool-controlled object. # Check to see that this really is a libtool object. - if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= -+ if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then ++ if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= @@ -34958,11 +39430,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - *) . ./$arg ;; - esac + # Read the .lo file -+ # If there is no directory component, then add one. -+ case $arg in -+ */* | *\\*) . $arg ;; -+ *) . ./$arg ;; -+ esac ++ func_source "$arg" - if test -z "$pic_object" || \ - test -z "$non_pic_object" || @@ -34971,22 +39439,22 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit 1 - fi -+ if test -z "$pic_object" || \ ++ if test -z "$pic_object" || + test -z "$non_pic_object" || -+ test "$pic_object" = none && \ ++ test "$pic_object" = none && + test "$non_pic_object" = none; then -+ $echo "$modename: cannot find name of object for \`$arg'" 1>&2 -+ exit $EXIT_FAILURE ++ func_fatal_error "cannot find name of object for \`$arg'" + fi # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= +- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` +- if test "X$xdir" = "X$arg"; then +- xdir= - else -+ else - xdir="$xdir/" - fi +- xdir="$xdir/" +- fi ++ func_dirname "$arg" "/" "" ++ xdir="$func_dirname_result" - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. @@ -35020,8 +39488,9 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + fi - # A PIC object. +- libobjs="$libobjs $pic_object" + # A PIC object. - libobjs="$libobjs $pic_object" ++ func_append libobjs " $pic_object" arg="$pic_object" - fi + fi @@ -35047,47 +39516,74 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - exit 1 - else - # Dry-run case. +- +- # Extract subdirectory from the argument. +- xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` +- if test "X$xdir" = "X$arg"; then +- xdir= +- else +- xdir="$xdir/" + # A standard non-PIC object -+ non_pic_objects="$non_pic_objects $non_pic_object" ++ func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" -+ fi + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" -+ non_pic_objects="$non_pic_objects $non_pic_object" ++ func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. -+ if test -z "$run"; then -+ $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 -+ exit $EXIT_FAILURE -+ else -+ # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` -@@ -1466,11 +1948,11 @@ - xdir="$xdir/" - fi ++ if $opt_dry_run; then ++ # Extract subdirectory from the argument. ++ func_dirname "$arg" "/" "" ++ xdir="$func_dirname_result" - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` -+ pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` -+ non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" +- libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi -+ non_pic_objects="$non_pic_objects $non_pic_object" ++ func_lo2o "$arg" ++ pic_object=$xdir$objdir/$func_lo2o_result ++ non_pic_object=$xdir$func_lo2o_result ++ func_append libobjs " $pic_object" ++ func_append non_pic_objects " $non_pic_object" ++ else ++ func_fatal_error "\`$arg' is not a valid libtool object" + fi fi ;; -@@ -1521,51 +2003,7 @@ - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 +@@ -1502,113 +4896,51 @@ + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. +- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` +- case $arg in +- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") +- arg="\"$arg\"" +- ;; +- esac ++ func_quote_for_eval "$arg" ++ arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then +- compile_command="$compile_command $arg" +- finalize_command="$finalize_command $arg" ++ func_append compile_command " $arg" ++ func_append finalize_command " $arg" + fi + done # argument parsing loop + +- if test -n "$prev"; then +- $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 +- $echo "$help" 1>&2 - exit 1 - fi - @@ -35133,57 +39629,67 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - fi - ;; - esac -+ exit $EXIT_FAILURE - fi +- fi ++ test -n "$prev" && \ ++ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then -@@ -1574,6 +2012,7 @@ - finalize_command="$finalize_command $arg" + eval arg=\"$export_dynamic_flag_spec\" +- compile_command="$compile_command $arg" +- finalize_command="$finalize_command $arg" ++ func_append compile_command " $arg" ++ func_append finalize_command " $arg" fi + oldlibs= # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` +- outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` ++ func_basename "$output" ++ outputname="$func_basename_result" libobjs_save="$libobjs" -@@ -1594,12 +2033,12 @@ - output_objdir="$output_objdir/$objdir" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var +- eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` ++ eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + +- output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` +- if test "X$output_objdir" = "X$output"; then +- output_objdir="$objdir" +- else +- output_objdir="$output_objdir/$objdir" +- fi ++ func_dirname "$output" "/" "" ++ output_objdir="$func_dirname_result$objdir" # Create the object directory. - if test ! -d $output_objdir; then -+ if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir +- $show "$mkdir $output_objdir" +- $run $mkdir $output_objdir - status=$? - if test $status -ne 0 && test ! -d $output_objdir; then - exit $status -+ exit_status=$? -+ if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then -+ exit $exit_status - fi - fi +- fi +- fi ++ func_mkdir_p "$output_objdir" -@@ -1608,7 +2047,7 @@ + # Determine the type of output + case $output in "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 +- $echo "$modename: you must specify an output file" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE ++ func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; -@@ -1616,30 +2055,44 @@ - *) linkmode=prog ;; # Anything else should be a program. +@@ -1617,29 +4949,34 @@ esac -+ case $host in -+ *cygwin* | *mingw* | *pw32*) -+ # don't eliminate duplications in $postdeps and $predeps -+ duplicate_compiler_generated_deps=yes -+ ;; -+ *) -+ duplicate_compiler_generated_deps=$duplicate_deps -+ ;; -+ esac specialdeplibs= + libs= @@ -35193,7 +39699,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac -+ if test "X$duplicate_deps" = "Xyes" ; then ++ if $opt_duplicate_deps ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac @@ -35215,7 +39721,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done -+ if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then ++ if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; @@ -35226,29 +39732,45 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh pre_post_deps= fi -@@ -1648,7 +2101,6 @@ - newlib_search_path= +@@ -1649,15 +4986,15 @@ need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries -- notinst_path= # paths that contain not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries ++ case $linkmode in lib) - passes="conv link" -@@ -1657,7 +2109,7 @@ +- passes="conv link" ++ passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in *.la) ;; *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 +- $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit 1 -+ exit $EXIT_FAILURE ++ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done -@@ -1674,39 +2126,60 @@ +@@ -1673,40 +5010,103 @@ + *) passes="conv" ;; esac ++ for pass in $passes; do - if test $linkmode = prog; then - # Determine which files to process ++ # The preopen pass in lib mode reverses $deplibs; put it back here ++ # so that -L comes before libs that need it for instance... ++ if test "$linkmode,$pass" = "lib,link"; then ++ ## FIXME: Find the place where the list is rebuilt in the wrong ++ ## order, and fix it there properly ++ tmp_deplibs= ++ for deplib in $deplibs; do ++ tmp_deplibs="$deplib $tmp_deplibs" ++ done ++ deplibs="$tmp_deplibs" ++ fi ++ + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" @@ -35266,36 +39788,70 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi ++ if test "$linkmode,$pass" = "lib,dlpreopen"; then ++ # Collect and forward deplibs of preopened libtool libs ++ for lib in $dlprefiles; do ++ # Ignore non-libtool-libs ++ dependency_libs= ++ case $lib in ++ *.la) func_source "$lib" ;; ++ esac ++ ++ # Collect preopened libtool deplibs, except any this library ++ # has declared as weak libs ++ for deplib in $dependency_libs; do ++ deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` ++ case " $weak_libs " in ++ *" $deplib_base "*) ;; ++ *) deplibs="$deplibs $deplib" ;; ++ esac ++ done ++ done ++ libs="$dlprefiles" ++ fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi ++ for deplib in $libs; do lib= found=no case $deplib in -- -l*) -- if test $linkmode = oldlib && test $linkmode = obj; then -- $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 -- continue + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" - fi -- if test $pass = conv; then -- deplibs="$deplib $deplibs" ++ if test "$linkmode" = lib ; then ++ case "$new_inherited_linker_flags " in ++ *" $deplib "*) ;; ++ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; ++ esac ++ fi ++ fi + continue + ;; -+ -l*) + -l*) +- if test $linkmode = oldlib && test $linkmode = obj; then +- $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 + if test "$linkmode" != lib && test "$linkmode" != prog; then -+ $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 ++ func_warning "\`-l' is ignored for archives/objects" continue fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` +- if test $pass = conv; then +- deplibs="$deplib $deplibs" +- continue ++ func_stripname '-l' '' "$deplib" ++ name=$func_stripname_result ++ if test "$linkmode" = lib; then ++ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" ++ else ++ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi +- name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do - # Search the libtool library - lib="$searchdir/lib${name}.la" @@ -35303,11 +39859,6 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - found=yes - break - fi -+ if test "$linkmode" = lib; then -+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" -+ else -+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" -+ fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library @@ -35324,7 +39875,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh done if test "$found" != yes; then # deplib doesn't seem to be a libtool library -@@ -1715,40 +2188,76 @@ +@@ -1715,41 +5115,91 @@ finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" @@ -35338,21 +39889,17 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) -+ if (${SED} -e '2q' $lib | -+ grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then ++ if func_lalib_p "$lib"; then + library_names= + old_library= -+ case $lib in -+ */* | *\\*) . $lib ;; -+ *) . ./$lib ;; -+ esac ++ func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no -+ ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` -+ test "X$ladir" = "X$lib" && ladir="." ++ func_dirname "$lib" "" "." ++ ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" @@ -35364,12 +39911,27 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + continue + fi + fi -+ ;; ++ ;; + *) ;; + esac + fi fi ;; # -l ++ *.ltframework) ++ if test "$linkmode,$pass" = "prog,link"; then ++ compile_deplibs="$deplib $compile_deplibs" ++ finalize_deplibs="$deplib $finalize_deplibs" ++ else ++ deplibs="$deplib $deplibs" ++ if test "$linkmode" = lib ; then ++ case "$new_inherited_linker_flags " in ++ *" $deplib "*) ;; ++ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; ++ esac ++ fi ++ fi ++ continue ++ ;; -L*) case $linkmode in lib) @@ -35377,7 +39939,9 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - test $pass = conv && continue + test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` +- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ++ func_stripname '-L' '' "$deplib" ++ newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) - if test $pass = conv; then @@ -35393,22 +39957,26 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi -+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ++ func_stripname '-L' '' "$deplib" ++ newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) - $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2 -+ $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ++ func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) - if test $pass = link; then +- dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` ++ func_stripname '-R' '' "$deplib" ++ dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in -@@ -1761,28 +2270,45 @@ + *" $dir "*) ;; +@@ -1761,28 +5211,51 @@ ;; *.la) lib="$deplib" ;; *.$libext) @@ -35425,38 +39993,47 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." -+ valid_a_lib=no -+ case $deplibs_check_method in -+ match_pattern*) -+ set dummy $deplibs_check_method -+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` -+ if eval $echo \"$deplib\" 2>/dev/null \ -+ | $SED 10q \ -+ | $EGREP "$match_pattern_regex" > /dev/null; then -+ valid_a_lib=yes -+ fi -+ ;; -+ pass_all) -+ valid_a_lib=yes -+ ;; -+ esac -+ if test "$valid_a_lib" != yes; then -+ $echo -+ $echo "*** Warning: Trying to link with static lib archive $deplib." -+ $echo "*** I have the capability to make that library automatically link in when" -+ $echo "*** you link to this library. But I can only do this if you have a" -+ $echo "*** shared version of the library, which you do not appear to have" -+ $echo "*** because the file extensions .$libext of this argument makes me believe" -+ $echo "*** that it is just a static archive that I should not used here." - else +- else - echo - echo "*** Warning: Linking the shared library $output against the" - echo "*** static library $deplib is not portable!" -+ $echo -+ $echo "*** Warning: Linking the shared library $output against the" -+ $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi +- deplibs="$deplib $deplibs" +- fi ++ # Linking convenience modules into shared libraries is allowed, ++ # but linking other static libraries is non-portable. ++ case " $dlpreconveniencelibs " in ++ *" $deplib "*) ;; ++ *) ++ valid_a_lib=no ++ case $deplibs_check_method in ++ match_pattern*) ++ set dummy $deplibs_check_method; shift ++ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` ++ if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ ++ | $EGREP "$match_pattern_regex" > /dev/null; then ++ valid_a_lib=yes ++ fi ++ ;; ++ pass_all) ++ valid_a_lib=yes ++ ;; ++ esac ++ if test "$valid_a_lib" != yes; then ++ $ECHO ++ $ECHO "*** Warning: Trying to link with static lib archive $deplib." ++ $ECHO "*** I have the capability to make that library automatically link in when" ++ $ECHO "*** you link to this library. But I can only do this if you have a" ++ $ECHO "*** shared version of the library, which you do not appear to have" ++ $ECHO "*** because the file extensions .$libext of this argument makes me believe" ++ $ECHO "*** that it is just a static archive that I should not use here." ++ else ++ $ECHO ++ $ECHO "*** Warning: Linking the shared library $output against the" ++ $ECHO "*** static library $deplib is not portable!" ++ deplibs="$deplib $deplibs" ++ fi ++ ;; ++ esac continue ;; prog) @@ -35465,7 +40042,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" -@@ -1793,14 +2319,18 @@ +@@ -1793,14 +5266,18 @@ esac # linkmode ;; # *.$libext *.lo | *.$objext) @@ -35492,32 +40069,40 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh fi continue ;; -@@ -1809,17 +2339,17 @@ +@@ -1809,21 +5286,18 @@ continue ;; esac # case $deplib - if test $found = yes || test -f "$lib"; then : ++ + if test "$found" = yes || test -f "$lib"; then : else - $echo "$modename: cannot find the library \`$lib'" 1>&2 - exit 1 -+ $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 -+ exit $EXIT_FAILURE ++ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. - if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : -+ if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 +- else +- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` -@@ -1832,8 +2362,11 @@ +- fi ++ func_lalib_unsafe_p "$lib" \ ++ || func_fatal_error "\`$lib' is not a valid libtool archive" + +- ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` +- test "X$ladir" = "X$lib" && ladir="." ++ func_dirname "$lib" "" "." ++ ladir="$func_dirname_result" + + dlname= + dlopen= +@@ -1831,70 +5305,84 @@ + libdir= library_names= old_library= ++ inherited_linker_flags= # If the library was installed with an old release of libtool, - # it will not redefine variable installed. + # it will not redefine variables installed, or shouldnotlink @@ -35527,9 +40112,23 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + # Read the .la file - case $lib in -@@ -1843,19 +2376,18 @@ - +- case $lib in +- */* | *\\*) . $lib ;; +- *) . ./$lib ;; +- esac ++ func_source "$lib" + ++ # Convert "-framework foo" to "foo.ltframework" ++ if test -n "$inherited_linker_flags"; then ++ tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` ++ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do ++ case " $new_inherited_linker_flags " in ++ *" $tmp_inherited_linker_flag "*) ;; ++ *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; ++ esac ++ done ++ fi ++ dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || - { test $linkmode = oldlib && test $linkmode = obj; }; then @@ -35545,32 +40144,35 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 +- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit 1 -+ exit $EXIT_FAILURE ++ func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" -@@ -1863,18 +2395,21 @@ - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" -- case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -- esac -+ if test "X$duplicate_deps" = "Xyes" ; then -+ case "$tmp_libs " in -+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ esac -+ fi - tmp_libs="$tmp_libs $deplib" - done -- elif test $linkmode != prog && test $linkmode != lib; then + old_convenience="$old_convenience $ladir/$objdir/$old_library" +- tmp_libs= +- for deplib in $dependency_libs; do +- deplibs="$deplib $deplibs" + elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 ++ func_fatal_error "\`$lib' is not a convenience library" ++ fi ++ tmp_libs= ++ for deplib in $dependency_libs; do ++ deplibs="$deplib $deplibs" ++ if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac +- tmp_libs="$tmp_libs $deplib" +- done +- elif test $linkmode != prog && test $linkmode != lib; then +- $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi +- fi ++ fi ++ tmp_libs="$tmp_libs $deplib" ++ done continue fi # $pass = conv @@ -35578,21 +40180,21 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh # Get the name of the library we link against. linklib= for l in $old_library $library_names; do -@@ -1882,19 +2417,23 @@ + linklib="$l" done if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 +- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit 1 -+ exit $EXIT_FAILURE ++ func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. - if test $pass = dlopen; then + if test "$pass" = dlopen; then if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 +- $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit 1 -+ exit $EXIT_FAILURE ++ func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi - if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + if test -z "$dlname" || @@ -35608,7 +40210,31 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh else newdlfiles="$newdlfiles $lib" fi -@@ -1926,19 +2465,27 @@ +@@ -1907,18 +5395,19 @@ + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then +- $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 +- $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 ++ func_warning "cannot determine absolute directory name of \`$ladir'" ++ func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac +- laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` ++ func_basename "$lib" ++ laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then +- $echo "$modename: warning: library \`$lib' was moved." 1>&2 ++ func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" +@@ -1926,24 +5415,36 @@ dir="$libdir" absdir="$libdir" fi @@ -35630,19 +40256,31 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + notinst_path="$notinst_path $abs_ladir" + fi fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` +- name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` ++ func_stripname 'lib' '.la' "$laname" ++ name=$func_stripname_result # This library was specified with -dlpreopen. - if test $pass = dlpreopen; then -+ if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 +- if test -z "$libdir"; then +- $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit 1 -+ exit $EXIT_FAILURE ++ if test "$pass" = dlpreopen; then ++ if test -z "$libdir" && test "$linkmode" = prog; then ++ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). -@@ -1954,18 +2501,19 @@ + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" ++ # Keep a list of preopened convenience libraries to check ++ # that they are being used correctly in the link pass. ++ test -z "$libdir" && \ ++ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" +@@ -1954,18 +5455,19 @@ if test -z "$libdir"; then # Link the convenience library @@ -35665,8 +40303,14 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" -@@ -1981,28 +2529,38 @@ - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test +@@ -1978,31 +5480,42 @@ + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in +- -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test ++ -L*) func_stripname '-L' '' "$deplib" ++ newlib_search_path="$newlib_search_path $func_stripname_result" ++ ;; esac # Need to link against all dependency_libs? - if test $linkalldeplibs = yes; then @@ -35680,7 +40324,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac -+ if test "X$duplicate_deps" = "Xyes" ; then ++ if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac @@ -35697,15 +40341,14 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || -+ test "$prefer_static_libs,$installed" = "built,yes"; } || ++ test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. -+ case "$temp_rpath " in -+ *" $dir "*) ;; -+ *" $absdir "*) ;; -+ *) temp_rpath="$temp_rpath $absdir" ;; ++ case "$temp_rpath:" in ++ *"$absdir:"*) ;; ++ *) temp_rpath="$temp_rpath$absdir:" ;; + esac + fi @@ -35714,7 +40357,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh # Hardcode the library path. # Skip directories that are in the system default run-time # search path. -@@ -2024,17 +2582,6 @@ +@@ -2024,17 +5537,6 @@ esac ;; esac @@ -35732,35 +40375,54 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && -@@ -2044,11 +2591,56 @@ +@@ -2044,26 +5546,89 @@ # We only need to search for static libraries continue fi + fi +- if test "$installed" = no; then +- notinst_deplibs="$notinst_deplibs $lib" +- need_relink=yes + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs -+ if test "$use_static_libs" = built && test "$installed" = yes ; then ++ if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi ++ case $host in ++ *cygwin* | *mingw* | *cegcc*) ++ # No point in relinking DLLs because paths are not encoded ++ notinst_deplibs="$notinst_deplibs $lib" ++ need_relink=no ++ ;; ++ *) ++ if test "$installed" = no; then ++ notinst_deplibs="$notinst_deplibs $lib" ++ need_relink=yes ++ fi ++ ;; ++ esac + # This is a shared library + -+ # Warn about portability, can't link against -module's on -+ # some systems (darwin) -+ if test "$shouldnotlink" = yes && test "$pass" = link ; then -+ $echo ++ # Warn about portability, can't link against -module's on some ++ # systems (darwin). Don't bleat about dlopened modules though! ++ dlopenmodule="" ++ for dlpremoduletest in $dlprefiles; do ++ if test "X$dlpremoduletest" = "X$lib"; then ++ dlopenmodule="$dlpremoduletest" ++ break ++ fi ++ done ++ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then ++ $ECHO + if test "$linkmode" = prog; then -+ $echo "*** Warning: Linking the executable $output against the loadable module" ++ $ECHO "*** Warning: Linking the executable $output against the loadable module" + else -+ $echo "*** Warning: Linking the shared library $output against the loadable module" ++ $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi -+ $echo "*** $linklib is not portable!" ++ $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then @@ -35785,57 +40447,73 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + esac + ;; + esac -+ fi + fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname -@@ -2062,7 +2654,7 @@ + set dummy $library_names +- realname="$2" +- shift; shift +- libname=`eval \\$echo \"$libname_spec\"` ++ shift ++ realname="$1" ++ shift ++ libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in - *cygwin*) -+ *cygwin* | mingw*) - major=`expr $current - $age` +- major=`expr $current - $age` ++ *cygwin* | mingw* | *cegcc*) ++ func_arith $current - $age ++ major=$func_arith_result versuffix="-$major" ;; -@@ -2074,17 +2666,18 @@ + esac +@@ -2074,41 +5639,29 @@ # Make a new name for the extract_expsyms_cmds to use soroot="$soname" - soname=`echo $soroot | sed -e 's/^.*\///'` - newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" -+ soname=`$echo $soroot | ${SED} -e 's/^.*\///'` -+ newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" ++ func_basename "$soroot" ++ soname="$func_basename_result" ++ func_stripname 'lib' '.dll' "$soname" ++ newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else - $show "extracting exported symbol list from \`$soname'" +- $show "extracting exported symbol list from \`$soname'" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - eval cmds=\"$extract_expsyms_cmds\" -+ save_ifs="$IFS"; IFS='~' -+ cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done -@@ -2094,10 +2687,11 @@ +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" || exit $? +- done +- IFS="$save_ifs" ++ func_verbose "extracting exported symbol list from \`$soname'" ++ func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + # Create $newlib if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" +- $show "generating import library for \`$soname'" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - eval cmds=\"$old_archive_from_expsyms_cmds\" -+ save_ifs="$IFS"; IFS='~' -+ cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done -@@ -2106,9 +2700,9 @@ +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" || exit $? +- done +- IFS="$save_ifs" ++ func_verbose "generating import library for \`$soname'" ++ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib @@ -35847,7 +40525,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh add_shlibpath= add_dir= add= -@@ -2117,6 +2711,26 @@ +@@ -2117,6 +5670,30 @@ immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" @@ -35857,24 +40535,34 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) -+ # if the lib is a module then we can not link against -+ # it, someone is ignoring the new warnings I added ++ # if the lib is a (non-dlopened) module then we can not ++ # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | -+ $EGREP ": [^:]* bundle" >/dev/null ; then -+ $echo "** Warning, lib $linklib is a module, not a shared library" -+ if test -z "$old_library" ; then -+ $echo -+ $echo "** And there doesn't seem to be a static archive available" -+ $echo "** The link will probably fail, sorry" -+ else -+ add="$dir/$old_library" ++ $GREP ": [^:]* bundle" >/dev/null ; then ++ if test "X$dlopenmodule" != "X$lib"; then ++ $ECHO "*** Warning: lib $linklib is a module, not a shared library" ++ if test -z "$old_library" ; then ++ $ECHO ++ $ECHO "*** And there doesn't seem to be a static archive available" ++ $ECHO "*** The link will probably fail, sorry" ++ else ++ add="$dir/$old_library" ++ fi ++ elif test -n "$old_library"; then ++ add="$dir/$old_library" + fi + fi + esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; -@@ -2135,6 +2749,14 @@ +@@ -2131,10 +5708,19 @@ + fi + ;; + relink) +- if test "$hardcode_direct" = yes; then ++ if test "$hardcode_direct" = yes && ++ test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" @@ -35889,16 +40577,17 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" -@@ -2148,7 +2770,7 @@ +@@ -2147,8 +5733,7 @@ + esac if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" +- $echo "$modename: configuration error: unsupported hardcode properties" - exit 1 -+ exit $EXIT_FAILURE ++ func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then -@@ -2157,7 +2779,7 @@ +@@ -2157,14 +5742,14 @@ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi @@ -35907,7 +40596,16 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else -@@ -2174,7 +2796,7 @@ + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" +- if test "$hardcode_direct" != yes && \ +- test "$hardcode_minus_L" != yes && \ ++ if test "$hardcode_direct" != yes && ++ test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; +@@ -2174,12 +5759,13 @@ fi fi @@ -35916,16 +40614,23 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh add_shlibpath= add_dir= add= -@@ -2190,13 +2812,28 @@ + # Finalize command for both is simple: just hardcode it. +- if test "$hardcode_direct" = yes; then ++ if test "$hardcode_direct" = yes && ++ test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" +@@ -2190,13 +5776,28 @@ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then -+ add="$inst_prefix_dir$libdir/$linklib" ++ add="$inst_prefix_dir$libdir/$linklib" + else -+ add="$libdir/$linklib" ++ add="$libdir/$linklib" + fi else # We cannot seem to hardcode it, guess we'll fake it. @@ -35946,7 +40651,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else -@@ -2204,16 +2841,7 @@ +@@ -2204,16 +5805,7 @@ test -n "$add" && deplibs="$add $deplibs" fi fi @@ -35964,7 +40669,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. -@@ -2233,40 +2861,40 @@ +@@ -2233,45 +5825,46 @@ # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. @@ -35973,28 +40678,28 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." -+ $echo -+ $echo "*** Warning: This system can not link to static lib archive $lib." -+ $echo "*** I have the capability to make that library automatically link in when" -+ $echo "*** you link to this library. But I can only do this if you have a" -+ $echo "*** shared version of the library, which you do not appear to have." ++ $ECHO ++ $ECHO "*** Warning: This system can not link to static lib archive $lib." ++ $ECHO "*** I have the capability to make that library automatically link in when" ++ $ECHO "*** you link to this library. But I can only do this if you have a" ++ $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then - echo "*** Therefore, libtool will create a static module, that should work " - echo "*** as long as the dlopening application is linked with the -dlopen flag." -+ $echo "*** But as you try to build a module library, libtool will still create " -+ $echo "*** a static module, that should work as long as the dlopening application" -+ $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." ++ $ECHO "*** But as you try to build a module library, libtool will still create " ++ $ECHO "*** a static module, that should work as long as the dlopening application" ++ $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." -+ $echo -+ $echo "*** However, this would only work if libtool was able to extract symbol" -+ $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" -+ $echo "*** not find such a program. So, this module is probably useless." -+ $echo "*** \`nm' from GNU binutils and a full rebuild may help." ++ $ECHO ++ $ECHO "*** However, this would only work if libtool was able to extract symbol" ++ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" ++ $ECHO "*** not find such a program. So, this module is probably useless." ++ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then - build_libtool_libs=module @@ -36025,14 +40730,21 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do -@@ -2289,13 +2917,15 @@ + case $libdir in +- -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` ++ -R*) func_stripname '-R' '' "$libdir" ++ temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; +@@ -2289,46 +5882,68 @@ tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac -+ if test "X$duplicate_deps" = "Xyes" ; then ++ if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac @@ -36045,89 +40757,85 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -@@ -2315,18 +2945,65 @@ + -L*) path="$deplib" ;; + *.la) +- dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` +- test "X$dir" = "X$deplib" && dir="." ++ func_dirname "$deplib" "" "." ++ dir="$func_dirname_result" + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then +- $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 ++ func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi ;; esac - if grep "^installed=no" $deplib > /dev/null; then -- path="-L$absdir/$objdir" -+ path="$absdir/$objdir" - else -- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi -- path="-L$absdir" -+ path="$absdir" - fi -+ depdepl= +- if grep "^installed=no" $deplib > /dev/null; then ++ if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) -+ # we do not want to link against static libs, -+ # but need to link against shared ++ depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` -+ eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done -+ if test -f "$deplibdir/$depdepl" ; then -+ depdepl="$deplibdir/$depdepl" -+ elif test -f "$path/$depdepl" ; then -+ depdepl="$path/$depdepl" -+ else -+ # Can't find it, oh well... -+ depdepl= ++ if test -f "$absdir/$objdir/$depdepl" ; then ++ depdepl="$absdir/$objdir/$depdepl" ++ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` ++ if test -z "$darwin_install_name"; then ++ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` ++ fi ++ compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" ++ linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" ++ path= + fi -+ # do not add paths which are already there -+ case " $newlib_search_path " in -+ *" $path "*) ;; -+ *) newlib_search_path="$newlib_search_path $path";; -+ esac + fi -+ path="" + ;; + *) -+ path="-L$path" + path="-L$absdir/$objdir" + ;; + esac -+ ;; -+ -l*) -+ case $host in -+ *-*-darwin*) -+ # Again, we only want to link against shared libraries -+ eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` -+ for tmp in $newlib_search_path ; do -+ if test -f "$tmp/lib$tmp_libs.dylib" ; then -+ eval depdepl="$tmp/lib$tmp_libs.dylib" -+ break -+ fi -+ done -+ path="" -+ ;; -+ *) continue ;; -+ esac + else +- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` +- if test -z "$libdir"; then +- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 +- exit 1 +- fi +- if test "$absdir" != "$libdir"; then +- $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 +- fi ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` ++ test -z "$libdir" && \ ++ func_fatal_error "\`$deplib' is not a valid libtool archive" ++ test "$absdir" != "$libdir" && \ ++ func_warning "\`$deplib' seems to be moved" ++ + path="-L$absdir" + fi ;; - *) continue ;; +- *) continue ;; esac -@@ -2334,19 +3011,23 @@ + case " $deplibs " in *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac -+ case " $deplibs " in -+ *" $depdepl "*) ;; -+ *) deplibs="$depdepl $deplibs" ;; -+ esac - done +@@ -2338,15 +5953,23 @@ fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs - if test $pass = dlpreopen; then ++ if test "$pass" = link; then ++ if test "$linkmode" = "prog"; then ++ compile_deplibs="$new_inherited_linker_flags $compile_deplibs" ++ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" ++ else ++ compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ++ fi ++ fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries @@ -36143,7 +40851,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do -@@ -2368,9 +3049,30 @@ +@@ -2368,9 +5991,30 @@ eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do @@ -36174,7 +40882,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) -@@ -2398,19 +3100,33 @@ +@@ -2398,42 +6042,53 @@ eval $var=\"$tmp_libs\" done # for var fi @@ -36201,75 +40909,124 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - if test $linkmode = prog; then + if test "$linkmode" = prog; then dlfiles="$newdlfiles" ++ fi ++ if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then +- $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 ++ func_warning "\`-dlopen' is ignored for archives" + fi + +- if test -n "$rpath"; then +- $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 +- fi + case " $deplibs" in + *\ -l* | *\ -L*) -+ $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;; ++ func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac -+ - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi -@@ -2424,7 +3140,7 @@ - fi - if test -n "$vinfo"; then +- if test -n "$xrpath"; then +- $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 +- fi ++ test -n "$rpath" && \ ++ func_warning "\`-rpath' is ignored for archives" + +- if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 -+ $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi +- fi ++ test -n "$xrpath" && \ ++ func_warning "\`-R' is ignored for archives" + +- if test -n "$release"; then +- $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 +- fi ++ test -n "$vinfo" && \ ++ func_warning "\`-version-info/-version-number' is ignored for archives" + +- if test -n "$export_symbols" || test -n "$export_symbols_regex"; then +- $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 +- fi ++ test -n "$release" && \ ++ func_warning "\`-release' is ignored for archives" ++ ++ test -n "$export_symbols$export_symbols_regex" && \ ++ func_warning "\`-export-symbols' is ignored for archives" - if test -n "$release"; then -@@ -2446,17 +3162,19 @@ + # Now set the variables for building old libraries. + build_libtool_libs=no +@@ -2445,115 +6100,149 @@ + # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` +- name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` ++ func_stripname 'lib' '.la' "$outputname" ++ name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 +- if test "$module" = no; then +- $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi +- fi ++ test "$module" = no && \ ++ func_fatal_help "libtool library \`$output' must begin with \`lib'" ++ if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` +- name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` ++ func_stripname '' '.la' "$outputname" ++ name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` -@@ -2467,11 +3185,11 @@ +- libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` ++ func_stripname '' '.la' "$outputname" ++ libname=$func_stripname_result + fi + ;; + esac + if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 +- $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit 1 -+ exit $EXIT_FAILURE ++ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else - echo - echo "*** Warning: Linking the shared library $output against the non-libtool" - echo "*** objects $objs is not portable!" -+ $echo -+ $echo "*** Warning: Linking the shared library $output against the non-libtool" -+ $echo "*** objects $objs is not portable!" ++ $ECHO ++ $ECHO "*** Warning: Linking the shared library $output against the non-libtool" ++ $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi -@@ -2481,7 +3199,7 @@ - fi + +- if test "$dlself" != no; then +- $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 +- fi ++ test "$dlself" != no && \ ++ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath - if test $# -gt 2; then -+ if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" -@@ -2491,15 +3209,15 @@ +- $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 +- fi +- install_libdir="$2" ++ shift ++ test "$#" -gt 1 && \ ++ func_warning "ignoring multiple \`-rpath's for a libtool library" ++ ++ install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so @@ -36282,27 +41039,33 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh build_old_libs=yes fi - if test -n "$vinfo"; then +- if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 -+ $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 - fi +- fi ++ test -n "$vinfo" && \ ++ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - if test -n "$release"; then -@@ -2508,52 +3226,90 @@ +- if test -n "$release"; then +- $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 +- fi ++ test -n "$release" && \ ++ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. - IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' + save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 ++ shift IFS="$save_ifs" - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 +- if test -n "$8"; then +- $echo "$modename: too many parameters to \`-version-info'" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi +- fi ++ test -n "$7" && \ ++ func_fatal_help "too many parameters to \`-version-info'" - current="$2" - revision="$3" @@ -36313,9 +41076,9 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + + case $vinfo_number in + yes) -+ number_major="$2" -+ number_minor="$3" -+ number_revision="$4" ++ number_major="$1" ++ number_minor="$2" ++ number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version @@ -36325,7 +41088,8 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + # + case $version_type in + darwin|linux|osf|windows|none) -+ current=`expr $number_major + $number_minor` ++ func_arith $number_major + $number_minor ++ current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; @@ -36335,7 +41099,8 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + age="0" + ;; + irix|nonstopux) -+ current=`expr $number_major + $number_minor` ++ func_arith $number_major + $number_minor ++ current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no @@ -36343,9 +41108,9 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + esac + ;; + no) -+ current="$2" -+ revision="$3" -+ age="$4" ++ current="$1" ++ revision="$2" ++ age="$3" + ;; + esac @@ -36355,10 +41120,10 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 -+ $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 +- $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 -+ exit $EXIT_FAILURE ++ func_error "CURRENT \`$current' must be a nonnegative integer" ++ func_fatal_error "\`$vinfo' is not valid version information" ;; esac @@ -36367,10 +41132,10 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 -+ $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 +- $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 -+ exit $EXIT_FAILURE ++ func_error "REVISION \`$revision' must be a nonnegative integer" ++ func_fatal_error "\`$vinfo' is not valid version information" ;; esac @@ -36379,32 +41144,45 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 -+ $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 +- $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 -+ exit $EXIT_FAILURE ++ func_error "AGE \`$age' must be a nonnegative integer" ++ func_fatal_error "\`$vinfo' is not valid version information" ;; esac - if test $age -gt $current; then -+ if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 +- $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 +- $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 -+ exit $EXIT_FAILURE ++ if test "$age" -gt "$current"; then ++ func_error "AGE \`$age' is greater than the current interface number \`$current'" ++ func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. -@@ -2570,6 +3326,7 @@ +@@ -2566,10 +6255,13 @@ + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header +- major=.`expr $current - $age` ++ func_arith $current - $age ++ major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` +- minor_current=`expr $current + 1` ++ func_arith $current + 1 ++ minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; -@@ -2583,16 +3340,24 @@ - versuffix=".$current"; +@@ -2580,19 +6272,31 @@ + + freebsd-elf) + major=".$current" +- versuffix=".$current"; ++ versuffix=".$current" ;; - irix) @@ -36412,10 +41190,12 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - verstring="sgi$major.$revision" + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then -+ major=`expr $current - $age` ++ func_arith $current - $age + else -+ major=`expr $current - $age + 1` ++ func_arith $current - $age + 1 + fi ++ major=$func_arith_result ++ + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; @@ -36425,38 +41205,75 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh # Add in all the interfaces that we are compatible with. loop=$revision - while test $loop != 0; do -+ while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` +- iface=`expr $revision - $loop` +- loop=`expr $loop - 1` - verstring="sgi$major.$iface:$verstring" ++ while test "$loop" -ne 0; do ++ func_arith $revision - $loop ++ iface=$func_arith_result ++ func_arith $loop - 1 ++ loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. -@@ -2606,13 +3371,13 @@ +@@ -2601,20 +6305,24 @@ + ;; + + linux) +- major=.`expr $current - $age` ++ func_arith $current - $age ++ major=.$func_arith_result + versuffix="$major.$age.$revision" ;; osf) - major=`expr $current - $age` -+ major=.`expr $current - $age` ++ func_arith $current - $age ++ major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age - while test $loop != 0; do +- iface=`expr $current - $loop` +- loop=`expr $loop - 1` + while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` ++ func_arith $current - $loop ++ iface=$func_arith_result ++ func_arith $loop - 1 ++ loop=$func_arith_result verstring="$verstring:${iface}.0" -@@ -2636,15 +3401,24 @@ + done + +@@ -2622,6 +6330,11 @@ + verstring="$verstring:${current}.0" + ;; + ++ qnx) ++ major=".$current" ++ versuffix=".$current" ++ ;; ++ + sunos) + major=".$current" + versuffix=".$current.$revision" +@@ -2630,21 +6343,29 @@ + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. +- major=`expr $current - $age` ++ func_arith $current - $age ++ major=$func_arith_result + versuffix="-$major" + ;; *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 +- $echo "$modename: unknown library version type \`$version_type'" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 -+ $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 -+ exit $EXIT_FAILURE ++ func_fatal_configuration "unknown library version type \`$version_type'" ;; esac @@ -36477,8 +41294,26 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh if test "$need_version" = no; then versuffix= else -@@ -2674,23 +3448,29 @@ +@@ -2662,7 +6383,7 @@ + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then +- $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 ++ func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi +@@ -2670,27 +6391,36 @@ + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi ++ + fi ++ func_generate_dlsyms "$libname" "$libname" "yes" ++ libobjs="$libobjs $symfileobj" ++ test "X$libobjs" = "X " && libobjs= ++ if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. @@ -36486,7 +41321,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - tempremovelist=`echo "$output_objdir/*"` + # may have been created when compiling PIC objects. + removelist= -+ tempremovelist=`$echo "$output_objdir/*"` ++ tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do - case $p in - *.$objext) @@ -36498,13 +41333,16 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - esac - done - if test -n "$removelist"; then +- $show "${rm}r $removelist" +- $run ${rm}r $removelist +- fi + case $p in -+ *.$objext) ++ *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then -+ if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 -+ then ++ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 ++ then + continue + fi + fi @@ -36513,15 +41351,17 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + *) ;; + esac + done -+ if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist -- fi -+ fi ++ test -n "$removelist" && \ ++ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. -@@ -2702,11 +3482,11 @@ +@@ -2698,15 +6428,15 @@ + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. +- oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` ++ oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. @@ -36531,14 +41371,14 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'` - done + #for path in $notinst_path; do -+ # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` -+ # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` -+ # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` ++ # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` ++ # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` ++ # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. -@@ -2718,7 +3498,7 @@ +@@ -2718,7 +6448,7 @@ *) finalize_rpath="$finalize_rpath $libdir" ;; esac done @@ -36547,11 +41387,22 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh dependency_libs="$temp_xrpath $dependency_libs" fi fi -@@ -2756,9 +3536,18 @@ +@@ -2746,19 +6476,28 @@ + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework +- deplibs="$deplibs -framework System" ++ deplibs="$deplibs System.ltframework" + ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; -- *) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; @@ -36561,14 +41412,14 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; -+ *) + *) # Add libc to deplibs on all other systems if necessary. - if test $build_libtool_need_lc = "yes"; then + if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; -@@ -2785,7 +3574,7 @@ +@@ -2785,7 +6524,7 @@ # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just @@ -36577,18 +41428,24 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh newdeplibs=$deplibs ;; test_compile) -@@ -2798,64 +3587,85 @@ +@@ -2793,90 +6532,127 @@ + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. +- $rm conftest.c ++ $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do -+ if test "$name" != "" && test "$name" != "0"; then ++ case $a_deplib in ++ -l*) ++ func_stripname -l '' "$a_deplib" ++ name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) @@ -36728,14 +41606,19 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + esac + fi + if test -n "$a_deplib" ; then -+ libname=`eval \\$echo \"$libname_spec\"` ++ libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then -@@ -2886,35 +3705,36 @@ +- if ls -lLd "$potent_lib" 2>/dev/null \ +- | grep " -> " >/dev/null; then ++ if ls -lLd "$potent_lib" 2>/dev/null | ++ $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an +@@ -2886,88 +6662,118 @@ # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do @@ -36743,7 +41626,8 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; +- *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; ++ *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done - # It is ok to link against an archive when @@ -36753,11 +41637,12 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - a_deplib="" - break 2 - fi - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ +- if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | sed 10q \ - | egrep "$file_magic_regex" > /dev/null; then -+ | ${SED} 10q \ -+ | $EGREP "$file_magic_regex" > /dev/null; then ++ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | ++ $SED -e 10q | ++ $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 @@ -36774,29 +41659,38 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." -+ $echo -+ $echo "*** Warning: linker path does not have real file for library $a_deplib." -+ $echo "*** I have the capability to make that library automatically link in when" -+ $echo "*** you link to this library. But I can only do this if you have a" -+ $echo "*** shared version of the library, which you do not appear to have" -+ $echo "*** because I did check the linker path looking for a file starting" ++ $ECHO ++ $ECHO "*** Warning: linker path does not have real file for library $a_deplib." ++ $ECHO "*** I have the capability to make that library automatically link in when" ++ $ECHO "*** you link to this library. But I can only do this if you have a" ++ $ECHO "*** shared version of the library, which you do not appear to have" ++ $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then -+ $echo "*** with $libname but no candidates were found. (...for file magic test)" ++ $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else -+ $echo "*** with $libname and none of the candidates passed a file format test" -+ $echo "*** using a file magic. Last file checked: $potlib" ++ $ECHO "*** with $libname and none of the candidates passed a file format test" ++ $ECHO "*** using a file magic. Last file checked: $potlib" + fi fi - else +- else ++ ;; ++ *) # Add a -L argument. -@@ -2926,29 +3746,47 @@ - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + newdeplibs="$newdeplibs $a_deplib" +- fi ++ ;; ++ esac + done # Gone through all deplibs. + ;; + match_pattern*) +- set dummy $deplibs_check_method +- match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` ++ set dummy $deplibs_check_method; shift ++ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do - name="`expr $a_deplib : '-l\(.*\)'`" -+ name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then +- # If $name is empty we are operating on a -L argument. +- if test -n "$name" && test "$name" != "0"; then - libname=`eval \\$echo \"$libname_spec\"` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` @@ -36808,6 +41702,10 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - a_deplib="" - break 2 - fi ++ case $a_deplib in ++ -l*) ++ func_stripname -l '' "$a_deplib" ++ name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) @@ -36817,14 +41715,13 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + esac + fi + if test -n "$a_deplib" ; then -+ libname=`eval \\$echo \"$libname_spec\"` ++ libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test -+ if eval $echo \"$potent_lib\" 2>/dev/null \ -+ | ${SED} 10q \ -+ | $EGREP "$match_pattern_regex" > /dev/null; then ++ if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ ++ $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 @@ -36840,22 +41737,28 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." -+ $echo -+ $echo "*** Warning: linker path does not have real file for library $a_deplib." -+ $echo "*** I have the capability to make that library automatically link in when" -+ $echo "*** you link to this library. But I can only do this if you have a" -+ $echo "*** shared version of the library, which you do not appear to have" -+ $echo "*** because I did check the linker path looking for a file starting" ++ $ECHO ++ $ECHO "*** Warning: linker path does not have real file for library $a_deplib." ++ $ECHO "*** I have the capability to make that library automatically link in when" ++ $ECHO "*** you link to this library. But I can only do this if you have a" ++ $ECHO "*** shared version of the library, which you do not appear to have" ++ $ECHO "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then -+ $echo "*** with $libname but no candidates were found. (...for regex pattern test)" ++ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else -+ $echo "*** with $libname and none of the candidates passed a file format test" -+ $echo "*** using a regex pattern. Last file checked: $potlib" ++ $ECHO "*** with $libname and none of the candidates passed a file format test" ++ $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi fi - else +- else ++ ;; ++ *) # Add a -L argument. -@@ -2958,16 +3796,23 @@ + newdeplibs="$newdeplibs $a_deplib" +- fi ++ ;; ++ esac + done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" @@ -36863,30 +41766,39 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | - grep . >/dev/null; then - echo -+ tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -+ -e 's/ -[LR][^ ]*//g'` ++ tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ ++ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' -+ tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` ++ tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` + done + fi -+ if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ -+ | grep . >/dev/null; then -+ $echo ++ if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | ++ $GREP . >/dev/null; then ++ $ECHO if test "X$deplibs_check_method" = "Xnone"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." -+ $echo "*** Warning: inter-library dependencies are not supported in this platform." ++ $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else - echo "*** Warning: inter-library dependencies are not known to be supported." -+ $echo "*** Warning: inter-library dependencies are not known to be supported." ++ $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi - echo "*** All declared inter-library dependencies are being dropped." -+ $echo "*** All declared inter-library dependencies are being dropped." ++ $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; -@@ -2987,17 +3832,17 @@ +@@ -2980,24 +6786,24 @@ + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) +- # On Rhapsody replace the C library is the System framework +- newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ++ # On Rhapsody replace the C library with the System framework ++ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + ;; + esac if test "$droppeddeps" = yes; then if test "$module" = yes; then @@ -36895,35 +41807,35 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - echo "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." -+ $echo -+ $echo "*** Warning: libtool could not satisfy all declared inter-library" -+ $echo "*** dependencies of module $libname. Therefore, libtool will create" -+ $echo "*** a static module, that should work as long as the dlopening" -+ $echo "*** application is linked with the -dlopen flag." ++ $ECHO ++ $ECHO "*** Warning: libtool could not satisfy all declared inter-library" ++ $ECHO "*** dependencies of module $libname. Therefore, libtool will create" ++ $ECHO "*** a static module, that should work as long as the dlopening" ++ $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." -+ $echo -+ $echo "*** However, this would only work if libtool was able to extract symbol" -+ $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" -+ $echo "*** not find such a program. So, this module is probably useless." -+ $echo "*** \`nm' from GNU binutils and a full rebuild may help." ++ $ECHO ++ $ECHO "*** However, this would only work if libtool was able to extract symbol" ++ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" ++ $ECHO "*** not find such a program. So, this module is probably useless." ++ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" -@@ -3007,16 +3852,16 @@ +@@ -3007,16 +6813,16 @@ build_libtool_libs=no fi else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." -+ $echo "*** The inter-library dependencies that have been dropped here will be" -+ $echo "*** automatically added whenever a program is linked with this library" -+ $echo "*** or is declared to -dlopen it." ++ $ECHO "*** The inter-library dependencies that have been dropped here will be" ++ $ECHO "*** automatically added whenever a program is linked with this library" ++ $ECHO "*** or is declared to -dlopen it." - if test $allow_undefined = no; then - echo @@ -36932,18 +41844,26 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." + if test "$allow_undefined" = no; then -+ $echo -+ $echo "*** Since this library must not contain undefined symbols," -+ $echo "*** because either the platform does not support them or" -+ $echo "*** it was explicitly requested with -no-undefined," -+ $echo "*** libtool will only create a static version of it." ++ $ECHO ++ $ECHO "*** Since this library must not contain undefined symbols," ++ $ECHO "*** because either the platform does not support them or" ++ $ECHO "*** it was explicitly requested with -no-undefined," ++ $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module -@@ -3031,6 +3876,35 @@ +@@ -3030,6 +6836,41 @@ + # Done checking deplibs! deplibs=$newdeplibs fi - ++ # Time to change all our "foo.ltframework" stuff back to "-framework foo" ++ case $host in ++ *-*-darwin*) ++ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ++ new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ++ deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ++ ;; ++ esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list @@ -36971,12 +41891,10 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + esac + done + deplibs="$new_libs" -+ -+ + # All the library-specific variables (install_libdir is set above). library_names= - old_library= -@@ -3038,7 +3912,7 @@ +@@ -3038,7 +6879,7 @@ # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then @@ -36985,31 +41903,34 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh # Hardcode the library paths hardcode_libdirs= dep_rpath= -@@ -3074,7 +3948,14 @@ +@@ -3074,7 +6915,11 @@ if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" - eval dep_rpath=\"$hardcode_libdir_flag_spec\" + if test -n "$hardcode_libdir_flag_spec_ld"; then -+ case $archive_cmds in -+ *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; -+ *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; -+ esac ++ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. -@@ -3094,6 +3975,7 @@ +@@ -3094,109 +6939,143 @@ fi # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names - realname="$2" -@@ -3104,31 +3986,17 @@ +- realname="$2" +- shift; shift ++ shift ++ realname="$1" ++ shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" else soname="$realname" fi @@ -37043,14 +41964,47 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh -# done - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` +- test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` ++ test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` ++ test "X$libobjs" = "X " && libobjs= ++ ++ delfiles= ++ if test -n "$export_symbols" && test -n "$include_expsyms"; then ++ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" ++ export_symbols="$output_objdir/$libname.uexp" ++ delfiles="$delfiles $export_symbols" ++ fi ++ ++ orig_export_symbols= ++ case $host_os in ++ cygwin* | mingw* | cegcc*) ++ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then ++ # exporting using user supplied symfile ++ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then ++ # and it's NOT already a .def file. Must figure out ++ # which of the given symbols are data symbols and tag ++ # them as such. So, trigger use of export_symbols_cmds. ++ # export_symbols gets reassigned inside the "prepare ++ # the list of exported symbols" if statement, so the ++ # include_expsyms logic still works. ++ orig_export_symbols="$export_symbols" ++ export_symbols= ++ always_export_symbols=yes ++ fi ++ fi ++ ;; ++ esac -@@ -3138,17 +4006,29 @@ - $show "generating symbol list for \`$libname.la'" + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then +- $show "generating symbol list for \`$libname.la'" ++ func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols +- $run $rm $export_symbols - eval cmds=\"$export_symbols_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' ++ $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' for cmd in $cmds; do @@ -37058,48 +42012,77 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - $show "$cmd" - $run eval "$cmd" || exit $? + eval cmd=\"$cmd\" -+ if len=`expr "X$cmd" : ".*"` && -+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then -+ $show "$cmd" -+ $run eval "$cmd" || exit $? -+ skipped_export=false ++ func_len " $cmd" ++ len=$func_len_result ++ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then ++ func_show_eval "$cmd" 'exit $?' ++ skipped_export=false + else -+ # The command line is too long to execute in one step. -+ $show "using reloadable object file for export list..." -+ skipped_export=: ++ # The command line is too long to execute in one step. ++ func_verbose "using reloadable object file for export list..." ++ skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi done IFS="$save_ifs" - if test -n "$export_symbols_regex"; then +- if test -n "$export_symbols_regex"; then - $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' -+ $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" -+ $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' +- $show "$mv \"${export_symbols}T\" \"$export_symbols\"" +- $run eval '$mv "${export_symbols}T" "$export_symbols"' ++ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then ++ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' ++ func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi -@@ -3159,47 +4039,30 @@ - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then +- $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' ++ tmp_export_symbols="$export_symbols" ++ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" ++ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi ++ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then ++ # The given exports_symbols file has to be filtered, so filter it. ++ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" ++ # FIXME: $output_objdir/$libname.filter potentially contains lots of ++ # 's' commands which not all seds can handle. GNU sed should be fine ++ # though. Also, the filter scales superlinearly with the number of ++ # global variables. join(1) would be nice here, but unfortunately ++ # isn't a blessed tool. ++ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter ++ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" ++ export_symbols=$output_objdir/$libname.def ++ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols ++ fi ++ + tmp_deplibs= + for test_deplib in $deplibs; do -+ case " $convenience " in -+ *" $test_deplib "*) ;; -+ *) -+ tmp_deplibs="$tmp_deplibs $test_deplib" -+ ;; -+ esac ++ case " $convenience " in ++ *" $test_deplib "*) ;; ++ *) ++ tmp_deplibs="$tmp_deplibs $test_deplib" ++ ;; ++ esac + done + deplibs="$tmp_deplibs" + if test -n "$convenience"; then ++ if test -n "$whole_archive_flag_spec" && ++ test "$compiler_needs_object" = yes && ++ test -z "$libobjs"; then ++ # extract the archives, so we have objects to list. ++ # TODO: could optimize this to just extract one archive. ++ whole_archive_flag_spec= ++ fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" ++ test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" - $show "${rm}r $gentop" @@ -37136,17 +42119,21 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - done + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" ++ test "X$libobjs" = "X " && libobjs= fi fi -- -+ - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" -@@ -3211,17 +4074,31 @@ + +@@ -3207,21 +7086,37 @@ + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then +- $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? ++ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. +- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then +- eval cmds=\"$archive_expsym_cmds\" + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" @@ -37155,40 +42142,42 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi -+ else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then -- eval cmds=\"$archive_expsym_cmds\" -+ eval test_cmds=\"$archive_expsym_cmds\" -+ cmds=$archive_expsym_cmds else - eval cmds=\"$archive_cmds\" -+ eval test_cmds=\"$archive_cmds\" -+ cmds=$archive_cmds ++ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then ++ eval test_cmds=\"$archive_expsym_cmds\" ++ cmds=$archive_expsym_cmds ++ else ++ eval test_cmds=\"$archive_cmds\" ++ cmds=$archive_cmds + fi fi - if len=`expr "X$cmds" : ".*"` && - test $len -le $max_cmd_len; then - : - else +- # The command line is too long to link in one step, link piecewise. +- $echo "creating reloadable object files..." + + if test "X$skipped_export" != "X:" && -+ len=`expr "X$test_cmds" : ".*" 2>/dev/null` && -+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then ++ func_len " $test_cmds" && ++ len=$func_len_result && ++ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else - # The command line is too long to link in one step, link piecewise. -- $echo "creating reloadable object files..." -+ $echo "creating reloadable object files..." ++ # The command line is too long to link in one step, link piecewise ++ # or, if using GNU ld and skipped_export is not :, use a linker ++ # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we -@@ -3234,72 +4111,82 @@ +@@ -3234,109 +7129,246 @@ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi - save_output=$output + save_output=$output -+ output_la=`$echo "X$output" | $Xsed -e "$basename"` ++ output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. @@ -37199,14 +42188,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - last_robj= - k=1 - output=$output_objdir/$save_output-${k}.$objext -+ test_cmds= -+ concat_cmds= -+ objlist= -+ delfiles= -+ last_robj= -+ k=1 -+ output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. +- # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" @@ -37215,16 +42197,8 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - test $len -le $max_cmd_len; }; then - objlist="$objlist $obj" - else -+ for obj in $save_libobjs -+ do -+ eval test_cmds=\"$reload_cmds $objlist $last_robj\" -+ if test "X$objlist" = X || -+ { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && -+ test "$len" -le "$max_cmd_len"; }; then -+ objlist="$objlist $obj" -+ else - # The command $test_cmds is almost too long, add a - # command to the queue. +- # The command $test_cmds is almost too long, add a +- # command to the queue. - if test $k -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" @@ -37240,57 +42214,103 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - len=1 - fi - done -+ if test "$k" -eq 1 ; then -+ # The first file doesn't have a previous command to add. -+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\" -+ else -+ # All subsequent reloadable object files will link in -+ # the last one created. -+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" -+ fi -+ last_robj=$output_objdir/$output_la-${k}.$objext -+ k=`expr $k + 1` -+ output=$output_objdir/$output_la-${k}.$objext -+ objlist=$obj -+ len=1 -+ fi -+ done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ +- # Handle the remaining objects by creating one last +- # reloadable object file. All subsequent reloadable object +- # files will link in the last one created. +- test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" -+ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" ++ test_cmds= ++ concat_cmds= ++ objlist= ++ last_robj= ++ k=1 - # Set up a command to remove the reloadale object files -+ if ${skipped_export-false}; then -+ $show "generating symbol list for \`$libname.la'" -+ export_symbols="$output_objdir/$libname.exp" -+ $run $rm $export_symbols -+ libobjs=$output -+ # Append the command to create the export file. -+ eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" -+ fi -+ -+ # Set up a command to remove the reloadable object files - # after they are used. +- # after they are used. - i=0 - while test $i -lt $k - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" - done -+ i=0 -+ while test "$i" -lt "$k" -+ do -+ i=`expr $i + 1` -+ delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" -+ done ++ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then ++ output=${output_objdir}/${output_la}.lnkscript ++ func_verbose "creating GNU ld script: $output" ++ $ECHO 'INPUT (' > $output ++ for obj in $save_libobjs ++ do ++ $ECHO "$obj" >> $output ++ done ++ $ECHO ')' >> $output ++ delfiles="$delfiles $output" ++ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then ++ output=${output_objdir}/${output_la}.lnk ++ func_verbose "creating linker input file list: $output" ++ : > $output ++ set x $save_libobjs ++ shift ++ firstobj= ++ if test "$compiler_needs_object" = yes; then ++ firstobj="$1 " ++ shift ++ fi ++ for obj ++ do ++ $ECHO "$obj" >> $output ++ done ++ delfiles="$delfiles $output" ++ output=$firstobj\"$file_list_spec$output\" ++ else ++ if test -n "$save_libobjs"; then ++ func_verbose "creating reloadable object files..." ++ output=$output_objdir/$output_la-${k}.$objext ++ eval test_cmds=\"$reload_cmds\" ++ func_len " $test_cmds" ++ len0=$func_len_result ++ len=$len0 - $echo "creating a temporary reloadable object file: $output" -+ $echo "creating a temporary reloadable object file: $output" ++ # Loop over the list of objects to be linked. ++ for obj in $save_libobjs ++ do ++ func_len " $obj" ++ func_arith $len + $func_len_result ++ len=$func_arith_result ++ if test "X$objlist" = X || ++ test "$len" -lt "$max_cmd_len"; then ++ func_append objlist " $obj" ++ else ++ # The command $test_cmds is almost too long, add a ++ # command to the queue. ++ if test "$k" -eq 1 ; then ++ # The first file doesn't have a previous command to add. ++ eval concat_cmds=\"$reload_cmds $objlist $last_robj\" ++ else ++ # All subsequent reloadable object files will link in ++ # the last one created. ++ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" ++ fi ++ last_robj=$output_objdir/$output_la-${k}.$objext ++ func_arith $k + 1 ++ k=$func_arith_result ++ output=$output_objdir/$output_la-${k}.$objext ++ objlist=$obj ++ func_len " $last_robj" ++ func_arith $len0 + $func_len_result ++ len=$func_arith_result ++ fi ++ done ++ # Handle the remaining objects by creating one last ++ # reloadable object file. All subsequent reloadable object ++ # files will link in the last one created. ++ test -z "$concat_cmds" || concat_cmds=$concat_cmds~ ++ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" ++ if test -n "$last_robj"; then ++ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" ++ fi ++ delfiles="$delfiles $output" - # Loop through the commands generated above and execute them. +- # Loop through the commands generated above and execute them. - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" @@ -37298,15 +42318,78 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" -+ save_ifs="$IFS"; IFS='~' -+ for cmd in $concat_cmds; do -+ IFS="$save_ifs" -+ $show "$cmd" -+ $run eval "$cmd" || exit $? -+ done -+ IFS="$save_ifs" ++ else ++ output= ++ fi - libobjs=$output ++ if ${skipped_export-false}; then ++ func_verbose "generating symbol list for \`$libname.la'" ++ export_symbols="$output_objdir/$libname.exp" ++ $opt_dry_run || $RM $export_symbols ++ libobjs=$output ++ # Append the command to create the export file. ++ test -z "$concat_cmds" || concat_cmds=$concat_cmds~ ++ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" ++ if test -n "$last_robj"; then ++ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" ++ fi ++ fi ++ ++ test -n "$save_libobjs" && ++ func_verbose "creating a temporary reloadable object file: $output" ++ ++ # Loop through the commands generated above and execute them. ++ save_ifs="$IFS"; IFS='~' ++ for cmd in $concat_cmds; do ++ IFS="$save_ifs" ++ $opt_silent || { ++ func_quote_for_expand "$cmd" ++ eval "func_echo $func_quote_for_expand_result" ++ } ++ $opt_dry_run || eval "$cmd" || { ++ lt_exit=$? ++ ++ # Restore the uninstalled library and exit ++ if test "$mode" = relink; then ++ ( cd "$output_objdir" && \ ++ $RM "${realname}T" && \ ++ $MV "${realname}U" "$realname" ) ++ fi ++ ++ exit $lt_exit ++ } ++ done ++ IFS="$save_ifs" ++ ++ if test -n "$export_symbols_regex" && ${skipped_export-false}; then ++ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' ++ func_show_eval '$MV "${export_symbols}T" "$export_symbols"' ++ fi ++ fi ++ ++ if ${skipped_export-false}; then ++ if test -n "$export_symbols" && test -n "$include_expsyms"; then ++ tmp_export_symbols="$export_symbols" ++ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" ++ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' ++ fi ++ ++ if test -n "$orig_export_symbols"; then ++ # The given exports_symbols file has to be filtered, so filter it. ++ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" ++ # FIXME: $output_objdir/$libname.filter potentially contains lots of ++ # 's' commands which not all seds can handle. GNU sed should be fine ++ # though. Also, the filter scales superlinearly with the number of ++ # global variables. join(1) would be nice here, but unfortunately ++ # isn't a blessed tool. ++ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter ++ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" ++ export_symbols=$output_objdir/$libname.def ++ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols ++ fi ++ fi ++ + libobjs=$output # Restore the value of output. - output=$save_output @@ -37314,7 +42397,9 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" -@@ -3308,28 +4195,54 @@ ++ test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. @@ -37330,15 +42415,16 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + cmds=$module_cmds + fi + else -+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then -+ cmds=$archive_expsym_cmds -+ else -+ cmds=$archive_cmds ++ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then ++ cmds=$archive_expsym_cmds ++ else ++ cmds=$archive_cmds + fi + fi ++ fi - # Append the command to remove the reloadable object files - # to the just-reset $cmds. +- # Append the command to remove the reloadable object files +- # to the just-reset $cmds. - eval cmds=\"\$cmds~$rm $delfiles\" - fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' @@ -37348,19 +42434,37 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" -+ eval cmds=\"\$cmds~\$rm $delfiles\" ++ if test -n "$delfiles"; then ++ # Append the command to remove temporary files to $cmds. ++ eval cmds=\"\$cmds~\$RM $delfiles\" ++ fi ++ ++ # Add any objects from preloaded convenience libraries ++ if test -n "$dlprefiles"; then ++ gentop="$output_objdir/${outputname}x" ++ generated="$generated $gentop" ++ ++ func_extract_archives $gentop $dlprefiles ++ libobjs="$libobjs $func_extract_archives_result" ++ test "X$libobjs" = "X " && libobjs= + fi ++ + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" -+ $show "$cmd" -+ $run eval "$cmd" || { ++ $opt_silent || { ++ func_quote_for_expand "$cmd" ++ eval "func_echo $func_quote_for_expand_result" ++ } ++ $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then -+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' ++ ( cd "$output_objdir" && \ ++ $RM "${realname}T" && \ ++ $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit @@ -37370,13 +42474,13 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh # Restore the uninstalled library and exit if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? +- $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? - exit 0 ++ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then -+ $show "${rm}r $gentop" -+ $run ${rm}r "$gentop" ++ func_show_eval '${RM}r "$gentop"' + fi + fi + @@ -37384,30 +42488,83 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh fi # Create links to the real library. -@@ -3349,9 +4262,10 @@ + for linkname in $linknames; do + if test "$realname" != "$linkname"; then +- $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" +- $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? ++ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + +@@ -3349,38 +7381,35 @@ ;; obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi +- + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then +- $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 ++ func_warning "\`-dlopen' is ignored for objects" + fi + +- if test -n "$rpath"; then +- $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 +- fi + case " $deplibs" in + *\ -l* | *\ -L*) -+ $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;; ++ func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 -@@ -3377,7 +4291,7 @@ +- if test -n "$xrpath"; then +- $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 +- fi ++ test -n "$rpath" && \ ++ func_warning "\`-rpath' is ignored for objects" + +- if test -n "$vinfo"; then +- $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 +- fi ++ test -n "$xrpath" && \ ++ func_warning "\`-R' is ignored for objects" + +- if test -n "$release"; then +- $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 +- fi ++ test -n "$vinfo" && \ ++ func_warning "\`-version-info' is ignored for objects" ++ ++ test -n "$release" && \ ++ func_warning "\`-release' is ignored for objects" + + case $output in *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 +- if test -n "$objs$old_deplibs"; then +- $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` -@@ -3398,46 +4312,20 @@ +- fi +- libobj="$output" +- obj=`$echo "X$output" | $Xsed -e "$lo2o"` ++ test -n "$objs$old_deplibs" && \ ++ func_fatal_error "cannot build library object \`$output' from non-libtool objects" ++ ++ libobj=$output ++ func_lo2o "$libobj" ++ obj=$func_lo2o_result + ;; + *) + libobj= +@@ -3389,7 +7418,7 @@ + esac + + # Delete the old objects. +- $run $rm $obj $libobj ++ $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create +@@ -3398,148 +7427,136 @@ reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of @@ -37420,7 +42577,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" -+ reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` ++ reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" - $show "${rm}r $gentop" @@ -37460,22 +42617,27 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh fi fi -@@ -3445,10 +4333,11 @@ - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + # Create the old-style object. +- reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test ++ reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" - eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ cmds=$reload_cmds -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done -@@ -3461,7 +4350,7 @@ - $run ${rm}r $gentop +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" || exit $? +- done +- IFS="$save_ifs" ++ func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then +- $show "${rm}r $gentop" +- $run ${rm}r $gentop ++ func_show_eval '${RM}r "$gentop"' fi - exit 0 @@ -37483,11 +42645,18 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh fi if test "$build_libtool_libs" != yes; then -@@ -3474,35 +4363,22 @@ + if test -n "$gentop"; then +- $show "${rm}r $gentop" +- $run ${rm}r $gentop ++ func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? +- # $run eval "echo timestamp > $libobj" || exit $? - exit 0 ++ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS fi @@ -37497,15 +42666,12 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh output="$libobj" - eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ cmds=$reload_cmds -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" || exit $? +- done +- IFS="$save_ifs" -# else -# # Just create a symlink. -# $show $rm $libobj @@ -37520,11 +42686,13 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh -# oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` -# $show "(cd $xdir && $LN_S $oldobj $baseobj)" -# $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? ++ func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then -@@ -3510,12 +4386,12 @@ - $run ${rm}r $gentop +- $show "${rm}r $gentop" +- $run ${rm}r $gentop ++ func_show_eval '${RM}r "$gentop"' fi - exit 0 @@ -37534,24 +42702,61 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh prog) case $host in - *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; -+ *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; - esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 -@@ -3540,6 +4416,45 @@ - ;; ++ *cygwin*) func_stripname '' '.exe' "$output" ++ output=$func_stripname_result.exe;; esac +- if test -n "$vinfo"; then +- $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 +- fi ++ test -n "$vinfo" && \ ++ func_warning "\`-version-info' is ignored for programs" -+ case $host in -+ *darwin*) -+ # Don't allow lazy linking, it breaks C++ global constructors -+ if test "$tagname" = CXX ; then -+ compile_command="$compile_command ${wl}-bind_at_load" -+ finalize_command="$finalize_command ${wl}-bind_at_load" -+ fi -+ ;; +- if test -n "$release"; then +- $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 +- fi ++ test -n "$release" && \ ++ func_warning "\`-release' is ignored for programs" + +- if test "$preload" = yes; then +- if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && +- test "$dlopen_self_static" = unknown; then +- $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." +- fi +- fi ++ test "$preload" = yes \ ++ && test "$dlopen_support" = unknown \ ++ && test "$dlopen_self" = unknown \ ++ && test "$dlopen_self_static" = unknown && \ ++ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework +- compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` +- finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ++ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ++ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ++ ;; + esac + ++ case $host in ++ *-*-darwin*) ++ # Don't allow lazy linking, it breaks C++ global constructors ++ # But is supposedly fixed on 10.4 or later (yay!). ++ if test "$tagname" = CXX ; then ++ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in ++ 10.[0123]) ++ compile_command="$compile_command ${wl}-bind_at_load" ++ finalize_command="$finalize_command ${wl}-bind_at_load" ++ ;; ++ esac ++ fi ++ # Time to change all our "foo.ltframework" stuff back to "-framework foo" ++ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ++ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list @@ -37584,775 +42789,558 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" -@@ -3584,10 +4499,15 @@ +@@ -3583,11 +7600,18 @@ + esac fi case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -+ testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ++ ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; ++ ::) dllsearchpath=$testbindir;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac ;; esac done -@@ -3635,6 +4555,12 @@ +@@ -3635,227 +7659,51 @@ fi finalize_rpath="$rpath" +- dlsyms= +- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then +- if test -n "$NM" && test -n "$global_symbol_pipe"; then +- dlsyms="${outputname}S.c" +- else +- $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 +- fi + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. -+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` -+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` -+ fi -+ - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then -@@ -3677,38 +4603,50 @@ - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" ++ compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` ++ finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi - # Add our own program objects to the symbol list. +- if test -n "$dlsyms"; then +- case $dlsyms in +- "") ;; +- *.c) +- # Discover the nlist of each of the dlfiles. +- nlist="$output_objdir/${outputname}.nm" +- +- $show "$rm $nlist ${nlist}S ${nlist}T" +- $run $rm "$nlist" "${nlist}S" "${nlist}T" +- +- # Parse the name list into a source file. +- $show "creating $output_objdir/$dlsyms" +- +- test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ +- +-#ifdef __cplusplus +-extern \"C\" { +-#endif +- +-/* Prevent the only kind of declaration conflicts we can make. */ +-#define lt_preloaded_symbols some_other_symbol +- +-/* External symbol declarations for the compiler. */\ +-" +- +- if test "$dlself" = yes; then +- $show "generating symbol list for \`$output'" +- +- test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" +- +- # Add our own program objects to the symbol list. - progfiles="$objs$old_deplibs" -+ progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then +- for arg in $progfiles; do +- $show "extracting global C symbols from \`$arg'" +- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" +- done +- +- if test -n "$exclude_expsyms"; then - $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' -+ $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then +- $run eval '$mv "$nlist"T "$nlist"' +- fi +- +- if test -n "$export_symbols_regex"; then - $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' -+ $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then +- $run eval '$mv "$nlist"T "$nlist"' +- fi +- +- # Prepare the list of exported symbols +- if test -z "$export_symbols"; then - export_symbols="$output_objdir/$output.exp" -+ export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols +- $run $rm $export_symbols - $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' -+ $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' -+ case $host in -+ *cygwin* | *mingw* ) -+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' -+ $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' -+ ;; -+ esac - else +- else - $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' - $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' -+ $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' -+ $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' -+ case $host in -+ *cygwin* | *mingw* ) -+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' -+ $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' -+ ;; -+ esac - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" +- $run eval 'mv "$nlist"T "$nlist"' +- fi +- fi +- +- for arg in $dlprefiles; do +- $show "extracting global C symbols from \`$arg'" - name=`echo "$arg" | sed -e 's%^.*/%%'` - $run eval 'echo ": $name " >> "$nlist"' -+ name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` -+ $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - -@@ -3717,12 +4655,18 @@ - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then +- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" +- done +- +- if test -z "$run"; then +- # Make sure we have at least an empty file. +- test -f "$nlist" || : > "$nlist" +- +- if test -n "$exclude_expsyms"; then - egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T -+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. +- $mv "$nlist"T "$nlist" +- fi +- +- # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then -+ if grep -v "^: " < "$nlist" | -+ if sort -k 3 /dev/null 2>&1; then -+ sort -k 3 -+ else -+ sort +2 -+ fi | -+ uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S -@@ -3731,7 +4675,7 @@ - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else +- : +- else +- grep -v "^: " < "$nlist" > "$nlist"S +- fi +- +- if test -f "$nlist"S; then +- eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' +- else - echo '/* NONE */' >> "$output_objdir/$dlsyms" -+ $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ -@@ -3739,27 +4683,44 @@ - #undef lt_preloaded_symbols - - #if defined (__STDC__) && __STDC__ --# define lt_ptr_t void * -+# define lt_ptr void * - #else --# define lt_ptr_t char * -+# define lt_ptr char * - # define const - #endif - - /* The mapping between symbol names and symbols. */ -+" -+ -+ case $host in -+ *cygwin* | *mingw* ) -+ $echo >> "$output_objdir/$dlsyms" "\ -+/* DATA imports from DLLs on WIN32 can't be const, because -+ runtime relocations are performed -- see ld's documentation -+ on pseudo-relocs */ -+struct { -+" -+ ;; -+ * ) -+ $echo >> "$output_objdir/$dlsyms" "\ - const struct { -+" -+ ;; -+ esac -+ -+ -+ $echo >> "$output_objdir/$dlsyms" "\ - const char *name; +- fi +- +- $echo >> "$output_objdir/$dlsyms" "\ +- +-#undef lt_preloaded_symbols +- +-#if defined (__STDC__) && __STDC__ +-# define lt_ptr_t void * +-#else +-# define lt_ptr_t char * +-# define const +-#endif +- +-/* The mapping between symbol names and symbols. */ +-const struct { +- const char *name; - lt_ptr_t address; -+ lt_ptr address; - } - lt_preloaded_symbols[] = - {\ - " - +-} +-lt_preloaded_symbols[] = +-{\ +-" +- - sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ - -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ - < "$nlist" >> "$output_objdir/$dlsyms" -+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ +- +- $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr_t) 0} -+ {0, (lt_ptr) 0} - }; - - /* This works around a problem in FreeBSD linker */ -@@ -3795,20 +4756,33 @@ - esac - - # Now compile the dynamic symbol file. +-}; +- +-/* This works around a problem in FreeBSD linker */ +-#ifdef FREEBSD_WORKAROUND +-static const void *lt_preloaded_setup() { +- return lt_preloaded_symbols; +-} +-#endif +- +-#ifdef __cplusplus +-} +-#endif\ +-" +- fi +- +- pic_flag_for_symtable= +- 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*) +- case "$compile_command " in +- *" -static "*) ;; +- *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; +- esac;; +- *-*-hpux*) +- case "$compile_command " in +- *" -static "*) ;; +- *) pic_flag_for_symtable=" $pic_flag";; +- esac +- esac +- +- # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? -+ $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" -+ $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. +- +- # Clean up the generated files. +- $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" +- $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" +- +- # Transform the symbol file into the correct name. - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -+ case $host in -+ *cygwin* | *mingw* ) -+ if test -f "$output_objdir/${outputname}.def" ; then -+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` -+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` -+ else -+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` -+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` -+ fi -+ ;; -+ * ) -+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` -+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` -+ ;; -+ esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 +- ;; +- *) +- $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - ;; - esac - else -@@ -3817,19 +4791,19 @@ - # really was required. +- ;; +- 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. ++ func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - # Nullify the symbol file. +- # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` -+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` -+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` ++ # template prelinking step ++ if test -n "$prelink_cmds"; then ++ func_execute_cmds "$prelink_cmds" 'exit $?' fi - if test $need_relink = no || test "$build_libtool_libs" != yes; then -+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then ++ wrappers_required=yes ++ case $host in ++ *cygwin* | *mingw* ) ++ if test "$build_libtool_libs" != yes; then ++ wrappers_required=no ++ fi ++ ;; ++ *cegcc) ++ # Disable wrappers for cegcc, we are cross compiling anyway. ++ wrappers_required=no ++ ;; ++ *) ++ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then ++ wrappers_required=no ++ fi ++ ;; ++ esac ++ if test "$wrappers_required" = no; then # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` -+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` ++ compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" +- $show "$link_command" +- $run eval "$link_command" - status=$? -+ exit_status=$? ++ exit_status=0 ++ func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. - if test -n "$dlsyms"; then -@@ -3837,7 +4811,7 @@ - $run $rm "$output_objdir/${outputname}S.${objext}" +- if test -n "$dlsyms"; then +- $show "$rm $output_objdir/${outputname}S.${objext}" +- $run $rm "$output_objdir/${outputname}S.${objext}" ++ if test -f "$output_objdir/${outputname}S.${objext}"; then ++ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi - exit $status +- fi +- +- if test -n "$shlibpath_var"; then +- # We should set the shlibpath_var +- rpath= +- for dir in $temp_rpath; do +- case $dir in +- [\\/]* | [A-Za-z]:[\\/]*) +- # Absolute path. +- rpath="$rpath$dir:" +- ;; +- *) +- # Relative path: add a thisdir entry. +- rpath="$rpath\$thisdir/$dir:" +- ;; +- esac +- done +- temp_rpath="$rpath" + exit $exit_status fi - if test -n "$shlibpath_var"; then -@@ -3896,7 +4870,7 @@ + if test -n "$compile_shlibpath$finalize_shlibpath"; then +@@ -3890,13 +7738,12 @@ + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. +- link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` ++ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. +- $run $rm $output ++ $opt_dry_run || $RM $output # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? +- $show "$link_command" +- $run eval "$link_command" || exit $? - exit 0 ++ func_show_eval "$link_command" 'exit $?' + exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then -@@ -3910,7 +4884,7 @@ +@@ -3904,13 +7751,13 @@ + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + +- $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 +- $echo "$modename: \`$output' will be relinked during installation" 1>&2 ++ func_warning "this platform does not like uninstalled shared libraries" ++ func_warning "\`$output' will be relinked during installation" + else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` -+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` ++ relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= -@@ -3946,15 +4920,15 @@ - relink_command="$var=\"$var_value\"; export $var; $relink_command" +@@ -3922,246 +7769,104 @@ + fi + + # Replace the output file specification. +- link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` ++ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. +- $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname ++ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + +- $show "$link_command" +- $run eval "$link_command" || exit $? ++ func_show_eval "$link_command" 'exit $?' + + # Now create the wrapper script. +- $show "creating $output" ++ func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then +- relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" ++ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else +- var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` +- relink_command="$var=\"$var_value\"; export $var; $relink_command" ++ func_quote_for_eval "$var_value" ++ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done - relink_command="cd `pwd`; $relink_command" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command="(cd `pwd`; $relink_command)" -+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` ++ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi - # Quote $echo for shipping. +- # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $0 --fallback-echo"; then - case $0 in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; - *) qecho="$SHELL `pwd`/$0 --fallback-echo";; -+ if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then ++ # Quote $ECHO for shipping. ++ if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` +- qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` ++ qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else -@@ -3966,15 +4940,376 @@ +- qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` ++ qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` + fi + +- # Only actually do things if our run command is non-null. +- if test -z "$run"; then ++ # Only actually do things if not in dry run mode. ++ $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in - *.exe) output=`echo $output|sed 's,.exe$,,'` ;; -+ *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; ++ *.exe) func_stripname '' '.exe' "$output" ++ output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in - *cygwin*) exeext=.exe ;; + *cygwin*) + exeext=.exe -+ outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; ++ func_stripname '' '.exe' "$outputname" ++ outputname=$func_stripname_result ;; *) exeext= ;; esac - $rm $output - trap "$rm $output; exit 1" 1 2 15 -+ case $host in -+ *cygwin* | *mingw* ) -+ output_name=`basename $output` -+ output_path=`dirname $output` -+ cwrappersource="$output_path/$objdir/lt-$output_name.c" -+ cwrapper="$output_path/$output_name.exe" -+ $rm $cwrappersource $cwrapper -+ trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 -+ -+ cat > $cwrappersource <> $cwrappersource<<"EOF" -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#if defined(PATH_MAX) -+# define LT_PATHMAX PATH_MAX -+#elif defined(MAXPATHLEN) -+# define LT_PATHMAX MAXPATHLEN -+#else -+# define LT_PATHMAX 1024 -+#endif -+ -+#ifndef DIR_SEPARATOR -+# define DIR_SEPARATOR '/' -+# define PATH_SEPARATOR ':' -+#endif -+ -+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ -+ defined (__OS2__) -+# define HAVE_DOS_BASED_FILE_SYSTEM -+# ifndef DIR_SEPARATOR_2 -+# define DIR_SEPARATOR_2 '\\' -+# endif -+# ifndef PATH_SEPARATOR_2 -+# define PATH_SEPARATOR_2 ';' -+# endif -+#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 */ -+ -+#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 */ -+ -+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -+#define XFREE(stale) do { \ -+ if (stale) { free ((void *) stale); stale = 0; } \ -+} while (0) -+ -+/* -DDEBUG is fairly common in CFLAGS. */ -+#undef DEBUG -+#if defined DEBUGWRAPPER -+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -+#else -+# define DEBUG(format, ...) -+#endif -+ -+const char *program_name = NULL; -+ -+void * xmalloc (size_t num); -+char * xstrdup (const char *string); -+const char * base_name (const char *name); -+char * find_executable(const char *wrapper); -+int check_executable(const char *path); -+char * strendzap(char *str, const char *pat); -+void lt_fatal (const char *message, ...); -+ -+int -+main (int argc, char *argv[]) -+{ -+ char **newargz; -+ int i; -+ -+ program_name = (char *) xstrdup (base_name (argv[0])); -+ DEBUG("(main) argv[0] : %s\n",argv[0]); -+ DEBUG("(main) program_name : %s\n",program_name); -+ newargz = XMALLOC(char *, argc+2); -+EOF -+ -+ cat >> $cwrappersource <> $cwrappersource <<"EOF" -+ newargz[1] = find_executable(argv[0]); -+ if (newargz[1] == NULL) -+ lt_fatal("Couldn't find %s", argv[0]); -+ DEBUG("(main) found exe at : %s\n",newargz[1]); -+ /* we know the script has the same name, without the .exe */ -+ /* so make sure newargz[1] doesn't end in .exe */ -+ strendzap(newargz[1],".exe"); -+ for (i = 1; i < argc; i++) -+ newargz[i+1] = xstrdup(argv[i]); -+ newargz[argc+1] = NULL; -+ -+ for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" -+ return 127; -+} -+ -+void * -+xmalloc (size_t num) -+{ -+ void * p = (void *) malloc (num); -+ if (!p) -+ lt_fatal ("Memory exhausted"); -+ -+ return p; -+} -+ -+char * -+xstrdup (const char *string) -+{ -+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL -+; -+} -+ -+const char * -+base_name (const char *name) -+{ -+ const char *base; -+ -+#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 -+ -+ for (base = name; *name; name++) -+ if (IS_DIR_SEPARATOR (*name)) -+ base = name + 1; -+ return base; -+} -+ -+int -+check_executable(const char * path) -+{ -+ struct stat st; -+ -+ DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); -+ if ((!path) || (!*path)) -+ return 0; -+ -+ if ((stat (path, &st) >= 0) && -+ ( -+ /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -+#if defined (S_IXOTH) -+ ((st.st_mode & S_IXOTH) == S_IXOTH) || -+#endif -+#if defined (S_IXGRP) -+ ((st.st_mode & S_IXGRP) == S_IXGRP) || -+#endif -+ ((st.st_mode & S_IXUSR) == S_IXUSR)) -+ ) -+ return 1; -+ else -+ return 0; -+} -+ -+/* Searches for the full path of the wrapper. Returns -+ newly allocated full path name if found, NULL otherwise */ -+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; -+ -+ DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); -+ -+ 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 ("getcwd failed"); -+ 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 ("getcwd failed"); -+ 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 * -+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; -+} -+ -+static void -+lt_error_core (int exit_status, const char * mode, -+ const char * message, va_list ap) -+{ -+ fprintf (stderr, "%s: %s: ", program_name, mode); -+ vfprintf (stderr, message, ap); -+ fprintf (stderr, ".\n"); -+ -+ if (exit_status >= 0) -+ exit (exit_status); -+} -+ -+void -+lt_fatal (const char *message, ...) -+{ -+ va_list ap; -+ va_start (ap, message); -+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap); -+ va_end (ap); -+} -+EOF -+ # we should really use a build-platform specific compiler -+ # here, but OTOH, the wrappers (shell script and this C one) -+ # are only useful if you want to execute the "real" binary. -+ # Since the "real" binary is built for $host, then this -+ # wrapper might as well be built for $host, too. -+ $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource -+ ;; -+ esac -+ $rm $output -+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ - #! $SHELL -@@ -3990,14 +5325,28 @@ - - # Sed substitution that helps us do robust quoting. It backslashifies - # metacharacters that are still active within double-quoted strings. +- +- $echo > $output "\ +-#! $SHELL +- +-# $output - temporary wrapper script for $objdir/$outputname +-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +-# +-# 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. +- +-# Sed substitution that helps us do robust quoting. It backslashifies +-# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -+Xsed='${SED} -e 1s/^X//' - sed_quote_subst='$sed_quote_subst' - -+# Be Bourne compatible (taken from Autoconf:_AS_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 -+ - # The HP-UX ksh and POSIX shell print the target directory to stdout - # if CDPATH is set. +-sed_quote_subst='$sed_quote_subst' +- +-# The HP-UX ksh and POSIX shell print the target directory to stdout +-# if CDPATH is set. -if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi -+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - +- -relink_command=\"$relink_command > /dev/null 2>&1\" -+relink_command=\"$relink_command\" - - # This environment variable determines our operation mode. - if test \"\$libtool_install_magic\" = \"$magic\"; then -@@ -4028,7 +5377,7 @@ - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. +- +-# This environment variable determines our operation mode. +-if test \"\$libtool_install_magic\" = \"$magic\"; then +- # install mode needs the following variable: +- 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 +- echo=\"$qecho\" +- file=\"\$0\" +- # Make sure echo works. +- if test \"X\$1\" = X--no-reexec; then +- # Discard the --no-reexec flag, and continue. +- shift +- elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then +- # Yippee, \$echo works! +- : +- else +- # Restart under the correct shell, and then maybe \$echo will work. +- exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} +- fi +- fi\ +-" +- $echo >> $output "\ +- +- # Find the directory that this script lives in. +- thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` +- test \"x\$thisdir\" = \"x\$file\" && thisdir=. +- +- # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` -+ file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - -@@ -4041,7 +5390,7 @@ - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` +- while test -n \"\$file\"; do +- destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` +- +- # 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 +- +- file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` -+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. -@@ -4050,12 +5399,12 @@ - " - - if test "$fast_install" = yes; then +- done +- +- # Try to get the absolute directory name. +- absdir=\`cd \"\$thisdir\" && pwd\` +- test -n \"\$absdir\" && thisdir=\"\$absdir\" +-" +- +- if test "$fast_install" = yes; then - echo >> $output "\ -+ $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ +- program=lt-'$outputname'$exeext +- progdir=\"\$thisdir/$objdir\" +- +- if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ -+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" -@@ -4066,15 +5415,15 @@ - $rm \"\$progdir/\$file\" - fi" - +- test \"X\$file\" != \"X\$progdir/\$program\"; }; then +- +- file=\"\$\$-\$program\" +- +- if test ! -d \"\$progdir\"; then +- $mkdir \"\$progdir\" +- else +- $rm \"\$progdir/\$file\" +- fi" +- - echo >> $output "\ -+ $echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else +- +- # 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 -+ $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" +- $rm \"\$progdir/\$file\" - exit 1 -+ exit $EXIT_FAILURE - fi - fi - -@@ -4084,13 +5433,13 @@ - $rm \"\$progdir/\$file\" - fi" - else +- fi +- fi +- +- $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || +- { $rm \"\$progdir/\$program\"; +- $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } +- $rm \"\$progdir/\$file\" +- fi" +- else - echo >> $output "\ -+ $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" - " - fi - +- program='$outputname' +- progdir=\"\$thisdir/$objdir\" +-" +- fi +- - echo >> $output "\ -+ $echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" +- +- if test -f \"\$progdir/\$program\"; then" +- +- # Export our shlibpath_var if we have one. +- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then +- $echo >> $output "\ +- # Add our own library path to $shlibpath_var +- $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" +- +- # 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 \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` +- +- export $shlibpath_var +-" +- fi ++ case $host in ++ *cygwin* | *mingw* ) ++ func_dirname_and_basename "$output" "" "." ++ output_name=$func_basename_result ++ output_path=$func_dirname_result ++ cwrappersource="$output_path/$objdir/lt-$output_name.c" ++ cwrapper="$output_path/$output_name.exe" ++ $RM $cwrappersource $cwrapper ++ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + +- # fixup the dll searchpath if we need to. +- if test -n "$dllsearchpath"; then +- $echo >> $output "\ +- # Add the dll search path components to the executable PATH +- PATH=$dllsearchpath:\$PATH +-" +- fi ++ func_emit_cwrapperexe_src > $cwrappersource -@@ -4121,47 +5470,35 @@ - # Run the actual program with our arguments. - " - case $host in +- $echo >> $output "\ +- if test \"\$libtool_execute_magic\" != \"$magic\"; then +- # Run the actual program with our arguments. +-" +- case $host in - # win32 systems need to use the prog path for dll - # lookup to work - *-*-cygwin* | *-*-pw32*) @@ -38360,57 +43348,88 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - exec \$progdir/\$program \${1+\"\$@\"} -" - ;; -- - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ ++ # The wrapper executable is built using the $host compiler, ++ # because it contains $host paths and files. If cross- ++ # compiling, it, like the target executable, must be ++ # executed on the $host or under an emulation environment. ++ $opt_dry_run || { ++ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource ++ $STRIP $cwrapper ++ } + +- # Backslashes separate directories on plain windows +- *-*-mingw | *-*-os2*) +- $echo >> $output "\ - exec \$progdir\\\\\$program \${1+\"\$@\"} -+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} - " +-" ++ # Now, create the wrapper script for func_source use: ++ func_ltwrapper_scriptname $cwrapper ++ $RM $func_ltwrapper_scriptname_result ++ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 ++ $opt_dry_run || { ++ # note: this script will not be executed, so do not chmod. ++ if test "x$build" = "x$host" ; then ++ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result ++ else ++ func_emit_wrapper no > $func_ltwrapper_scriptname_result ++ fi ++ } ;; ++ * ) ++ $RM $output ++ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - *) - $echo >> $output "\ +- *) +- $echo >> $output "\ - # Export the path to the program. - PATH=\"\$progdir:\$PATH\" - export PATH - - exec \$program \${1+\"\$@\"} -+ exec \"\$progdir/\$program\" \${1+\"\$@\"} - " +-" ++ func_emit_wrapper no > $output ++ chmod +x $output ;; esac - $echo >> $output "\ +- $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" - exit 1 -+ \$echo \"\$0: cannot exec \$program \$*\" -+ exit $EXIT_FAILURE - fi - else - # The program doesn't exist. +- fi +- else +- # The program doesn't exist. - \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 -+ \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 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 -+ $echo \"See the $PACKAGE documentation for more information.\" 1>&2 -+ exit $EXIT_FAILURE - fi - fi\ - " - chmod +x $output - fi +- fi +-fi\ +-" +- chmod +x $output +- fi - exit 0 ++ } + exit $EXIT_SUCCESS ;; esac -@@ -4177,106 +5514,130 @@ +@@ -4169,7 +7874,7 @@ + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then +- oldobjs="$libobjs_save" ++ oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else +@@ -4177,146 +7882,167 @@ oldobjs="$libobjs_save" build_libtool_libs=no else - oldobjs="$objs$old_deplibs $non_pic_objects" + oldobjs="$old_deplibs $non_pic_objects" ++ if test "$preload" = yes && test -f "$symfileobj"; then ++ oldobjs="$oldobjs $symfileobj" ++ fi fi addlibs="$old_convenience" fi @@ -38457,7 +43476,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - eval cmds=\"$old_archive_from_new_cmds\" -+ cmds=$old_archive_from_new_cmds ++ cmds=$old_archive_from_new_cmds else -# # Ensure that we have .o objects in place in case we decided -# # not to build a shared library, and have fallen back to building @@ -38476,6 +43495,23 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh -# $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? -# fi -# done + +- eval cmds=\"$old_archive_cmds\" ++ # Add any objects from preloaded convenience libraries ++ if test -n "$dlprefiles"; then ++ gentop="$output_objdir/${outputname}x" ++ generated="$generated $gentop" + +- if len=`expr "X$cmds" : ".*"` && +- test $len -le $max_cmd_len; then +- : +- else +- # the command line is too long to link in one step, link in parts +- $echo "using piecewise archive linking..." ++ func_extract_archives $gentop $dlprefiles ++ oldobjs="$oldobjs $func_extract_archives_result" ++ fi ++ + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a @@ -38484,39 +43520,22 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + # not supported by libtool). + if (for obj in $oldobjs + do -+ $echo "X$obj" | $Xsed -e 's%^.*/%%' ++ func_basename "$obj" ++ $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else -+ $echo "copying selected object files to avoid basename conflicts..." - -- eval cmds=\"$old_archive_cmds\" -+ if test -z "$gentop"; then -+ gentop="$output_objdir/${outputname}x" -+ generated="$generated $gentop" - -- if len=`expr "X$cmds" : ".*"` && -- test $len -le $max_cmd_len; then -- : -- else -- # the command line is too long to link in one step, link in parts -- $echo "using piecewise archive linking..." -+ $show "${rm}r $gentop" -+ $run ${rm}r "$gentop" -+ $show "$mkdir $gentop" -+ $run $mkdir "$gentop" -+ exit_status=$? -+ if test "$exit_status" -ne 0 && test ! -d "$gentop"; then -+ exit $exit_status -+ fi -+ fi -+ ++ $ECHO "copying selected object files to avoid basename conflicts..." ++ gentop="$output_objdir/${outputname}x" ++ generated="$generated $gentop" ++ func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do -+ objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` ++ func_basename "$obj" ++ objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) @@ -38524,30 +43543,29 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase -+ counter=`expr $counter + 1` ++ func_arith $counter + 1 ++ counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done -+ $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" -+ $run ln "$obj" "$gentop/$newobj" || -+ $run cp "$obj" "$gentop/$newobj" ++ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi -+ + eval cmds=\"$old_archive_cmds\" + -+ if len=`expr "X$cmds" : ".*"` && -+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then ++ func_len " $cmds" ++ len=$func_len_result ++ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts -+ $echo "using piecewise archive linking..." ++ func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: - objlist= @@ -38567,25 +43585,29 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + objlist= + concat_cmds= + save_oldobjs=$oldobjs -+ ++ oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done ++ eval test_cmds=\"$old_archive_cmds\" ++ func_len " $test_cmds" ++ len0=$func_len_result ++ len=$len0 + for obj in $save_oldobjs + do -+ oldobjs="$objlist $obj" -+ objlist="$objlist $obj" -+ eval test_cmds=\"$old_archive_cmds\" -+ if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && -+ test "$len" -le "$max_cmd_len"; then ++ func_len " $obj" ++ func_arith $len + $func_len_result ++ len=$func_arith_result ++ func_append objlist " $obj" ++ if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then -+ RANLIB=$save_RANLIB ++ RANLIB=$save_RANLIB + fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" @@ -38594,6 +43616,7 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - done + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= ++ len=$len0 + fi + done RANLIB=$save_RANLIB @@ -38609,13 +43632,42 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + fi fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do -+ eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? -@@ -4308,12 +5669,12 @@ +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" || exit $? +- done +- IFS="$save_ifs" ++ func_execute_cmds "$cmds" 'exit $?' + done + +- if test -n "$generated"; then +- $show "${rm}r$generated" +- $run ${rm}r$generated +- fi ++ test -n "$generated" && \ ++ func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" +- $show "creating $output" ++ func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then +- relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" ++ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else +- var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` +- relink_command="$var=\"$var_value\"; export $var; $relink_command" ++ func_quote_for_eval "$var_value" ++ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. @@ -38626,54 +43678,86 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - relink_command="(cd `pwd`; $SHELL $0$tagopts --mode=relink $libtool_args)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" -+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` ++ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi -+ # Only create the output if not a dry run. - if test -z "$run"; then -@@ -4329,10 +5690,10 @@ +- if test -z "$run"; then ++ $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then +@@ -4328,12 +8054,11 @@ + for deplib in $dependency_libs; do case $deplib in *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` +- name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 +- if test -z "$libdir"; then +- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi +- fi ++ func_basename "$deplib" ++ name="$func_basename_result" ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` ++ test -z "$libdir" && \ ++ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; -@@ -4343,10 +5704,10 @@ + *) newdependency_libs="$newdependency_libs $deplib" ;; +@@ -4341,37 +8066,68 @@ + done + dependency_libs="$newdependency_libs" newdlfiles= ++ for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` +- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 +- if test -z "$libdir"; then +- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" +- fi +- newdlfiles="$newdlfiles $libdir/$name" ++ case $lib in ++ *.la) ++ func_basename "$lib" ++ name="$func_basename_result" ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` ++ test -z "$libdir" && \ ++ func_fatal_error "\`$lib' is not a valid libtool archive" ++ newdlfiles="$newdlfiles $libdir/$name" ++ ;; ++ *) newdlfiles="$newdlfiles $lib" ;; ++ esac done -@@ -4354,20 +5715,39 @@ + dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` +- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` -+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 +- if test -z "$libdir"; then +- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" +- fi +- newdlprefiles="$newdlprefiles $libdir/$name" ++ case $lib in ++ *.la) ++ # Only pass preopened files to the pseudo-archive (for ++ # eventual linking with the app. that links it) if we ++ # didn't already link the preopened objects directly into ++ # the library: ++ func_basename "$lib" ++ name="$func_basename_result" ++ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` ++ test -z "$libdir" && \ ++ func_fatal_error "\`$lib' is not a valid libtool archive" ++ newdlprefiles="$newdlprefiles $libdir/$name" ++ ;; ++ esac ++ done ++ dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do @@ -38691,19 +43775,42 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" -+ done -+ dlprefiles="$newdlprefiles" + done + dlprefiles="$newdlprefiles" fi - $rm $output +- $rm $output ++ $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; -+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; ++ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac - $echo > $output "\ +- $echo > $output "\ ++ $ECHO > $output "\ # $outputname - a libtool library file -@@ -4396,13 +5776,16 @@ +-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP ++# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION + # + # Please DO NOT delete this file! + # It is necessary for linking the library. +@@ -4385,9 +8141,15 @@ + # The name of the static archive. + old_library='$old_library' + ++# Linker flags that can not go in dependency_libs. ++inherited_linker_flags='$new_inherited_linker_flags' ++ + # Libraries that this one depends upon. + dependency_libs='$dependency_libs' + ++# Names of additional weak libraries provided by this library ++weak_library_names='$weak_libs' ++ + # Version information for $libname. + current=$current + age=$age +@@ -4396,692 +8158,39 @@ # Is this an already installed library? installed=$installed @@ -38717,333 +43824,380 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh # Directory that this library needs to be installed in: libdir='$install_libdir'" - if test "$installed" = no && test $need_relink = yes; then +- $echo >> $output "\ + if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ ++ $ECHO >> $output "\ relink_command=\"$relink_command\"" fi -@@ -4415,7 +5798,7 @@ - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac -- exit 0 -+ exit $EXIT_SUCCESS - ;; + done +- fi ++ } - # libtool install mode -@@ -4426,11 +5809,11 @@ - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. +- $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" +- $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? +- ;; +- esac +- exit 0 +- ;; +- +- # libtool install mode +- install) +- modename="$modename: install" +- +- # 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. - $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then -+ $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in +- # Aesthetically quote it. +- arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` +- case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac -@@ -4439,14 +5822,14 @@ - shift - else - install_prog= +- arg="\"$arg\"" +- ;; +- esac +- install_prog="$arg " +- arg="$1" +- shift +- else +- install_prog= - arg="$nonopt" -+ arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in +- fi +- +- # The real first argument should be the name of the installation program. +- # Aesthetically quote it. +- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` +- case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac -@@ -4464,28 +5847,31 @@ - do - if test -n "$dest"; then - files="$files $dest" +- arg="\"$arg\"" +- ;; +- esac +- install_prog="$install_prog$arg" +- +- # We need to accept at least all the BSD install flags. +- dest= +- files= +- opts= +- prev= +- install_type= +- isdir=no +- stripme= +- for arg +- do +- if test -n "$dest"; then +- files="$files $dest" - dest="$arg" -+ dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; +- continue +- fi +- +- case $arg in +- -d) isdir=yes ;; - -f) prev="-f" ;; - -g) prev="-g" ;; - -m) prev="-m" ;; - -o) prev="-o" ;; -+ -f) -+ case " $install_prog " in -+ *[\\\ /]cp\ *) ;; -+ *) prev=$arg ;; -+ esac -+ ;; -+ -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; +- -s) +- stripme=" -s" +- continue +- ;; - -*) ;; - -+ -*) -+ ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else +- *) +- # If the previous option needed an argument, then skip it. +- if test -n "$prev"; then +- prev= +- else - dest="$arg" -+ dest=$arg - continue - fi - ;; -@@ -4494,7 +5880,7 @@ - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in +- continue +- fi +- ;; +- esac +- +- # Aesthetically quote the argument. +- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` +- case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac -@@ -4504,13 +5890,13 @@ - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 +- arg="\"$arg\"" +- ;; +- esac +- install_prog="$install_prog $arg" +- done +- +- if test -z "$install_prog"; then +- $echo "$modename: you must specify an install program" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 +- fi +- +- if test -n "$prev"; then +- $echo "$modename: the \`$prev' option requires an argument" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi - - if test -z "$files"; then -@@ -4520,7 +5906,7 @@ - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 +- fi +- +- if test -z "$files"; then +- if test -z "$dest"; then +- $echo "$modename: no file or destination specified" 1>&2 +- else +- $echo "$modename: you must specify a destination" 1>&2 +- fi +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. -@@ -4538,10 +5924,10 @@ - - # Not a directory, so check to see that there is only one file specified. - set dummy $files +- fi +- +- # Strip any trailing slash from the destination. +- dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` +- +- # Check to see that the destination is a directory. +- test -d "$dest" && isdir=yes +- if test "$isdir" = yes; then +- destdir="$dest" +- destname= +- else +- destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` +- test "X$destdir" = "X$dest" && destdir=. +- destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` +- +- # Not a directory, so check to see that there is only one file specified. +- set dummy $files - if test $# -gt 2; then -+ if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 +- $echo "$modename: \`$dest' is not a directory" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi - fi - case $destdir in -@@ -4553,7 +5939,7 @@ - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 +- fi +- fi +- case $destdir in +- [\\/]* | [A-Za-z]:[\\/]*) ;; +- *) +- for file in $files; do +- case $file in +- *.lo) ;; +- *) +- $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - ;; - esac - done -@@ -4578,11 +5964,11 @@ +- ;; +- esac +- done ++ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac ++ exit $EXIT_SUCCESS ++} - *.la) - # Check to see that this really is a libtool archive. +- # 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. +- staticlibs="$staticlibs $file" +- ;; +- +- *.la) +- # Check to see that this really is a libtool archive. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : -+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 +- else +- $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi - - library_names= -@@ -4613,12 +5999,33 @@ - dir="$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 "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. -+ if test "$inst_prefix_dir" = "$destdir"; then -+ $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -+ exit $EXIT_FAILURE -+ fi -+ -+ if test -n "$inst_prefix_dir"; then -+ # Stick the inst_prefix_dir data into the link command. -+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` -+ else -+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` -+ fi -+ - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 +- fi +- +- library_names= +- old_library= +- relink_command= +- # If there is no directory component, then add one. +- case $file in +- */* | *\\*) . $file ;; +- *) . ./$file ;; +- esac +- +- # Add the libdir to current_libdirs if it is the destination. +- if test "X$destdir" = "X$libdir"; then +- case "$current_libdirs " in +- *" $libdir "*) ;; +- *) current_libdirs="$current_libdirs $libdir" ;; +- esac +- else +- # Note the libdir as a future libdir. +- case "$future_libdirs " in +- *" $libdir "*) ;; +- *) future_libdirs="$future_libdirs $libdir" ;; +- esac +- fi +- +- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ +- test "X$dir" = "X$file/" && dir= +- dir="$dir$objdir" +- +- if test -n "$relink_command"; then +- $echo "$modename: warning: relinking \`$file'" 1>&2 +- $show "$relink_command" +- if $run eval "$relink_command"; then : +- else +- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi - fi - -@@ -4640,25 +6047,38 @@ - $run eval "$striplib $destdir/$realname" || exit $? - fi - +- fi +- fi +- +- # See the names of the shared library. +- set dummy $library_names +- if test -n "$2"; then +- realname="$2" +- shift +- shift +- +- srcname="$realname" +- test -n "$relink_command" && srcname="$realname"T +- +- # Install the shared library and build the symlinks. +- $show "$install_prog $dir/$srcname $destdir/$realname" +- $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? +- if test -n "$stripme" && test -n "$striplib"; then +- $show "$striplib $destdir/$realname" +- $run eval "$striplib $destdir/$realname" || exit $? +- fi +- - if test $# -gt 0; then -+ 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 - if test "$linkname" != "$realname"; then +- # Delete the old symlinks, and create new ones. +- for linkname +- do +- if test "$linkname" != "$realname"; then - $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" -+ $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" -+ $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" +- fi +- done +- fi +- +- # Do each command in the postinstall commands. +- lib="$destdir/$realname" - eval cmds=\"$postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ cmds=$postinstall_cmds -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" - $run eval "$cmd" || exit $? -+ $run eval "$cmd" || { -+ lt_exit=$? -+ -+ # Restore the uninstalled library and exit -+ if test "$mode" = relink; then -+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' -+ fi -+ -+ exit $lt_exit -+ } - done - IFS="$save_ifs" - fi -@@ -4696,7 +6116,7 @@ - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 +- done +- IFS="$save_ifs" +- fi +- +- # Install the pseudo-library for information purposes. +- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` +- instname="$dir/$name"i +- $show "$install_prog $instname $destdir/$name" +- $run eval "$install_prog $instname $destdir/$name" || exit $? +- +- # Maybe install the static library, too. +- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" +- ;; +- +- *.lo) +- # Install (i.e. copy) a libtool object. +- +- # Figure out destination file name, if it wasn't already specified. +- if test -n "$destname"; then +- destfile="$destdir/$destname" +- else +- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` +- destfile="$destdir/$destfile" +- fi +- +- # Deduce the name of the destination old-style object file. +- case $destfile in +- *.lo) +- staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` +- ;; +- *.$objext) +- staticdest="$destfile" +- destfile= +- ;; +- *) +- $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - ;; - esac - -@@ -4714,7 +6134,7 @@ - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi +- ;; +- esac +- +- # Install the libtool object if requested. +- if test -n "$destfile"; then +- $show "$install_prog $file $destfile" +- $run eval "$install_prog $file $destfile" || exit $? +- fi +- +- # Install the old object if enabled. +- if test "$build_old_libs" = yes; then +- # Deduce the name of the old-style object file. +- staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` +- +- $show "$install_prog $staticobj $staticdest" +- $run eval "$install_prog \$staticobj \$staticdest" || exit $? +- fi - exit 0 -+ exit $EXIT_SUCCESS - ;; - - *) -@@ -4726,21 +6146,47 @@ - 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 -+ file=`$echo $file|${SED} 's,.exe$,,'` -+ stripped_ext=".exe" -+ fi -+ ;; -+ esac -+ - # Do a test to see if this is really a libtool program. +- ;; +- +- *) +- # Figure out destination file name, if it wasn't already specified. +- if test -n "$destname"; then +- destfile="$destdir/$destname" +- else +- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` +- destfile="$destdir/$destfile" +- fi +- +- # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -+ case $host in -+ *cygwin*|*mingw*) -+ wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` -+ ;; -+ *) -+ wrapper=$file -+ ;; -+ esac -+ if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - -+ # Note that it is not necessary on cygwin/mingw to append a dot to -+ # foo even if both foo 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. -+ # - # If there is no directory component, then add one. +- notinst_deplibs= +- relink_command= +- +- # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; -+ case $wrapper in -+ */* | *\\*) . ${wrapper} ;; -+ *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then +- esac +- +- # Check the variables that should have been set. +- if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 - exit 1 -+ $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 -+ exit $EXIT_FAILURE - fi - - finalize=yes -@@ -4762,27 +6208,25 @@ - done - - relink_command= -+ # Note that it is not necessary on cygwin/mingw to append a dot to -+ # foo even if both foo 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. -+ # - # If there is no directory component, then add one. +- fi +- +- finalize=yes +- for lib in $notinst_deplibs; do +- # Check to see that each library is installed. +- libdir= +- if test -f "$lib"; then +- # If there is no directory component, then add one. +- case $lib in +- */* | *\\*) . $lib ;; +- *) . ./$lib ;; +- esac +- fi +- libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test +- if test -n "$libdir" && test ! -f "$libfile"; then +- $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 +- finalize=no +- fi +- done +- +- relink_command= +- # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; -+ case $wrapper in -+ */* | *\\*) . ${wrapper} ;; -+ *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then +- esac +- +- outputname= +- if test "$fast_install" = no && test -n "$relink_command"; then +- if test "$finalize" = yes && test -z "$run"; then - tmpdir="/tmp" - test -n "$TMPDIR" && tmpdir="$TMPDIR" - tmpdir="$tmpdir/libtool-$$" @@ -39053,213 +44207,284 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - continue - fi - file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` -+ tmpdir=`func_mktempdir` -+ file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. +- outputname="$tmpdir/$file" +- # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` -+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` - - $show "$relink_command" - if $run eval "$relink_command"; then : -@@ -4797,13 +6241,12 @@ - fi - else - # Install the binary that we compiled earlier. +- +- $show "$relink_command" +- if $run eval "$relink_command"; then : +- else +- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 +- ${rm}r "$tmpdir" +- continue +- fi +- file="$outputname" +- else +- $echo "$modename: warning: cannot relink \`$file'" 1>&2 +- fi +- else +- # Install the binary that we compiled earlier. - file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` -+ file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - +- fi +- fi - - # remove .exe since cygwin /usr/bin/install will append another +- +- # remove .exe since cygwin /usr/bin/install will append another - # one anyways -+ # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in -@@ -4814,12 +6257,11 @@ - destfile=$destfile.exe - ;; - *:*.exe) +- case $install_prog,$host in +- */usr/bin/install*,*cygwin*) +- case $file:$destfile in +- *.exe:*.exe) +- # this is ok +- ;; +- *.exe:*) +- destfile=$destfile.exe +- ;; +- *:*.exe) - destfile=`echo $destfile | sed -e 's,.exe$,,'` -+ destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; - esac +- ;; +- esac +- ;; +- esac +- +- $show "$install_prog$stripme $file $destfile" +- $run eval "$install_prog\$stripme \$file \$destfile" || exit $? +- test -n "$outputname" && ${rm}r "$tmpdir" +- ;; +- esac +- done +- +- for file in $staticlibs; do +- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` +- +- # Set up the ranlib parameters. +- oldlib="$destdir/$name" +- +- $show "$install_prog $file $oldlib" +- $run eval "$install_prog \$file \$oldlib" || exit $? - - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" -@@ -4836,16 +6278,17 @@ - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$striplib"; then -+ if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. +- $show "$old_striplib $oldlib" +- $run eval "$old_striplib $oldlib" || exit $? +- fi +- +- # Do each command in the postinstall commands. - eval cmds=\"$old_postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ cmds=$old_postinstall_cmds -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done -@@ -4859,9 +6302,9 @@ - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" || exit $? +- done +- IFS="$save_ifs" +- done +- +- if test -n "$future_libdirs"; then +- $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 +- fi +- +- if test -n "$current_libdirs"; then +- # Maybe just do a dry run. +- test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $0 --finish$current_libdirs' -+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else +- else - exit 0 -+ exit $EXIT_SUCCESS - fi - ;; - -@@ -4880,10 +6323,11 @@ - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. +- fi +- ;; +- +- # libtool finish mode +- finish) +- modename="$modename: finish" +- libdirs="$nonopt" +- admincmds= +- +- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then +- for dir +- do +- libdirs="$libdirs $dir" +- done +- +- for libdir in $libdirs; do +- if test -n "$finish_cmds"; then +- # Do each command in the finish commands. - eval cmds=\"$finish_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ cmds=$finish_cmds -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" -@@ -4900,43 +6344,43 @@ - fi - - # Exit here if they wanted silent mode. +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" || admincmds="$admincmds +- $cmd" +- done +- IFS="$save_ifs" +- fi +- if test -n "$finish_eval"; then +- # Do the single finish_eval. +- eval cmds=\"$finish_eval\" +- $run eval "$cmds" || admincmds="$admincmds +- $cmds" +- fi +- done +- fi +- +- # Exit here if they wanted silent mode. - test "$show" = ":" && exit 0 -+ test "$show" = : && exit $EXIT_SUCCESS - +- - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" -+ $echo "X----------------------------------------------------------------------" | $Xsed -+ $echo "Libraries have been installed in:" - for libdir in $libdirs; do +- for libdir in $libdirs; do - echo " $libdir" -+ $echo " $libdir" - done +- 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:" -+ $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 +- if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" -+ $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" -+ $echo " during execution" - fi - if test -n "$runpath_var"; then +- fi +- if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" -+ $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\" - +- fi +- if test -n "$hardcode_libdir_flag_spec"; then +- libdir=LIBDIR +- eval flag=\"$hardcode_libdir_flag_spec\" +- - echo " - use the \`$flag' linker flag" -+ $echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then +- fi +- if test -n "$admincmds"; then - echo " - have your system administrator run these commands:$admincmds" -+ $echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then +- fi +- if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" -+ $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi +- fi - echo - echo "See any operating system documentation about shared libraries for" - echo "more information, such as the ld(1) and ld.so(8) manual pages." - echo "----------------------------------------------------------------------" - exit 0 -+ $echo -+ $echo "See any operating system documentation about shared libraries for" -+ $echo "more information, such as the ld(1) and ld.so(8) manual pages." -+ $echo "X----------------------------------------------------------------------" | $Xsed -+ exit $EXIT_SUCCESS - ;; - - # libtool execute mode -@@ -4948,7 +6392,7 @@ - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" +- ;; +- +- # libtool execute mode +- execute) +- modename="$modename: execute" +- +- # The first argument is the command name. +- cmd="$nonopt" +- if test -z "$cmd"; then +- $echo "$modename: you must specify a COMMAND" 1>&2 +- $echo "$help" - exit 1 -+ exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. -@@ -4956,18 +6400,18 @@ - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 +- fi +- +- # Handle -dlopen flags immediately. +- for file in $execute_dlfiles; do +- if test ! -f "$file"; then +- $echo "$modename: \`$file' is not a file" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. +- fi +- +- dir= +- case $file in +- *.la) +- # Check to see that this really is a libtool archive. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : -+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 +- else +- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi - - # Read the libtool library. -@@ -4993,8 +6437,10 @@ - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else +- fi +- +- # Read the libtool library. +- dlname= +- library_names= +- +- # If there is no directory component, then add one. +- case $file in +- */* | *\\*) . $file ;; +- *) . ./$file ;; +- esac +- +- # Skip this library if it cannot be dlopened. +- if test -z "$dlname"; then +- # Warn if it was a shared library. +- test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" +- continue +- fi +- +- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` +- test "X$dir" = "X$file" && dir=. +- +- if test -f "$dir/$objdir/$dlname"; then +- dir="$dir/$objdir" +- else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit 1 -+ if test ! -f "$dir/$dlname"; then -+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 -+ exit $EXIT_FAILURE -+ fi - fi - ;; - -@@ -5034,7 +6480,7 @@ - -*) ;; - *) - # Do a test to see if this is really a libtool program. +- fi +- ;; +- +- *.lo) +- # Just add the directory containing the .lo file. +- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` +- test "X$dir" = "X$file" && dir=. +- ;; +- +- *) +- $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 +- 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 +- +- # This variable tells wrapper scripts just to set shlibpath_var +- # rather than running their programs. +- libtool_execute_magic="$magic" +- +- # Check if any of the arguments is a wrapper script. +- args= +- for file +- do +- case $file in +- -*) ;; +- *) +- # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -+ if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; -@@ -5057,16 +6503,16 @@ - eval "export $shlibpath_var" - fi +- # If there is no directory component, then add one. +- case $file in +- */* | *\\*) . $file ;; +- *) . ./$file ;; +- esac +- +- # Transform arg to wrapped name. +- file="$progdir/$program" +- fi +- ;; +- esac +- # Quote arguments (to preserve shell metacharacters). +- file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` +- args="$args \"$file\"" +- done +- +- if test -z "$run"; then +- if test -n "$shlibpath_var"; then +- # Export the shlibpath_var. +- eval "export $shlibpath_var" +- fi ++{ test "$mode" = link || test "$mode" = relink; } && ++ func_mode_link ${1+"$@"} - # Restore saved enviroment variables - if test "${save_LC_ALL+set}" = set; then @@ -39268,52 +44493,72 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - 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 -+ fi" -+ done - # Now prepare to actually exec the command. +- # Now prepare to actually exec the command. - exec_cmd='"$cmd"$args' -+ exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then -@@ -5074,7 +6520,7 @@ - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" +- else +- # 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 0 -+ exit $EXIT_SUCCESS - fi - ;; +- fi +- ;; +- +- # libtool clean and uninstall mode +- clean | uninstall) +- modename="$modename: $mode" +- rm="$nonopt" ++# func_mode_uninstall arg... ++func_mode_uninstall () ++{ ++ $opt_debug ++ RM="$nonopt" + files= + rmforce= + exit_status=0 +@@ -5093,33 +8202,32 @@ + for arg + do + case $arg in +- -f) rm="$rm $arg"; rmforce=yes ;; +- -*) rm="$rm $arg" ;; ++ -f) RM="$RM $arg"; rmforce=yes ;; ++ -*) RM="$RM $arg" ;; + *) files="$files $arg" ;; + esac + done -@@ -5102,24 +6548,25 @@ - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 +- if test -z "$rm"; then +- $echo "$modename: you must specify an RM program" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi +- fi ++ test -z "$RM" && \ ++ func_fatal_help "you must specify an RM program" rmdirs= + origobjdir="$objdir" for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. +- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` +- if test "X$dir" = "X$file"; then +- dir=. - objdir="$objdir" ++ func_dirname "$file" "" "." ++ dir="$func_dirname_result" ++ if test "X$dir" = X.; then + objdir="$origobjdir" else - objdir="$dir/$objdir" + objdir="$dir/$origobjdir" fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` +- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - test $mode = uninstall && objdir="$dir" ++ func_basename "$file" ++ name="$func_basename_result" + test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates @@ -39322,14 +44567,17 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; -@@ -5128,14 +6575,14 @@ +@@ -5127,15 +8235,15 @@ + fi # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ +- if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ -+ || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then +- || test -f "$file"; then - : ++ if { test -L "$file"; } >/dev/null 2>&1 || ++ { test -h "$file"; } >/dev/null 2>&1 || ++ test -f "$file"; then + : elif test -d "$file"; then - exit_status=1 @@ -39341,16 +44589,17 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh fi rmfiles="$file" -@@ -5143,7 +6590,7 @@ +@@ -5143,312 +8251,132 @@ case $name in *.la) # Possibly a libtool archive, so verify it. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name +- . $dir/$name ++ if func_lalib_p "$file"; then ++ func_source $dir/$name # Delete the libtool libraries and symlinks. -@@ -5151,18 +6598,27 @@ + for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" @@ -39364,44 +44613,39 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac -+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ++ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. - eval cmds=\"$postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ cmds=$postuninstall_cmds -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" - if test $? != 0 && test "$rmforce" != yes; then -+ if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done -@@ -5171,54 +6627,72 @@ +- exit_status=1 +- fi +- done +- IFS="$save_ifs" ++ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - eval cmds=\"$old_postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -+ cmds=$old_postuninstall_cmds -+ save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" - if test $? != 0 && test "$rmforce" != yes; then -+ if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" +- exit_status=1 +- fi +- done +- IFS="$save_ifs" ++ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. - fi @@ -39413,18 +44657,18 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh *.lo) # Possibly a libtool object, so verify it. - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then ++ if func_lalib_p "$file"; then - # Read the .lo file - . $dir/$name + # Read the .lo file -+ . $dir/$name ++ func_source $dir/$name # Add PIC object to the list of files to remove. - if test -n "$pic_object" \ - && test "$pic_object" != none; then -+ if test -n "$pic_object" \ -+ && test "$pic_object" != none; then ++ if test -n "$pic_object" && ++ test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" - fi + fi @@ -39432,8 +44676,8 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" \ - && test "$non_pic_object" != none; then -+ if test -n "$non_pic_object" \ -+ && test "$non_pic_object" != none; then ++ if test -n "$non_pic_object" && ++ test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" - fi + fi @@ -39450,17 +44694,26 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + noexename=$name + case $file in + *.exe) -+ file=`$echo $file|${SED} 's,.exe$,,'` -+ noexename=`$echo $name|${SED} 's,.exe$,,'` ++ func_stripname '' '.exe' "$file" ++ file=$func_stripname_result ++ func_stripname '' '.exe' "$name" ++ noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. -+ if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -+ relink_command= -+ . $dir/$noexename ++ if func_ltwrapper_p "$file"; then ++ if func_ltwrapper_executable_p "$file"; then ++ func_ltwrapper_scriptname "$file" ++ relink_command= ++ func_source $func_ltwrapper_scriptname_result ++ rmfiles="$rmfiles $func_ltwrapper_scriptname_result" ++ else ++ relink_command= ++ func_source $dir/$noexename ++ fi - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then @@ -39477,118 +44730,272 @@ diff -dur gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh fi fi ;; -@@ -5226,6 +6700,7 @@ - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 + esac +- $show "$rm $rmfiles" +- $run $rm $rmfiles || exit_status=1 ++ func_show_eval "$RM $rmfiles" 'exit_status=1' done + objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do -@@ -5241,20 +6716,20 @@ - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 + if test -d "$dir"; then +- $show "rmdir $dir" +- $run rmdir $dir >/dev/null 2>&1 ++ func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +- ;; ++} + +- "") +- $echo "$modename: you must specify a MODE" 1>&2 +- $echo "$generic_help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - ;; - esac +- ;; +- esac ++{ test "$mode" = uninstall || test "$mode" = clean; } && ++ func_mode_uninstall ${1+"$@"} - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 +- if test -z "$exec_cmd"; then +- $echo "$modename: invalid operation mode \`$mode'" 1>&2 +- $echo "$generic_help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - fi - fi # test -z "$show_help" +- fi +-fi # test -z "$show_help" ++test -z "$mode" && { ++ help="$generic_help" ++ func_fatal_help "you must specify a MODE" ++} ++ ++test -z "$exec_cmd" && \ ++ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then - eval exec $exec_cmd +- eval exec $exec_cmd - exit 1 ++ eval exec "$exec_cmd" + exit $EXIT_FAILURE fi - # We need to display help for each of the modes. -@@ -5287,8 +6762,10 @@ - uninstall remove libraries from an installed directory - - MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +-# We need to display help for each of the modes. +-case $mode in +-"") $echo \ +-"Usage: $modename [OPTION]... [MODE-ARG]... +- +-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 +- --finish same as \`--mode=finish' +- --help display this help message and exit +- --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] +- --quiet same as \`--silent' +- --silent don't print informational messages +- --tag=TAG use configuration variables from tag TAG +- --version print version information +- +-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. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE." - exit 0 -+a more detailed description of MODE. -+ -+Report bugs to ." -+ exit $EXIT_SUCCESS - ;; - - clean) -@@ -5389,9 +6866,9 @@ - -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 +- ;; +- +-clean) +- $echo \ +-"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... +- +-Remove files from the build 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, object or program, all the files associated +-with it are deleted. Otherwise, only FILE itself is deleted using RM." +- ;; +- +-compile) +- $echo \ +-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE +- +-Compile a source file into a libtool library object. +- +-This mode accepts the following additional options: +- +- -o OUTPUT-FILE set the output file name to OUTPUT-FILE +- -prefer-pic try to building PIC objects only +- -prefer-non-pic try to building non-PIC objects only +- -static always build a \`.o' file suitable for static linking +- +-COMPILE-COMMAND is a command to be used in creating a \`standard' object file +-from the given SOURCEFILE. +- +-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'." +- ;; +- +-execute) +- $echo \ +-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... +- +-Automatically set library path, then run a program. +- +-This mode accepts the following additional options: +- +- -dlopen FILE add the directory containing FILE to the library path +- +-This mode sets the library path environment variable according to \`-dlopen' +-flags. +- +-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." +- ;; +- +-finish) +- $echo \ +-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... +- +-Complete the installation of libtool libraries. +- +-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." +- ;; +- +-install) +- $echo \ +-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... +- +-Install executables or libraries. +- +-INSTALL-COMMAND is the installation command. The first component should be +-either the \`install' or \`cp' program. +- +-The rest of the components are interpreted as arguments to that command (only +-BSD-compatible install options are recognized)." +- ;; +- +-link) +- $echo \ +-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... +- +-Link object files or libraries together to form another library, or to +-create an executable program. +- +-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: +- +- -all-static do not do any dynamic linking at all +- -avoid-version do not add a version suffix if possible +- -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 -+ try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX +- -export-symbols-regex REGEX - try to export only the symbols matching 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 -@@ -5400,12 +6877,16 @@ - -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 +- -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 +- -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 - -static do not do any dynamic linking of libtool libraries -+ -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]] +- -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] -+ specify library version info [each variable defaults to 0] - - All other options (arguments beginning with \`-') are ignored. - -@@ -5441,14 +6922,14 @@ - *) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 +- +-All other options (arguments beginning with \`-') are ignored. +- +-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. +- +-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." +- ;; +- +-uninstall) +- $echo \ +-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... +- +-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." +- ;; +- +-*) +- $echo "$modename: invalid operation mode \`$mode'" 1>&2 +- $echo "$help" 1>&2 - exit 1 -+ exit $EXIT_FAILURE - ;; - esac - +- ;; +-esac +- -echo -+$echo - $echo "Try \`$modename --help' for more information about other modes." +-$echo "Try \`$modename --help' for more information about other modes." ++exit $exit_status -exit 0 -+exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting -@@ -5461,14 +6942,13 @@ +@@ -5461,16 +8389,18 @@ # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. -### BEGIN LIBTOOL TAG CONFIG: disable-shared --build_libtool_libs=no --build_old_libs=yes --### END LIBTOOL TAG CONFIG: disable-shared +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -+disable_libs=shared + build_libtool_libs=no + build_old_libs=yes +-### END LIBTOOL TAG CONFIG: disable-shared +# ### END LIBTOOL TAG CONFIG: disable-shared -### BEGIN LIBTOOL TAG CONFIG: disable-static --build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` --### END LIBTOOL TAG CONFIG: disable-static +# ### BEGIN LIBTOOL TAG CONFIG: disable-static -+disable_libs=static + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +-### END LIBTOOL TAG CONFIG: disable-static +# ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script + # sh-indentation:2 + # End: ++# vi:sw=2 ++ diff --git a/gcl-2.6.8-plt.patch b/gcl-2.6.8-plt.patch new file mode 100644 index 0000000..538a133 --- /dev/null +++ b/gcl-2.6.8-plt.patch @@ -0,0 +1,24 @@ +diff -dur gcl-2.6.8.ORIG/o/makefile gcl-2.6.8/o/makefile +--- gcl-2.6.8.ORIG/o/makefile 2009-08-11 15:11:17.769474923 -0600 ++++ gcl-2.6.8/o/makefile 2009-08-11 15:11:46.167645473 -0600 +@@ -149,7 +149,7 @@ + $(CC) -c $(CFLAGS) $(DEFS) $*.c $(AUX_INFO) + + plt.h: plttest.o +- nm $< | $(AWK) '/ U / {if ($$NF!=2) next;a=$$2;if (k) sub("^_","",a);\ ++ nm $< | $(AWK) '/ U / {if (NF!=2) next;a=$$2;if (k) sub("^_","",a);\ + print a}' \ + k=$(LEADING_UNDERSCORE) |\ + sort | \ +diff -dur gcl-2.6.8.ORIG/o/plt.c gcl-2.6.8/o/plt.c +--- gcl-2.6.8.ORIG/o/plt.c 2008-08-03 09:16:22.000000000 -0600 ++++ gcl-2.6.8/o/plt.c 2009-08-11 15:12:26.627506327 -0600 +@@ -135,7 +135,7 @@ + for (i=j=0,li=Cnil;fgets(b,sizeof(b),f);) { + if (!memchr(b,10,sizeof(b)-1)) + FEerror("plt buffer too small", 0); +- if (memcmp(b," .plt",4) && !i) ++ if ((memcmp(b," .plt",4) || memcmp(b," .iplt",5)) && !i) + continue; + if (*b=='\r' || *b=='\n') { + i=0; diff --git a/gcl.spec b/gcl.spec index 485917a..85d50af 100644 --- a/gcl.spec +++ b/gcl.spec @@ -1,29 +1,29 @@ # -fstack-protector leads to segfaults because GCL uses its own conflicting # stack protection scheme. -%define __global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 +%global __global_cflags %(printf %%s '%__global_cflags' | sed 's/ -fstack-protector --param=ssp-buffer-size=4//') # Prerelease of 2.6.8 -%define alphatag 20090303cvs +%global alphatag 20090701cvs # If the emacs-el package has installed a pkgconfig file, use that to determine # install locations and Emacs version at build time, otherwise set defaults. %if %($(pkg-config emacs) ; echo $?) -%define emacs_version 22.2 -%define emacs_lispdir %{_datadir}/emacs/site-lisp +%global emacs_version 22.2 +%global emacs_lispdir %{_datadir}/emacs/site-lisp %else -%define emacs_version %(pkg-config emacs --modversion) -%define emacs_lispdir %(pkg-config emacs --variable sitepkglispdir) +%global emacs_version %(pkg-config emacs --modversion) +%global emacs_lispdir %(pkg-config emacs --variable sitepkglispdir) %endif # If the xemacs-devel package has installed a pkgconfig file, use that to # determine install locations and Emacs version at build time, otherwise set # defaults. %if %($(pkg-config xemacs) ; echo $?) -%define xemacs_version 21.5 -%define xemacs_lispdir %{_datadir}/xemacs/site-packages/lisp +%global xemacs_version 21.5 +%global xemacs_lispdir %{_datadir}/xemacs/site-packages/lisp %else -%define xemacs_version %(pkg-config xemacs --modversion) -%define xemacs_lispdir %(pkg-config xemacs --variable sitepkglispdir) +%global xemacs_version %(pkg-config xemacs --modversion) +%global xemacs_lispdir %(pkg-config xemacs --variable sitepkglispdir) %endif Name: gcl @@ -37,14 +37,15 @@ 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@cvs.savannah.gnu.org:/sources/gcl export \ -# -r Version_2_6_8pre -D 2009-03-04 -d gcl-2.6.8 gcl -# tar -cjvf gcl-2.6.8.tar.bz2 gcl-2.6.8 -Source0: gcl-%{version}.tar.bz2 +# -r Version_2_6_8pre -D 2009-07-02 -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 Source1: gcl.el # This is some info files that are needed for the DESCRIBE function to do # something useful. These files are present in CVS HEAD (i.e., the upcoming # 2.7.0 release), but are missing in the 2.6 branch. -Source2: gcl-2.6.8-info.tar.bz2 +Source2: gcl-2.6.8-info.tar.xz # This patch was last sent upstream on 29 Dec 2008. It makes GCL use the # sigprocmask API instead of the deprecated sigblock API. Patch0: gcl-2.6.8-sigprocmask-linux.patch @@ -96,6 +97,17 @@ Patch12: gcl-2.6.8-unrandomize.patch # This is a Fedora-specific patch. Do not delete C files produced from D files # so they can be pulled into the debuginfo package. Patch13: gcl-2.6.8-debuginfo.patch +# The need for this patch was last communicated to upstream on 21 May 2009. +# Without this patch, compilation fails due to conflicting type definitions +# between glibc and Linux kernel headers. This patch prevents the kernel +# headers from being used. +Patch14: gcl-2.6.8-asm-signal-h.patch +# This patch has not yet been sent upstream. It fixes two bugs in the reading +# of PLT information. +Patch15: gcl-2.6.8-plt.patch +# This patch has not yet been sent upstream. It fixes several malformed +# function prototypes involving an ellipsis. +Patch16: gcl-2.6.8-ellipsis.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libSM-devel BuildRequires: libXext-devel @@ -192,6 +204,9 @@ gcl_exec_t. %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 # Don't let the configure script add compiler flags we don't want sed -i -e 's/fomit-frame-pointer/fno-strict-aliasing/' -e 's/-O3/-O2/g' configure @@ -350,6 +365,14 @@ fi %changelog +* Tue Aug 11 2009 Jerry James - 2.6.8-0.4.20090701cvs +- Update to 20090701 CVS snapshot, fixes bz 511483 +- Break fix for out into a separate patch and do it right +- Add -plt patch to fix reading of PLT info +- Add -ellipsis patch to eliminate nondeterministic behavior +- Use xz payloads instead of bz2 +- Minor spec file cleanups + * Fri Jul 24 2009 Fedora Release Engineering - 2.6.8-0.4.20090303cvs - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index 3c323a0..ad3dc9c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -ead10281e7dff246c686c410b29caad6 gcl-2.6.8.tar.bz2 -70b0cf146c7b0dc0f598b98cc7320116 gcl-2.6.8-info.tar.bz2 +e795acac8df3f475d1ba82fc380deb4e gcl-2.6.8.tar.xz +b965d4ea561a9c3e019c65be69fcfb1e gcl-2.6.8-info.tar.xz