From 7fc6c88134cadb1da6ac2d6aaf286c5e2ba60b0f Mon Sep 17 00:00:00 2001 From: Jerry James Date: Dec 30 2010 21:20:27 +0000 Subject: * Thu Dec 30 2010 Jerry James - 2.6.8-0.7.20101115cvs - Update to 20101115 CVS snapshot for more bug fixes - Drop upstreamed loginname patch - Add man page patch - Add license file to -selinux package - Don't force dynamic BFD so we can use custreloc instead --- diff --git a/gcl-2.6.8-alloca.patch b/gcl-2.6.8-alloca.patch index f2afe85..0df1715 100644 --- a/gcl-2.6.8-alloca.patch +++ b/gcl-2.6.8-alloca.patch @@ -1,7 +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 2010-03-23 10:24:05.870956281 -0600 -@@ -53,11 +53,10 @@ +--- acconfig.h.orig 2009-02-23 12:39:42.000000000 -0700 ++++ acconfig.h 2010-12-30 10:24:39.000000000 -0700 +@@ -53,11 +53,10 @@ SGC is enabled. */ #undef HAVE_ALLOCA #endif @@ -15,10 +14,46 @@ diff -dur gcl-2.6.8.ORIG/acconfig.h gcl-2.6.8/acconfig.h #include #endif -diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure ---- gcl-2.6.8.ORIG/configure 2010-03-23 10:21:51.365951257 -0600 -+++ gcl-2.6.8/configure 2010-03-23 10:24:55.160971244 -0600 -@@ -645,6 +645,7 @@ +--- configure.in.orig 2010-12-29 13:49:09.000000000 -0700 ++++ configure.in 2010-12-30 10:25:19.000000000 -0700 +@@ -1874,33 +1874,7 @@ AC_SUBST(NOTIFY) + + # alloca + +-AC_MSG_CHECKING([for alloca]) +-AC_RUN_IFELSE([AC_LANG_PROGRAM([],[[exit(alloca(500) != NULL ? 0 : 1);]])] +- ,gcl_ok=yes, gcl_ok=no,gcl_ok=no) +-if test $gcl_ok = yes ; then +- AC_MSG_RESULT(yes) +- AC_DEFINE(HAVE_ALLOCA) +-else +- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +- #include +- ]],[[exit(alloca(500) != NULL ? 0 : 1);]])] +- ,gcl_ok=yes, gcl_ok=no,gcl_ok=no) +- if test $gcl_ok = yes ; then +- AC_MSG_RESULT(yes) +- AC_DEFINE(HAVE_ALLOCA) +- AC_DEFINE(NEED_ALLOCA_H) +- fi +-fi +-if test $gcl_ok = no ; then AC_MSG_RESULT(no) ; fi +- +- +- +- +- +- +- +- +- ++AC_FUNC_ALLOCA + + # dlopen etc + # idea make it so you do something dlopen(libX.so,RTLD_GLOBAL) +--- configure.orig 2010-12-29 13:49:15.000000000 -0700 ++++ configure 2010-12-30 10:52:29.000000000 -0700 +@@ -609,6 +609,7 @@ O3FLAGS NIFLAGS FINAL_CFLAGS BROKEN_O4_OPT @@ -26,26 +61,94 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure NOTIFY TCL_LIBS TCL_DL_LIBS -@@ -12839,10 +12840,12 @@ +@@ -2046,6 +2047,60 @@ $as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_check_func ++ ++# ac_fn_c_check_type LINENO TYPE VAR INCLUDES ++# ------------------------------------------- ++# Tests whether TYPE exists after having included INCLUDES, setting cache ++# variable VAR accordingly. ++ac_fn_c_check_type () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ eval "$3=no" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++int ++main () ++{ ++if (sizeof ($2)) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++int ++main () ++{ ++if (sizeof (($2))) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ++else ++ eval "$3=yes" ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ ++} # ac_fn_c_check_type + cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. +@@ -7776,83 +7831,205 @@ NOTIFY=$enable_notify # alloca --{ $as_echo "$as_me:$LINENO: checking for alloca" >&5 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } --if test "$cross_compiling" = yes; then +-if test "$cross_compiling" = yes; then : - gcl_ok=no ++ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" ++if test "x$ac_cv_type_size_t" = xyes; then : ++ ++else ++ ++cat >>confdefs.h <<_ACEOF ++#define size_t unsigned int ++_ACEOF ++ ++fi ++ +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! -+{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } -+if test "${ac_cv_working_alloca_h+set}" = set; then ++if ${ac_cv_working_alloca_h+:} false; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ -@@ -12850,16 +12853,17 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include @@ -58,65 +161,45 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure ; return 0; } +- _ACEOF --rm -f conftest$ac_exeext -+rm -f conftest.$ac_objext conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -@@ -12867,44 +12871,141 @@ - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 -- (eval "$ac_link") 2>&5 -+ (eval "$ac_link") 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); } && { ac_try='./conftest$ac_exeext' -- { (case "(($ac_try" in -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest$ac_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then +-if ac_fn_c_try_run "$LINENO"; then : +- gcl_ok=yes ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_working_alloca_h=no -+fi -+ -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 + else +- gcl_ok=no ++ ac_cv_working_alloca_h=no + fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_ALLOCA_H 1 -+_ACEOF -+ + +-if test $gcl_ok = yes ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h ++$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h + +-else +- if test "$cross_compiling" = yes; then : +- gcl_ok=no +fi + -+{ $as_echo "$as_me:$LINENO: checking for alloca" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } -+if test "${ac_cv_func_alloca_works+set}" = set; then ++if ${ac_cv_func_alloca_works+:} false; then : + $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +- #include +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else @@ -131,79 +214,51 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ -+char *alloca (); ++void *alloca (size_t); +# endif +# endif +# endif +# endif +#endif -+ -+int -+main () -+{ + + int + main () + { +-exit(alloca(500) != NULL ? 0 : 1); +char *p = (char *) alloca (1); + if (p) return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac - eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" - $as_echo "$ac_try_echo") >&5 -- (eval "$ac_try") 2>&5 -+ (eval "$ac_link") 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); }; }; then -- : -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest$ac_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then + ; + return 0; + } +- + _ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- gcl_ok=yes ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes else -- $as_echo "$as_me: program exited with status $ac_status" >&5 --$as_echo "$as_me: failed program was:" >&5 -+ $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --( exit $ac_status ) --gcl_ok=yes -+ ac_cv_func_alloca_works=no +- gcl_ok=no ++ ac_cv_func_alloca_works=no fi -+ - rm -rf conftest.dSYM --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } +- if test $gcl_ok = yes ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h +if test $ac_cv_func_alloca_works = yes; then --if test $gcl_ok = yes ; then -- { $as_echo "$as_me:$LINENO: result: yes" >&5 --$as_echo "yes" >&6; } -- cat >>confdefs.h <<\_ACEOF -+cat >>confdefs.h <<\_ACEOF - #define HAVE_ALLOCA 1 - _ACEOF +- $as_echo "#define NEED_ALLOCA_H 1" >>confdefs.h ++$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h - else -- if test "$cross_compiling" = yes; then -- gcl_ok=no +- fi ++else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, @@ -211,159 +266,61 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + -+cat >>confdefs.h <<\_ACEOF -+#define C_ALLOCA 1 -+_ACEOF ++$as_echo "#define C_ALLOCA 1" >>confdefs.h + + -+{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -+if test "${ac_cv_os_cray+set}" = set; then ++if ${ac_cv_os_cray+:} false; then : + $as_echo_n "(cached) " >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ -@@ -12912,17 +13013,163 @@ - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif - -- #include ++ +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "webecray" >/dev/null 2>&1; then ++ $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no -+fi + fi +-if test $gcl_ok = no ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } ; fi +rm -f conftest* -+ + +fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -+$as_echo_n "checking for $ac_func... " >&6; } -+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ -+/* System header to define __stub macros and hopefully few prototypes, -+ which can conflict with char $ac_func (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ -+ -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif -+ -+#undef $ac_func -+ -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char $ac_func (); -+/* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+#if defined __stub_$ac_func || defined __stub___$ac_func -+choke me -+#endif ++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - int - main () - { --exit(alloca(500) != NULL ? 0 : 1); -+return $ac_func (); - ; - return 0; - } - _ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ eval "$as_ac_var=yes" -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ eval "$as_ac_var=no" -+fi -+ -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+ac_res=`eval 'as_val=${'$as_ac_var'} -+ $as_echo "$as_val"'` -+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+as_val=`eval 'as_val=${'$as_ac_var'} -+ $as_echo "$as_val"'` -+ if test "x$as_val" = x""yes; then -+ +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF -+ + + break +fi -+ + + done +fi + -+{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } -+if test "${ac_cv_c_stack_direction+set}" = set; then ++if ${ac_cv_c_stack_direction+:} false; then : + $as_echo_n "(cached) " >&6 +else -+ if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 +else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int @@ -379,59 +336,25 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + else + return (&dummy > addr) ? 1 : -1; +} -+ + +int +main () +{ + return find_stack_direction () < 0; +} +_ACEOF - rm -f conftest$ac_exeext - if { (ac_try="$ac_link" - case "(($ac_try" in -@@ -12945,43 +13192,30 @@ - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- : ++if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 - else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ( exit $ac_status ) --gcl_ok=yes -+ac_cv_c_stack_direction=-1 - fi - rm -rf conftest.dSYM - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - ++else ++ ac_cv_c_stack_direction=-1 ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi -- if test $gcl_ok = yes ; then -- { $as_echo "$as_me:$LINENO: result: yes" >&5 --$as_echo "yes" >&6; } -- cat >>confdefs.h <<\_ACEOF --#define HAVE_ALLOCA 1 --_ACEOF -- -- cat >>confdefs.h <<\_ACEOF --#define NEED_ALLOCA_H 1 --_ACEOF -- -- fi - fi --if test $gcl_ok = no ; then { $as_echo "$as_me:$LINENO: result: no" >&5 --$as_echo "no" >&6; } ; fi -- -- -- -- -- -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } - +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF @@ -441,48 +364,9 @@ 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 2010-03-23 10:21:51.369945656 -0600 -+++ gcl-2.6.8/configure.in 2010-03-23 10:24:36.903913875 -0600 -@@ -1917,33 +1917,7 @@ - - # alloca - --AC_MSG_CHECKING([for alloca]) --AC_RUN_IFELSE([AC_LANG_PROGRAM([],[[exit(alloca(500) != NULL ? 0 : 1);]])], -- ,gcl_ok=yes, gcl_ok=no,gcl_ok=no) --if test $gcl_ok = yes ; then -- AC_MSG_RESULT(yes) -- AC_DEFINE(HAVE_ALLOCA) --else -- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -- #include -- ]],[[exit(alloca(500) != NULL ? 0 : 1);]])], -- ,gcl_ok=yes, gcl_ok=no,gcl_ok=no) -- if test $gcl_ok = yes ; then -- AC_MSG_RESULT(yes) -- AC_DEFINE(HAVE_ALLOCA) -- AC_DEFINE(NEED_ALLOCA_H) -- fi --fi --if test $gcl_ok = no ; then AC_MSG_RESULT(no) ; fi -- -- -- -- -- -- -- -- -- -+AC_FUNC_ALLOCA - - # dlopen etc - # idea make it so you do something dlopen(libX.so,RTLD_GLOBAL) -diff -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 2010-03-23 10:21:51.370945835 -0600 -+++ gcl-2.6.8/h/gclincl.h.in 2010-03-23 10:24:55.000000000 -0600 -@@ -54,11 +54,10 @@ +--- h/gclincl.h.in.orig 2010-08-04 15:44:24.000000000 -0600 ++++ h/gclincl.h.in 2010-12-30 10:52:29.000000000 -0700 +@@ -54,11 +54,10 @@ SGC is enabled. */ #undef HAVE_ALLOCA #endif @@ -496,7 +380,7 @@ diff -dur gcl-2.6.8.ORIG/h/gclincl.h.in gcl-2.6.8/h/gclincl.h.in #include #endif -@@ -260,6 +259,21 @@ +@@ -260,6 +259,21 @@ SGC is enabled. */ #undef HAVE_OBJC_MALLOC_H #undef HAVE_OUTPUT_BFD @@ -518,7 +402,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 -@@ -347,5 +361,13 @@ +@@ -365,8 +379,19 @@ SGC is enabled. */ /* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG @@ -530,5 +414,11 @@ diff -dur gcl-2.6.8.ORIG/h/gclincl.h.in gcl-2.6.8/h/gclincl.h.in + STACK_DIRECTION = 0 => direction of growth unknown */ +#undef STACK_DIRECTION + + /* staticly linked images */ + #undef STATIC_LINKING + /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS ++ ++/* Define to `unsigned int' if does not define. */ ++#undef size_t diff --git a/gcl-2.6.8-asm-signal-h.patch b/gcl-2.6.8-asm-signal-h.patch index 33a93e1..6fbd990 100644 --- a/gcl-2.6.8-asm-signal-h.patch +++ b/gcl-2.6.8-asm-signal-h.patch @@ -1,149 +1,38 @@ -diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure ---- gcl-2.6.8.ORIG/configure 2010-03-23 10:43:26.927961643 -0600 -+++ gcl-2.6.8/configure 2010-03-23 10:46:56.620908629 -0600 -@@ -13333,27 +13333,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 -@@ -13374,96 +13366,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 +--- acconfig.h.orig 2010-12-30 11:03:10.000000000 -0700 ++++ acconfig.h 2010-12-30 11:33:11.000000000 -0700 +@@ -37,6 +37,9 @@ SGC is enabled. */ + + /* define if have */ + #undef HAVE_ASM_SIGNAL_H ++#ifdef HAVE_ASM_SIGNAL_H ++# define __ASSEMBLY__ ++#endif -- ac_header_compiler=no -+ eval "$as_ac_Header=no" - fi + /* define if have */ + #undef HAVE_ASM_SIGCONTEXT_H +--- configure.orig 2010-12-30 11:26:12.887486517 -0700 ++++ configure 2010-12-30 11:34:19.000000000 -0700 +@@ -8130,7 +8130,8 @@ done - 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 -@@ -13549,6 +13465,7 @@ + for ac_header in asm/signal.h + do : +- ac_fn_c_check_header_mongrel "$LINENO" "asm/signal.h" "ac_cv_header_asm_signal_h" "$ac_includes_default" ++ ac_fn_c_check_header_compile "$LINENO" "asm/signal.h" "ac_cv_header_asm_signal_h" "#define __ASSEMBLY__ ++" + if test "x$ac_cv_header_asm_signal_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_ASM_SIGNAL_H 1 +@@ -8183,6 +8184,7 @@ $as_echo_n "checking for sigcontext... " #include #endif #ifdef HAVE_ASM_SIGNAL_H -+ #define __ASSEMBLY__ ++ #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 2010-03-23 10:43:26.928958323 -0600 -+++ gcl-2.6.8/configure.in 2010-03-23 10:45:45.463131717 -0600 -@@ -1640,7 +1640,7 @@ +--- configure.in.orig 2010-12-30 11:26:02.886682117 -0700 ++++ configure.in 2010-12-30 11:31:34.000000000 -0700 +@@ -1592,7 +1592,7 @@ AC_MSG_RESULT(no)) #if test $use = "386-linux" ; then AC_CHECK_HEADERS(asm/sigcontext.h) @@ -151,43 +40,32 @@ diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in + AC_CHECK_HEADERS(asm/signal.h, [], [], [#define __ASSEMBLY__]) AC_MSG_CHECKING([for sigcontext]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include -@@ -1664,7 +1664,8 @@ + #include +@@ -1616,7 +1616,8 @@ AC_MSG_RESULT(no)) #ifdef HAVE_ASM_SIGCONTEXT_H #include #endif - #ifdef HAVE_ASM_SIGNAL_H + #ifdef HAVE_ASM_SIGNAL_H -+ #define __ASSEMBLY__ ++ #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 2010-01-11 11:59:43.000000000 -0700 -+++ gcl-2.6.8/h/386-linux.h 2010-03-23 10:46:02.926954534 -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 2010-03-23 10:46:23.606036242 -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 2010-03-23 10:46:42.893914619 -0600 -@@ -38,6 +38,7 @@ +--- h/gclincl.h.in.orig 2010-12-30 11:04:34.000000000 -0700 ++++ h/gclincl.h.in 2010-12-30 11:34:20.000000000 -0700 +@@ -38,6 +38,9 @@ SGC is enabled. */ + + /* define if have */ + #undef HAVE_ASM_SIGNAL_H ++#ifdef HAVE_ASM_SIGNAL_H ++# define __ASSEMBLY__ ++#endif + + /* define if have */ + #undef HAVE_ASM_SIGCONTEXT_H +--- o/test_memprotect.c.orig 1999-12-06 15:44:13.000000000 -0700 ++++ o/test_memprotect.c 2010-12-30 11:33:38.000000000 -0700 +@@ -38,6 +38,7 @@ int psize; char *malloc(); diff --git a/gcl-2.6.8-debuginfo.patch b/gcl-2.6.8-debuginfo.patch index 45742e8..0340281 100644 --- a/gcl-2.6.8-debuginfo.patch +++ b/gcl-2.6.8-debuginfo.patch @@ -1,11 +1,10 @@ -diff -dur gcl-2.6.8.ORIG/o/makefile gcl-2.6.8/o/makefile ---- gcl-2.6.8.ORIG/o/makefile 2006-10-18 11:08:56.000000000 -0600 -+++ gcl-2.6.8/o/makefile 2009-01-07 16:10:38.000000000 -0700 -@@ -27,7 +27,6 @@ +--- o/makefile.orig 2010-08-04 15:44:27.000000000 -0600 ++++ o/makefile 2010-12-30 11:28:46.620108026 -0700 +@@ -27,7 +27,6 @@ DECL := $(HDIR)/new_decl.h %.o: %.d $(DECL) $(DPP) $* $(CC) -c $(CFLAGS) $(DEFS) $*.c $(AUX_INFO) - rm $*.c CPP= - %.ini: %.c grab_defs plt.h + diff --git a/gcl-2.6.8-elisp.patch b/gcl-2.6.8-elisp.patch index c7e7c37..de6759f 100644 --- a/gcl-2.6.8-elisp.patch +++ b/gcl-2.6.8-elisp.patch @@ -1,6 +1,5 @@ -diff -dur gcl-2.6.8.ORIG/elisp/ansi-doc.el gcl-2.6.8/elisp/ansi-doc.el ---- gcl-2.6.8.ORIG/elisp/ansi-doc.el 1999-12-06 15:43:59.000000000 -0700 -+++ gcl-2.6.8/elisp/ansi-doc.el 2008-12-29 21:15:15.000000000 -0700 +--- elisp/ansi-doc.el.orig 1999-12-06 15:43:59.000000000 -0700 ++++ elisp/ansi-doc.el 2010-12-29 11:42:04.785857068 -0700 @@ -9,6 +9,8 @@ ;; xdvi. You may gzip the .dvi files and it will unzip them into tmp ;; as needed. @@ -10,7 +9,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/ansi-doc.el gcl-2.6.8/elisp/ansi-doc.el (defvar ansi-doc-dir "/usr/local/doc/dpANS2") (defvar ansi-doc-alist nil) -@@ -55,38 +57,28 @@ +@@ -55,38 +57,28 @@ return that file otherwise return file" or topic. If there are several pieces of documentation then go through them successively. Requires copying the " (interactive ) @@ -74,9 +73,8 @@ diff -dur gcl-2.6.8.ORIG/elisp/ansi-doc.el gcl-2.6.8/elisp/ansi-doc.el + " -geometry -2-2 +" (+ (cdr x) 2)" " + chap))))) + (message nil)) -diff -dur gcl-2.6.8.ORIG/elisp/dbl.el gcl-2.6.8/elisp/dbl.el ---- gcl-2.6.8.ORIG/elisp/dbl.el 2001-05-06 09:59:23.000000000 -0600 -+++ gcl-2.6.8/elisp/dbl.el 2008-12-29 21:15:15.000000000 -0700 +--- elisp/dbl.el.orig 2001-05-06 09:59:23.000000000 -0600 ++++ elisp/dbl.el 2010-12-29 11:42:04.785857068 -0700 @@ -97,29 +97,35 @@ ;(define-key ctl-x-map "&" 'send-dbl-command) @@ -127,7 +125,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/dbl.el gcl-2.6.8/elisp/dbl.el (defun dbl-mode () "Major mode for interacting with an inferior Lisp or Maxima process. -@@ -227,7 +233,7 @@ +@@ -227,7 +233,7 @@ You may also enter keyword break command (defun dbl (p) @@ -136,7 +134,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/dbl.el gcl-2.6.8/elisp/dbl.el "Makes a dbl buffer, suitable for running an inferior gcl. You are prompted for a name for the buffer. After the shell starts you should start up your lisp program (eg gcl). The bufferd -@@ -235,16 +241,13 @@ +@@ -235,16 +241,13 @@ You may also enter keyword break command debug loop with (si::dbl) or :dbl in a debug loop. " (interactive "p") @@ -156,7 +154,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/dbl.el gcl-2.6.8/elisp/dbl.el (switch-to-buffer (concat "*" name "*")) (or (bolp) (newline)) (insert "Current directory is " default-directory "\n") -@@ -291,15 +294,6 @@ +@@ -291,15 +294,6 @@ the `--fullname' keyword as in: ;; It records the filename and line number, and maybe displays that file. (defun dbl-filter (proc string) (let ((inhibit-quit t)) @@ -172,7 +170,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/dbl.el gcl-2.6.8/elisp/dbl.el (if dbl-filter-accumulator (dbl-filter-accumulate-marker proc (concat dbl-filter-accumulator string)) -@@ -314,14 +308,13 @@ +@@ -314,14 +308,13 @@ the `--fullname' keyword as in: (let ((end (string-match "\n" string))) (if end (progn @@ -188,7 +186,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/dbl.el gcl-2.6.8/elisp/dbl.el (cond ((equal (cdr dbl-last-frame) 0) ;(message "got 0") -@@ -358,8 +351,7 @@ +@@ -358,8 +351,7 @@ the `--fullname' keyword as in: (defun dbl-filter-insert (proc string) (let (moving output-after-point @@ -198,7 +196,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/dbl.el gcl-2.6.8/elisp/dbl.el (set-buffer (process-buffer proc)) ;; test to see if we will move the point. We want that the ;; window-point of the buffer, should be equal to process-mark. -@@ -370,7 +362,6 @@ +@@ -370,7 +362,6 @@ the `--fullname' keyword as in: (save-excursion ;; Insert the text, moving the process-marker. (goto-char (process-mark proc)) @@ -206,7 +204,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/dbl.el gcl-2.6.8/elisp/dbl.el (insert string) (set-marker (process-mark proc) (point)) ; (setq bill (cons (list 'hi (process-mark proc) (marker-position (process-mark proc)) (point)) bill)) -@@ -488,19 +479,22 @@ +@@ -488,19 +479,22 @@ If a non process buffer, just return cur (interactive) (save-excursion (end-of-line) @@ -242,7 +240,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/dbl.el gcl-2.6.8/elisp/dbl.el (defun dbl-find-and-display-line () (interactive) -@@ -554,8 +548,8 @@ +@@ -554,8 +548,8 @@ If a non process buffer, just return cur (goto-char (point-max)) (setq dbl-delete-prompt-marker (point-marker)) (dbl-set-buffer) @@ -253,7 +251,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/dbl.el gcl-2.6.8/elisp/dbl.el (defun dbl-subtitute-% (command n) (let* (result -@@ -566,8 +560,8 @@ +@@ -566,8 +560,8 @@ If a non process buffer, just return cur (cond (in-dbl (setq file-line (dbl-find-line))) (t (setq file-line (list (buffer-file-name) @@ -264,7 +262,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/dbl.el gcl-2.6.8/elisp/dbl.el (while (and command (string-match "\\([^%]*\\)%\\([adeflp]\\)" command)) (let ((letter (string-to-char (substring command (match-beginning 2)))) subst) -@@ -620,8 +614,8 @@ +@@ -620,8 +614,8 @@ If a non process buffer, just return cur (if (get-buffer-process (current-buffer)) (setq current-dbl-buffer (current-buffer))) (message name) @@ -275,7 +273,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/dbl.el gcl-2.6.8/elisp/dbl.el (other-window 1) ))) (t -@@ -632,20 +626,21 @@ +@@ -632,20 +626,21 @@ If a non process buffer, just return cur (1+ (count-lines 1 (point)))))) (and downcase-filenames-for-dbl (setq file-name (downcase file-name))) @@ -306,7 +304,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/dbl.el gcl-2.6.8/elisp/dbl.el (t (setq begin (progn (re-search-backward "[^0-9]") (forward-char 1) (dot))) (forward-char 1) -@@ -680,6 +675,6 @@ +@@ -680,6 +675,6 @@ It is for customization by you.") (t (setq comm addr))) (switch-to-buffer current-dbl-buffer) (goto-char (dot-max)) @@ -314,9 +312,8 @@ diff -dur gcl-2.6.8.ORIG/elisp/dbl.el gcl-2.6.8/elisp/dbl.el + (insert comm))) (provide 'dbl) -diff -dur gcl-2.6.8.ORIG/elisp/doc-to-texi.el gcl-2.6.8/elisp/doc-to-texi.el ---- gcl-2.6.8.ORIG/elisp/doc-to-texi.el 1999-12-06 15:43:59.000000000 -0700 -+++ gcl-2.6.8/elisp/doc-to-texi.el 2008-12-29 21:15:15.000000000 -0700 +--- elisp/doc-to-texi.el.orig 1999-12-06 15:43:59.000000000 -0700 ++++ elisp/doc-to-texi.el 2010-12-29 11:42:04.786856948 -0700 @@ -51,7 +51,7 @@ (let ((fun (get-match 1)) (type (get-match 2)) @@ -374,9 +371,8 @@ diff -dur gcl-2.6.8.ORIG/elisp/doc-to-texi.el gcl-2.6.8/elisp/doc-to-texi.el ;(let ((all xall)) (while all (set-buffer (car all)) (write-file (car all)) (setq all (cdr all)))) ;(let ((all xall)) (while all (find-file (car all)) (setq all (cdr all)))) -diff -dur gcl-2.6.8.ORIG/elisp/gcl.el gcl-2.6.8/elisp/gcl.el ---- gcl-2.6.8.ORIG/elisp/gcl.el 2004-06-25 16:40:23.000000000 -0600 -+++ gcl-2.6.8/elisp/gcl.el 2008-12-29 21:15:15.000000000 -0700 +--- elisp/gcl.el.orig 2004-06-25 16:40:23.000000000 -0600 ++++ elisp/gcl.el 2010-12-29 11:42:04.787856829 -0700 @@ -14,6 +14,7 @@ ;; M-p complete the current input by looking back through the buffer to see what was last typed ;; using this prompt and this beginning. Useful in shell, in lisp, in gdb,... @@ -395,7 +391,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/gcl.el gcl-2.6.8/elisp/gcl.el (defun remote-lisp (&rest l) (and (boundp 'lisp-mode-map) lisp-mode-map -@@ -158,12 +162,12 @@ +@@ -158,12 +162,12 @@ by get-buffer-package. )) @@ -412,7 +408,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/gcl.el gcl-2.6.8/elisp/gcl.el (and time-to-throw-away (string-match "telnet"(buffer-name (process-buffer proc))) (dump-output proc time-to-throw-away)) -@@ -194,7 +198,7 @@ +@@ -194,7 +198,7 @@ by get-buffer-package. (defun my-send-region (proc beg end) (cond ((or (string-match "telnet" (process-name proc))) @@ -421,7 +417,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/gcl.el gcl-2.6.8/elisp/gcl.el (t (let ((package (get-buffer-package))) (save-excursion -@@ -213,7 +217,7 @@ +@@ -213,7 +217,7 @@ by get-buffer-package. (write-region (point-min) (point-max) tmp-lisp-file nil nil))) (write-region beg end tmp-lisp-file t nil) (message "sending ..") @@ -430,7 +426,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/gcl.el gcl-2.6.8/elisp/gcl.el proc (concat "(lisp::let ((*load-verbose* nil)) (#+sdebug si::nload #-sdebug load \"" tmp-lisp-file -@@ -268,9 +272,9 @@ +@@ -268,9 +272,9 @@ by get-buffer-package. (prog2 (other-window 1) (get-buffer-process (current-buffer)) (other-window 1))))) @@ -443,7 +439,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/gcl.el gcl-2.6.8/elisp/gcl.el (defun delete-comment-char (arg) (while (and (> arg 0) (looking-at comment-start)) (delete-char 1) -@@ -333,8 +337,8 @@ +@@ -333,8 +337,8 @@ so a second comment-region adds another (interactive "P") (save-excursion (let ((beg (dot)) @@ -454,7 +450,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/gcl.el gcl-2.6.8/elisp/gcl.el (defun comment-region1 (beg end arg) (let ((ok t)) -@@ -347,7 +351,7 @@ +@@ -347,7 +351,7 @@ so a second comment-region adds another (while ok (cond (arg (delete-comment-char arg)) @@ -463,7 +459,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/gcl.el gcl-2.6.8/elisp/gcl.el (if (< end (dot)) (setq ok nil) (if (search-forward "\n" end t) nil (setq ok nil))) ) (widen)))) -@@ -363,13 +367,13 @@ +@@ -363,13 +367,13 @@ so a second comment-region adds another (current-lisp-process (or proc lisp-process))) (other-window 1) (message "Tracing: %s" (buffer-substring (point) end)) @@ -482,9 +478,8 @@ diff -dur gcl-2.6.8.ORIG/elisp/gcl.el gcl-2.6.8/elisp/gcl.el -(provide 'gcl) \ No newline at end of file +(provide 'gcl) -diff -dur gcl-2.6.8.ORIG/elisp/man1-to-texi.el gcl-2.6.8/elisp/man1-to-texi.el ---- gcl-2.6.8.ORIG/elisp/man1-to-texi.el 1999-12-06 15:43:59.000000000 -0700 -+++ gcl-2.6.8/elisp/man1-to-texi.el 2008-12-29 21:15:15.000000000 -0700 +--- elisp/man1-to-texi.el.orig 1999-12-06 15:43:59.000000000 -0700 ++++ elisp/man1-to-texi.el 2010-12-29 11:42:04.788856710 -0700 @@ -106,6 +106,8 @@ ; End of indented unfilled display. ; @@ -574,9 +569,8 @@ diff -dur gcl-2.6.8.ORIG/elisp/man1-to-texi.el gcl-2.6.8/elisp/man1-to-texi.el '(after bind button canvas checkbutton destroy entry exit focus foo frame grab label lbSingSel listbox lower menu menubar menubutton message option options pack-old pack place radiobutton raise scale scrollbar selection send text tk tkerror tkvars tkwait toplevel update winfo wm)) ;(setq widgets (sort (mapcar 'car tk-widget-options) 'string-lessp)) -diff -dur gcl-2.6.8.ORIG/elisp/smart-complete.el gcl-2.6.8/elisp/smart-complete.el ---- gcl-2.6.8.ORIG/elisp/smart-complete.el 2001-12-18 13:36:35.000000000 -0700 -+++ gcl-2.6.8/elisp/smart-complete.el 2008-12-29 21:15:15.000000000 -0700 +--- elisp/smart-complete.el.orig 2001-12-18 13:36:35.000000000 -0700 ++++ elisp/smart-complete.el 2010-12-29 11:42:04.789856590 -0700 @@ -85,8 +85,7 @@ (pat (concat (regexp-for-this-prompt prompt) "\\(" (regexp-quote str) "\\)" )) @@ -587,10 +581,9 @@ diff -dur gcl-2.6.8.ORIG/elisp/smart-complete.el gcl-2.6.8/elisp/smart-complete. (while (and not-yet (re-search-backward pat nil t)) (goto-char (match-beginning 1)) -diff -dur gcl-2.6.8.ORIG/elisp/sshell.el gcl-2.6.8/elisp/sshell.el ---- gcl-2.6.8.ORIG/elisp/sshell.el 2000-10-27 16:09:40.000000000 -0600 -+++ gcl-2.6.8/elisp/sshell.el 2008-12-29 21:15:15.000000000 -0700 -@@ -119,9 +119,9 @@ +--- elisp/sshell.el.orig 2000-10-27 16:09:40.000000000 -0600 ++++ elisp/sshell.el 2010-12-29 11:42:04.790856471 -0700 +@@ -119,9 +119,9 @@ and lisp-send-defun." (ff (save-excursion (skip-chars-backward "[a-z---_0-9$/A-Z~#.]") @@ -603,7 +596,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/sshell.el gcl-2.6.8/elisp/sshell.el (cond ((and (setq tem (file-name-completion (or file "") dir)) (not (equal tem file))) (cond ((eq tem t)) -@@ -181,7 +181,7 @@ +@@ -181,7 +181,7 @@ If yours does, you will probably want to (defun make-sshell (name program &optional startfile &rest switches) (let ((buffer (get-buffer-create (concat "*" name "*"))) @@ -612,7 +605,7 @@ diff -dur gcl-2.6.8.ORIG/elisp/sshell.el gcl-2.6.8/elisp/sshell.el (setq proc (get-buffer-process buffer)) (if proc (setq status (process-status proc))) (save-excursion -@@ -376,4 +376,4 @@ +@@ -376,4 +376,4 @@ Also put cursor there." (point))) (require 'smart-complete) diff --git a/gcl-2.6.8-ellipsis.patch b/gcl-2.6.8-ellipsis.patch index d889f30..793e98f 100644 --- a/gcl-2.6.8-ellipsis.patch +++ b/gcl-2.6.8-ellipsis.patch @@ -1,7 +1,6 @@ -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 2010-03-23 10:59:09.745963641 -0600 -@@ -167,8 +167,8 @@ +--- o/external_funs.h.orig 2003-08-29 14:41:59.000000000 -0600 ++++ o/external_funs.h 2010-12-30 11:43:37.550608880 -0700 +@@ -167,8 +167,8 @@ extern int illegal_lambda GPR((void));; 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));; @@ -12,7 +11,7 @@ diff -dur gcl-2.6.8.ORIG/o/external_funs.h gcl-2.6.8/o/external_funs.h 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 @@ +@@ -380,7 +380,6 @@ extern int not_a_symbol GPR((int obj));; extern int not_a_variable GPR((int obj));; extern int illegal_index GPR((object x, object i));; extern int Lerror GPR((void));; @@ -20,7 +19,7 @@ diff -dur gcl-2.6.8.ORIG/o/external_funs.h gcl-2.6.8/o/external_funs.h 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 @@ +@@ -415,9 +414,6 @@ extern object ifuncall1 GPR((object fun, 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));; diff --git a/gcl-2.6.8-extension.patch b/gcl-2.6.8-extension.patch index a1b487e..7aec022 100644 --- a/gcl-2.6.8-extension.patch +++ b/gcl-2.6.8-extension.patch @@ -1,6 +1,5 @@ -diff -dur gcl-2.6.8.ORIG/acconfig.h gcl-2.6.8/acconfig.h ---- gcl-2.6.8.ORIG/acconfig.h 2010-03-23 10:26:09.289020132 -0600 -+++ gcl-2.6.8/acconfig.h 2010-03-23 10:28:45.864038848 -0600 +--- acconfig.h.orig 2010-12-30 10:24:39.000000000 -0700 ++++ acconfig.h 2010-12-30 11:03:10.000000000 -0700 @@ -1,3 +1,6 @@ +/* Whether compiling on a glibc-based system */ +#undef _GNU_SOURCE @@ -8,7 +7,7 @@ diff -dur gcl-2.6.8.ORIG/acconfig.h gcl-2.6.8/acconfig.h /* define where the heap could begin. Normally should be the smallest value returned by sbrk(). Underestimating by 10-20 megabytes is not a problem. */ -@@ -157,7 +160,6 @@ +@@ -157,7 +160,6 @@ SGC is enabled. */ #ifdef IN_NUM_CO #ifdef HAVE_ISNORMAL @@ -16,7 +15,7 @@ diff -dur gcl-2.6.8.ORIG/acconfig.h gcl-2.6.8/acconfig.h #include #define ISNORMAL(a) isnormal(a) #else -@@ -178,7 +180,6 @@ +@@ -178,7 +180,6 @@ SGC is enabled. */ #ifdef NEED_ISFINITE #ifdef HAVE_ISFINITE @@ -24,13 +23,38 @@ diff -dur gcl-2.6.8.ORIG/acconfig.h gcl-2.6.8/acconfig.h #include #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 2010-03-23 10:26:09.294012136 -0600 -+++ gcl-2.6.8/configure 2010-03-23 10:29:41.095971128 -0600 -@@ -689,9 +689,9 @@ - GMPDIR +--- configure.in.orig 2010-12-30 10:25:19.000000000 -0700 ++++ configure.in 2010-12-30 11:03:48.000000000 -0700 +@@ -421,6 +421,7 @@ if test "$LDFLAGS" = "" ; then + LDFLAGS=" " + fi + ++AC_USE_SYSTEM_EXTENSIONS + AC_PROG_CC + AC_PROG_CPP + AC_SUBST(CC) +@@ -1382,7 +1383,6 @@ AC_CHECK_HEADERS(float.h,AC_DEFINE(HAVE_ + # + AC_MSG_CHECKING([for isnormal]) + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +- #define _GNU_SOURCE + #include + ]],[[ + float f; +@@ -1400,7 +1400,6 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ + + AC_MSG_CHECKING([for isfinite]) + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +- #define _GNU_SOURCE + #include + ]],[[ + float f; +--- configure.orig 2010-12-30 10:52:29.000000000 -0700 ++++ configure 2010-12-30 11:04:34.000000000 -0700 +@@ -654,9 +654,9 @@ GMPDIR GMP MAKEINFO + HAVE_MALLOC_ZONE_MEMALIGN +AWK EGREP GREP @@ -38,7 +62,20 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure CPP OBJEXT EXEEXT -@@ -3528,6 +3528,7 @@ +@@ -757,6 +757,12 @@ LIBS + CPPFLAGS + CPP + CPPFLAGS ++CC ++LDFLAGS ++LIBS ++CPPFLAGS ++CPP ++CPPFLAGS + XMKMF' + + +@@ -3910,6 +3916,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS con ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -46,7 +83,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -@@ -3765,260 +3766,6 @@ +@@ -4048,260 +4055,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLA ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -73,6 +110,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure - *mingw*) - echo "WARNING: Remove -fno-zero-initialized-in-bss from makedefs if gcc less than 3.3.1." - echo " It is ptherwise needed for the Unexec stuff to work." +- if test "$enable_debug" = "yes" ; then TCFLAGS="$TCFLAGS -gstabs" ; fi - TCFLAGS="$TCFLAGS -fno-zero-initialized-in-bss -mms-bitfields";; - esac -fi @@ -102,9 +140,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 --{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_prog_AWK+set}" = set; then +-if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then @@ -115,24 +153,24 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do +- for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" -- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done --done +- done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then -- { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else -- { $as_echo "$as_me:$LINENO: result: no" >&5 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - @@ -143,25 +181,25 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure - -# Work around system/gprof mips/hppa hang -case $use in +- sh4*) enable_gprof="no";; - mips*) enable_gprof="no";; - hppa*) enable_gprof="no";; +- *gnu) enable_gprof="no";; -esac - -if test "$enable_gprof" = "yes" ; then - TCFLAGS="$TCFLAGS -pg"; - TLIBS="$TLIBS -pg"; - TFPFLAG="" -- cat >>confdefs.h <<\_ACEOF --#define GCL_GPROF 1 --_ACEOF +- $as_echo "#define GCL_GPROF 1" >>confdefs.h - -- { $as_echo "$as_me:$LINENO: checking for text start" >&5 +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text start" >&5 -$as_echo_n "checking for text start... " >&6; } - echo 'int main () {return(0);}' >foo.c - $CC foo.c -o foo - GCL_GPROF_START=`nm foo | $AWK '/ *T *__*start$/ {print $NF}'` - rm -f foo.c foo -- { $as_echo "$as_me:$LINENO: result: $GCL_GPROF_START" >&5 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCL_GPROF_START" >&5 -$as_echo "$GCL_GPROF_START" >&6; } - cat >>confdefs.h <<_ACEOF -#define GCL_GPROF_START $GCL_GPROF_START @@ -170,7 +208,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure - case "$use" in - arm*) - #FIXME report and remove this when done -- { $as_echo "$as_me:$LINENO: result: Reducing optimization on profiling arm build to workaround gcc bug" >&5 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Reducing optimization on profiling arm build to workaround gcc bug" >&5 -$as_echo "Reducing optimization on profiling arm build to workaround gcc bug" >&6; } - enable_debug=yes;; - esac @@ -181,20 +219,15 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure - # for subconfigurations - CFLAGS="$CFLAGS -g" -else --# FIXME -- remove when mingw compiler issues are fixed -- case "$use" in -- *mingw*) -- TO3FLAGS="-O3 $TFPFLAG";; -- *) -- TO3FLAGS="-O3 $TFPFLAG";; -- esac --# TO3FLAGS="-O3 $TFPFLAG" +- TO3FLAGS="-O3 $TFPFLAG" - TO2FLAGS="-O" -fi - -# gcc on ppc cannot compile our new_init.c with full opts --CM -TONIFLAGS="" -case $use in +- powerpc*macosx) +- TCFLAGS="$TCFLAGS -mlongcall";; - *linux) - case $use in -# amd64*) # stack-boundary option does not work @@ -204,27 +237,30 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure -# m68k*) -# TCFLAGS="$TCFLAGS -ffloat-store";; - hppa*) -- TCFLAGS="$TCFLAGS -ffunction-sections" -- if test "$enable_debug" != "yes" ; then TO3FLAGS="-O $TFPFLAG" ; fi -- if test "$enable_debug" != "yes" ; then TO2FLAGS="-O" ; fi +- TCFLAGS="$TCFLAGS -mlong-calls " +-# TCFLAGS="$TCFLAGS -ffunction-sections" +-# if test "$enable_debug" != "yes" ; then TO3FLAGS="-O $TFPFLAG" ; fi +-# if test "$enable_debug" != "yes" ; then TO2FLAGS="-O" ; fi - ;; - arm*) - TCFLAGS="$TCFLAGS -mlong-calls -fdollars-in-identifiers -g " -- if test "$enable_debug" != "yes" ; then TO3FLAGS="-O2" ; fi -- if test "$enable_debug" != "yes" ; then TO2FLAGS="-O" ; fi +-# if test "$enable_debug" != "yes" ; then TO3FLAGS="-O2" ; fi +-# if test "$enable_debug" != "yes" ; then TO2FLAGS="-O" ; fi - ;; - powerpc*) -- if $CC -v 2>&1 | grep -q "gcc version 3.2" ; then -- echo Reducing optimization for buggy gcc-3.2 -- if test "$enable_debug" != "yes" ; then TONIFLAGS="-O $TFPFLAG" ; fi -- fi; -- echo Probing for longcall -- if ! $CC -v 2>&1 | $AWK '/^gcc version / {split($3,A,".");if (A[1]+0>3 || (A[1]+0>=3 && A[2]+0>=3)) exit 1;}'; then -- echo Enabling longcall on gcc 3.3 or later -- TCFLAGS="$TCFLAGS -mlongcall" -- echo Reducing optimization for buggy gcc 3.3 or later -- if test "$enable_debug" != "yes" ; then TONIFLAGS="-O $TFPFLAG" ; fi -- fi;; +- TCFLAGS="$TCFLAGS -mlongcall" +- ;; +-# if $CC -v 2>&1 | grep -q "gcc version 3.2" ; then +-# echo Reducing optimization for buggy gcc-3.2 +-# if test "$enable_debug" != "yes" ; then TONIFLAGS="-O $TFPFLAG" ; fi +-# fi; +-# echo Probing for longcall +-# if ! $CC -v 2>&1 | $AWK '/^gcc version / {split($3,A,".");if (A[[1]]+0>3 || (A[[1]]+0>=3 && A[[2]]+0>=3)) exit 1;}'; then +-# echo Enabling longcall on gcc 3.3 or later +-# TCFLAGS="$TCFLAGS -mlongcall" +-# echo Reducing optimization for buggy gcc 3.3 or later +-# if test "$enable_debug" != "yes" ; then TONIFLAGS="-O $TFPFLAG" ; fi +-# fi;; - esac;; -esac -if test "$enable_pic" = "yes" ; then @@ -274,7 +310,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure -# 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. - --{ $as_echo "$as_me:$LINENO: checking system version (for dynamic loading)" >&5 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking system version (for dynamic loading)" >&5 -$as_echo_n "checking system version (for dynamic loading)... " >&6; } -if machine=`uname -m` ; then true; else machine=unknown ; fi - @@ -283,7 +319,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure -else - system=`uname -s`-`uname -r` - if test "$?" -ne 0 ; then -- { $as_echo "$as_me:$LINENO: result: unknown (can't find uname command)" >&5 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown (can't find uname command)" >&5 -$as_echo "unknown (can't find uname command)" >&6; } - system=unknown - else @@ -296,151 +332,26 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure - if test "`uname -s`" = "AIX" ; then - system=AIX-`uname -v`.`uname -r` - fi -- { $as_echo "$as_me:$LINENO: result: $system" >&5 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $system" >&5 -$as_echo "$system" >&6; } - fi -fi - --if test "$use" = "powerpc-macosx" ; then +-case $use in +- *macosx) - - - { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } - if test "${ac_cv_path_GREP+set}" = set; then -@@ -4404,7 +4151,1408 @@ + if ${ac_cv_path_GREP+:} false; then : +@@ -4561,7 +4314,998 @@ fi done --if test "${ac_cv_header_malloc_malloc_h+set}" = set; then -+ -+ if test "${ac_cv_header_minix_config_h+set}" = set; then -+ { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 -+$as_echo_n "checking for minix/config.h... " >&6; } -+if test "${ac_cv_header_minix_config_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -+$as_echo "$ac_cv_header_minix_config_h" >&6; } -+else -+ # Is the header compilable? -+{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 -+$as_echo_n "checking minix/config.h 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 -+_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 -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_compiler=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 minix/config.h presence" >&5 -+$as_echo_n "checking minix/config.h 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 -+_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_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" + -+ 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: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} -+ -+ ;; -+esac -+{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 -+$as_echo_n "checking for minix/config.h... " >&6; } -+if test "${ac_cv_header_minix_config_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_header_minix_config_h=$ac_header_preproc -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -+$as_echo "$ac_cv_header_minix_config_h" >&6; } -+ -+fi -+if test "x$ac_cv_header_minix_config_h" = x""yes; then ++ ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" ++if test "x$ac_cv_header_minix_config_h" = xyes; then : + MINIX=yes +else + MINIX= @@ -449,34 +360,23 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + + if test "$MINIX" = yes; then + -+cat >>confdefs.h <<\_ACEOF -+#define _POSIX_SOURCE 1 -+_ACEOF ++$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + + -+cat >>confdefs.h <<\_ACEOF -+#define _POSIX_1_SOURCE 2 -+_ACEOF ++$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + + -+cat >>confdefs.h <<\_ACEOF -+#define _MINIX 1 -+_ACEOF ++$as_echo "#define _MINIX 1" >>confdefs.h + + fi + + -+ -+ { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -+if test "${ac_cv_safe_to_define___extensions__+set}" = set; then ++if ${ac_cv_safe_to_define___extensions__+:} false; then : + $as_echo_n "(cached) " >&6 +else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 @@ -489,56 +389,25 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + return 0; +} +_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 ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_safe_to_define___extensions__=yes +else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_safe_to_define___extensions__=no ++ ac_cv_safe_to_define___extensions__=no +fi -+ +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && -+ cat >>confdefs.h <<\_ACEOF -+#define __EXTENSIONS__ 1 -+_ACEOF ++ $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h + -+ cat >>confdefs.h <<\_ACEOF -+#define _ALL_SOURCE 1 -+_ACEOF ++ $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + -+ cat >>confdefs.h <<\_ACEOF -+#define _GNU_SOURCE 1 -+_ACEOF ++ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + -+ cat >>confdefs.h <<\_ACEOF -+#define _POSIX_PTHREAD_SEMANTICS 1 -+_ACEOF ++ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + -+ cat >>confdefs.h <<\_ACEOF -+#define _TANDEM_SOURCE 1 -+_ACEOF ++ $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + +ac_ext=c @@ -549,9 +418,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_CC+set}" = set; then ++if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then @@ -562,24 +431,24 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done -+done ++ done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then -+ { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else -+ { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + @@ -589,9 +458,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ++if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then @@ -602,24 +471,24 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done -+done ++ done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then -+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else -+ { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + @@ -628,7 +497,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + else + case $cross_compiling:$ac_tool_warned in +yes:) -+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac @@ -642,9 +511,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_CC+set}" = set; then ++if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then @@ -655,24 +524,24 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done -+done ++ done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then -+ { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else -+ { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + @@ -682,9 +551,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_CC+set}" = set; then ++if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then @@ -696,18 +565,18 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done -+done ++ done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then @@ -726,10 +595,10 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then -+ { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else -+ { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + @@ -741,9 +610,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_CC+set}" = set; then ++if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then @@ -754,24 +623,24 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done -+done ++ done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then -+ { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else -+ { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + @@ -785,9 +654,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ++if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then @@ -798,24 +667,24 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done -+done ++ done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then -+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else -+ { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + @@ -828,7 +697,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + else + case $cross_compiling:$ac_tool_warned in +yes:) -+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac @@ -839,62 +708,42 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +fi + + -+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } ++as_fn_error $? "no acceptable C compiler found in \$PATH ++See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. -+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 ++$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 -+{ (ac_try="$ac_compiler --version >&5" -+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_compiler --version >&5") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } -+{ (ac_try="$ac_compiler -v >&5" ++for ac_option in --version -v -V -qversion; do ++ { { ac_try="$ac_compiler $ac_option >&5" +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_compiler -v >&5") 2>&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } -+{ (ac_try="$ac_compiler -V >&5" -+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_compiler -V >&5") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } ++ if test -s conftest.err; then ++ sed '10a\ ++... rest of stderr output deleted ... ++ 10q' conftest.err >conftest.er1 ++ cat conftest.er1 >&5 ++ fi ++ rm -f conftest.er1 conftest.err ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++done + -+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -+if test "${ac_cv_c_compiler_gnu+set}" = set; then ++if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int @@ -908,37 +757,16 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + return 0; +} +_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 ++if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_compiler_gnu=no ++ ac_compiler_gnu=no +fi -+ +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes @@ -947,20 +775,16 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS -+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } -+if test "${ac_cv_prog_cc_g+set}" = set; then ++if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int @@ -971,35 +795,11 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + return 0; +} +_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 ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ CFLAGS="" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF ++ CFLAGS="" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int @@ -1010,36 +810,12 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + return 0; +} +_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 -+ : -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_compile "$LINENO"; then : + -+ ac_c_werror_flag=$ac_save_c_werror_flag ++else ++ ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int @@ -1050,42 +826,17 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + return 0; +} +_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 ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ +fi -+ +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi -+ +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi -+ +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS @@ -1102,18 +853,14 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + CFLAGS= + fi +fi -+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -+if test "${ac_cv_prog_cc_c89+set}" = set; then ++if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include @@ -1170,32 +917,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" -+ 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 ++ if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ +fi -+ +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done @@ -1206,17 +930,19 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) -+ { $as_echo "$as_me:$LINENO: result: none needed" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) -+ { $as_echo "$as_me:$LINENO: result: unsupported" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" -+ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac ++if test "x$ac_cv_prog_cc_c89" != xno; then : + ++fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' @@ -1229,14 +955,14 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then -+ if test "${ac_cv_prog_CPP+set}" = set; then ++ if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded @@ -1251,11 +977,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include @@ -1264,78 +986,34 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +#endif + Syntax error +_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 ++if ac_fn_c_try_cpp "$LINENO"; then : + ++else + # Broken: fails on valid input. +continue +fi -+ -+rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_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 ++if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ + # Passes both tests. +ac_preproc_ok=: +break +fi -+ -+rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -+rm -f conftest.err conftest.$ac_ext -+if $ac_preproc_ok; then ++rm -f conftest.i conftest.err conftest.$ac_ext ++if $ac_preproc_ok; then : + break +fi + @@ -1347,7 +1025,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +else + ac_cv_prog_CPP=$CPP +fi -+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes @@ -1358,11 +1036,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include @@ -1371,87 +1045,40 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +#endif + Syntax error +_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 ++if ac_fn_c_try_cpp "$LINENO"; then : + ++else + # Broken: fails on valid input. +continue +fi -+ -+rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_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 ++if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ + # Passes both tests. +ac_preproc_ok=: +break +fi -+ -+rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -+rm -f conftest.err conftest.$ac_ext -+if $ac_preproc_ok; then -+ : ++rm -f conftest.i conftest.err conftest.$ac_ext ++if $ac_preproc_ok; then : ++ +else -+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } ++as_fn_error $? "C preprocessor \"$CPP\" fails sanity check ++See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c @@ -1484,6 +1111,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + *mingw*) + echo "WARNING: Remove -fno-zero-initialized-in-bss from makedefs if gcc less than 3.3.1." + echo " It is ptherwise needed for the Unexec stuff to work." ++ if test "$enable_debug" = "yes" ; then TCFLAGS="$TCFLAGS -gstabs" ; fi + TCFLAGS="$TCFLAGS -fno-zero-initialized-in-bss -mms-bitfields";; + esac +fi @@ -1513,9 +1141,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_AWK+set}" = set; then ++if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then @@ -1526,24 +1154,24 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done -+done ++ done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then -+ { $as_echo "$as_me:$LINENO: result: $AWK" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else -+ { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + @@ -1554,25 +1182,25 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + +# Work around system/gprof mips/hppa hang +case $use in ++ sh4*) enable_gprof="no";; + mips*) enable_gprof="no";; + hppa*) enable_gprof="no";; ++ *gnu) enable_gprof="no";; +esac + +if test "$enable_gprof" = "yes" ; then + TCFLAGS="$TCFLAGS -pg"; + TLIBS="$TLIBS -pg"; + TFPFLAG="" -+ cat >>confdefs.h <<\_ACEOF -+#define GCL_GPROF 1 -+_ACEOF ++ $as_echo "#define GCL_GPROF 1" >>confdefs.h + -+ { $as_echo "$as_me:$LINENO: checking for text start" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text start" >&5 +$as_echo_n "checking for text start... " >&6; } + echo 'int main () {return(0);}' >foo.c + $CC foo.c -o foo + GCL_GPROF_START=`nm foo | $AWK '/ *T *__*start$/ {print $NF}'` + rm -f foo.c foo -+ { $as_echo "$as_me:$LINENO: result: $GCL_GPROF_START" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCL_GPROF_START" >&5 +$as_echo "$GCL_GPROF_START" >&6; } + cat >>confdefs.h <<_ACEOF +#define GCL_GPROF_START $GCL_GPROF_START @@ -1581,7 +1209,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + case "$use" in + arm*) + #FIXME report and remove this when done -+ { $as_echo "$as_me:$LINENO: result: Reducing optimization on profiling arm build to workaround gcc bug" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Reducing optimization on profiling arm build to workaround gcc bug" >&5 +$as_echo "Reducing optimization on profiling arm build to workaround gcc bug" >&6; } + enable_debug=yes;; + esac @@ -1592,20 +1220,15 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + # for subconfigurations + CFLAGS="$CFLAGS -g" +else -+# FIXME -- remove when mingw compiler issues are fixed -+ case "$use" in -+ *mingw*) -+ TO3FLAGS="-O3 $TFPFLAG";; -+ *) -+ TO3FLAGS="-O3 $TFPFLAG";; -+ esac -+# TO3FLAGS="-O3 $TFPFLAG" ++ TO3FLAGS="-O3 $TFPFLAG" + TO2FLAGS="-O" +fi + +# gcc on ppc cannot compile our new_init.c with full opts --CM +TONIFLAGS="" +case $use in ++ powerpc*macosx) ++ TCFLAGS="$TCFLAGS -mlongcall";; + *linux) + case $use in +# amd64*) # stack-boundary option does not work @@ -1615,27 +1238,30 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +# m68k*) +# TCFLAGS="$TCFLAGS -ffloat-store";; + hppa*) -+ TCFLAGS="$TCFLAGS -ffunction-sections" -+ if test "$enable_debug" != "yes" ; then TO3FLAGS="-O $TFPFLAG" ; fi -+ if test "$enable_debug" != "yes" ; then TO2FLAGS="-O" ; fi ++ TCFLAGS="$TCFLAGS -mlong-calls " ++# TCFLAGS="$TCFLAGS -ffunction-sections" ++# if test "$enable_debug" != "yes" ; then TO3FLAGS="-O $TFPFLAG" ; fi ++# if test "$enable_debug" != "yes" ; then TO2FLAGS="-O" ; fi + ;; + arm*) + TCFLAGS="$TCFLAGS -mlong-calls -fdollars-in-identifiers -g " -+ if test "$enable_debug" != "yes" ; then TO3FLAGS="-O2" ; fi -+ if test "$enable_debug" != "yes" ; then TO2FLAGS="-O" ; fi ++# if test "$enable_debug" != "yes" ; then TO3FLAGS="-O2" ; fi ++# if test "$enable_debug" != "yes" ; then TO2FLAGS="-O" ; fi + ;; + powerpc*) -+ if $CC -v 2>&1 | grep -q "gcc version 3.2" ; then -+ echo Reducing optimization for buggy gcc-3.2 -+ if test "$enable_debug" != "yes" ; then TONIFLAGS="-O $TFPFLAG" ; fi -+ fi; -+ echo Probing for longcall -+ if ! $CC -v 2>&1 | $AWK '/^gcc version / {split($3,A,".");if (A[1]+0>3 || (A[1]+0>=3 && A[2]+0>=3)) exit 1;}'; then -+ echo Enabling longcall on gcc 3.3 or later -+ TCFLAGS="$TCFLAGS -mlongcall" -+ echo Reducing optimization for buggy gcc 3.3 or later -+ if test "$enable_debug" != "yes" ; then TONIFLAGS="-O $TFPFLAG" ; fi -+ fi;; ++ TCFLAGS="$TCFLAGS -mlongcall" ++ ;; ++# if $CC -v 2>&1 | grep -q "gcc version 3.2" ; then ++# echo Reducing optimization for buggy gcc-3.2 ++# if test "$enable_debug" != "yes" ; then TONIFLAGS="-O $TFPFLAG" ; fi ++# fi; ++# echo Probing for longcall ++# if ! $CC -v 2>&1 | $AWK '/^gcc version / {split($3,A,".");if (A[[1]]+0>3 || (A[[1]]+0>=3 && A[[2]]+0>=3)) exit 1;}'; then ++# echo Enabling longcall on gcc 3.3 or later ++# TCFLAGS="$TCFLAGS -mlongcall" ++# echo Reducing optimization for buggy gcc 3.3 or later ++# if test "$enable_debug" != "yes" ; then TONIFLAGS="-O $TFPFLAG" ; fi ++# fi;; + esac;; +esac +if test "$enable_pic" = "yes" ; then @@ -1685,7 +1311,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +# 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. + -+{ $as_echo "$as_me:$LINENO: checking system version (for dynamic loading)" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking system version (for dynamic loading)" >&5 +$as_echo_n "checking system version (for dynamic loading)... " >&6; } +if machine=`uname -m` ; then true; else machine=unknown ; fi + @@ -1694,7 +1320,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure +else + system=`uname -s`-`uname -r` + if test "$?" -ne 0 ; then -+ { $as_echo "$as_me:$LINENO: result: unknown (can't find uname command)" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown (can't find uname command)" >&5 +$as_echo "unknown (can't find uname command)" >&6; } + system=unknown + else @@ -1707,62 +1333,35 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure + if test "`uname -s`" = "AIX" ; then + system=AIX-`uname -v`.`uname -r` + fi -+ { $as_echo "$as_me:$LINENO: result: $system" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $system" >&5 +$as_echo "$system" >&6; } + fi +fi + -+if test "$use" = "powerpc-macosx" ; then -+ if test "${ac_cv_header_malloc_malloc_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5 - $as_echo_n "checking for malloc/malloc.h... " >&6; } - if test "${ac_cv_header_malloc_malloc_h+set}" = set; then -@@ -10287,7 +11435,6 @@ - cat >>conftest.$ac_ext <<_ACEOF ++case $use in ++ *macosx) ++ ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" + if test "x$ac_cv_header_malloc_malloc_h" = xyes; then : + + else +@@ -6754,7 +7498,6 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -- #define _GNU_SOURCE - #include +- #define _GNU_SOURCE + #include int -@@ -10426,7 +11573,6 @@ - cat >>conftest.$ac_ext <<_ACEOF +@@ -6828,7 +7571,6 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -- #define _GNU_SOURCE - #include +- #define _GNU_SOURCE + #include int -diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in ---- gcl-2.6.8.ORIG/configure.in 2010-03-23 10:26:09.296083076 -0600 -+++ gcl-2.6.8/configure.in 2010-03-23 10:29:26.141909779 -0600 -@@ -448,6 +448,7 @@ - LDFLAGS=" " - fi - -+AC_USE_SYSTEM_EXTENSIONS - AC_PROG_CC - AC_PROG_CPP - AC_SUBST(CC) -@@ -1404,7 +1405,6 @@ - # - AC_MSG_CHECKING([for isnormal]) - AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -- #define _GNU_SOURCE - #include - ]],[[ - float f; -@@ -1432,7 +1432,6 @@ - - AC_MSG_CHECKING([for isfinite]) - AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -- #define _GNU_SOURCE - #include - ]],[[ - 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 2010-03-23 10:26:09.297078376 -0600 -+++ gcl-2.6.8/h/gclincl.h.in 2010-03-23 10:29:41.000000000 -0600 +--- h/gclincl.h.in.orig 2010-12-30 10:52:29.000000000 -0700 ++++ h/gclincl.h.in 2010-12-30 11:04:34.000000000 -0700 @@ -1,4 +1,7 @@ /* h/gclincl.h.in. Generated from configure.in by autoheader. */ +/* Whether compiling on a glibc-based system */ @@ -1771,7 +1370,7 @@ diff -dur gcl-2.6.8.ORIG/h/gclincl.h.in gcl-2.6.8/h/gclincl.h.in /* define where the heap could begin. Normally should be the smallest value returned by sbrk(). Underestimating by 10-20 megabytes is not a problem. */ -@@ -158,7 +161,6 @@ +@@ -158,7 +161,6 @@ SGC is enabled. */ #ifdef IN_NUM_CO #ifdef HAVE_ISNORMAL @@ -1779,7 +1378,7 @@ diff -dur gcl-2.6.8.ORIG/h/gclincl.h.in gcl-2.6.8/h/gclincl.h.in #include #define ISNORMAL(a) isnormal(a) #else -@@ -179,7 +181,6 @@ +@@ -179,7 +181,6 @@ SGC is enabled. */ #ifdef NEED_ISFINITE #ifdef HAVE_ISFINITE @@ -1787,11 +1386,10 @@ 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 -@@ -371,3 +372,35 @@ - +@@ -393,5 +394,37 @@ SGC is enabled. */ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -+ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE @@ -1823,3 +1421,6 @@ diff -dur gcl-2.6.8.ORIG/h/gclincl.h.in gcl-2.6.8/h/gclincl.h.in + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE ++ + /* Define to `unsigned int' if does not define. */ + #undef size_t diff --git a/gcl-2.6.8-fd-leak.patch b/gcl-2.6.8-fd-leak.patch index 5dc08b2..bf8cf67 100644 --- a/gcl-2.6.8-fd-leak.patch +++ b/gcl-2.6.8-fd-leak.patch @@ -1,7 +1,6 @@ -diff -dur gcl-2.6.8.ORIG/o/run_process.c gcl-2.6.8/o/run_process.c ---- gcl-2.6.8.ORIG/o/run_process.c 2006-09-15 11:45:18.000000000 -0600 -+++ gcl-2.6.8/o/run_process.c 2008-12-29 17:22:10.000000000 -0700 -@@ -526,10 +526,10 @@ +--- o/run_process.c.orig 2010-08-04 15:44:27.000000000 -0600 ++++ o/run_process.c 2010-12-29 11:33:45.670403342 -0700 +@@ -528,10 +528,10 @@ char **argv; fdout = ostream->sm.sm_int0; if (fork() == 0) { /* the child --- replace standard in and out with descriptors given */ diff --git a/gcl-2.6.8-getcwd.patch b/gcl-2.6.8-getcwd.patch index 48dfd77..ee5ee25 100644 --- a/gcl-2.6.8-getcwd.patch +++ b/gcl-2.6.8-getcwd.patch @@ -1,40 +1,20 @@ -diff -dur gcl-2.6.8.ORIG/o/unixfsys.c gcl-2.6.8/o/unixfsys.c ---- gcl-2.6.8.ORIG/o/unixfsys.c 2010-03-23 09:49:59.695957414 -0600 -+++ gcl-2.6.8/o/unixfsys.c 2010-03-23 09:50:57.452959648 -0600 -@@ -149,18 +149,6 @@ - #define MAXPATHLEN 512 +--- o/unixfsys.c.orig 2010-12-29 11:52:55.301247671 -0700 ++++ o/unixfsys.c 2010-12-29 11:58:52.389645190 -0700 +@@ -150,17 +150,6 @@ DEV_FOUND: #endif -- + -#ifdef HAVE_GETCWD -char * --getwd(char *buffer) --{ +-getwd(char *buffer) { -#ifndef _WIN32 -- char *getcwd(char *, size_t); +- char *getcwd(char *, size_t); -#endif -- return(getcwd(buffer, MAXPATHLEN)); +- return(getcwd(buffer, MAXPATHLEN)); -} -#endif - - #ifdef DGUX - - -@@ -278,6 +266,8 @@ - if ( 0 == current_directory_length ) { - FEerror ( "truename could not determine the current directory.", 1, "" ); - } -+#elif defined(HAVE_GETCWD) -+ getcwd(current_directory, MAXPATHLEN); - #else - getcwd(current_directory,sizeof(current_directory)); - #endif -@@ -361,6 +351,8 @@ - FEerror ( "truename could not determine the current directory.", 1, "" ); - } - p = directory; -+#elif defined(HAVE_GETCWD) -+ p = getcwd(directory, MAXPATHLEN); - #else - p = getcwd(directory,sizeof(directory)); - #endif +- + #define pcopy(a_,b_,c_,d_) ({\ + unsigned _c=c_,_d=d_;\ + if (_c+_d>=MAXPATHLEN-16) FEerror("Can't expand pathname ~a",1,namestring);\ diff --git a/gcl-2.6.8-infrastructure.patch b/gcl-2.6.8-infrastructure.patch index c2826d4..5891589 100644 --- a/gcl-2.6.8-infrastructure.patch +++ b/gcl-2.6.8-infrastructure.patch @@ -1,34893 +1,7230 @@ -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-12-10 08:29:51.000000000 -0700 -@@ -1,9 +1,10 @@ +--- configure.orig 2010-11-09 13:48:55.000000000 -0700 ++++ configure 2010-12-30 13:27:14.477239112 -0700 +@@ -1,6 +1,6 @@ #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -+# Free Software Foundation, Inc. - --timestamp='2005-04-22' -+timestamp='2009-11-20' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -17,23 +18,25 @@ - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. - # - # 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. - --# Originally written by Per Bothner . --# Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+ -+# Originally written by Per Bothner. Please send patches (context -+# diff format) to and include a ChangeLog -+# entry. + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.67. ++# Generated by GNU Autoconf 2.68. # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. # --# The plan is that this can be called by configure scripts if you --# don't specify an explicit build system type. -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - - me=`echo "$0" | sed -e 's,.*/,,'` - -@@ -53,8 +56,8 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 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." -@@ -66,11 +69,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -104,7 +107,7 @@ - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -@@ -123,7 +126,7 @@ - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ;' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) -@@ -158,6 +161,7 @@ - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched -@@ -166,7 +170,7 @@ - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -- | grep __ELF__ >/dev/null -+ | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? -@@ -196,55 +200,23 @@ - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -- amd64:OpenBSD:*:*) -- echo x86_64-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- cats:OpenBSD:*:*) -- echo arm-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- luna88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mips64-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -+ exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; - macppc:MirBSD:*:*) -- echo powerppc-unknown-mirbsd${UNAME_RELEASE} -- exit 0 ;; -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) -@@ -297,40 +269,43 @@ - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -+ exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe -- exit 0 ;; -+ exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 -- exit 0 ;; -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm:riscos:*:*|arm:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then -@@ -338,32 +313,51 @@ - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -+ exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 -- exit 0 ;; -+ exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in -- sparc) echo sparc-icl-nx7 && exit 0 ;; -+ sparc) echo sparc-icl-nx7; exit ;; - esac ;; -+ s390x:SunOS:*:*) -+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -- i86pc:SunOS:5.*:*) -- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; -+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) -+ echo i386-pc-auroraux${UNAME_RELEASE} -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) -+ eval $set_cc_for_build -+ SUN_ARCH="i386" -+ # If there is a compiler, see if it is configured for 64-bit objects. -+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. -+ # This test works for both compilers. -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ SUN_ARCH="x86_64" -+ fi -+ fi -+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) -@@ -372,10 +366,10 @@ - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 -@@ -387,10 +381,10 @@ - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor -@@ -401,40 +395,40 @@ - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -458,32 +452,33 @@ - exit (-1); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c \ -- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` -@@ -499,29 +494,29 @@ - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. -- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` -@@ -529,7 +524,7 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build -@@ -544,15 +539,19 @@ - exit(0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -- echo rs6000-ibm-aix3.2.5 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else -+ echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -- *:AIX:*:[45]) -+ exit ;; -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 -@@ -565,28 +564,28 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in -@@ -648,9 +647,19 @@ - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then -- # avoid double evaluation of $set_cc_for_build -- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else -@@ -658,11 +667,11 @@ - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -690,219 +699,248 @@ - exit (0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -- exit 0 ;; -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +@@ -89,6 +89,7 @@ fi + IFS=" "" $as_nl" + + # Find who we are. Look in the path if we contain no directory separator. ++as_myself= + case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +@@ -214,11 +215,18 @@ IFS=$as_save_IFS + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. ++ # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL +- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} ++ case $- in # (((( ++ *v*x* | *x*v* ) as_opts=-vx ;; ++ *v* ) as_opts=-v ;; ++ *x* ) as_opts=-x ;; ++ * ) as_opts= ;; + esac -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -- i*:MINGW*:*) -+ exit ;; -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:[34]*) -- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' -- exit 0 ;; -+ exit ;; -+ *:Interix*:*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ authenticamd | genuineintel | EM64T) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -- exit 0 ;; -+ exit ;; -+ 8664:Windows_NT:*) -+ echo x86_64-pc-mks -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix -- exit 0 ;; -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -- amd64:CYGWIN*:*:*) -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin -- exit 0 ;; -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -- exit 0 ;; -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; -+ alpha:Linux:*:*) -+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -+ EV5) UNAME_MACHINE=alphaev5 ;; -+ EV56) UNAME_MACHINE=alphaev56 ;; -+ PCA56) UNAME_MACHINE=alphapca56 ;; -+ PCA57) UNAME_MACHINE=alphapca56 ;; -+ EV6) UNAME_MACHINE=alphaev6 ;; -+ EV67) UNAME_MACHINE=alphaev67 ;; -+ EV68*) UNAME_MACHINE=alphaev68 ;; -+ esac -+ objdump --private-headers /bin/sh | grep -q ld.so.1 -+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu -- exit 0 ;; -+ exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu -- exit 0 ;; -+ exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ i*86:Linux:*:*) -+ LIBC=gnu -+ eval $set_cc_for_build -+ sed 's/^ //' << EOF >$dummy.c -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif -+EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -- mips:Linux:*:*) -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #undef CPU -- #undef mips -- #undef mipsel -- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mipsel -- #else -- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips -- #else -- CPU= -- #endif -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -- ;; -- mips64:Linux:*:*) -+ exit ;; -+ mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU -- #undef mips64 -- #undef mips64el -+ #undef ${UNAME_MACHINE} -+ #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -- CPU=mips64el -+ CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) -- CPU=mips64 -+ CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -- ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -- exit 0 ;; -- ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -- exit 0 ;; -- alpha:Linux:*:*) -- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -- EV5) UNAME_MACHINE=alphaev5 ;; -- EV56) UNAME_MACHINE=alphaev56 ;; -- PCA56) UNAME_MACHINE=alphapca56 ;; -- PCA57) UNAME_MACHINE=alphapca56 ;; -- EV6) UNAME_MACHINE=alphaev6 ;; -- EV67) UNAME_MACHINE=alphaev67 ;; -- EV68*) UNAME_MACHINE=alphaev68 ;; -- esac -- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null -- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; -+ padre:Linux:*:*) -+ echo sparc-unknown-linux-gnu -+ exit ;; -+ parisc64:Linux:*:* | hppa64:Linux:*:*) -+ echo hppa64-unknown-linux-gnu -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -@@ -910,87 +948,40 @@ - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -- parisc64:Linux:*:* | hppa64:Linux:*:*) -- echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ ppc64:Linux:*:*) -+ echo powerpc64-unknown-linux-gnu -+ exit ;; -+ ppc:Linux:*:*) -+ echo powerpc-unknown-linux-gnu -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu -- exit 0 ;; -- i*86:Linux:*:*) -- # The BFD linker knows what the default object file format is, so -- # first see if it will tell us. cd to the root directory to prevent -- # problems with other programs or directories called `ld' in the path. -- # Set LC_ALL=C to ensure ld outputs messages in English. -- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ -- | sed -ne '/supported targets:/!d -- s/[ ][ ]*/ /g -- s/.*supported targets: *// -- s/ .*// -- p'` -- case "$ld_supported_targets" in -- elf32-i386) -- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" -- ;; -- a.out-i386-linux) -- echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -- coff-i386) -- echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -- "") -- # Either a pre-BFD a.out linker (linux-gnuoldld) or -- # one that does not give us useful --help. -- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -- esac -- # Determine whether the default compiler is a.out or elf -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #ifdef __ELF__ -- # ifdef __GLIBC__ -- # if __GLIBC__ >= 2 -- LIBC=gnu -- # else -- LIBC=gnulibc1 -- # endif -- # else -- LIBC=gnulibc1 -- # endif -- #else -- #ifdef __INTEL_COMPILER -- LIBC=gnu -- #else -- LIBC=gnuaout -- #endif -- #endif -- #ifdef __dietlibc__ -- LIBC=dietlibc -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -- ;; -+ exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... -@@ -998,27 +989,27 @@ - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -+ exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -- i*86:syllable:*:*) -+ exit ;; -+ i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable -- exit 0 ;; -- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) -+ exit ;; -+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then -@@ -1026,15 +1017,16 @@ - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -+ exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv -- exit 0 ;; -+ exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix -- exit 0 ;; -+ exit ;; - M68*:*:R3V[5678]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ && { echo i486-ncr-sysv4; exit; } ;; -+ NCR*:*:4.2:* | MPRAS*:*:4.2:*) -+ OS_REL='.3' -+ test -r /etc/.relid \ -+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) -+ exit ;; -+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` -@@ -1126,73 +1131,94 @@ - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -+ exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 -- exit 0 ;; -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos -- exit 0 ;; -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; -+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in -- *86) UNAME_PROCESSOR=i686 ;; -+ i386) -+ eval $set_cc_for_build -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ UNAME_PROCESSOR="x86_64" -+ fi -+ fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then -@@ -1200,25 +1226,25 @@ - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -+ exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 -@@ -1229,41 +1255,50 @@ - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -+ exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -- exit 0 ;; -+ exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in -- A*) echo alpha-dec-vms && exit 0 ;; -- I*) echo ia64-dec-vms && exit 0 ;; -- V*) echo vax-dec-vms && exit 0 ;; -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix -- exit 0 ;; -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; -+ i*86:AROS:*:*) -+ echo ${UNAME_MACHINE}-pc-aros -+ exit ;; - esac ++ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + fi - #echo '(No uname command or uname output not recognized.)' 1>&2 -@@ -1295,7 +1330,7 @@ - #endif + if test x$as_have_required = xno; then : +@@ -643,10 +651,10 @@ X_LIBS + XMKMF + GMPDIR + GMP ++MAKEINFO + HAVE_MALLOC_ZONE_MEMALIGN + EGREP + GREP +-MAKEINFO + AWK + CPP + OBJEXT +@@ -747,6 +755,7 @@ LDFLAGS + LIBS + CPPFLAGS + CPP ++CPPFLAGS + XMKMF' - #if defined (__arm) && defined (__acorn) && defined (__unix) -- printf ("arm-acorn-riscix"); exit (0); -+ printf ("arm-acorn-riscix\n"); exit (0); - #endif - #if defined (hp300) && !defined (hpux) -@@ -1384,11 +1419,12 @@ - } - EOF +@@ -1152,7 +1161,7 @@ Try \`$0 --help' for more information" + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 +- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ++ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; --$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } + esac +@@ -1488,7 +1497,7 @@ test -n "$ac_init_help" && exit $ac_stat + if $ac_init_version; then + cat <<\_ACEOF + configure +-generated by GNU Autoconf 2.67 ++generated by GNU Autoconf 2.68 - # Apollos put the system type in the environment. + Copyright (C) 2010 Free Software Foundation, Inc. + This configure script is free software; the Free Software Foundation +@@ -1534,7 +1543,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + ac_retval=1 + fi +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval - # Convex versions that predate uname can use getsysinfo(1) + } # ac_fn_c_try_compile +@@ -1571,7 +1580,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 -@@ -1397,22 +1433,22 @@ - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac + ac_retval=1 fi +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -@@ -1423,9 +1459,9 @@ - the operating system you are using. It is advised that you - download the most up to date version of the config scripts from - -- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - and -- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - - If the version you run ($0) is already up to date, please - send the following data and any information you think might be -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-12-10 08:29:51.000000000 -0700 -@@ -1,9 +1,10 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -+# Free Software Foundation, Inc. - --timestamp='2005-04-22' -+timestamp='2009-11-20' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -21,22 +22,26 @@ - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, --# Boston, MA 02111-1307, USA. -- -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. -+# - # 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. - -+ - # Please send patches to . Submit a context --# diff and a properly formatted ChangeLog entry. -+# diff and a properly formatted GNU ChangeLog entry. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. - # Otherwise, we print the canonical config type on stdout and succeed. - -+# You can get the latest version of this script from: -+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD -+ - # This file is supposed to be the same for all GNU packages - # and recognize all the CPU types, system types and aliases - # that are meaningful with *any* GNU software. -@@ -70,8 +75,8 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 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." -@@ -83,11 +88,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -99,7 +104,7 @@ - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; -@@ -118,8 +123,10 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ -- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ kopensolaris*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -@@ -145,10 +152,13 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis | -knuth | -cray) -+ -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; -+ -bluegene*) -+ os=-cnk -+ ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 -@@ -170,6 +180,10 @@ - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -186,6 +200,10 @@ - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -230,23 +248,28 @@ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ -- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ -+ | lm32 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -- | mips64vr | mips64vrel \ -+ | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ -+ | mips64r5900 | mips64r5900el \ -+ | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -@@ -255,31 +278,40 @@ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | moxie \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | rx \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ -- | sparcv8 | sparcv9 | sparcv9b \ -- | strongarm \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ -+ | ubicom32 \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ -- | z8k) -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ -+ | z8k | z80) - basic_machine=$basic_machine-unknown - ;; -- m6811 | m68hc11 | m6812 | m68hc12) -+ m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; + } # ac_fn_c_try_cpp +@@ -1584,10 +1593,10 @@ fi + ac_fn_c_check_header_mongrel () + { + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +- if eval "test \"\${$3+set}\"" = set; then : ++ if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if eval "test \"\${$3+set}\"" = set; then : ++if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 + fi + eval ac_res=\$$3 +@@ -1650,7 +1659,7 @@ $as_echo "$as_me: WARNING: $2: proceedin + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if eval "test \"\${$3+set}\"" = set; then : ++if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 + else + eval "$3=\$ac_header_compiler" +@@ -1659,7 +1668,7 @@ eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } + fi +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_check_header_mongrel + +@@ -1700,7 +1709,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 + ac_retval=$ac_status + fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + + } # ac_fn_c_try_run +@@ -1714,7 +1723,7 @@ ac_fn_c_check_header_compile () + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if eval "test \"\${$3+set}\"" = set; then : ++if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -1732,7 +1741,7 @@ fi + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_check_header_compile + +@@ -1745,7 +1754,7 @@ ac_fn_c_check_member () + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 + $as_echo_n "checking for $2.$3... " >&6; } +-if eval "test \"\${$4+set}\"" = set; then : ++if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -1789,7 +1798,7 @@ fi + eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_check_member + +@@ -1966,7 +1975,7 @@ rm -f core *.core core.conftest.* gmon.o + rm -f conftest.val - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and -@@ -299,28 +331,32 @@ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -+ | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ -- | m32r-* | m32rle-* \ -+ | lm32-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | maxq-* | mcore-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -- | mips64vr-* | mips64vrel-* \ -+ | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ -+ | mips64r5900-* | mips64r5900el-* \ -+ | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -@@ -329,27 +365,34 @@ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ -+ | mt-* \ - | msp430-* \ -+ | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ -- | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | romp-* | rs6000-* | rx-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ -- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ -- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ -+ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ -- | xstormy16-* | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ -- | z8k-*) -+ | z8k-* | z80-*) -+ ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. -@@ -413,6 +456,10 @@ - basic_machine=m68k-apollo - os=-bsd - ;; -+ aros) -+ basic_machine=i386-pc -+ os=-aros -+ ;; - aux) - basic_machine=m68k-apple - os=-aux -@@ -421,10 +468,26 @@ - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; -+ bluegene*) -+ basic_machine=powerpc-ibm -+ os=-cnk -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; -+ cegcc) -+ basic_machine=arm-unknown -+ os=-cegcc -+ ;; - convex-c1) - basic_machine=c1-convex - os=-bsd -@@ -453,8 +516,8 @@ - basic_machine=craynv-cray - os=-unicosmp - ;; -- cr16c) -- basic_machine=cr16c-unknown -+ cr16) -+ basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) -@@ -492,6 +555,10 @@ - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ dicos) -+ basic_machine=i686-pc -+ os=-dicos -+ ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp -@@ -646,6 +713,14 @@ - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; -@@ -657,10 +732,17 @@ - basic_machine=ns32k-utek - os=-sysv - ;; -+ microblaze) -+ basic_machine=microblaze-xilinx -+ ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce -+ ;; - miniframe) - basic_machine=m68000-convergent - ;; -@@ -686,6 +768,9 @@ - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs -@@ -761,9 +846,8 @@ - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff - ;; - os400) - basic_machine=powerpc-ibm -@@ -785,6 +869,14 @@ - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; -@@ -794,6 +886,12 @@ - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; -@@ -850,6 +948,10 @@ - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff -@@ -876,6 +978,10 @@ - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; - sei) - basic_machine=mips-sei - os=-seiux -@@ -887,6 +993,9 @@ - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; - sh64) - basic_machine=sh64-unknown - ;; -@@ -976,6 +1085,10 @@ - basic_machine=tic6x-unknown - os=-coff - ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; -@@ -1051,6 +1164,10 @@ - basic_machine=z8k-unknown - os=-sim - ;; -+ z80-*-coff) -+ basic_machine=z80-unknown -+ os=-sim -+ ;; - none) - basic_machine=none-none - os=-none -@@ -1089,13 +1206,10 @@ - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv8 | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) -@@ -1142,6 +1256,9 @@ - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. -+ -auroraux) -+ os=-auroraux -+ ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; -@@ -1162,26 +1279,30 @@ - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ -- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ -- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ -+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ -+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ -+ | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ -- | -aos* \ -+ | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -- | -chorusos* | -chorusrdb* \ -+ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1199,7 +1320,7 @@ - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) -@@ -1311,6 +1432,9 @@ - -zvmoe) - os=-zvmoe - ;; -+ -dicos*) -+ os=-dicos -+ ;; - -none) - ;; - *) -@@ -1333,6 +1457,12 @@ - # system, and we'll never get to this point. + fi +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + + } # ac_fn_c_compute_int +@@ -1979,7 +1988,7 @@ ac_fn_c_check_func () + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if eval "test \"\${$3+set}\"" = set; then : ++if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -2034,7 +2043,7 @@ fi + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_check_func + cat >config.log <<_ACEOF +@@ -2042,7 +2051,7 @@ This file contains any messages produced + running configure, to aid debugging if configure makes a mistake. + + It was created by $as_me, which was +-generated by GNU Autoconf 2.67. Invocation command line was ++generated by GNU Autoconf 2.68. Invocation command line was + + $ $0 $@ + +@@ -2300,7 +2309,7 @@ $as_echo "$as_me: loading site script $a + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + as_fn_error $? "failed to load site script $ac_site_file +-See \`config.log' for more details" "$LINENO" 5 ; } ++See \`config.log' for more details" "$LINENO" 5; } + fi + done - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; -@@ -1342,9 +1472,9 @@ - arm*-semi) - os=-aout - ;; -- c4x-* | tic4x-*) -- os=-coff -- ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 -@@ -1370,6 +1500,9 @@ - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; -@@ -1388,6 +1521,9 @@ - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -@@ -1496,7 +1632,7 @@ - -sunos*) - vendor=sun - ;; -- -aix*) -+ -cnk*|-aix*) - vendor=ibm - ;; - -beos*) -@@ -1559,7 +1695,7 @@ +@@ -2593,7 +2602,7 @@ $SHELL "$ac_aux_dir/config.sub" sun4 >/d + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 + $as_echo_n "checking build system type... " >&6; } +-if test "${ac_cv_build+set}" = set; then : ++if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_build_alias=$build_alias +@@ -2609,7 +2618,7 @@ fi + $as_echo "$ac_cv_build" >&6; } + case $ac_cv_build in + *-*-*) ;; +-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; ++*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; + esac + build=$ac_cv_build + ac_save_IFS=$IFS; IFS='-' +@@ -2627,7 +2636,7 @@ case $build_os in *\ *) build_os=`echo " + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 + $as_echo_n "checking host system type... " >&6; } +-if test "${ac_cv_host+set}" = set; then : ++if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test "x$host_alias" = x; then +@@ -2642,7 +2651,7 @@ fi + $as_echo "$ac_cv_host" >&6; } + case $ac_cv_host in + *-*-*) ;; +-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; ++*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac + host=$ac_cv_host + ac_save_IFS=$IFS; IFS='-' +@@ -3066,7 +3075,7 @@ if test -n "$ac_tool_prefix"; then + set dummy ${ac_tool_prefix}gcc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then : ++if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +@@ -3106,7 +3115,7 @@ if test -z "$ac_cv_prog_CC"; then + set dummy gcc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : ++if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CC"; then +@@ -3159,7 +3168,7 @@ if test -z "$CC"; then + set dummy ${ac_tool_prefix}cc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then : ++if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +@@ -3199,7 +3208,7 @@ if test -z "$CC"; then + set dummy cc; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then : ++if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +@@ -3258,7 +3267,7 @@ if test -z "$CC"; then + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then : ++if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +@@ -3302,7 +3311,7 @@ do + set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : ++if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CC"; then +@@ -3357,7 +3366,7 @@ fi + test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + as_fn_error $? "no acceptable C compiler found in \$PATH +-See \`config.log' for more details" "$LINENO" 5 ; } ++See \`config.log' for more details" "$LINENO" 5; } + + # Provide some information about the compiler. + $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +@@ -3472,7 +3481,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + as_fn_error 77 "C compiler cannot create executables +-See \`config.log' for more details" "$LINENO" 5 ; } ++See \`config.log' for more details" "$LINENO" 5; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } +@@ -3515,7 +3524,7 @@ else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + as_fn_error $? "cannot compute suffix of executables: cannot compile and link +-See \`config.log' for more details" "$LINENO" 5 ; } ++See \`config.log' for more details" "$LINENO" 5; } + fi + rm -f conftest conftest$ac_cv_exeext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +@@ -3574,7 +3583,7 @@ $as_echo "$ac_try_echo"; } >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + as_fn_error $? "cannot run C compiled programs. + If you meant to cross compile, use \`--host'. +-See \`config.log' for more details" "$LINENO" 5 ; } ++See \`config.log' for more details" "$LINENO" 5; } + fi + fi + fi +@@ -3585,7 +3594,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_ex + ac_clean_files=$ac_clean_files_save + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 + $as_echo_n "checking for suffix of object files... " >&6; } +-if test "${ac_cv_objext+set}" = set; then : ++if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -3626,7 +3635,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + as_fn_error $? "cannot compute suffix of object files: cannot compile +-See \`config.log' for more details" "$LINENO" 5 ; } ++See \`config.log' for more details" "$LINENO" 5; } + fi + rm -f conftest.$ac_cv_objext conftest.$ac_ext + fi +@@ -3636,7 +3645,7 @@ OBJEXT=$ac_cv_objext + ac_objext=$OBJEXT + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 + $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +-if test "${ac_cv_c_compiler_gnu+set}" = set; then : ++if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -3673,7 +3682,7 @@ ac_test_CFLAGS=${CFLAGS+set} + ac_save_CFLAGS=$CFLAGS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 + $as_echo_n "checking whether $CC accepts -g... " >&6; } +-if test "${ac_cv_prog_cc_g+set}" = set; then : ++if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_save_c_werror_flag=$ac_c_werror_flag +@@ -3751,7 +3760,7 @@ else + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 + $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +-if test "${ac_cv_prog_cc_c89+set}" = set; then : ++if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_prog_cc_c89=no +@@ -3858,7 +3867,7 @@ if test -n "$CPP" && test -d "$CPP"; the + CPP= + fi + if test -z "$CPP"; then +- if test "${ac_cv_prog_CPP+set}" = set; then : ++ if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 + else + # Double quotes because CPP needs to be expanded +@@ -3974,7 +3983,7 @@ else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +-See \`config.log' for more details" "$LINENO" 5 ; } ++See \`config.log' for more details" "$LINENO" 5; } + fi - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) -diff -durN gcl-2.6.8.ORIG/configure gcl-2.6.8/configure ---- gcl-2.6.8.ORIG/configure 2010-01-26 12:41:11.000000000 -0700 -+++ gcl-2.6.8/configure 2010-03-23 10:17:17.095095643 -0600 -@@ -1,97 +1,807 @@ - #! /bin/sh + ac_ext=c +@@ -4039,7 +4048,7 @@ do + set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_AWK+set}" = set; then : ++if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$AWK"; then +@@ -4211,51 +4220,6 @@ fi + $as_echo_n "checking system version (for dynamic loading)... " >&6; } + if machine=`uname -m` ; then true; else machine=unknown ; fi + +-for ac_prog in makeinfo +-do +- # Extract the first word of "$ac_prog", so it can be a program name with args. +-set dummy $ac_prog; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_MAKEINFO+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- if test -n "$MAKEINFO"; then +- ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. +-else +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_prog_MAKEINFO="$ac_prog" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS - - # Guess values for system-dependent variables and create Makefiles. --# Generated automatically using autoconf version 2.13 --# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -+# Generated by GNU Autoconf 2.63. - # -+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - # This configure script is free software; the Free Software Foundation - # gives unlimited permission to copy, distribute and modify it. -+## --------------------- ## -+## M4sh Initialization. ## -+## --------------------- ## - --# Defaults: --ac_help= -+# Be more Bourne compatible -+DUALCASE=1; export DUALCASE # for MKS sh -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -+ emulate sh -+ NULLCMD=: -+ # Pre-4.2 versions of Zsh do 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 -+ -+ -+ -+ -+# PATH needs CR -+# Avoid depending upon Character Ranges. -+as_cr_letters='abcdefghijklmnopqrstuvwxyz' -+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -+as_cr_Letters=$as_cr_letters$as_cr_LETTERS -+as_cr_digits='0123456789' -+as_cr_alnum=$as_cr_Letters$as_cr_digits -+ -+as_nl=' -+' -+export as_nl -+# Printing a long string crashes Solaris 7 /usr/bin/printf. -+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then -+ as_echo='printf %s\n' -+ as_echo_n='printf %s' -+else -+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then -+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' -+ as_echo_n='/usr/ucb/echo -n' -+ else -+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"' -+ as_echo_n_body='eval -+ arg=$1; -+ case $arg in -+ *"$as_nl"*) -+ expr "X$arg" : "X\\(.*\\)$as_nl"; -+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; -+ esac; -+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" -+ ' -+ export as_echo_n_body -+ as_echo_n='sh -c $as_echo_n_body as_echo' -+ fi -+ export as_echo_body -+ as_echo='sh -c $as_echo_body as_echo' -+fi -+ -+# The user is always right. -+if test "${PATH_SEPARATOR+set}" != set; then -+ PATH_SEPARATOR=: -+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { -+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || -+ PATH_SEPARATOR=';' -+ } -+fi -+ -+# Support unset when possible. -+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then -+ as_unset=unset -+else -+ as_unset=false -+fi -+ -+ -+# IFS -+# We need space, tab and new line, in precisely that order. Quoting is -+# there to prevent editors from complaining about space-tab. -+# (If _AS_PATH_WALK were called with IFS unset, it would disable word -+# splitting by setting IFS to empty value.) -+IFS=" "" $as_nl" -+ -+# Find who we are. Look in the path if we contain no directory separator. -+case $0 in -+ *[\\/]* ) as_myself=$0 ;; -+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -+done -+IFS=$as_save_IFS -+ -+ ;; -+esac -+# We did not find ourselves, most probably we were run as `sh COMMAND' -+# in which case we are not to be found in the path. -+if test "x$as_myself" = x; then -+ as_myself=$0 -+fi -+if test ! -f "$as_myself"; then -+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 -+ { (exit 1); exit 1; } -+fi -+ -+# Work around bugs in pre-3.0 UWIN ksh. -+for as_var in ENV MAIL MAILPATH -+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -+done -+PS1='$ ' -+PS2='> ' -+PS4='+ ' -+ -+# NLS nuisances. -+LC_ALL=C -+export LC_ALL -+LANGUAGE=C -+export LANGUAGE -+ -+# Required to use basename. -+if expr a : '\(a\)' >/dev/null 2>&1 && -+ test "X`expr 00001 : '.*\(...\)'`" = X001; then -+ as_expr=expr -+else -+ as_expr=false -+fi -+ -+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then -+ as_basename=basename -+else -+ as_basename=false -+fi -+ -+ -+# Name of the executable. -+as_me=`$as_basename -- "$0" || -+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ -+ X"$0" : 'X\(//\)$' \| \ -+ X"$0" : 'X\(/\)' \| . 2>/dev/null || -+$as_echo X/"$0" | -+ sed '/^.*\/\([^/][^/]*\)\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\/\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\/\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` +-fi +-fi +-MAKEINFO=$ac_cv_prog_MAKEINFO +-if test -n "$MAKEINFO"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 +-$as_echo "$MAKEINFO" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +- test -n "$MAKEINFO" && break +-done +-test -n "$MAKEINFO" || MAKEINFO=""false"" +- +- +- + if test -f /usr/lib/NextStep/software_version; then + system=NEXTSTEP-`${AWK} '/3/,/3/' /usr/lib/NextStep/software_version` + else +@@ -4285,7 +4249,7 @@ case $use in + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 + $as_echo_n "checking for grep that handles long lines and -e... " >&6; } +-if test "${ac_cv_path_GREP+set}" = set; then : ++if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -z "$GREP"; then +@@ -4348,7 +4312,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 + $as_echo_n "checking for egrep... " >&6; } +-if test "${ac_cv_path_EGREP+set}" = set; then : ++if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 + else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +@@ -4415,7 +4379,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 + $as_echo_n "checking for ANSI C header files... " >&6; } +-if test "${ac_cv_header_stdc+set}" = set; then : ++if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -4543,7 +4507,7 @@ done + + + ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" +-if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then : ++if test "x$ac_cv_header_malloc_malloc_h" = xyes; then : + + else + as_fn_error $? "need malloc.h on macosx" "$LINENO" 5 +@@ -4554,7 +4518,7 @@ fi + #include + + " +-if test "x$ac_cv_member_struct__malloc_zone_t_memalign" = x""yes; then : ++if test "x$ac_cv_member_struct__malloc_zone_t_memalign" = xyes; then : + + $as_echo "#define HAVE_MALLOC_ZONE_MEMALIGN 1" >>confdefs.h + +@@ -4570,10 +4534,10 @@ esac + # sysconf + + ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +-if test "x$ac_cv_header_unistd_h" = x""yes; then : ++if test "x$ac_cv_header_unistd_h" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf in -lc" >&5 + $as_echo_n "checking for sysconf in -lc... " >&6; } +-if test "${ac_cv_lib_c_sysconf+set}" = set; then : ++if ${ac_cv_lib_c_sysconf+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +@@ -4620,7 +4584,7 @@ fi + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + + } # ac_fn_c_try_link +@@ -4653,23 +4617,30 @@ LIBS=$ac_check_lib_save_LIBS + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sysconf" >&5 + $as_echo "$ac_cv_lib_c_sysconf" >&6; } +-if test "x$ac_cv_lib_c_sysconf" = x""yes; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for _SC_CLK_TCK\"" >&5 +-$as_echo_n "checking \"for _SC_CLK_TCK\"... " >&6; } ++if test "x$ac_cv_lib_c_sysconf" = xyes; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _SC_CLK_TCK" >&5 ++$as_echo_n "checking for _SC_CLK_TCK... " >&6; } + if test "$cross_compiling" = yes; then : + hz=0 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- #include +- int +- main() { +- FILE *fp=fopen("conftest1","w"); + -+# CDPATH. -+$as_unset CDPATH ++ #include ++ #include + ++int ++main () ++{ + -+if test "x$CONFIG_SHELL" = x; then -+ if (eval ":") 2>/dev/null; then -+ as_have_required=yes -+else -+ as_have_required=no -+fi ++ FILE *fp=fopen("conftest1","w"); + fprintf(fp,"%lu\n",sysconf(_SC_CLK_TCK)); + fclose(fp); +- return 0; +- } ++ return 0; + -+ if test $as_have_required = yes && (eval ": -+(as_func_return () { -+ (exit \$1) -+} -+as_func_success () { -+ as_func_return 0 -+} -+as_func_failure () { -+ as_func_return 1 -+} -+as_func_ret_success () { -+ return 0 -+} -+as_func_ret_failure () { -+ return 1 ++ ; ++ return 0; +} -+ -+exitcode=0 -+if as_func_success; then -+ : + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + hz=`cat conftest1` +@@ -4693,6 +4664,117 @@ fi + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 ++$as_echo_n "checking for egrep... " >&6; } ++if ${ac_cv_path_EGREP+:} false; then : ++ $as_echo_n "(cached) " >&6 +else -+ exitcode=1 -+ echo as_func_success failed. -+fi -+ -+if as_func_failure; then -+ exitcode=1 -+ echo as_func_failure succeeded. -+fi ++ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 ++ then ac_cv_path_EGREP="$GREP -E" ++ else ++ if test -z "$EGREP"; then ++ ac_path_EGREP_found=false ++ # Loop through the user's path and test for each of PROGNAME-LIST ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_prog in egrep; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue ++# Check for GNU ac_path_EGREP and select it if it is found. ++ # Check for GNU $ac_path_EGREP ++case `"$ac_path_EGREP" --version 2>&1` in ++*GNU*) ++ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; ++*) ++ ac_count=0 ++ $as_echo_n 0123456789 >"conftest.in" ++ while : ++ do ++ cat "conftest.in" "conftest.in" >"conftest.tmp" ++ mv "conftest.tmp" "conftest.in" ++ cp "conftest.in" "conftest.nl" ++ $as_echo 'EGREP' >> "conftest.nl" ++ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break ++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ++ as_fn_arith $ac_count + 1 && ac_count=$as_val ++ if test $ac_count -gt ${ac_path_EGREP_max-0}; then ++ # Best one so far, save it but keep looking for a better one ++ ac_cv_path_EGREP="$ac_path_EGREP" ++ ac_path_EGREP_max=$ac_count ++ fi ++ # 10*(2^10) chars as input seems more than enough ++ test $ac_count -gt 10 && break ++ done ++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; ++esac + -+if as_func_ret_success; then -+ : ++ $ac_path_EGREP_found && break 3 ++ done ++ done ++ done ++IFS=$as_save_IFS ++ if test -z "$ac_cv_path_EGREP"; then ++ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 ++ fi +else -+ exitcode=1 -+ echo as_func_ret_success failed. -+fi -+ -+if as_func_ret_failure; then -+ exitcode=1 -+ echo as_func_ret_failure succeeded. ++ ac_cv_path_EGREP=$EGREP +fi + -+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then -+ : -+else -+ exitcode=1 -+ echo positional parameters were not saved. ++ fi +fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 ++$as_echo "$ac_cv_path_EGREP" >&6; } ++ EGREP="$ac_cv_path_EGREP" + -+test \$exitcode = 0) || { (exit 1); exit 1; } + -+( -+ as_lineno_1=\$LINENO -+ as_lineno_2=\$LINENO -+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && -+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -+") 2> /dev/null; then -+ : ++for ac_prog in makeinfo ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_MAKEINFO+:} false; then : ++ $as_echo_n "(cached) " >&6 +else -+ as_candidate_shells= -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH ++ if test -n "$MAKEINFO"; then ++ ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. -+ case $as_dir in -+ /*) -+ for as_base in sh bash ksh sh5; do -+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base" -+ done;; -+ esac ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_prog_MAKEINFO="$ac_prog" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi +done ++ done +IFS=$as_save_IFS + -+ -+ for as_shell in $as_candidate_shells $SHELL; do -+ # Try only shells that exist, to save several forks. -+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } && -+ { ("$as_shell") 2> /dev/null <<\_ASEOF -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -+ emulate sh -+ NULLCMD=: -+ # Pre-4.2 versions of Zsh do 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 -+ -+ -+: -+_ASEOF -+}; then -+ CONFIG_SHELL=$as_shell -+ as_have_required=yes -+ if { "$as_shell" 2> /dev/null <<\_ASEOF -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -+ emulate sh -+ NULLCMD=: -+ # Pre-4.2 versions of Zsh do 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 -+ -+ -+: -+(as_func_return () { -+ (exit $1) -+} -+as_func_success () { -+ as_func_return 0 -+} -+as_func_failure () { -+ as_func_return 1 -+} -+as_func_ret_success () { -+ return 0 -+} -+as_func_ret_failure () { -+ return 1 -+} -+ -+exitcode=0 -+if as_func_success; then -+ : -+else -+ exitcode=1 -+ echo as_func_success failed. -+fi -+ -+if as_func_failure; then -+ exitcode=1 -+ echo as_func_failure succeeded. -+fi -+ -+if as_func_ret_success; then -+ : -+else -+ exitcode=1 -+ echo as_func_ret_success failed. +fi -+ -+if as_func_ret_failure; then -+ exitcode=1 -+ echo as_func_ret_failure succeeded. +fi -+ -+if ( set x; as_func_ret_success y && test x = "$1" ); then -+ : ++MAKEINFO=$ac_cv_prog_MAKEINFO ++if test -n "$MAKEINFO"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 ++$as_echo "$MAKEINFO" >&6; } +else -+ exitcode=1 -+ echo positional parameters were not saved. -+fi -+ -+test $exitcode = 0) || { (exit 1); exit 1; } -+ -+( -+ as_lineno_1=$LINENO -+ as_lineno_2=$LINENO -+ test "x$as_lineno_1" != "x$as_lineno_2" && -+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } -+ -+_ASEOF -+}; then -+ break -+fi -+ -+fi -+ -+ done -+ -+ if test "x$CONFIG_SHELL" != x; then -+ for as_var in BASH_ENV ENV -+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -+ done -+ export CONFIG_SHELL -+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } +fi + + -+ if test $as_have_required = no; then -+ echo This script requires a shell more modern than all the -+ echo shells that I found on your system. Please install a -+ echo modern shell, or manually run the script under such a -+ echo shell if you do have one. -+ { (exit 1); exit 1; } -+fi ++ test -n "$MAKEINFO" && break ++done ++test -n "$MAKEINFO" || MAKEINFO=""false"" + + -+fi + + #MY_SUBDIRS= + +@@ -4708,10 +4790,10 @@ if test $use_gmp = yes ; then + PATCHED_SYMBOLS="" + if test "$enable_dynsysgmp" = "yes" ; then + ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default" +-if test "x$ac_cv_header_gmp_h" = x""yes; then : ++if test "x$ac_cv_header_gmp_h" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_init in -lgmp" >&5 + $as_echo_n "checking for __gmpz_init in -lgmp... " >&6; } +-if test "${ac_cv_lib_gmp___gmpz_init+set}" = set; then : ++if ${ac_cv_lib_gmp___gmpz_init+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +@@ -4745,26 +4827,37 @@ LIBS=$ac_check_lib_save_LIBS + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_init" >&5 + $as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; } +-if test "x$ac_cv_lib_gmp___gmpz_init" = x""yes; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for external gmp version\"" >&5 +-$as_echo_n "checking \"for external gmp version\"... " >&6; } ++if test "x$ac_cv_lib_gmp___gmpz_init" = xyes; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for external gmp version" >&5 ++$as_echo_n "checking for external gmp version... " >&6; } + if test "$cross_compiling" = yes; then : +- echo "Cannot use dynamic gmp lib" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Cannot use dynamic gmp lib" >&5 ++$as_echo "Cannot use dynamic gmp lib" >&6; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- int main() { + -+fi ++ #include + ++int ++main () ++{ + + #if __GNU_MP_VERSION == 4 || __GNU_MP_VERSION == 5 + return 0; + #else + return -1; + #endif +- } + -+(eval "as_func_return () { -+ (exit \$1) -+} -+as_func_success () { -+ as_func_return 0 -+} -+as_func_failure () { -+ as_func_return 1 -+} -+as_func_ret_success () { -+ return 0 -+} -+as_func_ret_failure () { -+ return 1 ++ ; ++ return 0; +} -+ -+exitcode=0 -+if as_func_success; then -+ : -+else -+ exitcode=1 -+ echo as_func_success failed. -+fi -+ -+if as_func_failure; then -+ exitcode=1 -+ echo as_func_failure succeeded. -+fi -+ -+if as_func_ret_success; then -+ : -+else -+ exitcode=1 -+ echo as_func_ret_success failed. -+fi -+ -+if as_func_ret_failure; then -+ exitcode=1 -+ echo as_func_ret_failure succeeded. -+fi -+ -+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then -+ : -+else -+ exitcode=1 -+ echo positional parameters were not saved. -+fi -+ -+test \$exitcode = 0") || { -+ echo No shell found that supports shell functions. -+ echo Please tell bug-autoconf@gnu.org about your system, -+ echo including any error possibly output before this message. -+ echo This can help us improve future autoconf versions. -+ echo Configuration will now proceed without shell functions. -+} -+ -+ -+ -+ as_lineno_1=$LINENO -+ as_lineno_2=$LINENO -+ test "x$as_lineno_1" != "x$as_lineno_2" && -+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { -+ -+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO -+ # uniformly replaced by the line number. The first 'sed' inserts a -+ # line-number line after each line using $LINENO; the second 'sed' -+ # does the real work. The second script uses 'N' to pair each -+ # line-number line with the line containing $LINENO, and appends -+ # trailing '-' during substitution so that $LINENO is not a special -+ # case at line end. -+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the -+ # scripts with optimization help from Paolo Bonzini. Blame Lee -+ # E. McMahon (1931-1989) for sed's syntax. :-) -+ sed -n ' -+ p -+ /[$]LINENO/= -+ ' <$as_myself | -+ sed ' -+ s/[$]LINENO.*/&-/ -+ t lineno -+ b -+ :lineno -+ N -+ :loop -+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ -+ t loop -+ s/-\n.*// -+ ' >$as_me.lineno && -+ chmod +x "$as_me.lineno" || -+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 -+ { (exit 1); exit 1; }; } -+ -+ # Don't try to exec as it changes $[0], causing all sort of problems -+ # (the dirname of $[0] is not the place where we might find the -+ # original and so on. Autoconf is especially sensitive to this). -+ . "./$as_me.lineno" -+ # Exit status is that of the last command. -+ exit -+} -+ -+ -+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then -+ as_dirname=dirname -+else -+ as_dirname=false -+fi -+ -+ECHO_C= ECHO_N= ECHO_T= -+case `echo -n x` in -+-n*) -+ case `echo 'x\c'` in -+ *c*) ECHO_T=' ';; # ECHO_T is single tab character. -+ *) ECHO_C='\c';; -+ esac;; -+*) -+ ECHO_N='-n';; -+esac -+if expr a : '\(a\)' >/dev/null 2>&1 && -+ test "X`expr 00001 : '.*\(...\)'`" = X001; then -+ as_expr=expr -+else -+ as_expr=false -+fi -+ -+rm -f conf$$ conf$$.exe conf$$.file -+if test -d conf$$.dir; then -+ rm -f conf$$.dir/conf$$.file -+else -+ rm -f conf$$.dir -+ mkdir conf$$.dir 2>/dev/null -+fi -+if (echo >conf$$.file) 2>/dev/null; then -+ if ln -s conf$$.file conf$$ 2>/dev/null; then -+ as_ln_s='ln -s' -+ # ... but there are two gotchas: -+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. -+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. -+ # In both cases, we have to default to `cp -p'. -+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || -+ as_ln_s='cp -p' -+ elif ln conf$$.file conf$$ 2>/dev/null; then -+ as_ln_s=ln -+ else -+ as_ln_s='cp -p' -+ fi -+else -+ as_ln_s='cp -p' -+fi -+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -+rmdir conf$$.dir 2>/dev/null -+ -+if mkdir -p . 2>/dev/null; then -+ as_mkdir_p=: -+else -+ test -d ./-p && rmdir ./-p -+ as_mkdir_p=false -+fi -+ -+if test -x / >/dev/null 2>&1; then -+ as_test_x='test -x' -+else -+ if ls -dL / >/dev/null 2>&1; then -+ as_ls_L_option=L -+ else -+ as_ls_L_option= -+ fi -+ as_test_x=' -+ eval sh -c '\'' -+ if test -d "$1"; then -+ test -d "$1/."; -+ else -+ case $1 in -+ -*)set "./$1";; -+ esac; -+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in -+ ???[sx]*):;;*)false;;esac;fi -+ '\'' sh -+ ' -+fi -+as_executable_p=$as_test_x -+ -+# Sed expression to map a string onto a valid CPP name. -+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" -+ -+# Sed expression to map a string onto a valid variable name. -+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -+ -+ -+ -+exec 7<&0 &1 -+ -+# Name of the host. -+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -+# so uname gets run too. -+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -+ -+# -+# Initializations. -+# - ac_default_prefix=/usr/local --# Any additions from configure.in: --ac_help="$ac_help -- --enable-maxpage=XXXX will compile in a page table of size XXX (eg '--enable-maxpage=64*1024' would give 64K pages allowing 256 MB if pages are 4K each) " --ac_help="$ac_help -- --enable-holepage=XXXX will compile in a XXX-sized hole between the heap and relocatable memory area (eg '--enable-holepage=64*1024' would give 64K pages allowing 256 MB if pages are 4K each) " --ac_help="$ac_help -- --enable-vssize=XXXX will compile in a value stack of size XXX " --ac_help="$ac_help -- --enable-bdssize=XXXX will compile in a binding stack of size XXX " --ac_help="$ac_help -- --enable-ihssize=XXXX will compile in a invocation history stack of size XXX " --ac_help="$ac_help -- --enable-frssize=XXXX will compile in a frame stack of size XXX " --ac_help="$ac_help -- --enable-machine=XXXX will force the use of one of the definitions in h/XXXX.defs " --ac_help="$ac_help -- --enable-notify=no will disable the automatic notification of gcl maintainers of successful builds/problems " --ac_help="$ac_help -- --enable-tkconfig=XXXX will force the use of a TK_CONFIG_PREFIX=XXXXX as place to look for tkConfig.sh and tclConfig.sh " --ac_help="$ac_help -- --enable-tclconfig=XXXX will force the use of a TCL_CONFIG_PREFIX=XXXXX as place to look for tclConfig.sh and tclConfig.sh " --ac_help="$ac_help -- --enable-infodir=XXXX will force the use of a INFO_DIR=XXXXX as place to look for info " --ac_help="$ac_help -- --enable-emacsdir=XXXX will manually specify the location for elisp files " --ac_help="$ac_help -- --enable-common-binary=yes forces use of lowest common denominator instruction sets, (default is =yes) " --ac_help="$ac_help -- --enable-japi=yes will compile in support for the JAPI graphical interface if present on your system" --ac_help="$ac_help -- --enable-xdr=yes will compile in support for XDR" --ac_help="$ac_help -- --enable-xgcl=yes will compile in support for XGCL" --ac_help="$ac_help -- --enable-dlopen uses dlopen for loading objects, which can then not be retained in saved images -- " --ac_help="$ac_help -- --enable-statsysbfd uses a static sytem bfd library for loading and relocationing object files -- " --ac_help="$ac_help -- --enable-dynsysbfd uses a dynamic shared sytem bfd library for loading and relocationing object files -- " --ac_help="$ac_help -- --enable-locbfd uses a static bfd library built from this source tree for loading and relocationing object files -- " --ac_help="$ac_help -- --enable-custreloc uses custom gcl code if available for loading and relocationing object files -- " --ac_help="$ac_help -- --enable-debug builds gcl with -g in CFLAGS to enable running under gdb -- " --ac_help="$ac_help -- --enable-gprof builds gcl with -pg in CFLAGS to enable profiling with gprof -- " --ac_help="$ac_help -- --enable-static will link your GCL against static as opposed to shared system libraries " --ac_help="$ac_help -- --enable-pic builds gcl with -fPIC in CFLAGS -- " --ac_help="$ac_help -- --enable-oldgmp will link against gmp2 instead of gmp3 -- " --ac_help="$ac_help -- --enable-dynsysgmp will link against the system libgmp3 overriding certain functions with patched versions from the local source -- " --ac_help="$ac_help -- --with-x use the X Window System" --ac_help="$ac_help ----enable-readine enables command line completion via the readline library " --ac_help="$ac_help ----enable-ansi builds a large gcl aiming for ansi compliance, -- --disable-ansi builds the smaller traditional CLtL1 image" -+ac_clean_files= -+ac_config_libobj_dir=. -+LIBOBJS= -+cross_compiling=no -+subdirs= -+MFLAGS= -+MAKEFLAGS= -+SHELL=${CONFIG_SHELL-/bin/sh} -+ -+# Identity of this package. -+PACKAGE_NAME= -+PACKAGE_TARNAME= -+PACKAGE_VERSION= -+PACKAGE_STRING= -+PACKAGE_BUGREPORT= -+ -+# Factoring default headers for most tests. -+ac_includes_default="\ -+#include -+#ifdef HAVE_SYS_TYPES_H -+# include -+#endif -+#ifdef HAVE_SYS_STAT_H -+# include -+#endif -+#ifdef STDC_HEADERS -+# include -+# include -+#else -+# ifdef HAVE_STDLIB_H -+# include -+# endif -+#endif -+#ifdef HAVE_STRING_H -+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -+# include -+# endif -+# include -+#endif -+#ifdef HAVE_STRINGS_H -+# include -+#endif -+#ifdef HAVE_INTTYPES_H -+# include -+#endif -+#ifdef HAVE_STDINT_H -+# include -+#endif -+#ifdef HAVE_UNISTD_H -+# include -+#endif" -+ -+ac_subst_vars='LTLIBOBJS -+LIBOBJS -+use -+GNU_LD -+LEADING_UNDERSCORE -+EXTRA_LOBJS -+O2FLAGS -+O3FLAGS -+NIFLAGS -+FINAL_CFLAGS -+BROKEN_O4_OPT -+NOTIFY -+TCL_LIBS -+TCL_DL_LIBS -+TCL_LIB_SPEC -+TK_XLIBSW -+TK_BUILD_LIB_SPEC -+TK_LIB_SPEC -+TCL_INCLUDE -+TK_INCLUDE -+TK_XINCLUDES -+TCL_LIBRARY -+TK_LIBRARY -+TK_CONFIG_PREFIX -+TCLSH -+INFO_DIR -+EMACS_DEFAULT_EL -+EMACS_SITE_LISP -+EMACS -+HAVE_SIGEMT -+HAVE_SIGSYS -+HAVE_SV_ONSTACK -+ENDIAN_ALREADY_DEFINED -+USE_CLEANUP -+HAVE_PUTENV -+HAVE_SETENV -+NO_PROFILE -+RL_LIB -+RL_OBJS -+CLSTANDARD -+SYSTEM -+FLISP -+HAVE_LONG_LONG -+PAGEWIDTH -+LITTLE_END -+LIBIBERTY -+LIBBFD -+BUILD_BFD -+X_CFLAGS -+X_LIBS -+XMKMF -+GMPDIR -+GMP -+MAKEINFO -+EGREP -+GREP -+AWK -+CPP -+OBJEXT -+EXEEXT -+ac_ct_CC -+CPPFLAGS -+LDFLAGS -+CFLAGS -+CC -+PROCESSOR_FLAGS -+host_os -+host_vendor -+host_cpu -+host -+build_os -+build_vendor -+build_cpu -+build -+VERSION -+target_alias -+host_alias -+build_alias -+LIBS -+ECHO_T -+ECHO_N -+ECHO_C -+DEFS -+mandir -+localedir -+libdir -+psdir -+pdfdir -+dvidir -+htmldir -+infodir -+docdir -+oldincludedir -+includedir -+localstatedir -+sharedstatedir -+sysconfdir -+datadir -+datarootdir -+libexecdir -+sbindir -+bindir -+program_transform_name -+prefix -+exec_prefix -+PACKAGE_BUGREPORT -+PACKAGE_STRING -+PACKAGE_VERSION -+PACKAGE_TARNAME -+PACKAGE_NAME -+PATH_SEPARATOR -+SHELL' -+ac_subst_files='' -+ac_user_opts=' -+enable_option_checking -+enable_maxpage -+enable_holepage -+enable_vssize -+enable_bdssize -+enable_ihssize -+enable_frssize -+enable_machine -+enable_notify -+enable_tkconfig -+enable_tclconfig -+enable_infodir -+enable_emacsdir -+enable_common_binary -+enable_japi -+enable_xdr -+enable_xgcl -+enable_dlopen -+enable_statsysbfd -+enable_dynsysbfd -+enable_locbfd -+enable_custreloc -+enable_debug -+enable_gprof -+enable_static -+enable_pic -+enable_oldgmp -+enable_dynsysgmp -+with_x -+enable_readline -+enable_ansi -+' -+ ac_precious_vars='build_alias -+host_alias -+target_alias -+CC -+CFLAGS -+LDFLAGS -+LIBS -+CPPFLAGS -+CPP -+XMKMF' -+ - - # Initialize some variables set by options. -+ac_init_help= -+ac_init_version=false -+ac_unrecognized_opts= -+ac_unrecognized_sep= - # The variables have the same names as the options, with - # dashes changed to underlines. --build=NONE --cache_file=./config.cache -+cache_file=/dev/null - exec_prefix=NONE --host=NONE - no_create= --nonopt=NONE - no_recursion= - prefix=NONE - program_prefix=NONE -@@ -100,94 +810,133 @@ - silent= - site= - srcdir= --target=NONE - verbose= - x_includes=NONE - x_libraries=NONE -+ -+# Installation directory options. -+# These are left unexpanded so users can "make install exec_prefix=/foo" -+# and all the variables that are supposed to be based on exec_prefix -+# by default will actually change. -+# Use braces instead of parens because sh, perl, etc. also accept them. -+# (The list follows the same order as the GNU Coding Standards.) - bindir='${exec_prefix}/bin' - sbindir='${exec_prefix}/sbin' - libexecdir='${exec_prefix}/libexec' --datadir='${prefix}/share' -+datarootdir='${prefix}/share' -+datadir='${datarootdir}' - sysconfdir='${prefix}/etc' - sharedstatedir='${prefix}/com' - localstatedir='${prefix}/var' --libdir='${exec_prefix}/lib' - includedir='${prefix}/include' - oldincludedir='/usr/include' --infodir='${prefix}/info' --mandir='${prefix}/man' -- --# Initialize some other variables. --subdirs= --MFLAGS= MAKEFLAGS= --SHELL=${CONFIG_SHELL-/bin/sh} --# Maximum number of lines to put in a shell here document. --ac_max_here_lines=12 -+docdir='${datarootdir}/doc/${PACKAGE}' -+infodir='${datarootdir}/info' -+htmldir='${docdir}' -+dvidir='${docdir}' -+pdfdir='${docdir}' -+psdir='${docdir}' -+libdir='${exec_prefix}/lib' -+localedir='${datarootdir}/locale' -+mandir='${datarootdir}/man' - - ac_prev= -+ac_dashdash= - for ac_option - do -- - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then -- eval "$ac_prev=\$ac_option" -+ eval $ac_prev=\$ac_option - ac_prev= - continue - fi - -- case "$ac_option" in -- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; -- *) ac_optarg= ;; -+ case $ac_option in -+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; -+ *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - -- case "$ac_option" in -+ case $ac_dashdash$ac_option in -+ --) -+ ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) -- bindir="$ac_optarg" ;; -+ bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) -- ac_prev=build ;; -+ ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) -- build="$ac_optarg" ;; -+ build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) -- cache_file="$ac_optarg" ;; -+ cache_file=$ac_optarg ;; - -- -datadir | --datadir | --datadi | --datad | --data | --dat | --da) -+ --config-cache | -C) -+ cache_file=config.cache ;; -+ -+ -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; -- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ -- | --da=*) -- datadir="$ac_optarg" ;; -+ -datadir=* | --datadir=* | --datadi=* | --datad=*) -+ datadir=$ac_optarg ;; -+ -+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ -+ | --dataroo | --dataro | --datar) -+ ac_prev=datarootdir ;; -+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ -+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) -+ datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) -- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` -+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. -- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then -- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } -- fi -- ac_feature=`echo $ac_feature| sed 's/-/_/g'` -- eval "enable_${ac_feature}=no" ;; -+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 -+ { (exit 1); exit 1; }; } -+ ac_useropt_orig=$ac_useropt -+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` -+ case $ac_user_opts in -+ *" -+"enable_$ac_useropt" -+"*) ;; -+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" -+ ac_unrecognized_sep=', ';; -+ esac -+ eval enable_$ac_useropt=no ;; -+ -+ -docdir | --docdir | --docdi | --doc | --do) -+ ac_prev=docdir ;; -+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) -+ docdir=$ac_optarg ;; -+ -+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) -+ ac_prev=dvidir ;; -+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) -+ dvidir=$ac_optarg ;; - - -enable-* | --enable-*) -- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` -+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. -- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then -- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } -- fi -- ac_feature=`echo $ac_feature| sed 's/-/_/g'` -- case "$ac_option" in -- *=*) ;; -- *) ac_optarg=yes ;; -+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 -+ { (exit 1); exit 1; }; } -+ ac_useropt_orig=$ac_useropt -+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` -+ case $ac_user_opts in -+ *" -+"enable_$ac_useropt" -+"*) ;; -+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" -+ ac_unrecognized_sep=', ';; - esac -- eval "enable_${ac_feature}='$ac_optarg'" ;; -+ eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ -@@ -196,116 +945,77 @@ - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) -- exec_prefix="$ac_optarg" ;; -+ exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - -- -help | --help | --hel | --he) -- # Omit some internal or obsolete options to make the list less imposing. -- # This message is too long to be a string in the A/UX 3.1 sh. -- cat << EOF --Usage: configure [options] [host] --Options: [defaults in brackets after descriptions] --Configuration: -- --cache-file=FILE cache test results in FILE -- --help print this message -- --no-create do not create output files -- --quiet, --silent do not print \`checking...' messages -- --version print the version of autoconf that created configure --Directory and file names: -- --prefix=PREFIX install architecture-independent files in PREFIX -- [$ac_default_prefix] -- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX -- [same as prefix] -- --bindir=DIR user executables in DIR [EPREFIX/bin] -- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] -- --libexecdir=DIR program executables in DIR [EPREFIX/libexec] -- --datadir=DIR read-only architecture-independent data in DIR -- [PREFIX/share] -- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] -- --sharedstatedir=DIR modifiable architecture-independent data in DIR -- [PREFIX/com] -- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] -- --libdir=DIR object code libraries in DIR [EPREFIX/lib] -- --includedir=DIR C header files in DIR [PREFIX/include] -- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] -- --infodir=DIR info documentation in DIR [PREFIX/info] -- --mandir=DIR man documentation in DIR [PREFIX/man] -- --srcdir=DIR find the sources in DIR [configure dir or ..] -- --program-prefix=PREFIX prepend PREFIX to installed program names -- --program-suffix=SUFFIX append SUFFIX to installed program names -- --program-transform-name=PROGRAM -- run sed PROGRAM on installed program names --EOF -- cat << EOF --Host type: -- --build=BUILD configure for building on BUILD [BUILD=HOST] -- --host=HOST configure for HOST [guessed] -- --target=TARGET configure for TARGET [TARGET=HOST] --Features and packages: -- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) -- --enable-FEATURE[=ARG] include FEATURE [ARG=yes] -- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] -- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) -- --x-includes=DIR X include files are in DIR -- --x-libraries=DIR X library files are in DIR --EOF -- if test -n "$ac_help"; then -- echo "--enable and --with options recognized:$ac_help" -- fi -- exit 0 ;; -+ -help | --help | --hel | --he | -h) -+ ac_init_help=long ;; -+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) -+ ac_init_help=recursive ;; -+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) -+ ac_init_help=short ;; - - -host | --host | --hos | --ho) -- ac_prev=host ;; -+ ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) -- host="$ac_optarg" ;; -+ host_alias=$ac_optarg ;; -+ -+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) -+ ac_prev=htmldir ;; -+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ -+ | --ht=*) -+ htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) -- includedir="$ac_optarg" ;; -+ includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) -- infodir="$ac_optarg" ;; -+ infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) -- libdir="$ac_optarg" ;; -+ libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) -- libexecdir="$ac_optarg" ;; -+ libexecdir=$ac_optarg ;; -+ -+ -localedir | --localedir | --localedi | --localed | --locale) -+ ac_prev=localedir ;; -+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) -+ localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ -- | --localstate | --localstat | --localsta | --localst \ -- | --locals | --local | --loca | --loc | --lo) -+ | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ -- | --localstate=* | --localstat=* | --localsta=* | --localst=* \ -- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) -- localstatedir="$ac_optarg" ;; -+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) -+ localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) -- mandir="$ac_optarg" ;; -+ mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ -- | --no-cr | --no-c) -+ | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ -@@ -319,26 +1029,26 @@ - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) -- oldincludedir="$ac_optarg" ;; -+ oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) -- prefix="$ac_optarg" ;; -+ prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) -- program_prefix="$ac_optarg" ;; -+ program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) -- program_suffix="$ac_optarg" ;; -+ program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ -@@ -355,7 +1065,17 @@ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) -- program_transform_name="$ac_optarg" ;; -+ program_transform_name=$ac_optarg ;; -+ -+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) -+ ac_prev=pdfdir ;; -+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) -+ pdfdir=$ac_optarg ;; -+ -+ -psdir | --psdir | --psdi | --psd | --ps) -+ ac_prev=psdir ;; -+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) -+ psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) -@@ -365,7 +1085,7 @@ - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) -- sbindir="$ac_optarg" ;; -+ sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ -@@ -376,58 +1096,69 @@ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) -- sharedstatedir="$ac_optarg" ;; -+ sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) -- site="$ac_optarg" ;; -+ site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) -- srcdir="$ac_optarg" ;; -+ srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) -- sysconfdir="$ac_optarg" ;; -+ sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) -- ac_prev=target ;; -+ ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) -- target="$ac_optarg" ;; -+ target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - -- -version | --version | --versio | --versi | --vers) -- echo "configure generated by autoconf version 2.13" -- exit 0 ;; -+ -version | --version | --versio | --versi | --vers | -V) -+ ac_init_version=: ;; - - -with-* | --with-*) -- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` -+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. -- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then -- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } -- fi -- ac_package=`echo $ac_package| sed 's/-/_/g'` -- case "$ac_option" in -- *=*) ;; -- *) ac_optarg=yes ;; -+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 -+ { (exit 1); exit 1; }; } -+ ac_useropt_orig=$ac_useropt -+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` -+ case $ac_user_opts in -+ *" -+"with_$ac_useropt" -+"*) ;; -+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" -+ ac_unrecognized_sep=', ';; - esac -- eval "with_${ac_package}='$ac_optarg'" ;; -+ eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) -- ac_package=`echo $ac_option|sed -e 's/-*without-//'` -+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. -- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then -- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } -- fi -- ac_package=`echo $ac_package| sed 's/-/_/g'` -- eval "with_${ac_package}=no" ;; -+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 -+ { (exit 1); exit 1; }; } -+ ac_useropt_orig=$ac_useropt -+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` -+ case $ac_user_opts in -+ *" -+"with_$ac_useropt" -+"*) ;; -+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" -+ ac_unrecognized_sep=', ';; -+ esac -+ eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. -@@ -438,160 +1169,768 @@ - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) -- x_includes="$ac_optarg" ;; -+ x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) -- x_libraries="$ac_optarg" ;; -+ x_libraries=$ac_optarg ;; - -- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } -+ -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -+Try \`$0 --help' for more information." >&2 -+ { (exit 1); exit 1; }; } - ;; - -+ *=*) -+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` -+ # Reject names that are not valid shell variable names. -+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && -+ { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 -+ { (exit 1); exit 1; }; } -+ eval $ac_envvar=\$ac_optarg -+ export $ac_envvar ;; -+ - *) -- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -- echo "configure: warning: $ac_option: invalid host type" 1>&2 -- fi -- if test "x$nonopt" != xNONE; then -- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } -- fi -- nonopt="$ac_option" -+ # FIXME: should be removed in autoconf 3.0. -+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 -+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && -+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 -+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac - done - - if test -n "$ac_prev"; then -- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -+ ac_option=--`echo $ac_prev | sed 's/_/-/g'` -+ { $as_echo "$as_me: error: missing argument to $ac_option" >&2 -+ { (exit 1); exit 1; }; } + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + # MPFILES=$GMPDIR/mpn/mul_n.o + # PATCHED_SYMBOLS=__gmpn_toom3_mul_n ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 4/5" >&5 ++$as_echo "4/5" >&6; } + MPFILES= + PATCHED_SYMBOLS= + # if test "$use" = "m68k-linux" ; then +@@ -4777,7 +4870,8 @@ if ac_fn_c_try_run "$LINENO"; then : + MP_INCLUDE=`cpp foo.c | grep /gmp.h | head -n 1 | $AWK '{print $3}' | tr -d '"'` + rm -f foo.c + else +- echo "Cannot use dynamic gmp lib" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Cannot use dynamic gmp lib" >&5 ++$as_echo "Cannot use dynamic gmp lib" >&6; } fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +@@ -4837,8 +4931,8 @@ $as_echo_n "checking use_gmp=yes, doing --trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 -- --# File descriptor usage: --# 0 standard input --# 1 file creation --# 2 errors and warnings --# 3 some systems may open it to /dev/tty --# 4 used on the Kubota Titan --# 6 checking for... messages and results --# 5 compiler messages saved in config.log --if test "$silent" = yes; then -- exec 6>/dev/null --else -- exec 6>&1 -+if test -n "$ac_unrecognized_opts"; then -+ case $enable_option_checking in -+ no) ;; -+ fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 -+ { (exit 1); exit 1; }; } ;; -+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; -+ 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= --for ac_arg -+# Check all directory arguments for consistency. -+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ -+ datadir sysconfdir sharedstatedir localstatedir includedir \ -+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ -+ libdir localedir mandir - do -- case "$ac_arg" in -- -no-create | --no-create | --no-creat | --no-crea | --no-cre \ -- | --no-cr | --no-c) ;; -- -no-recursion | --no-recursion | --no-recursio | --no-recursi \ -- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; -- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) -- ac_configure_args="$ac_configure_args '$ac_arg'" ;; -- *) ac_configure_args="$ac_configure_args $ac_arg" ;; -+ eval ac_val=\$$ac_var -+ # Remove trailing slashes. -+ case $ac_val in -+ */ ) -+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` -+ eval $ac_var=\$ac_val;; - esac -+ # Be sure to have absolute directory names. -+ case $ac_val in -+ [\\/$]* | ?:[\\/]* ) continue;; -+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;; -+ esac -+ { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 -+ { (exit 1); exit 1; }; } - done --# NLS nuisances. --# Only set these to C if already set. These must not be set unconditionally --# because not all systems understand e.g. LANG=C (notably SCO). --# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! --# Non-C LC_CTYPE values break the ctype check. --if test "${LANG+set}" = set; then LANG=C; export LANG; fi --if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi --if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi --if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi -+# There might be people who depend on the old broken behavior: `$host' -+# used to hold the argument of --host etc. -+# FIXME: To remove some day. -+build=$build_alias -+host=$host_alias -+target=$target_alias - --# confdefs.h avoids OS command line length limits that DEFS can exceed. --rm -rf conftest* confdefs.h --# AIX cpp loses on an empty file, so make sure it contains at least a newline. --echo > confdefs.h -+# FIXME: To remove some day. -+if test "x$host_alias" != x; then -+ if test "x$build_alias" = x; then -+ cross_compiling=maybe -+ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. -+ If a cross compiler is detected then cross compile mode will be used." >&2 -+ elif test "x$build_alias" != "x$host_alias"; then -+ cross_compiling=yes -+ fi -+fi -+ -+ac_tool_prefix= -+test -n "$host_alias" && ac_tool_prefix=$host_alias- -+ -+test "$silent" = yes && exec 6>/dev/null -+ -+ -+ac_pwd=`pwd` && test -n "$ac_pwd" && -+ac_ls_di=`ls -di .` && -+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || -+ { $as_echo "$as_me: error: working directory cannot be determined" >&2 -+ { (exit 1); exit 1; }; } -+test "X$ac_ls_di" = "X$ac_pwd_ls_di" || -+ { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 -+ { (exit 1); exit 1; }; } - --# A filename unique to this package, relative to the directory that --# configure is in, which we can look for to find out if srcdir is correct. --ac_unique_file= - - # Find the source files, if location was not specified. - if test -z "$srcdir"; then - ac_srcdir_defaulted=yes -- # Try the directory containing this script, then its parent. -- ac_prog=$0 -- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` -- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. -+ # Try the directory containing this script, then the parent directory. -+ ac_confdir=`$as_dirname -- "$as_myself" || -+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$as_myself" : 'X\(//\)[^/]' \| \ -+ X"$as_myself" : 'X\(//\)$' \| \ -+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -+$as_echo X"$as_myself" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)[^/].*/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` - srcdir=$ac_confdir -- if test ! -r $srcdir/$ac_unique_file; then -+ if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for leading underscore in object symbols\"" >&5 +-$as_echo_n "checking \"for leading underscore in object symbols\"... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for leading underscore in object symbols" >&5 ++$as_echo_n "checking for leading underscore in object symbols... " >&6; } + cat>foo.c < + #include +@@ -4849,45 +4943,53 @@ if nm foo.o |grep " U " | grep "_cos" >/ + LEADING_UNDERSCORE=1 + $as_echo "#define LEADING_UNDERSCORE 1" >>confdefs.h + +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5 +-$as_echo "\"yes\"" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } else - ac_srcdir_defaulted=no + LEADING_UNDERSCORE="" +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5 +-$as_echo "\"no\"" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } fi --if test ! -r $srcdir/$ac_unique_file; then -- if test "$ac_srcdir_defaulted" = yes; then -- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } -- else -- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } -- fi -+if test ! -r "$srcdir/$ac_unique_file"; then -+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." -+ { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 -+ { (exit 1); exit 1; }; } +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for GNU ld option -Map\"" >&5 +-$as_echo_n "checking \"for GNU ld option -Map\"... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld option -Map" >&5 ++$as_echo_n "checking for GNU ld option -Map... " >&6; } + touch map + $CC -o foo -Wl,-Map map foo.o >/dev/null 2>&1 + if test `cat map | wc -l` != "0" ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5 +-$as_echo "\"yes\"" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } + $as_echo "#define HAVE_GNU_LD 1" >>confdefs.h + + GNU_LD=1 + else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5 +-$as_echo "\"no\"" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + GNU_LD= fi --srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` -+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -+ac_abs_confdir=`( -+ cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 -+ { (exit 1); exit 1; }; } -+ pwd)` -+# When building in place, set srcdir=. -+if test "$ac_abs_confdir" = "$ac_pwd"; then -+ srcdir=. -+fi -+# Remove unnecessary trailing slashes from srcdir. -+# Double slashes in file names in object file debugging info -+# mess up M-x gdb in Emacs. -+case $srcdir in -+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -+esac -+for ac_var in $ac_precious_vars; do -+ eval ac_env_${ac_var}_set=\${${ac_var}+set} -+ eval ac_env_${ac_var}_value=\$${ac_var} -+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} -+ eval ac_cv_env_${ac_var}_value=\$${ac_var} -+done + rm -f foo.c foo.o foo map --# Prefer explicitly selected file to automatically selected ones. --if test -z "$CONFIG_SITE"; then -- if test "x$prefix" != xNONE; then -- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" -- else -- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" -- fi -+# -+# Report the --help message. -+# -+if test "$ac_init_help" = "long"; then -+ # Omit some internal or obsolete options to make the list less imposing. -+ # This message is too long to be a string in the A/UX 3.1 sh. -+ cat <<_ACEOF -+\`configure' configures this package to adapt to many kinds of systems. -+ -+Usage: $0 [OPTION]... [VAR=VALUE]... -+ -+To assign environment variables (e.g., CC, CFLAGS...), specify them as -+VAR=VALUE. See below for descriptions of some of the useful variables. -+ -+Defaults for the options are specified in brackets. -+ -+Configuration: -+ -h, --help display this help and exit -+ --help=short display options specific to this package -+ --help=recursive display the short help of all the included packages -+ -V, --version display version information and exit -+ -q, --quiet, --silent do not print \`checking...' messages -+ --cache-file=FILE cache test results in FILE [disabled] -+ -C, --config-cache alias for \`--cache-file=config.cache' -+ -n, --no-create do not create output files -+ --srcdir=DIR find the sources in DIR [configure dir or \`..'] -+ -+Installation directories: -+ --prefix=PREFIX install architecture-independent files in PREFIX -+ [$ac_default_prefix] -+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX -+ [PREFIX] -+ -+By default, \`make install' will install all the files in -+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -+an installation prefix other than \`$ac_default_prefix' using \`--prefix', -+for instance \`--prefix=\$HOME'. -+ -+For better control, use the options below. -+ -+Fine tuning of the installation directories: -+ --bindir=DIR user executables [EPREFIX/bin] -+ --sbindir=DIR system admin executables [EPREFIX/sbin] -+ --libexecdir=DIR program executables [EPREFIX/libexec] -+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] -+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] -+ --localstatedir=DIR modifiable single-machine data [PREFIX/var] -+ --libdir=DIR object code libraries [EPREFIX/lib] -+ --includedir=DIR C header files [PREFIX/include] -+ --oldincludedir=DIR C header files for non-gcc [/usr/include] -+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] -+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR] -+ --infodir=DIR info documentation [DATAROOTDIR/info] -+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale] -+ --mandir=DIR man documentation [DATAROOTDIR/man] -+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] -+ --htmldir=DIR html documentation [DOCDIR] -+ --dvidir=DIR dvi documentation [DOCDIR] -+ --pdfdir=DIR pdf documentation [DOCDIR] -+ --psdir=DIR ps documentation [DOCDIR] -+_ACEOF -+ -+ cat <<\_ACEOF +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"for size of gmp limbs\"" >&5 +-$as_echo_n "checking \"for size of gmp limbs\"... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for size of gmp limbs" >&5 ++$as_echo_n "checking for size of gmp limbs... " >&6; } + if test "$cross_compiling" = yes; then : + mpsize=0 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include + -+X features: -+ --x-includes=DIR X include files are in DIR -+ --x-libraries=DIR X library files are in DIR ++ #include + #include "$MP_INCLUDE" +- int main() { + -+System types: -+ --build=BUILD configure for building on BUILD [guessed] -+ --host=HOST cross-compile to build programs to run on HOST [BUILD] -+_ACEOF - fi --for ac_site_file in $CONFIG_SITE; do -+ -+if test -n "$ac_init_help"; then -+ -+ cat <<\_ACEOF -+ -+Optional Features: -+ --disable-option-checking ignore unrecognized --enable/--with options -+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) -+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes] -+ --enable-maxpage=XXXX will compile in a page table of size XXX (eg -+ '--enable-maxpage=64*1024' would give 64K pages -+ allowing 256 MB if pages are 4K each) -+ --enable-holepage=XXXX will compile in a XXX-sized hole between the heap -+ and relocatable memory area (eg -+ '--enable-holepage=64*1024' would give 64K pages -+ allowing 256 MB if pages are 4K each) -+ --enable-vssize=XXXX will compile in a value stack of size XXX -+ --enable-bdssize=XXXX will compile in a binding stack of size XXX -+ --enable-ihssize=XXXX will compile in a invocation history stack of size -+ XXX -+ --enable-frssize=XXXX will compile in a frame stack of size XXX -+ --enable-machine=XXXX will force the use of one of the definitions in -+ h/XXXX.defs -+ --enable-notify=no will disable the automatic notification of gcl -+ maintainers of successful builds/problems -+ --enable-tkconfig=XXXX will force the use of a TK_CONFIG_PREFIX=XXXXX as -+ place to look for tkConfig.sh and tclConfig.sh -+ --enable-tclconfig=XXXX will force the use of a TCL_CONFIG_PREFIX=XXXXX as -+ place to look for tclConfig.sh and tclConfig.sh -+ --enable-infodir=XXXX will force the use of a INFO_DIR=XXXXX as place to -+ look for info -+ --enable-emacsdir=XXXX will manually specify the location for elisp files -+ --enable-common-binary=yes -+ forces use of lowest common denominator instruction -+ sets, (default is =yes) -+ --enable-japi=yes will compile in support for the JAPI graphical -+ interface if present on your system -+ --enable-xdr=yes will compile in support for XDR -+ --enable-xgcl=yes will compile in support for XGCL -+ --enable-dlopen uses dlopen for loading objects, which can then not -+ be retained in saved images -+ --enable-statsysbfd uses a static sytem bfd library for loading and -+ relocationing object files -+ --enable-dynsysbfd uses a dynamic shared sytem bfd library for loading -+ and relocationing object files -+ --enable-locbfd uses a static bfd library built from this source -+ tree for loading and relocationing object files -+ --enable-custreloc uses custom gcl code if available for loading and -+ relocationing object files -+ --enable-debug builds gcl with -g in CFLAGS to enable running under -+ gdb -+ --enable-gprof builds gcl with -pg in CFLAGS to enable profiling -+ with gprof -+ --enable-static will link your GCL against static as opposed to -+ shared system libraries -+ --enable-pic builds gcl with -fPIC in CFLAGS -+ --enable-oldgmp will link against gmp2 instead of gmp3 -+ --enable-dynsysgmp will link against the system libgmp3 overriding -+ certain functions with patched versions from the -+ local source -+ --enable-readine enables command line completion via the readline -+ library -+ --enable-ansi builds a large gcl aiming for ansi compliance; the -+ default is to build the smaller traditional CLtL1 -+ image -+ -+Optional Packages: -+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] -+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) -+ --with-x use the X Window System -+ -+Some influential environment variables: -+ CC C compiler command -+ CFLAGS C compiler flags -+ LDFLAGS linker flags, e.g. -L if you have libraries in a -+ nonstandard directory -+ LIBS libraries to pass to the linker, e.g. -l -+ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if -+ you have headers in a nonstandard directory -+ CPP C preprocessor -+ XMKMF Path to xmkmf, Makefile generator for X Window System -+ -+Use these variables to override the choices made by `configure' or to help -+it to find libraries and programs with nonstandard names/locations. ++int ++main () ++{ + -+_ACEOF -+ac_status=$? -+fi + FILE *fp=fopen("conftest1","w"); + fprintf(fp,"%u",sizeof(mp_limb_t)); + fclose(fp); + return 0; +- } + -+if test "$ac_init_help" = "recursive"; then -+ # If there are subdirs, report their specific --help. -+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue -+ test -d "$ac_dir" || -+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || -+ continue -+ ac_builddir=. ++ ; ++ return 0; ++} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + mpsize=`cat conftest1` +@@ -4899,8 +5001,7 @@ rm -f core *.core core.conftest.* gmon.o + fi + + if test "$mpsize" = "0" ; then +- echo "Cannot determine mpsize" +- exit 1 ++ as_fn_error 1 "Cannot determine mpsize" "$LINENO" 5 + fi + cat >>confdefs.h <<_ACEOF + #define MP_LIMB_BYTES $mpsize +@@ -4909,23 +5010,31 @@ _ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mpsize" >&5 + $as_echo "$mpsize" >&6; } + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"_SHORT_LIMB\"" >&5 +-$as_echo_n "checking \"_SHORT_LIMB\"... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking _SHORT_LIMB" >&5 ++$as_echo_n "checking _SHORT_LIMB... " >&6; } + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include + -+case "$ac_dir" in -+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -+*) -+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` -+ # A ".." for each directory in $ac_dir_suffix. -+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` -+ case $ac_top_builddir_sub in -+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;; -+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; -+ esac ;; -+esac -+ac_abs_top_builddir=$ac_pwd -+ac_abs_builddir=$ac_pwd$ac_dir_suffix -+# for backward compatibility: -+ac_top_builddir=$ac_top_build_prefix -+ -+case $srcdir in -+ .) # We are building in place. -+ ac_srcdir=. -+ ac_top_srcdir=$ac_top_builddir_sub -+ ac_abs_top_srcdir=$ac_pwd ;; -+ [\\/]* | ?:[\\/]* ) # Absolute name. -+ ac_srcdir=$srcdir$ac_dir_suffix; -+ ac_top_srcdir=$srcdir -+ ac_abs_top_srcdir=$srcdir ;; -+ *) # Relative name. -+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix -+ ac_top_srcdir=$ac_top_build_prefix$srcdir -+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -+esac -+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -+ -+ cd "$ac_dir" || { ac_status=$?; continue; } -+ # Check for guested configure. -+ if test -f "$ac_srcdir/configure.gnu"; then -+ echo && -+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive -+ elif test -f "$ac_srcdir/configure"; then -+ echo && -+ $SHELL "$ac_srcdir/configure" --help=recursive -+ else -+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 -+ fi || ac_status=$? -+ cd "$ac_pwd" || { ac_status=$?; break; } -+ done -+fi ++ #include + #include "$MP_INCLUDE" +- int main() { + -+test -n "$ac_init_help" && exit $ac_status -+if $ac_init_version; then -+ cat <<\_ACEOF -+configure -+generated by GNU Autoconf 2.63 ++int ++main () ++{ + -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -+This configure script is free software; the Free Software Foundation -+gives unlimited permission to copy, distribute and modify it. -+_ACEOF -+ exit -+fi -+cat >config.log <<_ACEOF -+This file contains any messages produced by compilers while -+running configure, to aid debugging if configure makes a mistake. + #ifdef _SHORT_LIMB + return 0; + #else + return 1; + #endif +- } + -+It was created by $as_me, which was -+generated by GNU Autoconf 2.63. Invocation command line was ++ ; ++ return 0; ++} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + $as_echo "#define __SHORT_LIMB 1" >>confdefs.h +@@ -4939,23 +5048,31 @@ rm -f core *.core core.conftest.* gmon.o + conftest.$ac_objext conftest.beam conftest.$ac_ext + fi + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"_LONG_LONG_LIMB\"" >&5 +-$as_echo_n "checking \"_LONG_LONG_LIMB\"... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking _LONG_LONG_LIMB" >&5 ++$as_echo_n "checking _LONG_LONG_LIMB... " >&6; } + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include + -+ $ $0 $@ ++ #include + #include "$MP_INCLUDE" +- int main() { + -+_ACEOF -+exec 5>>config.log ++int ++main () +{ -+cat <<_ASUNAME -+## --------- ## -+## Platform. ## -+## --------- ## -+ -+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -+uname -m = `(uname -m) 2>/dev/null || echo unknown` -+uname -r = `(uname -r) 2>/dev/null || echo unknown` -+uname -s = `(uname -s) 2>/dev/null || echo unknown` -+uname -v = `(uname -v) 2>/dev/null || echo unknown` -+ -+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` -+ -+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` -+ -+_ASUNAME -+ -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ $as_echo "PATH: $as_dir" -+done -+IFS=$as_save_IFS -+ -+} >&5 + -+cat >&5 <<_ACEOF + #ifdef _LONG_LONG_LIMB + return 0; + #else + return 1; + #endif +- } + ++ ; ++ return 0; ++} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + $as_echo "#define __LONG_LONG_LIMB 1" >>confdefs.h +@@ -5003,8 +5120,8 @@ if test "x$with_x" = xno; then + have_x=disabled + else + case $x_includes,$x_libraries in #( +- *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( +- *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : ++ *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( ++ *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : + $as_echo_n "(cached) " >&6 + else + # One or both of the vars are not set, and there is no cached value. +@@ -5194,7 +5311,7 @@ fi + # AC_CHECK_LIB(Xaw,main,X_LIBS="$X_LIBS",miss=1,$X_LIBS)#until here + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lX11" >&5 + $as_echo_n "checking for main in -lX11... " >&6; } +-if test "${ac_cv_lib_X11_main+set}" = set; then : ++if ${ac_cv_lib_X11_main+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +@@ -5222,7 +5339,7 @@ LIBS=$ac_check_lib_save_LIBS + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_main" >&5 + $as_echo "$ac_cv_lib_X11_main" >&6; } +-if test "x$ac_cv_lib_X11_main" = x""yes; then : ++if test "x$ac_cv_lib_X11_main" = xyes; then : + X_LIBS="$X_LIBS -lX11" + else + miss=1 +@@ -5253,7 +5370,7 @@ if test "$enable_dlopen" = "yes" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 + $as_echo_n "checking for dlopen in -ldl... " >&6; } +-if test "${ac_cv_lib_dl_dlopen+set}" = set; then : ++if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +@@ -5287,15 +5404,14 @@ LIBS=$ac_check_lib_save_LIBS + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 + $as_echo "$ac_cv_lib_dl_dlopen" >&6; } +-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : ++if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + have_dl=1 + else + have_dl=0 + fi + + if test "$have_dl" = "0" ; then +- echo "Cannot find dlopen in -dl" +- exit 1 ++ as_fn_error 1 "Cannot find dlopen in -dl" "$LINENO" 5 + fi + + TLIBS="$TLIBS -ldl -rdynamic" +@@ -5305,10 +5421,10 @@ fi + + if test "$enable_statsysbfd" = "yes" || test "$enable_dynsysbfd" = "yes" ; then + ac_fn_c_check_header_mongrel "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default" +-if test "x$ac_cv_header_bfd_h" = x""yes; then : ++if test "x$ac_cv_header_bfd_h" = xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_init in -lbfd" >&5 + $as_echo_n "checking for bfd_init in -lbfd... " >&6; } +-if test "${ac_cv_lib_bfd_bfd_init+set}" = set; then : ++if ${ac_cv_lib_bfd_bfd_init+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +@@ -5342,7 +5458,7 @@ LIBS=$ac_check_lib_save_LIBS + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_init" >&5 + $as_echo "$ac_cv_lib_bfd_bfd_init" >&6; } +-if test "x$ac_cv_lib_bfd_bfd_init" = x""yes; then : ++if test "x$ac_cv_lib_bfd_bfd_init" = xyes; then : + # + # Old binutils appear to need CONST defined to const + # +@@ -5353,9 +5469,17 @@ $as_echo_n "checking if need to define C + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#define IN_GCC + -+## ----------- ## -+## Core tests. ## -+## ----------- ## ++ #define IN_GCC + #include +- int main() { symbol_info t; return 0;} + -+_ACEOF ++int ++main () ++{ ++symbol_info t; return 0; ++ ; ++ return 0; ++} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +@@ -5366,10 +5490,18 @@ else + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#define CONST const +- #define IN_GCC + ++ #define CONST const ++ #define IN_GCC + #include +- int main() {symbol_info t; return 0;} + -+# Keep a trace of the command line. -+# Strip out --no-create and --no-recursion so they do not pile up. -+# Strip out --silent because we don't want to record it for future runs. -+# Also quote any args containing shell meta-characters. -+# Make two passes to allow for proper duplicate-argument suppression. -+ac_configure_args= -+ac_configure_args0= -+ac_configure_args1= -+ac_must_keep_next=false -+for ac_pass in 1 2 -+do -+ for ac_arg -+ do -+ case $ac_arg in -+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ -+ | -silent | --silent | --silen | --sile | --sil) -+ continue ;; -+ *\'*) -+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; -+ esac -+ case $ac_pass in -+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; -+ 2) -+ ac_configure_args1="$ac_configure_args1 '$ac_arg'" -+ if test $ac_must_keep_next = true; then -+ ac_must_keep_next=false # Got value, back to normal. -+ else -+ case $ac_arg in -+ *=* | --config-cache | -C | -disable-* | --disable-* \ -+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ -+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ -+ | -with-* | --with-* | -without-* | --without-* | --x) -+ case "$ac_configure_args0 " in -+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; -+ esac -+ ;; -+ -* ) ac_must_keep_next=true ;; -+ esac -+ fi -+ ac_configure_args="$ac_configure_args '$ac_arg'" -+ ;; -+ esac -+ done -+done -+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } -+ -+# When interrupted or exit'd, cleanup temporary files, and complete -+# config.log. We remove comments because anyway the quotes in there -+# would cause problems or look ugly. -+# WARNING: Use '\'' to represent an apostrophe within the trap. -+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -+trap 'exit_status=$? -+ # Save into config.log some information that might help in debugging. -+ { -+ echo -+ -+ cat <<\_ASBOX -+## ---------------- ## -+## Cache variables. ## -+## ---------------- ## -+_ASBOX -+ echo -+ # The following way of writing the cache mishandles newlines in values, -+( -+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do -+ eval ac_val=\$$ac_var -+ case $ac_val in #( -+ *${as_nl}*) -+ case $ac_var in #( -+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; -+ esac -+ case $ac_var in #( -+ _ | IFS | as_nl) ;; #( -+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( -+ *) $as_unset $ac_var ;; -+ esac ;; -+ esac -+ done -+ (set) 2>&1 | -+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( -+ *${as_nl}ac_space=\ *) -+ sed -n \ -+ "s/'\''/'\''\\\\'\'''\''/g; -+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" -+ ;; #( -+ *) -+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" -+ ;; -+ esac | -+ sort -+) -+ echo -+ -+ cat <<\_ASBOX -+## ----------------- ## -+## Output variables. ## -+## ----------------- ## -+_ASBOX -+ echo -+ for ac_var in $ac_subst_vars -+ do -+ eval ac_val=\$$ac_var -+ case $ac_val in -+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; -+ esac -+ $as_echo "$ac_var='\''$ac_val'\''" -+ done | sort -+ echo -+ -+ if test -n "$ac_subst_files"; then -+ cat <<\_ASBOX -+## ------------------- ## -+## File substitutions. ## -+## ------------------- ## -+_ASBOX -+ echo -+ for ac_var in $ac_subst_files -+ do -+ eval ac_val=\$$ac_var -+ case $ac_val in -+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; -+ esac -+ $as_echo "$ac_var='\''$ac_val'\''" -+ done | sort -+ echo -+ fi -+ -+ if test -s confdefs.h; then -+ cat <<\_ASBOX -+## ----------- ## -+## confdefs.h. ## -+## ----------- ## -+_ASBOX -+ echo -+ cat confdefs.h -+ echo -+ fi -+ test "$ac_signal" != 0 && -+ $as_echo "$as_me: caught signal $ac_signal" -+ $as_echo "$as_me: exit $exit_status" -+ } >&5 -+ rm -f core *.core core.conftest.* && -+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files && -+ exit $exit_status -+' 0 -+for ac_signal in 1 2 13 15; do -+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -+done -+ac_signal=0 -+ -+# confdefs.h avoids OS command line length limits that DEFS can exceed. -+rm -f -r conftest* confdefs.h -+ -+# Predefined preprocessor variables. -+ -+cat >>confdefs.h <<_ACEOF -+#define PACKAGE_NAME "$PACKAGE_NAME" -+_ACEOF -+ -+ -+cat >>confdefs.h <<_ACEOF -+#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -+_ACEOF ++int ++main () ++{ ++symbol_info t; return 0; ++ ; ++ return 0; ++} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +@@ -5402,18 +5534,26 @@ fi + # BFD boolean syntax + # + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for useable bfd_boolean" >&5 +-$as_echo_n "checking for useable bfd_boolean... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable bfd_boolean" >&5 ++$as_echo_n "checking for usable bfd_boolean... " >&6; } + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#define IN_GCC + ++ #define IN_GCC + #include + bfd_boolean foo() {return FALSE;} +- int main() {return 0;} + -+cat >>confdefs.h <<_ACEOF -+#define PACKAGE_VERSION "$PACKAGE_VERSION" -+_ACEOF ++int ++main () ++{ ++return 0; ++ ; ++ return 0; ++} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +@@ -5442,9 +5582,17 @@ $as_echo "no" >&6; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include + ++ #include + #include +- int main() {struct bfd_link_info i;i.output_bfd=0;return 0;} + -+cat >>confdefs.h <<_ACEOF -+#define PACKAGE_STRING "$PACKAGE_STRING" -+_ACEOF ++int ++main () ++{ ++struct bfd_link_info i;i.output_bfd=0;return 0; ++ ; ++ return 0; ++} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +@@ -5482,7 +5630,7 @@ fi + BUILD_BFD=copy_bfd + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 + $as_echo_n "checking for inflate in -lz... " >&6; } +-if test "${ac_cv_lib_z_inflate+set}" = set; then : ++if ${ac_cv_lib_z_inflate+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +@@ -5516,7 +5664,7 @@ LIBS=$ac_check_lib_save_LIBS + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5 + $as_echo "$ac_cv_lib_z_inflate" >&6; } +-if test "x$ac_cv_lib_z_inflate" = x""yes; then : ++if test "x$ac_cv_lib_z_inflate" = xyes; then : + TLIBS="$TLIBS -lz" + else + as_fn_error $? "Need zlib for bfd linking" "$LINENO" 5 +@@ -5524,7 +5672,7 @@ fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5 + $as_echo_n "checking for dlsym in -ldl... " >&6; } +-if test "${ac_cv_lib_dl_dlsym+set}" = set; then : ++if ${ac_cv_lib_dl_dlsym+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +@@ -5558,7 +5706,7 @@ LIBS=$ac_check_lib_save_LIBS + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5 + $as_echo "$ac_cv_lib_dl_dlsym" >&6; } +-if test "x$ac_cv_lib_dl_dlsym" = x""yes; then : ++if test "x$ac_cv_lib_dl_dlsym" = xyes; then : + TLIBS="$TLIBS -ldl" + else + as_fn_error $? "Need libdl for bfd linking" "$LINENO" 5 +@@ -5642,7 +5790,7 @@ fi + # This bug is HP SR number 8606223364. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 + $as_echo_n "checking size of long... " >&6; } +-if test "${ac_cv_sizeof_long+set}" = set; then : ++if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 + else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : +@@ -5652,7 +5800,7 @@ else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + as_fn_error 77 "cannot compute sizeof (long) +-See \`config.log' for more details" "$LINENO" 5 ; } ++See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long=0 + fi +@@ -5675,26 +5823,34 @@ $as_echo_n "checking sizeof struct contb + # work around MSYS pwd result incompatibility + if test "$use" = "mingw" ; then + if test "$cross_compiling" = yes; then : +- echo Cannot find sizeof struct contblock;exit 1 ++ as_fn_error 1 "Cannot find sizeof struct contblock" "$LINENO" 5 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include + ++ #include + #define EXTER + #include "$MP_INCLUDE" + #include "h/enum.h" + #include "h/object.h" +- int main(int argc,char **argv,char **envp) { + -+cat >>confdefs.h <<_ACEOF -+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -+_ACEOF ++int ++main () ++{ + + FILE *f=fopen("conftest1","w"); + fprintf(f,"%u",sizeof(struct contblock)); + fclose(f); + return 0; +- } + -+# Let the site file select an alternate cache file if it wants to. -+# Prefer an explicitly selected file to automatically selected ones. -+ac_site_file1=NONE -+ac_site_file2=NONE -+if test -n "$CONFIG_SITE"; then -+ ac_site_file1=$CONFIG_SITE -+elif test "x$prefix" != xNONE; then -+ ac_site_file1=$prefix/share/config.site -+ ac_site_file2=$prefix/etc/config.site -+else -+ ac_site_file1=$ac_default_prefix/share/config.site -+ ac_site_file2=$ac_default_prefix/etc/config.site -+fi -+for ac_site_file in "$ac_site_file1" "$ac_site_file2" -+do -+ test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then -- echo "loading site script $ac_site_file" -+ { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -+$as_echo "$as_me: loading site script $ac_site_file" >&6;} -+ sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi - done - - if test -r "$cache_file"; then -- echo "loading cache $cache_file" -- . $cache_file -+ # Some versions of bash will fail to source /dev/null (special -+ # files actually), so we avoid doing that. -+ if test -f "$cache_file"; then -+ { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 -+$as_echo "$as_me: loading cache $cache_file" >&6;} -+ case $cache_file in -+ [\\/]* | ?:[\\/]* ) . "$cache_file";; -+ *) . "./$cache_file";; -+ esac -+ fi ++ ; ++ return 0; ++} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + sizeof_contblock=`cat conftest1` else -- echo "creating cache $cache_file" -- > $cache_file -+ { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 -+$as_echo "$as_me: creating cache $cache_file" >&6;} -+ >$cache_file -+fi -+ -+# Check that the precious variables saved in the cache have kept the same -+# value. -+ac_cache_corrupted=false -+for ac_var in $ac_precious_vars; do -+ eval ac_old_set=\$ac_cv_env_${ac_var}_set -+ eval ac_new_set=\$ac_env_${ac_var}_set -+ eval ac_old_val=\$ac_cv_env_${ac_var}_value -+ eval ac_new_val=\$ac_env_${ac_var}_value -+ case $ac_old_set,$ac_new_set in -+ set,) -+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} -+ ac_cache_corrupted=: ;; -+ ,set) -+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} -+ ac_cache_corrupted=: ;; -+ ,);; -+ *) -+ if test "x$ac_old_val" != "x$ac_new_val"; then -+ # differences in whitespace do not lead to failure. -+ ac_old_val_w=`echo x $ac_old_val` -+ ac_new_val_w=`echo x $ac_new_val` -+ if test "$ac_old_val_w" != "$ac_new_val_w"; then -+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} -+ ac_cache_corrupted=: -+ else -+ { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} -+ eval $ac_var=\$ac_old_val -+ fi -+ { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} -+ { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} -+ fi;; -+ esac -+ # Pass precious variables to config.status. -+ if test "$ac_new_set" = set; then -+ case $ac_new_val in -+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; -+ *) ac_arg=$ac_var=$ac_new_val ;; -+ esac -+ case " $ac_configure_args " in -+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. -+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; -+ esac -+ fi -+done -+if $ac_cache_corrupted; then -+ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+ { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} -+ { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} -+ { (exit 1); exit 1; }; } +- echo Cannot find sizeof struct contblock;exit 1 ++ as_fn_error 1 "Cannot find sizeof struct contblock" "$LINENO" 5 fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +@@ -5702,26 +5858,34 @@ fi + else + if test "$cross_compiling" = yes; then : +- echo Cannot find sizeof struct contblock;exit 1 ++ as_fn_error 1 "Cannot find sizeof struct contblock" "$LINENO" 5 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++ ++ #include + #define EXTER + #include "$MP_INCLUDE" + #include "`pwd`/h/enum.h" + #include "`pwd`/h/object.h" +- int main(int argc,char **argv,char **envp) { + ++int ++main () ++{ + + FILE *f=fopen("conftest1","w"); + fprintf(f,"%u",sizeof(struct contblock)); + fclose(f); + return 0; +- } + ++ ; ++ return 0; ++} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + sizeof_contblock=`cat conftest1` + else +- echo Cannot find sizeof struct contblock;exit 1 ++ as_fn_error 1 "Cannot find sizeof struct contblock" "$LINENO" 5 + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +@@ -5748,7 +5912,11 @@ $as_echo "WARNING: ASSUMING LITTLE ENDIA + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int main () { + ++int ++main () ++{ + + /* Are we little or big endian? Adapted from Harbison&Steele. */ + union + { +@@ -5757,6 +5925,9 @@ int main () { + } u; + u.d = 1.0; + return u.l[sizeof(double)/sizeof(int)-1] ? 0 : 1; + ++ ; ++ return 0; + } + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : +@@ -5787,15 +5958,23 @@ $as_echo "no: WARNING you must be able t + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- #include +- int main() { + ++ #include ++ #include + ++int ++main () ++{ + + FILE *f; + if (!(f=fopen("conftest1","w"))) + return -1; + fprintf(f,"%u",sbrk(0)); + return 0; +- } + ++ ; ++ return 0; ++} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + HAVE_SBRK=1 +@@ -5822,14 +6001,22 @@ $as_echo_n "checking for ADDR_NO_RANDOMI + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- #include +- int main(int argc,char *argv[],char *envp[]) { + ++ #include ++ #include + ++int ++main () ++{ + + FILE *f; + if (!(f=fopen("conftest1","w"))) return -1; + fprintf(f,"%x",ADDR_NO_RANDOMIZE); + return 0; +- } + ++ ; ++ return 0; ++} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + ADDR_NO_RANDOMIZE=`cat conftest1` +@@ -5859,7 +6046,8 @@ $as_echo_n "checking for personality(ADD + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-void gprof_cleanup() {}; + ++ void gprof_cleanup() {} + int main(int argc,char *argv[],char *envp[]) { + #include "h/unrandomize.h" + return 0;} +@@ -5891,8 +6079,9 @@ $as_echo_n "checking that sbrk is (now) + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- void gprof_cleanup() {}; + - ac_ext=c --# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. - ac_cpp='$CPP $CPPFLAGS' --ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' --ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' --cross_compiling=$ac_cv_prog_cc_cross -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu - --ac_exeext= --ac_objext=o --if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then -- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. -- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then -- ac_n= ac_c=' --' ac_t=' ' -- else -- ac_n=-n ac_c= ac_t= -- fi --else -- ac_n= ac_c='\c' ac_t= --fi - - -+ac_config_headers="$ac_config_headers h/gclincl.h" - - - VERSION=`cat majvers`.`cat minvers` -@@ -604,234 +1943,288 @@ - # - - help="--enable-maxpage=XXXX will compile in a page table of size XXX (default ${default_maxpage})" --# Check whether --enable-maxpage or --disable-maxpage was given. -+# Check whether --enable-maxpage was given. - if test "${enable_maxpage+set}" = set; then -- enableval="$enable_maxpage" -- cat >> confdefs.h <>confdefs.h <<_ACEOF - #define MAXPAGE $enable_maxpage --EOF -+_ACEOF - - fi - - --# Check whether --enable-holepage or --disable-holepage was given. -+# Check whether --enable-holepage was given. - if test "${enable_holepage+set}" = set; then -- enableval="$enable_holepage" -- cat >> confdefs.h <>confdefs.h <<_ACEOF - #define HOLEPAGE $enable_holepage --EOF -+_ACEOF - - fi - - --# Check whether --enable-vssize or --disable-vssize was given. -+# Check whether --enable-vssize was given. - if test "${enable_vssize+set}" = set; then -- enableval="$enable_vssize" -- cat >> confdefs.h <>confdefs.h <<_ACEOF - #define VSSIZE $enable_vssize --EOF -+_ACEOF - - fi - - --# Check whether --enable-bdssize or --disable-bdssize was given. -+# Check whether --enable-bdssize was given. - if test "${enable_bdssize+set}" = set; then -- enableval="$enable_bdssize" -- cat >> confdefs.h <>confdefs.h <<_ACEOF - #define BDSSIZE $enable_bdssize --EOF -+_ACEOF ++ #include ++ void gprof_cleanup() {} + int main(int argc,char * argv[],char * envp[]) { + FILE *f; + #ifdef CAN_UNRANDOMIZE_SBRK +@@ -5912,17 +6101,16 @@ rm -f core *.core core.conftest.* gmon.o + fi + if test "$SBRK" = "0" ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot trap sbrk" >&5 +-$as_echo "cannot trap sbrk" >&6; } +- exit 1 ++ as_fn_error 1 "cannot trap sbrk" "$LINENO" 5 + fi + if test "$cross_compiling" = yes; then : + SBRK1=0 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- void gprof_cleanup() {}; ++ ++ #include ++ void gprof_cleanup() {} + int main(int argc,char * argv[],char * envp[]) { + FILE *f; + #ifdef CAN_UNRANDOMIZE_SBRK +@@ -5942,9 +6130,7 @@ rm -f core *.core core.conftest.* gmon.o fi + if test "$SBRK1" = "0" ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot trap sbrk" >&5 +-$as_echo "cannot trap sbrk" >&6; } +- exit 1 ++ as_fn_error 1 "cannot trap sbrk" "$LINENO" 5 + fi + if test "$SBRK" = "$SBRK1" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +@@ -5968,14 +6154,23 @@ if test "$cross_compiling" = yes; then : + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++ ++ #include + #include +-int main() {size_t i=getpagesize(),j; ++ ++int ++main () ++{ ++ ++ size_t i=getpagesize(),j; + FILE *fp=fopen("conftest1","w"); + for (j=0;i>>=1;j++); + if (j<12) {printf("pagewidth %u is too small\n",j);return -1;} + fprintf(fp,"%u",j); +- return 0;} ++ return 0; ++ ; ++ return 0; ++} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + PAGEWIDTH=`cat conftest1` +@@ -5997,17 +6192,18 @@ _ACEOF --# Check whether --enable-ihssize or --disable-ihssize was given. -+# Check whether --enable-ihssize was given. - if test "${enable_ihssize+set}" = set; then -- enableval="$enable_ihssize" -- cat >> confdefs.h <>confdefs.h <<_ACEOF - #define IHSSIZE $enable_ihssize --EOF -+_ACEOF + old_LDFLAGS="$LDFLAGS" + LDFLAGS="$TLDFLAGS" +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"finding DBEGIN\"" >&5 +-$as_echo_n "checking \"finding DBEGIN\"... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking finding DBEGIN" >&5 ++$as_echo_n "checking finding DBEGIN... " >&6; } + if test "$cross_compiling" = yes; then : + dbegin=0 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++ + #include +- #include ++#include - fi +-void gprof_cleanup() {}; ++void gprof_cleanup() {} + int + main(int argc,char * argv[],char *envp[]) + { +@@ -6052,21 +6248,28 @@ $as_echo "got $dbegin" >&6; } + LDFLAGS="$old_LDFLAGS" --# Check whether --enable-frssize or --disable-frssize was given. -+# Check whether --enable-frssize was given. - if test "${enable_frssize+set}" = set; then -- enableval="$enable_frssize" -- cat >> confdefs.h <>confdefs.h <<_ACEOF - #define FRSSIZE $enable_frssize --EOF -+_ACEOF +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"finding CSTACK_ADDRESS\"" >&5 +-$as_echo_n "checking \"finding CSTACK_ADDRESS\"... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking finding CSTACK_ADDRESS" >&5 ++$as_echo_n "checking finding CSTACK_ADDRESS... " >&6; } + if test "$cross_compiling" = yes; then : + cstack_address=0 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++ + #include +-main() ++ ++int ++main () + { ++ + char *b ; + FILE *fp = fopen("conftest1","w"); + fprintf(fp,"%ld",((long) &b)); + fclose(fp); + return 0; ++ ++ ; ++ return 0; + } + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : +@@ -6088,8 +6291,8 @@ $as_echo "got $cstack_address" >&6; } - fi --# Check whether --enable-machine or --disable-machine was given. -+# Check whether --enable-machine was given. - if test "${enable_machine+set}" = set; then -- enableval="$enable_machine" -- enable_machine=$enableval -+ enableval=$enable_machine; enable_machine=$enableval +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking \"sizeof long long int\"" >&5 +-$as_echo_n "checking \"sizeof long long int\"... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sizeof long long int" >&5 ++$as_echo_n "checking sizeof long long int... " >&6; } + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } +@@ -6097,13 +6300,19 @@ $as_echo "no" >&6; } else - enable_machine="" - fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++ + #include +-main() ++ ++int ++main () + { ++ + if (sizeof(long long int) == 2*sizeof(long)) return 0; + return 1; +-} ++ ; ++ return 0; ++} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h +@@ -6162,7 +6371,7 @@ FLISP="saved_$SYSTEM" + for ac_func in getcwd + do : + ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" +-if test "x$ac_cv_func_getcwd" = x""yes; then : ++if test "x$ac_cv_func_getcwd" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_GETCWD 1 + _ACEOF +@@ -6173,7 +6382,7 @@ done + for ac_func in getwd + do : + ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd" +-if test "x$ac_cv_func_getwd" = x""yes; then : ++if test "x$ac_cv_func_getwd" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_GETWD 1 + _ACEOF +@@ -6182,7 +6391,7 @@ fi + done --#AC_ARG_ENABLE(gmp,[ --enable-gmp=no will disable use of GMP gnu multiprecision arithmetic, (default is =yes)] , --#[use_gmp=$enableval],[use_gmp="yes"]) -+#AC_ARG_ENABLE(gmp, -+# [AS_HELP_STRING([--enable-gmp=no], -+# [will disable use of GMP gnu multiprecision arithmetic, (default is =yes)])], -+# [use_gmp=$enableval],[use_gmp="yes"]) + ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" +-if test "x$ac_cv_func_uname" = x""yes; then : ++if test "x$ac_cv_func_uname" = xyes; then : + + else + $as_echo "#define NO_UNAME 1" >>confdefs.h +@@ -6190,7 +6399,7 @@ else + fi + + ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +-if test "x$ac_cv_func_gettimeofday" = x""yes; then : ++if test "x$ac_cv_func_gettimeofday" = xyes; then : + + else + $as_echo "#define NO_GETTOD 1" >>confdefs.h +@@ -6202,7 +6411,7 @@ fi + for ac_header in sys/ioctl.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" +-if test "x$ac_cv_header_sys_ioctl_h" = x""yes; then : ++if test "x$ac_cv_header_sys_ioctl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_SYS_IOCTL_H 1 + _ACEOF +@@ -6230,7 +6439,7 @@ done + for ac_header in sys/sockio.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default" +-if test "x$ac_cv_header_sys_sockio_h" = x""yes; then : ++if test "x$ac_cv_header_sys_sockio_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_SYS_SOCKIO_H 1 + _ACEOF +@@ -6253,12 +6462,12 @@ done + #-------------------------------------------------------------------- - use_gmp="yes" + ac_fn_c_check_func "$LINENO" "BSDgettimeofday" "ac_cv_func_BSDgettimeofday" +-if test "x$ac_cv_func_BSDgettimeofday" = x""yes; then : ++if test "x$ac_cv_func_BSDgettimeofday" = xyes; then : + $as_echo "#define HAVE_BSDGETTIMEOFDAY 1" >>confdefs.h --# Check whether --enable-notify or --disable-notify was given. -+# Check whether --enable-notify was given. - if test "${enable_notify+set}" = set; then -- enableval="$enable_notify" -- enable_notify=$enableval -+ enableval=$enable_notify; enable_notify=$enableval else - enable_notify="yes" - fi - + ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +-if test "x$ac_cv_func_gettimeofday" = x""yes; then : ++if test "x$ac_cv_func_gettimeofday" = xyes; then : --# Check whether --enable-tkconfig or --disable-tkconfig was given. -+# Check whether --enable-tkconfig was given. - if test "${enable_tkconfig+set}" = set; then -- enableval="$enable_tkconfig" -- TK_CONFIG_PREFIX=$enableval -+ enableval=$enable_tkconfig; TK_CONFIG_PREFIX=$enableval else - TK_CONFIG_PREFIX="unknown" - fi - + $as_echo "#define NO_GETTOD 1" >>confdefs.h +@@ -6292,7 +6501,7 @@ rm -f conftest* -- --# Check whether --enable-tclconfig or --disable-tclconfig was given. -+# Check whether --enable-tclconfig was given. - if test "${enable_tclconfig+set}" = set; then -- enableval="$enable_tclconfig" -- TCL_CONFIG_PREFIX=$enableval -+ enableval=$enable_tclconfig; TCL_CONFIG_PREFIX=$enableval + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 + $as_echo_n "checking for sin in -lm... " >&6; } +-if test "${ac_cv_lib_m_sin+set}" = set; then : ++if ${ac_cv_lib_m_sin+:} false; then : + $as_echo_n "(cached) " >&6 else - TCL_CONFIG_PREFIX="unknown" + ac_check_lib_save_LIBS=$LIBS +@@ -6326,7 +6535,7 @@ LIBS=$ac_check_lib_save_LIBS fi - - --# Check whether --enable-infodir or --disable-infodir was given. -+# Check whether --enable-infodir was given. - if test "${enable_infodir+set}" = set; then -- enableval="$enable_infodir" -- INFO_DIR=$enableval -+ enableval=$enable_infodir; INFO_DIR=$enableval + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 + $as_echo "$ac_cv_lib_m_sin" >&6; } +-if test "x$ac_cv_lib_m_sin" = x""yes; then : ++if test "x$ac_cv_lib_m_sin" = xyes; then : + LIBS="${LIBS} -lm" else - INFO_DIR=$prefix/share/info - fi - - INFO_DIR=`eval echo $INFO_DIR/` + true +@@ -6334,7 +6543,7 @@ fi --# Check whether --enable-emacsdir or --disable-emacsdir was given. -+# Check whether --enable-emacsdir was given. - if test "${enable_emacsdir+set}" = set; then -- enableval="$enable_emacsdir" -- EMACS_SITE_LISP=$enableval -+ enableval=$enable_emacsdir; EMACS_SITE_LISP=$enableval + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmingwex" >&5 + $as_echo_n "checking for main in -lmingwex... " >&6; } +-if test "${ac_cv_lib_mingwex_main+set}" = set; then : ++if ${ac_cv_lib_mingwex_main+:} false; then : + $as_echo_n "(cached) " >&6 else - EMACS_SITE_LISP=$prefix/share/emacs/site-lisp + ac_check_lib_save_LIBS=$LIBS +@@ -6362,7 +6571,7 @@ LIBS=$ac_check_lib_save_LIBS fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mingwex_main" >&5 + $as_echo "$ac_cv_lib_mingwex_main" >&6; } +-if test "x$ac_cv_lib_mingwex_main" = x""yes; then : ++if test "x$ac_cv_lib_mingwex_main" = xyes; then : + LIBS="${LIBS} -lmingwex" + else + true +@@ -6374,7 +6583,7 @@ if test "$try_japi" = "yes" ; then + for ac_header in japi.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "japi.h" "ac_cv_header_japi_h" "$ac_includes_default" +-if test "x$ac_cv_header_japi_h" = x""yes; then : ++if test "x$ac_cv_header_japi_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_JAPI_H 1 + _ACEOF +@@ -6392,7 +6601,7 @@ if test "$use" = "mingw" ; then + for ac_header in rpc/rpc.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "rpc/rpc.h" "ac_cv_header_rpc_rpc_h" "$ac_includes_default" +-if test "x$ac_cv_header_rpc_rpc_h" = x""yes; then : ++if test "x$ac_cv_header_rpc_rpc_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_RPC_RPC_H 1 + _ACEOF +@@ -6409,7 +6618,7 @@ else + for ac_header in rpc/rpc.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "rpc/rpc.h" "ac_cv_header_rpc_rpc_h" "$ac_includes_default" +-if test "x$ac_cv_header_rpc_rpc_h" = x""yes; then : ++if test "x$ac_cv_header_rpc_rpc_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_RPC_RPC_H 1 + _ACEOF +@@ -6429,7 +6638,7 @@ fi + for ac_header in math.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default" +-if test "x$ac_cv_header_math_h" = x""yes; then : ++if test "x$ac_cv_header_math_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_MATH_H 1 + _ACEOF +@@ -6446,7 +6655,7 @@ done + for ac_header in values.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "values.h" "ac_cv_header_values_h" "$ac_includes_default" +-if test "x$ac_cv_header_values_h" = x""yes; then : ++if test "x$ac_cv_header_values_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_VALUES_H 1 + _ACEOF +@@ -6463,7 +6672,7 @@ done + for ac_header in float.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default" +-if test "x$ac_cv_header_float_h" = x""yes; then : ++if test "x$ac_cv_header_float_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_FLOAT_H 1 + _ACEOF +@@ -6485,7 +6694,7 @@ if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + as_fn_error $? "cannot run test program while cross compiling +-See \`config.log' for more details" "$LINENO" 5 ; } ++See \`config.log' for more details" "$LINENO" 5; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +@@ -6516,7 +6725,7 @@ $as_echo_n "checking for fpclass in ieee + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + as_fn_error $? "cannot run test program while cross compiling +-See \`config.log' for more details" "$LINENO" 5 ; } ++See \`config.log' for more details" "$LINENO" 5; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +@@ -6559,7 +6768,7 @@ if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + as_fn_error $? "cannot run test program while cross compiling +-See \`config.log' for more details" "$LINENO" 5 ; } ++See \`config.log' for more details" "$LINENO" 5; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +@@ -6590,7 +6799,7 @@ $as_echo_n "checking for finite()... " > + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + as_fn_error $? "cannot run test program while cross compiling +-See \`config.log' for more details" "$LINENO" 5 ; } ++See \`config.log' for more details" "$LINENO" 5; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +@@ -6644,11 +6853,9 @@ fi + # To get around this problem, check for both libraries together + # if -lsocket doesn't work by itself. + #-------------------------------------------------------------------- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockets" >&5 +-$as_echo_n "checking for sockets... " >&6; } + tcl_checkBoth=0 + ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" +-if test "x$ac_cv_func_connect" = x""yes; then : ++if test "x$ac_cv_func_connect" = xyes; then : + tcl_checkSocket=0 + else + tcl_checkSocket=1 +@@ -6657,7 +6864,7 @@ fi + if test "$tcl_checkSocket" = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5 + $as_echo_n "checking for main in -lsocket... " >&6; } +-if test "${ac_cv_lib_socket_main+set}" = set; then : ++if ${ac_cv_lib_socket_main+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +@@ -6685,7 +6892,7 @@ LIBS=$ac_check_lib_save_LIBS + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5 + $as_echo "$ac_cv_lib_socket_main" >&6; } +-if test "x$ac_cv_lib_socket_main" = x""yes; then : ++if test "x$ac_cv_lib_socket_main" = xyes; then : + TLIBS="$TLIBS -lsocket" + else + tcl_checkBoth=1 +@@ -6698,7 +6905,7 @@ if test "$tcl_checkBoth" = 1; then + tk_oldLibs=$TLIBS + TLIBS="$TLIBS -lsocket -lnsl" + ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept" +-if test "x$ac_cv_func_accept" = x""yes; then : ++if test "x$ac_cv_func_accept" = xyes; then : + tcl_checkNsl=0 + else + TLIBS=$tk_oldLibs +@@ -6706,12 +6913,12 @@ fi - EMACS_SITE_LISP=`eval echo $EMACS_SITE_LISP/` + fi + ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +-if test "x$ac_cv_func_gethostbyname" = x""yes; then : ++if test "x$ac_cv_func_gethostbyname" = xyes; then : --# Check whether --enable-common-binary or --disable-common-binary was given. -+# Check whether --enable-common-binary was given. - if test "${enable_common_binary+set}" = set; then -- enableval="$enable_common_binary" -- use_common_binary=$enableval -+ enableval=$enable_common_binary; use_common_binary=$enableval else - use_common_binary="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5 + $as_echo_n "checking for main in -lnsl... " >&6; } +-if test "${ac_cv_lib_nsl_main+set}" = set; then : ++if ${ac_cv_lib_nsl_main+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +@@ -6739,7 +6946,7 @@ LIBS=$ac_check_lib_save_LIBS + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5 + $as_echo "$ac_cv_lib_nsl_main" >&6; } +-if test "x$ac_cv_lib_nsl_main" = x""yes; then : ++if test "x$ac_cv_lib_nsl_main" = xyes; then : + TLIBS="$TLIBS -lnsl" fi - --# Check whether --enable-japi or --disable-japi was given. -+# Check whether --enable-japi was given. - if test "${enable_japi+set}" = set; then -- enableval="$enable_japi" -- try_japi=$enableval -+ enableval=$enable_japi; try_japi=$enableval +@@ -6752,13 +6959,13 @@ if test "$enable_readline" = "yes" ; the + for ac_header in readline/readline.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" +-if test "x$ac_cv_header_readline_readline_h" = x""yes; then : ++if test "x$ac_cv_header_readline_readline_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_READLINE_READLINE_H 1 + _ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_initialize in -lreadline" >&5 + $as_echo_n "checking for rl_initialize in -lreadline... " >&6; } +-if test "${ac_cv_lib_readline_rl_initialize+set}" = set; then : ++if ${ac_cv_lib_readline_rl_initialize+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +@@ -6792,7 +6999,7 @@ LIBS=$ac_check_lib_save_LIBS + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_initialize" >&5 + $as_echo "$ac_cv_lib_readline_rl_initialize" >&6; } +-if test "x$ac_cv_lib_readline_rl_initialize" = x""yes; then : ++if test "x$ac_cv_lib_readline_rl_initialize" = xyes; then : + $as_echo "#define HAVE_READLINE 1" >>confdefs.h + + TLIBS="$TLIBS -lreadline -lncurses" #some machines don't link this, e.g. Slackware +@@ -6811,7 +7018,7 @@ done + # These tests discover differences between readline 4.1 and 4.3 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5 + $as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; } +-if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then : ++if ${ac_cv_lib_readline_rl_completion_matches+:} false; then : + $as_echo_n "(cached) " >&6 else - try_japi="no" + ac_check_lib_save_LIBS=$LIBS +@@ -6845,7 +7052,7 @@ LIBS=$ac_check_lib_save_LIBS fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5 + $as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; } +-if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then : ++if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then : + $as_echo "#define HAVE_DECL_RL_COMPLETION_MATCHES 1" >>confdefs.h + $as_echo "#define HAVE_RL_COMPENTRY_FUNC_T 1" >>confdefs.h +@@ -6857,8 +7064,8 @@ fi --# Check whether --enable-xdr or --disable-xdr was given. -+# Check whether --enable-xdr was given. - if test "${enable_xdr+set}" = set; then -- enableval="$enable_xdr" -- try_xdr=$enableval -+ enableval=$enable_xdr; try_xdr=$enableval - else - try_xdr="no" - fi --# Check whether --enable-xgcl or --disable-xgcl was given. -+# Check whether --enable-xgcl was given. - if test "${enable_xgcl+set}" = set; then -- enableval="$enable_xgcl" -- enable_xgcl=$enableval -+ enableval=$enable_xgcl; enable_xgcl=$enableval - else - enable_xgcl="yes" - fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking For network code for nsocket.c" >&5 +-$as_echo_n "checking For network code for nsocket.c... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for network code for nsocket.c" >&5 ++$as_echo_n "checking for network code for nsocket.c... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +@@ -6882,7 +7089,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ + int + main () + { +- connect(0,(struct sockaddr *)0,0); ++connect(0,(struct sockaddr *)0,0); + gethostbyname("jil"); + socket(AF_INET, SOCK_STREAM, 0); - # --# Host information -+# Host information - # +@@ -6903,10 +7110,11 @@ rm -f core conftest.err conftest.$ac_obj + conftest$ac_exeext conftest.$ac_ext - ac_aux_dir= --for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do -- if test -f $ac_dir/install-sh; then -+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do -+ if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break -- elif test -f $ac_dir/install.sh; then -+ elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break -+ elif test -f "$ac_dir/shtool"; then -+ ac_aux_dir=$ac_dir -+ ac_install_sh="$ac_aux_dir/shtool install -c" -+ break - fi - done - if test -z "$ac_aux_dir"; then -- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -+ { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -+$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} -+ { (exit 1); exit 1; }; } - fi --ac_config_guess=$ac_aux_dir/config.guess --ac_config_sub=$ac_aux_dir/config.sub --ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. -+ -+# These three variables are undocumented and unsupported, -+# and are intended to be withdrawn in a future Autoconf release. -+# They can cause serious problems if a builder's source tree is in a directory -+# whose full name contains unusual characters. -+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - # Make sure we can run config.sub. --if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : --else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || -+ { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -+$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} -+ { (exit 1); exit 1; }; } -+ -+{ $as_echo "$as_me:$LINENO: checking build system type" >&5 -+$as_echo_n "checking build system type... " >&6; } -+if test "${ac_cv_build+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_build_alias=$build_alias -+test "x$ac_build_alias" = x && -+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -+test "x$ac_build_alias" = x && -+ { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -+$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} -+ { (exit 1); exit 1; }; } -+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || -+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} -+ { (exit 1); exit 1; }; } -+ - fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -+$as_echo "$ac_cv_build" >&6; } -+case $ac_cv_build in -+*-*-*) ;; -+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -+$as_echo "$as_me: error: invalid value of canonical build" >&2;} -+ { (exit 1); exit 1; }; };; -+esac -+build=$ac_cv_build -+ac_save_IFS=$IFS; IFS='-' -+set x $ac_cv_build -+shift -+build_cpu=$1 -+build_vendor=$2 -+shift; shift -+# Remember, the first character of IFS is used to create $*, -+# except with old shells: -+build_os=$* -+IFS=$ac_save_IFS -+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - --echo $ac_n "checking host system type""... $ac_c" 1>&6 --echo "configure:797: checking host system type" >&5 - --host_alias=$host --case "$host_alias" in --NONE) -- case $nonopt in -- NONE) -- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : -- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } -- fi ;; -- *) host_alias=$nonopt ;; -- esac ;; -+{ $as_echo "$as_me:$LINENO: checking host system type" >&5 -+$as_echo_n "checking host system type... " >&6; } -+if test "${ac_cv_host+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ if test "x$host_alias" = x; then -+ ac_cv_host=$ac_cv_build -+else -+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || -+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} -+ { (exit 1); exit 1; }; } -+fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking check for listen using fcntl" >&5 +-$as_echo_n "checking check for listen using fcntl... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for listen using fcntl" >&5 ++$as_echo_n "checking for listen using fcntl... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -+$as_echo "$ac_cv_host" >&6; } -+case $ac_cv_host in -+*-*-*) ;; -+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -+$as_echo "$as_me: error: invalid value of canonical host" >&2;} -+ { (exit 1); exit 1; }; };; - esac -+host=$ac_cv_host -+ac_save_IFS=$IFS; IFS='-' -+set x $ac_cv_host -+shift -+host_cpu=$1 -+host_vendor=$2 -+shift; shift -+# Remember, the first character of IFS is used to create $*, -+# except with old shells: -+host_os=$* -+IFS=$ac_save_IFS -+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - --host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` --host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` --host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` --host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` --echo "$ac_t""$host" 1>&6 - - canonical=$host - my_host_kernel=`echo $host_os | awk '{j=split($1,A,"-");print A[1]}'` - my_host_system=`echo $host_os | awk '{j=split($1,A,"-");if (j>=2) print A[2]}'` --cat >> confdefs.h <>confdefs.h <<_ACEOF - #define HOST_CPU "`echo $host_cpu | awk '{print toupper($0)}'`" --EOF -+_ACEOF + #include + #include --cat >> confdefs.h <>confdefs.h <<_ACEOF - #define HOST_KERNEL "`echo $my_host_kernel | awk '{print toupper($0)}'`" --EOF -+_ACEOF +@@ -6937,7 +7145,7 @@ rm -f core conftest.err conftest.$ac_obj --if test "$my_host_system" != "" ; then -- cat >> confdefs.h <>confdefs.h <<_ACEOF - #define HOST_SYSTEM "`echo $my_host_system | awk '{print toupper($0)}'`" --EOF -+_ACEOF - fi - ## host=CPU-COMPANY-SYSTEM --echo "$ac_t""host=$host" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: host=$host" >&5 -+$as_echo "host=$host" >&6; } + ac_fn_c_check_func "$LINENO" "profil" "ac_cv_func_profil" +-if test "x$ac_cv_func_profil" = x""yes; then : ++if test "x$ac_cv_func_profil" = xyes; then : - PROCESSOR_FLAGS=${PROCESSOR_FLAGS:-""} + else + $as_echo "#define NO_PROFILE 1" >>confdefs.h +@@ -6946,7 +7154,7 @@ fi -@@ -890,7 +2283,7 @@ - powerpc-*-darwin*) - use=powerpc-macosx;; -- -+ - alpha-dec-osf) - use=alpha-osf1;; + ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" +-if test "x$ac_cv_func_setenv" = x""yes; then : ++if test "x$ac_cv_func_setenv" = xyes; then : + $as_echo "#define HAVE_SETENV 1" >>confdefs.h -@@ -921,7 +2314,7 @@ - IRIX3*) - use=sgi4d;; - esac ;; -- -+ + else +@@ -6956,7 +7164,7 @@ fi - m68k-apple-aux*) - use=mac2;; -@@ -1007,7 +2400,7 @@ - # 'ld -Z' means disable W^X - TLDFLAGS="$TLDFLAGS -Z" - use=FreeBSD;; -- -+ - esac + if test "$no_setenv" = "1" ; then + ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv" +-if test "x$ac_cv_func_putenv" = x""yes; then : ++if test "x$ac_cv_func_putenv" = xyes; then : + $as_echo "#define HAVE_PUTENV 1" >>confdefs.h + fi +@@ -6965,7 +7173,7 @@ fi + fi -@@ -1025,7 +2418,7 @@ - def_pic="no"; - def_static="no"; - def_debug="no"; --case $use in -+case $use in - *linux) - ln -snf linux.defs h/$use.defs; - case $use in -@@ -1034,7 +2427,7 @@ - mips*) - def_dlopen="yes" ; def_pic="yes" ; def_statsysbfd="no" ;; - # def_static -- Function descriptors are currently realized at runtime in a non-reproducible fashion --# on these architectures -- CM -+# on these architectures -- CM - ia64*) - def_dlopen="yes" ; def_statsysbfd="no" ; def_static="no" ;; - hppa*) -@@ -1050,92 +2443,81 @@ - def_statsysbfd="no" ; def_locbfd="yes" ;; - esac + ac_fn_c_check_func "$LINENO" "_cleanup" "ac_cv_func__cleanup" +-if test "x$ac_cv_func__cleanup" = x""yes; then : ++if test "x$ac_cv_func__cleanup" = xyes; then : + $as_echo "#define USE_CLEANUP 1" >>confdefs.h --# Check whether --enable-dlopen or --disable-dlopen was given. -+# Check whether --enable-dlopen was given. - if test "${enable_dlopen+set}" = set; then -- enableval="$enable_dlopen" -- : -+ enableval=$enable_dlopen; - else - enable_dlopen="$def_dlopen" fi - --# Check whether --enable-statsysbfd or --disable-statsysbfd was given. -+# Check whether --enable-statsysbfd was given. - if test "${enable_statsysbfd+set}" = set; then -- enableval="$enable_statsysbfd" -- : -+ enableval=$enable_statsysbfd; +@@ -6982,7 +7190,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>& + $EGREP "LITTLE_ENDIAN" >/dev/null 2>&1; then : + gcl_ok=yes else - enable_statsysbfd="$def_statsysbfd" +- gcl_ok=noo ++ gcl_ok=no fi + rm -f conftest* --# Check whether --enable-dynsysbfd or --disable-dynsysbfd was given. -+# Check whether --enable-dynsysbfd was given. - if test "${enable_dynsysbfd+set}" = set; then -- enableval="$enable_dynsysbfd" -- : -+ enableval=$enable_dynsysbfd; - else - enable_dynsysbfd="no" - fi +@@ -7026,17 +7234,17 @@ $as_echo "O_NONBLOCK" >&6; } + esac --# Check whether --enable-locbfd or --disable-locbfd was given. -+# Check whether --enable-locbfd was given. - if test "${enable_locbfd+set}" = set; then -- enableval="$enable_locbfd" -- : -+ enableval=$enable_locbfd; - else - enable_locbfd="$def_locbfd" - fi --# Check whether --enable-custreloc or --disable-custreloc was given. -+# Check whether --enable-custreloc was given. - if test "${enable_custreloc+set}" = set; then -- enableval="$enable_custreloc" -- : -+ enableval=$enable_custreloc; - else - enable_custreloc="$def_custreloc" - fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking check for SV_ONSTACK" >&5 +-$as_echo_n "checking check for SV_ONSTACK... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SV_ONSTACK" >&5 ++$as_echo_n "checking for SV_ONSTACK... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++ + #include +-int joe=SV_ONSTACK; --# Check whether --enable-debug or --disable-debug was given. -+# Check whether --enable-debug was given. - if test "${enable_debug+set}" = set; then -- enableval="$enable_debug" -- : -+ enableval=$enable_debug; - else - enable_debug="$def_debug" + int + main () + { +- ++return SV_ONSTACK; + ; + return 0; + } +@@ -7053,17 +7261,17 @@ $as_echo "no" >&6; } fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --# Check whether --enable-gprof or --disable-gprof was given. -+# Check whether --enable-gprof was given. - if test "${enable_gprof+set}" = set; then -- enableval="$enable_gprof" -- : -+ enableval=$enable_gprof; - else - enable_gprof="no" - fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking check for SIGSYS" >&5 +-$as_echo_n "checking check for SIGSYS... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGSYS" >&5 ++$as_echo_n "checking for SIGSYS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++ + #include +-int joe=SIGSYS; --# Check whether --enable-static or --disable-static was given. -+# Check whether --enable-static was given. - if test "${enable_static+set}" = set; then -- enableval="$enable_static" -- enable_static=$enableval -+ enableval=$enable_static; enable_static=$enableval - else - enable_static="$def_static" - fi + int + main () + { +- ++return SIGSYS; + ; + return 0; + } +@@ -7081,17 +7289,17 @@ fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --# Check whether --enable-pic or --disable-pic was given. -+# Check whether --enable-pic was given. - if test "${enable_pic+set}" = set; then -- enableval="$enable_pic" -- : -+ enableval=$enable_pic; - else - enable_pic="$def_pic" - fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking check for SIGEMT" >&5 +-$as_echo_n "checking check for SIGEMT... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGEMT" >&5 ++$as_echo_n "checking for SIGEMT... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++ + #include +-int joe=SIGEMT; --# Check whether --enable-oldgmp or --disable-oldgmp was given. -+# Check whether --enable-oldgmp was given. - if test "${enable_oldgmp+set}" = set; then -- enableval="$enable_oldgmp" -- : -+ enableval=$enable_oldgmp; - else - enable_oldgmp="$def_oldgmp" - fi + int + main () + { +- ++return SIGEMT; + ; + return 0; + } +@@ -7115,7 +7323,7 @@ rm -f core conftest.err conftest.$ac_obj + for ac_header in asm/sigcontext.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "asm/sigcontext.h" "ac_cv_header_asm_sigcontext_h" "$ac_includes_default" +-if test "x$ac_cv_header_asm_sigcontext_h" = x""yes; then : ++if test "x$ac_cv_header_asm_sigcontext_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_ASM_SIGCONTEXT_H 1 + _ACEOF +@@ -7127,7 +7335,7 @@ done + for ac_header in asm/signal.h + do : + ac_fn_c_check_header_mongrel "$LINENO" "asm/signal.h" "ac_cv_header_asm_signal_h" "$ac_includes_default" +-if test "x$ac_cv_header_asm_signal_h" = x""yes; then : ++if test "x$ac_cv_header_asm_signal_h" = xyes; then : + cat >>confdefs.h <<_ACEOF + #define HAVE_ASM_SIGNAL_H 1 + _ACEOF +@@ -7136,11 +7344,12 @@ fi + done --# Check whether --enable-dynsysgmp or --disable-dynsysgmp was given. -+# Check whether --enable-dynsysgmp was given. - if test "${enable_dynsysgmp+set}" = set; then -- enableval="$enable_dynsysgmp" -- : -+ enableval=$enable_dynsysgmp; - else - enable_dynsysgmp="yes" +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigcontext..." >&5 +-$as_echo_n "checking for sigcontext...... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigcontext" >&5 ++$as_echo_n "checking for sigcontext... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++ ++ #include + + int + main () +@@ -7168,11 +7377,12 @@ $as_echo "sigcontext NOT in signal.h" >& fi -@@ -1190,12 +2572,13 @@ - ## - #if test "$use" = "unknown" ; then - #types=`echo h/*.defs` | sed -e "s:h/::g" -e "s:\.defs:g"` --#echo got canonical=$canonical, but was not recognized. --#echo Unable to guess type to use. Try one of -+#echo got canonical=$canonical, but was not recognized. -+#echo Unable to guess type to use. Try one of - #exit(1) - #fi - --echo "$ac_t""use=$use" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: use=$use" >&5 -+$as_echo "use=$use" >&6; } + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$sigcontext_works" = 0 ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigcontext..." >&5 +-$as_echo_n "checking for sigcontext...... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigcontext" >&5 ++$as_echo_n "checking for sigcontext... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++ ++ #include + #ifdef HAVE_ASM_SIGCONTEXT_H + #include + #endif +@@ -7229,7 +7439,7 @@ rm -f core conftest.err conftest.$ac_obj + set dummy emacs; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_EMACS+set}" = set; then : ++if ${ac_cv_path_EMACS+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $EMACS in +@@ -7351,32 +7561,47 @@ $as_echo "$INFO_DIR" >&6; } + if test "$enable_tcltk" = "yes" ; then - # -@@ -1211,214 +2594,804 @@ - LDFLAGS=" " - fi - --# Extract the first word of "gcc", so it can be a program name with args. -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -+set dummy ${ac_tool_prefix}gcc; ac_word=$2 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_CC+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$CC"; then -+ ac_cv_prog_CC="$CC" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_CC="${ac_tool_prefix}gcc" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+IFS=$as_save_IFS -+ -+fi -+fi -+CC=$ac_cv_prog_CC -+if test -n "$CC"; then -+ { $as_echo "$as_me:$LINENO: result: $CC" >&5 -+$as_echo "$CC" >&6; } -+else -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_CC"; then -+ ac_ct_CC=$CC -+ # Extract the first word of "gcc", so it can be a program name with args. - set dummy gcc; ac_word=$2 --echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1218: checking for $ac_word" >&5 --if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tcl/tk" >&5 +-$as_echo_n "checking for tcl/tk... " >&6; } +- +- +-if test -d "${TCL_CONFIG_PREFIX}" ; then true ; else +-rm -f conftest.tcl +-cat >> conftest.tcl <&5 ++$as_echo_n "checking for main in -lieee... " >&6; } ++if ${ac_cv_lib_ieee_main+:} false; then : + $as_echo_n "(cached) " >&6 +else -+ if test -n "$ac_ct_CC"; then -+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ++ ac_check_lib_save_LIBS=$LIBS ++LIBS="-lieee $LIBS" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +-set dir [set tcl_library] +-if { [file exists [file join [set dir] tclConfig.sh]] } { +- puts [set dir] +- exit +- } +-set dir [file dirname [set tcl_library]] +-if { [file exists [file join [set dir] tclConfig.sh]] } { +- puts [set dir] +- } + +-EOF +-#cp conftest.tcl foo.tcl ++int ++main () ++{ ++return main (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_ieee_main=yes +else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_CC="gcc" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+IFS=$as_save_IFS -+ ++ ac_cv_lib_ieee_main=no +fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++LIBS=$ac_check_lib_save_LIBS +fi -+ac_ct_CC=$ac_cv_prog_ac_ct_CC -+if test -n "$ac_ct_CC"; then -+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -+$as_echo "$ac_ct_CC" >&6; } -+else -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_CC" = x; then -+ CC="" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ CC=$ac_ct_CC -+ fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee_main" >&5 ++$as_echo "$ac_cv_lib_ieee_main" >&6; } ++if test "x$ac_cv_lib_ieee_main" = xyes; then : ++ have_ieee=1 +else -+ CC="$ac_cv_prog_CC" ++ have_ieee=0 +fi -+ -+if test -z "$CC"; then -+ if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -+set dummy ${ac_tool_prefix}cc; ac_word=$2 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_CC+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. - else -- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -- ac_dummy="$PATH" -- for ac_dir in $ac_dummy; do -- test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/$ac_word; then -- ac_cv_prog_CC="gcc" -- break -- fi -- done -- IFS="$ac_save_ifs" -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_CC="${ac_tool_prefix}cc" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+IFS=$as_save_IFS -+ - fi - fi --CC="$ac_cv_prog_CC" -+CC=$ac_cv_prog_CC - if test -n "$CC"; then -- echo "$ac_t""$CC" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: $CC" >&5 -+$as_echo "$CC" >&6; } - else -- echo "$ac_t""no" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi -+ -+ fi -+fi - if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 --echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1248: checking for $ac_word" >&5 --if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_CC+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. - else -- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no -- ac_dummy="$PATH" -- for ac_dir in $ac_dummy; do -- test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/$ac_word; then -- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then -- ac_prog_rejected=yes -- continue -- fi -- ac_cv_prog_CC="cc" -- break -- fi -- done -- IFS="$ac_save_ifs" -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then -+ ac_prog_rejected=yes -+ continue -+ fi -+ ac_cv_prog_CC="cc" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+IFS=$as_save_IFS -+ - if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift -- if test $# -gt 0; then -+ if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift -- set dummy "$ac_dir/$ac_word" "$@" -- shift -- ac_cv_prog_CC="$@" -+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi - fi - fi - fi --CC="$ac_cv_prog_CC" -+CC=$ac_cv_prog_CC - if test -n "$CC"; then -- echo "$ac_t""$CC" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: $CC" >&5 -+$as_echo "$CC" >&6; } + # Extract the first word of "tclsh", so it can be a program name with args. + set dummy tclsh; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_TCLSH+set}" = set; then : ++if ${ac_cv_prog_TCLSH+:} false; then : + $as_echo_n "(cached) " >&6 else -- echo "$ac_t""no" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } + if test -n "$TCLSH"; then +@@ -7410,7 +7635,26 @@ $as_echo "no" >&6; } fi -- if test -z "$CC"; then -- case "`uname -s`" in -- *win32* | *WIN32*) -- # Extract the first word of "cl", so it can be a program name with args. --set dummy cl; ac_word=$2 --echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1299: checking for $ac_word" >&5 --if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ -+fi -+if test -z "$CC"; then -+ if test -n "$ac_tool_prefix"; then -+ for ac_prog in cl.exe -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_CC+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. - else -- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -- ac_dummy="$PATH" -- for ac_dir in $ac_dummy; do -- test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/$ac_word; then -- ac_cv_prog_CC="cl" -- break -- fi -- done -- IFS="$ac_save_ifs" -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+IFS=$as_save_IFS + +-#AC_CHECK_PROG(TCLSH,tclsh8.0,tclsh8.0,${TCLSH}) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tcl/tk" >&5 ++$as_echo_n "checking for tcl/tk... " >&6; } + - fi - fi --CC="$ac_cv_prog_CC" -+CC=$ac_cv_prog_CC - if test -n "$CC"; then -- echo "$ac_t""$CC" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: $CC" >&5 -+$as_echo "$CC" >&6; } - else -- echo "$ac_t""no" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi -- ;; -- esac + ++if test -d "${TCL_CONFIG_PREFIX}" ; then true ; else ++rm -f conftest.tcl ++cat >> conftest.tcl <&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_CC"; then -+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_CC="$ac_prog" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 - fi -- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -+done -+done -+IFS=$as_save_IFS ++set dir [set tcl_library] ++if { [file exists [file join [set dir] tclConfig.sh]] } { ++ puts [set dir] ++ exit ++ } ++set dir [file dirname [set tcl_library]] ++if { [file exists [file join [set dir] tclConfig.sh]] } { ++ puts [set dir] ++ } + -+fi -+fi -+ac_ct_CC=$ac_cv_prog_ac_ct_CC -+if test -n "$ac_ct_CC"; then -+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -+$as_echo "$ac_ct_CC" >&6; } -+else -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi ++EOF ++#cp conftest.tcl foo.tcl --echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 --echo "configure:1331: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + if test "${TCLSH}" = "" ; then true ; else + TCL_CONFIG_PREFIX=`${TCLSH} < conftest.tcl` +@@ -7485,42 +7729,6 @@ fi --ac_ext=c --# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. --ac_cpp='$CPP $CPPFLAGS' --ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' --ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' --cross_compiling=$ac_cv_prog_cc_cross -+ test -n "$ac_ct_CC" && break -+done + fi --cat > conftest.$ac_ext << EOF -+ if test "x$ac_ct_CC" = x; then -+ CC="" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ CC=$ac_ct_CC -+ fi -+fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -llieee" >&5 +-$as_echo_n "checking for main in -llieee... " >&6; } +-if test "${ac_cv_lib_lieee_main+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-llieee $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +- +-int +-main () +-{ +-return main (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_lieee_main=yes +-else +- ac_cv_lib_lieee_main=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lieee_main" >&5 +-$as_echo "$ac_cv_lib_lieee_main" >&6; } +-if test "x$ac_cv_lib_lieee_main" = x""yes; then : +- have_ieee=1 +-else +- have_ieee=0 +-fi +- + if test "$have_ieee" = "0" ; then + TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" ` + fi +@@ -7566,19 +7774,29 @@ NOTIFY=$enable_notify --#line 1342 "configure" --#include "confdefs.h" -+fi + # the time handling for unixtime, add timezone --main(){return(0);} --EOF --if { (eval echo configure:1347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- ac_cv_prog_cc_works=yes -- # If we can't run a trivial program, we are probably using a cross compiler. -- if (./conftest; exit) 2>/dev/null; then -- ac_cv_prog_cc_cross=no -+ -+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } -+ -+# Provide some information about the compiler. -+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -+set X $ac_compile -+ac_compiler=$2 -+{ (ac_try="$ac_compiler --version >&5" -+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_compiler --version >&5") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } -+{ (ac_try="$ac_compiler -v >&5" -+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_compiler -v >&5") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } -+{ (ac_try="$ac_compiler -V >&5" -+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_compiler -V >&5") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } -+ -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alloca" >&5 +-$as_echo_n "checking alloca... " >&6; } ++# alloca ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 ++$as_echo_n "checking for alloca... " >&6; } + if test "$cross_compiling" = yes; then : + gcl_ok=no + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-int main() { exit(alloca(500) != NULL ? 0 : 1);} + +int +main () +{ -+ ++exit(alloca(500) != NULL ? 0 : 1); + ; + return 0; +} -+_ACEOF -+ac_clean_files_save=$ac_clean_files -+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -+# Try to create an executable without -o first, disregard a.out. -+# It will help us diagnose broken compilers, and finding out an intuition -+# of exeext. -+{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -+$as_echo_n "checking for C compiler default output file name... " >&6; } -+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -+ -+# The possible output files: -+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" -+ -+ac_rmfiles= -+for ac_file in $ac_files -+do -+ case $ac_file in -+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; -+ * ) ac_rmfiles="$ac_rmfiles $ac_file";; -+ esac -+done -+rm -f $ac_rmfiles + -+if { (ac_try="$ac_link_default" -+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_link_default") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -+# in a Makefile. We should not override ac_cv_exeext if it was cached, -+# so that the user can short-circuit this test for compilers unknown to -+# Autoconf. -+for ac_file in $ac_files '' -+do -+ test -f "$ac_file" || continue -+ case $ac_file in -+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) -+ ;; -+ [ab].out ) -+ # We found the default executable, but exeext='' is most -+ # certainly right. -+ break;; -+ *.* ) -+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; -+ then :; else -+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` -+ fi -+ # We set ac_cv_exeext here because the later test for it is not -+ # safe: cross compilers may not add the suffix if given an `-o' -+ # argument, so we may need to know it at that point already. -+ # Even if this section looks crufty: it has the advantage of -+ # actually working. -+ break;; -+ * ) -+ break;; -+ esac -+done -+test "$ac_cv_exeext" = no && ac_cv_exeext= -+ -+else -+ ac_file='' -+fi -+ -+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -+$as_echo "$ac_file" >&6; } -+if test -z "$ac_file"; then -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: C compiler cannot create executables -+See \`config.log' for more details." >&2;} -+ { (exit 77); exit 77; }; }; } -+fi -+ -+ac_exeext=$ac_cv_exeext -+ -+# Check that the compiler produces executables we can run. If not, either -+# the compiler is broken, or we cross compile. -+{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -+$as_echo_n "checking whether the C compiler works... " >&6; } -+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -+# If not cross compiling, check that we can run a simple program. -+if test "$cross_compiling" != yes; then -+ if { ac_try='./$ac_file' -+ { (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_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ cross_compiling=no - else -- ac_cv_prog_cc_cross=yes -+ if test "$cross_compiling" = maybe; then -+ cross_compiling=yes -+ else -+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -+If you meant to cross compile, use \`--host'. -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: cannot run C compiled programs. -+If you meant to cross compile, use \`--host'. -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } -+ fi - fi -+fi -+{ $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } -+ -+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -+ac_clean_files=$ac_clean_files_save -+# Check that the compiler produces executables we can run. If not, either -+# the compiler is broken, or we cross compile. -+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -+$as_echo_n "checking whether we are cross compiling... " >&6; } -+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -+$as_echo "$cross_compiling" >&6; } -+ -+{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 -+$as_echo_n "checking for suffix of executables... " >&6; } -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ # If both `conftest.exe' and `conftest' are `present' (well, observable) -+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -+# work properly (i.e., refer to `conftest.exe'), while it won't with -+# `rm'. -+for ac_file in conftest.exe conftest conftest.*; do -+ test -f "$ac_file" || continue -+ case $ac_file in -+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; -+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` -+ break;; -+ * ) break;; -+ esac -+done - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- ac_cv_prog_cc_works=no -+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } - fi --rm -fr conftest* --ac_ext=c --# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. --ac_cpp='$CPP $CPPFLAGS' --ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' --ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' --cross_compiling=$ac_cv_prog_cc_cross - --echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 --if test $ac_cv_prog_cc_works = no; then -- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -+rm -f conftest$ac_cv_exeext -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -+$as_echo "$ac_cv_exeext" >&6; } -+ -+rm -f conftest.$ac_ext -+EXEEXT=$ac_cv_exeext -+ac_exeext=$EXEEXT -+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 -+$as_echo_n "checking for suffix of object files... " >&6; } -+if test "${ac_cv_objext+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.o conftest.obj -+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>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then -+ for ac_file in conftest.o conftest.obj conftest.*; do -+ test -f "$ac_file" || continue; -+ case $ac_file in -+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; -+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` -+ break;; -+ esac -+done + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : +- +-else + gcl_ok=yes +else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } - fi --echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 --echo "configure:1373: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 --echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 --cross_compiling=$ac_cv_prog_cc_cross - --echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 --echo "configure:1378: checking whether we are using GNU C" >&5 --if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+rm -f conftest.$ac_cv_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -+$as_echo "$ac_cv_objext" >&6; } -+OBJEXT=$ac_cv_objext -+ac_objext=$OBJEXT -+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -+if test "${ac_cv_c_compiler_gnu+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- cat > conftest.c <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+#ifndef __GNUC__ -+ choke me - #endif --EOF --if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then -- ac_cv_prog_gcc=yes -+ -+ ; -+ return 0; -+} -+_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_compiler_gnu=yes - else -- ac_cv_prog_gcc=no --fi -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_compiler_gnu=no - fi - --echo "$ac_t""$ac_cv_prog_gcc" 1>&6 -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ac_cv_c_compiler_gnu=$ac_compiler_gnu - --if test $ac_cv_prog_gcc = yes; then -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -+$as_echo "$ac_cv_c_compiler_gnu" >&6; } -+if test $ac_compiler_gnu = yes; then - GCC=yes - else - GCC= ++ gcl_ok=no fi -+ac_test_CFLAGS=${CFLAGS+set} -+ac_save_CFLAGS=$CFLAGS -+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -+$as_echo_n "checking whether $CC accepts -g... " >&6; } -+if test "${ac_cv_prog_cc_g+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_save_c_werror_flag=$ac_c_werror_flag -+ ac_c_werror_flag=yes -+ ac_cv_prog_cc_g=no -+ CFLAGS="-g" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - --ac_test_CFLAGS="${CFLAGS+set}" --ac_save_CFLAGS="$CFLAGS" --CFLAGS= --echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 --echo "configure:1406: checking whether ${CC-cc} accepts -g" >&5 --if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_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_cv_prog_cc_g=yes - else -- echo 'void f(){}' > conftest.c --if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ CFLAGS="" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_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 -+ : -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_c_werror_flag=$ac_save_c_werror_flag -+ CFLAGS="-g" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_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_cv_prog_cc_g=yes + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +@@ -7595,13 +7813,22 @@ else else -- ac_cv_prog_cc_g=no -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- int main() { exit(alloca(500) != NULL ? 0 : 1);} + - fi --rm -f conftest* - -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - --echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi ++ #include + -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ ac_c_werror_flag=$ac_save_c_werror_flag -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -+$as_echo "$ac_cv_prog_cc_g" >&6; } - if test "$ac_test_CFLAGS" = set; then -- CFLAGS="$ac_save_CFLAGS" -+ CFLAGS=$ac_save_CFLAGS - elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" -@@ -1432,86 +3405,363 @@ - CFLAGS= - fi - fi -+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -+if test "${ac_cv_prog_cc_c89+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_prog_cc_c89=no -+ac_save_CC=$CC -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+#include -+#include -+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -+struct buf { int x; }; -+FILE * (*rcsopen) (struct buf *, struct stat *, int); -+static char *e (p, i) -+ char **p; -+ int i; -+{ -+ return p[i]; -+} -+static char *f (char * (*g) (char **, int), char **p, ...) -+{ -+ char *s; -+ va_list v; -+ va_start (v,p); -+ s = g (p, va_arg (v,int)); -+ va_end (v); -+ return s; -+} - --echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 --echo "configure:1438: 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 -+ as 'x'. The following induces an error, until -std is added to get -+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an -+ array size at least. It's necessary to write '\x00'==0 to get something -+ that's true only with -std. */ -+int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -+ -+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters -+ inside strings and character constants. */ -+#define FOO(x) 'x' -+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; -+ -+int test (int i, double x); -+struct s1 {int (*f) (int a);}; -+struct s2 {int (*f) (double a);}; -+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -+int argc; -+char **argv; +int +main () +{ -+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ++exit(alloca(500) != NULL ? 0 : 1); + ; + return 0; +} -+_ACEOF -+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -+do -+ CC="$ac_save_CC $ac_arg" -+ 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_cv_prog_cc_c89=$ac_arg -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+fi -+ -+rm -f core conftest.err conftest.$ac_objext -+ test "x$ac_cv_prog_cc_c89" != "xno" && break -+done -+rm -f conftest.$ac_ext -+CC=$ac_save_CC + -+fi -+# AC_CACHE_VAL -+case "x$ac_cv_prog_cc_c89" in -+ x) -+ { $as_echo "$as_me:$LINENO: result: none needed" >&5 -+$as_echo "none needed" >&6; } ;; -+ xno) -+ { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -+$as_echo "unsupported" >&6; } ;; -+ *) -+ CC="$CC $ac_cv_prog_cc_c89" -+ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -+esac -+ -+ -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -+$as_echo_n "checking how to run the C preprocessor... " >&6; } - # On Suns, sometimes $CPP names a directory. - if test -n "$CPP" && test -d "$CPP"; then - CPP= - fi - if test -z "$CPP"; then --if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ if test "${ac_cv_prog_CPP+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- # This must be in double quotes, not single quotes, because CPP may get -- # substituted into the Makefile and "${CC-cc}" will confuse make. -- CPP="${CC-cc} -E" -+ # Double quotes because CPP needs to be expanded -+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" -+ do -+ ac_preproc_ok=false -+for ac_c_preproc_warn_flag in '' yes -+do -+ # Use a header file that comes with gcc, so configuring glibc -+ # with a fresh cross-compiler works. -+ # Prefer to if __STDC__ is defined, since -+ # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, -- # not just through cpp. -- cat > conftest.$ac_ext < --Syntax Error --EOF --ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:1459: \"$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 -- : + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : +- -else -- echo "$ac_err" >&5 -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- CPP="${CC-cc} -E -traditional-cpp" -- cat > conftest.$ac_ext < --Syntax Error --EOF --ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:1476: \"$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 -+ # not just through cpp. "Syntax error" is here to catch this case. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif -+ Syntax error -+_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 -- echo "$ac_err" >&5 -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- CPP="${CC-cc} -nologo -E" -- cat > conftest.$ac_ext < --Syntax Error --EOF --ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:1493: \"$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 -- : -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ # Broken: fails on valid input. -+continue -+fi -+ -+rm -f conftest.err conftest.$ac_ext -+ -+ # OK, works on sane cases. Now check whether nonexistent headers -+ # can be detected and how. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+_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 -+ # Broken: success on invalid input. -+continue - else -- echo "$ac_err" >&5 -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- CPP=/lib/cpp -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ # Passes both tests. -+ac_preproc_ok=: -+break - fi --rm -f conftest* -+ -+rm -f conftest.err conftest.$ac_ext -+ -+done -+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -+rm -f conftest.err conftest.$ac_ext -+if $ac_preproc_ok; then -+ break - fi --rm -f conftest* -+ -+ done -+ ac_cv_prog_CPP=$CPP -+ - fi --rm -f conftest* -- ac_cv_prog_CPP="$CPP" -+ CPP=$ac_cv_prog_CPP -+else -+ ac_cv_prog_CPP=$CPP - fi -- CPP="$ac_cv_prog_CPP" -+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 -+$as_echo "$CPP" >&6; } -+ac_preproc_ok=false -+for ac_c_preproc_warn_flag in '' yes -+do -+ # Use a header file that comes with gcc, so configuring glibc -+ # with a fresh cross-compiler works. -+ # Prefer to if __STDC__ is defined, since -+ # exists even on freestanding compilers. -+ # On the NeXT, cc -E runs the code through the compiler's parser, -+ # not just through cpp. "Syntax error" is here to catch this case. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif -+ Syntax error -+_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 -- ac_cv_prog_CPP="$CPP" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ # Broken: fails on valid input. -+continue -+fi -+ -+rm -f conftest.err conftest.$ac_ext -+ -+ # OK, works on sane cases. Now check whether nonexistent headers -+ # can be detected and how. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+_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 -+ # Broken: success on invalid input. -+continue + gcl_ok=yes +else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ # Passes both tests. -+ac_preproc_ok=: -+break ++ gcl_ok=no fi --echo "$ac_t""$CPP" 1>&6 -+ -+rm -f conftest.err conftest.$ac_ext -+ -+done -+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -+rm -f conftest.err conftest.$ac_ext -+if $ac_preproc_ok; then -+ : -+else -+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } -+fi -+ -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu - - + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +@@ -7628,8 +7855,6 @@ $as_echo "no" >&6; } ; fi -@@ -1564,36 +3814,44 @@ - for ac_prog in gawk nawk awk - do --# Extract the first word of "$ac_prog", so it can be a program name with args. -+ # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 --echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1571: checking for $ac_word" >&5 --if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_AWK+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. - else -- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -- ac_dummy="$PATH" -- for ac_dir in $ac_dummy; do -- test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/$ac_word; then -- ac_cv_prog_AWK="$ac_prog" -- break -- fi -- done -- IFS="$ac_save_ifs" -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_AWK="$ac_prog" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+IFS=$as_save_IFS -+ - fi - fi --AWK="$ac_cv_prog_AWK" -+AWK=$ac_cv_prog_AWK - if test -n "$AWK"; then -- echo "$ac_t""$AWK" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: $AWK" >&5 -+$as_echo "$AWK" >&6; } - else -- echo "$ac_t""no" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi --test -n "$AWK" && break -+ -+ test -n "$AWK" && break - done +-# alloca +- + # dlopen etc + # idea make it so you do something dlopen(libX.so,RTLD_GLOBAL) + # then dlload("foo.o") a lisp file can refer to things in libX.so +@@ -7653,8 +7878,8 @@ $as_echo "no" >&6; } ; fi + # redhat/cygnus released for some reason a buggy version of gcc, + # which no one else released. Catch that here. +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for buggy gcc version from redhat" >&5 +-$as_echo_n "checking Checking for buggy gcc version from redhat... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy gcc version from redhat" >&5 ++$as_echo_n "checking for buggy gcc version from redhat... " >&6; } + if 2>&1 $CC -v | fgrep "gcc version 2.96" > /dev/null + then + BROKEN_O4_OPT=1 +@@ -7694,7 +7919,7 @@ if test -f h/$use.defs ; then -@@ -1601,31 +3859,33 @@ - case $use in - mips*) enable_gprof="no";; - hppa*) enable_gprof="no";; --esac -+esac + ac_config_files="$ac_config_files makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp" - if test "$enable_gprof" = "yes" ; then - TCFLAGS="$TCFLAGS -pg"; - TLIBS="$TLIBS -pg"; - TFPFLAG="" -- cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define GCL_GPROF 1 --EOF -+_ACEOF +-cat >confcache <<\_ACEOF ++ cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure + # tests run on this system so they can be shared between configure + # scripts and configure runs, see configure's option --config-cache. +@@ -7758,10 +7983,21 @@ $as_echo "$as_me: WARNING: cache variabl + :end' >>confcache + if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then +- test "x$cache_file" != "x/dev/null" && ++ if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 + $as_echo "$as_me: updating cache $cache_file" >&6;} +- cat confcache >$cache_file ++ if test ! -f "$cache_file" || test -h "$cache_file"; then ++ cat confcache >"$cache_file" ++ else ++ case $cache_file in #( ++ */* | ?:*) ++ mv -f confcache "$cache_file"$$ && ++ mv -f "$cache_file"$$ "$cache_file" ;; #( ++ *) ++ mv -f confcache "$cache_file" ;; ++ esac ++ fi ++ fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 + $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} +@@ -7793,7 +8029,7 @@ LTLIBOBJS=$ac_ltlibobjs -- echo $ac_n "checking for text start""... $ac_c" 1>&6 --echo "configure:1616: checking for text start" >&5 -+ { $as_echo "$as_me:$LINENO: checking for text start" >&5 -+$as_echo_n "checking for text start... " >&6; } - echo 'int main () {return(0);}' >foo.c - $CC foo.c -o foo - GCL_GPROF_START=`nm foo | $AWK '/ *T *__*start$/ {print $NF}'` - rm -f foo.c foo -- echo "$ac_t""$GCL_GPROF_START" 1>&6 -- cat >> confdefs.h <&5 -+$as_echo "$GCL_GPROF_START" >&6; } -+ cat >>confdefs.h <<_ACEOF - #define GCL_GPROF_START $GCL_GPROF_START --EOF -+_ACEOF -- case "$use" in -- arm*) -+ case "$use" in -+ arm*) - #FIXME report and remove this when done -- echo "$ac_t""Reducing optimization on profiling arm build to workaround gcc bug" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: Reducing optimization on profiling arm build to workaround gcc bug" >&5 -+$as_echo "Reducing optimization on profiling arm build to workaround gcc bug" >&6; } - enable_debug=yes;; - esac - fi -@@ -1648,11 +3908,11 @@ - - # gcc on ppc cannot compile our new_init.c with full opts --CM - TONIFLAGS="" --case $use in -+case $use in - *linux) - case $use in - # amd64*) # stack-boundary option does not work --# TCFLAGS="$TCFLAGS -m64 -mpreferred-stack-boundary=8";; -+# TCFLAGS="$TCFLAGS -m64 -mpreferred-stack-boundary=8";; - alpha*) - TCFLAGS="$TCFLAGS -mieee";; - # m68k*) -@@ -1667,7 +3927,7 @@ - if test "$enable_debug" != "yes" ; then TO3FLAGS="-O2" ; fi - if test "$enable_debug" != "yes" ; then TO2FLAGS="-O" ; fi - ;; -- powerpc*) -+ powerpc*) - if $CC -v 2>&1 | grep -q "gcc version 3.2" ; then - echo Reducing optimization for buggy gcc-3.2 - if test "$enable_debug" != "yes" ; then TONIFLAGS="-O $TFPFLAG" ; fi -@@ -1703,11 +3963,11 @@ - if test "$FOOPT0" != "" ; then - TO3FLAGS=`echo $TO3FLAGS | sed 's,\-O[123 ],-O0 ,g' | sed 's,\-O$,-O0 ,g'` - TO2FLAGS=`echo $TO2FLAGS | sed 's,\-O[123 ],-O0 ,g' | sed 's,\-O$,-O0 ,g'` --else -+else - if test "$FOOPT1" != "" ; then - TO3FLAGS=`echo $TO3FLAGS | sed 's,\-O[2-3],-O1,g'` - TO2FLAGS=`echo $TO2FLAGS | sed 's,\-O[2-3],-O1,g'` --else -+else - if test "$FOOPT2" != "" ; then - TO3FLAGS=`echo "$TO3FLAGS" | sed 's,\-O3,-O2,g'` - TO2FLAGS=`echo "$TO2FLAGS" | sed 's,\-O3,-O2,g'` -@@ -1728,252 +3988,1082 @@ - # 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:1733: checking system version (for dynamic loading)" >&5 -+{ $as_echo "$as_me:$LINENO: checking system version (for dynamic loading)" >&5 -+$as_echo_n "checking system version (for dynamic loading)... " >&6; } + +-: ${CONFIG_STATUS=./config.status} ++: "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 + ac_clean_files_save=$ac_clean_files + ac_clean_files="$ac_clean_files $CONFIG_STATUS" +@@ -7894,6 +8130,7 @@ fi + IFS=" "" $as_nl" + + # Find who we are. Look in the path if we contain no directory separator. ++as_myself= + case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +@@ -8201,7 +8438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # values after options handling. + ac_log=" + This file was extended by $as_me, which was +-generated by GNU Autoconf 2.67. Invocation command line was ++generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS +@@ -8263,7 +8500,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ + config.status +-configured by $0, generated by GNU Autoconf 2.67, ++configured by $0, generated by GNU Autoconf 2.68, + with options \\"\$ac_cs_config\\" + + Copyright (C) 2010 Free Software Foundation, Inc. +@@ -8389,7 +8626,7 @@ do + "windows/sysdir.bat") CONFIG_FILES="$CONFIG_FILES windows/sysdir.bat" ;; + "windows/install.lsp") CONFIG_FILES="$CONFIG_FILES windows/install.lsp" ;; + +- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; ++ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac + done + +@@ -8411,9 +8648,10 @@ fi + # after its creation but before its name has been assigned to `$tmp'. + $debug || + { +- tmp= ++ tmp= ac_tmp= + trap 'exit_status=$? +- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ++ : "${ac_tmp:=$tmp}" ++ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status + ' 0 + trap 'as_fn_exit 1' 1 2 13 15 + } +@@ -8421,12 +8659,13 @@ $debug || + + { + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && +- test -n "$tmp" && test -d "$tmp" ++ test -d "$tmp" + } || + { + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") + } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ++ac_tmp=$tmp + + # Set up the scripts for CONFIG_FILES section. + # No need to generate them if there are no CONFIG_FILES. +@@ -8448,7 +8687,7 @@ else + ac_cs_awk_cr=$ac_cr + fi + +-echo 'BEGIN {' >"$tmp/subs1.awk" && ++echo 'BEGIN {' >"$ac_tmp/subs1.awk" && + _ACEOF + + +@@ -8476,7 +8715,7 @@ done + rm -f conf$$subs.sh + + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +-cat >>"\$tmp/subs1.awk" <<\\_ACAWK && ++cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && + _ACEOF + sed -n ' + h +@@ -8524,7 +8763,7 @@ t delim + rm -f conf$$subs.awk + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + _ACAWK +-cat >>"\$tmp/subs1.awk" <<_ACAWK && ++cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +@@ -8556,7 +8795,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" + else + cat +-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ ++fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 + _ACEOF + +@@ -8590,7 +8829,7 @@ fi # test -n "$CONFIG_FILES" + # No need to generate them if there are no CONFIG_HEADERS. + # This happens for instance with `./config.status Makefile'. + if test -n "$CONFIG_HEADERS"; then +-cat >"$tmp/defines.awk" <<\_ACAWK || ++cat >"$ac_tmp/defines.awk" <<\_ACAWK || + BEGIN { + _ACEOF + +@@ -8602,8 +8841,8 @@ _ACEOF + # handling of long lines. + ac_delim='%!_!# ' + for ac_last_try in false false :; do +- ac_t=`sed -n "/$ac_delim/p" confdefs.h` +- if test -z "$ac_t"; then ++ ac_tt=`sed -n "/$ac_delim/p" confdefs.h` ++ if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 +@@ -8704,7 +8943,7 @@ do + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; +- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; ++ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac +@@ -8723,7 +8962,7 @@ do + for ac_f + do + case $ac_f in +- -) ac_f="$tmp/stdin";; ++ -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. +@@ -8732,7 +8971,7 @@ do + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || +- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; ++ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" +@@ -8758,8 +8997,8 @@ $as_echo "$as_me: creating $ac_file" >&6 + esac + + case $ac_tag in +- *:-:* | *:-) cat >"$tmp/stdin" \ +- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; ++ *:-:* | *:-) cat >"$ac_tmp/stdin" \ ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac +@@ -8884,21 +9123,22 @@ s&@abs_builddir@&$ac_abs_builddir&;t t + s&@abs_top_builddir@&$ac_abs_top_builddir&;t t + $ac_datarootdir_hack + " +-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ +- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ++eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ ++ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + + test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && +- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && +- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && ++ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && ++ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ ++ "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + which seems to be undefined. Please make sure it is defined" >&5 + $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' + which seems to be undefined. Please make sure it is defined" >&2;} + +- rm -f "$tmp/stdin" ++ rm -f "$ac_tmp/stdin" + case $ac_file in +- -) cat "$tmp/out" && rm -f "$tmp/out";; +- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; ++ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; ++ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; +@@ -8909,20 +9149,20 @@ which seems to be undefined. Please mak + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ +- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" +- } >"$tmp/config.h" \ ++ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" ++ } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +- if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then ++ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 + $as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" +- mv "$tmp/config.h" "$ac_file" \ ++ mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ +- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ ++ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi + ;; +--- configure.in.orig 2010-11-09 13:48:57.000000000 -0700 ++++ configure.in 2010-12-30 13:27:03.566235348 -0700 +@@ -1,4 +1,4 @@ +-AC_INIT() ++AC_INIT + AC_PREREQ([2.61]) + AC_CONFIG_HEADER(h/gclincl.h) + +@@ -602,9 +602,6 @@ fi + AC_MSG_CHECKING([system version (for dynamic loading)]) if machine=`uname -m` ; then true; else machine=unknown ; fi --for ac_prog in makeinfo --do --# Extract the first word of "$ac_prog", so it can be a program name with args. --set dummy $ac_prog; ac_word=$2 --echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:1741: checking for $ac_word" >&5 --if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 --else -- if test -n "$MAKEINFO"; then -- ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. --else -- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -- ac_dummy="$PATH" -- for ac_dir in $ac_dummy; do -- test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/$ac_word; then -- ac_cv_prog_MAKEINFO="$ac_prog" -- break -- fi -- done -- IFS="$ac_save_ifs" --fi --fi --MAKEINFO="$ac_cv_prog_MAKEINFO" --if test -n "$MAKEINFO"; then -- echo "$ac_t""$MAKEINFO" 1>&6 --else -- echo "$ac_t""no" 1>&6 --fi -- --test -n "$MAKEINFO" && break --done --test -n "$MAKEINFO" || MAKEINFO=""false"" -- -- +-AC_CHECK_PROGS(MAKEINFO,makeinfo,"false") +-AC_SUBST(MAKEINFO) - if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`${AWK} '/3/,/3/' /usr/lib/NextStep/software_version` else - system=`uname -s`-`uname -r` - if test "$?" -ne 0 ; then -- echo "$ac_t""unknown (can't find uname command)" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: unknown (can't find uname command)" >&5 -+$as_echo "unknown (can't find uname command)" >&6; } - system=unknown - else - # Special check for weird MP-RAS system (uname returns weird - # results, and the version is kept in special file). -- -+ - if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then - system="MP-RAS-`${AWK} '{print $3}' '/etc/.relid'`" - fi - if test "`uname -s`" = "AIX" ; then - system=AIX-`uname -v`.`uname -r` - fi -- echo "$ac_t""$system" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: $system" >&5 -+$as_echo "$system" >&6; } - fi +@@ -645,21 +642,24 @@ esac + + AC_CHECK_HEADER(unistd.h, + AC_CHECK_LIB(c,sysconf, +- AC_MSG_CHECKING("for _SC_CLK_TCK") +- AC_TRY_RUN([#include +- #include +- int +- main() { +- FILE *fp=fopen("conftest1","w"); ++ AC_MSG_CHECKING([for _SC_CLK_TCK]) ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #include ++ #include ++ ]],[[ ++ FILE *fp=fopen("conftest1","w"); + fprintf(fp,"%lu\n",sysconf(_SC_CLK_TCK)); + fclose(fp); +- return 0; +- }], ++ return 0; ++ ]])], + hz=`cat conftest1` + AC_DEFINE_UNQUOTED(HZ,$hz) + ,hz=0,hz=0) + [AC_MSG_RESULT($hz)])) + ++AC_PROG_EGREP ++AC_CHECK_PROGS(MAKEINFO,makeinfo,"false") ++AC_SUBST(MAKEINFO) + + #MY_SUBDIRS= + +@@ -676,17 +676,19 @@ if test $use_gmp = yes ; then + if test "$enable_dynsysgmp" = "yes" ; then + AC_CHECK_HEADER(gmp.h, + AC_CHECK_LIB(gmp,__gmpz_init, +- AC_MSG_CHECKING("for external gmp version") +- AC_TRY_RUN([#include +- int main() { ++ AC_MSG_CHECKING([for external gmp version]) ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #include ++ ]],[[ + #if __GNU_MP_VERSION == 4 || __GNU_MP_VERSION == 5 + return 0; + #else + return -1; + #endif +- }], ++ ]])], + # MPFILES=$GMPDIR/mpn/mul_n.o + # PATCHED_SYMBOLS=__gmpn_toom3_mul_n ++ AC_MSG_RESULT([4/5]) + MPFILES= + PATCHED_SYMBOLS= + # if test "$use" = "m68k-linux" ; then +@@ -698,7 +700,8 @@ if test $use_gmp = yes ; then + echo "int main() {return 0;}" >>foo.c + MP_INCLUDE=`cpp foo.c | grep /gmp.h | head -n 1 | $AWK '{print $3}' | tr -d '"'` + rm -f foo.c, +- echo "Cannot use dynamic gmp lib" , echo "Cannot use dynamic gmp lib" ), ++ AC_MSG_RESULT([Cannot use dynamic gmp lib]), ++ AC_MSG_RESULT([Cannot use dynamic gmp lib])), + echo "Cannot use dynamic gmp lib" ,), + echo "Cannot use dynamic gmp lib" ,) fi +@@ -745,7 +748,7 @@ if test "$NEED_LOCAL_GMP" != "" ; then - if test "$use" = "powerpc-macosx" ; then -- ac_safe=`echo "malloc/malloc.h" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for malloc/malloc.h""... $ac_c" 1>&6 --echo "configure:1797: checking for malloc/malloc.h" >&5 --if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ -+ -+{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -+$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -+if test "${ac_cv_path_GREP+set}" = set; then -+ $as_echo_n "(cached) " >&6 + fi + +-AC_MSG_CHECKING("for leading underscore in object symbols") ++AC_MSG_CHECKING([for leading underscore in object symbols]) + cat>foo.c < + #include +@@ -755,60 +758,62 @@ $CC -c foo.c -o foo.o + if nm foo.o |grep " U " | grep "_cos" >/dev/null || nm foo.o |grep " U " | grep " _getc" >/dev/null ; then + LEADING_UNDERSCORE=1 + AC_DEFINE(LEADING_UNDERSCORE) +- AC_MSG_RESULT("yes") ++ AC_MSG_RESULT([yes]) else -- cat > conftest.$ac_ext < --EOF --ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:1807: \"$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" -+ if test -z "$GREP"; then -+ ac_path_GREP_found=false -+ # Loop through the user's path and test for each of PROGNAME-LIST -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_prog in grep ggrep; do -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" -+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -+# Check for GNU ac_path_GREP and select it if it is found. -+ # Check for GNU $ac_path_GREP -+case `"$ac_path_GREP" --version 2>&1` in -+*GNU*) -+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -+*) -+ ac_count=0 -+ $as_echo_n 0123456789 >"conftest.in" -+ while : -+ do -+ cat "conftest.in" "conftest.in" >"conftest.tmp" -+ mv "conftest.tmp" "conftest.in" -+ cp "conftest.in" "conftest.nl" -+ $as_echo 'GREP' >> "conftest.nl" -+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break -+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break -+ ac_count=`expr $ac_count + 1` -+ if test $ac_count -gt ${ac_path_GREP_max-0}; then -+ # Best one so far, save it but keep looking for a better one -+ ac_cv_path_GREP="$ac_path_GREP" -+ ac_path_GREP_max=$ac_count -+ fi -+ # 10*(2^10) chars as input seems more than enough -+ test $ac_count -gt 10 && break -+ done -+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -+esac -+ -+ $ac_path_GREP_found && break 3 -+ done -+ done -+done -+IFS=$as_save_IFS -+ if test -z "$ac_cv_path_GREP"; then -+ { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} -+ { (exit 1); exit 1; }; } -+ fi + LEADING_UNDERSCORE="" +- AC_MSG_RESULT("no") ++ AC_MSG_RESULT([no]) + fi +-AC_MSG_CHECKING("for GNU ld option -Map") ++AC_MSG_CHECKING([for GNU ld option -Map]) + touch map + $CC -o foo [ -Wl,-Map ] map foo.o >/dev/null 2>&1 + if test `cat map | wc -l` != "0" ; then +- AC_MSG_RESULT("yes") ++ AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_GNU_LD) + GNU_LD=1 else -- 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" -+ ac_cv_path_GREP=$GREP -+fi -+ -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -+$as_echo "$ac_cv_path_GREP" >&6; } -+ GREP="$ac_cv_path_GREP" -+ -+ -+{ $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 -+ $as_echo_n "(cached) " >&6 -+else -+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 -+ then ac_cv_path_EGREP="$GREP -E" -+ else -+ if test -z "$EGREP"; then -+ ac_path_EGREP_found=false -+ # Loop through the user's path and test for each of PROGNAME-LIST -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_prog in egrep; do -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" -+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -+# Check for GNU ac_path_EGREP and select it if it is found. -+ # Check for GNU $ac_path_EGREP -+case `"$ac_path_EGREP" --version 2>&1` in -+*GNU*) -+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -+*) -+ ac_count=0 -+ $as_echo_n 0123456789 >"conftest.in" -+ while : -+ do -+ cat "conftest.in" "conftest.in" >"conftest.tmp" -+ mv "conftest.tmp" "conftest.in" -+ cp "conftest.in" "conftest.nl" -+ $as_echo 'EGREP' >> "conftest.nl" -+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break -+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break -+ ac_count=`expr $ac_count + 1` -+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then -+ # Best one so far, save it but keep looking for a better one -+ ac_cv_path_EGREP="$ac_path_EGREP" -+ ac_path_EGREP_max=$ac_count -+ fi -+ # 10*(2^10) chars as input seems more than enough -+ test $ac_count -gt 10 && break -+ done -+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -+esac -+ -+ $ac_path_EGREP_found && break 3 -+ done -+ done -+done -+IFS=$as_save_IFS -+ if test -z "$ac_cv_path_EGREP"; then -+ { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} -+ { (exit 1); exit 1; }; } -+ fi -+else -+ ac_cv_path_EGREP=$EGREP -+fi -+ -+ fi -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -+$as_echo "$ac_cv_path_EGREP" >&6; } -+ EGREP="$ac_cv_path_EGREP" -+ -+ -+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -+$as_echo_n "checking for ANSI C header files... " >&6; } -+if test "${ac_cv_header_stdc+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+#include -+#include -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_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_cv_header_stdc=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_header_stdc=no -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+if test $ac_cv_header_stdc = yes; then -+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "memchr" >/dev/null 2>&1; then -+ : -+else -+ ac_cv_header_stdc=no - fi - rm -f conftest* -+ +- AC_MSG_RESULT("no") ++ AC_MSG_RESULT([no]) + GNU_LD= fi --if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- cat >> confdefs.h <<\EOF -+ -+if test $ac_cv_header_stdc = yes; then -+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "free" >/dev/null 2>&1; then -+ : -+else -+ ac_cv_header_stdc=no -+fi -+rm -f conftest* -+ -+fi -+ -+if test $ac_cv_header_stdc = yes; then -+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -+ if test "$cross_compiling" = yes; then -+ : -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+#if ((' ' & 0x0FF) == 0x020) -+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -+#else -+# define ISLOWER(c) \ -+ (('a' <= (c) && (c) <= 'i') \ -+ || ('j' <= (c) && (c) <= 'r') \ -+ || ('s' <= (c) && (c) <= 'z')) -+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -+#endif -+ -+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -+int -+main () -+{ -+ int i; -+ for (i = 0; i < 256; i++) -+ if (XOR (islower (i), ISLOWER (i)) -+ || toupper (i) != TOUPPER (i)) -+ return 2; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ : -+else -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+ac_cv_header_stdc=no -+fi -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+ -+ -+fi -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -+$as_echo "$ac_cv_header_stdc" >&6; } -+if test $ac_cv_header_stdc = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define STDC_HEADERS 1 -+_ACEOF -+ -+fi -+ -+# On IRIX 5.3, sys/types and inttypes.h are conflicting. -+ -+ -+ -+ -+ -+ -+ -+ -+ -+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -+ inttypes.h stdint.h unistd.h -+do -+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -+{ $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 -+ 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 -+ eval "$as_ac_Header=yes" -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ eval "$as_ac_Header=no" -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+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; } -+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 -+ -+ -+if test "${ac_cv_header_malloc_malloc_h+set}" = set; then -+ { $as_echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5 -+$as_echo_n "checking for malloc/malloc.h... " >&6; } -+if test "${ac_cv_header_malloc_malloc_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5 -+$as_echo "$ac_cv_header_malloc_malloc_h" >&6; } -+else -+ # Is the header compilable? -+{ $as_echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5 -+$as_echo_n "checking malloc/malloc.h 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 -+_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 -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_compiler=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 malloc/malloc.h presence" >&5 -+$as_echo_n "checking malloc/malloc.h 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 -+_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: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+$as_echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5 -+$as_echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { $as_echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5 -+$as_echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5 -+$as_echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5 -+$as_echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5 -+$as_echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5 -+$as_echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5 -+$as_echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;} -+ -+ ;; -+esac -+{ $as_echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5 -+$as_echo_n "checking for malloc/malloc.h... " >&6; } -+if test "${ac_cv_header_malloc_malloc_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_header_malloc_malloc_h=$ac_header_preproc -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5 -+$as_echo "$ac_cv_header_malloc_malloc_h" >&6; } -+ -+fi -+if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_MALLOC_MALLOC_H 1 --EOF -+_ACEOF + rm -f foo.c foo.o foo map - else -- echo "$ac_t""no" 1>&6 --ac_safe=`echo "objc/malloc.h" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for objc/malloc.h""... $ac_c" 1>&6 --echo "configure:1831: checking for objc/malloc.h" >&5 --if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ if test "${ac_cv_header_objc_malloc_h+set}" = set; then -+ { $as_echo "$as_me:$LINENO: checking for objc/malloc.h" >&5 -+$as_echo_n "checking for objc/malloc.h... " >&6; } -+if test "${ac_cv_header_objc_malloc_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_objc_malloc_h" >&5 -+$as_echo "$ac_cv_header_objc_malloc_h" >&6; } - else -- cat > conftest.$ac_ext <&5 -+$as_echo_n "checking objc/malloc.h 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 --EOF --ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:1841: \"$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" -+_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; } -+ -+# Is the header present? -+{ $as_echo "$as_me:$LINENO: checking objc/malloc.h presence" >&5 -+$as_echo_n "checking objc/malloc.h 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 -+_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 -- cat >> confdefs.h <<\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: objc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+$as_echo "$as_me: WARNING: objc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: objc/malloc.h: proceeding with the compiler's result" >&5 -+$as_echo "$as_me: WARNING: objc/malloc.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { $as_echo "$as_me:$LINENO: WARNING: objc/malloc.h: present but cannot be compiled" >&5 -+$as_echo "$as_me: WARNING: objc/malloc.h: present but cannot be compiled" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: objc/malloc.h: check for missing prerequisite headers?" >&5 -+$as_echo "$as_me: WARNING: objc/malloc.h: check for missing prerequisite headers?" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: objc/malloc.h: see the Autoconf documentation" >&5 -+$as_echo "$as_me: WARNING: objc/malloc.h: see the Autoconf documentation" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: objc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5 -+$as_echo "$as_me: WARNING: objc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: objc/malloc.h: proceeding with the preprocessor's result" >&5 -+$as_echo "$as_me: WARNING: objc/malloc.h: proceeding with the preprocessor's result" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: objc/malloc.h: in the future, the compiler will take precedence" >&5 -+$as_echo "$as_me: WARNING: objc/malloc.h: in the future, the compiler will take precedence" >&2;} -+ -+ ;; -+esac -+{ $as_echo "$as_me:$LINENO: checking for objc/malloc.h" >&5 -+$as_echo_n "checking for objc/malloc.h... " >&6; } -+if test "${ac_cv_header_objc_malloc_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_header_objc_malloc_h=$ac_header_preproc -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_objc_malloc_h" >&5 -+$as_echo "$ac_cv_header_objc_malloc_h" >&6; } -+ -+fi -+if test "x$ac_cv_header_objc_malloc_h" = x""yes; then -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_OBJC_MALLOC_H 1 --EOF -+_ACEOF +- AC_MSG_CHECKING("for size of gmp limbs") +- AC_TRY_RUN([#include ++ AC_MSG_CHECKING([for size of gmp limbs]) ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #include + #include "$MP_INCLUDE" +- int main() { ++ ]],[[ + FILE *fp=fopen("conftest1","w"); + fprintf(fp,"%u",sizeof(mp_limb_t)); + fclose(fp); + return 0; +- }],mpsize=`cat conftest1`,mpsize=0,mpsize=0) ++ ]])],mpsize=`cat conftest1`,mpsize=0,mpsize=0) + if test "$mpsize" = "0" ; then +- echo "Cannot determine mpsize" +- exit 1 ++ AC_MSG_ERROR([Cannot determine mpsize], 1) + fi + AC_DEFINE_UNQUOTED(MP_LIMB_BYTES,$mpsize) + AC_MSG_RESULT($mpsize) - else -- echo "$ac_t""no" 1>&6 --{ echo "configure: error: need malloc.h on macosx" 1>&2; exit 1; } -+ { { $as_echo "$as_me:$LINENO: error: need malloc.h on macosx" >&5 -+$as_echo "$as_me: error: need malloc.h on macosx" >&2;} -+ { (exit 1); exit 1; }; } - fi +- AC_MSG_CHECKING("_SHORT_LIMB") +- AC_TRY_RUN([#include ++ AC_MSG_CHECKING([_SHORT_LIMB]) ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #include + #include "$MP_INCLUDE" +- int main() { ++ ]],[[ + #ifdef _SHORT_LIMB + return 0; + #else + return 1; + #endif +- }],AC_DEFINE(__SHORT_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no)) +- AC_MSG_CHECKING("_LONG_LONG_LIMB") +- AC_TRY_RUN([#include ++ ]])],AC_DEFINE(__SHORT_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no)) ++ AC_MSG_CHECKING([_LONG_LONG_LIMB]) ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #include + #include "$MP_INCLUDE" +- int main() { ++ ]],[[ + #ifdef _LONG_LONG_LIMB + return 0; + #else + return 1; + #endif +- }],AC_DEFINE(__LONG_LONG_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no)) ++ ]])],AC_DEFINE(__LONG_LONG_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no)) -+ - fi + GMP=1 + AC_DEFINE(GMP) +@@ -864,10 +869,9 @@ if test "$enable_dlopen" = "yes" ; then -+ - fi + AC_CHECK_LIB(dl,dlopen,have_dl=1,have_dl=0) + if test "$have_dl" = "0" ; then +- echo "Cannot find dlopen in -dl" +- exit 1 ++ AC_MSG_ERROR([Cannot find dlopen in -dl], 1) + fi +-dnl AC_SEARCH_LIBS(dlopen, dl, have_dl=1, AC_ERROR(dlopen not found)) ++dnl AC_SEARCH_LIBS(dlopen, dl, have_dl=1, AC_MSG_ERROR(dlopen not found)) + dnl LIBS and TLIBS - why not merged from the beginning? - # sysconf + TLIBS="$TLIBS -ldl -rdynamic" +@@ -881,16 +885,18 @@ if test "$enable_statsysbfd" = "yes" || + # + # Old binutils appear to need CONST defined to const + # +- AC_MSG_CHECKING(if need to define CONST for bfd) +- AC_TRY_RUN([#define IN_GCC ++ AC_MSG_CHECKING([if need to define CONST for bfd]) ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #define IN_GCC + #include +- int main() { symbol_info t; return 0;}], ++ ]],[[symbol_info t; return 0;]])], + AC_MSG_RESULT(no), +- AC_TRY_RUN([#define CONST const +- #define IN_GCC ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #define CONST const ++ #define IN_GCC + #include +- int main() {symbol_info t; return 0;}], +- AC_MSG_RESULT(yes) ++ ]],[[symbol_info t; return 0;]])], ++ AC_MSG_RESULT(yes) + AC_DEFINE(NEED_CONST), + AC_MSG_ERROR([cannot use bfd]), + AC_MSG_ERROR([cannot use bfd])), +@@ -903,11 +909,12 @@ if test "$enable_statsysbfd" = "yes" || + # BFD boolean syntax + # --ac_safe=`echo "unistd.h" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for unistd.h""... $ac_c" 1>&6 --echo "configure:1874: checking for unistd.h" >&5 --if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+if test "${ac_cv_header_unistd_h+set}" = set; then -+ { $as_echo "$as_me:$LINENO: checking for unistd.h" >&5 -+$as_echo_n "checking for unistd.h... " >&6; } -+if test "${ac_cv_header_unistd_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_unistd_h" >&5 -+$as_echo "$ac_cv_header_unistd_h" >&6; } - else -- cat > conftest.$ac_ext <&5 -+$as_echo_n "checking unistd.h 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 --EOF --ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:1884: \"$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" -+_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; } -+ -+# Is the header present? -+{ $as_echo "$as_me:$LINENO: checking unistd.h presence" >&5 -+$as_echo_n "checking unistd.h 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 -+_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 -- echo $ac_n "checking for sysconf in -lc""... $ac_c" 1>&6 --echo "configure:1901: checking for sysconf in -lc" >&5 --ac_lib_var=`echo c'_'sysconf | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ -+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: unistd.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+$as_echo "$as_me: WARNING: unistd.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: unistd.h: proceeding with the compiler's result" >&5 -+$as_echo "$as_me: WARNING: unistd.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { $as_echo "$as_me:$LINENO: WARNING: unistd.h: present but cannot be compiled" >&5 -+$as_echo "$as_me: WARNING: unistd.h: present but cannot be compiled" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: unistd.h: check for missing prerequisite headers?" >&5 -+$as_echo "$as_me: WARNING: unistd.h: check for missing prerequisite headers?" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: unistd.h: see the Autoconf documentation" >&5 -+$as_echo "$as_me: WARNING: unistd.h: see the Autoconf documentation" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: unistd.h: section \"Present But Cannot Be Compiled\"" >&5 -+$as_echo "$as_me: WARNING: unistd.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: unistd.h: proceeding with the preprocessor's result" >&5 -+$as_echo "$as_me: WARNING: unistd.h: proceeding with the preprocessor's result" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: unistd.h: in the future, the compiler will take precedence" >&5 -+$as_echo "$as_me: WARNING: unistd.h: in the future, the compiler will take precedence" >&2;} -+ -+ ;; -+esac -+{ $as_echo "$as_me:$LINENO: checking for unistd.h" >&5 -+$as_echo_n "checking for unistd.h... " >&6; } -+if test "${ac_cv_header_unistd_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- ac_save_LIBS="$LIBS" -+ ac_cv_header_unistd_h=$ac_header_preproc -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_unistd_h" >&5 -+$as_echo "$ac_cv_header_unistd_h" >&6; } -+ -+fi -+if test "x$ac_cv_header_unistd_h" = x""yes; then -+ { $as_echo "$as_me:$LINENO: checking for sysconf in -lc" >&5 -+$as_echo_n "checking for sysconf in -lc... " >&6; } -+if test "${ac_cv_lib_c_sysconf+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS - LIBS="-lc $LIBS" --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - --int main() { --sysconf() --; return 0; } --EOF --if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char sysconf (); -+int -+main () -+{ -+return sysconf (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_c_sysconf=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_lib_c_sysconf=no - fi --rm -f conftest* --LIBS="$ac_save_LIBS" - -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS - fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- echo $ac_n "checking "for _SC_CLK_TCK"""... $ac_c" 1>&6 --echo "configure:1936: checking "for _SC_CLK_TCK"" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_sysconf" >&5 -+$as_echo "$ac_cv_lib_c_sysconf" >&6; } -+if test "x$ac_cv_lib_c_sysconf" = x""yes; then -+ { $as_echo "$as_me:$LINENO: checking for _SC_CLK_TCK" >&5 -+$as_echo_n "checking for _SC_CLK_TCK... " >&6; } - if test "$cross_compiling" = yes; then - hz=0 - else -- cat > conftest.$ac_ext < -- #include -- int -- main() { -- FILE *fp=fopen("conftest1","w"); -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include -+ #include -+ -+int -+main () -+{ -+ -+ FILE *fp=fopen("conftest1","w"); - fprintf(fp,"%lu\n",sysconf(_SC_CLK_TCK)); - fclose(fp); -- return 0; -- } --EOF --if { (eval echo configure:1953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -+ return 0; -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - hz=`cat conftest1` -- cat >> confdefs.h <>confdefs.h <<_ACEOF - #define HZ $hz --EOF -+_ACEOF -+ +- AC_MSG_CHECKING(for useable bfd_boolean) +- AC_TRY_RUN([#define IN_GCC ++ AC_MSG_CHECKING([for usable bfd_boolean]) ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #define IN_GCC + #include + bfd_boolean foo() {return FALSE;} +- int main() {return 0;}], ++ ]], [[return 0;]])], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_BFD_BOOLEAN), + AC_MSG_RESULT(no), +@@ -918,10 +925,11 @@ if test "$enable_statsysbfd" = "yes" || + # bfd_link_info.output_bfd minimal configure change check + # -- - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- hz=0 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+hz=0 - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi +- AC_MSG_CHECKING(for bfd_link_info.output_bfd) +- AC_TRY_RUN([#include ++ AC_MSG_CHECKING([for bfd_link_info.output_bfd]) ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #include + #include +- int main() {struct bfd_link_info i;i.output_bfd=0;return 0;}], ++ ]], [[struct bfd_link_info i;i.output_bfd=0;return 0;]])], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_OUTPUT_BFD), + AC_MSG_RESULT(no), +@@ -1024,45 +1032,47 @@ fi + # mechanism, in the PAGE macro. This offset is subtracted from + # addresses, in calculating a page for an address in the heap. -- echo "$ac_t""$hz" 1>&6 -+ -+ { $as_echo "$as_me:$LINENO: result: $hz" >&5 -+$as_echo "$hz" >&6; } -+fi -+ -+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 -+ $as_echo_n "(cached) " >&6 - else -- echo "$ac_t""no" 1>&6 -+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 -+ then ac_cv_path_EGREP="$GREP -E" -+ else -+ if test -z "$EGREP"; then -+ ac_path_EGREP_found=false -+ # Loop through the user's path and test for each of PROGNAME-LIST -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_prog in egrep; do -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" -+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -+# Check for GNU ac_path_EGREP and select it if it is found. -+ # Check for GNU $ac_path_EGREP -+case `"$ac_path_EGREP" --version 2>&1` in -+*GNU*) -+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -+*) -+ ac_count=0 -+ $as_echo_n 0123456789 >"conftest.in" -+ while : -+ do -+ cat "conftest.in" "conftest.in" >"conftest.tmp" -+ mv "conftest.tmp" "conftest.in" -+ cp "conftest.in" "conftest.nl" -+ $as_echo 'EGREP' >> "conftest.nl" -+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break -+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break -+ ac_count=`expr $ac_count + 1` -+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then -+ # Best one so far, save it but keep looking for a better one -+ ac_cv_path_EGREP="$ac_path_EGREP" -+ ac_path_EGREP_max=$ac_count -+ fi -+ # 10*(2^10) chars as input seems more than enough -+ test $ac_count -gt 10 && break -+ done -+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -+esac -+ -+ $ac_path_EGREP_found && break 3 -+ done -+ done -+done -+IFS=$as_save_IFS -+ if test -z "$ac_cv_path_EGREP"; then -+ { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} -+ { (exit 1); exit 1; }; } -+ fi -+else -+ ac_cv_path_EGREP=$EGREP -+fi -+ -+ fi - fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -+$as_echo "$ac_cv_path_EGREP" >&6; } -+ EGREP="$ac_cv_path_EGREP" +-AC_CHECK_SIZEOF(long,0) ++AC_CHECK_SIZEOF(long) + AC_MSG_CHECKING(sizeof struct contblock) -+ -+for ac_prog in makeinfo -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_MAKEINFO+set}" = set; then -+ $as_echo_n "(cached) " >&6 + # work around MSYS pwd result incompatibility + if test "$use" = "mingw" ; then +-AC_TRY_RUN([#include ++AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #include + #define EXTER + #include "$MP_INCLUDE" + #include "h/enum.h" + #include "h/object.h" +- int main(int argc,char **argv,char **envp) { ++ ]],[[ + FILE *f=fopen("conftest1","w"); + fprintf(f,"%u",sizeof(struct contblock)); + fclose(f); + return 0; +- }],sizeof_contblock=`cat conftest1`, +- echo Cannot find sizeof struct contblock;exit 1, +- echo Cannot find sizeof struct contblock;exit 1) ++ ]])],sizeof_contblock=`cat conftest1`, ++ AC_MSG_ERROR([Cannot find sizeof struct contblock], 1), ++ AC_MSG_ERROR([Cannot find sizeof struct contblock], 1)) else -- echo "$ac_t""no" 1>&6 -+ if test -n "$MAKEINFO"; then -+ ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_MAKEINFO="$ac_prog" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+IFS=$as_save_IFS -+ -+fi +-AC_TRY_RUN([#include ++AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #include + #define EXTER + #include "$MP_INCLUDE" + #include "`pwd`/h/enum.h" + #include "`pwd`/h/object.h" +- int main(int argc,char **argv,char **envp) { ++ ]],[[ + FILE *f=fopen("conftest1","w"); + fprintf(f,"%u",sizeof(struct contblock)); + fclose(f); + return 0; +- }],sizeof_contblock=`cat conftest1`, +- echo Cannot find sizeof struct contblock;exit 1, +- echo Cannot find sizeof struct contblock;exit 1) ++ ]])],sizeof_contblock=`cat conftest1`, ++ AC_MSG_ERROR([Cannot find sizeof struct contblock], 1), ++ AC_MSG_ERROR([Cannot find sizeof struct contblock], 1)) fi -+MAKEINFO=$ac_cv_prog_MAKEINFO -+if test -n "$MAKEINFO"; then -+ { $as_echo "$as_me:$LINENO: result: $MAKEINFO" >&5 -+$as_echo "$MAKEINFO" >&6; } -+else -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+ test -n "$MAKEINFO" && break -+done -+test -n "$MAKEINFO" || MAKEINFO=""false"" - + AC_MSG_RESULT($sizeof_contblock) + AC_DEFINE_UNQUOTED(SIZEOF_CONTBLOCK,$sizeof_contblock) -@@ -1991,90 +5081,255 @@ - GMPDIR=gmp3 - PATCHED_SYMBOLS="" - if test "$enable_dynsysgmp" = "yes" ; then -- ac_safe=`echo "gmp.h" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for gmp.h""... $ac_c" 1>&6 --echo "configure:1997: checking for gmp.h" >&5 --if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ if test "${ac_cv_header_gmp_h+set}" = set; then -+ { $as_echo "$as_me:$LINENO: checking for gmp.h" >&5 -+$as_echo_n "checking for gmp.h... " >&6; } -+if test "${ac_cv_header_gmp_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gmp_h" >&5 -+$as_echo "$ac_cv_header_gmp_h" >&6; } - else -- cat > conftest.$ac_ext <&5 -+$as_echo_n "checking gmp.h 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 --EOF --ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:2007: \"$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" -+_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; } -+ -+# Is the header present? -+{ $as_echo "$as_me:$LINENO: checking gmp.h presence" >&5 -+$as_echo_n "checking gmp.h 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 -+_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 -- echo $ac_n "checking for __gmpz_init in -lgmp""... $ac_c" 1>&6 --echo "configure:2024: checking for __gmpz_init in -lgmp" >&5 --ac_lib_var=`echo gmp'_'__gmpz_init | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ -+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: gmp.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+$as_echo "$as_me: WARNING: gmp.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: gmp.h: proceeding with the compiler's result" >&5 -+$as_echo "$as_me: WARNING: gmp.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { $as_echo "$as_me:$LINENO: WARNING: gmp.h: present but cannot be compiled" >&5 -+$as_echo "$as_me: WARNING: gmp.h: present but cannot be compiled" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: gmp.h: check for missing prerequisite headers?" >&5 -+$as_echo "$as_me: WARNING: gmp.h: check for missing prerequisite headers?" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: gmp.h: see the Autoconf documentation" >&5 -+$as_echo "$as_me: WARNING: gmp.h: see the Autoconf documentation" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: gmp.h: section \"Present But Cannot Be Compiled\"" >&5 -+$as_echo "$as_me: WARNING: gmp.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: gmp.h: proceeding with the preprocessor's result" >&5 -+$as_echo "$as_me: WARNING: gmp.h: proceeding with the preprocessor's result" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: gmp.h: in the future, the compiler will take precedence" >&5 -+$as_echo "$as_me: WARNING: gmp.h: in the future, the compiler will take precedence" >&2;} -+ -+ ;; -+esac -+{ $as_echo "$as_me:$LINENO: checking for gmp.h" >&5 -+$as_echo_n "checking for gmp.h... " >&6; } -+if test "${ac_cv_header_gmp_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- ac_save_LIBS="$LIBS" -+ ac_cv_header_gmp_h=$ac_header_preproc -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gmp_h" >&5 -+$as_echo "$ac_cv_header_gmp_h" >&6; } -+ -+fi -+if test "x$ac_cv_header_gmp_h" = x""yes; then -+ { $as_echo "$as_me:$LINENO: checking for __gmpz_init in -lgmp" >&5 -+$as_echo_n "checking for __gmpz_init in -lgmp... " >&6; } -+if test "${ac_cv_lib_gmp___gmpz_init+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS - LIBS="-lgmp $LIBS" --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - --int main() { --__gmpz_init() --; return 0; } --EOF --if { (eval echo configure:2043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char __gmpz_init (); -+int -+main () -+{ -+return __gmpz_init (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_gmp___gmpz_init=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_lib_gmp___gmpz_init=no - fi --rm -f conftest* --LIBS="$ac_save_LIBS" + AC_MSG_CHECKING(for word order) +-AC_TRY_RUN([int main () { ++AC_RUN_IFELSE([AC_LANG_PROGRAM([[]],[[ + /* Are we little or big endian? Adapted from Harbison&Steele. */ + union + { +@@ -1071,7 +1081,7 @@ AC_TRY_RUN([int main () { + } u; + u.d = 1.0; + return u.l[sizeof(double)/sizeof(int)-1] ? 0 : 1; +-}],AC_MSG_RESULT(little) ++]])],AC_MSG_RESULT(little) + AC_DEFINE(LITTLE_END), + AC_MSG_RESULT(big), + AC_MSG_RESULT([WARNING: ASSUMING LITTLE ENDIAN FOR CROSS COMPILING !!!] +@@ -1084,15 +1094,16 @@ AC_SUBST(LITTLE_END) -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS - fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- echo $ac_n "checking "for external gmp version"""... $ac_c" 1>&6 --echo "configure:2059: checking "for external gmp version"" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_init" >&5 -+$as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; } -+if test "x$ac_cv_lib_gmp___gmpz_init" = x""yes; then -+ { $as_echo "$as_me:$LINENO: checking for external gmp version" >&5 -+$as_echo_n "checking for external gmp version... " >&6; } - if test "$cross_compiling" = yes; then -- echo "Cannot use dynamic gmp lib" -+ { $as_echo "$as_me:$LINENO: result: Cannot use dynamic gmp lib" >&5 -+$as_echo "Cannot use dynamic gmp lib" >&6; } - else -- cat > conftest.$ac_ext < -- int main() { -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include -+ -+int -+main () -+{ -+ - #if __GNU_MP_VERSION == 4 - return 0; - #else - return -1; - #endif -- } --EOF --if { (eval echo configure:2075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - # MPFILES=$GMPDIR/mpn/mul_n.o - # PATCHED_SYMBOLS=__gmpn_toom3_mul_n -+ { $as_echo "$as_me:$LINENO: result: 4" >&5 -+$as_echo "4" >&6; } - MPFILES= - PATCHED_SYMBOLS= - if test "$use" = "m68k-linux" ; then -@@ -2087,38 +5342,42 @@ - MP_INCLUDE=`cpp foo.c | grep /gmp.h | head -n 1 | $AWK '{print $3}' | tr -d '"'` - rm -f foo.c - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo "Cannot use dynamic gmp lib" -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ $as_echo "$as_me:$LINENO: result: Cannot use dynamic gmp lib" >&5 -+$as_echo "Cannot use dynamic gmp lib" >&6; } - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi + AC_MSG_CHECKING([for sbrk]) + HAVE_SBRK="" +-AC_TRY_RUN([#include +- #include +- int main() { ++AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #include ++ #include ++ ]],[[ + FILE *f; + if (!(f=fopen("conftest1","w"))) + return -1; + fprintf(f,"%u",sbrk(0)); + return 0; +- }], ++ ]])], + HAVE_SBRK=1 + AC_MSG_RESULT(yes), + AC_MSG_RESULT([no: WARNING you must be able to emulate sbrk: as on mingw or macosx]), +@@ -1104,14 +1115,15 @@ if test "$HAVE_SBRK" = "1" ; then + # AC_MSG_RESULT(sys/personality.h not found)) -+ - else -- echo "$ac_t""no" 1>&6 --echo "Cannot use dynamic gmp lib" -+ echo "Cannot use dynamic gmp lib" - fi + AC_MSG_CHECKING([for ADDR_NO_RANDOMIZE constant]) +- AC_TRY_RUN([#include +- #include +- int main(int argc,char *argv[],char *envp[]) { ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #include ++ #include ++ ]],[[ + FILE *f; + if (!(f=fopen("conftest1","w"))) return -1; + fprintf(f,"%x",ADDR_NO_RANDOMIZE); + return 0; +- }], ++ ]])], + ADDR_NO_RANDOMIZE=`cat conftest1`,ADDR_NO_RANDOMIZE=0,ADDR_NO_RANDOMIZE=0) + if test "$ADDR_NO_RANDOMIZE" = "0" ; then + AC_MSG_RESULT([no, assuming 0x40000]) +@@ -1121,10 +1133,11 @@ if test "$HAVE_SBRK" = "1" ; then + fi - else -- echo "$ac_t""no" 1>&6 --echo "Cannot use dynamic gmp lib" -+ echo "Cannot use dynamic gmp lib" - fi + AC_MSG_CHECKING([for personality(ADDR_NO_RANDOMIZE) support]) +- AC_TRY_RUN([void gprof_cleanup() {}; ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++ void gprof_cleanup() {} + int main(int argc,char *argv[],char *envp[]) { + #include "h/unrandomize.h" +- return 0;}],CAN_UNRANDOMIZE_SBRK=1,CAN_UNRANDOMIZE_SBRK=0,CAN_UNRANDOMIZE_SBRK=0) ++ return 0;}]])],CAN_UNRANDOMIZE_SBRK=1,CAN_UNRANDOMIZE_SBRK=0,CAN_UNRANDOMIZE_SBRK=0) -+ - fi + if test "$CAN_UNRANDOMIZE_SBRK" != 0 ; then + AC_MSG_RESULT(yes) +@@ -1134,8 +1147,9 @@ if test "$HAVE_SBRK" = "1" ; then + fi - NEED_LOCAL_GMP='' --if test "$MP_INCLUDE" = "" ; then -+if test "$MP_INCLUDE" = "" ; then - NEED_LOCAL_GMP=1; - fi --if test "$PATCHED_SYMBOLS" != "" ; then -+if test "$PATCHED_SYMBOLS" != "" ; then - NEED_LOCAL_GMP=1; - fi + AC_MSG_CHECKING([that sbrk is (now) non-random]) +- AC_TRY_RUN([#include +- void gprof_cleanup() {}; ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++ #include ++ void gprof_cleanup() {} + int main(int argc,char * argv[],char * envp[]) { + FILE *f; + #ifdef CAN_UNRANDOMIZE_SBRK +@@ -1143,13 +1157,13 @@ if test "$HAVE_SBRK" = "1" ; then + #endif + if (!(f=fopen("conftest1","w"))) return -1; + fprintf(f,"%u",sbrk(0)); +- return 0;}],SBRK=`cat conftest1`,SBRK=0,SBRK=0) ++ return 0;}]])],SBRK=`cat conftest1`,SBRK=0,SBRK=0) + if test "$SBRK" = "0" ; then +- AC_MSG_RESULT(cannot trap sbrk) +- exit 1 ++ AC_MSG_ERROR([cannot trap sbrk], 1) + fi +- AC_TRY_RUN([#include +- void gprof_cleanup() {}; ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++ #include ++ void gprof_cleanup() {} + int main(int argc,char * argv[],char * envp[]) { + FILE *f; + #ifdef CAN_UNRANDOMIZE_SBRK +@@ -1157,10 +1171,9 @@ if test "$HAVE_SBRK" = "1" ; then + #endif + if (!(f=fopen("conftest1","w"))) return -1; + fprintf(f,"%u",sbrk(0)); +- return 0;}],SBRK1=`cat conftest1`,SBRK1=0,SBRK1=0) ++ return 0;}]])],SBRK1=`cat conftest1`,SBRK1=0,SBRK1=0) + if test "$SBRK1" = "0" ; then +- AC_MSG_RESULT(cannot trap sbrk) +- exit 1 ++ AC_MSG_ERROR([cannot trap sbrk], 1) + fi + if test "$SBRK" = "$SBRK1" ; then + AC_MSG_RESULT(yes) +@@ -1176,14 +1189,16 @@ fi --if test "$NEED_LOCAL_GMP" != "" ; then -+if test "$NEED_LOCAL_GMP" != "" ; then - -- echo $ac_n "checking use_gmp=yes, doing configure in gmp directory""... $ac_c" 1>&6 --echo "configure:2122: checking use_gmp=yes, doing configure in gmp directory" >&5 -+ { $as_echo "$as_me:$LINENO: checking use_gmp=yes, doing configure in gmp directory" >&5 -+$as_echo_n "checking use_gmp=yes, doing configure in gmp directory... " >&6; } - echo - echo "#" - echo "#" -@@ -2132,7 +5391,7 @@ - else - cd $GMPDIR && ./configure && cd .. - fi -- #MY_SUBDIRS="$MY_SUBDIRS $GMPDIR" -+ #MY_SUBDIRS="$MY_SUBDIRS $GMPDIR" - - echo "#" - echo "#" -@@ -2149,8 +5408,8 @@ + # pagewidth + AC_MSG_CHECKING(for pagewidth) +-AC_TRY_RUN([#include ++AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #include + #include +-int main() {size_t i=getpagesize(),j; ++ ]],[[ ++ size_t i=getpagesize(),j; + FILE *fp=fopen("conftest1","w"); + for (j=0;i>>=1;j++); + if (j<12) {printf("pagewidth %u is too small\n",j);return -1;} + fprintf(fp,"%u",j); +- return 0;}],PAGEWIDTH=`cat conftest1`,PAGEWIDTH=0,PAGEWIDTH=0) ++ return 0;]])],PAGEWIDTH=`cat conftest1`,PAGEWIDTH=0,PAGEWIDTH=0) + AC_MSG_RESULT($PAGEWIDTH) + AC_DEFINE_UNQUOTED(PAGEWIDTH,$PAGEWIDTH) + AC_SUBST(PAGEWIDTH) +@@ -1191,11 +1206,12 @@ AC_SUBST(PAGEWIDTH) - fi + old_LDFLAGS="$LDFLAGS" + LDFLAGS="$TLDFLAGS" +-AC_MSG_CHECKING("finding DBEGIN") +-AC_TRY_RUN([#include +- #include ++AC_MSG_CHECKING([finding DBEGIN]) ++AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++#include ++#include --echo $ac_n "checking "for leading underscore in object symbols"""... $ac_c" 1>&6 --echo "configure:2154: checking "for leading underscore in object symbols"" >&5 -+{ $as_echo "$as_me:$LINENO: checking for leading underscore in object symbols" >&5 -+$as_echo_n "checking for leading underscore in object symbols... " >&6; } - cat>foo.c < - #include -@@ -2159,145 +5418,262 @@ - $CC -c foo.c -o foo.o - if nm foo.o |grep " U " | grep "_cos" >/dev/null || nm foo.o |grep " U " | grep " _getc" >/dev/null ; then - LEADING_UNDERSCORE=1 -- cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define LEADING_UNDERSCORE 1 --EOF -+_ACEOF +-void gprof_cleanup() {}; ++void gprof_cleanup() {} + int + main(int argc,char * argv[],char *envp[]) + { +@@ -1220,36 +1236,35 @@ main(int argc,char * argv[],char *envp[] + #endif + fclose(fp); + return 0; +-}],dbegin=`cat conftest1`,dbegin=0,dbegin=0) ++}]])],dbegin=`cat conftest1`,dbegin=0,dbegin=0) + AC_DEFINE_UNQUOTED(DBEGIN,$dbegin /* where data begins */) + AC_MSG_RESULT(got $dbegin) + LDFLAGS="$old_LDFLAGS" -- echo "$ac_t"""yes"" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else - LEADING_UNDERSCORE="" -- echo "$ac_t"""no"" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi --echo $ac_n "checking "for GNU ld option -Map"""... $ac_c" 1>&6 --echo "configure:2173: checking "for GNU ld option -Map"" >&5 -+{ $as_echo "$as_me:$LINENO: checking for GNU ld option -Map" >&5 -+$as_echo_n "checking for GNU ld option -Map... " >&6; } - touch map - $CC -o foo -Wl,-Map map foo.o >/dev/null 2>&1 - if test `cat map | wc -l` != "0" ; then -- echo "$ac_t"""yes"" 1>&6 -- cat >> confdefs.h <<\EOF -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_GNU_LD 1 --EOF -+_ACEOF - GNU_LD=1 - else -- echo "$ac_t"""no"" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - GNU_LD= - fi - rm -f foo.c foo.o foo map +-AC_MSG_CHECKING("finding CSTACK_ADDRESS") +-AC_TRY_RUN([#include +-main() +-{ ++AC_MSG_CHECKING([finding CSTACK_ADDRESS]) ++AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++#include ++]],[[ + char *b ; + FILE *fp = fopen("conftest1","w"); + fprintf(fp,"%ld",((long) &b)); + fclose(fp); + return 0; +-}],cstack_address=`cat conftest1`,cstack_address=0,cstack_address=0) ++]])],cstack_address=`cat conftest1`,cstack_address=0,cstack_address=0) + AC_DEFINE_UNQUOTED(CSTACK_ADDRESS,$cstack_address \ + ) + AC_MSG_RESULT(got $cstack_address) -- echo $ac_n "checking "for size of gmp limbs"""... $ac_c" 1>&6 --echo "configure:2190: checking "for size of gmp limbs"" >&5 -+ { $as_echo "$as_me:$LINENO: checking for size of gmp limbs" >&5 -+$as_echo_n "checking for size of gmp limbs... " >&6; } - if test "$cross_compiling" = yes; then - mpsize=0 - else -- cat > conftest.$ac_ext < -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include - #include "$MP_INCLUDE" -- int main() { -+ -+int -+main () -+{ -+ - FILE *fp=fopen("conftest1","w"); - fprintf(fp,"%u",sizeof(mp_limb_t)); - fclose(fp); - return 0; -- } --EOF --if { (eval echo configure:2206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - mpsize=`cat conftest1` - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- mpsize=0 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+mpsize=0 - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi -+ - if test "$mpsize" = "0" ; then -- echo "Cannot determine mpsize" -- exit 1 -+ { { $as_echo "$as_me:$LINENO: error: Cannot determine mpsize" >&5 -+$as_echo "$as_me: error: Cannot determine mpsize" >&2;} -+ { (exit 1); exit 1; }; } - fi -- cat >> confdefs.h <>confdefs.h <<_ACEOF - #define MP_LIMB_BYTES $mpsize --EOF -+_ACEOF -- echo "$ac_t""$mpsize" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: $mpsize" >&5 -+$as_echo "$mpsize" >&6; } +-AC_MSG_CHECKING("sizeof long long int") +-AC_TRY_RUN([#include +-main() +-{ ++AC_MSG_CHECKING([sizeof long long int]) ++AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++#include ++]],[[ + if (sizeof(long long int) == 2*sizeof(long)) return 0; + return 1; +-} +-],[AC_DEFINE(HAVE_LONG_LONG) ++]])],[AC_DEFINE(HAVE_LONG_LONG) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no), + AC_MSG_RESULT(no) +@@ -1366,39 +1381,39 @@ AC_CHECK_HEADERS(float.h,AC_DEFINE(HAVE_ + # test makes sense. CM + # + AC_MSG_CHECKING([for isnormal]) +-AC_RUN_IFELSE(AC_LANG_PROGRAM([[ ++AC_RUN_IFELSE([AC_LANG_PROGRAM([[ + #define _GNU_SOURCE + #include + ]],[[ + float f; + return isnormal(f) || !isnormal(f) ? 0 : 1; +- ]]), ++ ]])], + AC_DEFINE(HAVE_ISNORMAL,1,[Have isnormal function]) AC_MSG_RESULT(yes), + AC_MSG_CHECKING([for fpclass in ieeefp.h]) +- AC_RUN_IFELSE(AC_LANG_PROGRAM([[ ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ + #include + ]],[[ + float f; + return fpclass(f)>=FP_NZERO || fpclass(f)&6 --echo "configure:2229: checking "_SHORT_LIMB"" >&5 -+ { $as_echo "$as_me:$LINENO: checking _SHORT_LIMB" >&5 -+$as_echo_n "checking _SHORT_LIMB... " >&6; } - if test "$cross_compiling" = yes; then -- echo "$ac_t""no" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - else -- cat > conftest.$ac_ext < -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include - #include "$MP_INCLUDE" -- int main() { -+ -+int -+main () -+{ -+ - #ifdef _SHORT_LIMB - return 0; - #else - return 1; - #endif -- } --EOF --if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- cat >> confdefs.h <<\EOF -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ cat >>confdefs.h <<\_ACEOF - #define __SHORT_LIMB 1 --EOF -- echo "$ac_t""yes" 1>&6 -+_ACEOF -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo "$ac_t""no" 1>&6 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi + AC_MSG_CHECKING([for isfinite]) +-AC_RUN_IFELSE(AC_LANG_PROGRAM([[ ++AC_RUN_IFELSE([AC_LANG_PROGRAM([[ + #define _GNU_SOURCE + #include + ]],[[ + float f; + return isfinite(f) || !isfinite(f) ? 0 : 1; +- ]]),AC_DEFINE(HAVE_ISFINITE,1,[Have isfinite function]) AC_MSG_RESULT(yes), ++ ]])],AC_DEFINE(HAVE_ISFINITE,1,[Have isfinite function]) AC_MSG_RESULT(yes), + AC_MSG_CHECKING([for finite()]) +- AC_RUN_IFELSE(AC_LANG_PROGRAM([[ ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ + #include + #include + ]],[[ + float f; + return finite(f) || !finite(f) ? 0 : 1; +- ]]),AC_DEFINE(HAVE_FINITE,1,[Have finite function]) AC_MSG_RESULT(yes), ++ ]])],AC_DEFINE(HAVE_FINITE,1,[Have finite function]) AC_MSG_RESULT(yes), + AC_MSG_ERROR(no))) -- echo $ac_n "checking "_LONG_LONG_LIMB"""... $ac_c" 1>&6 --echo "configure:2262: checking "_LONG_LONG_LIMB"" >&5 -+ -+ { $as_echo "$as_me:$LINENO: checking _LONG_LONG_LIMB" >&5 -+$as_echo_n "checking _LONG_LONG_LIMB... " >&6; } - if test "$cross_compiling" = yes; then -- echo "$ac_t""no" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - else -- cat > conftest.$ac_ext < -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include - #include "$MP_INCLUDE" -- int main() { -+ -+int -+main () -+{ -+ - #ifdef _LONG_LONG_LIMB - return 0; - #else - return 1; - #endif -- } --EOF --if { (eval echo configure:2279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- cat >> confdefs.h <<\EOF -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ cat >>confdefs.h <<\_ACEOF - #define __LONG_LONG_LIMB 1 --EOF -- echo "$ac_t""yes" 1>&6 -+_ACEOF -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo "$ac_t""no" 1>&6 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi + #-------------------------------------------------------------------- +@@ -1418,7 +1433,6 @@ AC_RUN_IFELSE(AC_LANG_PROGRAM([[ + # To get around this problem, check for both libraries together + # if -lsocket doesn't work by itself. + #-------------------------------------------------------------------- +-AC_MSG_CHECKING([for sockets]) + tcl_checkBoth=0 + AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1) + if test "$tcl_checkSocket" = 1; then +@@ -1455,8 +1469,8 @@ fi + AC_SUBST(RL_OBJS) + AC_SUBST(RL_LIB) +-AC_MSG_CHECKING(For network code for nsocket.c) +-AC_TRY_LINK([ ++AC_MSG_CHECKING([for network code for nsocket.c]) ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include + #include + #include +@@ -1473,24 +1487,25 @@ AC_TRY_LINK([ + #include /* struct in_addr, struct sockaddr_in */ + #include /* inet_ntoa() */ + #include /* gethostbyname() */ +-],[ connect(0,(struct sockaddr *)0,0); ++]],[[connect(0,(struct sockaddr *)0,0); + gethostbyname("jil"); + socket(AF_INET, SOCK_STREAM, 0); +- ], ++ ]])], + [AC_DEFINE(HAVE_NSOCKET) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no)) -+ - GMP=1 -- cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define GMP 1 --EOF -+_ACEOF -+ -+ -- -- - echo > makedefsafter - echo "MPFILES=$MPFILES" >> makedefsafter - echo "PATCHED_SYMBOLS=$PATCHED_SYMBOLS" >> makedefsafter -@@ -2307,21 +5683,17 @@ +-AC_MSG_CHECKING(check for listen using fcntl) +-AC_TRY_COMPILE([#include ++AC_MSG_CHECKING([for listen using fcntl]) ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++#include + #include +-], +-[FILE *fp=fopen("configure.in","r"); ++]], ++[[FILE *fp=fopen("configure.in","r"); + int orig; + orig = fcntl(fileno(fp), F_GETFL); + if (! (orig & O_NONBLOCK )) return 0; +-], ++]])], + [AC_DEFINE(LISTEN_USE_FCNTL) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no)) +@@ -1511,7 +1526,7 @@ AC_CHECK_FUNC(_cleanup, [AC_DEFINE(USE_C + AC_SUBST(USE_CLEANUP) + gcl_ok=no - # - # X windows --# -+# +-AC_HEADER_EGREP(LITTLE_ENDIAN, ctype.h, gcl_ok=yes, gcl_ok=noo) ++AC_EGREP_HEADER(LITTLE_ENDIAN, ctype.h, gcl_ok=yes, gcl_ok=no) + if test $gcl_ok = yes ; then + AC_DEFINE(ENDIAN_ALREADY_DEFINED) + fi +@@ -1543,32 +1558,32 @@ case $system in + esac --if test "$enable_xgcl" = "yes" ; then -+if test "$enable_xgcl" = "yes" ; then -- # If we find X, set shell vars x_includes and x_libraries to the --# paths, otherwise set no_x=yes. --# Uses ac_ vars as temps to allow command line to override cache and checks. --# --without-x overrides everything else, but does not touch the cache. --echo $ac_n "checking for X""... $ac_c" 1>&6 --echo "configure:2320: checking for X" >&5 -+ { $as_echo "$as_me:$LINENO: checking for X" >&5 -+$as_echo_n "checking for X... " >&6; } +-AC_MSG_CHECKING(check for SV_ONSTACK) +-AC_TRY_COMPILE([#include +-int joe=SV_ONSTACK; +-], +-[], ++AC_MSG_CHECKING([for SV_ONSTACK]) ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++#include ++]], ++[[return SV_ONSTACK;]])], + [AC_DEFINE(HAVE_SV_ONSTACK) + AC_SUBST(HAVE_SV_ONSTACK) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no)) --# Check whether --with-x or --without-x was given. -+ -+# Check whether --with-x was given. - if test "${with_x+set}" = set; then -- withval="$with_x" -- : -+ withval=$with_x; - fi +-AC_MSG_CHECKING(check for SIGSYS) +-AC_TRY_COMPILE([#include +-int joe=SIGSYS; +-], +-[], ++AC_MSG_CHECKING([for SIGSYS]) ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++#include ++]], ++[[return SIGSYS;]])], + [AC_DEFINE(HAVE_SIGSYS) + AC_SUBST(HAVE_SIGSYS) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no)) - # $have_x is `yes', `no', `disabled', or empty when we do not yet know. -@@ -2329,220 +5701,234 @@ - # The user explicitly disabled X. - have_x=disabled - else -- if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then -- # Both variables are already set. -- have_x=yes -- else --if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ case $x_includes,$x_libraries in #( -+ *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5 -+$as_echo "$as_me: error: cannot use X directory names containing '" >&2;} -+ { (exit 1); exit 1; }; };; #( -+ *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else - # One or both of the vars are not set, and there is no cached value. --ac_x_includes=NO ac_x_libraries=NO --rm -fr conftestdir --if mkdir conftestdir; then -- cd conftestdir -- # Make sure to not put "make" in the Imakefile rules, since we grep it out. -- cat > Imakefile <<'EOF' --acfindx: -- @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' --EOF -- if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then -+ac_x_includes=no ac_x_libraries=no -+rm -f -r conftest.dir -+if mkdir conftest.dir; then -+ cd conftest.dir -+ cat >Imakefile <<'_ACEOF' -+incroot: -+ @echo incroot='${INCROOT}' -+usrlibdir: -+ @echo usrlibdir='${USRLIBDIR}' -+libdir: -+ @echo libdir='${LIBDIR}' -+_ACEOF -+ if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -- eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` -+ for ac_var in incroot usrlibdir libdir; do -+ eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" -+ done - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. -- for ac_extension in a so sl; do -- if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && -- test -f $ac_im_libdir/libX11.$ac_extension; then -- ac_im_usrlibdir=$ac_im_libdir; break -+ for ac_extension in a so sl dylib la dll; do -+ if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && -+ test -f "$ac_im_libdir/libX11.$ac_extension"; then -+ ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. -- case "$ac_im_incroot" in -- /usr/include) ;; -- *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; -+ case $ac_im_incroot in -+ /usr/include) ac_x_includes= ;; -+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; - esac -- case "$ac_im_usrlibdir" in -- /usr/lib | /lib) ;; -- *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; -+ case $ac_im_usrlibdir in -+ /usr/lib | /usr/lib64 | /lib | /lib64) ;; -+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; - esac - fi - cd .. -- rm -fr conftestdir -+ rm -f -r conftest.dir - fi --if test "$ac_x_includes" = NO; then -- # Guess where to find include files, by looking for this one X11 .h file. -- test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h -+# Standard set of common directories for X headers. -+# Check X11 before X11Rn because it is often a symlink to the current release. -+ac_x_header_dirs=' -+/usr/X11/include -+/usr/X11R6/include -+/usr/X11R5/include -+/usr/X11R4/include - -+/usr/include/X11 -+/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 -+/usr/local/include/X11R4 -+ -+/usr/X386/include -+/usr/x386/include -+/usr/XFree86/include/X11 -+ -+/usr/include -+/usr/local/include -+/usr/unsupported/include -+/usr/athena/include -+/usr/local/x11r5/include -+/usr/lpp/Xamples/include -+ -+/usr/openwin/include -+/usr/openwin/share/include' -+ -+if test "$ac_x_includes" = no; then -+ # Guess where to find include files, by looking for Xlib.h. - # First, try using that file with no special directory specified. --cat > conftest.$ac_ext < --EOF --ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:2387: \"$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* -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+_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 - # We can compile using X headers with no special include directory. - ac_x_includes= - else -- echo "$ac_err" >&5 -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- # Look for the header file in a standard set of common directories. --# Check X11 before X11Rn because it is often a symlink to the current release. -- for ac_dir in \ -- /usr/X11/include \ -- /usr/X11R6/include \ -- /usr/X11R5/include \ -- /usr/X11R4/include \ -- \ -- /usr/include/X11 \ -- /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 \ -- /usr/local/include/X11R4 \ -- \ -- /usr/X386/include \ -- /usr/x386/include \ -- /usr/XFree86/include/X11 \ -- \ -- /usr/include \ -- /usr/local/include \ -- /usr/unsupported/include \ -- /usr/athena/include \ -- /usr/local/x11r5/include \ -- /usr/lpp/Xamples/include \ -- \ -- /usr/openwin/include \ -- /usr/openwin/share/include \ -- ; \ -- do -- if test -r "$ac_dir/$x_direct_test_include"; then -- ac_x_includes=$ac_dir -- break -- fi -- done --fi --rm -f conftest* --fi # $ac_x_includes = NO -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - --if test "$ac_x_libraries" = NO; then -- # Check for the libraries. -+ for ac_dir in $ac_x_header_dirs; do -+ if test -r "$ac_dir/X11/Xlib.h"; then -+ ac_x_includes=$ac_dir -+ break -+ fi -+done -+fi +-AC_MSG_CHECKING(check for SIGEMT) +-AC_TRY_COMPILE([#include +-int joe=SIGEMT; +-], +-[], ++AC_MSG_CHECKING([for SIGEMT]) ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++#include ++]], ++[[return SIGEMT;]])], + [AC_DEFINE(HAVE_SIGEMT) + AC_SUBST(HAVE_SIGEMT) + AC_MSG_RESULT(yes)], +@@ -1580,12 +1595,13 @@ AC_MSG_RESULT(no)) + #if test $use = "386-linux" ; then + AC_CHECK_HEADERS(asm/sigcontext.h) + AC_CHECK_HEADERS(asm/signal.h) +- AC_MSG_CHECKING([for sigcontext...]) +- AC_TRY_COMPILE([#include +- ], +- [ ++ AC_MSG_CHECKING([for sigcontext]) ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++ #include ++ ]], ++ [[ + struct sigcontext foo; +- ], ++ ]])], + [ + sigcontext_works=1; + AC_DEFINE(SIGNAL_H_HAS_SIGCONTEXT) +@@ -1596,18 +1612,19 @@ AC_MSG_RESULT(no)) + AC_MSG_RESULT(sigcontext NOT in signal.h)] + ) + if test "$sigcontext_works" = 0 ; then +- AC_MSG_CHECKING([for sigcontext...]) +- AC_TRY_COMPILE([#include ++ AC_MSG_CHECKING([for sigcontext]) ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++ #include + #ifdef HAVE_ASM_SIGCONTEXT_H + #include + #endif + #ifdef HAVE_ASM_SIGNAL_H + #include + #endif +- ], +- [ ++ ]], ++ [[ + struct sigcontext foo; +- ], ++ ]])], + [ + AC_DEFINE(HAVE_SIGCONTEXT) + AC_MSG_RESULT(sigcontext in asm files) +@@ -1717,6 +1734,8 @@ AC_SUBST(INFO_DIR) -- test -z "$x_direct_test_library" && x_direct_test_library=Xt -- test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc -+rm -f conftest.err conftest.$ac_ext -+fi # $ac_x_includes = no - -+if test "$ac_x_libraries" = no; then -+ # Check for the libraries. - # See if we find them without any special options. - # Don't add to $LIBS permanently. -- ac_save_LIBS="$LIBS" -- LIBS="-l$x_direct_test_library $LIBS" --cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- LIBS="$ac_save_LIBS" -+ ac_save_LIBS=$LIBS -+ LIBS="-lX11 $LIBS" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+XrmInitialize () -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ LIBS=$ac_save_LIBS - # We can link X programs with no special library path. - ac_x_libraries= - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- LIBS="$ac_save_LIBS" --# First see if replacing the include by lib works. --# Check X11 before X11Rn because it is often a symlink to the current release. --for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ -- /usr/X11/lib \ -- /usr/X11R6/lib \ -- /usr/X11R5/lib \ -- /usr/X11R4/lib \ -- \ -- /usr/lib/X11 \ -- /usr/lib/X11R6 \ -- /usr/lib/X11R5 \ -- /usr/lib/X11R4 \ -- \ -- /usr/local/X11/lib \ -- /usr/local/X11R6/lib \ -- /usr/local/X11R5/lib \ -- /usr/local/X11R4/lib \ -- \ -- /usr/local/lib/X11 \ -- /usr/local/lib/X11R6 \ -- /usr/local/lib/X11R5 \ -- /usr/local/lib/X11R4 \ -- \ -- /usr/X386/lib \ -- /usr/x386/lib \ -- /usr/XFree86/lib/X11 \ -- \ -- /usr/lib \ -- /usr/local/lib \ -- /usr/unsupported/lib \ -- /usr/athena/lib \ -- /usr/local/x11r5/lib \ -- /usr/lpp/Xamples/lib \ -- /lib/usr/lib/X11 \ -- \ -- /usr/openwin/lib \ -- /usr/openwin/share/lib \ -- ; \ -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ LIBS=$ac_save_LIBS -+for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` - do -- for ac_extension in a so sl; do -- if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then -+ # Don't even attempt the hair of trying to link an X program! -+ for ac_extension in a so sl dylib la dll; do -+ if test -r "$ac_dir/libX11.$ac_extension"; then - ac_x_libraries=$ac_dir - break 2 - fi - done - done - fi --rm -f conftest* --fi # $ac_x_libraries = NO + if test "$enable_tcltk" = "yes" ; then --if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then -- # Didn't find X anywhere. Cache the known absence of X. -- ac_cv_have_x="have_x=no" --else -- # Record where we found X for the cache. -- ac_cv_have_x="have_x=yes \ -- ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" --fi -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi # $ac_x_libraries = no -+ -+case $ac_x_includes,$ac_x_libraries in #( -+ no,* | *,no | *\'*) -+ # Didn't find X, or a directory has "'" in its name. -+ ac_cv_have_x="have_x=no";; #( -+ *) -+ # Record where we found X for the cache. -+ ac_cv_have_x="have_x=yes\ -+ ac_x_includes='$ac_x_includes'\ -+ ac_x_libraries='$ac_x_libraries'" -+esac - fi -- fi -+;; #( -+ *) have_x=yes;; -+ esac - eval "$ac_cv_have_x" - fi # $with_x != no - - if test "$have_x" != yes; then -- echo "$ac_t""$have_x" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: $have_x" >&5 -+$as_echo "$have_x" >&6; } - no_x=yes - else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. -- ac_cv_have_x="have_x=yes \ -- ac_x_includes=$x_includes ac_x_libraries=$x_libraries" -- echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 -+ ac_cv_have_x="have_x=yes\ -+ ac_x_includes='$x_includes'\ -+ ac_x_libraries='$x_libraries'" -+ { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 -+$as_echo "libraries $x_libraries, headers $x_includes" >&6; } - fi ++AC_CHECK_LIB(ieee,main,have_ieee=1,have_ieee=0) ++AC_CHECK_PROG(TCLSH,tclsh,tclsh,${TCLSH}) + AC_MSG_CHECKING([for tcl/tk]) - # AC_PATH_XTRA -@@ -2556,44 +5942,72 @@ - # AC_CHECK_LIB(Xt,main,X_LIBS="$X_LIBS",miss=1,$X_LIBS) - # AC_CHECK_LIB(Xext,main,X_LIBS="$X_LIBS",miss=1,$X_LIBS) - # AC_CHECK_LIB(Xaw,main,X_LIBS="$X_LIBS",miss=1,$X_LIBS)#until here -- echo $ac_n "checking for main in -lX11""... $ac_c" 1>&6 --echo "configure:2561: checking for main in -lX11" >&5 --ac_lib_var=`echo X11'_'main | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ { $as_echo "$as_me:$LINENO: checking for main in -lX11" >&5 -+$as_echo_n "checking for main in -lX11... " >&6; } -+if test "${ac_cv_lib_X11_main+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- ac_save_LIBS="$LIBS" -+ ac_check_lib_save_LIBS=$LIBS - LIBS="-lX11 $X_LIBS $LIBS" --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ --int main() { --main() --; return 0; } --EOF --if { (eval echo configure:2576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" -+ -+int -+main () -+{ -+return main (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_X11_main=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_lib_X11_main=no +@@ -1737,9 +1756,6 @@ if { [file exists [file join [set dir] t + EOF + #cp conftest.tcl foo.tcl + +-AC_CHECK_PROG(TCLSH,tclsh,tclsh,${TCLSH}) +-#AC_CHECK_PROG(TCLSH,tclsh8.0,tclsh8.0,${TCLSH}) +- + if test "${TCLSH}" = "" ; then true ; else + TCL_CONFIG_PREFIX=`${TCLSH} < conftest.tcl` fi --rm -f conftest* --LIBS="$ac_save_LIBS" +@@ -1813,7 +1829,6 @@ fi -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_X11_main" >&5 -+$as_echo "$ac_cv_lib_X11_main" >&6; } -+if test "x$ac_cv_lib_X11_main" = x""yes; then - X_LIBS="$X_LIBS -lX11" - else -- echo "$ac_t""no" 1>&6 --miss=1 -+ miss=1 + +-AC_CHECK_LIB(lieee,main,have_ieee=1,have_ieee=0) + if test "$have_ieee" = "0" ; then + TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" ` fi +@@ -1857,15 +1872,18 @@ AC_SUBST(NOTIFY) -- -+ - if test "$miss" = "1" ; then - X_CFLAGS= - X_LIBS= -@@ -2601,9 +6015,9 @@ - X_PRE_LIBS= - echo missing x libraries -- cannot compile xgcl - else -- cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_XGCL 1 --EOF -+_ACEOF + # the time handling for unixtime, add timezone - fi - fi -@@ -2618,259 +6032,572 @@ - - if test "$enable_dlopen" = "yes" ; then - -- echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 --echo "configure:2623: checking for dlopen in -ldl" >&5 --ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -+$as_echo_n "checking for dlopen in -ldl... " >&6; } -+if test "${ac_cv_lib_dl_dlopen+set}" = set; then -+ $as_echo_n "(cached) " >&6 +-AC_MSG_CHECKING([alloca]) +-AC_TRY_RUN([int main() { exit(alloca(500) != NULL ? 0 : 1);}], ++# alloca ++ ++AC_MSG_CHECKING([for alloca]) ++AC_RUN_IFELSE([AC_LANG_PROGRAM([],[[exit(alloca(500) != NULL ? 0 : 1);]])] + ,gcl_ok=yes, gcl_ok=no,gcl_ok=no) + if test $gcl_ok = yes ; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ALLOCA) else -- ac_save_LIBS="$LIBS" -+ ac_check_lib_save_LIBS=$LIBS - LIBS="-ldl $LIBS" --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ +- AC_TRY_RUN([#include +- int main() { exit(alloca(500) != NULL ? 0 : 1);}], ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ #include ++ ]],[[exit(alloca(500) != NULL ? 0 : 1);]])] + ,gcl_ok=yes, gcl_ok=no,gcl_ok=no) + if test $gcl_ok = yes ; then + AC_MSG_RESULT(yes) +@@ -1884,8 +1902,6 @@ if test $gcl_ok = no ; then AC_MSG_R --int main() { --dlopen() --; return 0; } --EOF --if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char dlopen (); -+int -+main () -+{ -+return dlopen (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_dl_dlopen=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_lib_dl_dlopen=no - fi --rm -f conftest* --LIBS="$ac_save_LIBS" -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS - fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -+$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then - have_dl=1 - else -- echo "$ac_t""no" 1>&6 --have_dl=0 -+ have_dl=0 - fi - if test "$have_dl" = "0" ; then -- echo "Cannot find dlopen in -dl" -- exit 1 -+ { { $as_echo "$as_me:$LINENO: error: Cannot find dlopen in -dl" >&5 -+$as_echo "$as_me: error: Cannot find dlopen in -dl" >&2;} -+ { (exit 1); exit 1; }; } - fi +-# alloca +- + # dlopen etc + # idea make it so you do something dlopen(libX.so,RTLD_GLOBAL) + # then dlload("foo.o") a lisp file can refer to things in libX.so +@@ -1909,7 +1925,7 @@ if test $gcl_ok = no ; then AC_MSG_R - TLIBS="$TLIBS -ldl -rdynamic" -- cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define USE_DLOPEN 1 --EOF -+_ACEOF + # redhat/cygnus released for some reason a buggy version of gcc, + # which no one else released. Catch that here. +-AC_MSG_CHECKING([Checking for buggy gcc version from redhat]) ++AC_MSG_CHECKING([for buggy gcc version from redhat]) + if 2>&1 $CC -v | fgrep "gcc version 2.96" > /dev/null + then + BROKEN_O4_OPT=1 +@@ -1944,7 +1960,8 @@ AC_SUBST(GNU_LD) + if test -f h/$use.defs ; then - fi + AC_SUBST(use) +- AC_OUTPUT(makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp ) ++ AC_CONFIG_FILES(makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp) ++ AC_OUTPUT + echo makedefc + cat makedefc - if test "$enable_statsysbfd" = "yes" || test "$enable_dynsysbfd" = "yes" ; then -- ac_safe=`echo "bfd.h" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for bfd.h""... $ac_c" 1>&6 --echo "configure:2678: checking for bfd.h" >&5 --if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ if test "${ac_cv_header_bfd_h+set}" = set; then -+ { $as_echo "$as_me:$LINENO: checking for bfd.h" >&5 -+$as_echo_n "checking for bfd.h... " >&6; } -+if test "${ac_cv_header_bfd_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_bfd_h" >&5 -+$as_echo "$ac_cv_header_bfd_h" >&6; } - else -- cat > conftest.$ac_ext <&5 -+$as_echo_n "checking bfd.h 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 --EOF --ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" --{ (eval echo configure:2688: \"$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" -+_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; } -+ -+# Is the header present? -+{ $as_echo "$as_me:$LINENO: checking bfd.h presence" >&5 -+$as_echo_n "checking bfd.h 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 -+_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 -- echo $ac_n "checking for bfd_init in -lbfd""... $ac_c" 1>&6 --echo "configure:2705: checking for bfd_init in -lbfd" >&5 --ac_lib_var=`echo bfd'_'bfd_init | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ -+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: bfd.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+$as_echo "$as_me: WARNING: bfd.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: bfd.h: proceeding with the compiler's result" >&5 -+$as_echo "$as_me: WARNING: bfd.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { $as_echo "$as_me:$LINENO: WARNING: bfd.h: present but cannot be compiled" >&5 -+$as_echo "$as_me: WARNING: bfd.h: present but cannot be compiled" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: bfd.h: check for missing prerequisite headers?" >&5 -+$as_echo "$as_me: WARNING: bfd.h: check for missing prerequisite headers?" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: bfd.h: see the Autoconf documentation" >&5 -+$as_echo "$as_me: WARNING: bfd.h: see the Autoconf documentation" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: bfd.h: section \"Present But Cannot Be Compiled\"" >&5 -+$as_echo "$as_me: WARNING: bfd.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: bfd.h: proceeding with the preprocessor's result" >&5 -+$as_echo "$as_me: WARNING: bfd.h: proceeding with the preprocessor's result" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: bfd.h: in the future, the compiler will take precedence" >&5 -+$as_echo "$as_me: WARNING: bfd.h: in the future, the compiler will take precedence" >&2;} +--- install.sh.orig 1999-12-06 15:43:54.000000000 -0700 ++++ install.sh 2010-12-30 13:25:31.943226677 -0700 +@@ -1,19 +1,38 @@ +-#! /bin/sh +-# ++#!/bin/sh + # install - install a program, script, or datafile +-# This comes from X11R5 (mit/util/scripts/install.sh). + -+ ;; -+esac -+{ $as_echo "$as_me:$LINENO: checking for bfd.h" >&5 -+$as_echo_n "checking for bfd.h... " >&6; } -+if test "${ac_cv_header_bfd_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- ac_save_LIBS="$LIBS" -+ ac_cv_header_bfd_h=$ac_header_preproc -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_bfd_h" >&5 -+$as_echo "$ac_cv_header_bfd_h" >&6; } ++scriptversion=2009-04-28.21; # UTC + -+fi -+if test "x$ac_cv_header_bfd_h" = x""yes; then -+ { $as_echo "$as_me:$LINENO: checking for bfd_init in -lbfd" >&5 -+$as_echo_n "checking for bfd_init in -lbfd... " >&6; } -+if test "${ac_cv_lib_bfd_bfd_init+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS - LIBS="-lbfd -liberty $LIBS" --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - --int main() { --bfd_init() --; return 0; } --EOF --if { (eval echo configure:2724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char bfd_init (); -+int -+main () -+{ -+return bfd_init (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_bfd_bfd_init=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_lib_bfd_bfd_init=no - fi --rm -f conftest* --LIBS="$ac_save_LIBS" - -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS - fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bfd_bfd_init" >&5 -+$as_echo "$ac_cv_lib_bfd_bfd_init" >&6; } -+if test "x$ac_cv_lib_bfd_bfd_init" = x""yes; then - # - # Old binutils appear to need CONST defined to const - # -- echo $ac_n "checking if need to define CONST for bfd""... $ac_c" 1>&6 --echo "configure:2743: checking if need to define CONST for bfd" >&5 -+ { $as_echo "$as_me:$LINENO: checking if need to define CONST for bfd" >&5 -+$as_echo_n "checking if need to define CONST for bfd... " >&6; } - if test "$cross_compiling" = yes; then -- { echo "configure: error: cannot use bfd" 1>&2; exit 1; } -+ { { $as_echo "$as_me:$LINENO: error: cannot use bfd" >&5 -+$as_echo "$as_me: error: cannot use bfd" >&2;} -+ { (exit 1); exit 1; }; } - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #define IN_GCC - #include -- int main() { symbol_info t; return 0;} --EOF --if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- echo "$ac_t""no" 1>&6 -+ -+int -+main () -+{ -+symbol_info t; return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- if test "$cross_compiling" = yes; then -- { echo "configure: error: cannot use bfd" 1>&2; exit 1; } -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+if test "$cross_compiling" = yes; then -+ { { $as_echo "$as_me:$LINENO: error: cannot use bfd" >&5 -+$as_echo "$as_me: error: cannot use bfd" >&2;} -+ { (exit 1); exit 1; }; } - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #define CONST const -+ #define IN_GCC - #include -- int main() {symbol_info t; return 0;} --EOF --if { (eval echo configure:2772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- echo "$ac_t""yes" 1>&6 -- cat >> confdefs.h <<\EOF -+ -+int -+main () -+{ -+symbol_info t; return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } -+ cat >>confdefs.h <<\_ACEOF - #define NEED_CONST 1 --EOF -+_ACEOF - - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- { echo "configure: error: cannot use bfd" 1>&2; exit 1; } -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ { $as_echo "$as_me:$LINENO: error: cannot use bfd" >&5 -+$as_echo "$as_me: error: cannot use bfd" >&2;} -+ { (exit 1); exit 1; }; } - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - -+ - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi ++# This originates from X11R5 (mit/util/scripts/install.sh), which was ++# later released in X11R6 (xc/config/util/install.sh) with the ++# following copyright and license. + # +-# Copyright 1991 by the Massachusetts Institute of Technology ++# Copyright (C) 1994 X Consortium + # +-# Permission to use, copy, modify, distribute, and sell this software and its +-# documentation for any purpose is hereby granted without fee, provided that +-# the above copyright notice appear in all copies and that both that +-# copyright notice and this permission notice appear in supporting +-# documentation, and that the name of M.I.T. not be used in advertising or +-# publicity pertaining to distribution of the software without specific, +-# written prior permission. M.I.T. makes no representations about the +-# suitability of this software for any purpose. It is provided "as is" +-# without express or implied warranty. ++# Permission is hereby granted, free of charge, to any person obtaining a copy ++# of this software and associated documentation files (the "Software"), to ++# deal in the Software without restriction, including without limitation the ++# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or ++# sell copies of the Software, and to permit persons to whom the Software is ++# furnished to do so, subject to the following conditions: ++# ++# The above copyright notice and this permission notice shall be included in ++# all copies or substantial portions of the Software. ++# ++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- ++# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++# ++# Except as contained in this notice, the name of the X Consortium shall not ++# be used in advertising or otherwise to promote the sale, use or other deal- ++# ings in this Software without prior written authorization from the X Consor- ++# tium. ++# ++# ++# FSF changes to this file are in the public domain. + # + # 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,481 @@ + # + # This script is compatible with the BSD install script, but was written + # from scratch. +-# -- --else -- echo "$ac_t""no" 1>&6 -+ -+ - fi ++nl=' ++' ++IFS=" "" $nl" --else -- echo "$ac_t""no" 1>&6 - fi + # set DOITPROG to echo to test this script + # Don't use :- since 4.3BSD and earlier shells don't like it. +-doit="${DOITPROG-}" ++doit=${DOITPROG-} ++if test -z "$doit"; then ++ doit_exec=exec ++else ++ doit_exec=$doit ++fi -- cat >> confdefs.h <<\EOF -+ -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_LIBBFD 1 --EOF -+_ACEOF ++# Put in absolute file names if you don't have them in your path; ++# or use environment vars. +-# put in absolute paths if you don't have them in your path; or use env. vars. ++chgrpprog=${CHGRPPROG-chgrp} ++chmodprog=${CHMODPROG-chmod} ++chownprog=${CHOWNPROG-chown} ++cmpprog=${CMPPROG-cmp} ++cpprog=${CPPROG-cp} ++mkdirprog=${MKDIRPROG-mkdir} ++mvprog=${MVPROG-mv} ++rmprog=${RMPROG-rm} ++stripprog=${STRIPPROG-strip} - # - # BFD boolean syntax - # +-mvprog="${MVPROG-mv}" +-cpprog="${CPPROG-cp}" +-chmodprog="${CHMODPROG-chmod}" +-chownprog="${CHOWNPROG-chown}" +-chgrpprog="${CHGRPPROG-chgrp}" +-stripprog="${STRIPPROG-strip}" +-rmprog="${RMPROG-rm}" +-mkdirprog="${MKDIRPROG-mkdir}" ++posix_glob='?' ++initialize_posix_glob=' ++ test "$posix_glob" != "?" || { ++ if (set -f) 2>/dev/null; then ++ posix_glob= ++ else ++ posix_glob=: ++ fi ++ } ++' -- echo $ac_n "checking for useable bfd_boolean""... $ac_c" 1>&6 --echo "configure:2812: checking for useable bfd_boolean" >&5 -+ { $as_echo "$as_me:$LINENO: checking for usable bfd_boolean" >&5 -+$as_echo_n "checking for usable bfd_boolean... " >&6; } - if test "$cross_compiling" = yes; then -- echo "$ac_t""no" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ +-transformbasename="" +-transform_arg="" +-instcmd="$mvprog" +-chmodcmd="$chmodprog 0755" +-chowncmd="" +-chgrpcmd="" +-stripcmd="" ++posix_mkdir= + -+ #define IN_GCC - #include - bfd_boolean foo() {return FALSE;} -- int main() {return 0;} --EOF --if { (eval echo configure:2824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- echo "$ac_t""yes" 1>&6 -- cat >> confdefs.h <<\EOF ++# Desired mode of installed file. ++mode=0755 + -+int -+main () -+{ -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_BFD_BOOLEAN 1 --EOF -+_ACEOF ++chgrpcmd= ++chmodcmd=$chmodprog ++chowncmd= ++mvcmd=$mvprog + rmcmd="$rmprog -f" +-mvcmd="$mvprog" +-src="" +-dst="" +-dir_arg="" ++stripcmd= - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo "$ac_t""no" 1>&6 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi +-while [ x"$1" != x ]; do +- case $1 in +- -c) instcmd="$cpprog" +- shift +- continue;; ++src= ++dst= ++dir_arg= ++dst_arg= +- -d) dir_arg=true +- shift +- continue;; ++copy_on_change=false ++no_target_directory= +- -m) chmodcmd="$chmodprog $2" +- shift +- shift +- continue;; ++usage="\ ++Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE ++ or: $0 [OPTION]... SRCFILES... DIRECTORY ++ or: $0 [OPTION]... -t DIRECTORY SRCFILES... ++ or: $0 [OPTION]... -d DIRECTORIES... -+ - # - # bfd_link_info.output_bfd minimal configure change check - # +- -o) chowncmd="$chownprog $2" +- shift +- shift +- continue;; ++In the 1st form, copy SRCFILE to DSTFILE. ++In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. ++In the 4th, create DIRECTORIES. -- echo $ac_n "checking for bfd_link_info.output_bfd""... $ac_c" 1>&6 --echo "configure:2847: checking for bfd_link_info.output_bfd" >&5 -+ { $as_echo "$as_me:$LINENO: checking for bfd_link_info.output_bfd" >&5 -+$as_echo_n "checking for bfd_link_info.output_bfd... " >&6; } - if test "$cross_compiling" = yes; then -- echo "$ac_t""no" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - else -- cat > conftest.$ac_ext < -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include - #include -- int main() {struct bfd_link_info i;i.output_bfd=0;return 0;} --EOF --if { (eval echo configure:2858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- echo "$ac_t""yes" 1>&6 -- cat >> confdefs.h <<\EOF -+ -+int -+main () -+{ -+struct bfd_link_info i;i.output_bfd=0;return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_OUTPUT_BFD 1 --EOF -+_ACEOF - - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo "$ac_t""no" 1>&6 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - - -+ - # - # FIXME: Need to workaround mingw before this point -- CM - # -@@ -2883,99 +6610,163 @@ - else - echo Guessing path to libbfd.a due to gcc bug - LIBBFD="/usr/lib/libbfd.a" -- fi -+ fi - if echo $MP | tr ' ' '\012' | grep -q libiberty.a ; then - LIBIBERTY="`echo $MP | tr ' ' '\012' | grep libiberty.a | $AWK '{i=split($1,A,"/");for (j=1;j<=i;j++) if (j>1 && A[j]=="..") {j--;i-=2;for (k=j;k<=i;k++) A[k]=A[k+2];j--;}} END {for (j=1;j<=i;j++) printf("%s%s",A[j],j!=i ? "/" : "")}'`" - else - echo Guessing path to libiberty.a due to gcc bug - LIBIBERTY="/usr/lib/libiberty.a" -- fi -+ fi - BUILD_BFD=copy_bfd -- echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 --echo "configure:2896: checking for inflate in -lz" >&5 --ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ { $as_echo "$as_me:$LINENO: checking for inflate in -lz" >&5 -+$as_echo_n "checking for inflate in -lz... " >&6; } -+if test "${ac_cv_lib_z_inflate+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- ac_save_LIBS="$LIBS" -+ ac_check_lib_save_LIBS=$LIBS - LIBS="-lz $LIBS" --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - --int main() { --inflate() --; return 0; } --EOF --if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char inflate (); -+int -+main () -+{ -+return inflate (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_z_inflate=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_lib_z_inflate=no - fi --rm -f conftest* --LIBS="$ac_save_LIBS" - -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS - fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5 -+$as_echo "$ac_cv_lib_z_inflate" >&6; } -+if test "x$ac_cv_lib_z_inflate" = x""yes; then - TLIBS="$TLIBS -lz" - else -- echo "$ac_t""no" 1>&6 --{ echo "configure: error: Need zlib for bfd linking" 1>&2; exit 1; } -+ { { $as_echo "$as_me:$LINENO: error: Need zlib for bfd linking" >&5 -+$as_echo "$as_me: error: Need zlib for bfd linking" >&2;} -+ { (exit 1); exit 1; }; } - fi +- -g) chgrpcmd="$chgrpprog $2" +- shift +- shift +- continue;; ++Options: ++ --help display this help and exit. ++ --version display version info and exit. -- echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6 --echo "configure:2937: checking for dlsym in -ldl" >&5 --ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ { $as_echo "$as_me:$LINENO: checking for dlsym in -ldl" >&5 -+$as_echo_n "checking for dlsym in -ldl... " >&6; } -+if test "${ac_cv_lib_dl_dlsym+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- ac_save_LIBS="$LIBS" -+ ac_check_lib_save_LIBS=$LIBS - LIBS="-ldl $LIBS" --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ +- -s) stripcmd="$stripprog" +- shift +- continue;; ++ -c (ignored) ++ -C install only if different (preserve the last data modification time) ++ -d create directories instead of installing files. ++ -g GROUP $chgrpprog installed files to GROUP. ++ -m MODE $chmodprog installed files to MODE. ++ -o USER $chownprog installed files to USER. ++ -s $stripprog installed files. ++ -t DIRECTORY install into DIRECTORY. ++ -T report an error if DSTFILE is a directory. --int main() { --dlsym() --; return 0; } --EOF --if { (eval echo configure:2956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char dlsym (); -+int -+main () -+{ -+return dlsym (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_dl_dlsym=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_lib_dl_dlsym=no - fi --rm -f conftest* --LIBS="$ac_save_LIBS" +- -t=*) transformarg=`echo $1 | sed 's/-t=//'` +- shift +- continue;; ++Environment variables override the default commands: ++ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG ++ RMPROG STRIPPROG ++" -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS - fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlsym" >&5 -+$as_echo "$ac_cv_lib_dl_dlsym" >&6; } -+if test "x$ac_cv_lib_dl_dlsym" = x""yes; then - TLIBS="$TLIBS -ldl" - else -- echo "$ac_t""no" 1>&6 --{ echo "configure: error: Need libdl for bfd linking" 1>&2; exit 1; } -+ { { $as_echo "$as_me:$LINENO: error: Need libdl for bfd linking" >&5 -+$as_echo "$as_me: error: Need libdl for bfd linking" >&2;} -+ { (exit 1); exit 1; }; } - fi +- -b=*) transformbasename=`echo $1 | sed 's/-b=//'` +- shift +- continue;; ++while test $# -ne 0; do ++ case $1 in ++ -c) ;; -- -- -- +- *) if [ x"$src" = x ] +- then +- src=$1 +- else +- # this colon is to work around a 386BSD /bin/sh bug +- : +- dst=$1 +- fi +- shift +- continue;; +- esac ++ -C) copy_on_change=true;; + ++ -d) dir_arg=true;; + ++ -g) chgrpcmd="$chgrpprog $2" ++ shift;; + - - else - TLIBS="$TLIBS -lbfd -liberty -ldl" -@@ -2989,7 +6780,7 @@ - # AC_CHECK_HEADER(libintl.h, true, - # AC_MSG_ERROR(libintl.h (gettext) not found)) - # AC_SEARCH_LIBS(dgettext, intl, true, AC_MSG_ERROR(gettext library not found)) -- -+ - echo "#" - echo "#" - echo "# -------------------------" -@@ -2997,7 +6788,7 @@ - echo "#" - echo "#" - cd binutils/intl && chmod +x configure && ./configure --disable-nls && cd ../.. --# MY_SUBDIRS="$MY_SUBDIRS binutils/libiberty " -+# MY_SUBDIRS="$MY_SUBDIRS binutils/libiberty " - echo "#" - echo "#" - echo "#" -@@ -3011,7 +6802,7 @@ - echo "#" - echo "#" - cd binutils/libiberty && chmod +x configure && ./configure --disable-nls && cd ../.. --# MY_SUBDIRS="$MY_SUBDIRS binutils/libiberty " -+# MY_SUBDIRS="$MY_SUBDIRS binutils/libiberty " - echo "#" - echo "#" - echo "#" -@@ -3025,7 +6816,7 @@ - echo "#" - echo "#" - cd binutils/bfd && chmod +x configure && ./configure --with-included-gettext --disable-nls && cd ../.. --# MY_SUBDIRS="$MY_SUBDIRS binutils/bfd " -+# MY_SUBDIRS="$MY_SUBDIRS binutils/bfd " - echo "#" - echo "#" - echo "#" -@@ -3033,12 +6824,12 @@ - echo "# ------------------------" - echo "#" - # TLIBS="$TLIBS `pwd`/binutils/bfd/libbfd.a `pwd`/binutils/libiberty/libiberty.a" -- cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_LIBBFD 1 --EOF -+_ACEOF - - BUILD_BFD="h/bfd.h h/bfdlink.h h/ansidecl.h h/symcat.h" -- ++ --help) echo "$usage"; exit $?;; + - fi - - #AC_CONFIG_SUBDIRS($MY_SUBDIRS) -@@ -3047,133 +6838,543 @@ - # mechanism, in the PAGE macro. This offset is subtracted from - # addresses, in calculating a page for an address in the heap. - --echo $ac_n "checking size of long""... $ac_c" 1>&6 --echo "configure:3052: checking size of long" >&5 --if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+# The cast to long int works around a bug in the HP C Compiler -+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -+# This bug is HP SR number 8606223364. -+{ $as_echo "$as_me:$LINENO: checking size of long" >&5 -+$as_echo_n "checking size of long... " >&6; } -+if test "${ac_cv_sizeof_long+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else - if test "$cross_compiling" = yes; then -- ac_cv_sizeof_long=0 -+ # Depending upon the size, compute the lo and hi bounds. -+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 -+int -+main () -+{ -+static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)]; -+test_array [0] = 0 ++ -m) mode=$2 ++ case $mode in ++ *' '* | *' '* | *' ++'* | *'*'* | *'?'* | *'['*) ++ echo "$0: invalid mode: $mode" >&2 ++ exit 1;; ++ esac ++ shift;; + -+ ; -+ return 0; -+} -+_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_lo=0 ac_mid=0 -+ while :; do -+ 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 -+int -+main () -+{ -+static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; -+test_array [0] = 0 ++ -o) chowncmd="$chownprog $2" ++ shift;; + -+ ; -+ return 0; -+} -+_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_hi=$ac_mid; break - else -- cat > conftest.$ac_ext < --#include --main() -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 ++ -s) stripcmd=$stripprog;; + -+ ac_lo=`expr $ac_mid + 1` -+ if test $ac_lo -le $ac_mid; then -+ ac_lo= ac_hi= -+ break -+ fi -+ ac_mid=`expr 2 '*' $ac_mid + 1` -+fi ++ -t) dst_arg=$2 ++ shift;; + -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ done -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 ++ -T) no_target_directory=true;; + -+ 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 -+int -+main () - { -- FILE *f=fopen("conftestval", "w"); -- if (!f) exit(1); -- fprintf(f, "%d\n", sizeof(long)); -- exit(0); -+static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)]; -+test_array [0] = 0 ++ --version) echo "$0 $scriptversion"; exit $?;; + -+ ; -+ return 0; - } --EOF --if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- ac_cv_sizeof_long=`cat conftestval` -+_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_hi=-1 ac_mid=-1 -+ while :; do -+ 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 -+int -+main () -+{ -+static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)]; -+test_array [0] = 0 ++ --) shift ++ break;; + -+ ; -+ return 0; -+} -+_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_lo=$ac_mid; break - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- ac_cv_sizeof_long=0 -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_hi=`expr '(' $ac_mid ')' - 1` -+ if test $ac_mid -le $ac_hi; then -+ ac_lo= ac_hi= -+ break -+ fi -+ ac_mid=`expr 2 '*' $ac_mid` - fi --rm -fr conftest* ++ -*) echo "$0: invalid option: $1" >&2 ++ exit 1;; + -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ *) break;; ++ esac ++ shift + done + +-if [ x"$src" = x ] +-then +- echo "install: no input file specified" +- exit 1 +-else +- true ++if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then ++ # When -d is used, all remaining arguments are directories to create. ++ # When -t is used, the destination is already specified. ++ # Otherwise, the last argument is the destination. Remove it from $@. ++ for arg ++ do ++ if test -n "$dst_arg"; then ++ # $@ is not empty: it contains at least $arg. ++ set fnord "$@" "$dst_arg" ++ shift # fnord ++ fi ++ shift # arg ++ dst_arg=$arg + done -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_lo= ac_hi= fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --echo "$ac_t""$ac_cv_sizeof_long" 1>&6 --cat >> confdefs.h <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; -+test_array [0] = 0 -+ -+ ; -+ return 0; -+} -+_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_hi=$ac_mid -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_lo=`expr '(' $ac_mid ')' + 1` -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+done -+case $ac_lo in -+?*) ac_cv_sizeof_long=$ac_lo;; -+'') if test "$ac_cv_type_long" = yes; then -+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: cannot compute sizeof (long) -+See \`config.log' for more details." >&2;} -+ { (exit 77); exit 77; }; }; } -+ else -+ ac_cv_sizeof_long=0 -+ fi ;; -+esac -+else -+ 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 -+static long int longval () { return (long int) (sizeof (long)); } -+static unsigned long int ulongval () { return (long int) (sizeof (long)); } -+#include -+#include -+int -+main () -+{ -+ -+ FILE *f = fopen ("conftest.val", "w"); -+ if (! f) -+ return 1; -+ if (((long int) (sizeof (long))) < 0) -+ { -+ long int i = longval (); -+ if (i != ((long int) (sizeof (long)))) -+ return 1; -+ fprintf (f, "%ld", i); -+ } -+ else -+ { -+ unsigned long int i = ulongval (); -+ if (i != ((long int) (sizeof (long)))) -+ return 1; -+ fprintf (f, "%lu", i); -+ } -+ /* Do not output a trailing newline, as this causes \r\n confusion -+ on some platforms. */ -+ return ferror (f) || fclose (f) != 0; -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_sizeof_long=`cat conftest.val` -+else -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+if test "$ac_cv_type_long" = yes; then -+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: cannot compute sizeof (long) -+See \`config.log' for more details." >&2;} -+ { (exit 77); exit 77; }; }; } -+ else -+ ac_cv_sizeof_long=0 -+ fi -+fi -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+rm -f conftest.val +-if [ x"$dir_arg" != x ]; then +- dst=$src +- src="" +- +- if [ -d $dst ]; then +- instcmd=: +- else +- instcmd=mkdir +- fi +-else +- +-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +-# might cause directories to be created, which would be especially bad +-# if $src (and thus $dsttmp) contains '*'. ++if test $# -eq 0; then ++ if test -z "$dir_arg"; then ++ echo "$0: no input file specified." >&2 ++ exit 1 ++ fi ++ # It's OK to call `install-sh -d' without argument. ++ # This can happen when creating conditional directories. ++ exit 0 +fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -+$as_echo "$ac_cv_sizeof_long" >&6; } -+ -+ -+ -+cat >>confdefs.h <<_ACEOF - #define SIZEOF_LONG $ac_cv_sizeof_long --EOF -+_ACEOF +- if [ -f $src -o -d $src ] +- then +- true +- else +- echo "install: $src does not exist" +- exit 1 +- fi +- +- if [ x"$dst" = x ] +- then +- echo "install: no destination specified" +- exit 1 +- else +- true +- fi ++if test -z "$dir_arg"; then ++ trap '(exit $?); exit' 1 2 13 15 --echo $ac_n "checking sizeof struct contblock""... $ac_c" 1>&6 --echo "configure:3092: checking sizeof struct contblock" >&5 -+{ $as_echo "$as_me:$LINENO: checking sizeof struct contblock" >&5 -+$as_echo_n "checking sizeof struct contblock... " >&6; } - - # work around MSYS pwd result incompatibility - if test "$use" = "mingw" ; then - if test "$cross_compiling" = yes; then -- echo Cannot find sizeof struct contblock;exit 1 -+ { { $as_echo "$as_me:$LINENO: error: Cannot find sizeof struct contblock" >&5 -+$as_echo "$as_me: error: Cannot find sizeof struct contblock" >&2;} -+ { (exit 1); exit 1; }; } - else -- cat > conftest.$ac_ext < -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include - #define EXTER - #include "$MP_INCLUDE" - #include "h/enum.h" - #include "h/object.h" -- int main(int argc,char **argv,char **envp) { -+ -+int -+main () -+{ -+ - FILE *f=fopen("conftest1","w"); - fprintf(f,"%u",sizeof(struct contblock)); - fclose(f); - return 0; -- } --EOF --if { (eval echo configure:3114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - sizeof_contblock=`cat conftest1` - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo Cannot find sizeof struct contblock;exit 1 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ { $as_echo "$as_me:$LINENO: error: Cannot find sizeof struct contblock" >&5 -+$as_echo "$as_me: error: Cannot find sizeof struct contblock" >&2;} -+ { (exit 1); exit 1; }; } - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - -+ - else - if test "$cross_compiling" = yes; then -- echo Cannot find sizeof struct contblock;exit 1 -+ { { $as_echo "$as_me:$LINENO: error: Cannot find sizeof struct contblock" >&5 -+$as_echo "$as_me: error: Cannot find sizeof struct contblock" >&2;} -+ { (exit 1); exit 1; }; } - else -- cat > conftest.$ac_ext < -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include - #define EXTER - #include "$MP_INCLUDE" - #include "`pwd`/h/enum.h" - #include "`pwd`/h/object.h" -- int main(int argc,char **argv,char **envp) { -+ -+int -+main () -+{ -+ - FILE *f=fopen("conftest1","w"); - fprintf(f,"%u",sizeof(struct contblock)); - fclose(f); - return 0; -- } --EOF --if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - sizeof_contblock=`cat conftest1` - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo Cannot find sizeof struct contblock;exit 1 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ { $as_echo "$as_me:$LINENO: error: Cannot find sizeof struct contblock" >&5 -+$as_echo "$as_me: error: Cannot find sizeof struct contblock" >&2;} -+ { (exit 1); exit 1; }; } - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi +-# If destination is a directory, append the input filename; if your system +-# does not like double slashes in filenames, you may need to add some logic ++ # Set umask so as not to create temps with too-generous modes. ++ # However, 'strip' requires both read and write access to temps. ++ case $mode in ++ # Optimize common cases. ++ *644) cp_umask=133;; ++ *755) cp_umask=22;; -+ +- if [ -d $dst ] +- then +- dst="$dst"/`basename $src` +- else +- true +- fi ++ *[0-7]) ++ if test -z "$stripcmd"; then ++ u_plus_rw= ++ else ++ u_plus_rw='% 200' ++ fi ++ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; ++ *) ++ if test -z "$stripcmd"; then ++ u_plus_rw= ++ else ++ u_plus_rw=,u+rw ++ fi ++ cp_umask=$mode$u_plus_rw;; ++ esac fi --echo "$ac_t""$sizeof_contblock" 1>&6 --cat >> confdefs.h <&5 -+$as_echo "$sizeof_contblock" >&6; } -+cat >>confdefs.h <<_ACEOF - #define SIZEOF_CONTBLOCK $sizeof_contblock --EOF -+_ACEOF - +-## this sed command emulates the dirname command +-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` ++for src ++do ++ # Protect names starting with `-'. ++ case $src in ++ -*) src=./$src;; ++ esac --echo $ac_n "checking for word order""... $ac_c" 1>&6 --echo "configure:3166: checking for word order" >&5 -+{ $as_echo "$as_me:$LINENO: checking for word order" >&5 -+$as_echo_n "checking for word order... " >&6; } - if test "$cross_compiling" = yes; then -- echo "$ac_t""WARNING: ASSUMING LITTLE ENDIAN FOR CROSS COMPILING !!! -- cat >> confdefs.h <<\EOF -+ { $as_echo "$as_me:$LINENO: result: WARNING: ASSUMING LITTLE ENDIAN FOR CROSS COMPILING !!! -+ cat >>confdefs.h <<\_ACEOF - #define LITTLE_END 1 --EOF --" 1>&6 -+_ACEOF -+" >&5 -+$as_echo "WARNING: ASSUMING LITTLE ENDIAN FOR CROSS COMPILING !!! -+ cat >>confdefs.h <<\_ACEOF -+#define LITTLE_END 1 -+_ACEOF -+" >&6; } - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ - /* Are we little or big endian? Adapted from Harbison&Steele. */ - union - { -@@ -3182,153 +7383,291 @@ - } u; - u.d = 1.0; - return u.l[sizeof(double)/sizeof(int)-1] ? 0 : 1; -+ -+ ; -+ return 0; - } --EOF --if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- echo "$ac_t""little" 1>&6 -- cat >> confdefs.h <<\EOF -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ { $as_echo "$as_me:$LINENO: result: little" >&5 -+$as_echo "little" >&6; } -+ cat >>confdefs.h <<\_ACEOF - #define LITTLE_END 1 --EOF -+_ACEOF - - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo "$ac_t""big" 1>&6 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ $as_echo "$as_me:$LINENO: result: big" >&5 -+$as_echo "big" >&6; } - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi +-# Make sure that the destination directory exists. +-# this part is taken from Noah Friedman's mkinstalldirs script ++ if test -n "$dir_arg"; then ++ dst=$src ++ dstdir=$dst ++ test -d "$dstdir" ++ dstdir_status=$? ++ else +-# Skip lots of stat calls in the usual case. +-if [ ! -d "$dstdir" ]; then +-defaultIFS=' +-' +-IFS="${IFS-${defaultIFS}}" ++ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command ++ # might cause directories to be created, which would be especially bad ++ # if $src (and thus $dsttmp) contains '*'. ++ if test ! -f "$src" && test ! -d "$src"; then ++ echo "$0: $src does not exist." >&2 ++ exit 1 ++ fi +-oIFS="${IFS}" +-# Some sh's can't handle IFS=/ for some reason. +-IFS='%' +-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +-IFS="${oIFS}" ++ if test -z "$dst_arg"; then ++ echo "$0: no destination specified." >&2 ++ exit 1 ++ fi +-pathcomp='' ++ dst=$dst_arg ++ # Protect names starting with `-'. ++ case $dst in ++ -*) dst=./$dst;; ++ esac -+ - # On systems with execshield, brk is randomized. We need to catch - # this and restore the traditional behavior here +-while [ $# -ne 0 ] ; do +- pathcomp="${pathcomp}${1}" +- shift ++ # If destination is a directory, append the input filename; won't work ++ # if double slashes aren't ignored. ++ if test -d "$dst"; then ++ if test -n "$no_target_directory"; then ++ echo "$0: $dst_arg: Is a directory" >&2 ++ exit 1 ++ fi ++ dstdir=$dst ++ dst=$dstdir/`basename "$src"` ++ dstdir_status=0 ++ else ++ # Prefer dirname, but fall back on a substitute if dirname fails. ++ dstdir=` ++ (dirname "$dst") 2>/dev/null || ++ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$dst" : 'X\(//\)[^/]' \| \ ++ X"$dst" : 'X\(//\)$' \| \ ++ X"$dst" : 'X\(/\)' \| . 2>/dev/null || ++ echo X"$dst" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q' ++ ` --echo $ac_n "checking for sbrk""... $ac_c" 1>&6 --echo "configure:3211: checking for sbrk" >&5 -+{ $as_echo "$as_me:$LINENO: checking for sbrk" >&5 -+$as_echo_n "checking for sbrk... " >&6; } - HAVE_SBRK="" - if test "$cross_compiling" = yes; then -- echo "$ac_t""no: WARNING you must be able to emulate sbrk: as on mingw or macosx" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no: WARNING you must be able to emulate sbrk: as on mingw or macosx" >&5 -+$as_echo "no: WARNING you must be able to emulate sbrk: as on mingw or macosx" >&6; } - else -- cat > conftest.$ac_ext < -- #include -- int main() { -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ +- if [ ! -d "${pathcomp}" ] ; +- then +- $mkdirprog "${pathcomp}" ++ test -d "$dstdir" ++ dstdir_status=$? ++ fi ++ fi + -+ #include -+ #include ++ obsolete_mkdir_used=false + -+int -+main () -+{ ++ if test $dstdir_status != 0; then ++ case $posix_mkdir in ++ '') ++ # Create intermediate dirs using mode 755 as modified by the umask. ++ # This is like FreeBSD 'install' as of 1997-10-28. ++ umask=`umask` ++ case $stripcmd.$umask in ++ # Optimize common cases. ++ *[2367][2367]) mkdir_umask=$umask;; ++ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + - FILE *f; - if (!(f=fopen("conftest1","w"))) - return -1; - fprintf(f,"%u",sbrk(0)); - return 0; -- } --EOF --if { (eval echo configure:3229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then ++ *[0-7]) ++ mkdir_umask=`expr $umask + 22 \ ++ - $umask % 100 % 40 + $umask % 20 \ ++ - $umask % 10 % 4 + $umask % 2 ++ `;; ++ *) mkdir_umask=$umask,go-w;; ++ esac + -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - HAVE_SBRK=1 -- echo "$ac_t""yes" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo "$ac_t""no: WARNING you must be able to emulate sbrk: as on mingw or macosx" 1>&6 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ $as_echo "$as_me:$LINENO: result: no: WARNING you must be able to emulate sbrk: as on mingw or macosx" >&5 -+$as_echo "no: WARNING you must be able to emulate sbrk: as on mingw or macosx" >&6; } - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi ++ # With -d, create the new directory with the user-specified mode. ++ # Otherwise, rely on $mkdir_umask. ++ if test -n "$dir_arg"; then ++ mkdir_mode=-m$mode + else +- true ++ mkdir_mode= + fi +- pathcomp="${pathcomp}/" +-done +-fi ++ posix_mkdir=false ++ case $umask in ++ *[123567][0-7][0-7]) ++ # POSIX mkdir -p sets u+wx bits regardless of umask, which ++ # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ++ ;; ++ *) ++ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ ++ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 -+ - if test "$HAVE_SBRK" = "1" ; then +-if [ x"$dir_arg" != x ] +-then +- $doit $instcmd $dst && ++ if (umask $mkdir_umask && ++ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 ++ then ++ if test -z "$dir_arg" || { ++ # Check for POSIX incompatibilities with -m. ++ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or ++ # other-writeable bit of parent directory when it shouldn't. ++ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ++ ls_ld_tmpdir=`ls -ld "$tmpdir"` ++ case $ls_ld_tmpdir in ++ d????-?r-*) different_mode=700;; ++ d????-?--*) different_mode=755;; ++ *) false;; ++ esac && ++ $mkdirprog -m$different_mode -p -- "$tmpdir" && { ++ ls_ld_tmpdir_1=`ls -ld "$tmpdir"` ++ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" ++ } ++ } ++ then posix_mkdir=: ++ fi ++ rmdir "$tmpdir/d" "$tmpdir" ++ else ++ # Remove any dirs left behind by ancient mkdir implementations. ++ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null ++ fi ++ trap '' 0;; ++ esac;; ++ esac - # AC_CHECK_HEADER(sys/personality.h, true, - # AC_MSG_RESULT(sys/personality.h not found)) +- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && +- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && +- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && +- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +-else ++ if ++ $posix_mkdir && ( ++ umask $mkdir_umask && ++ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ++ ) ++ then : ++ else -- echo $ac_n "checking for ADDR_NO_RANDOMIZE constant""... $ac_c" 1>&6 --echo "configure:3249: checking for ADDR_NO_RANDOMIZE constant" >&5 -+ { $as_echo "$as_me:$LINENO: checking for ADDR_NO_RANDOMIZE constant" >&5 -+$as_echo_n "checking for ADDR_NO_RANDOMIZE constant... " >&6; } - if test "$cross_compiling" = yes; then - ADDR_NO_RANDOMIZE=0 - else -- cat > conftest.$ac_ext < -- #include -- int main(int argc,char *argv[],char *envp[]) { -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include -+ #include -+ -+int -+main () -+{ +-# If we're going to rename the final executable, determine the name now. ++ # The umask is ridiculous, or mkdir does not conform to POSIX, ++ # or it failed possibly due to a race condition. Create the ++ # directory the slow way, step by step, checking for races as we go. + +- if [ x"$transformarg" = x ] +- then +- dstfile=`basename $dst` +- else +- dstfile=`basename $dst $transformbasename | +- sed $transformarg`$transformbasename +- fi ++ case $dstdir in ++ /*) prefix='/';; ++ -*) prefix='./';; ++ *) prefix='';; ++ esac + +-# don't allow the sed command to completely eliminate the filename ++ eval "$initialize_posix_glob" + +- if [ x"$dstfile" = x ] +- then +- dstfile=`basename $dst` ++ oIFS=$IFS ++ IFS=/ ++ $posix_glob set -f ++ set fnord $dstdir ++ shift ++ $posix_glob set +f ++ IFS=$oIFS + - FILE *f; - if (!(f=fopen("conftest1","w"))) return -1; - fprintf(f,"%x",ADDR_NO_RANDOMIZE); - return 0; -- } --EOF --if { (eval echo configure:3265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then ++ prefixes= + -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - ADDR_NO_RANDOMIZE=`cat conftest1` - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- ADDR_NO_RANDOMIZE=0 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+ADDR_NO_RANDOMIZE=0 - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - ++ for d ++ do ++ test -z "$d" && continue + - if test "$ADDR_NO_RANDOMIZE" = "0" ; then -- echo "$ac_t""no, assuming 0x40000" 1>&6 -- cat >> confdefs.h <&5 -+$as_echo "no, assuming 0x40000" >&6; } -+ cat >>confdefs.h <<_ACEOF - #define ADDR_NO_RANDOMIZE 0x40000 --EOF -+_ACEOF - ++ prefix=$prefix$d ++ if test -d "$prefix"; then ++ prefixes= else -- echo "$ac_t""yes, $ADDR_NO_RANDOMIZE" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: yes, $ADDR_NO_RANDOMIZE" >&5 -+$as_echo "yes, $ADDR_NO_RANDOMIZE" >&6; } +- true ++ if $posix_mkdir; then ++ (umask=$mkdir_umask && ++ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break ++ # Don't fail if two instances are running concurrently. ++ test -d "$prefix" || exit 1 ++ else ++ case $prefix in ++ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; ++ *) qprefix=$prefix;; ++ esac ++ prefixes="$prefixes '$qprefix'" ++ fi fi ++ prefix=$prefix/ ++ done -- echo $ac_n "checking for personality(ADDR_NO_RANDOMIZE) support""... $ac_c" 1>&6 --echo "configure:3288: checking for personality(ADDR_NO_RANDOMIZE) support" >&5 -+ { $as_echo "$as_me:$LINENO: checking for personality(ADDR_NO_RANDOMIZE) support" >&5 -+$as_echo_n "checking for personality(ADDR_NO_RANDOMIZE) support... " >&6; } - if test "$cross_compiling" = yes; then - CAN_UNRANDOMIZE_SBRK=0 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ void gprof_cleanup() {} - int main(int argc,char *argv[],char *envp[]) { - #include "h/unrandomize.h" - return 0;} --EOF --if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - CAN_UNRANDOMIZE_SBRK=1 - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- CAN_UNRANDOMIZE_SBRK=0 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+CAN_UNRANDOMIZE_SBRK=0 - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi +-# Make a temp file name in the proper directory. ++ if test -n "$prefixes"; then ++ # Don't fail if two instances are running concurrently. ++ (umask $mkdir_umask && ++ eval "\$doit_exec \$mkdirprog $prefixes") || ++ test -d "$dstdir" || exit 1 ++ obsolete_mkdir_used=true ++ fi ++ fi ++ fi +- dsttmp=$dstdir/#inst.$$# ++ if test -n "$dir_arg"; then ++ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && ++ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && ++ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || ++ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 ++ else -+ - if test "$CAN_UNRANDOMIZE_SBRK" != 0 ; then -- echo "$ac_t""yes" 1>&6 -- cat >> confdefs.h <<\EOF -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } -+ cat >>confdefs.h <<\_ACEOF - #define CAN_UNRANDOMIZE_SBRK 1 --EOF -+_ACEOF +-# Move or copy the file name to the temp name ++ # Make a couple of temp file names in the proper directory. ++ dsttmp=$dstdir/_inst.$$_ ++ rmtmp=$dstdir/_rm.$$_ - else -- echo "$ac_t""no" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi +- $doit $instcmd $src $dsttmp && ++ # Trap to clean up those temp files at exit. ++ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 -- echo $ac_n "checking that sbrk is (now) non-random""... $ac_c" 1>&6 --echo "configure:3324: checking that sbrk is (now) non-random" >&5 -+ { $as_echo "$as_me:$LINENO: checking that sbrk is (now) non-random" >&5 -+$as_echo_n "checking that sbrk is (now) non-random... " >&6; } - if test "$cross_compiling" = yes; then - SBRK=0 - else -- cat > conftest.$ac_ext < -- void gprof_cleanup() {}; -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include -+ void gprof_cleanup() {} - int main(int argc,char * argv[],char * envp[]) { - FILE *f; - #ifdef CAN_UNRANDOMIZE_SBRK -@@ -3337,31 +7676,60 @@ - if (!(f=fopen("conftest1","w"))) return -1; - fprintf(f,"%u",sbrk(0)); - return 0;} --EOF --if { (eval echo configure:3342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - SBRK=`cat conftest1` - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- SBRK=0 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+SBRK=0 - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi +- trap "rm -f ${dsttmp}" 0 && ++ # Copy the file name to the temp name. ++ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && -+ - if test "$SBRK" = "0" ; then -- echo "$ac_t""cannot trap sbrk" 1>&6 -- exit 1 -+ { { $as_echo "$as_me:$LINENO: error: cannot trap sbrk" >&5 -+$as_echo "$as_me: error: cannot trap sbrk" >&2;} -+ { (exit 1); exit 1; }; } - fi - if test "$cross_compiling" = yes; then - SBRK1=0 - else -- cat > conftest.$ac_ext < -- void gprof_cleanup() {}; -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include -+ void gprof_cleanup() {} - int main(int argc,char * argv[],char * envp[]) { - FILE *f; - #ifdef CAN_UNRANDOMIZE_SBRK -@@ -3370,27 +7738,54 @@ - if (!(f=fopen("conftest1","w"))) return -1; - fprintf(f,"%u",sbrk(0)); - return 0;} --EOF --if { (eval echo configure:3375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - SBRK1=`cat conftest1` - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- SBRK1=0 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+SBRK1=0 - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi +-# and set any options; do chmod last to preserve setuid bits ++ # and set any options; do chmod last to preserve setuid bits. ++ # ++ # If any of these fail, we abort the whole thing. If we want to ++ # ignore errors from any of these, just make sure not to ignore ++ # errors from the above "$doit $cpprog $src $dsttmp" command. ++ # ++ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && ++ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && ++ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && ++ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && -+ - if test "$SBRK1" = "0" ; then -- echo "$ac_t""cannot trap sbrk" 1>&6 -- exit 1 -+ { { $as_echo "$as_me:$LINENO: error: cannot trap sbrk" >&5 -+$as_echo "$as_me: error: cannot trap sbrk" >&2;} -+ { (exit 1); exit 1; }; } - fi - if test "$SBRK" = "$SBRK1" ; then -- echo "$ac_t""yes" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- echo "$ac_t""no" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - echo "Cannot build with randomized sbrk. Your options:" - echo " - upgrade to a kernel/libc that knows about personality(ADDR_NO_RANDOMIZE)" - echo " - recompile your kernel with CONFIG_COMPAT_BRK (if it has that option)" -@@ -3400,57 +7795,98 @@ - fi +-# If any of these fail, we abort the whole thing. If we want to +-# ignore errors from any of these, just make sure not to ignore +-# errors from the above "$doit $instcmd $src $dsttmp" command. ++ # If -C, don't bother to copy if it wouldn't change the file. ++ if $copy_on_change && ++ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && ++ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - # pagewidth --echo $ac_n "checking for pagewidth""... $ac_c" 1>&6 --echo "configure:3405: checking for pagewidth" >&5 -+{ $as_echo "$as_me:$LINENO: checking for pagewidth" >&5 -+$as_echo_n "checking for pagewidth... " >&6; } - if test "$cross_compiling" = yes; then - PAGEWIDTH=0 - else -- cat > conftest.$ac_ext < -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include - #include --int main() {size_t i=getpagesize(),j; -+ -+int -+main () -+{ -+ -+ size_t i=getpagesize(),j; - FILE *fp=fopen("conftest1","w"); - for (j=0;i>>=1;j++); - if (j<12) {printf("pagewidth %u is too small\n",j);return -1;} - fprintf(fp,"%u",j); -- return 0;} --EOF --if { (eval echo configure:3421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - PAGEWIDTH=`cat conftest1` - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- PAGEWIDTH=0 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+PAGEWIDTH=0 - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi +- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && +- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && +- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && +- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && ++ eval "$initialize_posix_glob" && ++ $posix_glob set -f && ++ set X $old && old=:$2:$4:$5:$6 && ++ set X $new && new=:$2:$4:$5:$6 && ++ $posix_glob set +f && --echo "$ac_t""$PAGEWIDTH" 1>&6 --cat >> confdefs.h <&5 -+$as_echo "$PAGEWIDTH" >&6; } -+cat >>confdefs.h <<_ACEOF - #define PAGEWIDTH $PAGEWIDTH --EOF -+_ACEOF +-# Now rename the file to the real destination. ++ test "$old" = "$new" && ++ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 ++ then ++ rm -f "$dsttmp" ++ else ++ # Rename the file to the real destination. ++ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || +- $doit $rmcmd -f $dstdir/$dstfile && +- $doit $mvcmd $dsttmp $dstdir/$dstfile ++ # The rename failed, perhaps because mv can't rename something else ++ # to itself, or perhaps because mv is so ancient that it does not ++ # support -f. ++ { ++ # Now remove or move aside any old file at destination location. ++ # We try this two ways since rm can't unlink itself on some ++ # systems and the destination file might be busy for other ++ # reasons. In this case, the final cleanup might fail but the new ++ # file should still install successfully. ++ { ++ test ! -f "$dst" || ++ $doit $rmcmd -f "$dst" 2>/dev/null || ++ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && ++ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } ++ } || ++ { echo "$0: cannot unlink or rename $dst" >&2 ++ (exit 1); exit 1 ++ } ++ } && +-fi && ++ # Now rename the file to the real destination. ++ $doit $mvcmd "$dsttmp" "$dst" ++ } ++ fi || exit 1 ++ trap '' 0 ++ fi ++done - old_LDFLAGS="$LDFLAGS" - LDFLAGS="$TLDFLAGS" --echo $ac_n "checking "finding DBEGIN"""... $ac_c" 1>&6 --echo "configure:3444: checking "finding DBEGIN"" >&5 -+{ $as_echo "$as_me:$LINENO: checking for DBEGIN" >&5 -+$as_echo_n "checking for DBEGIN... " >&6; } - if test "$cross_compiling" = yes; then - dbegin=0 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ +-exit 0 ++# Local variables: ++# eval: (add-hook 'write-file-hooks 'time-stamp) ++# time-stamp-start: "scriptversion=" ++# time-stamp-format: "%:y-%02m-%02d.%02H" ++# time-stamp-time-zone: "UTC" ++# time-stamp-end: "; # UTC" ++# End: +--- ltmain.sh.orig 2002-08-08 23:49:32.000000000 -0600 ++++ ltmain.sh 2010-12-30 13:25:31.952226884 -0700 +@@ -1,199 +1,928 @@ +-# ltmain.sh - Provide generalized library-building support services. +-# NOTE: Changing this file will not affect anything until you rerun ltconfig. +-# +-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +-# Free Software Foundation, Inc. +-# Originally by Gordon Matzigkeit , 1996 +-# +-# This program is free software; you can redistribute it and/or modify + - #include -- #include -+#include - --void gprof_cleanup() {}; -+void gprof_cleanup() {} - int - main(int argc,char * argv[],char *envp[]) - { -@@ -3476,119 +7912,213 @@ - fclose(fp); - return 0; - } --EOF --if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - dbegin=`cat conftest1` - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- dbegin=0 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+dbegin=0 - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - --cat >> confdefs.h <, 1996 + -+cat >>confdefs.h <<_ACEOF - #define DBEGIN $dbegin \ - /* where data begins */ - --EOF -+_ACEOF - --echo "$ac_t""got $dbegin" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: got $dbegin" >&5 -+$as_echo "got $dbegin" >&6; } - LDFLAGS="$old_LDFLAGS" - - --echo $ac_n "checking "finding CSTACK_ADDRESS"""... $ac_c" 1>&6 --echo "configure:3504: checking "finding CSTACK_ADDRESS"" >&5 -+{ $as_echo "$as_me:$LINENO: checking for CSTACK_ADDRESS" >&5 -+$as_echo_n "checking for CSTACK_ADDRESS... " >&6; } - if test "$cross_compiling" = yes; then - cstack_address=0 - else -- cat > conftest.$ac_ext < --main() -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include -+ -+int -+main () - { ++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, ++# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ++# This is free software; see the source for copying conditions. There is NO ++# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + - char *b ; - FILE *fp = fopen("conftest1","w"); - fprintf(fp,"%ld",((long) &b)); - fclose(fp); - return 0; ++# GNU Libtool is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # +-# This program is distributed in the hope that it will be useful, but ++# As a special exception to the GNU General Public License, ++# if you distribute this file as part of a program or library that ++# is built using GNU Libtool, you may include this file under the ++# same distribution terms that you use for the rest of that program. ++# ++# GNU Libtool is distributed in the hope that it will be useful, but + # WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + # General Public License for more details. + # + # You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# along with GNU Libtool; see the file COPYING. If not, a copy ++# can be downloaded from http://www.gnu.org/licenses/gpl.html, ++# or obtained by writing to the Free Software Foundation, Inc., ++# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + -+ ; -+ return 0; - } --EOF --if { (eval echo configure:3521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - cstack_address=`cat conftest1` - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- cstack_address=0 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+cstack_address=0 - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi ++# Usage: $progname [OPTION]... [MODE-ARG]... + # +-# As a special exception to the GNU General Public License, if you +-# distribute this file as part of a program that contains a +-# configuration script generated by Autoconf, you may include it under +-# the same distribution terms that you use for the rest of that program. ++# Provide generalized library-building support services. ++# ++# --config show all configuration variables ++# --debug enable verbose shell tracing ++# -n, --dry-run display commands without modifying any files ++# --features display basic configuration information and exit ++# --mode=MODE use operation mode MODE ++# --preserve-dup-deps don't remove duplicate dependency libraries ++# --quiet, --silent don't print informational messages ++# --no-quiet, --no-silent ++# print informational messages (default) ++# --tag=TAG use configuration variables from tag TAG ++# -v, --verbose print more informational messages than default ++# --no-verbose don't print the extra informational messages ++# --version print version information ++# -h, --help, --help-all print short, long, or detailed help message ++# ++# MODE must be one of the following: ++# ++# clean remove files from the build directory ++# compile compile a source file into a libtool object ++# execute automatically set library path, then run a program ++# finish complete the installation of libtool libraries ++# install install libraries or executables ++# link create a library or an executable ++# uninstall remove libraries from an installed directory ++# ++# MODE-ARGS vary depending on the MODE. When passed as first option, ++# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. ++# Try `$progname --help --mode=MODE' for a more detailed description of MODE. ++# ++# When reporting a bug, please describe a test case to reproduce it and ++# include the following information: ++# ++# host-triplet: $host ++# shell: $SHELL ++# compiler: $LTCC ++# compiler flags: $LTCFLAGS ++# linker: $LD (gnu? $with_gnu_ld) ++# $progname: (GNU libtool) 2.4 ++# automake: $automake_version ++# autoconf: $autoconf_version ++# ++# Report bugs to . ++# GNU libtool home page: . ++# General help using GNU software: . --cat >> confdefs.h </dev/null`" = 'X\t'; then +- # Yippee, $echo works! +- : ++PROGRAM=libtool ++PACKAGE=libtool ++VERSION=2.4 ++TIMESTAMP="" ++package_revision=1.3293 + -+cat >>confdefs.h <<_ACEOF - #define CSTACK_ADDRESS $cstack_address \ - --EOF -+_ACEOF - --echo "$ac_t""got $cstack_address" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: got $cstack_address" >&5 -+$as_echo "got $cstack_address" >&6; } - - - --echo $ac_n "checking "sizeof long long int"""... $ac_c" 1>&6 --echo "configure:3543: checking "sizeof long long int"" >&5 -+{ $as_echo "$as_me:$LINENO: checking sizeof long long int" >&5 -+$as_echo_n "checking sizeof long long int... " >&6; } - if test "$cross_compiling" = yes; then -- echo "$ac_t""no" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - ++# 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 -- cat > conftest.$ac_ext < --main() -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include -+ -+int -+main () - { -+ - if (sizeof(long long int) == 2*sizeof(long)) return 0; - return 1; --} +- # Restart under the correct shell, and then maybe $echo will work. +- exec $SHELL "$0" --no-reexec ${1+"$@"} ++ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + fi ++BIN_SH=xpg4; export BIN_SH # for Tru64 ++DUALCASE=1; export DUALCASE # for MKS sh +-if test "X$1" = X--fallback-echo; then +- # used as fallback echo +- shift +- cat <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- cat >> confdefs.h <<\EOF -+ ; -+ return 0; +- exit 0 +-fi ++# A function that is used when there is no print builtin or printf. ++func_fallback_echo () ++{ ++ eval 'cat <<_LTECHO_EOF ++$1 ++_LTECHO_EOF' +} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_LONG_LONG 1 --EOF -+_ACEOF --echo "$ac_t""yes" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo "$ac_t""no" 1>&6 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi +-# The name of this program. +-progname=`$echo "$0" | sed 's%^.*/%%'` +-modename="$progname" ++# NLS nuisances: We save the old values to restore during execute mode. ++lt_user_locale= ++lt_safe_locale= ++for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES ++do ++ eval "if test \"\${$lt_var+set}\" = set; then ++ save_$lt_var=\$$lt_var ++ $lt_var=C ++ export $lt_var ++ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" ++ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" ++ fi" ++done ++LC_ALL=C ++LANGUAGE=C ++export LANGUAGE LC_ALL +-# Constants. +-PROGRAM=ltmain.sh +-PACKAGE=libtool +-VERSION=1.4a-GCC3.0 +-TIMESTAMP=" (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)" ++$lt_unset CDPATH +-default_mode= +-help="Try \`$progname --help' for more information." +-magic="%%%MAGIC variable%%%" +-mkdir="mkdir" +-mv="mv -f" +-rm="rm -f" +-# Sed substitution that helps us do robust quoting. It backslashifies +-# metacharacters that are still active within double-quoted strings. +-Xsed='sed -e 1s/^X//' +-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' +-SP2NL='tr \040 \012' +-NL2SP='tr \015\012 \040\040' ++# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh ++# is ksh but when the shell is invoked as "sh" and the current value of ++# the _XPG environment variable is not equal to 1 (one), the special ++# positional parameter $0, within a function call, is the name of the ++# function. ++progpath="$0" -+ - # readline --# Check whether --enable-readline or --disable-readline was given. -+# Check whether --enable-readline was given. - if test "${enable_readline+set}" = set; then -- enableval="$enable_readline" -- : -+ enableval=$enable_readline; - else - enable_readline="yes" - fi +-# NLS nuisances. +-# Only set LANG and LC_ALL to C if already set. +-# These must not be set unconditionally because not all systems understand +-# e.g. LANG=C (notably SCO). +-# We save the old values to restore during execute mode. +-if test "${LC_ALL+set}" = set; then +- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL +-fi +-if test "${LANG+set}" = set; then +- save_LANG="$LANG"; LANG=C; export LANG +-fi +-if test "$LTCONFIG_VERSION" != "$VERSION"; then +- echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 +- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 +- exit 1 +-fi - # ansi lisp --# Check whether --enable-ansi or --disable-ansi was given. -+# Check whether --enable-ansi was given. - if test "${enable_ansi+set}" = set; then -- enableval="$enable_ansi" -- : -+ enableval=$enable_ansi; - else - enable_ansi="no" - fi -@@ -3596,9 +8126,9 @@ +-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then +- echo "$modename: not configured to build any kind of library" 1>&2 +- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 +- exit 1 +-fi ++: ${CP="cp -f"} ++test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} ++: ${EGREP="/bin/grep -E"} ++: ${FGREP="/bin/grep -F"} ++: ${GREP="/bin/grep"} ++: ${LN_S="ln -s"} ++: ${MAKE="make"} ++: ${MKDIR="mkdir"} ++: ${MV="mv -f"} ++: ${RM="rm -f"} ++: ${SED="/bin/sed"} ++: ${SHELL="${CONFIG_SHELL-/bin/sh}"} ++: ${Xsed="$SED -e 1s/^X//"} - if test "$enable_ansi" = "yes" ; then - SYSTEM=ansi_gcl -- cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define ANSI_COMMON_LISP 1 --EOF -+_ACEOF +-# Global variables. +-mode=$default_mode +-nonopt= +-prev= +-prevopt= +-run= +-show="$echo" +-show_help= +-execute_dlfiles= +-lo2o="s/\\.lo\$/.${objext}/" +-o2lo="s/\\.${objext}\$/.lo/" +-taglist= ++# Global variables: ++EXIT_SUCCESS=0 ++EXIT_FAILURE=1 ++EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. ++EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - CLSTANDARD=ANSI - else -@@ -3616,343 +8146,838 @@ +-# Parse our command line options once, thoroughly. +-while test $# -gt 0 +-do +- arg="$1" +- shift ++exit_status=$EXIT_SUCCESS +- case $arg in +- -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; +- *) optarg= ;; +- esac ++# Make sure IFS has a sensible default ++lt_nl=' ++' ++IFS=" $lt_nl" - # Check if Posix compliant getcwd exists, if not we'll use getwd. -+ - for ac_func in getcwd - do --echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:3623: checking for $ac_func" >&5 --if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -+$as_echo_n "checking for $ac_func... " >&6; } -+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then -+ $as_echo_n "(cached) " >&6 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char $ac_func(); below. */ --#include --/* Override any gcc2 internal prototype to avoid an error. */ --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char $ac_func(); -+ which can conflict with char $ac_func (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ - --int main() { -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif +- # If the previous option needs an argument, assign it. +- if test -n "$prev"; then +- case $prev in +- execute_dlfiles) +- execute_dlfiles="$execute_dlfiles $arg" ++dirname="s,/[^/]*$,," ++basename="s,^.*/,," + -+#undef $ac_func - -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char $ac_func (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ --#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -+#if defined __stub_$ac_func || defined __stub___$ac_func - choke me --#else --$ac_func(); - #endif - --; return 0; } --EOF --if { (eval echo configure:3651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_func_$ac_func=yes" -+int -+main () ++# func_dirname file append nondir_replacement ++# Compute the dirname of FILE. If nonempty, add APPEND to the result, ++# otherwise set result to NONDIR_REPLACEMENT. ++func_dirname () +{ -+return $ac_func (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ eval "$as_ac_var=yes" - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_func_$ac_func=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ eval "$as_ac_var=no" - fi --rm -f conftest* -+ -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi -+ac_res=`eval 'as_val=${'$as_ac_var'} -+ $as_echo "$as_val"'` -+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+as_val=`eval 'as_val=${'$as_ac_var'} -+ $as_echo "$as_val"'` -+ if test "x$as_val" = x""yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -+_ACEOF - --if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` -- cat >> confdefs.h <&6 - fi - done - ++ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` ++ if test "X$func_dirname_result" = "X${1}"; then ++ func_dirname_result="${3}" ++ else ++ func_dirname_result="$func_dirname_result${2}" ++ fi ++} # func_dirname may be replaced by extended shell implementation + - for ac_func in getwd - do --echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --echo "configure:3678: checking for $ac_func" >&5 --if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -+$as_echo_n "checking for $ac_func... " >&6; } -+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then -+ $as_echo_n "(cached) " >&6 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ - /* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char $ac_func(); below. */ --#include --/* Override any gcc2 internal prototype to avoid an error. */ --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char $ac_func(); -+ which can conflict with char $ac_func (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ - --int main() { -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif - -+#undef $ac_func + -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char $ac_func (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ --#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -+#if defined __stub_$ac_func || defined __stub___$ac_func - choke me --#else --$ac_func(); - #endif - --; return 0; } --EOF --if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_func_$ac_func=yes" -+int -+main () ++# func_basename file ++func_basename () +{ -+return $ac_func (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ eval "$as_ac_var=yes" - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_func_$ac_func=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ eval "$as_ac_var=no" - fi --rm -f conftest* ++ func_basename_result=`$ECHO "${1}" | $SED "$basename"` ++} # func_basename may be replaced by extended shell implementation + -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext - fi -+ac_res=`eval 'as_val=${'$as_ac_var'} -+ $as_echo "$as_val"'` -+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+as_val=`eval 'as_val=${'$as_ac_var'} -+ $as_echo "$as_val"'` -+ if test "x$as_val" = x""yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -+_ACEOF - --if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` -- cat >> confdefs.h <&6 - fi - done - --echo $ac_n "checking for uname""... $ac_c" 1>&6 --echo "configure:3731: checking for uname" >&5 --if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for uname" >&5 -+$as_echo_n "checking for uname... " >&6; } -+if test "${ac_cv_func_uname+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define uname to an innocuous variant, in case declares uname. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define uname innocuous_uname -+ - /* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char uname(); below. */ --#include --/* Override any gcc2 internal prototype to avoid an error. */ --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char uname(); -+ which can conflict with char uname (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ - --int main() { -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif - -+#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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char uname (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ --#if defined (__stub_uname) || defined (__stub___uname) -+#if defined __stub_uname || defined __stub___uname - choke me --#else --uname(); - #endif - --; return 0; } --EOF --if { (eval echo configure:3759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_func_uname=yes" -+int -+main () ++# 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 () +{ -+return uname (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_func_uname=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_func_uname=no" --fi --rm -f conftest* -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 ++ # Extract subdirectory from the argument. ++ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` ++ if test "X$func_dirname_result" = "X${1}"; then ++ func_dirname_result="${3}" ++ else ++ func_dirname_result="$func_dirname_result${2}" ++ fi ++ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` ++} # func_dirname_and_basename may be replaced by extended shell implementation + -+ ac_cv_func_uname=no - fi - --if eval "test \"`echo '$ac_cv_func_'uname`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_uname" >&5 -+$as_echo "$ac_cv_func_uname" >&6; } -+if test "x$ac_cv_func_uname" = x""yes; then - : - else -- echo "$ac_t""no" 1>&6 --cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define NO_UNAME 1 --EOF -+_ACEOF - - fi - --echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6 --echo "configure:3783: checking for gettimeofday" >&5 --if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for gettimeofday" >&5 -+$as_echo_n "checking for gettimeofday... " >&6; } -+if test "${ac_cv_func_gettimeofday+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define gettimeofday to an innocuous variant, in case declares gettimeofday. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define gettimeofday innocuous_gettimeofday -+ - /* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char gettimeofday(); below. */ --#include --/* Override any gcc2 internal prototype to avoid an error. */ --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char gettimeofday(); -+ which can conflict with char gettimeofday (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ - --int main() { -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif - -+#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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char gettimeofday (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ --#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) -+#if defined __stub_gettimeofday || defined __stub___gettimeofday - choke me --#else --gettimeofday(); - #endif - --; return 0; } --EOF --if { (eval echo configure:3811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_func_gettimeofday=yes" -+int -+main () ++# func_stripname prefix suffix name ++# strip PREFIX and SUFFIX off of NAME. ++# PREFIX and SUFFIX must not contain globbing or regex special ++# characters, hashes, percent signs, but SUFFIX may contain a leading ++# dot (in which case that matches only a dot). ++# func_strip_suffix prefix name ++func_stripname () +{ -+return gettimeofday (); -+ ; -+ return 0; ++ case ${2} in ++ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; ++ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; ++ esac ++} # func_stripname may be replaced by extended shell implementation ++ ++ ++# These SED scripts presuppose an absolute path with a trailing slash. ++pathcar='s,^/\([^/]*\).*$,\1,' ++pathcdr='s,^/[^/]*,,' ++removedotparts=':dotsl ++ s@/\./@/@g ++ t dotsl ++ s,/\.$,/,' ++collapseslashes='s@/\{1,\}@/@g' ++finalslash='s,/*$,/,' ++ ++# func_normal_abspath PATH ++# Remove doubled-up and trailing slashes, "." path components, ++# and cancel out any ".." path components in PATH after making ++# it an absolute path. ++# value returned in "$func_normal_abspath_result" ++func_normal_abspath () ++{ ++ # Start from root dir and reassemble the path. ++ func_normal_abspath_result= ++ func_normal_abspath_tpath=$1 ++ func_normal_abspath_altnamespace= ++ case $func_normal_abspath_tpath in ++ "") ++ # Empty path, that just means $cwd. ++ func_stripname '' '/' "`pwd`" ++ func_normal_abspath_result=$func_stripname_result ++ return ++ ;; ++ # The next three entries are used to spot a run of precisely ++ # two leading slashes without using negated character classes; ++ # we take advantage of case's first-match behaviour. ++ ///*) ++ # Unusual form of absolute path, do nothing. ++ ;; ++ //*) ++ # Not necessarily an ordinary path; POSIX reserves leading '//' ++ # and for example Cygwin uses it to access remote file shares ++ # over CIFS/SMB, so we conserve a leading double slash if found. ++ func_normal_abspath_altnamespace=/ ++ ;; ++ /*) ++ # Absolute path, do nothing. ++ ;; ++ *) ++ # Relative path, prepend $cwd. ++ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ++ ;; ++ esac ++ # Cancel out all the simple stuff to save iterations. We also want ++ # the path to end with a slash for ease of parsing, so make sure ++ # there is one (and only one) here. ++ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ ++ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` ++ while :; do ++ # Processed it all yet? ++ if test "$func_normal_abspath_tpath" = / ; then ++ # If we ascended to the root using ".." the result may be empty now. ++ if test -z "$func_normal_abspath_result" ; then ++ func_normal_abspath_result=/ ++ fi ++ break ++ fi ++ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ ++ -e "$pathcar"` ++ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ ++ -e "$pathcdr"` ++ # Figure out what to do with it ++ case $func_normal_abspath_tcomponent in ++ "") ++ # Trailing empty path component, ignore it. + ;; +- tag) +- tagname="$arg" ++ ..) ++ # Parent dir; strip last assembled component from result. ++ func_dirname "$func_normal_abspath_result" ++ func_normal_abspath_result=$func_dirname_result ++ ;; ++ *) ++ # Actual path component, append it. ++ func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ++ ;; ++ esac ++ done ++ # Restore leading double-slash if one was found on entry. ++ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_func_gettimeofday=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_func_gettimeofday=no" --fi --rm -f conftest* -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_func_gettimeofday=no - fi --if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -+$as_echo "$ac_cv_func_gettimeofday" >&6; } -+if test "x$ac_cv_func_gettimeofday" = x""yes; then - : - else -- echo "$ac_t""no" 1>&6 --cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define NO_GETTOD 1 --EOF -+_ACEOF +- # Check whether tagname contains only valid characters +- case $tagname in +- *[!-_A-Za-z0-9,/]*) +- echo "$progname: invalid tag name: $tagname" 1>&2 +- exit 1 +- ;; +- esac ++# func_relative_path SRCDIR DSTDIR ++# generates a relative path from SRCDIR to DSTDIR, with a trailing ++# slash if non-empty, suitable for immediately appending a filename ++# without needing to append a separator. ++# value returned in "$func_relative_path_result" ++func_relative_path () ++{ ++ func_relative_path_result= ++ func_normal_abspath "$1" ++ func_relative_path_tlibdir=$func_normal_abspath_result ++ func_normal_abspath "$2" ++ func_relative_path_tbindir=$func_normal_abspath_result - fi +- case $tagname in +- CC) +- # Don't test for the "default" C tag, as we know, it's there, but +- # not specially marked. +- taglist="$taglist $tagname" +- ;; ++ # Ascend the tree starting from libdir ++ while :; do ++ # check if we have found a prefix of bindir ++ case $func_relative_path_tbindir in ++ $func_relative_path_tlibdir) ++ # found an exact match ++ func_relative_path_tcancelled= ++ break ++ ;; ++ $func_relative_path_tlibdir*) ++ # found a matching prefix ++ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" ++ func_relative_path_tcancelled=$func_stripname_result ++ if test -z "$func_relative_path_result"; then ++ func_relative_path_result=. ++ fi ++ break ++ ;; + *) +- if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then +- taglist="$taglist $tagname" +- # Evaluate the configuration. +- eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" +- else +- echo "$progname: ignoring unknown tag $tagname" 1>&2 ++ func_dirname $func_relative_path_tlibdir ++ func_relative_path_tlibdir=${func_dirname_result} ++ if test "x$func_relative_path_tlibdir" = x ; then ++ # Have to descend all the way to the root! ++ func_relative_path_result=../$func_relative_path_result ++ func_relative_path_tcancelled=$func_relative_path_tbindir ++ break + fi ++ func_relative_path_result=../$func_relative_path_result + ;; +- esac +- ;; +- *) +- eval "$prev=\$arg" +- ;; + esac ++ done +- prev= +- prevopt= +- continue ++ # Now calculate path; take care to avoid doubling-up slashes. ++ func_stripname '' '/' "$func_relative_path_result" ++ func_relative_path_result=$func_stripname_result ++ func_stripname '/' '/' "$func_relative_path_tcancelled" ++ if test "x$func_stripname_result" != x ; then ++ func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi +- # Have we seen a non-optional argument yet? +- case $arg in +- --help) +- show_help=yes +- ;; ++ # Normalisation. If bindir is libdir, return empty string, ++ # else relative path ending with a slash; either way, target ++ # file name can be directly appended. ++ if test ! -z "$func_relative_path_result"; then ++ func_stripname './' '' "$func_relative_path_result/" ++ func_relative_path_result=$func_stripname_result ++ fi ++} --for ac_hdr in sys/ioctl.h -+ -+for ac_header in sys/ioctl.h - do --ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:3840: 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:3850: \"$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; } +- --version) +- echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" +- exit 0 ++# The name of this program: ++func_dirname_and_basename "$progpath" ++progname=$func_basename_result + -+# 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;; ++# 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 -+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___%'` -- cat >> confdefs.h <&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;} ++# 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' + -+ ;; -+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; } ++# Same as above, but do not quote variable references. ++double_quote_subst='s/\(["`\\]\)/\\\1/g' + -+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 ++# Sed substitution that turns a string into a regex matching for the ++# string literally. ++sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + -+fi ++# Sed substitution that converts a w32 file name or path ++# which contains forward slashes, into one that contains ++# (escaped) backslashes. A very naive implementation. ++lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + - done - - - # OpenBSD has elf_abi.h instead of elf.h --for ac_hdr in elf.h elf_abi.h ++# 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=: + -+for ac_header in elf.h elf_abi.h - do --ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:3882: 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:3892: \"$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* ++# func_echo arg... ++# Echo program name prefixed message, along with the current mode ++# name if it has been set yet. ++func_echo () ++{ ++ $ECHO "$progname: ${opt_mode+$opt_mode: }$*" ++} + -+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; } ++# func_verbose arg... ++# Echo program name prefixed message in verbose mode only. ++func_verbose () ++{ ++ $opt_verbose && func_echo ${1+"$@"} + -+# 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 ++ # 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: ++ : ++} + -+ 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___%'` -- cat >> confdefs.h <&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;} ++# func_echo_all arg... ++# Invoke $ECHO with all args, space-separated. ++func_echo_all () ++{ ++ $ECHO "$*" ++} + -+ ;; -+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; } ++# func_error arg... ++# Echo program name prefixed message to standard error. ++func_error () ++{ ++ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 ++} + -+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 ++# func_warning arg... ++# Echo program name prefixed warning message to standard error. ++func_warning () ++{ ++ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + -+fi ++ # bash bug again: ++ : ++} + - done - - --for ac_hdr in sys/sockio.h -+ -+for ac_header in sys/sockio.h - do --ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:3923: 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:3933: \"$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* ++# func_fatal_error arg... ++# Echo program name prefixed message to standard error, and exit. ++func_fatal_error () ++{ ++ func_error ${1+"$@"} ++ exit $EXIT_FAILURE ++} + -+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; } ++# 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 + -+# 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___%'` -- cat >> confdefs.h <&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;} ++# func_grep expression filename ++# Check whether EXPRESSION matches any line of FILENAME, without output. ++func_grep () ++{ ++ $GREP "$1" "$2" >/dev/null 2>&1 ++} + -+ ;; -+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 ++# 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= + -+fi ++ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + - done - - -@@ -3968,495 +8993,1277 @@ - # declare it. - #-------------------------------------------------------------------- - --echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6 --echo "configure:3973: checking for BSDgettimeofday" >&5 --if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5 -+$as_echo_n "checking for BSDgettimeofday... " >&6; } -+if test "${ac_cv_func_BSDgettimeofday+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define BSDgettimeofday to an innocuous variant, in case declares BSDgettimeofday. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define BSDgettimeofday innocuous_BSDgettimeofday -+ - /* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char BSDgettimeofday(); below. */ --#include --/* Override any gcc2 internal prototype to avoid an error. */ --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char BSDgettimeofday(); -+ which can conflict with char BSDgettimeofday (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ - --int main() { -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif - -+#undef BSDgettimeofday ++ # Protect directory names starting with `-' ++ case $my_directory_path in ++ -*) my_directory_path="./$my_directory_path" ;; ++ esac + -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char BSDgettimeofday (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ --#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday) -+#if defined __stub_BSDgettimeofday || defined __stub___BSDgettimeofday - choke me --#else --BSDgettimeofday(); - #endif - --; return 0; } --EOF --if { (eval echo configure:4001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_func_BSDgettimeofday=yes" -+int -+main () -+{ -+return BSDgettimeofday (); -+ ; -+ return 0; ++ # While some portion of DIR does not yet exist... ++ while test ! -d "$my_directory_path"; do ++ # ...make a list in topmost first order. Use a colon delimited ++ # list incase some portion of path contains whitespace. ++ my_dir_list="$my_directory_path:$my_dir_list" ++ ++ # If the last portion added has no slash in it, the list is done ++ case $my_directory_path in */*) ;; *) break ;; esac ++ ++ # ...otherwise throw away the child directory and loop ++ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` ++ done ++ my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` ++ ++ save_mkdir_p_IFS="$IFS"; IFS=':' ++ for my_dir in $my_dir_list; do ++ IFS="$save_mkdir_p_IFS" ++ # mkdir can fail with a `File exist' error if two processes ++ # try to create one of the directories concurrently. Don't ++ # stop in that case! ++ $MKDIR "$my_dir" 2>/dev/null || : ++ done ++ IFS="$save_mkdir_p_IFS" ++ ++ # Bail out if we (or some other process) failed to create a directory. ++ test -d "$my_directory_path" || \ ++ func_fatal_error "Failed to create \`$1'" ++ fi +} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_func_BSDgettimeofday=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_func_BSDgettimeofday=no" --fi --rm -f conftest* -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 + -+ ac_cv_func_BSDgettimeofday=no - fi - --if eval "test \"`echo '$ac_cv_func_'BSDgettimeofday`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- cat >> confdefs.h <<\EOF -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5 -+$as_echo "$ac_cv_func_BSDgettimeofday" >&6; } -+if test "x$ac_cv_func_BSDgettimeofday" = x""yes; then -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_BSDGETTIMEOFDAY 1 --EOF -+_ACEOF - - else -- echo "$ac_t""no" 1>&6 --echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6 --echo "configure:4022: checking for gettimeofday" >&5 --if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ { $as_echo "$as_me:$LINENO: checking for gettimeofday" >&5 -+$as_echo_n "checking for gettimeofday... " >&6; } -+if test "${ac_cv_func_gettimeofday+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define gettimeofday to an innocuous variant, in case declares gettimeofday. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define gettimeofday innocuous_gettimeofday -+ - /* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char gettimeofday(); below. */ --#include --/* Override any gcc2 internal prototype to avoid an error. */ --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char gettimeofday(); -+ which can conflict with char gettimeofday (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ - --int main() { -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif - -+#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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char gettimeofday (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ --#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) -+#if defined __stub_gettimeofday || defined __stub___gettimeofday - choke me --#else --gettimeofday(); - #endif - --; return 0; } --EOF --if { (eval echo configure:4050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_func_gettimeofday=yes" -+int -+main () ++# func_mktempdir [string] ++# Make a temporary directory that won't clash with other running ++# libtool processes, and avoids race conditions if possible. If ++# given, STRING is the basename for that directory. ++func_mktempdir () +{ -+return gettimeofday (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_func_gettimeofday=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_func_gettimeofday=no" --fi --rm -f conftest* -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 ++ my_template="${TMPDIR-/tmp}/${1-$progname}" + -+ ac_cv_func_gettimeofday=no - fi - --if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gettimeofday" >&5 -+$as_echo "$ac_cv_func_gettimeofday" >&6; } -+if test "x$ac_cv_func_gettimeofday" = x""yes; then - : - else -- echo "$ac_t""no" 1>&6 --cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define NO_GETTOD 1 --EOF -+_ACEOF - - fi - - fi - - --echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6 --echo "configure:4077: checking for gettimeofday declaration" >&5 -+{ $as_echo "$as_me:$LINENO: checking for gettimeofday declaration" >&5 -+$as_echo_n "checking for gettimeofday declaration... " >&6; } - --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - #include --EOF ++ if test "$opt_dry_run" = ":"; then ++ # Return a directory name, but don't create it in dry-run mode ++ my_tmpdir="${my_template}-$$" ++ else + -+_ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- egrep "gettimeofday" >/dev/null 2>&1; then -- rm -rf conftest* -- echo "$ac_t""present" 1>&6 -+ $EGREP "gettimeofday" >/dev/null 2>&1; then -+ { $as_echo "$as_me:$LINENO: result: present" >&5 -+$as_echo "present" >&6; } - else -- rm -rf conftest* -- echo "$ac_t""missing" 1>&6 -- cat >> confdefs.h <<\EOF -+ { $as_echo "$as_me:$LINENO: result: missing" >&5 -+$as_echo "missing" >&6; } -+ cat >>confdefs.h <<\_ACEOF - #define GETTOD_NOT_DECLARED 1 --EOF -+_ACEOF - - fi - rm -f conftest* - - - --echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 --echo "configure:4101: checking for sin in -lm" >&5 --ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for sin in -lm" >&5 -+$as_echo_n "checking for sin in -lm... " >&6; } -+if test "${ac_cv_lib_m_sin+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- ac_save_LIBS="$LIBS" -+ ac_check_lib_save_LIBS=$LIBS - LIBS="-lm $LIBS" --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - --int main() { --sin() --; return 0; } --EOF --if { (eval echo configure:4120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char sin (); -+int -+main () -+{ -+return sin (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_m_sin=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_lib_m_sin=no - fi --rm -f conftest* --LIBS="$ac_save_LIBS" - -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS - fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5 -+$as_echo "$ac_cv_lib_m_sin" >&6; } -+if test "x$ac_cv_lib_m_sin" = x""yes; then - LIBS="${LIBS} -lm" - else -- echo "$ac_t""no" 1>&6 --true -+ true - fi - --echo $ac_n "checking for main in -lmingwex""... $ac_c" 1>&6 --echo "configure:4142: checking for main in -lmingwex" >&5 --ac_lib_var=`echo mingwex'_'main | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for main in -lmingwex" >&5 -+$as_echo_n "checking for main in -lmingwex... " >&6; } -+if test "${ac_cv_lib_mingwex_main+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- ac_save_LIBS="$LIBS" -+ ac_check_lib_save_LIBS=$LIBS - LIBS="-lmingwex $LIBS" --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - --int main() { --main() --; return 0; } --EOF --if { (eval echo configure:4157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" ++ # If mktemp works, use that first and foremost ++ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + -+int -+main () -+{ -+return main (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_mingwex_main=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_lib_mingwex_main=no - fi --rm -f conftest* --LIBS="$ac_save_LIBS" - -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS - fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mingwex_main" >&5 -+$as_echo "$ac_cv_lib_mingwex_main" >&6; } -+if test "x$ac_cv_lib_mingwex_main" = x""yes; then - LIBS="${LIBS} -lmingwex" - else -- echo "$ac_t""no" 1>&6 --true -+ true - fi - - - EXTRA_LOBJS= - if test "$try_japi" = "yes" ; then -- for ac_hdr in japi.h -+ -+for ac_header in japi.h - do --ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:4185: 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:4195: \"$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* ++ if test ! -d "$my_tmpdir"; then ++ # Failing that, at least try and use $RANDOM to avoid a race ++ my_tmpdir="${my_template}-${RANDOM-0}$$" + -+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; } ++ save_mktempdir_umask=`umask` ++ umask 0077 ++ $MKDIR "$my_tmpdir" ++ umask $save_mktempdir_umask ++ fi + -+# 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 ++ # 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 + -+ 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___%'` -- cat >> confdefs.h <> confdefs.h <<\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;} ++ $ECHO "$my_tmpdir" ++} + -+ ;; -+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 -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_JAPI_H 1 --EOF -+_ACEOF - - EXTRA_LOBJS="${EXTRA_LOBJS} gcl_japi.o" -- LIBS="${LIBS} -ljapi -lwsock32" --else -- echo "$ac_t""no" 1>&6 -+ LIBS="${LIBS} -ljapi -lwsock32" - fi ++# func_quote_for_eval arg ++# Aesthetically quote ARG to be evaled later. ++# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT ++# is double-quoted, suitable for a subsequent eval, whereas ++# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters ++# which are still active within double quotes backslashified. ++func_quote_for_eval () ++{ ++ case $1 in ++ *[\\\`\"\$]*) ++ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; ++ *) ++ func_quote_for_eval_unquoted_result="$1" ;; ++ esac + - done - - fi - if test "$use" = "mingw" ; then - if test "$try_xdr" = "yes" ; then -- for ac_hdr in rpc/rpc.h -+ -+for ac_header in rpc/rpc.h - do --ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:4233: 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:4243: \"$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* ++ 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 ++} + -+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 ++# func_quote_for_expand arg ++# Aesthetically quote ARG to be evaled later; same as above, ++# but do not quote variable references. ++func_quote_for_expand () ++{ ++ case $1 in ++ *[\\\`\"]*) ++ my_arg=`$ECHO "$1" | $SED \ ++ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; ++ *) ++ my_arg="$1" ;; ++ esac + -+ 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___%'` -- cat >> confdefs.h <> confdefs.h <<\EOF --#define HAVE_XDR 1 --EOF - -- LIBS="${LIBS} -loncrpc" -+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;} ++ 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 + -+ ;; -+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; } ++ func_quote_for_expand_result="$my_arg" ++} + -+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 -+ cat >>confdefs.h <<\_ACEOF -+#define HAVE_XDR 1 -+_ACEOF + -+ LIBS="${LIBS} -loncrpc" -+fi ++# 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-:}" + - done - - fi - else - if test "$try_xdr" = "yes" ; then -- for ac_hdr in rpc/rpc.h -+ -+for ac_header in rpc/rpc.h - do --ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:4280: 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:4290: \"$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* ++ ${opt_silent-false} || { ++ func_quote_for_expand "$my_cmd" ++ eval "func_echo $func_quote_for_expand_result" ++ } + -+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; } ++ 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 ++} + -+# 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___%'` -- cat >> confdefs.h <> confdefs.h <<\EOF --#define HAVE_XDR 1 --EOF - -- LIBS="${LIBS} -lrpc" -+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;} ++# 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-:}" + -+ ;; -+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; } ++ ${opt_silent-false} || { ++ func_quote_for_expand "$my_cmd" ++ eval "func_echo $func_quote_for_expand_result" ++ } + -+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 -+ cat >>confdefs.h <<\_ACEOF -+#define HAVE_XDR 1 -+_ACEOF ++ 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 ++} + -+ LIBS="${LIBS} -lrpc" - fi ++# func_tr_sh ++# Turn $1 into a string suitable for a shell variable name. ++# Result is stored in $func_tr_sh_result. All characters ++# not in the set a-zA-Z0-9_ are replaced with '_'. Further, ++# if $1 begins with a digit, a '_' is prepended as well. ++func_tr_sh () ++{ ++ case $1 in ++ [0-9]* | *[!a-zA-Z0-9_]*) ++ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; ++ * ) ++ func_tr_sh_result=$1 ++ ;; ++ esac ++} + - done - - fi - fi - --# Should really find a way to check for prototypes, but this -+# Should really find a way to check for prototypes, but this - # basically works for now. CM - # --for ac_hdr in math.h -+ -+for ac_header in math.h - do --ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:4330: 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:4340: \"$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; } ++# func_version ++# Echo version message to standard output and exit. ++func_version () ++{ ++ $opt_debug + -+# 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 ++ $SED -n '/(C)/!b go ++ :more ++ /\./!{ ++ N ++ s/\n# / / ++ b more ++ } ++ :go ++ /^# '$PROGRAM' (GNU /,/# warranty; / { ++ s/^# // ++ s/^# *$// ++ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ ++ p ++ }' < "$progpath" ++ exit $? ++} + -+ 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___%'` -- cat >> confdefs.h <> confdefs.h <<\EOF --#define HAVE_MATH_H 1 --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;} ++# func_usage ++# Echo short help message to standard output and exit. ++func_usage () ++{ ++ $opt_debug + -+ ;; -+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; } ++ $SED -n '/^# Usage:/,/^# *.*--help/ { ++ s/^# // ++ s/^# *$// ++ s/\$progname/'$progname'/ ++ p ++ }' < "$progpath" ++ echo ++ $ECHO "run \`$progname --help | more' for full usage" ++ exit $? ++} + -+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 -+ cat >>confdefs.h <<\_ACEOF -+#define HAVE_MATH_H 1 -+_ACEOF ++# func_help [NOEXIT] ++# Echo long help message to standard output and exit, ++# unless 'noexit' is passed as argument. ++func_help () ++{ ++ $opt_debug + - fi ++ $SED -n '/^# Usage:/,/# Report bugs to/ { ++ :print ++ s/^# // ++ s/^# *$// ++ s*\$progname*'$progname'* ++ s*\$host*'"$host"'* ++ s*\$SHELL*'"$SHELL"'* ++ s*\$LTCC*'"$LTCC"'* ++ s*\$LTCFLAGS*'"$LTCFLAGS"'* ++ s*\$LD*'"$LD"'* ++ s/\$with_gnu_ld/'"$with_gnu_ld"'/ ++ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ ++ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ ++ p ++ d ++ } ++ /^# .* home page:/b print ++ /^# General help using/b print ++ ' < "$progpath" ++ ret=$? ++ if test -z "$1"; then ++ exit $ret ++ fi ++} + - done - - - # - # For DBL_MAX et. al. on (only) certain Linux arches, apparently CM - # --for ac_hdr in values.h -+ -+for ac_header in values.h - do --ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:4377: 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:4387: \"$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* ++# func_missing_arg argname ++# Echo program name prefixed message to standard error and set global ++# exit_cmd. ++func_missing_arg () ++{ ++ $opt_debug + -+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; } ++ func_error "missing argument for $1." ++ exit_cmd=exit ++} + -+# 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___%'` -- cat >> confdefs.h <> confdefs.h <<\EOF --#define HAVE_VALUES_H 1 --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;} ++# func_split_short_opt shortopt ++# Set func_split_short_opt_name and func_split_short_opt_arg shell ++# variables after splitting SHORTOPT after the 2nd character. ++func_split_short_opt () ++{ ++ my_sed_short_opt='1s/^\(..\).*$/\1/;q' ++ my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + -+ ;; -+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; } ++ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` ++ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` ++} # func_split_short_opt may be replaced by extended shell implementation + -+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 -+ cat >>confdefs.h <<\_ACEOF -+#define HAVE_VALUES_H 1 -+_ACEOF + - fi ++# func_split_long_opt longopt ++# Set func_split_long_opt_name and func_split_long_opt_arg shell ++# variables after splitting LONGOPT at the `=' sign. ++func_split_long_opt () ++{ ++ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' ++ my_sed_long_arg='1s/^--[^=]*=//' + - done - - - # - # Sparc solaris keeps this in float.h, rework either/or with values.h later - # --for ac_hdr in float.h -+ -+for ac_header in float.h - do --ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:4424: 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:4434: \"$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* ++ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` ++ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` ++} # func_split_long_opt may be replaced by extended shell implementation + -+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; } ++exit_cmd=: + -+# 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___%'` -- cat >> confdefs.h <> confdefs.h <<\EOF --#define HAVE_FLOAT_H 1 --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 -+ cat >>confdefs.h <<\_ACEOF -+#define HAVE_FLOAT_H 1 -+_ACEOF + - fi ++magic="%%%MAGIC variable%%%" ++magic_exe="%%%MAGIC EXE variable%%%" + - done - - -@@ -4465,129 +10272,287 @@ - # a more comprehensive later, i.e. checking that the fpclass - # test makes sense. CM - # --echo $ac_n "checking for isnormal""... $ac_c" 1>&6 --echo "configure:4470: checking for isnormal" >&5 -+{ $as_echo "$as_me:$LINENO: checking for isnormal" >&5 -+$as_echo_n "checking for isnormal... " >&6; } - if test "$cross_compiling" = yes; then -- HAVE_ISNORMAL=0 echo "$ac_t""no" 1>&6 -+ HAVE_ISNORMAL=0 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - else -- cat > conftest.$ac_ext < -- int main() { -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ ++# Global variables. ++nonopt= ++preserve_args= ++lo2o="s/\\.lo\$/.${objext}/" ++o2lo="s/\\.${objext}\$/.lo/" ++extracted_archives= ++extracted_serial=0 + -+ #define _GNU_SOURCE -+ #include ++# 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= + -+int -+main () ++# func_append var value ++# Append VALUE to the end of shell variable VAR. ++func_append () +{ ++ eval "${1}=\$${1}\${2}" ++} # func_append may be replaced by extended shell implementation + - float f; - return isnormal(f) || !isnormal(f) ? 0 : 1; -- } --EOF --if { (eval echo configure:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- cat >> confdefs.h <<\EOF ++# func_append_quoted var value ++# Quote VALUE and append to the end of shell variable VAR, separated ++# by a space. ++func_append_quoted () ++{ ++ func_quote_for_eval "${2}" ++ eval "${1}=\$${1}\\ \$func_quote_for_eval_result" ++} # func_append_quoted may be replaced by extended shell implementation + -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_ISNORMAL 1 --EOF -- echo "$ac_t""yes" 1>&6 -+_ACEOF + -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo $ac_n "checking for fpclass in ieeefp.h""... $ac_c" 1>&6 --echo "configure:4495: checking for fpclass in ieeefp.h" >&5 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ $as_echo "$as_me:$LINENO: checking for fpclass in ieeefp.h" >&5 -+$as_echo_n "checking for fpclass in ieeefp.h... " >&6; } - if test "$cross_compiling" = yes; then -- HAVE_IEEEFP=0 echo "$ac_t""no" 1>&6 -+ HAVE_IEEEFP=0 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - else -- cat > conftest.$ac_ext < -- int main() { -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ ++# func_arith arithmetic-term... ++func_arith () ++{ ++ func_arith_result=`expr "${@}"` ++} # func_arith may be replaced by extended shell implementation + -+ #include + -+int -+main () ++# func_len string ++# STRING may not start with a hyphen. ++func_len () +{ ++ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` ++} # func_len may be replaced by extended shell implementation + - float f; - return fpclass(f)>=FP_NZERO || fpclass(f)&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- cat >> confdefs.h <<\EOF -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_IEEEFP 1 --EOF -- echo "$ac_t""yes" 1>&6 -+_ACEOF + -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- HAVE_IEEEFP=0 echo "$ac_t""no" 1>&6 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+HAVE_IEEEFP=0 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - -- ++# func_lo2o object ++func_lo2o () ++{ ++ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` ++} # func_lo2o may be replaced by extended shell implementation + - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - - --echo $ac_n "checking for isfinite""... $ac_c" 1>&6 --echo "configure:4530: checking for isfinite" >&5 + -+{ $as_echo "$as_me:$LINENO: checking for isfinite" >&5 -+$as_echo_n "checking for isfinite... " >&6; } - if test "$cross_compiling" = yes; then -- HAVE_ISFINITE=0 echo "$ac_t""no" 1>&6 -+ HAVE_ISFINITE=0 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - else -- cat > conftest.$ac_ext < -- int main() { -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ ++# func_xform libobj-or-source ++func_xform () ++{ ++ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` ++} # func_xform may be replaced by extended shell implementation + -+ #define _GNU_SOURCE -+ #include + -+int -+main () ++# 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." ++} + - float f; - return isfinite(f) || !isfinite(f) ? 0 : 1; -- } --EOF --if { (eval echo configure:4544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- cat >> confdefs.h <<\EOF + -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_ISFINITE 1 --EOF -- echo "$ac_t""yes" 1>&6 -+_ACEOF -+ -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- echo $ac_n "checking for finite()""... $ac_c" 1>&6 --echo "configure:4555: checking for finite()" >&5 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+{ $as_echo "$as_me:$LINENO: checking for finite()" >&5 -+$as_echo_n "checking for finite()... " >&6; } - if test "$cross_compiling" = yes; then -- HAVE_FINITE=0 echo "$ac_t""no" 1>&6 -+ HAVE_FINITE=0 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - else -- cat > conftest.$ac_ext < -- #include -- int main() { -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ #include -+ #include -+ -+int -+main () ++# func_config ++# Display the configuration for all the tags in this script. ++func_config () +{ ++ re_begincf='^# ### BEGIN LIBTOOL' ++ re_endcf='^# ### END LIBTOOL' + - float f; - return finite(f) || !finite(f) ? 0 : 1; -- } --EOF --if { (eval echo configure:4569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -- cat >> confdefs.h <<\EOF -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_FINITE 1 --EOF -- echo "$ac_t""yes" 1>&6 -+_ACEOF -+ -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- HAVE_FINITE=0 echo "$ac_t""no" 1>&6 -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+HAVE_FINITE=0 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - -- -+ - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - - - ++ # Default configuration. ++ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" -+ - #-------------------------------------------------------------------- - # Check for the existence of the -lsocket and -lnsl libraries. - # The order here is important, so that they end up in the right -@@ -4605,94 +10570,162 @@ - # To get around this problem, check for both libraries together - # if -lsocket doesn't work by itself. - #-------------------------------------------------------------------- --echo $ac_n "checking for sockets""... $ac_c" 1>&6 --echo "configure:4610: checking for sockets" >&5 - tcl_checkBoth=0 --echo $ac_n "checking for connect""... $ac_c" 1>&6 --echo "configure:4613: checking for connect" >&5 --if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for connect" >&5 -+$as_echo_n "checking for connect... " >&6; } -+if test "${ac_cv_func_connect+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define connect to an innocuous variant, in case declares connect. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define connect innocuous_connect -+ - /* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char connect(); below. */ --#include --/* Override any gcc2 internal prototype to avoid an error. */ --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char connect(); -+ which can conflict with char connect (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ - --int main() { -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif -+ -+#undef connect +- --config) +- sed -n -e '/^### BEGIN LIBTOOL CONFIG/,/^### END LIBTOOL CONFIG/p' < "$0" + # Now print the configurations for the tags. + for tagname in $taglist; do +- sed -n -e "/^### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0" ++ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done +- exit 0 +- ;; -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char connect (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ --#if defined (__stub_connect) || defined (__stub___connect) -+#if defined __stub_connect || defined __stub___connect - choke me --#else --connect(); - #endif +- --debug) +- echo "$progname: enabling shell trace mode" +- set -x +- ;; +- +- --dry-run | -n) +- run=: +- ;; ++ exit $? ++} --; return 0; } --EOF --if { (eval echo configure:4641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_func_connect=yes" -+int -+main () +- --features) ++# func_features ++# Display the features supported by this script. ++func_features () +{ -+return connect (); -+ ; -+ return 0; + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" +@@ -205,349 +934,1184 @@ do + else + echo "disable static libraries" + fi +- exit 0 +- ;; + +- --finish) mode="finish" ;; ++ exit $? +} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_func_connect=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_func_connect=no" --fi --rm -f conftest* -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_func_connect=no - fi --if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -+$as_echo "$ac_cv_func_connect" >&6; } -+if test "x$ac_cv_func_connect" = x""yes; then - tcl_checkSocket=0 - else -- echo "$ac_t""no" 1>&6 --tcl_checkSocket=1 -+ tcl_checkSocket=1 - fi +- --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" - if test "$tcl_checkSocket" = 1; then -- echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 --echo "configure:4663: checking for main in -lsocket" >&5 --ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ { $as_echo "$as_me:$LINENO: checking for main in -lsocket" >&5 -+$as_echo_n "checking for main in -lsocket... " >&6; } -+if test "${ac_cv_lib_socket_main+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- ac_save_LIBS="$LIBS" -+ ac_check_lib_save_LIBS=$LIBS - LIBS="-lsocket $LIBS" --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ +- --quiet | --silent) +- show=: +- ;; ++ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" ++ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" ++ sed_extractcf="/$re_begincf/,/$re_endcf/p" --int main() { --main() --; return 0; } --EOF --if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" +- --tag) prevopt="--tag" prev=tag ;; +- --tag=*) +- set tag "$optarg" ${1+"$@"} ++ # Validate tagname. ++ case $tagname in ++ *[!-_A-Za-z0-9,/]*) ++ func_fatal_error "invalid tag name: $tagname" ++ ;; ++ esac + -+int -+main () -+{ -+return main (); -+ ; -+ return 0; ++ # 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" ++ ++ # 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 +} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_socket_main=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_lib_socket_main=no - fi --rm -f conftest* --LIBS="$ac_save_LIBS" - -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS - fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5 -+$as_echo "$ac_cv_lib_socket_main" >&6; } -+if test "x$ac_cv_lib_socket_main" = x""yes; then - TLIBS="$TLIBS -lsocket" - else -- echo "$ac_t""no" 1>&6 --tcl_checkBoth=1 -+ tcl_checkBoth=1 - fi - - fi -@@ -4701,136 +10734,247 @@ - if test "$tcl_checkBoth" = 1; then - tk_oldLibs=$TLIBS - TLIBS="$TLIBS -lsocket -lnsl" -- echo $ac_n "checking for accept""... $ac_c" 1>&6 --echo "configure:4706: checking for accept" >&5 --if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ { $as_echo "$as_me:$LINENO: checking for accept" >&5 -+$as_echo_n "checking for accept... " >&6; } -+if test "${ac_cv_func_accept+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define accept to an innocuous variant, in case declares accept. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define accept innocuous_accept -+ - /* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char accept(); below. */ --#include --/* Override any gcc2 internal prototype to avoid an error. */ --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char accept(); -+ which can conflict with char accept (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ - --int main() { -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif + -+#undef accept - -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char accept (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ --#if defined (__stub_accept) || defined (__stub___accept) -+#if defined __stub_accept || defined __stub___accept - choke me --#else --accept(); - #endif - --; return 0; } --EOF --if { (eval echo configure:4734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_func_accept=yes" -+int -+main () ++# func_check_version_match ++# Ensure that we are using m4 macros, and libtool script from the same ++# release of libtool. ++func_check_version_match () +{ -+return accept (); -+ ; -+ return 0; ++ if test "$package_revision" != "$macro_revision"; then ++ if test "$VERSION" != "$macro_version"; then ++ if test -z "$macro_version"; then ++ cat >&2 <<_LT_EOF ++$progname: Version mismatch error. This is $PACKAGE $VERSION, but the ++$progname: definition of this LT_INIT comes from an older release. ++$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION ++$progname: and run autoconf again. ++_LT_EOF ++ else ++ cat >&2 <<_LT_EOF ++$progname: Version mismatch error. This is $PACKAGE $VERSION, but the ++$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. ++$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION ++$progname: and run autoconf again. ++_LT_EOF ++ fi ++ else ++ cat >&2 <<_LT_EOF ++$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, ++$progname: but the definition of this LT_INIT comes from revision $macro_revision. ++$progname: You should recreate aclocal.m4 with macros from revision $package_revision ++$progname: of $PACKAGE $VERSION and run autoconf again. ++_LT_EOF ++ fi ++ ++ exit $EXIT_MISMATCH ++ fi +} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; ++ ++ ++# 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 -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_func_accept=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_func_accept=no" --fi --rm -f conftest* -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 + -+ ac_cv_func_accept=no - fi - --if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5 -+$as_echo "$ac_cv_func_accept" >&6; } -+if test "x$ac_cv_func_accept" = x""yes; then - tcl_checkNsl=0 - else -- echo "$ac_t""no" 1>&6 --TLIBS=$tk_oldLibs -+ TLIBS=$tk_oldLibs - fi - - fi --echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 --echo "configure:4756: checking for gethostbyname" >&5 --if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5 -+$as_echo_n "checking for gethostbyname... " >&6; } -+if test "${ac_cv_func_gethostbyname+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define gethostbyname innocuous_gethostbyname -+ - /* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char gethostbyname(); below. */ --#include --/* Override any gcc2 internal prototype to avoid an error. */ --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char gethostbyname(); -+ which can conflict with char gethostbyname (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ - --int main() { -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif + -+#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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char gethostbyname (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ --#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) -+#if defined __stub_gethostbyname || defined __stub___gethostbyname - choke me --#else --gethostbyname(); - #endif - --; return 0; } --EOF --if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_func_gethostbyname=yes" -+int -+main () -+{ -+return gethostbyname (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_func_gethostbyname=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_func_gethostbyname=no" --fi --rm -f conftest* -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 + -+ ac_cv_func_gethostbyname=no - fi - --if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -+$as_echo "$ac_cv_func_gethostbyname" >&6; } -+if test "x$ac_cv_func_gethostbyname" = x""yes; then - : - else -- echo "$ac_t""no" 1>&6 --echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 --echo "configure:4802: checking for main in -lnsl" >&5 --ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ { $as_echo "$as_me:$LINENO: checking for main in -lnsl" >&5 -+$as_echo_n "checking for main in -lnsl... " >&6; } -+if test "${ac_cv_lib_nsl_main+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- ac_save_LIBS="$LIBS" -+ ac_check_lib_save_LIBS=$LIBS - LIBS="-lnsl $LIBS" --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - --int main() { --main() --; return 0; } --EOF --if { (eval echo configure:4817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" ++# Option defaults: ++opt_debug=: ++opt_dry_run=false ++opt_config=false ++opt_preserve_dup_deps=false ++opt_features=false ++opt_finish=false ++opt_help=false ++opt_help_all=false ++opt_silent=: ++opt_verbose=: ++opt_silent=false ++opt_verbose=false + -+int -+main () ++ ++# Parse options once, thoroughly. This comes as soon as possible in the ++# script to make things like `--version' happen as quickly as we can. +{ -+return main (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_nsl_main=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_lib_nsl_main=no - fi --rm -f conftest* --LIBS="$ac_save_LIBS" - -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS - fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5 -+$as_echo "$ac_cv_lib_nsl_main" >&6; } -+if test "x$ac_cv_lib_nsl_main" = x""yes; then - TLIBS="$TLIBS -lnsl" --else -- echo "$ac_t""no" 1>&6 - fi ++ # this just eases exit handling ++ while test $# -gt 0; do ++ opt="$1" + shift +- prev=tag +- ;; ++ case $opt in ++ --debug|-x) opt_debug='set -x' ++ func_echo "enabling shell trace mode" ++ $opt_debug ++ ;; ++ --dry-run|--dryrun|-n) ++ opt_dry_run=: ++ ;; ++ --config) ++ opt_config=: ++func_config ++ ;; ++ --dlopen|-dlopen) ++ optarg="$1" ++ opt_dlopen="${opt_dlopen+$opt_dlopen ++}$optarg" ++ shift ++ ;; ++ --preserve-dup-deps) ++ opt_preserve_dup_deps=: ++ ;; ++ --features) ++ opt_features=: ++func_features ++ ;; ++ --finish) ++ opt_finish=: ++set dummy --mode finish ${1+"$@"}; shift ++ ;; ++ --help) ++ opt_help=: ++ ;; ++ --help-all) ++ opt_help_all=: ++opt_help=': help-all' ++ ;; ++ --mode) ++ test $# = 0 && func_missing_arg $opt && break ++ optarg="$1" ++ opt_mode="$optarg" ++case $optarg in ++ # Valid mode arguments: ++ clean|compile|execute|finish|install|link|relink|uninstall) ;; - fi -@@ -4839,137 +10983,299 @@ - RL_OBJS="" - RL_LIB="" - if test "$enable_readline" = "yes" ; then -- for ac_hdr in readline/readline.h -+ -+for ac_header in readline/readline.h - do --ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:4847: 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:4857: \"$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;; +- -dlopen) +- prevopt="-dlopen" +- prev=execute_dlfiles +- ;; ++ # Catch anything else as an error ++ *) func_error "invalid argument for $opt" ++ exit_cmd=exit ++ break ++ ;; +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* ++ shift ++ ;; ++ --no-silent|--no-quiet) ++ opt_silent=false ++func_append preserve_args " $opt" ++ ;; ++ --no-verbose) ++ opt_verbose=false ++func_append preserve_args " $opt" ++ ;; ++ --silent|--quiet) ++ opt_silent=: ++func_append preserve_args " $opt" ++ opt_verbose=false ++ ;; ++ --verbose|-v) ++ opt_verbose=: ++func_append preserve_args " $opt" ++opt_silent=false ++ ;; ++ --tag) ++ test $# = 0 && func_missing_arg $opt && break ++ optarg="$1" ++ opt_tag="$optarg" ++func_append preserve_args " $opt $optarg" ++func_enable_tag "$optarg" ++ shift ++ ;; + +- -*) +- $echo "$modename: unrecognized option \`$arg'" 1>&2 +- $echo "$help" 1>&2 +- exit 1 ++ -\?|-h) func_usage ;; ++ --help) func_help ;; ++ --version) func_version ;; + -+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; } ++ # Separate optargs to long options: ++ --*=*) ++ func_split_long_opt "$opt" ++ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} ++ shift ++ ;; + -+# 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 ++ # Separate non-argument short options: ++ -\?*|-h*|-n*|-v*) ++ func_split_short_opt "$opt" ++ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} ++ shift ++ ;; + -+ 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___%'` -- cat >> confdefs.h <&6 --echo "configure:4878: checking for main in -lreadline" >&5 --ac_lib_var=`echo readline'_'main | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ -+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;} ++ --) break ;; ++ -*) func_fatal_help "unrecognized option \`$opt'" ;; ++ *) set dummy "$opt" ${1+"$@"}; shift; break ;; ++ esac ++ done + -+ ;; -+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 -- ac_save_LIBS="$LIBS" -+ 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; } ++ # Validate options: + -+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 -+ { $as_echo "$as_me:$LINENO: checking for main in -lreadline" >&5 -+$as_echo_n "checking for main in -lreadline... " >&6; } -+if test "${ac_cv_lib_readline_main+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS - LIBS="-lreadline $LIBS" --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - --int main() { --main() --; return 0; } --EOF --if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" ++ # save first non-option argument ++ if test "$#" -gt 0; then ++ nonopt="$opt" ++ shift ++ fi + -+int -+main () -+{ -+return main (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_readline_main=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_lib_readline_main=no - fi --rm -f conftest* --LIBS="$ac_save_LIBS" - -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS - fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- cat >> confdefs.h <<\EOF -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_main" >&5 -+$as_echo "$ac_cv_lib_readline_main" >&6; } -+if test "x$ac_cv_lib_readline_main" = x""yes; then -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_READLINE 1 --EOF -- -+_ACEOF ++ # preserve --debug ++ test "$opt_debug" = : || func_append preserve_args " --debug" + - TLIBS="$TLIBS -lreadline" - RL_OBJS=gcl_readline.o - # Readline support now initialized automatically when compiled in, this lisp - # object no longer needed -- 20040102 CM - # RL_LIB=lsp/gcl_readline.o -- --else -- echo "$ac_t""no" 1>&6 ++ case $host in ++ *cygwin* | *mingw* | *pw32* | *cegcc*) ++ # don't eliminate duplications in $postdeps and $predeps ++ opt_duplicate_compiler_generated_deps=: ++ ;; ++ *) ++ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ++ ;; ++ esac + - fi - --else -- echo "$ac_t""no" 1>&6 - fi ++ $opt_help || { ++ # Sanity checks first: ++ func_check_version_match + - done - - - # These tests discover differences between readline 4.1 and 4.3 -- echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 --echo "configure:4930: checking for rl_completion_matches in -lreadline" >&5 --ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ { $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5 -+$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; } -+if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- ac_save_LIBS="$LIBS" -+ ac_check_lib_save_LIBS=$LIBS - LIBS="-lreadline $LIBS" --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - --int main() { --rl_completion_matches() --; return 0; } --EOF --if { (eval echo configure:4949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char rl_completion_matches (); -+int -+main () -+{ -+return rl_completion_matches (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_readline_rl_completion_matches=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_lib_readline_rl_completion_matches=no - fi --rm -f conftest* --LIBS="$ac_save_LIBS" - -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS - fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- cat >> confdefs.h <<\EOF -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5 -+$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; } -+if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_DECL_RL_COMPLETION_MATCHES 1 --EOF -+_ACEOF - -- cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_RL_COMPENTRY_FUNC_T 1 --EOF -+_ACEOF - --else -- echo "$ac_t""no" 1>&6 - fi - - fi -@@ -4977,11 +11283,14 @@ - - - --echo $ac_n "checking For network code for nsocket.c""... $ac_c" 1>&6 --echo "configure:4982: checking For network code for nsocket.c" >&5 --cat > conftest.$ac_ext <&5 -+$as_echo_n "checking for network code for nsocket.c... " >&6; } -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - - #include - #include -@@ -4991,7 +11300,7 @@ - #include - #include - --/************* for the sockets ******************/ -+/************* for the sockets ******************/ - #include /* struct sockaddr, SOCK_STREAM, ... */ - #ifndef NO_UNAME - # include /* uname system call. */ -@@ -5000,297 +11309,520 @@ - #include /* inet_ntoa() */ - #include /* gethostbyname() */ - --int main() { -- connect(0,(struct sockaddr *)0,0); -+int -+main () -+{ -+connect(0,(struct sockaddr *)0,0); - gethostbyname("jil"); - socket(AF_INET, SOCK_STREAM, 0); -- --; return 0; } --EOF --if { (eval echo configure:5011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- cat >> confdefs.h <<\EOF ++ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then ++ func_fatal_configuration "not configured to build any kind of library" ++ fi + -+ ; -+ return 0; ++ # Darwin sucks ++ eval std_shrext=\"$shrext_cmds\" ++ ++ # Only execute mode is allowed to have -dlopen flags. ++ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then ++ func_error "unrecognized option \`-dlopen'" ++ $ECHO "$help" 1>&2 ++ exit $EXIT_FAILURE ++ fi ++ ++ # Change the help message to a mode-specific one. ++ generic_help="$help" ++ help="Try \`$progname --help --mode=$opt_mode' for more information." ++ } ++ ++ ++ # Bail if the options were screwed ++ $exit_cmd $EXIT_FAILURE +} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_NSOCKET 1 --EOF -+_ACEOF - -- echo "$ac_t""yes" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- echo "$ac_t""no" 1>&6 -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi --rm -f conftest* - -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext + + -+{ $as_echo "$as_me:$LINENO: checking for listen using fcntl" >&5 -+$as_echo_n "checking for listen using fcntl... " >&6; } -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - --echo $ac_n "checking check for listen using fcntl""... $ac_c" 1>&6 --echo "configure:5028: checking check for listen using fcntl" >&5 --cat > conftest.$ac_ext < - #include - --int main() { -+int -+main () ++ ++ ++## ----------- ## ++## Main. ## ++## ----------- ## ++ ++# func_lalib_p file ++# True iff FILE is a libtool `.la' library or `.lo' object file. ++# This function is only a basic sanity check; it will hardly flush out ++# determined imposters. ++func_lalib_p () +{ - FILE *fp=fopen("configure.in","r"); - int orig; - orig = fcntl(fileno(fp), F_GETFL); - if (! (orig & O_NONBLOCK )) return 0; - --; return 0; } --EOF --if { (eval echo configure:5043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -- rm -rf conftest* -- cat >> confdefs.h <<\EOF -+ ; -+ return 0; ++ test -f "$1" && ++ $SED -e 4q "$1" 2>/dev/null \ ++ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} -+_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 -+ cat >>confdefs.h <<\_ACEOF - #define LISTEN_USE_FCNTL 1 --EOF -+_ACEOF - -- echo "$ac_t""yes" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- echo "$ac_t""no" 1>&6 -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi --rm -f conftest* - -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - --echo $ac_n "checking for profil""... $ac_c" 1>&6 --echo "configure:5062: checking for profil" >&5 --if eval "test \"`echo '$''{'ac_cv_func_profil'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 + -+{ $as_echo "$as_me:$LINENO: checking for profil" >&5 -+$as_echo_n "checking for profil... " >&6; } -+if test "${ac_cv_func_profil+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define profil to an innocuous variant, in case declares profil. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define profil innocuous_profil -+ - /* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char profil(); below. */ --#include --/* Override any gcc2 internal prototype to avoid an error. */ --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char profil(); -+ which can conflict with char profil (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ - --int main() { -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif ++# 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 ++} + -+#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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char profil (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ --#if defined (__stub_profil) || defined (__stub___profil) -+#if defined __stub_profil || defined __stub___profil - choke me --#else --profil(); - #endif - --; return 0; } --EOF --if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_func_profil=yes" -+int -+main () ++# 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 () +{ -+return profil (); -+ ; -+ return 0; ++ func_lalib_p "$1" +} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_func_profil=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_func_profil=no" --fi --rm -f conftest* -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 + -+ ac_cv_func_profil=no - fi - --if eval "test \"`echo '$ac_cv_func_'profil`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_profil" >&5 -+$as_echo "$ac_cv_func_profil" >&6; } -+if test "x$ac_cv_func_profil" = x""yes; then - : - else -- echo "$ac_t""no" 1>&6 --cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define NO_PROFILE 1 --EOF -+_ACEOF - - fi - - --echo $ac_n "checking for setenv""... $ac_c" 1>&6 --echo "configure:5115: checking for setenv" >&5 --if eval "test \"`echo '$''{'ac_cv_func_setenv'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for setenv" >&5 -+$as_echo_n "checking for setenv... " >&6; } -+if test "${ac_cv_func_setenv+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define setenv to an innocuous variant, in case declares setenv. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define setenv innocuous_setenv -+ - /* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char setenv(); below. */ --#include --/* Override any gcc2 internal prototype to avoid an error. */ --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char setenv(); -+ which can conflict with char setenv (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ - --int main() { -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif ++# 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 ++} + -+#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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char setenv (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ --#if defined (__stub_setenv) || defined (__stub___setenv) -+#if defined __stub_setenv || defined __stub___setenv - choke me --#else --setenv(); - #endif - --; return 0; } --EOF --if { (eval echo configure:5143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_func_setenv=yes" -+int -+main () ++# 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 () +{ -+return setenv (); -+ ; -+ return 0; ++ func_dirname_and_basename "$1" "" "." ++ func_stripname '' '.exe' "$func_basename_result" ++ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" +} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_func_setenv=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_func_setenv=no" --fi --rm -f conftest* -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 + -+ ac_cv_func_setenv=no - fi - --if eval "test \"`echo '$ac_cv_func_'setenv`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- cat >> confdefs.h <<\EOF -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_setenv" >&5 -+$as_echo "$ac_cv_func_setenv" >&6; } -+if test "x$ac_cv_func_setenv" = x""yes; then -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_SETENV 1 --EOF -+_ACEOF - - else -- echo "$ac_t""no" 1>&6 --no_setenv=1 -+ no_setenv=1 - fi - - - if test "$no_setenv" = "1" ; then --echo $ac_n "checking for putenv""... $ac_c" 1>&6 --echo "configure:5169: checking for putenv" >&5 --if eval "test \"`echo '$''{'ac_cv_func_putenv'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for putenv" >&5 -+$as_echo_n "checking for putenv... " >&6; } -+if test "${ac_cv_func_putenv+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define putenv to an innocuous variant, in case declares putenv. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define putenv innocuous_putenv -+ - /* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char putenv(); below. */ --#include --/* Override any gcc2 internal prototype to avoid an error. */ --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char putenv(); -+ which can conflict with char putenv (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ - --int main() { -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif - -+#undef putenv ++# 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" ++} + -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char putenv (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ --#if defined (__stub_putenv) || defined (__stub___putenv) -+#if defined __stub_putenv || defined __stub___putenv - choke me --#else --putenv(); - #endif - --; return 0; } --EOF --if { (eval echo configure:5197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_func_putenv=yes" -+int -+main () ++ ++# 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 () +{ -+return putenv (); -+ ; -+ return 0; ++ $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 +} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_func_putenv=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_func_putenv=no" --fi --rm -f conftest* -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 + -+ ac_cv_func_putenv=no - fi - --if eval "test \"`echo '$ac_cv_func_'putenv`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- cat >> confdefs.h <<\EOF -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_putenv" >&5 -+$as_echo "$ac_cv_func_putenv" >&6; } -+if test "x$ac_cv_func_putenv" = x""yes; then -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_PUTENV 1 --EOF -+_ACEOF - --else -- echo "$ac_t""no" 1>&6 - fi - - - fi - --echo $ac_n "checking for _cleanup""... $ac_c" 1>&6 --echo "configure:5223: checking for _cleanup" >&5 --if eval "test \"`echo '$''{'ac_cv_func__cleanup'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for _cleanup" >&5 -+$as_echo_n "checking for _cleanup... " >&6; } -+if test "${ac_cv_func__cleanup+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define _cleanup to an innocuous variant, in case declares _cleanup. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define _cleanup innocuous__cleanup -+ - /* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char _cleanup(); below. */ --#include --/* Override any gcc2 internal prototype to avoid an error. */ --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char _cleanup(); -+ which can conflict with char _cleanup (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ - --int main() { -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif + -+#undef _cleanup - -+/* 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. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char _cleanup (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ --#if defined (__stub__cleanup) || defined (__stub____cleanup) -+#if defined __stub__cleanup || defined __stub____cleanup - choke me --#else --_cleanup(); - #endif - --; return 0; } --EOF --if { (eval echo configure:5251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_func__cleanup=yes" -+int -+main () ++# 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 () +{ -+return _cleanup (); -+ ; -+ return 0; ++ $opt_debug ++ case $1 in ++ */* | *\\*) . "$1" ;; ++ *) . "./$1" ;; ++ esac +} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_func__cleanup=yes - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_func__cleanup=no" --fi --rm -f conftest* -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 + -+ ac_cv_func__cleanup=no - fi - --if eval "test \"`echo '$ac_cv_func_'_cleanup`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- cat >> confdefs.h <<\EOF -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func__cleanup" >&5 -+$as_echo "$ac_cv_func__cleanup" >&6; } -+if test "x$ac_cv_func__cleanup" = x""yes; then -+ cat >>confdefs.h <<\_ACEOF - #define USE_CLEANUP 1 --EOF -+_ACEOF - --else -- echo "$ac_t""no" 1>&6 - fi - - - gcl_ok=no - --cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - #include --EOF + -+_ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- egrep "LITTLE_ENDIAN" >/dev/null 2>&1; then -- rm -rf conftest* -+ $EGREP "LITTLE_ENDIAN" >/dev/null 2>&1; then - gcl_ok=yes - else -- rm -rf conftest* -- gcl_ok=noo -+ gcl_ok=no - fi - rm -f conftest* ++# func_resolve_sysroot PATH ++# Replace a leading = in PATH with a sysroot. Store the result into ++# func_resolve_sysroot_result ++func_resolve_sysroot () ++{ ++ func_resolve_sysroot_result=$1 ++ case $func_resolve_sysroot_result in ++ =*) ++ func_stripname '=' '' "$func_resolve_sysroot_result" ++ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; ++ esac ++} - if test $gcl_ok = yes ; then --cat >> confdefs.h <<\EOF -+cat >>confdefs.h <<\_ACEOF - #define ENDIAN_ALREADY_DEFINED 1 --EOF -+_ACEOF ++# func_replace_sysroot PATH ++# If PATH begins with the sysroot, replace it with = and ++# store the result into func_replace_sysroot_result. ++func_replace_sysroot () ++{ ++ case "$lt_sysroot:$1" in ++ ?*:"$lt_sysroot"*) ++ func_stripname "$lt_sysroot" '' "$1" ++ func_replace_sysroot_result="=$func_stripname_result" ++ ;; + *) +- nonopt="$arg" +- break ++ # Including no sysroot. ++ func_replace_sysroot_result=$1 + ;; + esac +-done ++} - fi - -@@ -5300,282 +11832,633 @@ - - - # if test "x$enable_machine" = "x" ; then --echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6 --echo "configure:5305: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -+{ $as_echo "$as_me:$LINENO: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5 -+$as_echo_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... " >&6; } - - case $system in - OSF*) -- cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define USE_FIONBIO 1 --EOF -+_ACEOF - -- echo "$ac_t""FIONBIO" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: FIONBIO" >&5 -+$as_echo "FIONBIO" >&6; } - ;; - SunOS-4*) -- cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define USE_FIONBIO 1 --EOF -+_ACEOF - -- echo "$ac_t""FIONBIO" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: FIONBIO" >&5 -+$as_echo "FIONBIO" >&6; } - ;; - ULTRIX-4.*) -- cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define USE_FIONBIO 1 --EOF -+_ACEOF - -- echo "$ac_t""FIONBIO" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: FIONBIO" >&5 -+$as_echo "FIONBIO" >&6; } - ;; - *) -- echo "$ac_t""O_NONBLOCK" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: O_NONBLOCK" >&5 -+$as_echo "O_NONBLOCK" >&6; } - ;; - esac +-if test -n "$prevopt"; then +- $echo "$modename: option \`$prevopt' requires an argument" 1>&2 +- $echo "$help" 1>&2 +- exit 1 +-fi ++# func_infer_tag arg ++# Infer tagged configuration to use if any are available and ++# if one wasn't chosen via the "--tag" command line option. ++# Only attempt this if the compiler in the base compile ++# command doesn't match the default compiler. ++# arg is usually of the form 'gcc ...' ++func_infer_tag () ++{ ++ $opt_debug ++ if test -n "$available_tags" && test -z "$tagname"; then ++ CC_quoted= ++ for arg in $CC; do ++ func_append_quoted CC_quoted "$arg" ++ done ++ CC_expanded=`func_echo_all $CC` ++ CC_quoted_expanded=`func_echo_all $CC_quoted` ++ case $@ in ++ # Blanks in the command may have been stripped by the calling shell, ++ # but not from the CC environment variable when configure was run. ++ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ ++ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; ++ # Blanks at the start of $base_compile will cause this to fail ++ # if we don't check for them as well. ++ *) ++ for z in $available_tags; do ++ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then ++ # Evaluate the configuration. ++ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" ++ CC_quoted= ++ for arg in $CC; do ++ # Double-quote args containing other shell metacharacters. ++ func_append_quoted CC_quoted "$arg" ++ done ++ CC_expanded=`func_echo_all $CC` ++ CC_quoted_expanded=`func_echo_all $CC_quoted` ++ case "$@ " in ++ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ ++ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ++ # The compiler in the base compile command matches ++ # the one in the tagged configuration. ++ # Assume this is the tagged configuration we want. ++ tagname=$z ++ break ++ ;; ++ esac ++ fi ++ done ++ # If $tagname still isn't set, then no tagged configuration ++ # was found and let the user know that the "--tag" command ++ # line option must be used. ++ if test -z "$tagname"; then ++ func_echo "unable to infer tagged configuration" ++ func_fatal_error "specify a tag with \`--tag'" ++# else ++# func_verbose "using $tagname tagged configuration" ++ fi ++ ;; ++ esac ++ fi ++} +-# If this variable is set in any of the actions, the command in it +-# will be execed at the end. This prevents here-documents from being +-# left over by shells. +-exec_cmd= --echo $ac_n "checking check for SV_ONSTACK""... $ac_c" 1>&6 --echo "configure:5336: checking check for SV_ONSTACK" >&5 --cat > conftest.$ac_ext <&5 -+$as_echo_n "checking for SV_ONSTACK... " >&6; } -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ - #include - int joe=SV_ONSTACK; +-if test -z "$show_help"; then --int main() { -+int -+main () +- # Infer the operation mode. +- if test -z "$mode"; then +- case $nonopt in +- *cc | *++ | gcc* | *-gcc*) +- mode=link +- for arg +- do +- case $arg in +- -c) +- mode=compile +- break +- ;; +- esac +- done +- ;; +- *db | *dbx | *strace | *truss) +- mode=execute +- ;; +- *install*|cp|mv) +- mode=install +- ;; +- *rm) +- mode=uninstall +- ;; +- *) +- # If we have no mode, but dlfiles were specified, then do execute mode. +- test -n "$execute_dlfiles" && mode=execute ++# func_write_libtool_object output_name pic_name nonpic_name ++# Create a libtool object file (analogous to a ".la" file), ++# but don't create it if we're doing a dry run. ++func_write_libtool_object () +{ ++ write_libobj=${1} ++ if test "$build_libtool_libs" = yes; then ++ write_lobj=\'${2}\' ++ else ++ write_lobj=none ++ fi --; return 0; } --EOF --if { (eval echo configure:5347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -- rm -rf conftest* -- cat >> confdefs.h <<\EOF -+ ; -+ return 0; +- # Just use the default operation mode. +- if test -z "$mode"; then +- if test -n "$nonopt"; then +- $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 +- else +- $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 +- fi ++ if test "$build_old_libs" = yes; then ++ write_oldobj=\'${3}\' ++ else ++ write_oldobj=none ++ fi ++ ++ $opt_dry_run || { ++ cat >${write_libobj}T <&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 -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_SV_ONSTACK 1 --EOF -+_ACEOF - -- -- echo "$ac_t""yes" 1>&6 + -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- echo "$ac_t""no" 1>&6 -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi --rm -f conftest* - --echo $ac_n "checking check for SIGSYS""... $ac_c" 1>&6 --echo "configure:5364: checking check for SIGSYS" >&5 --cat > conftest.$ac_ext <&5 -+$as_echo_n "checking for SIGSYS... " >&6; } -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ ++################################################## ++# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # ++################################################## + - #include - int joe=SIGSYS; - --int main() { -+int -+main () ++# func_convert_core_file_wine_to_w32 ARG ++# Helper function used by file name conversion functions when $build is *nix, ++# and $host is mingw, cygwin, or some other w32 environment. Relies on a ++# correctly configured wine environment available, with the winepath program ++# in $build's $PATH. ++# ++# ARG is the $build file name to be converted to w32 format. ++# Result is available in $func_convert_core_file_wine_to_w32_result, and will ++# be empty on error (or when ARG is empty) ++func_convert_core_file_wine_to_w32 () +{ - --; return 0; } --EOF --if { (eval echo configure:5375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -- rm -rf conftest* -- cat >> confdefs.h <<\EOF -+ ; -+ return 0; ++ $opt_debug ++ func_convert_core_file_wine_to_w32_result="$1" ++ if test -n "$1"; then ++ # Unfortunately, winepath does not exit with a non-zero error code, so we ++ # are forced to check the contents of stdout. On the other hand, if the ++ # command is not found, the shell will set an exit code of 127 and print ++ # *an error message* to stdout. So we must check for both error code of ++ # zero AND non-empty stdout, which explains the odd construction: ++ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` ++ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then ++ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | ++ $SED -e "$lt_sed_naive_backslashify"` ++ else ++ func_convert_core_file_wine_to_w32_result= ++ fi ++ fi +} -+_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 -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_SIGSYS 1 --EOF -+_ACEOF - -- -- echo "$ac_t""yes" 1>&6 -+ -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- echo "$ac_t""no" 1>&6 -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi --rm -f conftest* - -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++# end: func_convert_core_file_wine_to_w32 + + -+{ $as_echo "$as_me:$LINENO: checking for SIGEMT" >&5 -+$as_echo_n "checking for SIGEMT... " >&6; } -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - --echo $ac_n "checking check for SIGEMT""... $ac_c" 1>&6 --echo "configure:5393: checking check for SIGEMT" >&5 --cat > conftest.$ac_ext < - int joe=SIGEMT; - --int main() { -+int -+main () ++# func_convert_core_path_wine_to_w32 ARG ++# Helper function used by path conversion functions when $build is *nix, and ++# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly ++# configured wine environment available, with the winepath program in $build's ++# $PATH. Assumes ARG has no leading or trailing path separator characters. ++# ++# ARG is path to be converted from $build format to win32. ++# Result is available in $func_convert_core_path_wine_to_w32_result. ++# Unconvertible file (directory) names in ARG are skipped; if no directory names ++# are convertible, then the result may be empty. ++func_convert_core_path_wine_to_w32 () +{ - --; return 0; } --EOF --if { (eval echo configure:5404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -- rm -rf conftest* -- cat >> confdefs.h <<\EOF -+ ; -+ return 0; ++ $opt_debug ++ # unfortunately, winepath doesn't convert paths, only file names ++ func_convert_core_path_wine_to_w32_result="" ++ if test -n "$1"; then ++ oldIFS=$IFS ++ IFS=: ++ for func_convert_core_path_wine_to_w32_f in $1; do ++ IFS=$oldIFS ++ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" ++ if test -n "$func_convert_core_file_wine_to_w32_result" ; then ++ if test -z "$func_convert_core_path_wine_to_w32_result"; then ++ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" ++ else ++ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" ++ fi + fi ++ done ++ IFS=$oldIFS ++ fi +} -+_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 -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_SIGEMT 1 --EOF -+_ACEOF - -- -- echo "$ac_t""yes" 1>&6 ++# end: func_convert_core_path_wine_to_w32 + -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- echo "$ac_t""no" 1>&6 -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi --rm -f conftest* + -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - - - #if test $use = "386-linux" ; then -- for ac_hdr in asm/sigcontext.h -+ -+for ac_header in asm/sigcontext.h - do --ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` --echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 --echo "configure:5428: 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:5438: \"$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* ++# func_cygpath ARGS... ++# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when ++# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) ++# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or ++# (2), returns the Cygwin file name or path in func_cygpath_result (input ++# file name or path is assumed to be in w32 format, as previously converted ++# from $build's *nix or MSYS format). In case (3), returns the w32 file name ++# or path in func_cygpath_result (input file name or path is assumed to be in ++# Cygwin format). Returns an empty string on error. ++# ++# ARGS are passed to cygpath, with the last one being the file name or path to ++# be converted. ++# ++# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH ++# environment variable; do not put it in $PATH. ++func_cygpath () ++{ ++ $opt_debug ++ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then ++ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` ++ if test "$?" -ne 0; then ++ # on failure, ensure result is empty ++ func_cygpath_result= ++ fi ++ else ++ func_cygpath_result= ++ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" ++ fi ++} ++#end: func_cygpath + -+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 ++# func_convert_core_msys_to_w32 ARG ++# Convert file name or path ARG from MSYS format to w32 format. Return ++# result in func_convert_core_msys_to_w32_result. ++func_convert_core_msys_to_w32 () ++{ ++ $opt_debug ++ # awkward: cmd appends spaces to result ++ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | ++ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` ++} ++#end: func_convert_core_msys_to_w32 + -+ 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___%'` -- cat >> confdefs.h <&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 ++# func_convert_file_check ARG1 ARG2 ++# Verify that ARG1 (a file name in $build format) was converted to $host ++# format in ARG2. Otherwise, emit an error message, but continue (resetting ++# func_to_host_file_result to ARG1). ++func_convert_file_check () ++{ ++ $opt_debug ++ if test -z "$2" && test -n "$1" ; then ++ func_error "Could not determine host file name corresponding to" ++ func_error " \`$1'" ++ func_error "Continuing, but uninstalled executables may not work." ++ # Fallback: ++ func_to_host_file_result="$1" ++ fi ++} ++# end func_convert_file_check + - 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:5468: 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:5478: \"$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; } ++# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH ++# Verify that FROM_PATH (a path in $build format) was converted to $host ++# format in TO_PATH. Otherwise, emit an error message, but continue, resetting ++# func_to_host_file_result to a simplistic fallback value (see below). ++func_convert_path_check () ++{ ++ $opt_debug ++ if test -z "$4" && test -n "$3"; then ++ func_error "Could not determine the host path corresponding to" ++ func_error " \`$3'" ++ func_error "Continuing, but uninstalled executables may not work." ++ # Fallback. This is a deliberately simplistic "conversion" and ++ # should not be "improved". See libtool.info. ++ if test "x$1" != "x$2"; then ++ lt_replace_pathsep_chars="s|$1|$2|g" ++ func_to_host_path_result=`echo "$3" | ++ $SED -e "$lt_replace_pathsep_chars"` ++ else ++ func_to_host_path_result="$3" ++ fi ++ fi ++} ++# end func_convert_path_check + -+# 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___%'` -- cat >> confdefs.h <&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 ++# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG ++# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT ++# and appending REPL if ORIG matches BACKPAT. ++func_convert_path_front_back_pathsep () ++{ ++ $opt_debug ++ case $4 in ++ $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; -+ 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 ++ case $4 in ++ $2 ) func_append func_to_host_path_result "$3" + ;; -+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 ++ esac ++} ++# end func_convert_path_front_back_pathsep + -+fi + - done - -- echo $ac_n "checking for sigcontext...""... $ac_c" 1>&6 --echo "configure:5505: checking for sigcontext..." >&5 -- cat > conftest.$ac_ext < -- --int main() { -+ { $as_echo "$as_me:$LINENO: checking for sigcontext" >&5 -+$as_echo_n "checking for sigcontext... " >&6; } -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ ++################################################## ++# $build to $host FILE NAME CONVERSION FUNCTIONS # ++################################################## ++# invoked via `$to_host_file_cmd ARG' ++# ++# In each case, ARG is the path to be converted from $build to $host format. ++# Result will be available in $func_to_host_file_result. + -+ #include + -+int -+main () ++# func_to_host_file ARG ++# Converts the file name ARG from $build format to $host format. Return result ++# in func_to_host_file_result. ++func_to_host_file () +{ - - struct sigcontext foo; -- --; return 0; } --EOF --if { (eval echo configure:5517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -- rm -rf conftest* -- -+ -+ ; -+ return 0; ++ $opt_debug ++ $to_host_file_cmd "$1" +} -+_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 -+ - sigcontext_works=1; -- cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define SIGNAL_H_HAS_SIGCONTEXT 1 --EOF -+_ACEOF -+ -+ { $as_echo "$as_me:$LINENO: result: sigcontext in signal.h" >&5 -+$as_echo "sigcontext in signal.h" >&6; } - -- echo "$ac_t""sigcontext in signal.h" 1>&6 -- - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- sigcontext_works=0; -- echo "$ac_t""sigcontext NOT in signal.h" 1>&6 -- -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ sigcontext_works=0; -+ { $as_echo "$as_me:$LINENO: result: sigcontext NOT in signal.h" >&5 -+$as_echo "sigcontext NOT in signal.h" >&6; } ++# end func_to_host_file + - fi --rm -f conftest* + -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$sigcontext_works" = 0 ; then -- echo $ac_n "checking for sigcontext...""... $ac_c" 1>&6 --echo "configure:5538: checking for sigcontext..." >&5 -- cat > conftest.$ac_ext < -- #ifdef HAVE_ASM_SIGCONTEXT_H -+ { $as_echo "$as_me:$LINENO: checking for sigcontext" >&5 -+$as_echo_n "checking for sigcontext... " >&6; } -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ ++# func_to_tool_file ARG LAZY ++# converts the file name ARG from $build format to toolchain format. Return ++# result in func_to_tool_file_result. If the conversion in use is listed ++# in (the comma separated) LAZY, no conversion takes place. ++func_to_tool_file () ++{ ++ $opt_debug ++ case ,$2, in ++ *,"$to_tool_file_cmd",*) ++ func_to_tool_file_result=$1 + ;; +- esac ++ *) ++ $to_tool_file_cmd "$1" ++ func_to_tool_file_result=$func_to_host_file_result ++ ;; ++ esac ++} ++# end func_to_tool_file + -+ #include -+ #ifdef HAVE_ASM_SIGCONTEXT_H - #include - #endif -- #ifdef HAVE_ASM_SIGNAL_H -+ #ifdef HAVE_ASM_SIGNAL_H - #include - #endif -- --int main() { -- + -+int -+main () ++# func_convert_file_noop ARG ++# Copy ARG to func_to_host_file_result. ++func_convert_file_noop () +{ ++ func_to_host_file_result="$1" ++} ++# end func_convert_file_noop + - struct sigcontext foo; -- --; return 0; } --EOF --if { (eval echo configure:5556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -- rm -rf conftest* -- -- cat >> confdefs.h <<\EOF + -+ ; -+ return 0; ++# func_convert_file_msys_to_w32 ARG ++# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic ++# conversion to w32 is not available inside the cwrapper. Returns result in ++# func_to_host_file_result. ++func_convert_file_msys_to_w32 () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ func_convert_core_msys_to_w32 "$1" ++ func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi ++ func_convert_file_check "$1" "$func_to_host_file_result" +} -+_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 -+ -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_SIGCONTEXT 1 --EOF -+_ACEOF -+ -+ { $as_echo "$as_me:$LINENO: result: sigcontext in asm files" >&5 -+$as_echo "sigcontext in asm files" >&6; } ++# end func_convert_file_msys_to_w32 -- echo "$ac_t""sigcontext in asm files" 1>&6 -- - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- -- echo "$ac_t""no sigcontext found" 1>&6 -- -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+ { $as_echo "$as_me:$LINENO: result: no sigcontext found" >&5 -+$as_echo "no sigcontext found" >&6; } -+ - fi --rm -f conftest* +- # Only execute mode is allowed to have -dlopen flags. +- if test -n "$execute_dlfiles" && test "$mode" != execute; then +- $echo "$modename: unrecognized option \`-dlopen'" 1>&2 +- $echo "$help" 1>&2 +- exit 1 + -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ++# func_convert_file_cygwin_to_w32 ARG ++# Convert file name ARG from Cygwin to w32 format. Returns result in ++# func_to_host_file_result. ++func_convert_file_cygwin_to_w32 () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use ++ # LT_CYGPATH in this case. ++ func_to_host_file_result=`cygpath -m "$1"` + fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_cygwin_to_w32 - fi - # echo 'foo() {}' > conftest1.c - # $CC -S conftest1.c --# use_underscore=0 -+# use_underscore=0 - # if fgrep _foo conftest1.s ; then use_underscore=1 ; fi - # if test $use_underscore = 0 ; then - # MPI_FILE=mpi-386_no_under.o -@@ -5593,41 +12476,46 @@ +- # Change the help message to a mode-specific one. +- generic_help="$help" +- help="Try \`$modename --help --mode=$mode' for more information." - # Extract the first word of "emacs", so it can be a program name with args. - set dummy emacs; ac_word=$2 --echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:5598: checking for $ac_word" >&5 --if eval "test \"`echo '$''{'ac_cv_path_EMACS'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_path_EMACS+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- case "$EMACS" in -- /*) -+ case $EMACS in -+ [\\/]* | ?:[\\/]*) - ac_cv_path_EMACS="$EMACS" # Let the user override the test with a path. - ;; -- ?:/*) -- ac_cv_path_EMACS="$EMACS" # Let the user override the test with a dos path. -- ;; - *) -- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -- ac_dummy="$PATH" -- for ac_dir in $ac_dummy; do -- test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/$ac_word; then -- ac_cv_path_EMACS="$ac_dir/$ac_word" -- break -- fi -- done -- IFS="$ac_save_ifs" -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_path_EMACS="$as_dir/$ac_word$ac_exec_ext" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 +- # These modes are in order of execution frequency so that they run quickly. +- case $mode in +- # libtool compile mode +- compile) +- modename="$modename: compile" +- # Get the compilation command and the source file. +- base_compile= +- prev= +- lastarg= +- srcfile="$nonopt" +- suppress_output= ++# func_convert_file_nix_to_w32 ARG ++# Convert file name ARG from *nix to w32 format. Requires a wine environment ++# and a working winepath. Returns result in func_to_host_file_result. ++func_convert_file_nix_to_w32 () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ func_convert_core_file_wine_to_w32 "$1" ++ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi -+done -+done -+IFS=$as_save_IFS -+ - ;; - esac - fi --EMACS="$ac_cv_path_EMACS" -+EMACS=$ac_cv_path_EMACS - if test -n "$EMACS"; then -- echo "$ac_t""$EMACS" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: $EMACS" >&5 -+$as_echo "$EMACS" >&6; } - else -- echo "$ac_t""no" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi - - - -+ - # check for where the emacs site lisp directory is. - rm -f conftest.el - cat >> conftest.el <&6 --echo "configure:5646: checking emacs site lisp directory" >&5 -+{ $as_echo "$as_me:$LINENO: checking emacs site lisp directory" >&5 -+$as_echo_n "checking emacs site lisp directory... " >&6; } - if [ "$EMACS_SITE_LISP" = "unknown" ] ; then - if [ "$EMACS" != "" ] ; then - EMACS_SITE_LISP=`$EMACS -q -batch --no-site-file -l conftest.el 2>&1 | grep -v ^Warning: | sed -e /Loading/d | sed -e /load/d ` -@@ -5650,7 +12538,8 @@ - EMACS_SITE_LISP="" - fi - fi --echo "$ac_t""$EMACS_SITE_LISP" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: $EMACS_SITE_LISP" >&5 -+$as_echo "$EMACS_SITE_LISP" >&6; } ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_nix_to_w32 +- user_target=no +- for arg +- do +- case $prev in +- "") ;; +- xcompiler) +- # Aesthetically quote the previous argument. +- prev= +- lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - # check for where the emacs site lisp default.el is -@@ -5665,8 +12554,8 @@ - (message ans)) - EOF +- case $arg in +- # Double-quote args containing other shell metacharacters. +- # Many Bourne shells cannot handle close brackets correctly +- # in scan sets, so we specify it separately. +- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") +- arg="\"$arg\"" +- ;; +- esac ++# func_convert_file_msys_to_cygwin ARG ++# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. ++# Returns result in func_to_host_file_result. ++func_convert_file_msys_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ func_convert_core_msys_to_w32 "$1" ++ func_cygpath -u "$func_convert_core_msys_to_w32_result" ++ func_to_host_file_result="$func_cygpath_result" ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_msys_to_cygwin --echo $ac_n "checking emacs default.el""... $ac_c" 1>&6 --echo "configure:5670: checking emacs default.el" >&5 -+{ $as_echo "$as_me:$LINENO: checking emacs default.el" >&5 -+$as_echo_n "checking emacs default.el... " >&6; } - 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 -@@ -5677,7 +12566,8 @@ - EMACS_DEFAULT_EL=${EMACS_SITE_LISP}/default.el - fi - fi --echo "$ac_t""$EMACS_DEFAULT_EL" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: $EMACS_DEFAULT_EL" >&5 -+$as_echo "$EMACS_DEFAULT_EL" >&6; } +- # Add the previous argument to base_compile. +- if test -z "$base_compile"; then +- base_compile="$lastarg" +- else +- base_compile="$base_compile $lastarg" +- fi +- continue +- ;; +- esac +- # Accept any command-line options. +- case $arg in +- -o) +- if test "$user_target" != "no"; then +- $echo "$modename: you cannot specify \`-o' more than once" 1>&2 +- exit 1 +- fi +- user_target=next +- ;; ++# func_convert_file_nix_to_cygwin ARG ++# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed ++# in a wine environment, working winepath, and LT_CYGPATH set. Returns result ++# in func_to_host_file_result. ++func_convert_file_nix_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_file_result="$1" ++ if test -n "$1"; then ++ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. ++ func_convert_core_file_wine_to_w32 "$1" ++ func_cygpath -u "$func_convert_core_file_wine_to_w32_result" ++ func_to_host_file_result="$func_cygpath_result" ++ fi ++ func_convert_file_check "$1" "$func_to_host_file_result" ++} ++# end func_convert_file_nix_to_cygwin +- -static) +- build_old_libs=yes +- continue +- ;; -@@ -5688,14 +12578,14 @@ - (let ((ans "") file (tem Info-default-directory-list)) - (while tem - (cond ((file-exists-p (setq file (expand-file-name "dir" (car tem)))) -- (setq ans (file-name-as-directory (car tem))) -+ (setq ans (file-name-as-directory (car tem))) - (setq tem nil) )) - (setq tem (cdr tem))) - (message ans)) - EOF +- -prefer-pic) +- pic_mode=yes +- continue +- ;; ++############################################# ++# $build to $host PATH CONVERSION FUNCTIONS # ++############################################# ++# invoked via `$to_host_path_cmd ARG' ++# ++# In each case, ARG is the path to be converted from $build to $host format. ++# The result will be available in $func_to_host_path_result. ++# ++# Path separators are also converted from $build format to $host format. If ++# ARG begins or ends with a path separator character, it is preserved (but ++# converted to $host format) on output. ++# ++# All path conversion functions are named using the following convention: ++# file name conversion function : func_convert_file_X_to_Y () ++# path conversion function : func_convert_path_X_to_Y () ++# where, for any given $build/$host combination the 'X_to_Y' value is the ++# same. If conversion functions are added for new $build/$host combinations, ++# the two new functions must follow this pattern, or func_init_to_host_path_cmd ++# will break. --echo $ac_n "checking emacs info/dir""... $ac_c" 1>&6 --echo "configure:5699: checking emacs info/dir" >&5 -+{ $as_echo "$as_me:$LINENO: checking emacs info/dir" >&5 -+$as_echo_n "checking emacs info/dir... " >&6; } - if test "$use" = "mingw" ; then - INFO_DIR=\$\(prefix\)/lib/gcl-$VERSION/info/ - else -@@ -5704,61 +12594,133 @@ - fi - fi +- -prefer-non-pic) +- pic_mode=no +- continue +- ;; --echo "$ac_t""$INFO_DIR" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: $INFO_DIR" >&5 -+$as_echo "$INFO_DIR" >&6; } +- -Xcompiler) +- prev=xcompiler +- continue +- ;; ++# func_init_to_host_path_cmd ++# Ensures that function "pointer" variable $to_host_path_cmd is set to the ++# appropriate value, based on the value of $to_host_file_cmd. ++to_host_path_cmd= ++func_init_to_host_path_cmd () ++{ ++ $opt_debug ++ if test -z "$to_host_path_cmd"; then ++ func_stripname 'func_convert_file_' '' "$to_host_file_cmd" ++ to_host_path_cmd="func_convert_path_${func_stripname_result}" ++ fi ++} +- -Wc,*) +- args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` +- lastarg= +- IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' +- for arg in $args; do +- IFS="$save_ifs" --echo $ac_n "checking for tcl/tk""... $ac_c" 1>&6 --echo "configure:5712: checking for tcl/tk" >&5 -+{ $as_echo "$as_me:$LINENO: checking for main in -lieee" >&5 -+$as_echo_n "checking for main in -lieee... " >&6; } -+if test "${ac_cv_lib_ieee_main+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lieee $LIBS" -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ - - --if test -d "${TCL_CONFIG_PREFIX}" ; then true ; else --rm -f conftest.tcl --cat >> conftest.tcl <\?\'\ \ ]*|*]*|"") +- arg="\"$arg\"" +- ;; +- esac +- lastarg="$lastarg $arg" +- done +- IFS="$save_ifs" +- lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` ++# func_to_host_path ARG ++# Converts the path ARG from $build format to $host format. Return result ++# in func_to_host_path_result. ++func_to_host_path () +{ -+return main (); -+ ; -+ return 0; ++ $opt_debug ++ func_init_to_host_path_cmd ++ $to_host_path_cmd "$1" +} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 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_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_ieee_main=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - --set dir [set tcl_library] --if { [file exists [file join [set dir] tclConfig.sh]] } { -- puts [set dir] -- exit -- } --set dir [file dirname [set tcl_library]] --if { [file exists [file join [set dir] tclConfig.sh]] } { -- puts [set dir] -- } -+ ac_cv_lib_ieee_main=no -+fi - --EOF --#cp conftest.tcl foo.tcl -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 -+$as_echo "$ac_cv_lib_ieee_main" >&6; } -+if test "x$ac_cv_lib_ieee_main" = x""yes; then -+ have_ieee=1 -+else -+ have_ieee=0 -+fi ++# end func_to_host_path - # Extract the first word of "tclsh", so it can be a program name with args. - set dummy tclsh; ac_word=$2 --echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 --echo "configure:5735: checking for $ac_word" >&5 --if eval "test \"`echo '$''{'ac_cv_prog_TCLSH'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_TCLSH+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else - if test -n "$TCLSH"; then - ac_cv_prog_TCLSH="$TCLSH" # Let the user override the test. - else -- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -- ac_dummy="$PATH" -- for ac_dir in $ac_dummy; do -- test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/$ac_word; then -- ac_cv_prog_TCLSH="tclsh" -- break -- fi -- done -- IFS="$ac_save_ifs" -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_TCLSH="tclsh" -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+done -+IFS=$as_save_IFS -+ - test -z "$ac_cv_prog_TCLSH" && ac_cv_prog_TCLSH="${TCLSH}" - fi - fi --TCLSH="$ac_cv_prog_TCLSH" -+TCLSH=$ac_cv_prog_TCLSH - if test -n "$TCLSH"; then -- echo "$ac_t""$TCLSH" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: $TCLSH" >&5 -+$as_echo "$TCLSH" >&6; } - else -- echo "$ac_t""no" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } - fi +- # Add the arguments to base_compile. +- if test -z "$base_compile"; then +- base_compile="$lastarg" +- else +- base_compile="$base_compile $lastarg" +- fi +- continue +- ;; +- esac --#AC_CHECK_PROG(TCLSH,tclsh8.0,tclsh8.0,${TCLSH}) -+ -+{ $as_echo "$as_me:$LINENO: checking for tcl/tk" >&5 -+$as_echo_n "checking for tcl/tk... " >&6; } +- case $user_target in +- next) +- # The next one is the -o target name +- user_target=yes +- continue ++# func_convert_path_noop ARG ++# Copy ARG to func_to_host_path_result. ++func_convert_path_noop () ++{ ++ func_to_host_path_result="$1" ++} ++# end func_convert_path_noop + + -+if test -d "${TCL_CONFIG_PREFIX}" ; then true ; else -+rm -f conftest.tcl -+cat >> conftest.tcl <&6 --echo "configure:5835: checking for main in -llieee" >&5 --ac_lib_var=`echo lieee'_'main | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 --else -- ac_save_LIBS="$LIBS" --LIBS="-llieee $LIBS" --cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" --else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" --fi --rm -f conftest* --LIBS="$ac_save_LIBS" -- --fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- have_ieee=1 --else -- echo "$ac_t""no" 1>&6 --have_ieee=0 --fi -- - if test "$have_ieee" = "0" ; then - TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" ` - fi -@@ -5895,85 +12820,160 @@ - - - if test -d "${TK_CONFIG_PREFIX}" ; then --echo "$ac_t""using TK_VERSION=${TK_VERSION} in ${TK_CONFIG_PREFIX}" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: using TK_VERSION=${TK_VERSION} in ${TK_CONFIG_PREFIX}" >&5 -+$as_echo "using TK_VERSION=${TK_VERSION} in ${TK_CONFIG_PREFIX}" >&6; } - else --echo "$ac_t""not found" 1>&6 -+{ $as_echo "$as_me:$LINENO: result: not found" >&5 -+$as_echo "not found" >&6; } - fi - - NOTIFY=$enable_notify - - -- -+ - - - # for sgbc the mprotect capabilities. - - # the time handling for unixtime, add timezone - --echo $ac_n "checking alloca""... $ac_c" 1>&6 --echo "configure:5915: checking alloca" >&5 -+# alloca ++} ++# end func_convert_path_cygwin_to_w32 + -+{ $as_echo "$as_me:$LINENO: checking for alloca" >&5 -+$as_echo_n "checking for alloca... " >&6; } - if test "$cross_compiling" = yes; then - gcl_ok=no - else -- cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ + -+int -+main () ++# func_convert_path_nix_to_w32 ARG ++# Convert path ARG from *nix to w32 format. Requires a wine environment and ++# a working winepath. Returns result in func_to_host_file_result. ++func_convert_path_nix_to_w32 () +{ -+exit(alloca(500) != NULL ? 0 : 1); -+ ; -+ return 0; ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # See func_convert_path_msys_to_w32: ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" ++ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" ++ func_convert_path_check : ";" \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" ++ fi +} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - : - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- gcl_ok=yes -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+gcl_ok=yes - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - -+ - if test $gcl_ok = yes ; then -- echo "$ac_t""yes" 1>&6 -- cat >> confdefs.h <<\EOF -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_ALLOCA 1 --EOF -+_ACEOF - - else - if test "$cross_compiling" = yes; then - gcl_ok=no - else -- cat > conftest.$ac_ext < -- int main() { exit(alloca(500) != NULL ? 0 : 1);} --EOF --if { (eval echo configure:5952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null --then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ ++# end func_convert_path_nix_to_w32 + -+ #include + -+int -+main () ++# func_convert_path_msys_to_cygwin ARG ++# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. ++# Returns result in func_to_host_file_result. ++func_convert_path_msys_to_cygwin () +{ -+exit(alloca(500) != NULL ? 0 : 1); -+ ; -+ return 0; ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # See func_convert_path_msys_to_w32: ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" ++ func_cygpath -u -p "$func_convert_core_msys_to_w32_result" ++ func_to_host_path_result="$func_cygpath_result" ++ func_convert_path_check : : \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" : "$1" ++ fi +} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - : - else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -fr conftest* -- gcl_ok=yes -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+gcl_ok=yes - fi --rm -fr conftest* -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - ++# end func_convert_path_msys_to_cygwin + - if test $gcl_ok = yes ; then -- echo "$ac_t""yes" 1>&6 -- cat >> confdefs.h <<\EOF -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 -+$as_echo "yes" >&6; } -+ cat >>confdefs.h <<\_ACEOF - #define HAVE_ALLOCA 1 --EOF -+_ACEOF - -- cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define NEED_ALLOCA_H 1 --EOF -+_ACEOF - - fi - fi --if test $gcl_ok = no ; then echo "$ac_t""no" 1>&6 ; fi -- -+if test $gcl_ok = no ; then { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } ; fi - - - -@@ -5983,12 +12983,11 @@ - - - --# alloca - - # dlopen etc - # idea make it so you do something dlopen(libX.so,RTLD_GLOBAL) - # then dlload("foo.o") a lisp file can refer to things in libX.so --# -+# - - # what machine this is, and include then a machine specific hdr. - # and machine specific defs. -@@ -6008,22 +13007,24 @@ - - # redhat/cygnus released for some reason a buggy version of gcc, - # which no one else released. Catch that here. --echo $ac_n "checking Checking for buggy gcc version from redhat""... $ac_c" 1>&6 --echo "configure:6013: checking Checking for buggy gcc version from redhat" >&5 --if 2>&1 $CC -v | fgrep "gcc version 2.96" > /dev/null -- then -+{ $as_echo "$as_me:$LINENO: checking for buggy gcc version from redhat" >&5 -+$as_echo_n "checking for buggy gcc version from redhat... " >&6; } -+if 2>&1 $CC -v | fgrep "gcc version 2.96" > /dev/null -+ then - BROKEN_O4_OPT=1 -- cat >> confdefs.h <<\EOF -+ cat >>confdefs.h <<\_ACEOF - #define BROKEN_O4_OPT 1 --EOF -+_ACEOF + - -- - echo ODIR_DEBUG=-O >> makedefsafter - echo >> makedefsafter -- echo "$ac_t""yes .. turning off -O4" 1>&6 -+ { $as_echo "$as_me:$LINENO: result: yes .. turning off -O4" >&5 -+$as_echo "yes .. turning off -O4" >&6; } - else -- echo "$ac_t""no" 1>&6 --fi -+ { $as_echo "$as_me:$LINENO: result: no" >&5 -+$as_echo "no" >&6; } -+fi - - LIBS="$LDFLAGS $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $TLDFLAGS $LIBS $TLIBS" - -@@ -6044,413 +13045,1249 @@ - - if test -f h/$use.defs ; then - -- -- trap '' 1 2 15 --cat > confcache <<\EOF ++# func_convert_path_nix_to_cygwin ARG ++# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a ++# a wine environment, working winepath, and LT_CYGPATH set. Returns result in ++# func_to_host_file_result. ++func_convert_path_nix_to_cygwin () ++{ ++ $opt_debug ++ func_to_host_path_result="$1" ++ if test -n "$1"; then ++ # Remove leading and trailing path separator characters from ++ # ARG. msys behavior is inconsistent here, cygpath turns them ++ # into '.;' and ';.', and winepath ignores them completely. ++ func_stripname : : "$1" ++ func_to_host_path_tmp1=$func_stripname_result ++ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" ++ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" ++ func_to_host_path_result="$func_cygpath_result" ++ func_convert_path_check : : \ ++ "$func_to_host_path_tmp1" "$func_to_host_path_result" ++ func_convert_path_front_back_pathsep ":*" "*:" : "$1" ++ fi ++} ++# end func_convert_path_nix_to_cygwin + -+ ac_config_files="$ac_config_files makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp" + -+ cat >confcache <<\_ACEOF - # This file is a shell script that caches the results of configure - # tests run on this system so they can be shared between configure --# scripts and configure runs. It is not useful on other systems. --# If it contains results you don't want to keep, you may remove or edit it. -+# scripts and configure runs, see configure's option --config-cache. -+# It is not useful on other systems. If it contains results you don't -+# want to keep, you may remove or edit it. - # --# By default, configure uses ./config.cache as the cache file, --# creating it if it does not exist already. You can give configure --# the --cache-file=FILE option to use a different cache file; that is --# what configure does when it calls configure scripts in --# subdirectories, so they share the cache. --# Giving --cache-file=/dev/null disables caching, for debugging configure. --# config.status only pays attention to the cache file if you give it the --# --recheck option to rerun configure. -+# config.status only pays attention to the cache file if you give it -+# the --recheck option to rerun configure. - # --EOF -+# `ac_cv_env_foo' variables (set or unset) will be overridden when -+# loading this file, other *unset* `ac_cv_foo' will be assigned the -+# following values. -+ -+_ACEOF ++# func_mode_compile arg... ++func_mode_compile () ++{ ++ $opt_debug ++ # Get the compilation command and the source file. ++ base_compile= ++ srcfile="$nonopt" # always keep a non-empty value in "srcfile" ++ suppress_opt=yes ++ suppress_output= ++ arg_mode=normal ++ libobj= ++ later= ++ pie_flag= + - # The following way of writing the cache mishandles newlines in values, - # but we know of no workaround that is simple, portable, and efficient. --# So, don't put newlines in cache variables' values. -+# So, we kill variables containing newlines. - # Ultrix sh set writes to stderr and can't be redirected directly, - # and sets the high bit in the cache file unless we assign to the vars. --(set) 2>&1 | -- case `(ac_space=' '; set | grep ac_space) 2>&1` in -- *ac_space=\ *) -- # `set' does not quote correctly, so add quotes (double-quote substitution -- # turns \\\\ into \\, and sed turns \\ into \). -- sed -n \ -- -e "s/'/'\\\\''/g" \ -- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" -- ;; -- *) -- # `set' quotes correctly as required by POSIX, so do not add quotes. -- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' -- ;; -- esac >> confcache --if cmp -s $cache_file confcache; then -- : --else -- if test -w $cache_file; then -- echo "updating cache $cache_file" -- cat confcache > $cache_file -+( -+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do -+ eval ac_val=\$$ac_var -+ case $ac_val in #( -+ *${as_nl}*) -+ case $ac_var in #( -+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; -+ esac -+ case $ac_var in #( -+ _ | IFS | as_nl) ;; #( -+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( -+ *) $as_unset $ac_var ;; -+ esac ;; -+ esac -+ done ++ for arg ++ do ++ case $arg_mode in ++ arg ) ++ # do not "continue". Instead, add this to base_compile ++ lastarg="$arg" ++ arg_mode=normal + ;; +- yes) +- # We got the output file +- user_target=set + -+ (set) 2>&1 | -+ case $as_nl`(ac_space=' '; set) 2>&1` in #( -+ *${as_nl}ac_space=\ *) -+ # `set' does not quote correctly, so add quotes (double-quote -+ # substitution turns \\\\ into \\, and sed turns \\ into \). -+ sed -n \ -+ "s/'/'\\\\''/g; -+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" -+ ;; #( -+ *) -+ # `set' quotes correctly as required by POSIX, so do not add quotes. -+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" -+ ;; -+ esac | -+ sort -+) | -+ sed ' -+ /^ac_cv_env_/b end -+ t clear -+ :clear -+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ -+ t end -+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ -+ :end' >>confcache -+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else -+ if test -w "$cache_file"; then -+ test "x$cache_file" != "x/dev/null" && -+ { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 -+$as_echo "$as_me: updating cache $cache_file" >&6;} -+ cat confcache >$cache_file - else -- echo "not updating unwritable cache $cache_file" -+ { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi - fi - rm -f confcache - --trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 -- - test "x$prefix" = xNONE && prefix=$ac_default_prefix - # Let make expand exec_prefix. - test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ++ target ) + libobj="$arg" ++ arg_mode=normal + continue + ;; +- esac --# Any assignment to VPATH causes Sun make to only execute --# the first set of double-colon rules, so remove it if not needed. --# If there is a colon in the path, we need to keep it. --if test "x$srcdir" = x.; then -- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' --fi -+DEFS=-DHAVE_CONFIG_H - --trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 -+ac_libobjs= -+ac_ltlibobjs= -+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue -+ # 1. Remove the extension, and $U if already installed. -+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' -+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"` -+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR -+ # will be set to the directory where LIBOBJS objects are built. -+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" -+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -+done -+LIBOBJS=$ac_libobjs +- # Accept the current argument as the source file. +- lastarg="$srcfile" +- srcfile="$arg" ++ normal ) ++ # Accept any command-line options. ++ case $arg in ++ -o) ++ test -n "$libobj" && \ ++ func_fatal_error "you cannot specify \`-o' more than once" ++ arg_mode=target ++ continue ++ ;; --DEFS=-DHAVE_CONFIG_H -+LTLIBOBJS=$ac_ltlibobjs +- # Aesthetically quote the previous argument. ++ -pie | -fpie | -fPIE) ++ func_append pie_flag " $arg" ++ continue ++ ;; --# Without the "./", some shells look in PATH for config.status. --: ${CONFIG_STATUS=./config.status} +- # Backslashify any backslashes, double quotes, and dollar signs. +- # These are the only characters that are still specially +- # interpreted inside of double-quoted scrings. +- lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` ++ -shared | -static | -prefer-pic | -prefer-non-pic) ++ func_append later " $arg" ++ continue ++ ;; --echo creating $CONFIG_STATUS --rm -f $CONFIG_STATUS --cat > $CONFIG_STATUS <&5 -+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -+cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+#! $SHELL -+# Generated by $as_me. - # Run this file to recreate the current configuration. --# This directory was configured as follows, --# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: --# --# $0 $ac_configure_args --# - # Compiler output produced by configure, useful for debugging --# configure, is in ./config.log if it exists. -+# configure, is in config.log if it exists. - --ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" --for ac_option -+debug=false -+ac_cs_recheck=false -+ac_cs_silent=false -+SHELL=\${CONFIG_SHELL-$SHELL} -+_ACEOF -+ -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+## --------------------- ## -+## M4sh Initialization. ## -+## --------------------- ## -+ -+# Be more Bourne compatible -+DUALCASE=1; export DUALCASE # for MKS sh -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -+ emulate sh -+ NULLCMD=: -+ # Pre-4.2 versions of Zsh do 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 -+ -+ -+ -+ -+# PATH needs CR -+# Avoid depending upon Character Ranges. -+as_cr_letters='abcdefghijklmnopqrstuvwxyz' -+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -+as_cr_Letters=$as_cr_letters$as_cr_LETTERS -+as_cr_digits='0123456789' -+as_cr_alnum=$as_cr_Letters$as_cr_digits -+ -+as_nl=' -+' -+export as_nl -+# Printing a long string crashes Solaris 7 /usr/bin/printf. -+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then -+ as_echo='printf %s\n' -+ as_echo_n='printf %s' -+else -+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then -+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' -+ as_echo_n='/usr/ucb/echo -n' -+ else -+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"' -+ as_echo_n_body='eval -+ arg=$1; -+ case $arg in -+ *"$as_nl"*) -+ expr "X$arg" : "X\\(.*\\)$as_nl"; -+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; -+ esac; -+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" -+ ' -+ export as_echo_n_body -+ as_echo_n='sh -c $as_echo_n_body as_echo' -+ fi -+ export as_echo_body -+ as_echo='sh -c $as_echo_body as_echo' -+fi -+ -+# The user is always right. -+if test "${PATH_SEPARATOR+set}" != set; then -+ PATH_SEPARATOR=: -+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { -+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || -+ PATH_SEPARATOR=';' -+ } -+fi +- # Double-quote args containing other shell metacharacters. +- # Many Bourne shells cannot handle close brackets correctly +- # in scan sets, so we specify it separately. +- case $lastarg in +- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") +- lastarg="\"$lastarg\"" ++ -no-suppress) ++ suppress_opt=no ++ continue ++ ;; + -+# Support unset when possible. -+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then -+ as_unset=unset -+else -+ as_unset=false -+fi ++ -Xcompiler) ++ arg_mode=arg # the next one goes into the "base_compile" arg list ++ continue # The current "srcfile" will either be retained or ++ ;; # replaced later. I would guess that would be a bug. + ++ -Wc,*) ++ func_stripname '-Wc,' '' "$arg" ++ args=$func_stripname_result ++ lastarg= ++ save_ifs="$IFS"; IFS=',' ++ for arg in $args; do ++ IFS="$save_ifs" ++ func_append_quoted lastarg "$arg" ++ done ++ IFS="$save_ifs" ++ func_stripname ' ' '' "$lastarg" ++ lastarg=$func_stripname_result + -+# IFS -+# We need space, tab and new line, in precisely that order. Quoting is -+# there to prevent editors from complaining about space-tab. -+# (If _AS_PATH_WALK were called with IFS unset, it would disable word -+# splitting by setting IFS to empty value.) -+IFS=" "" $as_nl" ++ # Add the arguments to base_compile. ++ func_append base_compile " $lastarg" ++ continue ++ ;; + -+# Find who we are. Look in the path if we contain no directory separator. -+case $0 in -+ *[\\/]* ) as_myself=$0 ;; -+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH - do -- case "\$ac_option" in -- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) -- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" -- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -- -version | --version | --versio | --versi | --vers | --ver | --ve | --v) -- echo "$CONFIG_STATUS generated by autoconf version 2.13" -- exit 0 ;; -- -help | --help | --hel | --he | --h) -- echo "\$ac_cs_usage"; exit 0 ;; -- *) echo "\$ac_cs_usage"; exit 1 ;; -- esac -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -+IFS=$as_save_IFS ++ *) ++ # Accept the current argument as the source file. ++ # The previous "srcfile" becomes the current argument. ++ # ++ lastarg="$srcfile" ++ srcfile="$arg" ++ ;; ++ esac # case $arg + ;; +- esac ++ esac # case $arg_mode --ac_given_srcdir=$srcdir -+ ;; -+esac -+# We did not find ourselves, most probably we were run as `sh COMMAND' -+# in which case we are not to be found in the path. -+if test "x$as_myself" = x; then -+ as_myself=$0 -+fi -+if test ! -f "$as_myself"; then -+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 -+ { (exit 1); exit 1; } -+fi +- # Add the previous argument to base_compile. +- if test -z "$base_compile"; then +- base_compile="$lastarg" +- else +- base_compile="$base_compile $lastarg" +- fi +- done ++ # Aesthetically quote the previous argument. ++ func_append_quoted base_compile "$lastarg" ++ done # for arg --trap 'rm -fr `echo "makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp h/gclincl.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 --EOF --cat >> $CONFIG_STATUS </dev/null 2>&1 && $as_unset $as_var -+done -+PS1='$ ' -+PS2='> ' -+PS4='+ ' - --# Protect against being on the right side of a sed subst in config.status. --sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; -- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF --$ac_vpsub --$extrasub --s%@SHELL@%$SHELL%g --s%@CFLAGS@%$CFLAGS%g --s%@CPPFLAGS@%$CPPFLAGS%g --s%@CXXFLAGS@%$CXXFLAGS%g --s%@FFLAGS@%$FFLAGS%g --s%@DEFS@%$DEFS%g --s%@LDFLAGS@%$LDFLAGS%g --s%@LIBS@%$LIBS%g --s%@exec_prefix@%$exec_prefix%g --s%@prefix@%$prefix%g --s%@program_transform_name@%$program_transform_name%g --s%@bindir@%$bindir%g --s%@sbindir@%$sbindir%g --s%@libexecdir@%$libexecdir%g --s%@datadir@%$datadir%g --s%@sysconfdir@%$sysconfdir%g --s%@sharedstatedir@%$sharedstatedir%g --s%@localstatedir@%$localstatedir%g --s%@libdir@%$libdir%g --s%@includedir@%$includedir%g --s%@oldincludedir@%$oldincludedir%g --s%@infodir@%$infodir%g --s%@mandir@%$mandir%g --s%@VERSION@%$VERSION%g --s%@host@%$host%g --s%@host_alias@%$host_alias%g --s%@host_cpu@%$host_cpu%g --s%@host_vendor@%$host_vendor%g --s%@host_os@%$host_os%g --s%@PROCESSOR_FLAGS@%$PROCESSOR_FLAGS%g --s%@CC@%$CC%g --s%@CPP@%$CPP%g --s%@AWK@%$AWK%g --s%@MAKEINFO@%$MAKEINFO%g --s%@GMP@%$GMP%g --s%@GMPDIR@%$GMPDIR%g --s%@X_LIBS@%$X_LIBS%g --s%@X_CFLAGS@%$X_CFLAGS%g --s%@BUILD_BFD@%$BUILD_BFD%g --s%@LIBBFD@%$LIBBFD%g --s%@LIBIBERTY@%$LIBIBERTY%g --s%@LITTLE_END@%$LITTLE_END%g --s%@PAGEWIDTH@%$PAGEWIDTH%g --s%@HAVE_LONG_LONG@%$HAVE_LONG_LONG%g --s%@FLISP@%$FLISP%g --s%@SYSTEM@%$SYSTEM%g --s%@CLSTANDARD@%$CLSTANDARD%g --s%@RL_OBJS@%$RL_OBJS%g --s%@RL_LIB@%$RL_LIB%g --s%@NO_PROFILE@%$NO_PROFILE%g --s%@HAVE_SETENV@%$HAVE_SETENV%g --s%@HAVE_PUTENV@%$HAVE_PUTENV%g --s%@USE_CLEANUP@%$USE_CLEANUP%g --s%@ENDIAN_ALREADY_DEFINED@%$ENDIAN_ALREADY_DEFINED%g --s%@HAVE_SV_ONSTACK@%$HAVE_SV_ONSTACK%g --s%@HAVE_SIGSYS@%$HAVE_SIGSYS%g --s%@HAVE_SIGEMT@%$HAVE_SIGEMT%g --s%@EMACS@%$EMACS%g --s%@EMACS_SITE_LISP@%$EMACS_SITE_LISP%g --s%@EMACS_DEFAULT_EL@%$EMACS_DEFAULT_EL%g --s%@INFO_DIR@%$INFO_DIR%g --s%@TCLSH@%$TCLSH%g --s%@TK_CONFIG_PREFIX@%$TK_CONFIG_PREFIX%g --s%@TK_LIBRARY@%$TK_LIBRARY%g --s%@TCL_LIBRARY@%$TCL_LIBRARY%g --s%@TK_XINCLUDES@%$TK_XINCLUDES%g --s%@TK_INCLUDE@%$TK_INCLUDE%g --s%@TCL_INCLUDE@%$TCL_INCLUDE%g --s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g --s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g --s%@TK_XLIBSW@%$TK_XLIBSW%g --s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g --s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g --s%@TCL_LIBS@%$TCL_LIBS%g --s%@NOTIFY@%$NOTIFY%g --s%@BROKEN_O4_OPT@%$BROKEN_O4_OPT%g --s%@FINAL_CFLAGS@%$FINAL_CFLAGS%g --s%@NIFLAGS@%$NIFLAGS%g --s%@O3FLAGS@%$O3FLAGS%g --s%@O2FLAGS@%$O2FLAGS%g --s%@EXTRA_LOBJS@%$EXTRA_LOBJS%g --s%@LEADING_UNDERSCORE@%$LEADING_UNDERSCORE%g --s%@GNU_LD@%$GNU_LD%g --s%@use@%$use%g -+# NLS nuisances. -+LC_ALL=C -+export LC_ALL -+LANGUAGE=C -+export LANGUAGE +- case $user_target in +- set) ++ case $arg_mode in ++ arg) ++ func_fatal_error "you must specify an argument for -Xcompile" + ;; +- no) +- # Get the name of the library object. +- libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ++ target) ++ func_fatal_error "you must specify a target with \`-o'" + ;; + *) +- $echo "$modename: you must specify a target with \`-o'" 1>&2 +- exit 1 ++ # Get the name of the library object. ++ test -z "$libobj" && { ++ func_basename "$srcfile" ++ libobj="$func_basename_result" ++ } + ;; + esac --CEOF --EOF -+# Required to use basename. -+if expr a : '\(a\)' >/dev/null 2>&1 && -+ test "X`expr 00001 : '.*\(...\)'`" = X001; then -+ as_expr=expr -+else -+ as_expr=false -+fi + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo +- xform='[cCFSfmso]' + case $libobj in +- *.ada) xform=ada ;; +- *.adb) xform=adb ;; +- *.ads) xform=ads ;; +- *.asm) xform=asm ;; +- *.c++) xform=c++ ;; +- *.cc) xform=cc ;; +- *.class) xform=class ;; +- *.cpp) xform=cpp ;; +- *.cxx) xform=cxx ;; +- *.f90) xform=f90 ;; +- *.for) xform=for ;; +- *.java) xform=java ;; ++ *.[cCFSifmso] | \ ++ *.ada | *.adb | *.ads | *.asm | \ ++ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ ++ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) ++ func_xform "$libobj" ++ libobj=$func_xform_result ++ ;; + esac --cat >> $CONFIG_STATUS <<\EOF -+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then -+ as_basename=basename -+else -+ as_basename=false -+fi +- libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` +- + case $libobj in +- *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; ++ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) +- $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 +- exit 1 ++ func_fatal_error "cannot determine name of library object from \`$libobj'" + ;; + esac --# Split the substitutions into bite-sized pieces for seds with --# small command number limits, like on Digital OSF/1 and HP-UX. --ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. --ac_file=1 # Number of current file. --ac_beg=1 # First line for current file. --ac_end=$ac_max_sed_cmds # Line after last line for current file. --ac_more_lines=: --ac_sed_cmds="" --while $ac_more_lines; do -- if test $ac_beg -gt 1; then -- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file -+ -+# Name of the executable. -+as_me=`$as_basename -- "$0" || -+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ -+ X"$0" : 'X\(//\)$' \| \ -+ X"$0" : 'X\(/\)' \| . 2>/dev/null || -+$as_echo X/"$0" | -+ sed '/^.*\/\([^/][^/]*\)\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\/\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\/\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` -+ -+# CDPATH. -+$as_unset CDPATH -+ -+ -+ -+ as_lineno_1=$LINENO -+ as_lineno_2=$LINENO -+ test "x$as_lineno_1" != "x$as_lineno_2" && -+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { -+ -+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO -+ # uniformly replaced by the line number. The first 'sed' inserts a -+ # line-number line after each line using $LINENO; the second 'sed' -+ # does the real work. The second script uses 'N' to pair each -+ # line-number line with the line containing $LINENO, and appends -+ # trailing '-' during substitution so that $LINENO is not a special -+ # case at line end. -+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the -+ # scripts with optimization help from Paolo Bonzini. Blame Lee -+ # E. McMahon (1931-1989) for sed's syntax. :-) -+ sed -n ' -+ p -+ /[$]LINENO/= -+ ' <$as_myself | -+ sed ' -+ s/[$]LINENO.*/&-/ -+ t lineno -+ b -+ :lineno -+ N -+ :loop -+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ -+ t loop -+ s/-\n.*// -+ ' >$as_me.lineno && -+ chmod +x "$as_me.lineno" || -+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 -+ { (exit 1); exit 1; }; } -+ -+ # Don't try to exec as it changes $[0], causing all sort of problems -+ # (the dirname of $[0] is not the place where we might find the -+ # original and so on. Autoconf is especially sensitive to this). -+ . "./$as_me.lineno" -+ # Exit status is that of the last command. -+ exit -+} -+ -+ -+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then -+ as_dirname=dirname -+else -+ as_dirname=false -+fi -+ -+ECHO_C= ECHO_N= ECHO_T= -+case `echo -n x` in -+-n*) -+ case `echo 'x\c'` in -+ *c*) ECHO_T=' ';; # ECHO_T is single tab character. -+ *) ECHO_C='\c';; -+ esac;; -+*) -+ ECHO_N='-n';; -+esac -+if expr a : '\(a\)' >/dev/null 2>&1 && -+ test "X`expr 00001 : '.*\(...\)'`" = X001; then -+ as_expr=expr -+else -+ as_expr=false -+fi -+ -+rm -f conf$$ conf$$.exe conf$$.file -+if test -d conf$$.dir; then -+ rm -f conf$$.dir/conf$$.file -+else -+ rm -f conf$$.dir -+ mkdir conf$$.dir 2>/dev/null -+fi -+if (echo >conf$$.file) 2>/dev/null; then -+ if ln -s conf$$.file conf$$ 2>/dev/null; then -+ as_ln_s='ln -s' -+ # ... but there are two gotchas: -+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. -+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. -+ # In both cases, we have to default to `cp -p'. -+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || -+ as_ln_s='cp -p' -+ elif ln conf$$.file conf$$ 2>/dev/null; then -+ as_ln_s=ln - else -- sed "${ac_end}q" conftest.subs > conftest.s$ac_file -+ as_ln_s='cp -p' - fi -- if test ! -s conftest.s$ac_file; then -- ac_more_lines=false -- rm -f conftest.s$ac_file -+else -+ as_ln_s='cp -p' -+fi -+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -+rmdir conf$$.dir 2>/dev/null -+ -+if mkdir -p . 2>/dev/null; then -+ as_mkdir_p=: -+else -+ test -d ./-p && rmdir ./-p -+ as_mkdir_p=false -+fi +- # Infer tagged configuration to use if any are available and +- # if one wasn't chosen via the "--tag" command line option. +- # Only attempt this if the compiler in the base compile +- # command doesn't match the default compiler. +- if test -n "$available_tags" && test -z "$tagname"; then +- case $base_compile in +- "$CC "*) ;; +- # Blanks in the command may have been stripped by the calling shell, +- # but not from the CC environment variable when ltconfig was run. +- "`$echo $CC` "*) ;; +- *) +- for z in $available_tags; do +- if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then +- # Evaluate the configuration. +- eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" +- case $base_compile in +- "$CC "*) +- # The compiler in the base compile command matches +- # the one in the tagged configuration. +- # Assume this is the tagged configuration we want. +- tagname=$z +- break +- ;; +- "`$echo $CC` "*) +- tagname=$z +- break +- ;; +- esac +- fi +- done +- # If $tagname still isn't set, then no tagged configuration +- # was found and let the user know that the "--tag" command +- # line option must be used. +- if test -z "$tagname"; then +- echo "$modename: unable to infer tagged configuration" +- echo "$modename: specify a tag with \`--tag'" 1>&2 +- exit 1 +-# else +-# echo "$modename: using $tagname tagged configuration" +- fi ++ func_infer_tag $base_compile + -+if test -x / >/dev/null 2>&1; then -+ as_test_x='test -x' -+else -+ if ls -dL / >/dev/null 2>&1; then -+ as_ls_L_option=L - else -- if test -z "$ac_sed_cmds"; then -- ac_sed_cmds="sed -f conftest.s$ac_file" ++ 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 ++ ;; ++ ++ -prefer-pic) ++ pic_mode=yes ++ continue ++ ;; ++ ++ -prefer-non-pic) ++ pic_mode=no ++ continue + ;; + esac +- fi ++ done + +- objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` +- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` +- if test "X$xdir" = "X$obj"; then +- xdir= - else -- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" +- xdir=$xdir/ - fi -- ac_file=`expr $ac_file + 1` -- ac_beg=$ac_end -- ac_end=`expr $ac_end + $ac_max_sed_cmds` -+ as_ls_L_option= - fi --done --if test -z "$ac_sed_cmds"; then -- ac_sed_cmds=cat -+ as_test_x=' -+ eval sh -c '\'' -+ if test -d "$1"; then -+ test -d "$1/."; -+ else -+ case $1 in -+ -*)set "./$1";; -+ esac; -+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in -+ ???[sx]*):;;*)false;;esac;fi -+ '\'' sh -+ ' - fi --EOF -+as_executable_p=$as_test_x ++ 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 --cat >> $CONFIG_STATUS <&2 +- $echo "$help" 1>&2 +- exit 1 +- fi ++ test -z "$base_compile" && \ ++ func_fatal_help "you must specify a compilation command" --CONFIG_FILES=\${CONFIG_FILES-"makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp "} --EOF --cat >> $CONFIG_STATUS <<\EOF --for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then -- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". -- case "$ac_file" in -- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` -- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; -- *) ac_file_in="${ac_file}.in" ;; -- esac -+# Sed expression to map a string onto a valid variable name. -+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - -- # Remove last slash and all that follows it. Not all systems have dirname. -- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` -- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then -- # The file is in a subdirectory. -- test ! -d "$ac_dir" && mkdir "$ac_dir" -- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" -- # A "../" for each directory in $ac_dir_suffix. -- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` -- else -- ac_dir_suffix= ac_dots= -- fi -+exec 6>&1 - -- case "$ac_given_srcdir" in -- .) srcdir=. -- if test -z "$ac_dots"; then top_srcdir=. -- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; -- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; -- *) # Relative path. -- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" -- top_srcdir="$ac_dots$ac_given_srcdir" ;; -+# Save the log message, to keep $[0] and so on meaningful, and to -+# report actual input values of CONFIG_FILES etc. instead of their -+# values after options handling. -+ac_log=" -+This file was extended by $as_me, which was -+generated by GNU Autoconf 2.63. Invocation command line was -+ -+ CONFIG_FILES = $CONFIG_FILES -+ CONFIG_HEADERS = $CONFIG_HEADERS -+ CONFIG_LINKS = $CONFIG_LINKS -+ CONFIG_COMMANDS = $CONFIG_COMMANDS -+ $ $0 $@ -+ -+on `(hostname || uname -n) 2>/dev/null | sed 1q` -+" -+ -+_ACEOF -+ -+case $ac_config_files in *" -+"*) set x $ac_config_files; shift; ac_config_files=$*;; -+esac -+ -+case $ac_config_headers in *" -+"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -+esac -+ -+ -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+# Files that config.status was made for. -+config_files="$ac_config_files" -+config_headers="$ac_config_headers" -+ -+_ACEOF -+ -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+ac_cs_usage="\ -+\`$as_me' instantiates files from templates according to the -+current configuration. -+ -+Usage: $0 [OPTION]... [FILE]... -+ -+ -h, --help print this help, then exit -+ -V, --version print version number and configuration settings, then exit -+ -q, --quiet, --silent -+ do not print progress messages -+ -d, --debug don't remove temporary files -+ --recheck update $as_me by reconfiguring in the same conditions -+ --file=FILE[:TEMPLATE] -+ instantiate the configuration file FILE -+ --header=FILE[:TEMPLATE] -+ instantiate the configuration header FILE -+ -+Configuration files: -+$config_files -+ -+Configuration headers: -+$config_headers -+ -+Report bugs to ." -+ -+_ACEOF -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+ac_cs_version="\\ -+config.status -+configured by $0, generated by GNU Autoconf 2.63, -+ with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -+ -+Copyright (C) 2008 Free Software Foundation, Inc. -+This config.status script is free software; the Free Software Foundation -+gives unlimited permission to copy, distribute and modify it." -+ -+ac_pwd='$ac_pwd' -+srcdir='$srcdir' -+test -n "\$AWK" || AWK=awk -+_ACEOF -+ -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+# The default lists apply if the user does not specify any file. -+ac_need_defaults=: -+while test $# != 0 -+do -+ case $1 in -+ --*=*) -+ ac_option=`expr "X$1" : 'X\([^=]*\)='` -+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` -+ ac_shift=: -+ ;; -+ *) -+ ac_option=$1 -+ ac_optarg=$2 -+ ac_shift=shift -+ ;; - esac + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then +@@ -556,16 +2120,13 @@ if test -z "$show_help"; then + removelist="$lobj $libobj ${libobj}T" + fi -+ case $ac_option in -+ # Handling of the options. -+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) -+ ac_cs_recheck=: ;; -+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) -+ $as_echo "$ac_cs_version"; exit ;; -+ --debug | --debu | --deb | --de | --d | -d ) -+ debug=: ;; -+ --file | --fil | --fi | --f ) -+ $ac_shift -+ case $ac_optarg in -+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; -+ esac -+ CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" -+ ac_need_defaults=false;; -+ --header | --heade | --head | --hea ) -+ $ac_shift -+ case $ac_optarg in -+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; -+ esac -+ CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" -+ ac_need_defaults=false;; -+ --he | --h) -+ # Conflict between --help and --header -+ { $as_echo "$as_me: error: ambiguous option: $1 -+Try \`$0 --help' for more information." >&2 -+ { (exit 1); exit 1; }; };; -+ --help | --hel | -h ) -+ $as_echo "$ac_cs_usage"; exit ;; -+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ -+ | -silent | --silent | --silen | --sile | --sil | --si | --s) -+ ac_cs_silent=: ;; -+ -+ # This is an error. -+ -*) { $as_echo "$as_me: error: unrecognized option: $1 -+Try \`$0 --help' for more information." >&2 -+ { (exit 1); exit 1; }; } ;; -+ -+ *) ac_config_targets="$ac_config_targets $1" -+ ac_need_defaults=false ;; - -- echo creating "$ac_file" -- rm -f "$ac_file" -- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." -- case "$ac_file" in -- *Makefile*) ac_comsub="1i\\ --# $configure_input" ;; -- *) ac_comsub= ;; - esac -+ shift -+done +- $run $rm $removelist +- trap "$run $rm $removelist; exit 1" 1 2 15 +- + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in +- cygwin* | mingw* | pw32* | os2*) ++ cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac +- if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then ++ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi +@@ -573,10 +2134,8 @@ if test -z "$show_help"; then + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then +- output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} ++ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" +- removelist="$removelist $output_obj $lockfile" +- trap "$run $rm $removelist; exit 1" 1 2 15 + else + output_obj= + need_locks=no +@@ -586,13 +2145,13 @@ if test -z "$show_help"; then + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then +- until $run ln "$0" "$lockfile" 2>/dev/null; do +- $show "Waiting for $lockfile to be removed" ++ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do ++ func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then +- echo "\ ++ $ECHO "\ + *** ERROR, $lockfile exists and contains: + `cat $lockfile 2>/dev/null` -- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` -- sed -e "$ac_comsub --s%@configure_input@%$configure_input%g --s%@srcdir@%$srcdir%g --s%@top_srcdir@%$top_srcdir%g --" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file --fi; done --rm -f conftest.s* -+ac_configure_extra_args= - --# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where --# NAME is the cpp macro being defined and VALUE is the value it is being given. +@@ -603,29 +2162,21 @@ repeat this compilation, it may succeed, + avoid parallel builds (make -j) in this platform, or get a better + compiler." + +- $run $rm $removelist +- exit 1 ++ $opt_dry_run || $RM $removelist ++ exit $EXIT_FAILURE + fi +- echo $srcfile > "$lockfile" +- fi +- +- if test -n "$fix_srcfile_path"; then +- eval srcfile=\"$fix_srcfile_path\" ++ func_append removelist " $output_obj" ++ $ECHO "$srcfile" > "$lockfile" + fi + +- $run $rm "$libobj" "${libobj}T" +- +- # Create a libtool object file (analogous to a ".la" file), +- # but don't create it if we're doing a dry run. +- test -z "$run" && cat > ${libobj}T </dev/null -+ ac_configure_extra_args="$ac_configure_extra_args --silent" -+fi +-# Please DO NOT delete this file! +-# It is necessary for linking the library. ++ $opt_dry_run || $RM $removelist ++ func_append removelist " $lockfile" ++ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 --if test "${CONFIG_HEADERS+set}" != set; then --EOF --cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -+_ACEOF -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+if \$ac_cs_recheck; then -+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -+ shift -+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 -+ CONFIG_SHELL='$SHELL' -+ export CONFIG_SHELL -+ exec "\$@" - fi --for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then -- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". -- case "$ac_file" in -- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` -- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; -- *) ac_file_in="${ac_file}.in" ;; -+ -+_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+exec 5>>config.log -+{ -+ echo -+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -+## Running $as_me. ## -+_ASBOX -+ $as_echo "$ac_log" -+} >&5 -+ -+_ACEOF -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+_ACEOF -+ -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+ -+# Handling of arguments. -+for ac_config_target in $ac_config_targets -+do -+ case $ac_config_target in -+ "h/gclincl.h") CONFIG_HEADERS="$CONFIG_HEADERS h/gclincl.h" ;; -+ "makedefc") CONFIG_FILES="$CONFIG_FILES makedefc" ;; -+ "windows/gcl.iss") CONFIG_FILES="$CONFIG_FILES windows/gcl.iss" ;; -+ "windows/sysdir.bat") CONFIG_FILES="$CONFIG_FILES windows/sysdir.bat" ;; -+ "windows/install.lsp") CONFIG_FILES="$CONFIG_FILES windows/install.lsp" ;; -+ -+ *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} -+ { (exit 1); exit 1; }; };; - esac -+done ++ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 ++ srcfile=$func_to_tool_file_result ++ func_quote_for_eval "$srcfile" ++ qsrcfile=$func_quote_for_eval_result -- echo creating $ac_file - -- rm -f conftest.frag conftest.in conftest.out -- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` -- cat $ac_file_inputs > conftest.in -+# If the user did not use the arguments to specify the items to instantiate, -+# then the envvar interface is used. Set only those that are not. -+# We use the long form for the default assignment because of an extremely -+# bizarre bug on SunOS 4.1.3. -+if $ac_need_defaults; then -+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers -+fi + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then +@@ -633,38 +2184,25 @@ EOF + fbsd_hideous_sh_bug=$base_compile --EOF -+# Have a temporary directory for convenience. Make it in the build tree -+# simply because there is no reason against having it here, and in addition, -+# creating and moving files from /tmp can sometimes cause problems. -+# Hook for its removal unless debugging. -+# Note that there is a small window in which the directory will not be cleaned: -+# after its creation but before its name has been assigned to `$tmp'. -+$debug || -+{ -+ tmp= -+ trap 'exit_status=$? -+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -+' 0 -+ trap '{ (exit 1); exit 1; }' 1 2 13 15 -+} -+# Create a (secure) tmp directory for tmp files. - --# Transform confdefs.h into a sed script conftest.vals that substitutes --# the proper values into config.h.in to produce config.h. And first: --# Protect against being on the right side of a sed subst in config.status. --# Protect against being in an unquoted here document in config.status. --rm -f conftest.vals --cat > conftest.hdr <<\EOF --s/[\\&%]/\\&/g --s%[\\$`]%\\&%g --s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp --s%ac_d%ac_u%gp --s%ac_u%ac_e%gp --EOF --sed -n -f conftest.hdr confdefs.h > conftest.vals --rm -f conftest.hdr -+{ -+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && -+ test -n "$tmp" && test -d "$tmp" -+} || -+{ -+ tmp=./conf$$-$RANDOM -+ (umask 077 && mkdir "$tmp") -+} || -+{ -+ $as_echo "$as_me: cannot create a temporary directory in ." >&2 -+ { (exit 1); exit 1; } -+} + if test "$pic_mode" != no; then +- command="$base_compile $srcfile $pic_flag" ++ command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code +- command="$base_compile $srcfile" ++ command="$base_compile $qsrcfile" + fi --# This sed command replaces #undef with comments. This is necessary, for --# example, in the case of _POSIX_SOURCE, which is predefined and required --# on some systems where configure will not decide to define it. --cat >> conftest.vals <<\EOF --s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% --EOF -+# Set up the scripts for CONFIG_FILES section. -+# No need to generate them if there are no CONFIG_FILES. -+# This happens for instance with `./config.status config.h'. -+if test -n "$CONFIG_FILES"; then +- if test ! -d ${xdir}$objdir; then +- $show "$mkdir ${xdir}$objdir" +- $run $mkdir ${xdir}$objdir +- status=$? +- if test $status -ne 0 && test ! -d ${xdir}$objdir; then +- exit $status +- fi +- fi ++ func_mkdir_p "$xdir$objdir" --# Break up conftest.vals because some shells have a limit on --# the size of here documents, and old seds have small limits too. + if test -z "$output_obj"; then +- # Place PIC objects in $objdir +- command="$command -o $lobj" ++ # Place PIC objects in $objdir ++ func_append command " -o $lobj" + fi --rm -f conftest.tail --while : --do -- ac_lines=`grep -c . conftest.vals` -- # grep -c gives empty output for an empty file on some AIX systems. -- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi -- # Write a limited-size here document to conftest.frag. -- echo ' cat > conftest.frag <> $CONFIG_STATUS -- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS -- echo 'CEOF -- sed -f conftest.frag conftest.in > conftest.out -- rm -f conftest.in -- mv conftest.out conftest.in --' >> $CONFIG_STATUS -- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail -- rm -f conftest.vals -- mv conftest.tail conftest.vals -+ac_cr=' ' -+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then -+ ac_cs_awk_cr='\\r' -+else -+ ac_cs_awk_cr=$ac_cr -+fi +- $run $rm "$lobj" "$output_obj" +- +- $show "$command" +- if $run eval "$command"; then : +- else +- test -n "$output_obj" && $run $rm $removelist +- exit 1 +- fi ++ func_show_eval_locale "$command" \ ++ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && +- test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then +- echo "\ ++ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then ++ $ECHO "\ + *** ERROR, $lockfile contains: + `cat $lockfile 2>/dev/null` + +@@ -678,63 +2216,42 @@ repeat this compilation, it may succeed, + avoid parallel builds (make -j) in this platform, or get a better + compiler." + +- $run $rm $removelist +- exit 1 ++ $opt_dry_run || $RM $removelist ++ exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one +- if test -n "$output_obj" && test "x$output_obj" != "x$lobj"; then +- $show "$mv $output_obj $lobj" +- if $run $mv $output_obj $lobj; then : +- else +- error=$? +- $run $rm $removelist +- exit $error +- fi ++ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then ++ func_show_eval '$MV "$output_obj" "$lobj"' \ ++ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + +- # Append the name of the PIC object to the libtool object file. +- test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != x"$srcfile"; then +- echo "\ ++ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then ++ $ECHO "\ + *** ERROR, $lockfile contains: + `cat $lockfile 2>/dev/null` + +@@ -748,57 +2265,2828 @@ repeat this compilation, it may succeed, + avoid parallel builds (make -j) in this platform, or get a better + compiler." + +- $run $rm $removelist +- exit 1 ++ $opt_dry_run || $RM $removelist ++ exit $EXIT_FAILURE + fi + + # Just move the object if needed +- if test -n "$output_obj" && test "x$output_obj" != "x$obj"; then +- $show "$mv $output_obj $obj" +- if $run $mv $output_obj $obj; then : ++ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then ++ func_show_eval '$MV "$output_obj" "$obj"' \ ++ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' ++ fi ++ fi + -+echo 'BEGIN {' >"$tmp/subs1.awk" && -+_ACEOF ++ $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 ++ } + -+{ -+ echo "cat >conf$$subs.awk <<_ACEOF" && -+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && -+ echo "_ACEOF" -+} >conf$$subs.sh || -+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} -+ { (exit 1); exit 1; }; } -+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -+ac_delim='%!_!# ' -+for ac_last_try in false false false false false :; do -+ . ./conf$$subs.sh || -+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} -+ { (exit 1); exit 1; }; } -+ -+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` -+ if test $ac_delim_n = $ac_delim_num; then -+ break -+ elif $ac_last_try; then -+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} -+ { (exit 1); exit 1; }; } -+ else -+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! " -+ fi - done --rm -f conftest.vals -+rm -f conf$$subs.sh - --cat >> $CONFIG_STATUS <<\EOF -- rm -f conftest.frag conftest.h -- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h -- cat conftest.in >> conftest.h -- rm -f conftest.in -- if cmp -s $ac_file conftest.h 2>/dev/null; then -- echo "$ac_file is unchanged" -- rm -f conftest.h -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -+_ACEOF -+sed -n ' -+h -+s/^/S["/; s/!.*/"]=/ -+p -+g -+s/^[^!]*!// -+:repl -+t repl -+s/'"$ac_delim"'$// -+t delim -+:nl -+h -+s/\(.\{148\}\).*/\1/ -+t more1 -+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -+p -+n -+b repl -+:more1 -+s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -+p -+g -+s/.\{148\}// -+t nl -+:delim -+h -+s/\(.\{148\}\).*/\1/ -+t more2 -+s/["\\]/\\&/g; s/^/"/; s/$/"/ -+p -+b -+:more2 -+s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -+p -+g -+s/.\{148\}// -+t delim -+' >$CONFIG_STATUS || ac_write_fail=1 -+rm -f conf$$subs.awk -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+_ACAWK -+cat >>"\$tmp/subs1.awk" <<_ACAWK && -+ for (key in S) S_is_set[key] = 1 -+ FS = "" ++ exit $EXIT_SUCCESS ++} + ++$opt_help || { ++ test "$opt_mode" = compile && func_mode_compile ${1+"$@"} +} ++ ++func_mode_help () +{ -+ line = $ 0 -+ nfields = split(line, field, "@") -+ substed = 0 -+ len = length(field[1]) -+ for (i = 2; i < nfields; i++) { -+ key = field[i] -+ keylen = length(key) -+ if (S_is_set[key]) { -+ value = S[key] -+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) -+ len += length(value) + length(field[++i]) -+ substed = 1 -+ } else -+ len += 1 + keylen -+ } ++ # We need to display help for each of the modes. ++ case $opt_mode in ++ "") ++ # Generic help is extracted from the usage comments ++ # at the start of this file. ++ func_help ++ ;; + -+ print line -+} ++ clean) ++ $ECHO \ ++"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + -+_ACAWK -+_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then -+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -+else -+ cat -+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ -+ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -+$as_echo "$as_me: error: could not setup config files machinery" >&2;} -+ { (exit 1); exit 1; }; } -+_ACEOF ++Remove files from the build directory. + -+# VPATH may cause trouble with some makes, so we remove $(srcdir), -+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -+# trailing colons and then remove the whole line if VPATH becomes empty -+# (actually we leave an empty line to preserve line numbers). -+if test "x$srcdir" = x.; then -+ ac_vpsub='/^[ ]*VPATH[ ]*=/{ -+s/:*\$(srcdir):*/:/ -+s/:*\${srcdir}:*/:/ -+s/:*@srcdir@:*/:/ -+s/^\([^=]*=[ ]*\):*/\1/ -+s/:*$// -+s/^[^=]*=[ ]*$// -+}' -+fi ++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. + -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+fi # test -n "$CONFIG_FILES" ++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." ++ ;; + -+# Set up the scripts for CONFIG_HEADERS section. -+# No need to generate them if there are no CONFIG_HEADERS. -+# This happens for instance with `./config.status Makefile'. -+if test -n "$CONFIG_HEADERS"; then -+cat >"$tmp/defines.awk" <<\_ACAWK || -+BEGIN { -+_ACEOF ++ compile) ++ $ECHO \ ++"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + -+# Transform confdefs.h into an awk script `defines.awk', embedded as -+# here-document in config.status, that substitutes the proper values into -+# config.h.in to produce config.h. -+ -+# Create a delimiter string that does not exist in confdefs.h, to ease -+# handling of long lines. -+ac_delim='%!_!# ' -+for ac_last_try in false false :; do -+ ac_t=`sed -n "/$ac_delim/p" confdefs.h` -+ if test -z "$ac_t"; then -+ break -+ elif $ac_last_try; then -+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -+$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} -+ { (exit 1); exit 1; }; } - else -- # Remove last slash and all that follows it. Not all systems have dirname. -- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` -- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then -- # The file is in a subdirectory. -- test ! -d "$ac_dir" && mkdir "$ac_dir" -+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! " -+ fi -+done ++Compile a source file into a libtool library object. + -+# For the awk script, D is an array of macro values keyed by name, -+# likewise P contains macro parameters if any. Preserve backslash -+# newline sequences. -+ -+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -+sed -n ' -+s/.\{148\}/&'"$ac_delim"'/g -+t rset -+:rset -+s/^[ ]*#[ ]*define[ ][ ]*/ / -+t def -+d -+:def -+s/\\$// -+t bsnl -+s/["\\]/\\&/g -+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -+D["\1"]=" \3"/p -+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -+d -+:bsnl -+s/["\\]/\\&/g -+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -+D["\1"]=" \3\\\\\\n"\\/p -+t cont -+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -+t cont -+d -+:cont -+n -+s/.\{148\}/&'"$ac_delim"'/g -+t clear -+:clear -+s/\\$// -+t bsnlc -+s/["\\]/\\&/g; s/^/"/; s/$/"/p -+d -+:bsnlc -+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -+b cont -+' >$CONFIG_STATUS || ac_write_fail=1 -+ -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+ for (key in D) D_is_set[key] = 1 -+ FS = "" -+} -+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { -+ line = \$ 0 -+ split(line, arg, " ") -+ if (arg[1] == "#") { -+ defundef = arg[2] -+ mac1 = arg[3] -+ } else { -+ defundef = substr(arg[1], 2) -+ mac1 = arg[2] -+ } -+ split(mac1, mac2, "(") #) -+ macro = mac2[1] -+ prefix = substr(line, 1, index(line, defundef) - 1) -+ if (D_is_set[macro]) { -+ # Preserve the white space surrounding the "#". -+ print prefix "define", macro P[macro] D[macro] -+ next -+ } else { -+ # Replace #undef with comments. This is necessary, for example, -+ # in the case of _POSIX_SOURCE, which is predefined and required -+ # on some systems where configure will not decide to define it. -+ if (defundef == "undef") { -+ print "/*", prefix defundef, macro, "*/" -+ next -+ } -+ } -+} -+{ print } -+_ACAWK -+_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+ { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -+$as_echo "$as_me: error: could not setup config headers machinery" >&2;} -+ { (exit 1); exit 1; }; } -+fi # test -n "$CONFIG_HEADERS" ++This mode accepts the following additional options: + ++ -o OUTPUT-FILE set the output file name to OUTPUT-FILE ++ -no-suppress do not suppress compiler output for multiple passes ++ -prefer-pic try to build PIC objects only ++ -prefer-non-pic try to build non-PIC objects only ++ -shared do not build a \`.o' file suitable for static linking ++ -static only build a \`.o' file suitable for static linking ++ -Wc,FLAG pass FLAG directly to the compiler + -+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " -+shift -+for ac_tag -+do -+ case $ac_tag in -+ :[FHLC]) ac_mode=$ac_tag; continue;; -+ esac -+ case $ac_mode$ac_tag in -+ :[FHL]*:*);; -+ :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} -+ { (exit 1); exit 1; }; };; -+ :[FH]-) ac_tag=-:-;; -+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; -+ esac -+ ac_save_IFS=$IFS -+ IFS=: -+ set x $ac_tag -+ IFS=$ac_save_IFS -+ shift -+ ac_file=$1 -+ shift ++COMPILE-COMMAND is a command to be used in creating a \`standard' object file ++from the given SOURCEFILE. + -+ case $ac_mode in -+ :L) ac_source=$1;; -+ :[FH]) -+ ac_file_inputs= -+ for ac_f -+ do -+ case $ac_f in -+ -) ac_f="$tmp/stdin";; -+ *) # Look for the file first in the build tree, then in the source tree -+ # (if the path is not absolute). The absolute path cannot be DOS-style, -+ # because $ac_f cannot contain `:'. -+ test -f "$ac_f" || -+ case $ac_f in -+ [\\/$]*) false;; -+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; -+ esac || -+ { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} -+ { (exit 1); exit 1; }; };; -+ esac -+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac -+ ac_file_inputs="$ac_file_inputs '$ac_f'" -+ done ++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'." ++ ;; + -+ # Let's still pretend it is `configure' which instantiates (i.e., don't -+ # use $as_me), people would be surprised to read: -+ # /* config.h. Generated by config.status. */ -+ configure_input='Generated from '` -+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' -+ `' by configure.' -+ if test x"$ac_file" != x-; then -+ configure_input="$ac_file. $configure_input" -+ { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 -+$as_echo "$as_me: creating $ac_file" >&6;} - fi -- rm -f $ac_file -- mv conftest.h $ac_file -+ # Neutralize special characters interpreted by sed in replacement strings. -+ case $configure_input in #( -+ *\&* | *\|* | *\\* ) -+ ac_sed_conf_input=`$as_echo "$configure_input" | -+ sed 's/[\\\\&|]/\\\\&/g'`;; #( -+ *) ac_sed_conf_input=$configure_input;; -+ esac ++ execute) ++ $ECHO \ ++"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + -+ case $ac_tag in -+ *:-:* | *:-) cat >"$tmp/stdin" \ -+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -+$as_echo "$as_me: error: could not create $ac_file" >&2;} -+ { (exit 1); exit 1; }; } ;; -+ esac -+ ;; -+ esac ++Automatically set library path, then run a program. + -+ ac_dir=`$as_dirname -- "$ac_file" || -+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$ac_file" : 'X\(//\)[^/]' \| \ -+ X"$ac_file" : 'X\(//\)$' \| \ -+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -+$as_echo X"$ac_file" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)[^/].*/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` -+ { as_dir="$ac_dir" -+ case $as_dir in #( -+ -*) as_dir=./$as_dir;; -+ esac -+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { -+ as_dirs= -+ while :; do -+ case $as_dir in #( -+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( -+ *) as_qdir=$as_dir;; -+ esac -+ as_dirs="'$as_qdir' $as_dirs" -+ as_dir=`$as_dirname -- "$as_dir" || -+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$as_dir" : 'X\(//\)[^/]' \| \ -+ X"$as_dir" : 'X\(//\)$' \| \ -+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -+$as_echo X"$as_dir" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)[^/].*/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` -+ test -d "$as_dir" && break -+ done -+ test -z "$as_dirs" || eval "mkdir $as_dirs" -+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} -+ { (exit 1); exit 1; }; }; } -+ ac_builddir=. -+ -+case "$ac_dir" in -+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -+*) -+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` -+ # A ".." for each directory in $ac_dir_suffix. -+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` -+ case $ac_top_builddir_sub in -+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;; -+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; -+ esac ;; -+esac -+ac_abs_top_builddir=$ac_pwd -+ac_abs_builddir=$ac_pwd$ac_dir_suffix -+# for backward compatibility: -+ac_top_builddir=$ac_top_build_prefix -+ -+case $srcdir in -+ .) # We are building in place. -+ ac_srcdir=. -+ ac_top_srcdir=$ac_top_builddir_sub -+ ac_abs_top_srcdir=$ac_pwd ;; -+ [\\/]* | ?:[\\/]* ) # Absolute name. -+ ac_srcdir=$srcdir$ac_dir_suffix; -+ ac_top_srcdir=$srcdir -+ ac_abs_top_srcdir=$srcdir ;; -+ *) # Relative name. -+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix -+ ac_top_srcdir=$ac_top_build_prefix$srcdir -+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -+esac -+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix ++This mode accepts the following additional options: + ++ -dlopen FILE add the directory containing FILE to the library path + -+ case $ac_mode in -+ :F) -+ # -+ # CONFIG_FILE -+ # ++This mode sets the library path environment variable according to \`-dlopen' ++flags. + -+_ACEOF ++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. + -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+# If the template does not know about datarootdir, expand it. -+# FIXME: This hack should be removed a few years after 2.60. -+ac_datarootdir_hack=; ac_datarootdir_seen= -+ -+ac_sed_dataroot=' -+/datarootdir/ { -+ p -+ q -+} -+/@datadir@/p -+/@docdir@/p -+/@infodir@/p -+/@localedir@/p -+/@mandir@/p -+' -+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -+*datarootdir*) ac_datarootdir_seen=yes;; -+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) -+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -+_ACEOF -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+ ac_datarootdir_hack=' -+ s&@datadir@&$datadir&g -+ s&@docdir@&$docdir&g -+ s&@infodir@&$infodir&g -+ s&@localedir@&$localedir&g -+ s&@mandir@&$mandir&g -+ s&\\\${datarootdir}&$datarootdir&g' ;; -+esac -+_ACEOF ++Then, COMMAND is executed, with ARGS as arguments." ++ ;; + -+# Neutralize VPATH when `$srcdir' = `.'. -+# Shell code in configure.ac might set extrasub. -+# FIXME: do we really want to maintain this feature? -+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+ac_sed_extra="$ac_vpsub -+$extrasub -+_ACEOF -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+:t -+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -+s|@configure_input@|$ac_sed_conf_input|;t t -+s&@top_builddir@&$ac_top_builddir_sub&;t t -+s&@top_build_prefix@&$ac_top_build_prefix&;t t -+s&@srcdir@&$ac_srcdir&;t t -+s&@abs_srcdir@&$ac_abs_srcdir&;t t -+s&@top_srcdir@&$ac_top_srcdir&;t t -+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -+s&@builddir@&$ac_builddir&;t t -+s&@abs_builddir@&$ac_abs_builddir&;t t -+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -+$ac_datarootdir_hack -+" -+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ -+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -+$as_echo "$as_me: error: could not create $ac_file" >&2;} -+ { (exit 1); exit 1; }; } -+ -+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && -+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && -+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && -+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -+which seems to be undefined. Please make sure it is defined." >&5 -+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -+which seems to be undefined. Please make sure it is defined." >&2;} -+ -+ rm -f "$tmp/stdin" -+ case $ac_file in -+ -) cat "$tmp/out" && rm -f "$tmp/out";; -+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; -+ esac \ -+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -+$as_echo "$as_me: error: could not create $ac_file" >&2;} -+ { (exit 1); exit 1; }; } -+ ;; -+ :H) -+ # -+ # CONFIG_HEADER -+ # -+ if test x"$ac_file" != x-; then -+ { -+ $as_echo "/* $configure_input */" \ -+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" -+ } >"$tmp/config.h" \ -+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -+$as_echo "$as_me: error: could not create $ac_file" >&2;} -+ { (exit 1); exit 1; }; } -+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then -+ { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -+$as_echo "$as_me: $ac_file is unchanged" >&6;} -+ else -+ rm -f "$ac_file" -+ mv "$tmp/config.h" "$ac_file" \ -+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -+$as_echo "$as_me: error: could not create $ac_file" >&2;} -+ { (exit 1); exit 1; }; } -+ fi -+ else -+ $as_echo "/* $configure_input */" \ -+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ -+ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -+$as_echo "$as_me: error: could not create -" >&2;} -+ { (exit 1); exit 1; }; } - fi --fi; done -+ ;; - --EOF --cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -+ esac - --exit 0 --EOF -+done # for ac_tag ++ finish) ++ $ECHO \ ++"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + ++Complete the installation of libtool libraries. + -+{ (exit 0); exit 0; } -+_ACEOF - chmod +x $CONFIG_STATUS --rm -fr confdefs* $ac_clean_files --test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 -+ac_clean_files=$ac_clean_files_save -+ -+test $ac_write_fail = 0 || -+ { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} -+ { (exit 1); exit 1; }; } -+ -+ -+# configure is writing to config.log, and then calls config.status. -+# config.status does its own redirection, appending to config.log. -+# Unfortunately, on DOS this fails, as config.log is still kept open -+# by configure, so config.status won't be able to write to it; its -+# output is simply discarded. So we exec the FD to /dev/null, -+# effectively closing config.log, so it can be properly (re)opened and -+# appended to by config.status. When coming back to configure, we -+# need to make the FD available again. -+if test "$no_create" != yes; then -+ ac_cs_success=: -+ ac_config_status_args= -+ test "$silent" = yes && -+ ac_config_status_args="$ac_config_status_args --quiet" -+ exec 5>/dev/null -+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false -+ exec 5>>config.log -+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which -+ # would make configure fail if this is the last instruction. -+ $ac_cs_success || { (exit 1); exit 1; } -+fi -+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then -+ { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -+fi - - echo makedefc - cat makedefc -diff -durN gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in ---- gcl-2.6.8.ORIG/configure.in 2010-01-26 12:41:14.000000000 -0700 -+++ gcl-2.6.8/configure.in 2010-03-23 10:09:13.998098611 -0600 -@@ -1,4 +1,5 @@ - AC_INIT() -+AC_PREREQ([2.61]) - AC_CONFIG_HEADER(h/gclincl.h) - - VERSION=`cat majvers`.`cat minvers` -@@ -11,61 +12,92 @@ - # - - help="--enable-maxpage=XXXX will compile in a page table of size XXX (default ${default_maxpage})" --AC_ARG_ENABLE(maxpage,[ --enable-maxpage=XXXX will compile in a page table of size XXX (eg '--enable-maxpage=64*1024' would give 64K pages allowing 256 MB if pages are 4K each)] , --[AC_DEFINE_UNQUOTED(MAXPAGE,$enable_maxpage)]) -+AC_ARG_ENABLE(maxpage, -+ [AS_HELP_STRING([--enable-maxpage=XXXX], -+ [will compile in a page table of size XXX (eg '--enable-maxpage=64*1024' would give 64K pages allowing 256 MB if pages are 4K each)])], -+ [AC_DEFINE_UNQUOTED(MAXPAGE,$enable_maxpage)]) - --AC_ARG_ENABLE(holepage,[ --enable-holepage=XXXX will compile in a XXX-sized hole between the heap and relocatable memory area (eg '--enable-holepage=64*1024' would give 64K pages allowing 256 MB if pages are 4K each)] , --[AC_DEFINE_UNQUOTED(HOLEPAGE,$enable_holepage)]) -+AC_ARG_ENABLE(holepage, -+ [AS_HELP_STRING([--enable-holepage=XXXX], -+ [will compile in a XXX-sized hole between the heap and relocatable memory area (eg '--enable-holepage=64*1024' would give 64K pages allowing 256 MB if pages are 4K each)])], -+ [AC_DEFINE_UNQUOTED(HOLEPAGE,$enable_holepage)]) - --AC_ARG_ENABLE(vssize,[ --enable-vssize=XXXX will compile in a value stack of size XXX] , --[AC_DEFINE_UNQUOTED(VSSIZE,$enable_vssize)]) -+AC_ARG_ENABLE(vssize, -+ [AS_HELP_STRING([--enable-vssize=XXXX], -+ [will compile in a value stack of size XXX])], -+ [AC_DEFINE_UNQUOTED(VSSIZE,$enable_vssize)]) - --AC_ARG_ENABLE(bdssize,[ --enable-bdssize=XXXX will compile in a binding stack of size XXX] , --[AC_DEFINE_UNQUOTED(BDSSIZE,$enable_bdssize)]) -+AC_ARG_ENABLE(bdssize, -+ [AS_HELP_STRING([--enable-bdssize=XXXX], -+ [will compile in a binding stack of size XXX])], -+ [AC_DEFINE_UNQUOTED(BDSSIZE,$enable_bdssize)]) - --AC_ARG_ENABLE(ihssize,[ --enable-ihssize=XXXX will compile in a invocation history stack of size XXX] , --[AC_DEFINE_UNQUOTED(IHSSIZE,$enable_ihssize)]) -+AC_ARG_ENABLE(ihssize, -+ [AS_HELP_STRING([--enable-ihssize=XXXX], -+ [will compile in a invocation history stack of size XXX])], -+ [AC_DEFINE_UNQUOTED(IHSSIZE,$enable_ihssize)]) - --AC_ARG_ENABLE(frssize,[ --enable-frssize=XXXX will compile in a frame stack of size XXX] , --[AC_DEFINE_UNQUOTED(FRSSIZE,$enable_frssize)]) -+AC_ARG_ENABLE(frssize, -+ [AS_HELP_STRING([--enable-frssize=XXXX], -+ [will compile in a frame stack of size XXX])], -+ [AC_DEFINE_UNQUOTED(FRSSIZE,$enable_frssize)]) - --AC_ARG_ENABLE(machine,[ --enable-machine=XXXX will force the use of one of the definitions in h/XXXX.defs] , --[enable_machine=$enableval],[enable_machine=""]) -+AC_ARG_ENABLE(machine, -+ [AS_HELP_STRING([--enable-machine=XXXX], -+ [will force the use of one of the definitions in h/XXXX.defs])], -+ [enable_machine=$enableval],[enable_machine=""]) - --#AC_ARG_ENABLE(gmp,[ --enable-gmp=no will disable use of GMP gnu multiprecision arithmetic, (default is =yes)] , --#[use_gmp=$enableval],[use_gmp="yes"]) -+#AC_ARG_ENABLE(gmp, -+# [AS_HELP_STRING([--enable-gmp=no], -+# [will disable use of GMP gnu multiprecision arithmetic, (default is =yes)])], -+# [use_gmp=$enableval],[use_gmp="yes"]) - - use_gmp="yes" - --AC_ARG_ENABLE(notify,[ --enable-notify=no will disable the automatic notification of gcl maintainers of successful builds/problems] , --[enable_notify=$enableval],[enable_notify="yes"]) -- --AC_ARG_ENABLE(tkconfig,[ --enable-tkconfig=XXXX will force the use of a TK_CONFIG_PREFIX=XXXXX as place to look for tkConfig.sh and tclConfig.sh ] , --[TK_CONFIG_PREFIX=$enableval],[TK_CONFIG_PREFIX="unknown"]) -+AC_ARG_ENABLE(notify, -+ [AS_HELP_STRING([--enable-notify=no], -+ [will disable the automatic notification of gcl maintainers of successful builds/problems])], -+ [enable_notify=$enableval],[enable_notify="yes"]) - -+AC_ARG_ENABLE(tkconfig, -+ [AS_HELP_STRING([--enable-tkconfig=XXXX], -+ [will force the use of a TK_CONFIG_PREFIX=XXXXX as place to look for tkConfig.sh and tclConfig.sh])], -+ [TK_CONFIG_PREFIX=$enableval],[TK_CONFIG_PREFIX="unknown"]) - --AC_ARG_ENABLE(tclconfig,[ --enable-tclconfig=XXXX will force the use of a TCL_CONFIG_PREFIX=XXXXX as place to look for tclConfig.sh and tclConfig.sh ] , --[TCL_CONFIG_PREFIX=$enableval],[TCL_CONFIG_PREFIX="unknown"]) -+AC_ARG_ENABLE(tclconfig, -+ [AS_HELP_STRING([--enable-tclconfig=XXXX], -+ [will force the use of a TCL_CONFIG_PREFIX=XXXXX as place to look for tclConfig.sh and tclConfig.sh])], -+ [TCL_CONFIG_PREFIX=$enableval],[TCL_CONFIG_PREFIX="unknown"]) - --AC_ARG_ENABLE(infodir,[ --enable-infodir=XXXX will force the use of a INFO_DIR=XXXXX as place to look for info ] , --[INFO_DIR=$enableval],[INFO_DIR=$prefix/share/info]) -+AC_ARG_ENABLE(infodir, -+ [AS_HELP_STRING([--enable-infodir=XXXX], -+ [will force the use of a INFO_DIR=XXXXX as place to look for info])], -+ [INFO_DIR=$enableval],[INFO_DIR=$prefix/share/info]) - INFO_DIR=`eval echo $INFO_DIR/` - --AC_ARG_ENABLE(emacsdir,[ --enable-emacsdir=XXXX will manually specify the location for elisp files ] , --[EMACS_SITE_LISP=$enableval],[EMACS_SITE_LISP=$prefix/share/emacs/site-lisp]) -+AC_ARG_ENABLE(emacsdir, -+ [AS_HELP_STRING([--enable-emacsdir=XXXX], -+ [will manually specify the location for elisp files])], -+ [EMACS_SITE_LISP=$enableval],[EMACS_SITE_LISP=$prefix/share/emacs/site-lisp]) - EMACS_SITE_LISP=`eval echo $EMACS_SITE_LISP/` - --AC_ARG_ENABLE(common-binary,[ --enable-common-binary=yes forces use of lowest common denominator instruction sets, (default is =yes)] , --[use_common_binary=$enableval],[use_common_binary="yes"]) -+AC_ARG_ENABLE(common-binary, -+ [AS_HELP_STRING([--enable-common-binary=yes], -+ [forces use of lowest common denominator instruction sets, (default is =yes)])], -+ [use_common_binary=$enableval],[use_common_binary="yes"]) - --AC_ARG_ENABLE(japi,[ --enable-japi=yes will compile in support for the JAPI graphical interface if present on your system], --[try_japi=$enableval],[try_japi="no"]) -+AC_ARG_ENABLE(japi, -+ [AS_HELP_STRING([--enable-japi=yes], -+ [will compile in support for the JAPI graphical interface if present on your system])], -+ [try_japi=$enableval],[try_japi="no"]) - --AC_ARG_ENABLE(xdr,[ --enable-xdr=yes will compile in support for XDR], --[try_xdr=$enableval],[try_xdr="no"]) -+AC_ARG_ENABLE(xdr, -+ [AS_HELP_STRING([--enable-xdr=yes],[will compile in support for XDR])], -+ [try_xdr=$enableval],[try_xdr="no"]) - --AC_ARG_ENABLE(xgcl,[ --enable-xgcl=yes will compile in support for XGCL], --[enable_xgcl=$enableval],[enable_xgcl="yes"]) -+AC_ARG_ENABLE(xgcl, -+ [AS_HELP_STRING([--enable-xgcl=yes],[will compile in support for XGCL])], -+ [enable_xgcl=$enableval],[enable_xgcl="yes"]) - - # - # Host information -@@ -302,39 +334,49 @@ - esac - - AC_ARG_ENABLE(dlopen, -- [ --enable-dlopen uses dlopen for loading objects, which can then not be retained in saved images ] -- ,,enable_dlopen="$def_dlopen") -+ [AS_HELP_STRING([--enable-dlopen], -+ [uses dlopen for loading objects, which can then not be retained in saved images])],, -+ enable_dlopen="$def_dlopen") - AC_ARG_ENABLE(statsysbfd, -- [ --enable-statsysbfd uses a static sytem bfd library for loading and relocationing object files ] -- ,,enable_statsysbfd="$def_statsysbfd") -+ [AS_HELP_STRING([--enable-statsysbfd], -+ [uses a static sytem bfd library for loading and relocationing object files])],, -+ enable_statsysbfd="$def_statsysbfd") - AC_ARG_ENABLE(dynsysbfd, -- [ --enable-dynsysbfd uses a dynamic shared sytem bfd library for loading and relocationing object files ] -- ,,enable_dynsysbfd="no") -+ [AS_HELP_STRING([--enable-dynsysbfd], -+ [uses a dynamic shared sytem bfd library for loading and relocationing object files])],, -+ enable_dynsysbfd="no") - AC_ARG_ENABLE(locbfd, -- [ --enable-locbfd uses a static bfd library built from this source tree for loading and relocationing object files ] -- ,,enable_locbfd="$def_locbfd") -+ [AS_HELP_STRING([--enable-locbfd], -+ [uses a static bfd library built from this source tree for loading and relocationing object files])],, -+ enable_locbfd="$def_locbfd") - AC_ARG_ENABLE(custreloc, -- [ --enable-custreloc uses custom gcl code if available for loading and relocationing object files ] -- ,,enable_custreloc="$def_custreloc") -+ [AS_HELP_STRING([--enable-custreloc], -+ [uses custom gcl code if available for loading and relocationing object files])],, -+ enable_custreloc="$def_custreloc") - AC_ARG_ENABLE(debug, -- [ --enable-debug builds gcl with -g in CFLAGS to enable running under gdb ] -- ,,enable_debug="$def_debug") -+ [AS_HELP_STRING([--enable-debug], -+ [builds gcl with -g in CFLAGS to enable running under gdb])],, -+ enable_debug="$def_debug") - AC_ARG_ENABLE(gprof, -- [ --enable-gprof builds gcl with -pg in CFLAGS to enable profiling with gprof ] -- ,,enable_gprof="no") --AC_ARG_ENABLE(static,[ --enable-static will link your GCL against static as opposed to shared system libraries ] , -- [enable_static=$enableval],[enable_static="$def_static"]) -+ [AS_HELP_STRING([--enable-gprof], -+ [builds gcl with -pg in CFLAGS to enable profiling with gprof])],, -+ enable_gprof="no") -+AC_ARG_ENABLE(static, -+ [AS_HELP_STRING([--enable-static], -+ [will link your GCL against static as opposed to shared system libraries])], -+ [enable_static=$enableval],[enable_static="$def_static"]) - AC_ARG_ENABLE(pic, -- [ --enable-pic builds gcl with -fPIC in CFLAGS ] -- ,,enable_pic="$def_pic") -+ [AS_HELP_STRING([--enable-pic],[builds gcl with -fPIC in CFLAGS])],, -+ enable_pic="$def_pic") - - AC_ARG_ENABLE(oldgmp, -- [ --enable-oldgmp will link against gmp2 instead of gmp3 ] -- ,,enable_oldgmp="$def_oldgmp") -+ [AS_HELP_STRING([--enable-oldgmp],[will link against gmp2 instead of gmp3])],, -+ enable_oldgmp="$def_oldgmp") - - AC_ARG_ENABLE(dynsysgmp, -- [ --enable-dynsysgmp will link against the system libgmp3 overriding certain functions with patched versions from the local source ] -- ,,enable_dynsysgmp="yes") -+ [AS_HELP_STRING([--enable-dynsysgmp], -+ [will link against the system libgmp3 overriding certain functions with patched versions from the local source])],, -+ enable_dynsysgmp="yes") - - load_opt="0" - if test "$enable_dlopen" = "yes" ; then -@@ -586,9 +628,6 @@ - AC_MSG_CHECKING([system version (for dynamic loading)]) - if machine=`uname -m` ; then true; else machine=unknown ; fi - --AC_CHECK_PROGS(MAKEINFO,makeinfo,"false") --AC_SUBST(MAKEINFO) -- - if test -f /usr/lib/NextStep/software_version; then - system=NEXTSTEP-`${AWK} '/3/,/3/' /usr/lib/NextStep/software_version` - else -@@ -620,21 +659,24 @@ - - AC_CHECK_HEADER(unistd.h, - AC_CHECK_LIB(c,sysconf, -- AC_MSG_CHECKING("for _SC_CLK_TCK") -- AC_TRY_RUN([#include -- #include -- int -- main() { -- FILE *fp=fopen("conftest1","w"); -+ AC_MSG_CHECKING([for _SC_CLK_TCK]) -+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include -+ #include -+ ]],[[ -+ FILE *fp=fopen("conftest1","w"); - fprintf(fp,"%lu\n",sysconf(_SC_CLK_TCK)); - fclose(fp); -- return 0; -- }], -+ return 0; -+ ]])], - hz=`cat conftest1` - AC_DEFINE_UNQUOTED(HZ,$hz) - ,hz=0,hz=0) - [AC_MSG_RESULT($hz)])) - -+AC_PROG_EGREP -+AC_CHECK_PROGS(MAKEINFO,makeinfo,"false") -+AC_SUBST(MAKEINFO) ++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-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation ++ ++The rest of the components are interpreted as arguments to that command (only ++BSD-compatible install options are recognized)." ++ ;; ++ ++ 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 ++ -bindir BINDIR specify path to binaries directory (for systems where ++ libraries must be found in the PATH setting at runtime) ++ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime ++ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols ++ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) ++ -export-symbols SYMFILE ++ try to export only the symbols listed in SYMFILE ++ -export-symbols-regex REGEX ++ try to export only the symbols matching REGEX ++ -LLIBDIR search LIBDIR for required installed libraries ++ -lNAME OUTPUT-FILE requires the installed library libNAME ++ -module build a library that can dlopened ++ -no-fast-install disable the fast-install mode ++ -no-install link a not-installable executable ++ -no-undefined declare that a library does not refer to external symbols ++ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects ++ -objectlist FILE Use a list of object files found in FILE to specify objects ++ -precious-files-regex REGEX ++ don't remove output files matching REGEX ++ -release RELEASE specify package release information ++ -rpath LIBDIR the created library will eventually be installed in LIBDIR ++ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries ++ -shared only do dynamic linking of libtool libraries ++ -shrext SUFFIX override the standard shared library file extension ++ -static do not do any dynamic linking of uninstalled libtool libraries ++ -static-libtool-libs ++ do not do any dynamic linking of libtool libraries ++ -version-info CURRENT[:REVISION[:AGE]] ++ specify library version info [each variable defaults to 0] ++ -weak LIBNAME declare that the target provides the LIBNAME interface ++ -Wc,FLAG ++ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler ++ -Wl,FLAG ++ -Xlinker FLAG pass linker-specific FLAG directly to the linker ++ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) ++ ++All other options (arguments beginning with \`-') are ignored. ++ ++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 \`$opt_mode'" ++ ;; ++ esac ++ ++ echo ++ $ECHO "Try \`$progname --help' for more information about other modes." ++} ++ ++# Now that we've collected a possible --mode arg, show help if necessary ++if $opt_help; then ++ if test "$opt_help" = :; then ++ func_mode_help ++ else ++ { ++ func_help noexit ++ for opt_mode in compile link execute install finish uninstall clean; do ++ func_mode_help ++ done ++ } | sed -n '1p; 2,$s/^Usage:/ or: /p' ++ { ++ func_help noexit ++ for opt_mode in compile link execute install finish uninstall clean; do ++ echo ++ func_mode_help ++ done ++ } | ++ sed '1d ++ /^When reporting/,/^Report/{ ++ H ++ d ++ } ++ $x ++ /information about other modes/d ++ /more detailed .*MODE/d ++ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' ++ fi ++ exit $? ++fi ++ ++ ++# 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 $opt_dlopen; do ++ test -f "$file" \ ++ || func_fatal_help "\`$file' is not a file" ++ ++ dir= ++ case $file in ++ *.la) ++ func_resolve_sysroot "$file" ++ file=$func_resolve_sysroot_result ++ ++ # 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 ++ func_append dir "/$objdir" + else +- error=$? +- $run $rm $removelist +- exit $error ++ if test ! -f "$dir/$dlname"; then ++ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" ++ fi + fi ++ ;; ++ ++ *.lo) ++ # Just add the directory containing the .lo file. ++ func_dirname "$file" "" "." ++ dir="$func_dirname_result" ++ ;; ++ ++ *) ++ func_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 - #MY_SUBDIRS= +- # 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 < -- int main() { -+ AC_MSG_CHECKING([for external gmp version]) -+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include -+ ]],[[ - #if __GNU_MP_VERSION == 4 - return 0; - #else - return -1; - #endif -- }], -+ ]])], - # MPFILES=$GMPDIR/mpn/mul_n.o - # PATCHED_SYMBOLS=__gmpn_toom3_mul_n -+ AC_MSG_RESULT(4) - MPFILES= - PATCHED_SYMBOLS= - if test "$use" = "m68k-linux" ; then -@@ -674,7 +718,8 @@ - echo "int main() {return 0;}" >>foo.c - MP_INCLUDE=`cpp foo.c | grep /gmp.h | head -n 1 | $AWK '{print $3}' | tr -d '"'` - rm -f foo.c, -- echo "Cannot use dynamic gmp lib" , echo "Cannot use dynamic gmp lib" ), -+ AC_MSG_RESULT([Cannot use dynamic gmp lib]), -+ AC_MSG_RESULT([Cannot use dynamic gmp lib])), - echo "Cannot use dynamic gmp lib" ,), - echo "Cannot use dynamic gmp lib" ,) - fi -@@ -720,7 +765,7 @@ - - fi - --AC_MSG_CHECKING("for leading underscore in object symbols") -+AC_MSG_CHECKING([for leading underscore in object symbols]) - cat>foo.c < - #include -@@ -730,60 +775,62 @@ - if nm foo.o |grep " U " | grep "_cos" >/dev/null || nm foo.o |grep " U " | grep " _getc" >/dev/null ; then - LEADING_UNDERSCORE=1 - AC_DEFINE(LEADING_UNDERSCORE) -- AC_MSG_RESULT("yes") -+ AC_MSG_RESULT([yes]) - else - LEADING_UNDERSCORE="" -- AC_MSG_RESULT("no") -+ AC_MSG_RESULT([no]) - fi --AC_MSG_CHECKING("for GNU ld option -Map") -+AC_MSG_CHECKING([for GNU ld option -Map]) - touch map - $CC -o foo [ -Wl,-Map ] map foo.o >/dev/null 2>&1 - if test `cat map | wc -l` != "0" ; then -- AC_MSG_RESULT("yes") -+ AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_GNU_LD) - GNU_LD=1 - else -- AC_MSG_RESULT("no") -+ AC_MSG_RESULT([no]) - GNU_LD= - fi - rm -f foo.c foo.o foo map - -- AC_MSG_CHECKING("for size of gmp limbs") -- AC_TRY_RUN([#include -+ AC_MSG_CHECKING([for size of gmp limbs]) -+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include - #include "$MP_INCLUDE" -- int main() { -+ ]],[[ - FILE *fp=fopen("conftest1","w"); - fprintf(fp,"%u",sizeof(mp_limb_t)); - fclose(fp); - return 0; -- }],mpsize=`cat conftest1`,mpsize=0,mpsize=0) -+ ]])],mpsize=`cat conftest1`,mpsize=0,mpsize=0) - if test "$mpsize" = "0" ; then -- echo "Cannot determine mpsize" -- exit 1 -+ AC_MSG_ERROR([Cannot determine mpsize], 1) - fi - AC_DEFINE_UNQUOTED(MP_LIMB_BYTES,$mpsize) - AC_MSG_RESULT($mpsize) - -- AC_MSG_CHECKING("_SHORT_LIMB") -- AC_TRY_RUN([#include -+ AC_MSG_CHECKING([_SHORT_LIMB]) -+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include - #include "$MP_INCLUDE" -- int main() { -+ ]],[[ - #ifdef _SHORT_LIMB - return 0; - #else - return 1; - #endif -- }],AC_DEFINE(__SHORT_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no)) -- AC_MSG_CHECKING("_LONG_LONG_LIMB") -- AC_TRY_RUN([#include -+ ]])],AC_DEFINE(__SHORT_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no)) -+ AC_MSG_CHECKING([_LONG_LONG_LIMB]) -+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include - #include "$MP_INCLUDE" -- int main() { -+ ]],[[ - #ifdef _LONG_LONG_LIMB - return 0; - #else - return 1; - #endif -- }],AC_DEFINE(__LONG_LONG_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no)) -+ ]])],AC_DEFINE(__LONG_LONG_LIMB) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(no)) +-EOF ++ # Check if any of the arguments is a wrapper script. ++ args= ++ for file ++ do ++ case $file in ++ -* | *.la | *.lo ) ;; ++ *) ++ # Do a test to see if this is really a libtool program. ++ if func_ltwrapper_script_p "$file"; then ++ func_source "$file" ++ # Transform arg to wrapped name. ++ file="$progdir/$program" ++ elif func_ltwrapper_executable_p "$file"; then ++ func_ltwrapper_scriptname "$file" ++ func_source "$func_ltwrapper_scriptname_result" ++ # Transform arg to wrapped name. ++ file="$progdir/$program" ++ fi ++ ;; ++ esac ++ # Quote arguments (to preserve shell metacharacters). ++ func_append_quoted args "$file" ++ done ++ ++ if test "X$opt_dry_run" = Xfalse; then ++ if test -n "$shlibpath_var"; then ++ # Export the shlibpath_var. ++ eval "export $shlibpath_var" ++ fi ++ ++ # Restore saved environment variables ++ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES ++ do ++ eval "if test \"\${save_$lt_var+set}\" = set; then ++ $lt_var=\$save_$lt_var; export $lt_var ++ else ++ $lt_unset $lt_var ++ fi" ++ done ++ ++ # Now prepare to actually exec the command. ++ exec_cmd="\$cmd$args" + else +- # Append the name of the non-PIC object the libtool object file. +- # Only append if the libtool object file exists. +- test -z "$run" && cat >> ${libobj}T < $tmpdir/tmp-la ++ mv -f $tmpdir/tmp-la $lib ++ done ++ ${RM}r "$tmpdir" ++ fi + fi - AC_CHECK_LIB(dl,dlopen,have_dl=1,have_dl=0) - if test "$have_dl" = "0" ; then -- echo "Cannot find dlopen in -dl" -- exit 1 -+ AC_MSG_ERROR([Cannot find dlopen in -dl], 1) - fi - dnl AC_SEARCH_LIBS(dlopen, dl, have_dl=1, AC_ERROR(dlopen not found)) - dnl LIBS and TLIBS - why not merged from the beginning? -@@ -857,15 +903,17 @@ - # Old binutils appear to need CONST defined to const - # - AC_MSG_CHECKING(if need to define CONST for bfd) -- AC_TRY_RUN([#define IN_GCC -+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #define IN_GCC - #include -- int main() { symbol_info t; return 0;}], -+ ]],[[symbol_info t; return 0;]])], - AC_MSG_RESULT(no), -- AC_TRY_RUN([#define CONST const -- #define IN_GCC -+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #define CONST const -+ #define IN_GCC - #include -- int main() {symbol_info t; return 0;}], -- AC_MSG_RESULT(yes) -+ ]],[[symbol_info t; return 0;]])], -+ AC_MSG_RESULT(yes) - AC_DEFINE(NEED_CONST), - AC_MSG_ERROR([cannot use bfd]), - AC_MSG_ERROR([cannot use bfd])), -@@ -878,11 +926,12 @@ - # BFD boolean syntax - # +- $run $mv "${libobj}T" "${libobj}" ++ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then ++ for libdir in $libdirs; do ++ if test -n "$finish_cmds"; then ++ # Do each command in the finish commands. ++ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds ++'"$cmd"'"' ++ fi ++ if test -n "$finish_eval"; then ++ # Do the single finish_eval. ++ eval cmds=\"$finish_eval\" ++ $opt_dry_run || eval "$cmds" || func_append admincmds " ++ $cmds" ++ fi ++ done ++ fi -- AC_MSG_CHECKING(for useable bfd_boolean) -- AC_TRY_RUN([#define IN_GCC -+ AC_MSG_CHECKING(for usable bfd_boolean) -+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #define IN_GCC - #include - bfd_boolean foo() {return FALSE;} -- int main() {return 0;}], -+ ]], [[return 0;]])], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_BFD_BOOLEAN), - AC_MSG_RESULT(no), -@@ -894,9 +943,10 @@ - # - - AC_MSG_CHECKING(for bfd_link_info.output_bfd) -- AC_TRY_RUN([#include -+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include - #include -- int main() {struct bfd_link_info i;i.output_bfd=0;return 0;}], -+ ]], [[struct bfd_link_info i;i.output_bfd=0;return 0;]])], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_OUTPUT_BFD), - AC_MSG_RESULT(no), -@@ -999,45 +1049,47 @@ - # mechanism, in the PAGE macro. This offset is subtracted from - # addresses, in calculating a page for an address in the heap. - --AC_CHECK_SIZEOF(long,0) -+AC_CHECK_SIZEOF(long) - AC_MSG_CHECKING(sizeof struct contblock) - - # work around MSYS pwd result incompatibility - if test "$use" = "mingw" ; then --AC_TRY_RUN([#include -+AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include - #define EXTER - #include "$MP_INCLUDE" - #include "h/enum.h" - #include "h/object.h" -- int main(int argc,char **argv,char **envp) { -+ ]],[[ - FILE *f=fopen("conftest1","w"); - fprintf(f,"%u",sizeof(struct contblock)); - fclose(f); - return 0; -- }],sizeof_contblock=`cat conftest1`, -- echo Cannot find sizeof struct contblock;exit 1, -- echo Cannot find sizeof struct contblock;exit 1) -+ ]])],sizeof_contblock=`cat conftest1`, -+ AC_MSG_ERROR(Cannot find sizeof struct contblock, 1), -+ AC_MSG_ERROR(Cannot find sizeof struct contblock, 1)) - else --AC_TRY_RUN([#include -+AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include - #define EXTER - #include "$MP_INCLUDE" - #include "`pwd`/h/enum.h" - #include "`pwd`/h/object.h" -- int main(int argc,char **argv,char **envp) { -+ ]],[[ - FILE *f=fopen("conftest1","w"); - fprintf(f,"%u",sizeof(struct contblock)); - fclose(f); - return 0; -- }],sizeof_contblock=`cat conftest1`, -- echo Cannot find sizeof struct contblock;exit 1, -- echo Cannot find sizeof struct contblock;exit 1) -+ ]])],sizeof_contblock=`cat conftest1`, -+ AC_MSG_ERROR(Cannot find sizeof struct contblock, 1), -+ AC_MSG_ERROR(Cannot find sizeof struct contblock, 1)) - fi - AC_MSG_RESULT($sizeof_contblock) - AC_DEFINE_UNQUOTED(SIZEOF_CONTBLOCK,$sizeof_contblock) - - - AC_MSG_CHECKING(for word order) --AC_TRY_RUN([int main () { -+AC_RUN_IFELSE([AC_LANG_PROGRAM([[]],[[ - /* Are we little or big endian? Adapted from Harbison&Steele. */ - union - { -@@ -1046,7 +1098,7 @@ - } u; - u.d = 1.0; - return u.l[sizeof(double)/sizeof(int)-1] ? 0 : 1; --}],AC_MSG_RESULT(little) -+]])],AC_MSG_RESULT(little) - AC_DEFINE(LITTLE_END), - AC_MSG_RESULT(big), - AC_MSG_RESULT([WARNING: ASSUMING LITTLE ENDIAN FOR CROSS COMPILING !!!] -@@ -1059,15 +1111,16 @@ - - AC_MSG_CHECKING([for sbrk]) - HAVE_SBRK="" --AC_TRY_RUN([#include -- #include -- int main() { -+AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include -+ #include -+ ]],[[ - FILE *f; - if (!(f=fopen("conftest1","w"))) - return -1; - fprintf(f,"%u",sbrk(0)); - return 0; -- }], -+ ]])], - HAVE_SBRK=1 - AC_MSG_RESULT(yes), - AC_MSG_RESULT([no: WARNING you must be able to emulate sbrk: as on mingw or macosx]), -@@ -1079,14 +1132,15 @@ - # AC_MSG_RESULT(sys/personality.h not found)) - - AC_MSG_CHECKING([for ADDR_NO_RANDOMIZE constant]) -- AC_TRY_RUN([#include -- #include -- int main(int argc,char *argv[],char *envp[]) { -+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include -+ #include -+ ]],[[ - FILE *f; - if (!(f=fopen("conftest1","w"))) return -1; - fprintf(f,"%x",ADDR_NO_RANDOMIZE); - return 0; -- }], -+ ]])], - ADDR_NO_RANDOMIZE=`cat conftest1`,ADDR_NO_RANDOMIZE=0,ADDR_NO_RANDOMIZE=0) - if test "$ADDR_NO_RANDOMIZE" = "0" ; then - AC_MSG_RESULT([no, assuming 0x40000]) -@@ -1096,10 +1150,11 @@ - fi - - AC_MSG_CHECKING([for personality(ADDR_NO_RANDOMIZE) support]) -- AC_TRY_RUN([void gprof_cleanup() {}; -+ AC_RUN_IFELSE([AC_LANG_SOURCE([[ -+ void gprof_cleanup() {} - int main(int argc,char *argv[],char *envp[]) { - #include "h/unrandomize.h" -- return 0;}],CAN_UNRANDOMIZE_SBRK=1,CAN_UNRANDOMIZE_SBRK=0,CAN_UNRANDOMIZE_SBRK=0) -+ return 0;}]])],CAN_UNRANDOMIZE_SBRK=1,CAN_UNRANDOMIZE_SBRK=0,CAN_UNRANDOMIZE_SBRK=0) - - if test "$CAN_UNRANDOMIZE_SBRK" != 0 ; then - AC_MSG_RESULT(yes) -@@ -1109,8 +1164,9 @@ - fi - - AC_MSG_CHECKING([that sbrk is (now) non-random]) -- AC_TRY_RUN([#include -- void gprof_cleanup() {}; -+ AC_RUN_IFELSE([AC_LANG_SOURCE([[ -+ #include -+ void gprof_cleanup() {} - int main(int argc,char * argv[],char * envp[]) { - FILE *f; - #ifdef CAN_UNRANDOMIZE_SBRK -@@ -1118,13 +1174,13 @@ - #endif - if (!(f=fopen("conftest1","w"))) return -1; - fprintf(f,"%u",sbrk(0)); -- return 0;}],SBRK=`cat conftest1`,SBRK=0,SBRK=0) -+ return 0;}]])],SBRK=`cat conftest1`,SBRK=0,SBRK=0) - if test "$SBRK" = "0" ; then -- AC_MSG_RESULT(cannot trap sbrk) -- exit 1 -+ AC_MSG_ERROR(cannot trap sbrk, 1) - fi -- AC_TRY_RUN([#include -- void gprof_cleanup() {}; -+ AC_RUN_IFELSE([AC_LANG_SOURCE([[ -+ #include -+ void gprof_cleanup() {} - int main(int argc,char * argv[],char * envp[]) { - FILE *f; - #ifdef CAN_UNRANDOMIZE_SBRK -@@ -1132,10 +1188,9 @@ - #endif - if (!(f=fopen("conftest1","w"))) return -1; - fprintf(f,"%u",sbrk(0)); -- return 0;}],SBRK1=`cat conftest1`,SBRK1=0,SBRK1=0) -+ return 0;}]])],SBRK1=`cat conftest1`,SBRK1=0,SBRK1=0) - if test "$SBRK1" = "0" ; then -- AC_MSG_RESULT(cannot trap sbrk) -- exit 1 -+ AC_MSG_ERROR(cannot trap sbrk, 1) - fi - if test "$SBRK" = "$SBRK1" ; then - AC_MSG_RESULT(yes) -@@ -1151,14 +1206,16 @@ - - # pagewidth - AC_MSG_CHECKING(for pagewidth) --AC_TRY_RUN([#include -+AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include - #include --int main() {size_t i=getpagesize(),j; -+ ]],[[ -+ size_t i=getpagesize(),j; - FILE *fp=fopen("conftest1","w"); - for (j=0;i>>=1;j++); - if (j<12) {printf("pagewidth %u is too small\n",j);return -1;} - fprintf(fp,"%u",j); -- return 0;}],PAGEWIDTH=`cat conftest1`,PAGEWIDTH=0,PAGEWIDTH=0) -+ return 0;]])],PAGEWIDTH=`cat conftest1`,PAGEWIDTH=0,PAGEWIDTH=0) - AC_MSG_RESULT($PAGEWIDTH) - AC_DEFINE_UNQUOTED(PAGEWIDTH,$PAGEWIDTH) - AC_SUBST(PAGEWIDTH) -@@ -1166,11 +1223,12 @@ - - old_LDFLAGS="$LDFLAGS" - LDFLAGS="$TLDFLAGS" --AC_MSG_CHECKING("finding DBEGIN") --AC_TRY_RUN([#include -- #include -+AC_MSG_CHECKING([for DBEGIN]) -+AC_RUN_IFELSE([AC_LANG_SOURCE([[ -+#include -+#include - --void gprof_cleanup() {}; -+void gprof_cleanup() {} - int - main(int argc,char * argv[],char *envp[]) - { -@@ -1195,7 +1253,7 @@ - #endif - fclose(fp); - return 0; --}],dbegin=`cat conftest1`,dbegin=0,dbegin=0) -+}]])],dbegin=`cat conftest1`,dbegin=0,dbegin=0) - AC_DEFINE_UNQUOTED(DBEGIN,$dbegin \ - /* where data begins */ - ) -@@ -1203,30 +1261,29 @@ - LDFLAGS="$old_LDFLAGS" - - --AC_MSG_CHECKING("finding CSTACK_ADDRESS") --AC_TRY_RUN([#include --main() --{ -+AC_MSG_CHECKING([for CSTACK_ADDRESS]) -+AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include -+ ]],[[ - char *b ; - FILE *fp = fopen("conftest1","w"); - fprintf(fp,"%ld",((long) &b)); - fclose(fp); - return 0; --}],cstack_address=`cat conftest1`,cstack_address=0,cstack_address=0) -+]])],cstack_address=`cat conftest1`,cstack_address=0,cstack_address=0) - AC_DEFINE_UNQUOTED(CSTACK_ADDRESS,$cstack_address \ - ) - AC_MSG_RESULT(got $cstack_address) - - - --AC_MSG_CHECKING("sizeof long long int") --AC_TRY_RUN([#include --main() --{ -+AC_MSG_CHECKING([sizeof long long int]) -+AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include -+ ]],[[ - if (sizeof(long long int) == 2*sizeof(long)) return 0; - return 1; --} --],[AC_DEFINE(HAVE_LONG_LONG) -+]])],[AC_DEFINE(HAVE_LONG_LONG) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no), - AC_MSG_RESULT(no) -@@ -1236,12 +1293,15 @@ - - # readline - AC_ARG_ENABLE(readline, -- [--enable-readine enables command line completion via the readline library ],, -- enable_readline="yes") -+ [AS_HELP_STRING([--enable-readine], -+ [enables command line completion via the readline library])],, -+ enable_readline="yes") - - # ansi lisp --AC_ARG_ENABLE(ansi,[--enable-ansi builds a large gcl aiming for ansi compliance, -- --disable-ansi builds the smaller traditional CLtL1 image],,enable_ansi="no") -+AC_ARG_ENABLE(ansi, -+ [AS_HELP_STRING([--enable-ansi], -+ [builds a large gcl aiming for ansi compliance; the default is to build the smaller traditional CLtL1 image])],, -+ enable_ansi="no") - - if test "$enable_ansi" = "yes" ; then - SYSTEM=ansi_gcl -@@ -1343,41 +1403,61 @@ - # test makes sense. CM - # - AC_MSG_CHECKING([for isnormal]) --AC_TRY_RUN([#define _GNU_SOURCE -- #include -- int main() { -+AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #define _GNU_SOURCE -+ #include -+ ]],[[ - float f; - return isnormal(f) || !isnormal(f) ? 0 : 1; -- }], -- AC_DEFINE(HAVE_ISNORMAL) AC_MSG_RESULT(yes), -+ ]])], -+ AC_DEFINE(HAVE_ISNORMAL) -+ AC_MSG_RESULT(yes), - AC_MSG_CHECKING([for fpclass in ieeefp.h]) -- AC_TRY_RUN([#include -- int main() { -+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include -+ ]],[[ - float f; - return fpclass(f)>=FP_NZERO || fpclass(f) -- int main() { -+AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #define _GNU_SOURCE -+ #include -+ ]],[[ - float f; - return isfinite(f) || !isfinite(f) ? 0 : 1; -- }], -- AC_DEFINE(HAVE_ISFINITE) AC_MSG_RESULT(yes), -+ ]])], -+ AC_DEFINE(HAVE_ISFINITE) -+ AC_MSG_RESULT(yes), - AC_MSG_CHECKING([for finite()]) -- AC_TRY_RUN([#include -- #include -- int main() { -+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include -+ #include -+ ]],[[ - float f; - return finite(f) || !finite(f) ? 0 : 1; -- }], -- AC_DEFINE(HAVE_FINITE) AC_MSG_RESULT(yes), -- HAVE_FINITE=0 AC_MSG_RESULT(no),HAVE_FINITE=0 AC_MSG_RESULT(no)) -- ,HAVE_ISFINITE=0 AC_MSG_RESULT(no),HAVE_ISFINITE=0 AC_MSG_RESULT(no)) -+ ]])], -+ AC_DEFINE(HAVE_FINITE) -+ AC_MSG_RESULT(yes), -+ HAVE_FINITE=0 -+ AC_MSG_RESULT(no), -+ HAVE_FINITE=0 -+ AC_MSG_RESULT(no)), -+ HAVE_ISFINITE=0 -+ AC_MSG_RESULT(no), -+ HAVE_ISFINITE=0 -+ AC_MSG_RESULT(no)) - - - -@@ -1398,7 +1478,6 @@ - # To get around this problem, check for both libraries together - # if -lsocket doesn't work by itself. - #-------------------------------------------------------------------- --AC_MSG_CHECKING([for sockets]) - tcl_checkBoth=0 - AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1) - if test "$tcl_checkSocket" = 1; then -@@ -1435,8 +1514,8 @@ - AC_SUBST(RL_OBJS) - AC_SUBST(RL_LIB) - --AC_MSG_CHECKING(For network code for nsocket.c) --AC_TRY_LINK([ -+AC_MSG_CHECKING(for network code for nsocket.c) -+AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - #include -@@ -1453,24 +1532,25 @@ - #include /* struct in_addr, struct sockaddr_in */ - #include /* inet_ntoa() */ - #include /* gethostbyname() */ --],[ connect(0,(struct sockaddr *)0,0); -+]],[[connect(0,(struct sockaddr *)0,0); - gethostbyname("jil"); - socket(AF_INET, SOCK_STREAM, 0); -- ], -+ ]])], - [AC_DEFINE(HAVE_NSOCKET) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) - - --AC_MSG_CHECKING(check for listen using fcntl) --AC_TRY_COMPILE([#include -+AC_MSG_CHECKING(for listen using fcntl) -+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+#include - #include --], --[FILE *fp=fopen("configure.in","r"); -+]], -+[[FILE *fp=fopen("configure.in","r"); - int orig; - orig = fcntl(fileno(fp), F_GETFL); - if (! (orig & O_NONBLOCK )) return 0; --], -+]])], - [AC_DEFINE(LISTEN_USE_FCNTL) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) -@@ -1491,7 +1571,7 @@ - AC_SUBST(USE_CLEANUP) - gcl_ok=no - --AC_HEADER_EGREP(LITTLE_ENDIAN, ctype.h, gcl_ok=yes, gcl_ok=noo) -+AC_EGREP_HEADER(LITTLE_ENDIAN, ctype.h, gcl_ok=yes, gcl_ok=no) - if test $gcl_ok = yes ; then - AC_DEFINE(ENDIAN_ALREADY_DEFINED) - fi -@@ -1523,32 +1603,35 @@ - esac - - --AC_MSG_CHECKING(check for SV_ONSTACK) --AC_TRY_COMPILE([#include -+AC_MSG_CHECKING(for SV_ONSTACK) -+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+#include - int joe=SV_ONSTACK; --], --[], -+]], -+[])], - [AC_DEFINE(HAVE_SV_ONSTACK) - AC_SUBST(HAVE_SV_ONSTACK) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) - --AC_MSG_CHECKING(check for SIGSYS) --AC_TRY_COMPILE([#include -+AC_MSG_CHECKING(for SIGSYS) -+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+#include - int joe=SIGSYS; --], --[], -+]], -+[])], - [AC_DEFINE(HAVE_SIGSYS) - AC_SUBST(HAVE_SIGSYS) - AC_MSG_RESULT(yes)], - AC_MSG_RESULT(no)) - - --AC_MSG_CHECKING(check for SIGEMT) --AC_TRY_COMPILE([#include -+AC_MSG_CHECKING(for SIGEMT) -+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+#include - int joe=SIGEMT; --], --[], -+]], -+[])], - [AC_DEFINE(HAVE_SIGEMT) - AC_SUBST(HAVE_SIGEMT) - AC_MSG_RESULT(yes)], -@@ -1560,12 +1643,13 @@ - #if test $use = "386-linux" ; then - AC_CHECK_HEADERS(asm/sigcontext.h) - AC_CHECK_HEADERS(asm/signal.h) -- AC_MSG_CHECKING([for sigcontext...]) -- AC_TRY_COMPILE([#include -- ], -- [ -+ AC_MSG_CHECKING([for sigcontext]) -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+ #include -+ ]], -+ [[ - struct sigcontext foo; -- ], -+ ]])], - [ - sigcontext_works=1; - AC_DEFINE(SIGNAL_H_HAS_SIGCONTEXT) -@@ -1576,18 +1660,19 @@ - AC_MSG_RESULT(sigcontext NOT in signal.h)] - ) - if test "$sigcontext_works" = 0 ; then -- AC_MSG_CHECKING([for sigcontext...]) -- AC_TRY_COMPILE([#include -+ AC_MSG_CHECKING([for sigcontext]) -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+ #include - #ifdef HAVE_ASM_SIGCONTEXT_H - #include - #endif - #ifdef HAVE_ASM_SIGNAL_H - #include - #endif -- ], -- [ -+ ]], -+ [[ - struct sigcontext foo; -- ], -+ ]])], - [ - AC_DEFINE(HAVE_SIGCONTEXT) - AC_MSG_RESULT(sigcontext in asm files) -@@ -1695,6 +1780,8 @@ - AC_MSG_RESULT($INFO_DIR) - AC_SUBST(INFO_DIR) - -+AC_CHECK_LIB(ieee,main,have_ieee=1,have_ieee=0) -+AC_CHECK_PROG(TCLSH,tclsh,tclsh,${TCLSH}) - AC_MSG_CHECKING([for tcl/tk]) - - -@@ -1715,9 +1802,6 @@ - EOF - #cp conftest.tcl foo.tcl - --AC_CHECK_PROG(TCLSH,tclsh,tclsh,${TCLSH}) --#AC_CHECK_PROG(TCLSH,tclsh8.0,tclsh8.0,${TCLSH}) -- - if test "${TCLSH}" = "" ; then true ; else - TCL_CONFIG_PREFIX=`${TCLSH} < conftest.tcl` - fi -@@ -1788,7 +1872,6 @@ - TCL_INCLUDE=-I/usr/include/tcl${TCL_VERSION} - fi - fi --AC_CHECK_LIB(lieee,main,have_ieee=1,have_ieee=0) - if test "$have_ieee" = "0" ; then - TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" ` - fi -@@ -1832,15 +1915,18 @@ - - # the time handling for unixtime, add timezone - --AC_MSG_CHECKING([alloca]) --AC_TRY_RUN([int main() { exit(alloca(500) != NULL ? 0 : 1);}], -+# alloca -+ -+AC_MSG_CHECKING([for alloca]) -+AC_RUN_IFELSE([AC_LANG_PROGRAM([],[[exit(alloca(500) != NULL ? 0 : 1);]])], - ,gcl_ok=yes, gcl_ok=no,gcl_ok=no) - if test $gcl_ok = yes ; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ALLOCA) - else -- AC_TRY_RUN([#include -- int main() { exit(alloca(500) != NULL ? 0 : 1);}], -+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ #include -+ ]],[[exit(alloca(500) != NULL ? 0 : 1);]])], - ,gcl_ok=yes, gcl_ok=no,gcl_ok=no) - if test $gcl_ok = yes ; then - AC_MSG_RESULT(yes) -@@ -1859,8 +1945,6 @@ - - - --# alloca -- - # dlopen etc - # idea make it so you do something dlopen(libX.so,RTLD_GLOBAL) - # then dlload("foo.o") a lisp file can refer to things in libX.so -@@ -1884,7 +1968,7 @@ - - # redhat/cygnus released for some reason a buggy version of gcc, - # which no one else released. Catch that here. --AC_MSG_CHECKING([Checking for buggy gcc version from redhat]) -+AC_MSG_CHECKING([for buggy gcc version from redhat]) - if 2>&1 $CC -v | fgrep "gcc version 2.96" > /dev/null - then - BROKEN_O4_OPT=1 -@@ -1917,7 +2001,8 @@ - if test -f h/$use.defs ; then - - AC_SUBST(use) -- AC_OUTPUT(makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp ) -+ AC_CONFIG_FILES(makedefc windows/gcl.iss windows/sysdir.bat windows/install.lsp ) -+ AC_OUTPUT - echo makedefc - cat makedefc - -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 2010-03-23 10:17:23.000000000 -0600 -@@ -1,15 +1,15 @@ --/* h/gclincl.h.in. Generated automatically from configure.in by autoheader 2.13. */ -- --/* Define if you have alloca, as a function or macro. */ --#undef HAVE_ALLOCA -+/* h/gclincl.h.in. Generated from configure.in by autoheader. */ -+/* define where the heap could begin. Normally should -+be the smallest value returned by sbrk(). Underestimating -+by 10-20 megabytes is not a problem. */ - --/* Define if you have and it should be used (not on Ultrix). */ --#undef HAVE_ALLOCA_H -+#define DBEGIN 0 - --/* Define if the X Window System is missing or not being used. */ --#undef X_DISPLAY_MISSING - --#define DBEGIN 0 -+/* the size of the page tables for gcl. Each page is PAGESIZE which -+is usually 4K or 8K bytes. From 1 to 3 bytes per page are -+preallocated in a table at compile time. this must be a power of 2 if -+SGC is enabled. */ - - #define MAXPAGE (128*1024*(SIZEOF_LONG>>2)/(1<<(PAGEWIDTH-12))) - #define VSSIZE 128*1024 -@@ -19,11 +19,33 @@ - - #define HOLEPAGE (MAXPAGE/10) - -+/* check to see if getcwd exists -+*/ -+#define HAVE_GETCWD 0 -+ -+ -+/* if we dont have USEGETCWD, we will use GETWD unless following defined -+*/ -+#undef HAVE_GETWD -+ -+ -+/* no gettimeofday function */ -+ - #undef NO_GETTOD - -+/* define if have */ -+#undef HAVE_ASM_SIGNAL_H -+ -+/* define if have */ -+#undef HAVE_ASM_SIGCONTEXT_H -+ - /* define if have struct sigcontext in one of above */ - #undef HAVE_SIGCONTEXT - -+ -+/* define if have */ -+#undef HAVE_SYS_IOCTL_H -+ - /* define if we can use the file nsocket.c */ - #undef HAVE_NSOCKET - -@@ -32,6 +54,7 @@ - #undef HAVE_ALLOCA - #endif - -+ - /* define if need alloca.h */ - #undef NEED_ALLOCA_H - -@@ -39,19 +62,23 @@ - #include - #endif - -+ - /* define LISTEN_USE_FCNTL if we can check for input using fcntl */ - #undef LISTEN_USE_FCNTL - - /* if signal.h alone contains the stuff necessary for sgc */ - #undef SIGNAL_H_HAS_SIGCONTEXT - -+ - /* define if the profil system call is not defined in libc */ - #undef NO_PROFILE - -+ - /* define if the _cleanup() function exists and should be called - before saving */ - /* #define USE_CLEANUP */ - -+ - /* define if BIG_ENDIAN or LITTLE_ENDIAN is defined by including - the standard includes */ - /* #define ENDIAN_ALREADY_DEFINED */ -@@ -59,18 +86,34 @@ - /* define if SV_ONSTACK is defined in signal.h */ - #undef HAVE_SV_ONSTACK - -+ -+/* -+ define to be a typical stack address. We use this to decide -+ whether we can use a cheap test for NULL_OR_ON_C_STACK, or whether -+ it has to be more complex.. -+ -+*/ -+ - #define CSTACK_ADDRESS 0 - -+/* define if SIGSYS is defined in signal.h */ -+ - #undef HAVE_SIGSYS - -+/* define if SIGEMT is defined in signal.h */ -+ - #undef HAVE_SIGEMT - -+ - /* define if setenv is define */ - #undef HAVE_SETENV - - /* define if putenv is define */ - #undef HAVE_PUTENV - -+ -+/* define if long long int works to multiply to ints, */ -+ - #undef HAVE_LONG_LONG - - /* define if want to use GMP */ -@@ -126,8 +169,8 @@ - #else - #include - #define ISNORMAL(a) ((sizeof (a) == sizeof (float)) ? \ -- gcl_isnormal_float(a) : \ -- gcl_isnormal_double(a)) -+ gcl_isnormal_float(a) : \ -+ gcl_isnormal_double(a)) - #endif - #endif - #endif -@@ -163,6 +206,8 @@ - #endif - #endif - -+ -+ - /* math.h for definitions in generated C code */ - #undef HAVE_MATH_H - -@@ -179,6 +224,8 @@ - /* #define PAGESIZE (1< header file. */ -+/* Define to 1 if you have the header file. */ - #undef HAVE_ASM_SIGCONTEXT_H - --/* Define if you have the header file. */ -+/* Define to 1 if you have the header file. */ - #undef HAVE_ASM_SIGNAL_H - --/* Define if you have the header file. */ --#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 - --/* Define if you have the header file. */ -+/* Define to 1 if you have the `getcwd' function. */ -+#undef HAVE_GETCWD -+ -+/* Define to 1 if you have the `getwd' function. */ -+#undef HAVE_GETWD -+ -+/* Define to 1 if you have the header file. */ -+#undef HAVE_INTTYPES_H -+ -+/* Define to 1 if you have the header file. */ - #undef HAVE_JAPI_H - --/* Define if you have the header file. */ -+/* Define to 1 if you have the header file. */ - #undef HAVE_MATH_H - --/* Define if you have the header file. */ -+/* Define to 1 if you have the header file. */ -+#undef HAVE_MEMORY_H -+ -+/* Define to 1 if you have the header file. */ - #undef HAVE_READLINE_READLINE_H - --/* Define if you have the header file. */ -+/* Define to 1 if you have the header file. */ - #undef HAVE_RPC_RPC_H - --/* Define if you have the header file. */ -+/* Define to 1 if you have the header file. */ -+#undef HAVE_STDINT_H -+ -+/* Define to 1 if you have the header file. */ -+#undef HAVE_STDLIB_H -+ -+/* Define to 1 if you have the header file. */ -+#undef HAVE_STRINGS_H -+ -+/* Define to 1 if you have the header file. */ -+#undef HAVE_STRING_H -+ -+/* Define to 1 if you have the header file. */ - #undef HAVE_SYS_IOCTL_H - --/* Define if you have the header file. */ -+/* Define to 1 if you have the header file. */ - #undef HAVE_SYS_SOCKIO_H - --/* Define if you have the header file. */ -+/* Define to 1 if you have the header file. */ -+#undef HAVE_SYS_STAT_H -+ -+/* Define to 1 if you have the header file. */ -+#undef HAVE_SYS_TYPES_H -+ -+/* Define to 1 if you have the header file. */ -+#undef HAVE_UNISTD_H -+ -+/* Define to 1 if you have the header file. */ - #undef HAVE_VALUES_H -+ -+/* Define to the address where bug reports for this package should be sent. */ -+#undef PACKAGE_BUGREPORT -+ -+/* Define to the full name of this package. */ -+#undef PACKAGE_NAME -+ -+/* Define to the full name and version of this package. */ -+#undef PACKAGE_STRING -+ -+/* Define to the one symbol short name of this package. */ -+#undef PACKAGE_TARNAME -+ -+/* Define to the version of this package. */ -+#undef PACKAGE_VERSION -+ -+/* The size of `long', as computed by sizeof. */ -+#undef SIZEOF_LONG -+ -+/* Define to 1 if you have the ANSI C header files. */ -+#undef STDC_HEADERS -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 2010-03-23 10:14:57.856974000 -0600 -@@ -1,17 +1,18 @@ - % texinfo.tex -- TeX macros to handle Texinfo files. --% -+% - % 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{2010-03-07.08} - % --% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 --% Free Software Foundation, Inc. -+% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, -+% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -+% 2007, 2008, 2009, 2010 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 - % modify it under the terms of the GNU General Public License as --% 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 --% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, --% Boston, MA 02111-1307, 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 --% what you give them. Help stamp out software-hoarding! -+% As a special exception, when this file is read by TeX when processing -+% a Texinfo source document, you may use the result without -+% restriction. (This has been our intent since Texinfo was invented.) - % - % Please try the latest version of texinfo.tex before submitting bug - % reports; you can get the latest version from: --% ftp://ftp.gnu.org/gnu/texinfo.tex --% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) --% ftp://texinfo.org/tex/texinfo.tex --% ftp://us.ctan.org/macros/texinfo/texinfo.tex --% (and all CTAN mirrors, finger ctan@us.ctan.org for a list). --% /home/gd/gnu/doc/texinfo.tex on the GNU machines. --% The texinfo.tex in any given Texinfo distribution could well be out -+% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or -+% ftp://tug.org/tex/texinfo.tex -+% (and all CTAN mirrors, see http://www.ctan.org). -+% The texinfo.tex in any given distribution could well be out - % of date, so if that's what you're using, please check. --% Texinfo has a small home page at http://texinfo.org/. - % - % 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 +45,17 @@ - % texindex foo.?? - % tex foo.texi - % tex foo.texi --% dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps. --% The extra runs of TeX get the cross-reference information correct. -+% dvips foo.dvi -o # or whatever; this makes foo.ps. -+% The extra TeX runs get the cross-reference information correct. - % Sometimes one run after texindex suffices, and sometimes you need more - % than two; texi2dvi does it as many times as necessary. - % --% It is possible to adapt texinfo.tex for other languages. You can get --% the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/. -+% It is possible to adapt texinfo.tex for other languages, to some -+% extent. You can get the existing language-specific files from the -+% full Texinfo distribution. -+% -+% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. -+ - - \message{Loading texinfo [version \texinfoversion]:} - -@@ -66,7 +65,14 @@ - \everyjob{\message{[Texinfo version \texinfoversion]}% - \catcode`+=\active \catcode`\_=\active} - --% Save some parts of plain tex whose names we will redefine. -+ -+\chardef\other=12 -+ -+% We never want plain's \outer definition of \+ in Texinfo. -+% For @tex, we can use \tabalign. -+\let\+ = \relax -+ -+% Save some plain tex macros whose names we will redefine. - \let\ptexb=\b - \let\ptexbullet=\bullet - \let\ptexc=\c -@@ -76,23 +82,38 @@ - \let\ptexend=\end - \let\ptexequiv=\equiv - \let\ptexexclam=\! -+\let\ptexfootnote=\footnote -+\let\ptexgtr=> -+\let\ptexhat=^ - \let\ptexi=\i -+\let\ptexindent=\indent -+\let\ptexinsert=\insert - \let\ptexlbrace=\{ -+\let\ptexless=< -+\let\ptexnewwrite\newwrite -+\let\ptexnoindent=\noindent -+\let\ptexplus=+ -+\let\ptexraggedright=\raggedright - \let\ptexrbrace=\} -+\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'}% active in plain's math mode - - % If this character appears in an error message or help string, it - % starts a new line in the output. - \newlinechar = `^^J - -+% Use TeX 3.0's \inputlineno to get the line number, for better error -+% messages, but if we're using an old version of TeX, don't do anything. -+% -+\ifx\inputlineno\thisisundefined -+ \let\linenumber = \empty % Pre-3.0. -+\else -+ \def\linenumber{l.\the\inputlineno:\space} -+\fi -+ - % 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 +152,119 @@ - \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi - \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi - \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi --\ifx\putwordDeftypevar\undefined\gdef\putwordDeftypevar{Variable}\fi - \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi --\ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi -+ -+% Since the category of space is not known, we have to be careful. -+\chardef\spacecat = 10 -+\def\spaceisspace{\catcode`\ =\spacecat} -+ -+% sometimes characters are active, so we need control sequences. -+\chardef\colonChar = `\: -+\chardef\commaChar = `\, -+\chardef\dashChar = `\- -+\chardef\dotChar = `\. -+\chardef\exclamChar= `\! -+\chardef\lquoteChar= `\` -+\chardef\questChar = `\? -+\chardef\rquoteChar= `\' -+\chardef\semiChar = `\; -+\chardef\underChar = `\_ - - % Ignore a token. - % - \def\gobble#1{} - --\hyphenation{ap-pen-dix} --\hyphenation{mini-buf-fer mini-buf-fers} --\hyphenation{eshell} --\hyphenation{white-space} -+% The following is used inside several \edef's. -+\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} -+ -+% Hyphenation fixes. -+\hyphenation{ -+ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script -+ ap-pen-dix bit-map bit-maps -+ data-base data-bases eshell fall-ing half-way long-est man-u-script -+ man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm -+ par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces -+ spell-ing spell-ings -+ stand-alone strong-est time-stamp time-stamps which-ever white-space -+ wide-spread wrap-around -+} - - % Margin to add to right of even pages, to left of odd pages. --\newdimen \bindingoffset --\newdimen \normaloffset -+\newdimen\bindingoffset -+\newdimen\normaloffset - \newdimen\pagewidth \newdimen\pageheight - -+% For a final copy, take out the rectangles -+% that mark overfull boxes (in case you have decided -+% that the text looks ok even though it passes the margin). -+% -+\def\finalout{\overfullrule=0pt} -+ -+% @| inserts a changebar to the left of the current line. It should -+% surround any changed text. This approach does *not* work if the -+% change spans more than two lines of output. To handle that, we would -+% have adopt a much more difficult approach (putting marks into the main -+% vertical list for the beginning and end of each change). -+% -+\def\|{% -+ % \vadjust can only be used in horizontal mode. -+ \leavevmode -+ % -+ % Append this vertical mode material after the current line in the output. -+ \vadjust{% -+ % We want to insert a rule with the height and depth of the current -+ % leading; that is exactly what \strutbox is supposed to record. -+ \vskip-\baselineskip -+ % -+ % \vadjust-items are inserted at the left edge of the type. So -+ % the \llap here moves out into the left-hand margin. -+ \llap{% -+ % -+ % For a thicker or thinner bar, change the `1pt'. -+ \vrule height\baselineskip width1pt -+ % -+ % This is the space between the bar and the text. -+ \hskip 12pt -+ }% -+ }% -+} -+ - % Sometimes it is convenient to have everything in the transcript file - % and nothing on the terminal. We don't just call \tracingall here, --% since that produces some useless output on the terminal. -+% since that produces some useless output on the terminal. We also make -+% some effort to order the tracing commands to reduce output in the log -+% file; cf. trace.sty in LaTeX. - % - \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% --\ifx\eTeXversion\undefined --\def\loggingall{\tracingcommands2 \tracingstats2 -- \tracingpages1 \tracingoutput1 \tracinglostchars1 -- \tracingmacros2 \tracingparagraphs1 \tracingrestores1 -- \showboxbreadth\maxdimen\showboxdepth\maxdimen --}% --\else --\def\loggingall{\tracingcommands3 \tracingstats2 -- \tracingpages1 \tracingoutput1 \tracinglostchars1 -- \tracingmacros2 \tracingparagraphs1 \tracingrestores1 -- \tracingscantokens1 \tracingassigns1 \tracingifs1 -- \tracinggroups1 \tracingnesting2 -- \showboxbreadth\maxdimen\showboxdepth\maxdimen -+\def\loggingall{% -+ \tracingstats2 -+ \tracingpages1 -+ \tracinglostchars2 % 2 gives us more in etex -+ \tracingparagraphs1 -+ \tracingoutput1 -+ \tracingmacros2 -+ \tracingrestores1 -+ \showboxbreadth\maxdimen \showboxdepth\maxdimen -+ \ifx\eTeXversion\undefined\else % etex gives us more logging -+ \tracingscantokens1 -+ \tracingifs1 -+ \tracinggroups1 -+ \tracingnesting2 -+ \tracingassigns1 -+ \fi -+ \tracingcommands3 % 3 gives us more in etex -+ \errorcontextlines16 - }% --\fi -+ -+% add check for \lastpenalty to plain's definitions. If the last thing -+% we did was a \nobreak, we don't want to insert more space. -+% -+\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount -+ \removelastskip\penalty-50\smallskip\fi\fi} -+\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount -+ \removelastskip\penalty-100\medskip\fi\fi} -+\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount -+ \removelastskip\penalty-200\bigskip\fi\fi} - - % For @cropmarks command. - % Do @cropmarks to get crop marks. -@@ -184,6 +280,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 +341,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 +351,18 @@ - % take effect in \write's, yet the group defined by the \vbox ends - % before the \shipout runs. - % -- \escapechar = `\\ % use backslash in output files. - \indexdummies % don't expand commands in the output. - \normalturnoffactive % \ in index entries must not stay \, e.g., if -- % the page break happens to be in the middle of an example. -+ % the page break happens to be in the middle of an example. -+ % 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 -+ % {\code {{\tt \backslashcurfont }acronym} - \shipout\vbox{% -+ % Do this early so pdf references go to the beginning of the page. -+ \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi -+ % - \ifcropmarks \vbox to \outervsize\bgroup - \hsize = \outerhsize - \vskip-\topandbottommargin -@@ -237,14 +386,12 @@ - \pagebody{#1}% - \ifdim\ht\footlinebox > 0pt - % Only leave this space if the footline is nonempty. -- % (We lessened \vsize for it in \oddfootingxxx.) -+ % (We lessened \vsize for it in \oddfootingyyy.) - % The \baselineskip=24pt in plain's \makefootline has no effect. -- \vskip 2\baselineskip -+ \vskip 24pt - \unvbox\footlinebox - \fi - % -- \ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi -- % - \ifcropmarks - \egroup % end of \vbox\bgroup - \hfil\egroup % end of (centering) \line\bgroup -@@ -262,7 +409,7 @@ - \egroup % \vbox from first cropmarks clause - \fi - }% end of \shipout\vbox -- }% end of group with \turnoffactive -+ }% end of group with \indexdummies - \advancepageno - \ifnum\outputpenalty>-20000 \else\dosupereject\fi - } -@@ -275,7 +422,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 +442,161 @@ - % the input line (except we remove a trailing comment). #1 should be a - % macro which expects an ordinary undelimited TeX argument. - % --\def\parsearg#1{% -- \let\next = #1% -+\def\parsearg{\parseargusing{}} -+\def\parseargusing#1#2{% -+ \def\argtorun{#2}% - \begingroup - \obeylines -- \futurelet\temp\parseargx --} -- --% If the next token is an obeyed space (from an @example environment or --% the like), remove it and recurse. Otherwise, we're done. --\def\parseargx{% -- % \obeyedspace is defined far below, after the definition of \sepspaces. -- \ifx\obeyedspace\temp -- \expandafter\parseargdiscardspace -- \else -- \expandafter\parseargline -- \fi -+ \spaceisspace -+ #1% -+ \parseargline\empty% Insert the \empty token, see \finishparsearg below. - } - --% Remove a single space (as the delimiter token to the macro call). --{\obeyspaces % -- \gdef\parseargdiscardspace {\futurelet\temp\parseargx}} -- - {\obeylines % - \gdef\parseargline#1^^M{% - \endgroup % End of the group started in \parsearg. -- % -- % First remove any @c comment, then any @comment. -- % Result of each macro is put in \toks0. -- \argremovec #1\c\relax % -- \expandafter\argremovecomment \the\toks0 \comment\relax % -- % -- % Call the caller's macro, saved as \next in \parsearg. -- \expandafter\next\expandafter{\the\toks0}% -+ \argremovecomment #1\comment\ArgTerm% - }% - } - --% Since all \c{,omment} does is throw away the argument, we can let TeX --% do that for us. The \relax here is matched by the \relax in the call --% in \parseargline; it could be more or less anything, its purpose is --% just to delimit the argument to the \c. --\def\argremovec#1\c#2\relax{\toks0 = {#1}} --\def\argremovecomment#1\comment#2\relax{\toks0 = {#1}} -+% First remove any @comment, then any @c comment. -+\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} -+\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} - --% \argremovec{,omment} might leave us with trailing spaces, though; e.g., --% @end itemize @c foo --% 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 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. --% Fortunately, Texinfo does not define any such commands. (If it ever --% does, the catcode of the characters in questionwill have to be changed --% here.) But this means we cannot call \removeactivespaces as part of --% \argremovec{,omment}, since @c uses \parsearg, and thus the argument --% that \parsearg gets might well have any character at all in it. -+% \argremovec might leave us with trailing space, e.g., -+% @end itemize @c foo -+% This space token undergoes the same procedure and is eventually removed -+% by \finishparsearg. - % --\def\removeactivespaces#1{% -- \begingroup -- \ignoreactivespaces -- \edef\temp{#1}% -- \global\toks0 = \expandafter{\temp}% -- \endgroup -+\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} -+\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} -+\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% -+ \def\temp{#3}% -+ \ifx\temp\empty -+ % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: -+ \let\temp\finishparsearg -+ \else -+ \let\temp\argcheckspaces -+ \fi -+ % Put the space token in: -+ \temp#1 #3\ArgTerm - } - --% Change the active space to expand to nothing. -+% If a _delimited_ argument is enclosed in braces, they get stripped; so -+% 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. -+% (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. - % --\begingroup -+% But first, we have to remove the trailing space token. -+% -+\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} -+ -+% \parseargdef\foo{...} -+% is roughly equivalent to -+% \def\foo{\parsearg\Xfoo} -+% \def\Xfoo#1{...} -+% -+% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my -+% favourite TeX trick. --kasal, 16nov03 -+ -+\def\parseargdef#1{% -+ \expandafter \doparseargdef \csname\string#1\endcsname #1% -+} -+\def\doparseargdef#1#2{% -+ \def#2{\parsearg#1}% -+ \def#1##1% -+} -+ -+% Several utility definitions with active space: -+{ - \obeyspaces -- \gdef\ignoreactivespaces{\obeyspaces\let =\empty} --\endgroup -+ \gdef\obeyedspace{ } -+ -+ % Make each space character in the input produce a normal interword -+ % space in the output. Don't allow a line break at this space, as this -+ % is used only in environments like @example, where each line of input -+ % should produce a line of output anyway. -+ % -+ \gdef\sepspaces{\obeyspaces\let =\tie} -+ -+ % If an index command is used in an @example environment, any spaces -+ % therein should become regular spaces in the raw index file, not the -+ % expansion of \tie (\leavevmode \penalty \@M \ ). -+ \gdef\unsepspaces{\let =\space} -+} - - - \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} - --%% These are used to keep @begin/@end levels from running away --%% Call \inENV within environments (after a \begingroup) --\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi} --\def\ENVcheck{% --\ifENV\errmessage{Still within an environment; press RETURN to continue} --\endgroup\fi} % This is not perfect, but it should reduce lossage -+% Define the framework for environments in texinfo.tex. It's used like this: -+% -+% \envdef\foo{...} -+% \def\Efoo{...} -+% -+% It's the responsibility of \envdef to insert \begingroup before the -+% actual body; @end closes the group after calling \Efoo. \envdef also -+% defines \thisenv, so the current environment is known; @end checks -+% whether the environment name matches. The \checkenv macro can also be -+% 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 environments; they don't open a group. (The -+% implementation of @end takes care not to call \endgroup in this -+% special case.) - --% @begin foo is the same as @foo, for now. --\newhelp\EMsimple{Press RETURN to continue.} - --\outer\def\begin{\parsearg\beginxxx} -+% At run-time, environments start with this: -+\def\startenvironment#1{\begingroup\def\thisenv{#1}} -+% initialize -+\let\thisenv\empty - --\def\beginxxx #1{% --\expandafter\ifx\csname #1\endcsname\relax --{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else --\csname #1\endcsname\fi} -+% ... but they get defined via ``\envdef\foo{...}'': -+\long\def\envdef#1#2{\def#1{\startenvironment#1#2}} -+\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} - --% @end foo executes the definition of \Efoo. --% --\def\end{\parsearg\endxxx} --\def\endxxx #1{% -- \removeactivespaces{#1}% -- \edef\endthing{\the\toks0}% -- % -- \expandafter\ifx\csname E\endthing\endcsname\relax -- \expandafter\ifx\csname \endthing\endcsname\relax -- % There's no \foo, i.e., no ``environment'' foo. -- \errhelp = \EMsimple -- \errmessage{Undefined command `@end \endthing'}% -- \else -- \unmatchedenderror\endthing -- \fi -+% Check whether we're in the right environment: -+\def\checkenv#1{% -+ \def\temp{#1}% -+ \ifx\thisenv\temp - \else -- % Everything's ok; the right environment has been started. -- \csname E\endthing\endcsname -+ \badenverr - \fi - } - --% There is an environment #1, but it hasn't been started. Give an error. --% --\def\unmatchedenderror#1{% -+% Environment mismatch, #1 expected: -+\def\badenverr{% - \errhelp = \EMsimple -- \errmessage{This `@end #1' doesn't have a matching `@#1'}% -+ \errmessage{This command can appear only \inenvironment\temp, -+ not \inenvironment\thisenv}% -+} -+\def\inenvironment#1{% -+ \ifx#1\empty -+ out of any environment% -+ \else -+ in environment \expandafter\string#1% -+ \fi - } - --% Define the control sequence \E#1 to give an unmatched @end error. -+% @end foo executes the definition of \Efoo. -+% But first, it executes a specialized version of \checkenv - % --\def\defineunmatchedend#1{% -- \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}% -+\parseargdef\end{% -+ \if 1\csname iscond.#1\endcsname -+ \else -+ % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 -+ \expandafter\checkenv\csname#1\endcsname -+ \csname E#1\endcsname -+ \endgroup -+ \fi - } - -+\newhelp\EMsimple{Press RETURN to continue.} - --% Single-spacing is done by various environments (specifically, in --% \nonfillstart and \quotations). --\newskip\singlespaceskip \singlespaceskip = 12.5pt --\def\singlespace{% -- % Why was this kern here? It messes up equalizing space above and below -- % environments. --karl, 6may93 -- %{\advance \baselineskip by -\singlespaceskip -- %\kern \baselineskip}% -- \setleading \singlespaceskip --} - - %% Simple single-character @ commands - -@@ -452,16 +617,22 @@ - \let\{=\mylbrace - \let\}=\myrbrace - \begingroup -- % Definitions to produce actual \{ & \} command in an index. -- \catcode`\{ = 12 \catcode`\} = 12 -+ % Definitions to produce \{ and \} commands for indices, -+ % and @{ and @} for the aux/toc files. -+ \catcode`\{ = \other \catcode`\} = \other - \catcode`\[ = 1 \catcode`\] = 2 -- \catcode`\@ = 0 \catcode`\\ = 12 -- @gdef@lbracecmd[\{]% -- @gdef@rbracecmd[\}]% --@endgroup -+ \catcode`\! = 0 \catcode`\\ = \other -+ !gdef!lbracecmd[\{]% -+ !gdef!rbracecmd[\}]% -+ !gdef!lbraceatcmd[@{]% -+ !gdef!rbraceatcmd[@}]% -+!endgroup -+ -+% @comma{} to avoid , parsing problems. -+\let\comma = , - - % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent --% Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H. -+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. - \let\, = \c - \let\dotaccent = \. - \def\ringaccent#1{{\accent23 #1}} -@@ -469,22 +640,43 @@ - \let\ubaraccent = \b - \let\udotaccent = \d - --% Other special characters: @questiondown @exclamdown --% Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss. -+% Other special characters: @questiondown @exclamdown @ordf @ordm -+% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. - \def\questiondown{?`} - \def\exclamdown{!`} -+\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} -+\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} - - % Dotless i and dotless j, used for accents. - \def\imacro{i} - \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 - } - -+% The \TeX{} logo, as in plain, but resetting the spacing so that a -+% period following counts as ending a sentence. (Idea found in latex.) -+% -+\edef\TeX{\TeX \spacefactor=1000 } -+ -+% @LaTeX{} logo. Not quite the same results as the definition in -+% latex.ltx, since we use a different font for the raised A; it's most -+% convenient for us to use an explicitly smaller font, rather than using -+% the \scriptstyle font (since we don't reset \scriptstyle and -+% \scriptscriptstyle). -+% -+\def\LaTeX{% -+ L\kern-.36em -+ {\setbox0=\hbox{T}% -+ \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% -+ \kern-.15em -+ \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 +695,32 @@ - % @* forces a line break. - \def\*{\hfil\break\hbox{}\ignorespaces} - -+% @/ allows a line break. -+\let\/=\allowbreak -+ - % @. is an end-of-sentence period. --\def\.{.\spacefactor=3000 } -+\def\.{.\spacefactor=\endofsentencespacefactor\space} - - % @! is an end-of-sentence bang. --\def\!{!\spacefactor=3000 } -+\def\!{!\spacefactor=\endofsentencespacefactor\space} - - % @? is an end-of-sentence query. --\def\?{?\spacefactor=3000 } -+\def\?{?\spacefactor=\endofsentencespacefactor\space} -+ -+% @frenchspacing on|off says whether to put extra space after punctuation. -+% -+\def\onword{on} -+\def\offword{off} -+% -+\parseargdef\frenchspacing{% -+ \def\temp{#1}% -+ \ifx\temp\onword \plainfrenchspacing -+ \else\ifx\temp\offword \plainnonfrenchspacing -+ \else -+ \errhelp = \EMsimple -+ \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% -+ \fi\fi -+} - - % @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 +735,24 @@ - % therefore, no glue is inserted, and the space between the headline and - % the text is small, which looks bad. - % --\def\group{\begingroup -- \ifnum\catcode13=\active \else -+% Another complication is that the group might be very large. This can -+% cause the glue on the previous page to be unduly stretched, because it -+% does not have much material. In this case, it's better to add an -+% explicit \vfill so that the extra space is at the bottom. The -+% threshold for doing this is if the group is more than \vfilllimit -+% percent of a page (\vfilllimit can be changed inside of @tex). -+% -+\newbox\groupbox -+\def\vfilllimit{0.7} -+% -+\envdef\group{% -+ \ifnum\catcode`\^^M=\active \else - \errhelp = \groupinvalidhelp - \errmessage{@group invalid in context where filling is enabled}% - \fi -+ \startsavinginserts - % -- % The \vtop we start below produces a box with normal height and large -- % depth; thus, TeX puts \baselineskip glue before it, and (when the -- % next line of text is done) \lineskip glue after it. (See p.82 of -- % the TeXbook.) Thus, space below is not quite equal to space -- % above. But it's pretty close. -- \def\Egroup{% -- \egroup % End the \vtop. -- \endgroup % End the \group. -- }% -- % -- \vtop\bgroup -- % We have to put a strut on the last line in case the @group is in -- % the midst of an example, rather than completely enclosing it. -- % Otherwise, the interline space between the last line of the group -- % and the first line afterwards is too small. But we can't put the -- % strut in \Egroup, since there it would be on a line by itself. -- % Hence this just inserts a strut at the beginning of each line. -- \everypar = {\strut}% -- % -- % Since we have a strut on every line, we don't need any of TeX's -- % normal interline spacing. -- \offinterlineskip -- % -- % OK, but now we have to do something about blank -- % lines in the input in @example-like environments, which normally -- % just turn into \lisppar, which will insert no space now that we've -- % turned off the interline space. Simplest is to make them be an -- % empty paragraph. -- \ifx\par\lisppar -- \edef\par{\leavevmode \par}% -- % -- % Reset ^^M's definition to new definition of \par. -- \obeylines -- \fi -- % -+ \setbox\groupbox = \vtop\bgroup - % 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 +762,32 @@ - \comment - } - % -+% The \vtop produces a box with normal height and large depth; thus, TeX puts -+% \baselineskip glue before it, and (when the next line of text is done) -+% \lineskip glue after it. Thus, space below is not quite equal to space -+% above. But it's pretty close. -+\def\Egroup{% -+ % To get correct interline space between the last line of the group -+ % and the first line afterwards, we have to propagate \prevdepth. -+ \endgraf % Not \par, as it may have been set to \lisppar. -+ \global\dimen1 = \prevdepth -+ \egroup % End the \vtop. -+ % \dimen0 is the vertical size of the group's box. -+ \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox -+ % \dimen2 is how much space is left on the page (more or less). -+ \dimen2 = \pageheight \advance\dimen2 by -\pagetotal -+ % if the group doesn't fit on the current page, and it's a big big -+ % group, force a page break. -+ \ifdim \dimen0 > \dimen2 -+ \ifdim \pagetotal < \vfilllimit\pageheight -+ \page -+ \fi -+ \fi -+ \box\groupbox -+ \prevdepth = \dimen1 -+ \checkinserts -+} -+% - % TeX puts in an \escapechar (i.e., `@') at the beginning of the help - % message, so this ends up printing `@group can only ...'. - % -@@ -587,10 +800,8 @@ - - \newdimen\mil \mil=0.001in - --\def\need{\parsearg\needx} -- - % Old definition--didn't work. --%\def\needx #1{\par % -+%\parseargdef\need{\par % - %% This method tries to make TeX break the page naturally - %% if the depth of the box does not fit. - %{\baselineskip=0pt% -@@ -598,7 +809,7 @@ - %\prevdepth=-1000pt - %}} - --\def\needx#1{% -+\parseargdef\need{% - % Ensure vertical mode, so we don't make a big box in the middle of a - % paragraph. - \par -@@ -637,37 +848,11 @@ - \fi - } - --% @br forces paragraph break -+% @br forces paragraph break (and is undocumented). - - \let\br = \par - --% @dots{} output an ellipsis using the current font. --% We do .5em per period so that it has the same spacing in a typewriter --% font as three actual period characters. --% --\def\dots{% -- \leavevmode -- \hbox to 1.5em{% -- \hskip 0pt plus 0.25fil minus 0.25fil -- .\hss.\hss.% -- \hskip 0pt plus 0.5fil minus 0.5fil -- }% --} -- --% @enddots{} is an end-of-sentence ellipsis. --% --\def\enddots{% -- \leavevmode -- \hbox to 2em{% -- \hskip 0pt plus 0.25fil minus 0.25fil -- .\hss.\hss.\hss.% -- \hskip 0pt plus 0.5fil minus 0.5fil -- }% -- \spacefactor=3000 --} -- -- --% @page forces the start of a new page -+% @page forces the start of a new page. - % - \def\page{\par\vfill\supereject} - -@@ -679,57 +864,134 @@ - \newskip\exdentamount - - % This defn is used inside fill environments such as @defun. --\def\exdent{\parsearg\exdentyyy} --\def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}} -+\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} - - % This defn is used inside nofill environments such as @example. --\def\nofillexdent{\parsearg\nofillexdentyyy} --\def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount --\leftline{\hskip\leftskip{\rm#1}}}} -- --% @inmargin{TEXT} puts TEXT in the margin next to the current paragraph. -+\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount -+ \leftline{\hskip\leftskip{\rm#1}}}} - --\def\inmargin#1{% --\strut\vadjust{\nobreak\kern-\strutdepth -- \vtop to \strutdepth{\baselineskip\strutdepth\vss -- \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}} -+% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current -+% paragraph. For more general purposes, use the \margin insertion -+% class. WHICH is `l' or `r'. -+% - \newskip\inmarginspacing \inmarginspacing=1cm - \def\strutdepth{\dp\strutbox} -+% -+\def\doinmargin#1#2{\strut\vadjust{% -+ \nobreak -+ \kern-\strutdepth -+ \vtop to \strutdepth{% -+ \baselineskip=\strutdepth -+ \vss -+ % if you have multiple lines of stuff to put here, you'll need to -+ % make the vbox yourself of the appropriate size. -+ \ifx#1l% -+ \llap{\ignorespaces #2\hskip\inmarginspacing}% -+ \else -+ \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% -+ \fi -+ \null -+ }% -+}} -+\def\inleftmargin{\doinmargin l} -+\def\inrightmargin{\doinmargin r} -+% -+% @inmargin{TEXT [, RIGHT-TEXT]} -+% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; -+% else use TEXT for both). -+% -+\def\inmargin#1{\parseinmargin #1,,\finish} -+\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. -+ \setbox0 = \hbox{\ignorespaces #2}% -+ \ifdim\wd0 > 0pt -+ \def\lefttext{#1}% have both texts -+ \def\righttext{#2}% -+ \else -+ \def\lefttext{#1}% have only one text -+ \def\righttext{#1}% -+ \fi -+ % -+ \ifodd\pageno -+ \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin -+ \else -+ \def\temp{\inleftmargin\lefttext}% -+ \fi -+ \temp -+} - --%\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 -- \catcode`~=12 -- \catcode`^=12 -- \catcode`_=12 -- \catcode`|=12 -- \catcode`<=12 -- \catcode`>=12 -- \catcode`+=12 -- \parsearg\includezzz} --% 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{% -+ \pushthisfilestack - \def\thisfile{#1}% -- \input\thisfile --\endgroup} -+ {% -+ \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 -+} -+\def\filenamecatcodes{% -+ \catcode`\\=\other -+ \catcode`~=\other -+ \catcode`^=\other -+ \catcode`_=\other -+ \catcode`|=\other -+ \catcode`<=\other -+ \catcode`>=\other -+ \catcode`+=\other -+ \catcode`-=\other -+ \catcode`\`=\other -+ \catcode`\'=\other -+} - --\def\thisfile{} -+\def\pushthisfilestack{% -+ \expandafter\pushthisfilestackX\popthisfilestack\StackTerm -+} -+\def\pushthisfilestackX{% -+ \expandafter\pushthisfilestackY\thisfile\StackTerm -+} -+\def\pushthisfilestackY #1\StackTerm #2\StackTerm {% -+ \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% -+} - --% @center line outputs that line, centered -+\def\popthisfilestack{\errthisfilestackempty} -+\def\errthisfilestackempty{\errmessage{Internal error: -+ the stack of filenames is empty.}} - --\def\center{\parsearg\centerzzz} --\def\centerzzz #1{{\advance\hsize by -\leftskip --\advance\hsize by -\rightskip --\centerline{#1}}} -+\def\thisfile{} -+ -+% @center line -+% outputs that line, centered. -+% -+\parseargdef\center{% -+ \ifhmode -+ \let\next\centerH -+ \else -+ \let\next\centerV -+ \fi -+ \next{\hfil \ignorespaces#1\unskip \hfil}% -+} -+\def\centerH#1{% -+ {% -+ \hfil\break -+ \advance\hsize by -\leftskip -+ \advance\hsize by -\rightskip -+ \line{#1}% -+ \break -+ }% -+} -+\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} - - % @sp n outputs n lines of vertical space - --\def\sp{\parsearg\spxxx} --\def\spxxx #1{\vskip #1\baselineskip} -+\parseargdef\sp{\vskip #1\baselineskip} - - % @comment ...line which is ignored... - % @c is the same as @comment -@@ -744,13 +1006,13 @@ - - % @paragraphindent NCHARS - % We'll use ems for NCHARS, close enough. --% We cannot implement @paragraphindent asis, though. --% -+% NCHARS can also be the word `asis' or `none'. -+% We cannot feasibly implement @paragraphindent asis, though. -+% - \def\asisword{asis} % no translation, these are keywords - \def\noneword{none} - % --\def\paragraphindent{\parsearg\doparagraphindent} --\def\doparagraphindent#1{% -+\parseargdef\paragraphindent{% - \def\temp{#1}% - \ifx\temp\asisword - \else -@@ -767,8 +1029,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. --\def\exampleindent{\parsearg\doexampleindent} --\def\doexampleindent#1{% -+\parseargdef\exampleindent{% - \def\temp{#1}% - \ifx\temp\asisword - \else -@@ -780,26 +1041,161 @@ - \fi - } - -+% @firstparagraphindent WORD -+% If WORD is `none', then suppress indentation of the first paragraph -+% after a section heading. If WORD is `insert', then do indent at such -+% paragraphs. -+% -+% The paragraph indentation is suppressed or not by calling -+% \suppressfirstparagraphindent, which the sectioning commands do. -+% We switch the definition of this back and forth according to WORD. -+% By default, we suppress indentation. -+% -+\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} -+\def\insertword{insert} -+% -+\parseargdef\firstparagraphindent{% -+ \def\temp{#1}% -+ \ifx\temp\noneword -+ \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent -+ \else\ifx\temp\insertword -+ \let\suppressfirstparagraphindent = \relax -+ \else -+ \errhelp = \EMsimple -+ \errmessage{Unknown @firstparagraphindent option `\temp'}% -+ \fi\fi -+} -+ -+% Here is how we actually suppress indentation. Redefine \everypar to -+% \kern backwards by \parindent, and then reset itself to empty. -+% -+% We also make \indent itself not actually do anything until the next -+% paragraph. -+% -+\gdef\dosuppressfirstparagraphindent{% -+ \gdef\indent{% -+ \restorefirstparagraphindent -+ \indent -+ }% -+ \gdef\noindent{% -+ \restorefirstparagraphindent -+ \noindent -+ }% -+ \global\everypar = {% -+ \kern -\parindent -+ \restorefirstparagraphindent -+ }% -+} -+ -+\gdef\restorefirstparagraphindent{% -+ \global \let \indent = \ptexindent -+ \global \let \noindent = \ptexnoindent -+ \global \everypar = {}% -+} -+ -+ - % @asis just yields its argument. Used with @table, for example. - % - \def\asis#1{#1} - --% @math means output in math mode. --% We don't use $'s directly in the definition of \math because control --% sequences like \math are expanded when the toc file is written. Then, --% we read the toc file back, the $'s will be normal characters (as they --% should be, according to the definition of Texinfo). So we must use a --% control sequence to switch into and out of math mode. -+% @math outputs its argument in math mode. - % --% This isn't quite enough for @math to work properly in indices, but it --% seems unlikely it will ever be needed there. -+% One complication: _ usually means subscripts, but it could also mean -+% an actual _ character, as in @math{@var{some_variable} + 1}. So make -+% _ active, and distinguish by seeing if the current family is \slfam, -+% which is what @var uses. -+{ -+ \catcode`\_ = \active -+ \gdef\mathunderscore{% -+ \catcode`\_=\active -+ \def_{\ifnum\fam=\slfam \_\else\sb\fi}% -+ } -+} -+% Another complication: we want \\ (and @\) to output a \ character. -+% FYI, plain.tex uses \\ as a temporary control sequence (why?), but -+% this is not advertised and we don't care. Texinfo does not -+% otherwise define @\. - % --\let\implicitmath = $ --\def\math#1{\implicitmath #1\implicitmath} -+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. -+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} -+% -+\def\math{% -+ \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). -+% -+{ -+ \catcode`^ = \active -+ \catcode`< = \active -+ \catcode`> = \active -+ \catcode`+ = \active -+ \catcode`' = \active -+ \gdef\mathactive{% -+ \let^ = \ptexhat -+ \let< = \ptexless -+ \let> = \ptexgtr -+ \let+ = \ptexplus -+ \let' = \ptexquoteright -+ } -+} -+ -+% Some math mode symbols. -+\def\bullet{$\ptexbullet$} -+\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 -+% typewriter fonts as three actual period characters; on the other hand, -+% in other typewriter fonts three periods are wider than 1.5em. So do -+% whichever is larger. -+% -+\def\dots{% -+ \leavevmode -+ \setbox0=\hbox{...}% get width of three periods -+ \ifdim\wd0 > 1.5em -+ \dimen0 = \wd0 -+ \else -+ \dimen0 = 1.5em -+ \fi -+ \hbox to \dimen0{% -+ \hskip 0pt plus.25fil -+ .\hskip 0pt plus1fil -+ .\hskip 0pt plus1fil -+ .\hskip 0pt plus.5fil -+ }% -+} -+ -+% @enddots{} is an end-of-sentence ellipsis. -+% -+\def\enddots{% -+ \dots -+ \spacefactor=\endofsentencespacefactor -+} -+ -+% @comma{} is so commas can be inserted into text without messing up -+% Texinfo's parsing. -+% -+\let\comma = , - - % @refill is a no-op. - \let\refill=\relax -@@ -815,20 +1211,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{% -+ \fixbackslash % Turn off hack to swallow `\input texinfo'. - \iflinks -- \readauxfile -+ \tryauxfile -+ % Open the new aux file. TeX will close it automatically at exit. -+ \immediate\openout\auxfile=\jobname.aux - \fi % \openindices needs to do some work in any case. - \openindices -- \fixbackslash % Turn off hack to swallow `\input texinfo'. -- \global\let\setfilename=\comment % Ignore extra @setfilename cmds. -+ \let\setfilename=\comment % Ignore extra @setfilename cmds. - % - % If texinfo.cnf is present on the system, read it. - % Useful for site-wide @afourpaper, etc. -- % Just to be on the safe side, close the input stream before the \input. - \openin 1 texinfo.cnf -- \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi -- \closein1 -- \temp -+ \ifeof 1 \else \input texinfo.cnf \fi -+ \closein 1 - % - \comment % Ignore the actual filename. - } -@@ -864,111 +1260,300 @@ - \newif\ifpdf - \newif\ifpdfmakepagedest - -+% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 -+% can be set). So we test for \relax and 0 as well as \undefined, -+% borrowed from ifpdf.sty. - \ifx\pdfoutput\undefined -- \pdffalse -- \let\pdfmkdest = \gobble -- \let\pdfurl = \gobble -- \let\endlink = \relax -- \let\linkcolor = \relax -- \let\pdfmakeoutlines = \relax - \else -- \pdftrue -- \pdfoutput = 1 -- \input pdfcolor -+ \ifx\pdfoutput\relax -+ \else -+ \ifcase\pdfoutput -+ \else -+ \pdftrue -+ \fi -+ \fi -+\fi -+ -+% PDF uses PostScript string constants for the names of xref targets, -+% for display in the outlines, and in other places. Thus, we have to -+% double any backslashes. Otherwise, a name like "\node" will be -+% interpreted as a newline (\n), followed by o, d, e. Not good. -+% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html -+% (and related messages, the final outcome is that it is up to the TeX -+% user to double the backslashes and otherwise make the string valid, so -+% that's what we do). -+ -+% double active backslashes. -+% -+{\catcode`\@=0 \catcode`\\=\active -+ @gdef@activebackslashdouble{% -+ @catcode`@\=@active -+ @let\=@doublebackslash} -+} -+ -+% To handle parens, we must adopt a different approach, since parens are -+% not active characters. hyperref.dtx (which has the same problem as -+% 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% -+ \ifx\\##2\\% -+ \else -+ #2% -+ \HyReturnAfterFi{% -+ \HyPsdReplace##2\END -+ }% -+ \fi -+ }% -+ \xdef#3{\expandafter\HyPsdReplace#3#1\END}% -+} -+\long\def\HyReturnAfterFi#1\fi{\fi#1} -+ -+% #1 is a control sequence in which to do the replacements. -+\def\backslashparens#1{% -+ \xdef#1{#1}% redefine it as its expansion; the definition is simply -+ % \lastnode when called from \setref -> \pdfmkdest. -+ \HyPsdSubst{(}{\realbackslash(}{#1}% -+ \HyPsdSubst{)}{\realbackslash)}{#1}% -+} -+ -+\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images -+with PDF output, and none of those formats could be found. (.eps cannot -+be supported due to the design of the PDF format; use regular TeX (DVI -+output) for that.)} -+ -+\ifpdf -+ % -+ % Color manipulation macros based on pdfcolor.tex, -+ % except using rgb instead of cmyk; the latter is said to render as a -+ % very dark gray on-screen and a very dark halftone in print, instead -+ % of actual black. -+ \def\rgbDarkRed{0.50 0.09 0.12} -+ \def\rgbBlack{0 0 0} -+ % -+ % 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 rg #1 RG}} -+ % -+ % 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{\rgbBlack} -+ \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). - \def\dopdfimage#1#2#3{% -- \def\imagewidth{#2}% -- \def\imageheight{#3}% -+ \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% -+ \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% -+ % -+ % pdftex (and the PDF format) support .png, .jpg, .pdf (among -+ % others). Let's try in that order. -+ \let\pdfimgext=\empty -+ \begingroup -+ \openin 1 #1.png \ifeof 1 -+ \openin 1 #1.jpg \ifeof 1 -+ \openin 1 #1.jpeg \ifeof 1 -+ \openin 1 #1.JPG \ifeof 1 -+ \openin 1 #1.pdf \ifeof 1 -+ \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}% -+ \fi -+ \else \gdef\pdfimgext{jpeg}% -+ \fi -+ \else \gdef\pdfimgext{jpg}% -+ \fi -+ \else \gdef\pdfimgext{png}% -+ \fi -+ \closein 1 -+ \endgroup -+ % -+ % 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 -+ \immediate\pdfimage - \else -- \pdfximage -+ \immediate\pdfximage - \fi -- \ifx\empty\imagewidth\else width \imagewidth \fi -- \ifx\empty\imageheight\else height \imageheight \fi -- {#1.pdf}% -+ \ifdim \wd0 >0pt width \imagewidth \fi -+ \ifdim \wd2 >0pt height \imageheight \fi -+ \ifnum\pdftexversion<13 -+ #1.\pdfimgext -+ \else -+ {#1.\pdfimgext}% -+ \fi - \ifnum\pdftexversion < 14 \else - \pdfrefximage \pdflastximage - \fi} -- \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 -+ % such as \, aren't expanded when present in a section title. -+ \indexnofonts -+ \turnoffactive -+ \activebackslashdouble -+ \makevalueexpandable -+ \def\pdfdestname{#1}% -+ \backslashparens\pdfdestname -+ \safewhatsit{\pdfdest name{\pdfdestname} xyz}% -+ }} -+ % -+ % used to mark target names; must be expandable. -+ \def\pdfmkpgn#1{#1} -+ % -+ % by default, use a color that is dark enough to print on paper as -+ % nearly black, but still distinguishable for online viewing. -+ \def\urlcolor{\rgbDarkRed} -+ \def\linkcolor{\rgbDarkRed} -+ \def\endlink{\setcolor{\maincolor}\pdfendlink} -+ % - % Adding outlines to PDF; macros for calculating structure of outlines - % come from Petr Olsak - \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% - \else \csname#1\endcsname \fi} - \def\advancenumber#1{\tempnum=\expnumber{#1}\relax -- \advance\tempnum by1 -+ \advance\tempnum by 1 - \expandafter\xdef\csname#1\endcsname{\the\tempnum}} -- \def\pdfmakeoutlines{{% -- \openin 1 \jobname.toc -- \ifeof 1\else\bgroup -- \closein 1 -- \indexnofonts -- \def\tt{} -- % thanh's hack / proper braces in bookmarks -- \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace -- \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace -- % -- \def\chapentry ##1##2##3{} -- \def\unnumbchapentry ##1##2{} -- \def\secentry ##1##2##3##4{\advancenumber{chap##2}} -- \def\unnumbsecentry ##1##2{} -- \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}} -- \def\unnumbsubsecentry ##1##2{} -- \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}} -- \def\unnumbsubsubsecentry ##1##2{} -- \input \jobname.toc -- \def\chapentry ##1##2##3{% -- \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}} -- \def\unnumbchapentry ##1##2{% -- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} -- \def\secentry ##1##2##3##4{% -- \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}} -- \def\unnumbsecentry ##1##2{% -- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} -- \def\subsecentry ##1##2##3##4##5{% -- \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}} -- \def\unnumbsubsecentry ##1##2{% -- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} -- \def\subsubsecentry ##1##2##3##4##5##6{% -- \pdfoutline goto name{\pdfmkpgn{##6}}{##1}} -- \def\unnumbsubsubsecentry ##1##2{% -- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} -- \input \jobname.toc -- \egroup\fi -- }} -- \def\makelinks #1,{% -- \def\params{#1}\def\E{END}% -- \ifx\params\E -- \let\nextmakelinks=\relax -+ % -+ % #1 is the section text, which is what will be displayed in the -+ % outline by the pdf viewer. #2 is the pdf expression for the number -+ % of subentries (or empty, for subsubsections). #3 is the node text, -+ % which might be empty if this toc entry had no corresponding node. -+ % #4 is the page number -+ % -+ \def\dopdfoutline#1#2#3#4{% -+ % Generate a link to the node text if that exists; else, use the -+ % page number. We could generate a destination for the section -+ % text in the case where a section has no node, but it doesn't -+ % seem worth the trouble, since most documents are normally structured. -+ \def\pdfoutlinedest{#3}% -+ \ifx\pdfoutlinedest\empty -+ \def\pdfoutlinedest{#4}% - \else -- \let\nextmakelinks=\makelinks -- \ifnum\lnkcount>0,\fi -- \picknum{#1}% -- \startlink attr{/Border [0 0 0]} -- goto name{\pdfmkpgn{\the\pgn}}% -- \linkcolor #1% -- \advance\lnkcount by 1% -- \endlink -+ % Doubled backslashes in the name. -+ {\activebackslashdouble \xdef\pdfoutlinedest{#3}% -+ \backslashparens\pdfoutlinedest}% - \fi -- \nextmakelinks -+ % -+ % Also double the backslashes in the display string. -+ {\activebackslashdouble \xdef\pdfoutlinetext{#1}% -+ \backslashparens\pdfoutlinetext}% -+ % -+ \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% - } -- \def\picknum#1{\expandafter\pn#1} -- \def\pn#1{% -- \def\p{#1}% -- \ifx\p\lbrace -- \let\nextpn=\ppn -- \else -- \let\nextpn=\ppnn -- \def\first{#1} -- \fi -- \nextpn -+ % -+ \def\pdfmakeoutlines{% -+ \begingroup -+ % Thanh's hack / proper braces in bookmarks -+ \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace -+ \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace -+ % -+ % Read toc silently, to get counts of subentries for \pdfoutline. -+ \def\numchapentry##1##2##3##4{% -+ \def\thischapnum{##2}% -+ \def\thissecnum{0}% -+ \def\thissubsecnum{0}% -+ }% -+ \def\numsecentry##1##2##3##4{% -+ \advancenumber{chap\thischapnum}% -+ \def\thissecnum{##2}% -+ \def\thissubsecnum{0}% -+ }% -+ \def\numsubsecentry##1##2##3##4{% -+ \advancenumber{sec\thissecnum}% -+ \def\thissubsecnum{##2}% -+ }% -+ \def\numsubsubsecentry##1##2##3##4{% -+ \advancenumber{subsec\thissubsecnum}% -+ }% -+ \def\thischapnum{0}% -+ \def\thissecnum{0}% -+ \def\thissubsecnum{0}% -+ % -+ % use \def rather than \let here because we redefine \chapentry et -+ % al. a second time, below. -+ \def\appentry{\numchapentry}% -+ \def\appsecentry{\numsecentry}% -+ \def\appsubsecentry{\numsubsecentry}% -+ \def\appsubsubsecentry{\numsubsubsecentry}% -+ \def\unnchapentry{\numchapentry}% -+ \def\unnsecentry{\numsecentry}% -+ \def\unnsubsecentry{\numsubsecentry}% -+ \def\unnsubsubsecentry{\numsubsubsecentry}% -+ \readdatafile{toc}% -+ % -+ % Read toc second time, this time actually producing the outlines. -+ % The `-' means take the \expnumber as the absolute number of -+ % subentries, which we calculated on our first read of the .toc above. -+ % -+ % We use the node names as the destinations. -+ \def\numchapentry##1##2##3##4{% -+ \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% -+ \def\numsecentry##1##2##3##4{% -+ \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% -+ \def\numsubsecentry##1##2##3##4{% -+ \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% -+ \def\numsubsubsecentry##1##2##3##4{% count is always zero -+ \dopdfoutline{##1}{}{##3}{##4}}% -+ % -+ % PDF outlines are displayed using system fonts, instead of -+ % document fonts. Therefore we cannot use special characters, -+ % since the encoding is unknown. For example, the eogonek from -+ % Latin 2 (0xea) gets translated to a | character. Info from -+ % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. -+ % -+ % xx to do this right, we have to translate 8-bit characters to -+ % their "best" equivalent, based on the @documentencoding. Right -+ % now, I guess we'll just let the pdf reader have its way. -+ \indexnofonts -+ \setupdatafile -+ \catcode`\\=\active \otherbackslash -+ \input \tocreadfilename -+ \endgroup - } -- \def\ppn#1{\pgn=#1\gobble} -- \def\ppnn{\pgn=\first} -- \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,} -- \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} -+ % - \def\skipspaces#1{\def\PP{#1}\def\D{|}% - \ifx\PP\D\let\nextsp\relax - \else\let\nextsp\skipspaces -@@ -983,24 +1568,36 @@ - \else - \let \startlink \pdfstartlink - \fi -+ % make a live url in pdf output. - \def\pdfurl#1{% - \begingroup -- \normalturnoffactive\def\@{@}% -- \leavevmode\Red -+ % it seems we really need yet another set of dummies; have not -+ % 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 -+ % 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 - \endgroup} - \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} - \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} - \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} - \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} - \def\maketoks{% -- \expandafter\poptoks\the\toksA|ENDTOKS| -+ \expandafter\poptoks\the\toksA|ENDTOKS|\relax - \ifx\first0\adn0 - \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 - \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 -- \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 -+ \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 - \else - \ifnum0=\countA\else\makelink\fi - \ifx\first.\let\next=\done\else -@@ -1013,33 +1610,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}} -- \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\setcolor = \gobble -+ \let\pdfsetcolor = \gobble -+ \let\pdfmakeoutlines = \relax -+\fi % \ifx\pdfoutput - - - \message{fonts,} --% Font-change commands. -+ -+% Change the current font style to #1, remembering it in \curfontstyle. -+% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in -+% italics, not bold italics. -+% -+\def\setfontstyle#1{% -+ \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. -+ \csname ten#1\endcsname % change the current font -+} -+ -+% Select #1 fonts with the current style. -+% -+\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} -+ -+\def\rm{\fam=0 \setfontstyle{rm}} -+\def\it{\fam=\itfam \setfontstyle{it}} -+\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. -+% So we set up a \sf. - \newfam\sffam --\def\sf{\fam=\sffam \tensf} -+\def\sf{\fam=\sffam \setfontstyle{sf}} - \let\li = \sf % Sometimes we call it \li, not \sf. - --% We don't need math for this one. --\def\ttsl{\tenttsl} -+% We don't need math for this font style. -+\def\ttsl{\setfontstyle{ttsl}} -+ -+ -+% Default leading. -+\newdimen\textleading \textleading = 13.2pt -+ -+% Set the baselineskip to #1, and the lineskip and strut size -+% correspondingly. There is no deep meaning behind these magic numbers -+% used as factors; they just match (closely enough) what Knuth defined. -+% -+\def\lineskipfactor{.08333} -+\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{% -+ \dimen0 = #1\relax -+ \normalbaselineskip = \baselinefactor\dimen0 -+ \normallineskip = \lineskipfactor\normalbaselineskip -+ \normalbaselines -+ \setbox\strutbox =\hbox{% -+ \vrule width0pt height\strutheightpercent\baselineskip -+ depth \strutdepthpercent \baselineskip -+ }% -+} -+ -+% PDF CMaps. See also LaTeX's t1.cmap. -+% -+% 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 -+%%DocumentNeededResources: ProcSet (CIDInit) -+%%IncludeResource: ProcSet (CIDInit) -+%%BeginResource: CMap (TeX-OT1-0) -+%%Title: (TeX-OT1-0 TeX OT1 0) -+%%Version: 1.000 -+%%EndComments -+/CIDInit /ProcSet findresource begin -+12 dict begin -+begincmap -+/CIDSystemInfo -+<< /Registry (TeX) -+/Ordering (OT1) -+/Supplement 0 -+>> def -+/CMapName /TeX-OT1-0 def -+/CMapType 2 def -+1 begincodespacerange -+<00> <7F> -+endcodespacerange -+8 beginbfrange -+<00> <01> <0393> -+<09> <0A> <03A8> -+<23> <26> <0023> -+<28> <3B> <0028> -+<3F> <5B> <003F> -+<5D> <5E> <005D> -+<61> <7A> <0061> -+<7B> <7C> <2013> -+endbfrange -+40 beginbfchar -+<02> <0398> -+<03> <039B> -+<04> <039E> -+<05> <03A0> -+<06> <03A3> -+<07> <03D2> -+<08> <03A6> -+<0B> <00660066> -+<0C> <00660069> -+<0D> <0066006C> -+<0E> <006600660069> -+<0F> <00660066006C> -+<10> <0131> -+<11> <0237> -+<12> <0060> -+<13> <00B4> -+<14> <02C7> -+<15> <02D8> -+<16> <00AF> -+<17> <02DA> -+<18> <00B8> -+<19> <00DF> -+<1A> <00E6> -+<1B> <0153> -+<1C> <00F8> -+<1D> <00C6> -+<1E> <0152> -+<1F> <00D8> -+<21> <0021> -+<22> <201D> -+<27> <2019> -+<3C> <00A1> -+<3D> <003D> -+<3E> <00BF> -+<5C> <201C> -+<5F> <02D9> -+<60> <2018> -+<7D> <02DD> -+<7E> <007E> -+<7F> <00A8> -+endbfchar -+endcmap -+CMapName currentdict /CMap defineresource pop -+end -+end -+%%EndResource -+%%EOF -+ }\endgroup -+ \expandafter\edef\csname cmapOT1\endcsname#1{% -+ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% -+ }% -+% -+% \cmapOT1IT -+ \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 -+%%DocumentNeededResources: ProcSet (CIDInit) -+%%IncludeResource: ProcSet (CIDInit) -+%%BeginResource: CMap (TeX-OT1IT-0) -+%%Title: (TeX-OT1IT-0 TeX OT1IT 0) -+%%Version: 1.000 -+%%EndComments -+/CIDInit /ProcSet findresource begin -+12 dict begin -+begincmap -+/CIDSystemInfo -+<< /Registry (TeX) -+/Ordering (OT1IT) -+/Supplement 0 -+>> def -+/CMapName /TeX-OT1IT-0 def -+/CMapType 2 def -+1 begincodespacerange -+<00> <7F> -+endcodespacerange -+8 beginbfrange -+<00> <01> <0393> -+<09> <0A> <03A8> -+<25> <26> <0025> -+<28> <3B> <0028> -+<3F> <5B> <003F> -+<5D> <5E> <005D> -+<61> <7A> <0061> -+<7B> <7C> <2013> -+endbfrange -+42 beginbfchar -+<02> <0398> -+<03> <039B> -+<04> <039E> -+<05> <03A0> -+<06> <03A3> -+<07> <03D2> -+<08> <03A6> -+<0B> <00660066> -+<0C> <00660069> -+<0D> <0066006C> -+<0E> <006600660069> -+<0F> <00660066006C> -+<10> <0131> -+<11> <0237> -+<12> <0060> -+<13> <00B4> -+<14> <02C7> -+<15> <02D8> -+<16> <00AF> -+<17> <02DA> -+<18> <00B8> -+<19> <00DF> -+<1A> <00E6> -+<1B> <0153> -+<1C> <00F8> -+<1D> <00C6> -+<1E> <0152> -+<1F> <00D8> -+<21> <0021> -+<22> <201D> -+<23> <0023> -+<24> <00A3> -+<27> <2019> -+<3C> <00A1> -+<3D> <003D> -+<3E> <00BF> -+<5C> <201C> -+<5F> <02D9> -+<60> <2018> -+<7D> <02DD> -+<7E> <007E> -+<7F> <00A8> -+endbfchar -+endcmap -+CMapName currentdict /CMap defineresource pop -+end -+end -+%%EndResource -+%%EOF -+ }\endgroup -+ \expandafter\edef\csname cmapOT1IT\endcsname#1{% -+ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% -+ }% -+% -+% \cmapOT1TT -+ \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 -+%%DocumentNeededResources: ProcSet (CIDInit) -+%%IncludeResource: ProcSet (CIDInit) -+%%BeginResource: CMap (TeX-OT1TT-0) -+%%Title: (TeX-OT1TT-0 TeX OT1TT 0) -+%%Version: 1.000 -+%%EndComments -+/CIDInit /ProcSet findresource begin -+12 dict begin -+begincmap -+/CIDSystemInfo -+<< /Registry (TeX) -+/Ordering (OT1TT) -+/Supplement 0 -+>> def -+/CMapName /TeX-OT1TT-0 def -+/CMapType 2 def -+1 begincodespacerange -+<00> <7F> -+endcodespacerange -+5 beginbfrange -+<00> <01> <0393> -+<09> <0A> <03A8> -+<21> <26> <0021> -+<28> <5F> <0028> -+<61> <7E> <0061> -+endbfrange -+32 beginbfchar -+<02> <0398> -+<03> <039B> -+<04> <039E> -+<05> <03A0> -+<06> <03A3> -+<07> <03D2> -+<08> <03A6> -+<0B> <2191> -+<0C> <2193> -+<0D> <0027> -+<0E> <00A1> -+<0F> <00BF> -+<10> <0131> -+<11> <0237> -+<12> <0060> -+<13> <00B4> -+<14> <02C7> -+<15> <02D8> -+<16> <00AF> -+<17> <02DA> -+<18> <00B8> -+<19> <00DF> -+<1A> <00E6> -+<1B> <0153> -+<1C> <00F8> -+<1D> <00C6> -+<1E> <0152> -+<1F> <00D8> -+<20> <2423> -+<27> <2019> -+<60> <2018> -+<7F> <00A8> -+endbfchar -+endcmap -+CMapName currentdict /CMap defineresource pop -+end -+end -+%%EndResource -+%%EOF -+ }\endgroup -+ \expandafter\edef\csname cmapOT1TT\endcsname#1{% -+ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% -+ }% -+\fi\fi - --% Use Computer Modern fonts at \magstephalf (11pt). --\newcount\mainmagstep --\mainmagstep=\magstephalf - - % Set the font macro #1 to the font named #2, adding on the - % specified font prefix (normally `cm'). --% #3 is the font's design size, #4 is a scale factor --\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} -+% #3 is the font's design size, #4 is a scale factor, #5 is the CMap -+% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass -+% empty to omit). -+\def\setfont#1#2#3#4#5{% -+ \font#1=\fontprefix#2#3 scaled #4 -+ \csname cmap#5\endcsname#1% -+} -+% 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,196 +1981,578 @@ - \def\scshape{csc} - \def\scbshape{csc} - --\ifx\bigger\relax --\let\mainmagstep=\magstep1 --\setfont\textrm\rmshape{12}{1000} --\setfont\texttt\ttshape{12}{1000} --\else --\setfont\textrm\rmshape{10}{\mainmagstep} --\setfont\texttt\ttshape{10}{\mainmagstep} --\fi --% Instead of cmb10, you many want to use cmbx10. --% cmbx10 is a prettier font on its own, but cmb10 --% looks better when embedded in a line with cmr10. --\setfont\textbf\bfshape{10}{\mainmagstep} --\setfont\textit\itshape{10}{\mainmagstep} --\setfont\textsl\slshape{10}{\mainmagstep} --\setfont\textsf\sfshape{10}{\mainmagstep} --\setfont\textsc\scshape{10}{\mainmagstep} --\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} -+\edef\mainmagstep{\magstephalf} -+\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} -+\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} -+\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} -+\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} -+\setfont\textsl\slshape{10}{\mainmagstep}{OT1} -+\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} -+\setfont\textsc\scshape{10}{\mainmagstep}{OT1} -+\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 --\setfont\deftt\ttshape{10}{\magstep1} --\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} -+% A few fonts for @defun names and args. -+\setfont\defbf\bfshape{10}{\magstep1}{OT1} -+\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} -+\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} -+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} - - % Fonts for indices, footnotes, small examples (9pt). --\setfont\smallrm\rmshape{9}{1000} --\setfont\smalltt\ttshape{9}{1000} --\setfont\smallbf\bfshape{10}{900} --\setfont\smallit\itshape{9}{1000} --\setfont\smallsl\slshape{9}{1000} --\setfont\smallsf\sfshape{9}{1000} --\setfont\smallsc\scshape{10}{900} --\setfont\smallttsl\ttslshape{10}{900} -+\def\smallnominalsize{9pt} -+\setfont\smallrm\rmshape{9}{1000}{OT1} -+\setfont\smalltt\ttshape{9}{1000}{OT1TT} -+\setfont\smallbf\bfshape{10}{900}{OT1} -+\setfont\smallit\itshape{9}{1000}{OT1IT} -+\setfont\smallsl\slshape{9}{1000}{OT1} -+\setfont\smallsf\sfshape{9}{1000}{OT1} -+\setfont\smallsc\scshape{10}{900}{OT1} -+\setfont\smallttsl\ttslshape{10}{900}{OT1TT} - \font\smalli=cmmi9 - \font\smallsy=cmsy9 -+\def\smallecsize{0900} - --% Fonts for title page: --\setfont\titlerm\rmbshape{12}{\magstep3} --\setfont\titleit\itbshape{10}{\magstep4} --\setfont\titlesl\slbshape{10}{\magstep4} --\setfont\titlett\ttbshape{12}{\magstep3} --\setfont\titlettsl\ttslshape{10}{\magstep4} --\setfont\titlesf\sfbshape{17}{\magstep1} -+% Fonts for small examples (8pt). -+\def\smallernominalsize{8pt} -+\setfont\smallerrm\rmshape{8}{1000}{OT1} -+\setfont\smallertt\ttshape{8}{1000}{OT1TT} -+\setfont\smallerbf\bfshape{10}{800}{OT1} -+\setfont\smallerit\itshape{8}{1000}{OT1IT} -+\setfont\smallersl\slshape{8}{1000}{OT1} -+\setfont\smallersf\sfshape{8}{1000}{OT1} -+\setfont\smallersc\scshape{10}{800}{OT1} -+\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} -+\font\smalleri=cmmi8 -+\font\smallersy=cmsy8 -+\def\smallerecsize{0800} -+ -+% Fonts for title page (20.4pt): -+\def\titlenominalsize{20pt} -+\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} -+\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} -+\setfont\titlesl\slbshape{10}{\magstep4}{OT1} -+\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} -+\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} -+\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} - \let\titlebf=\titlerm --\setfont\titlesc\scbshape{10}{\magstep4} -+\setfont\titlesc\scbshape{10}{\magstep4}{OT1} - \font\titlei=cmmi12 scaled \magstep3 - \font\titlesy=cmsy10 scaled \magstep4 --\def\authorrm{\secrm} -+\def\titleecsize{2074} - - % Chapter (and unnumbered) fonts (17.28pt). --\setfont\chaprm\rmbshape{12}{\magstep2} --\setfont\chapit\itbshape{10}{\magstep3} --\setfont\chapsl\slbshape{10}{\magstep3} --\setfont\chaptt\ttbshape{12}{\magstep2} --\setfont\chapttsl\ttslshape{10}{\magstep3} --\setfont\chapsf\sfbshape{17}{1000} -+\def\chapnominalsize{17pt} -+\setfont\chaprm\rmbshape{12}{\magstep2}{OT1} -+\setfont\chapit\itbshape{10}{\magstep3}{OT1IT} -+\setfont\chapsl\slbshape{10}{\magstep3}{OT1} -+\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} -+\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} -+\setfont\chapsf\sfbshape{17}{1000}{OT1} - \let\chapbf=\chaprm --\setfont\chapsc\scbshape{10}{\magstep3} -+\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} --\setfont\secit\itbshape{10}{\magstep2} --\setfont\secsl\slbshape{10}{\magstep2} --\setfont\sectt\ttbshape{12}{\magstep1} --\setfont\secttsl\ttslshape{10}{\magstep2} --\setfont\secsf\sfbshape{12}{\magstep1} -+\def\secnominalsize{14pt} -+\setfont\secrm\rmbshape{12}{\magstep1}{OT1} -+\setfont\secit\itbshape{10}{\magstep2}{OT1IT} -+\setfont\secsl\slbshape{10}{\magstep2}{OT1} -+\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} -+\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} -+\setfont\secsf\sfbshape{12}{\magstep1}{OT1} - \let\secbf\secrm --\setfont\secsc\scbshape{10}{\magstep2} -+\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} --% \setfont\ssectt\ttshape{10}{\magstep1} --% \setfont\ssecsf\sfshape{10}{\magstep1} -- --%\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx. --%\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than --%\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1. --%\setfont\ssectt\ttshape{10}{1315} --%\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} --\setfont\ssecsl\slbshape{10}{1315} --\setfont\ssectt\ttbshape{12}{\magstephalf} --\setfont\ssecttsl\ttslshape{10}{1315} --\setfont\ssecsf\sfbshape{12}{\magstephalf} -+\def\ssecnominalsize{13pt} -+\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} -+\setfont\ssecit\itbshape{10}{1315}{OT1IT} -+\setfont\ssecsl\slbshape{10}{1315}{OT1} -+\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} -+\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} -+\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} - \let\ssecbf\ssecrm --\setfont\ssecsc\scbshape{10}{\magstep1} -+\setfont\ssecsc\scbshape{10}{1315}{OT1} - \font\sseci=cmmi12 scaled \magstephalf - \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} -+\setfont\reducedrm\rmshape{10}{1000}{OT1} -+\setfont\reducedtt\ttshape{10}{1000}{OT1TT} -+\setfont\reducedbf\bfshape{10}{1000}{OT1} -+\setfont\reducedit\itshape{10}{1000}{OT1IT} -+\setfont\reducedsl\slshape{10}{1000}{OT1} -+\setfont\reducedsf\sfshape{10}{1000}{OT1} -+\setfont\reducedsc\scshape{10}{1000}{OT1} -+\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} -+\font\reducedi=cmmi10 -+\font\reducedsy=cmsy10 -+\def\reducedecsize{1000} -+ -+% reset the current fonts -+\textfonts -+\rm -+} % end of 11pt text font size definitions -+ -+ -+% Definitions to make the main text be 10pt Computer Modern, with -+% 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} -+\edef\mainmagstep{1000} -+\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} -+\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} -+\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} -+\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} -+\setfont\textsl\slshape{10}{\mainmagstep}{OT1} -+\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} -+\setfont\textsc\scshape{10}{\mainmagstep}{OT1} -+\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} -+\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} -+\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} -+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} -+ -+% Fonts for indices, footnotes, small examples (9pt). -+\def\smallnominalsize{9pt} -+\setfont\smallrm\rmshape{9}{1000}{OT1} -+\setfont\smalltt\ttshape{9}{1000}{OT1TT} -+\setfont\smallbf\bfshape{10}{900}{OT1} -+\setfont\smallit\itshape{9}{1000}{OT1IT} -+\setfont\smallsl\slshape{9}{1000}{OT1} -+\setfont\smallsf\sfshape{9}{1000}{OT1} -+\setfont\smallsc\scshape{10}{900}{OT1} -+\setfont\smallttsl\ttslshape{10}{900}{OT1TT} -+\font\smalli=cmmi9 -+\font\smallsy=cmsy9 -+\def\smallecsize{0900} -+ -+% Fonts for small examples (8pt). -+\def\smallernominalsize{8pt} -+\setfont\smallerrm\rmshape{8}{1000}{OT1} -+\setfont\smallertt\ttshape{8}{1000}{OT1TT} -+\setfont\smallerbf\bfshape{10}{800}{OT1} -+\setfont\smallerit\itshape{8}{1000}{OT1IT} -+\setfont\smallersl\slshape{8}{1000}{OT1} -+\setfont\smallersf\sfshape{8}{1000}{OT1} -+\setfont\smallersc\scshape{10}{800}{OT1} -+\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} -+\font\smalleri=cmmi8 -+\font\smallersy=cmsy8 -+\def\smallerecsize{0800} -+ -+% Fonts for title page (20.4pt): -+\def\titlenominalsize{20pt} -+\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} -+\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} -+\setfont\titlesl\slbshape{10}{\magstep4}{OT1} -+\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} -+\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} -+\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} -+\let\titlebf=\titlerm -+\setfont\titlesc\scbshape{10}{\magstep4}{OT1} -+\font\titlei=cmmi12 scaled \magstep3 -+\font\titlesy=cmsy10 scaled \magstep4 -+\def\titleecsize{2074} -+ -+% Chapter fonts (14.4pt). -+\def\chapnominalsize{14pt} -+\setfont\chaprm\rmbshape{12}{\magstep1}{OT1} -+\setfont\chapit\itbshape{10}{\magstep2}{OT1IT} -+\setfont\chapsl\slbshape{10}{\magstep2}{OT1} -+\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} -+\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} -+\setfont\chapsf\sfbshape{12}{\magstep1}{OT1} -+\let\chapbf\chaprm -+\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} -+\setfont\secrm\rmbshape{12}{1000}{OT1} -+\setfont\secit\itbshape{10}{\magstep1}{OT1IT} -+\setfont\secsl\slbshape{10}{\magstep1}{OT1} -+\setfont\sectt\ttbshape{12}{1000}{OT1TT} -+\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} -+\setfont\secsf\sfbshape{12}{1000}{OT1} -+\let\secbf\secrm -+\setfont\secsc\scbshape{10}{\magstep1}{OT1} -+\font\seci=cmmi12 -+\font\secsy=cmsy10 scaled \magstep1 -+\def\sececsize{1200} -+ -+% Subsection fonts (10pt). -+\def\ssecnominalsize{10pt} -+\setfont\ssecrm\rmbshape{10}{1000}{OT1} -+\setfont\ssecit\itbshape{10}{1000}{OT1IT} -+\setfont\ssecsl\slbshape{10}{1000}{OT1} -+\setfont\ssectt\ttbshape{10}{1000}{OT1TT} -+\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} -+\setfont\ssecsf\sfbshape{10}{1000}{OT1} -+\let\ssecbf\ssecrm -+\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} -+\setfont\reducedrm\rmshape{9}{1000}{OT1} -+\setfont\reducedtt\ttshape{9}{1000}{OT1TT} -+\setfont\reducedbf\bfshape{10}{900}{OT1} -+\setfont\reducedit\itshape{9}{1000}{OT1IT} -+\setfont\reducedsl\slshape{9}{1000}{OT1} -+\setfont\reducedsf\sfshape{9}{1000}{OT1} -+\setfont\reducedsc\scshape{10}{900}{OT1} -+\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} -+\font\reducedi=cmmi9 -+\font\reducedsy=cmsy9 -+\def\reducedecsize{0900} -+ -+% reduce space between paragraphs -+\divide\parskip by 2 -+ -+% reset the current fonts -+\textfonts -+\rm -+} % end of 10pt text font size definitions -+ -+ -+% 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} -+% -+\parseargdef\fonttextsize{% -+ \def\textsizearg{#1}% -+ \wlog{doing @fonttextsize \textsizearg}% -+ % -+ % 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 -+ \else -+ \errhelp=\EMsimple -+ \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} -+ \fi\fi -+ \endgroup -+} -+ - - % In order for the font changes to affect most math symbols and letters, - % we have to define the \textfont of the standard families. Since --% texinfo doesn't allow for producing subscripts and superscripts, we --% don't bother to reset \scriptfont and \scriptscriptfont (which would --% also require loading a lot more fonts). -+% texinfo doesn't allow for producing subscripts and superscripts except -+% in the main text, we don't bother to reset \scriptfont and -+% \scriptscriptfont (which would also require loading a lot more fonts). - % - \def\resetmathfonts{% -- \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy -- \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf -- \textfont\ttfam = \tentt \textfont\sffam = \tensf -+ \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy -+ \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf -+ \textfont\ttfam=\tentt \textfont\sffam=\tensf - } - -- - % The font-changing commands redefine the meanings of \tenSTYLE, instead --% of just \STYLE. We do this so that font changes will continue to work --% in math mode, where it is the current \fam that is relevant in most --% cases, not the current font. Plain TeX does \def\bf{\fam=\bffam --% \tenbf}, for example. By redefining \tenbf, we obviate the need to --% redefine \bf itself. -+% of just \STYLE. We do this because \STYLE needs to also set the -+% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire -+% \tenSTYLE to set the current font. -+% -+% Each font-changing command also sets the names \lsize (one size lower) -+% and \lllsize (three sizes lower). These relative commands are used in -+% the LaTeX logo and acronyms. -+% -+% This all needs generalizing, badly. -+% - \def\textfonts{% - \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl - \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc -- \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl -- \resetmathfonts} -+ \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy -+ \let\tenttsl=\textttsl -+ \def\curfontsize{text}% -+ \def\lsize{reduced}\def\lllsize{smaller}% -+ \resetmathfonts \setleading{\textleading}} - \def\titlefonts{% - \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl - \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc - \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy - \let\tenttsl=\titlettsl -+ \def\curfontsize{title}% -+ \def\lsize{chap}\def\lllsize{subsec}% - \resetmathfonts \setleading{25pt}} --\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 -- \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl -+ \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy -+ \let\tenttsl=\chapttsl -+ \def\curfontsize{chap}% -+ \def\lsize{sec}\def\lllsize{text}% - \resetmathfonts \setleading{19pt}} - \def\secfonts{% - \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl - \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc -- \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl -+ \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy -+ \let\tenttsl=\secttsl -+ \def\curfontsize{sec}% -+ \def\lsize{subsec}\def\lllsize{reduced}% - \resetmathfonts \setleading{16pt}} - \def\subsecfonts{% - \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl - \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc -- \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl -+ \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy -+ \let\tenttsl=\ssecttsl -+ \def\curfontsize{ssec}% -+ \def\lsize{text}\def\lllsize{small}% - \resetmathfonts \setleading{15pt}} --\let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf? -+\let\subsubsecfonts = \subsecfonts -+\def\reducedfonts{% -+ \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl -+ \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc -+ \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy -+ \let\tenttsl=\reducedttsl -+ \def\curfontsize{reduced}% -+ \def\lsize{small}\def\lllsize{smaller}% -+ \resetmathfonts \setleading{10.5pt}} - \def\smallfonts{% - \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl - \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc - \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy - \let\tenttsl=\smallttsl -- \resetmathfonts \setleading{11pt}} -+ \def\curfontsize{small}% -+ \def\lsize{smaller}\def\lllsize{smaller}% -+ \resetmathfonts \setleading{10.5pt}} -+\def\smallerfonts{% -+ \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl -+ \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc -+ \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy -+ \let\tenttsl=\smallerttsl -+ \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 -+ -+% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample -+% can fit this many characters: -+% 8.5x11=86 smallbook=72 a4=90 a5=69 -+% If we use \scriptfonts (8pt), then we can fit this many characters: -+% 8.5x11=90+ smallbook=80 a4=90+ a5=77 -+% For me, subjectively, the few extra characters that fit aren't worth -+% the additional smallness of 8pt. So I'm making the default 9pt. -+% -+% By the way, for comparison, here's what fits with @example (10pt): -+% 8.5x11=71 smallbook=60 a4=75 a5=58 -+% --karl, 24jan03. -+ -+% Set up the default fonts, so we can use them for creating boxes. -+% -+\definetextfontsizexi -+ -+ -+\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. --\setfont\shortcontrm\rmshape{12}{1000} --\setfont\shortcontbf\bxshape{12}{1000} --\setfont\shortcontsl\slshape{12}{1000} -+% Font commands. - --%% Add scribe-like font environments, plus @l for inline lisp (usually sans --%% serif) and @ii for TeX italic -+% #1 is the font command (\sl vs. \it), #2 is the text to slant. -+% If we are in a monospaced environment, however, 1) always use \ttsl, -+% and 2) do not add an italic correction. -+\def\dosmartslant#1#2{% -+ \ifusingtt -+ {\ttsl #2\let\next=\relax}% -+ {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% -+ \next -+} -+\def\smartslanted{\dosmartslant\sl} -+\def\smartitalic{\dosmartslant\it} - --% \smartitalic{ARG} outputs arg in italics, followed by an italic correction --% unless the following character is such as not to need one. --\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} --\def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx} --\def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx} -+% Output an italic correction unless \next (presumed to be the following -+% character) is such as not to need one. -+\def\smartitaliccorrection{% -+ \ifx\next,% -+ \else\ifx\next-% -+ \else\ifx\next.% -+ \else\ptexslash -+ \fi\fi\fi} -+ -+% like \smartslanted except unconditionally uses \ttsl, and no ic. -+% @var is set to this for defun arguments. -+\def\ttslanted#1{{\ttsl #1}} -+ -+% @cite is like \smartslanted except unconditionally use \sl. We never want -+% ttsl for book titles, do we? -+\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} - - \let\i=\smartitalic --\let\var=\smartslanted -+\let\slanted=\smartslanted -+\def\var#1{\smartslanted{#1}} - \let\dfn=\smartslanted - \let\emph=\smartitalic --\let\cite=\smartslanted - -+% 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 - -+% @sansserif, explicit sans. -+\def\sansserif#1{{\sf #1}} -+ - % 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,22 +2560,53 @@ - \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} - \def\restorehyphenation{\hyphenchar\font = `- } - -+% Set sfcode to normal for the chars that usually have another value. -+% Can't use plain's \frenchspacing because it uses the `\x notation, and -+% sometimes \x has an active definition that messes things up. -+% -+\catcode`@=11 -+ \def\plainfrenchspacing{% -+ \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m -+ \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m -+ \def\endofsentencespacefactor{1000}% for @. and friends -+ } -+ \def\plainnonfrenchspacing{% -+ \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 -+ \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 -+ \def\endofsentencespacefactor{3000}% for @. and friends -+ } -+\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} --\setfont\keyrm\rmshape{8}{1000} --\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} - - % @file, @option are the same as @samp. -@@ -1300,13 +2630,13 @@ - \nohyphenation - % - \rawbackslash -- \frenchspacing -+ \plainfrenchspacing - #1% - }% - \null - } - --% We *must* turn on hyphenation at `-' and `_' in \code. -+% We *must* turn on hyphenation at `-' and `_' in @code. - % Otherwise, it is too hard to avoid overfull hboxes - % in the Emacs manual, the Library manual, etc. - -@@ -1316,63 +2646,107 @@ - % and arrange explicitly to hyphenate at a dash. - % -- rms. - { -- \catcode`\-=\active -- \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 -+ \setupmarkupstyle{code}% -+ % The following should really be moved into \setupmarkupstyle handlers. -+ \catcode\dashChar=\active \catcode\underChar=\active -+ \ifallowcodebreaks -+ \let-\codedash -+ \let_\codeunder -+ \else -+ \let-\realdash -+ \let_\realunder -+ \fi - \codex - } -- % -- % If we end up with any active - characters when handling the index, -- % just treat them as a normal -. -- \global\def\indexbreaks{\catcode`\-=\active \let-\realdash} - } - - \def\realdash{-} - \def\codedash{-\discretionary{}{}{}} --\def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}} -+\def\codeunder{% -+ % this is all so @math{@code{var_name}+1} can work. In math mode, _ -+ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) -+ % will therefore expand the active definition of _, which is us -+ % (inside @code that is), therefore an endless loop. -+ \ifusingtt{\ifmmode -+ \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. -+ \else\normalunderscore \fi -+ \discretionary{}{}{}}% -+ {\_}% -+} - \def\codex #1{\tclose{#1}\endgroup} - --%\let\exp=\tclose %Was temporary -+% An additional complication: the above will allow breaks after, e.g., -+% 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} -+\def\keywordfalse{false} -+ -+\parseargdef\allowcodebreaks{% -+ \def\txiarg{#1}% -+ \ifx\txiarg\keywordtrue -+ \allowcodebreakstrue -+ \else\ifx\txiarg\keywordfalse -+ \allowcodebreaksfalse -+ \else -+ \errhelp = \EMsimple -+ \errmessage{Unknown @allowcodebreaks option `\txiarg'}% -+ \fi\fi -+} - - % @kbd is like @code, except that if the argument is just one @key command, - % then @kbd has no effect. -+\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). --\def\kbdinputstyle{\parsearg\kbdinputstylexxx} --\def\kbdinputstylexxx#1{% -- \def\arg{#1}% -- \ifx\arg\worddistinct -+\parseargdef\kbdinputstyle{% -+ \def\txiarg{#1}% -+ \ifx\txiarg\worddistinct - \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% -- \else\ifx\arg\wordexample -+ \else\ifx\txiarg\wordexample - \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% -- \else\ifx\arg\wordcode -+ \else\ifx\txiarg\wordcode - \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% -+ \else -+ \errhelp = \EMsimple -+ \errmessage{Unknown @kbdinputstyle option `\txiarg'}% - \fi\fi\fi - } - \def\worddistinct{distinct} - \def\wordexample{example} - \def\wordcode{code} - --% 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'. -+\kbdinputstyle distinct - - \def\xkey{\key} - \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% - \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 -+% For @indicateurl, @env, @command quotes seem unnecessary, so use \code. -+\let\indicateurl=\code - \let\env=\code - \let\command=\code - -+% @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 +2775,13 @@ - \endlink - \endgroup} - -+% @url synonym for @uref, since that's how everyone uses it. -+% -+\let\url=\uref -+ - % rms does not like angle brackets --karl, 17may97. - % So now @email is just like @uref, unless we are pdf. --% -+% - %\def\email#1{\angleleft{\tt #1}\angleright} - \ifpdf - \def\email#1{\doemail#1,,\finish} -@@ -1418,36 +2796,223 @@ - \let\email=\uref - \fi - --% 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}% -+ \def\temp{#2}% -+ \ifx\temp\empty \else -+ \space ({\unsepspaces \ignorespaces \temp \unskip})% -+ \fi -+} - --% @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}% -+ \def\temp{#2}% -+ \ifx\temp\empty \else -+ \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. -+% - \def\pounds{{\it\$}} - -+% @euro{} comes from a separate font, depending on the current style. -+% We use the free feym* fonts from the eurosym package by Henrik -+% 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 -+ % bold: -+ \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize -+ \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. -+% -+\def\registeredsymbol{% -+ $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% -+ \hfil\crcr\Orb}}% -+ }$% -+} -+ -+% @textdegree - the normal degrees sign. -+% -+\def\textdegree{$^\circ$} -+ -+% 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 +3031,100 @@ - \newif\ifsetshortcontentsaftertitlepage - \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue - --\def\shorttitlepage{\parsearg\shorttitlepagezzz} --\def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% -+\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% - \endgroup\page\hbox{}\page} - --\def\titlepage{\begingroup \parindent=0pt \textfonts -- \let\subtitlerm=\tenrm -- \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% -- % -- \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}% -- % -- % Leave some space at the very top of the page. -- \vglue\titlepagetopglue -- % -- % Now you can print the title using @title. -- \def\title{\parsearg\titlezzz}% -- \def\titlezzz##1{\leftline{\titlefonts\rm ##1} -- % print a rule at the page bottom also. -- \finishedtitlepagefalse -- \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% -- % No rule at page bottom unless we print one at the top with @title. -- \finishedtitlepagetrue -- % -- % Now you can put text using @subtitle. -- \def\subtitle{\parsearg\subtitlezzz}% -- \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}% -- % -- % @author should come last, but may come many times. -- \def\author{\parsearg\authorzzz}% -- \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi -- {\authorfont \leftline{##1}}}% -- % -- % Most title ``pages'' are actually two pages long, with space -- % at the top of the second. We don't want the ragged left on the second. -- \let\oldpage = \page -- \def\page{% -+\envdef\titlepage{% -+ % Open one extra group, as we want to close it in the middle of \Etitlepage. -+ \begingroup -+ \parindent=0pt \textfonts -+ % Leave some space at the very top of the page. -+ \vglue\titlepagetopglue -+ % No rule at page bottom unless we print one at the top with @title. -+ \finishedtitlepagetrue -+ % -+ % Most title ``pages'' are actually two pages long, with space -+ % at the top of the second. We don't want the ragged left on the second. -+ \let\oldpage = \page -+ \def\page{% - \iffinishedtitlepage\else -- \finishtitlepage -+ \finishtitlepage - \fi -- \oldpage - \let\page = \oldpage -- \hbox{}}% --% \def\page{\oldpage \hbox{}} -+ \page -+ \null -+ }% - } - - \def\Etitlepage{% -- \iffinishedtitlepage\else -- \finishtitlepage -- \fi -- % It is important to do the page break before ending the group, -- % because the headline and footline are only empty inside the group. -- % If we use the new definition of \page, we always get a blank page -- % after the title page, which we certainly don't want. -- \oldpage -- \endgroup -- % -- % If they want short, they certainly want long too. -- \ifsetshortcontentsaftertitlepage -- \shortcontents -- \contents -- \global\let\shortcontents = \relax -- \global\let\contents = \relax -- \fi -- % -- \ifsetcontentsaftertitlepage -- \contents -- \global\let\contents = \relax -- \global\let\shortcontents = \relax -- \fi -- % -- \ifpdf \pdfmakepagedesttrue \fi -- % -- \HEADINGSon -+ \iffinishedtitlepage\else -+ \finishtitlepage -+ \fi -+ % It is important to do the page break before ending the group, -+ % because the headline and footline are only empty inside the group. -+ % If we use the new definition of \page, we always get a blank page -+ % after the title page, which we certainly don't want. -+ \oldpage -+ \endgroup -+ % -+ % Need this before the \...aftertitlepage checks so that if they are -+ % in effect the toc pages will come out with page numbers. -+ \HEADINGSon -+ % -+ % If they want short, they certainly want long too. -+ \ifsetshortcontentsaftertitlepage -+ \shortcontents -+ \contents -+ \global\let\shortcontents = \relax -+ \global\let\contents = \relax -+ \fi -+ % -+ \ifsetcontentsaftertitlepage -+ \contents -+ \global\let\contents = \relax -+ \global\let\shortcontents = \relax -+ \fi - } - - \def\finishtitlepage{% -- \vskip4pt \hrule height 2pt width \hsize -- \vskip\titlepagebottomglue -- \finishedtitlepagetrue -+ \vskip4pt \hrule height 2pt width \hsize -+ \vskip\titlepagebottomglue -+ \finishedtitlepagetrue -+} -+ -+%%% Macros to be used within @titlepage: -+ -+\let\subtitlerm=\tenrm -+\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} -+ -+\parseargdef\title{% -+ \checkenv\titlepage -+ \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. -+% -+\parseargdef\author{% -+ \def\temp{\quotation}% -+ \ifx\thisenv\temp -+ \def\quotationauthor{#1}% printed in \Equotation. -+ \else -+ \checkenv\titlepage -+ \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi -+ {\secfonts\rmisbold \leftline{#1}}% -+ \fi - } - -+ - %%% Set up page headings and footings. - - \let\thispage=\folio -@@ -1555,7 +3134,7 @@ - \newtoks\evenfootline % footline on even pages - \newtoks\oddfootline % footline on odd pages - --% Now make Tex use those variables -+% Now make TeX use those variables - \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline - \else \the\evenheadline \fi}} - \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline -@@ -1569,43 +3148,64 @@ - % @evenfooting @thisfile|| - % @oddfooting ||@thisfile - --\def\evenheading{\parsearg\evenheadingxxx} --\def\oddheading{\parsearg\oddheadingxxx} --\def\everyheading{\parsearg\everyheadingxxx} -- --\def\evenfooting{\parsearg\evenfootingxxx} --\def\oddfooting{\parsearg\oddfootingxxx} --\def\everyfooting{\parsearg\everyfootingxxx} - --{\catcode`\@=0 % -- --\gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish} --\gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{% -+\def\evenheading{\parsearg\evenheadingxxx} -+\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} -+\def\evenheadingyyy #1\|#2\|#3\|#4\finish{% - \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - --\gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish} --\gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% -+\def\oddheading{\parsearg\oddheadingxxx} -+\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} -+\def\oddheadingyyy #1\|#2\|#3\|#4\finish{% - \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - --\gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}% -+\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% - --\gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} --\gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% -+\def\evenfooting{\parsearg\evenfootingxxx} -+\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} -+\def\evenfootingyyy #1\|#2\|#3\|#4\finish{% - \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - --\gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} --\gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% -+\def\oddfooting{\parsearg\oddfootingxxx} -+\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} -+\def\oddfootingyyy #1\|#2\|#3\|#4\finish{% - \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% - % - % Leave some space for the footline. Hopefully ok to assume - % @evenfooting will not be used by itself. -- \global\advance\pageheight by -\baselineskip -- \global\advance\vsize by -\baselineskip -+ \global\advance\pageheight by -12pt -+ \global\advance\vsize by -12pt - } - --\gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}} -+\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 +3219,7 @@ - - \def\headings #1 {\csname HEADINGS#1\endcsname} - --\def\HEADINGSoff{ -+\def\HEADINGSoff{% - \global\evenheadline={\hfil} \global\evenfootline={\hfil} - \global\oddheadline={\hfil} \global\oddfootline={\hfil}} - \HEADINGSoff -@@ -1628,7 +3228,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. --\def\HEADINGSdouble{ -+\def\HEADINGSdouble{% - \global\pageno=1 - \global\evenfootline={\hfil} - \global\oddfootline={\hfil} -@@ -1640,7 +3240,7 @@ - - % For single-sided printing, chapter title goes across top left of page, - % page number on top right. --\def\HEADINGSsingle{ -+\def\HEADINGSsingle{% - \global\pageno=1 - \global\evenfootline={\hfil} - \global\oddfootline={\hfil} -@@ -1670,7 +3270,10 @@ - } - - % Subroutines used in generating headings --% Produces Day Month Year style of output. -+% This produces Day Month Year style of output. -+% Only define if not already defined, in case a txi-??.tex file has set -+% up a different format (e.g., txi-cs.tex does this). -+\ifx\today\undefined - \def\today{% - \number\day\space - \ifcase\month -@@ -1679,16 +3282,16 @@ - \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec - \fi - \space\number\year} -+\fi - - % @settitle line... specifies the title of the document, for headings. - % It generates no output of its own. - \def\thistitle{\putwordNoTitle} --\def\settitle{\parsearg\settitlezzz} --\def\settitlezzz #1{\gdef\thistitle{#1}} -+\def\settitle{\parsearg{\gdef\thistitle}} - - - \message{tables,} --% Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x). -+% Tables -- @table, @ftable, @vtable, @item(x). - - % default indentation of table text - \newdimen\tableindent \tableindent=.8in -@@ -1700,7 +3303,7 @@ - % used internally for \itemindent minus \itemmargin - \newdimen\itemmax - --% Note @table, @vtable, and @vtable define @item, @itemx, etc., with -+% Note @table, @ftable, and @vtable define @item, @itemx, etc., with - % these defs. - % They also define \itemindex - % to index the item name in whatever manner is desired (perhaps none). -@@ -1712,22 +3315,10 @@ - \def\internalBitem{\smallbreak \parsearg\itemzzz} - \def\internalBitemx{\itemxpar \parsearg\itemzzz} - --\def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz} --\def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz} -- --\def\internalBkitem{\smallbreak \parsearg\kitemzzz} --\def\internalBkitemx{\itemxpar \parsearg\kitemzzz} -- --\def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}% -- \itemzzz {#1}} -- --\def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}% -- \itemzzz {#1}} -- - \def\itemzzz #1{\begingroup % - \advance\hsize by -\rightskip - \advance\hsize by -\tableindent -- \setbox0=\hbox{\itemfont{#1}}% -+ \setbox0=\hbox{\itemindicate{#1}}% - \itemindex{#1}% - \nobreak % This prevents a break before @itemx. - % -@@ -1751,10 +3342,14 @@ - % \parskip glue -- logically it's part of the @item we just started. - \nobreak \vskip-\parskip - % -- % Stop a page break at the \parskip glue coming up. Unfortunately -- % we can't prevent a possible page break at the following -- % \baselineskip glue. -- \nobreak -+ % Stop a page break at the \parskip glue coming up. However, if -+ % what follows is an environment such as @example, there will be no -+ % \parskip glue; then the negative vskip we just inserted would -+ % 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 +3368,116 @@ - \fi - } - --\def\item{\errmessage{@item while not in a table}} --\def\itemx{\errmessage{@itemx while not in a table}} --\def\kitem{\errmessage{@kitem while not in a table}} --\def\kitemx{\errmessage{@kitemx while not in a table}} --\def\xitem{\errmessage{@xitem while not in a table}} --\def\xitemx{\errmessage{@xitemx while not in a table}} -- --% Contains a kludge to get @end[description] to work. --\def\description{\tablez{\dontindex}{1}{}{}{}{}} -+\def\item{\errmessage{@item while not in a list environment}} -+\def\itemx{\errmessage{@itemx while not in a list environment}} - - % @table, @ftable, @vtable. --\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex} --{\obeylines\obeyspaces% --\gdef\tablex #1^^M{% --\tabley\dontindex#1 \endtabley}} -- --\def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex} --{\obeylines\obeyspaces% --\gdef\ftablex #1^^M{% --\tabley\fnitemindex#1 \endtabley --\def\Eftable{\endgraf\afterenvbreak\endgroup}% --\let\Etable=\relax}} -- --\def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex} --{\obeylines\obeyspaces% --\gdef\vtablex #1^^M{% --\tabley\vritemindex#1 \endtabley --\def\Evtable{\endgraf\afterenvbreak\endgroup}% --\let\Etable=\relax}} -- --\def\dontindex #1{} --\def\fnitemindex #1{\doind {fn}{\code{#1}}}% --\def\vritemindex #1{\doind {vr}{\code{#1}}}% -- --{\obeyspaces % --\gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup% --\tablez{#1}{#2}{#3}{#4}{#5}{#6}}} -- --\def\tablez #1#2#3#4#5#6{% --\aboveenvbreak % --\begingroup % --\def\Edescription{\Etable}% Necessary kludge. --\let\itemindex=#1% --\ifnum 0#3>0 \advance \leftskip by #3\mil \fi % --\ifnum 0#4>0 \tableindent=#4\mil \fi % --\ifnum 0#5>0 \advance \rightskip by #5\mil \fi % --\def\itemfont{#2}% --\itemmax=\tableindent % --\advance \itemmax by -\itemmargin % --\advance \leftskip by \tableindent % --\exdentamount=\tableindent --\parindent = 0pt --\parskip = \smallskipamount --\ifdim \parskip=0pt \parskip=2pt \fi% --\def\Etable{\endgraf\afterenvbreak\endgroup}% --\let\item = \internalBitem % --\let\itemx = \internalBitemx % --\let\kitem = \internalBkitem % --\let\kitemx = \internalBkitemx % --\let\xitem = \internalBxitem % --\let\xitemx = \internalBxitemx % -+\envdef\table{% -+ \let\itemindex\gobble -+ \tablecheck{table}% -+} -+\envdef\ftable{% -+ \def\itemindex ##1{\doind {fn}{\code{##1}}}% -+ \tablecheck{ftable}% -+} -+\envdef\vtable{% -+ \def\itemindex ##1{\doind {vr}{\code{##1}}}% -+ \tablecheck{vtable}% - } -+\def\tablecheck#1{% -+ \ifnum \the\catcode`\^^M=\active -+ \endgroup -+ \errmessage{This command won't work in this context; perhaps the problem is -+ that we are \inenvironment\thisenv}% -+ \def\next{\doignore{#1}}% -+ \else -+ \let\next\tablex -+ \fi -+ \next -+} -+\def\tablex#1{% -+ \def\itemindicate{#1}% -+ \parsearg\tabley -+} -+\def\tabley#1{% -+ {% -+ \makevalueexpandable -+ \edef\temp{\noexpand\tablez #1\space\space\space}% -+ \expandafter -+ }\temp \endtablez -+} -+\def\tablez #1 #2 #3 #4\endtablez{% -+ \aboveenvbreak -+ \ifnum 0#1>0 \advance \leftskip by #1\mil \fi -+ \ifnum 0#2>0 \tableindent=#2\mil \fi -+ \ifnum 0#3>0 \advance \rightskip by #3\mil \fi -+ \itemmax=\tableindent -+ \advance \itemmax by -\itemmargin -+ \advance \leftskip by \tableindent -+ \exdentamount=\tableindent -+ \parindent = 0pt -+ \parskip = \smallskipamount -+ \ifdim \parskip=0pt \parskip=2pt \fi -+ \let\item = \internalBitem -+ \let\itemx = \internalBitemx -+} -+\def\Etable{\endgraf\afterenvbreak} -+\let\Eftable\Etable -+\let\Evtable\Etable -+\let\Eitemize\Etable -+\let\Eenumerate\Etable - - % This is the counter used by @enumerate, which is really @itemize - - \newcount \itemno - --\def\itemize{\parsearg\itemizezzz} -+\envdef\itemize{\parsearg\doitemize} - --\def\itemizezzz #1{% -- \begingroup % ended by the @end itemize -- \itemizey {#1}{\Eitemize} -+\def\doitemize#1{% -+ \aboveenvbreak -+ \itemmax=\itemindent -+ \advance\itemmax by -\itemmargin -+ \advance\leftskip by \itemindent -+ \exdentamount=\itemindent -+ \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 - } - --\def\itemizey #1#2{% --\aboveenvbreak % --\itemmax=\itemindent % --\advance \itemmax by -\itemmargin % --\advance \leftskip by \itemindent % --\exdentamount=\itemindent --\parindent = 0pt % --\parskip = \smallskipamount % --\ifdim \parskip=0pt \parskip=2pt \fi% --\def#2{\endgraf\afterenvbreak\endgroup}% --\def\itemcontents{#1}% --\let\item=\itemizeitem} -- --% Set sfcode to normal for the chars that usually have another value. --% These are `.?!:;,' --\def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000 -- \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 } -+% Definition of @item while inside @itemize and @enumerate. -+% -+\def\itemizeitem{% -+ \advance\itemno by 1 % for enumerations -+ {\let\par=\endgraf \smallbreak}% reasonable place to break -+ {% -+ % If the document has an @itemize directly after a section title, a -+ % \nobreak will be last on the list, and \sectionheading will have -+ % done a \vskip-\parskip. In that case, we don't want to zero -+ % parskip, or the item text will crash with the heading. On the -+ % other hand, when there is normal text preceding the item (as there -+ % usually is), we do want to zero parskip, or there would be too much -+ % space. In that case, we won't have a \nobreak before. At least -+ % that's the theory. -+ \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 +3488,8 @@ - % or number, to specify the first label in the enumerated list. No - % argument is the same as `1'. - % --\def\enumerate{\parsearg\enumeratezzz} --\def\enumeratezzz #1{\enumeratey #1 \endenumeratey} -+\envparseargdef\enumerate{\enumeratey #1 \endenumeratey} - \def\enumeratey #1 #2\endenumeratey{% -- \begingroup % ended by the @end enumerate -- % - % If we were given no argument, pretend we were given `1'. - \def\thearg{#1}% - \ifx\thearg\empty \def\thearg{1}\fi -@@ -1949,13 +3560,13 @@ - }% - } - --% Call itemizey, adding a period to the first argument and supplying the -+% Call \doitemize, adding a period to the first argument and supplying the - % common last two arguments. Also subtract one from the initial value in - % \itemno, since @item increments \itemno. - % - \def\startenumeration#1{% - \advance\itemno by -1 -- \itemizey{#1.}\Eenumerate\flushcr -+ \doitemize{#1.}\flushcr - } - - % @alphaenumerate and @capsenumerate are abbreviations for giving an arg -@@ -1966,16 +3577,6 @@ - \def\Ealphaenumerate{\Eenumerate} - \def\Ecapsenumerate{\Eenumerate} - --% Definition of @item while inside @itemize. -- --\def\itemizeitem{% --\advance\itemno by 1 --{\let\par=\endgraf \smallbreak}% --\ifhmode \errmessage{In hmode at itemizeitem}\fi --{\parskip=0in \hskip 0pt --\hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% --\vadjust{\penalty 1200}}% --\flushcr} - - % @multitable macros - % Amy Hendrickson, 8/18/94, 3/6/96 -@@ -2002,24 +3603,14 @@ - % @multitable {Column 1 template} {Column 2 template} {Column 3 template} - % @item ... - % using the widest term desired in each column. --% --% For those who want to use more than one line's worth of words in --% the preamble, break the line within one argument and it --% will parse correctly, i.e., --% --% @multitable {Column 1 template} {Column 2 template} {Column 3 --% template} --% Not: --% @multitable {Column 1 template} {Column 2 template} --% {Column 3 template} - - % Each new table line starts with @item, each subsequent new column - % starts with @tab. Empty columns may be produced by supplying @tab's - % with nothing between them for as many times as empty columns are needed, - % ie, @tab@tab@tab will produce two empty columns. - --% @item, @tab, @multitable or @end multitable do not need to be on their --% own lines, but it will not hurt if they are. -+% @item, @tab do not need to be on their own lines, but it will not hurt -+% if they are. - - % Sample multitable: - -@@ -2063,13 +3654,12 @@ - \def\xcolumnfractions{\columnfractions} - \newif\ifsetpercent - --% #1 is the part of the @columnfraction before the decimal point, which --% is presumably either 0 or the empty string (but we don't check, we --% just throw it away). #2 is the decimal part, which we use as the --% percent of \hsize for this column. --\def\pickupwholefraction#1.#2 {% -+% #1 is the @columnfraction, usually a decimal number like .5, but might -+% be just 1. We just use it, whatever it is. -+% -+\def\pickupwholefraction#1 {% - \global\advance\colcount by 1 -- \expandafter\xdef\csname col\the\colcount\endcsname{.#2\hsize}% -+ \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% - \setuptable - } - -@@ -2086,8 +3676,8 @@ - \let\go\pickupwholefraction - \else - \global\advance\colcount by 1 -- \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator; -- % typically that is always in the input, anyway. -+ \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a -+ % separator; typically that is always in the input, anyway. - \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% - \fi - \fi -@@ -2102,18 +3692,40 @@ - \go - } - --% This used to have \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. --% --karl, nathan@acm.org, 20apr99. --\def\tab{&} -+% multitable-only commands. -+% -+% @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. \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 again encounter the problem the 1sp was intended to solve. -+% --karl, nathan@acm.org, 20apr99. -+\def\tab{\checkenv\multitable &\the\everytab}% - - % @multitable ... @end multitable definitions: - % --\def\multitable{\parsearg\dotable} --\def\dotable#1{\bgroup -+\newtoks\everytab % insert after every tab. -+% -+\envdef\multitable{% - \vskip\parskip -- \let\item\crcr -+ \startsavinginserts -+ % -+ % @item within a multitable starts a normal row. -+ % We use \def instead of \let so that if one of the multitable entries -+ % contains an @itemize, we don't choke on the \item (seen as \crcr aka -+ % \endtemplate) expanding \doitemize. -+ \def\item{\crcr}% -+ % - \tolerance=9500 - \hbadness=9500 - \setmultitablespacing -@@ -2121,81 +3733,93 @@ - \parindent=\multitableparindent - \overfullrule=0pt - \global\colcount=0 -- \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}% - % -+ \everycr = {% -+ \noalign{% -+ \global\everytab={}% -+ \global\colcount=0 % Reset the column counter. -+ % Check for saved footnotes, etc. -+ \checkinserts -+ % Keeps underfull box messages off when table breaks over pages. -+ %\filbreak -+ % Maybe so, but it also creates really weird page breaks when the -+ % table breaks over pages. Wouldn't \vfil be better? Wait until the -+ % problem manifests itself, so it can be fixed for real --karl. -+ }% -+ }% -+ % -+ \parsearg\domultitable -+} -+\def\domultitable#1{% - % To parse everything between @multitable and @item: - \setuptable#1 \endsetuptable - % -- % \everycr will reset column counter, \colcount, at the end of -- % each line. Every column entry will cause \colcount to advance by one. -- % The table preamble -- % looks at the current \colcount to find the correct column width. -- \everycr{\noalign{% -- % -- % \filbreak%% keeps underfull box messages off when table breaks over pages. -- % Maybe so, but it also creates really weird page breaks when the table -- % breaks over pages. Wouldn't \vfil be better? Wait until the problem -- % manifests itself, so it can be fixed for real --karl. -- \global\colcount=0\relax}}% -- % - % This preamble sets up a generic column definition, which will - % be used as many times as user calls for columns. - % \vtop will set a single line and will also let text wrap and - % continue for many paragraphs if desired. -- \halign\bgroup&\global\advance\colcount by 1\relax -- \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname -- % -- % In order to keep entries from bumping into each other -- % we will add a \leftskip of \multitablecolspace to all columns after -- % the first one. -- % -- % If a template has been used, we will add \multitablecolspace -- % to the width of each template entry. -- % -- % If the user has set preamble in terms of percent of \hsize we will -- % use that dimension as the width of the column, and the \leftskip -- % will keep entries from bumping into each other. Table will start at -- % left margin and final column will justify at right margin. -- % -- % Make sure we don't inherit \rightskip from the outer environment. -- \rightskip=0pt -- \ifnum\colcount=1 -- % The first column will be indented with the surrounding text. -- \advance\hsize by\leftskip -- \else -- \ifsetpercent \else -- % If user has not set preamble in terms of percent of \hsize -- % we will advance \hsize by \multitablecolspace. -- \advance\hsize by \multitablecolspace -- \fi -- % In either case we will make \leftskip=\multitablecolspace: -- \leftskip=\multitablecolspace -- \fi -- % Ignoring space at the beginning and end avoids an occasional spurious -- % blank line, when TeX decides to break the line at the space before the -- % box from the multistrut, so the strut ends up on a line by itself. -- % For example: -- % @multitable @columnfractions .11 .89 -- % @item @code{#} -- % @tab Legal holiday which is valid in major parts of the whole country. -- % Is automatically provided with highlighting sequences respectively marking -- % characters. -- \noindent\ignorespaces##\unskip\multistrut}\cr -+ \halign\bgroup &% -+ \global\advance\colcount by 1 -+ \multistrut -+ \vtop{% -+ % Use the current \colcount to find the correct column width: -+ \hsize=\expandafter\csname col\the\colcount\endcsname -+ % -+ % In order to keep entries from bumping into each other -+ % we will add a \leftskip of \multitablecolspace to all columns after -+ % the first one. -+ % -+ % If a template has been used, we will add \multitablecolspace -+ % to the width of each template entry. -+ % -+ % If the user has set preamble in terms of percent of \hsize we will -+ % use that dimension as the width of the column, and the \leftskip -+ % will keep entries from bumping into each other. Table will start at -+ % left margin and final column will justify at right margin. -+ % -+ % Make sure we don't inherit \rightskip from the outer environment. -+ \rightskip=0pt -+ \ifnum\colcount=1 -+ % The first column will be indented with the surrounding text. -+ \advance\hsize by\leftskip -+ \else -+ \ifsetpercent \else -+ % If user has not set preamble in terms of percent of \hsize -+ % we will advance \hsize by \multitablecolspace. -+ \advance\hsize by \multitablecolspace -+ \fi -+ % In either case we will make \leftskip=\multitablecolspace: -+ \leftskip=\multitablecolspace -+ \fi -+ % Ignoring space at the beginning and end avoids an occasional spurious -+ % blank line, when TeX decides to break the line at the space before the -+ % box from the multistrut, so the strut ends up on a line by itself. -+ % For example: -+ % @multitable @columnfractions .11 .89 -+ % @item @code{#} -+ % @tab Legal holiday which is valid in major parts of the whole country. -+ % Is automatically provided with highlighting sequences respectively -+ % marking characters. -+ \noindent\ignorespaces##\unskip\multistrut -+ }\cr -+} -+\def\Emultitable{% -+ \crcr -+ \egroup % end the \halign -+ \global\setpercentfalse - } - --\def\setmultitablespacing{% test to see if user has set \multitablelinespace. --% If so, do nothing. If not, give it an appropriate dimension based on --% current baselineskip. -+\def\setmultitablespacing{% -+ \def\multistrut{\strut}% just use the standard line spacing -+ % -+ % Compute \multitablelinespace (if not defined by user) for use in -+ % \multitableparskip calculation. We used define \multistrut based on -+ % this, but (ironically) that caused the spacing to be off. -+ % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. - \ifdim\multitablelinespace=0pt - \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip - \global\advance\multitablelinespace by-\ht0 --%% strut to put in table in case some entry doesn't have descenders, --%% to keep lines equally spaced --\let\multistrut = \strut --\else --%% FIXME: what is \box0 supposed to be? --\gdef\multistrut{\vrule height\multitablelinespace depth\dp0 --width0pt\relax} \fi -+\fi - %% 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 +3836,178 @@ - - - \message{conditionals,} --% Prevent errors for section commands. --% Used in @ignore and in failing conditionals. --\def\ignoresections{% -- \let\chapter=\relax -- \let\unnumbered=\relax -- \let\top=\relax -- \let\unnumberedsec=\relax -- \let\unnumberedsection=\relax -- \let\unnumberedsubsec=\relax -- \let\unnumberedsubsection=\relax -- \let\unnumberedsubsubsec=\relax -- \let\unnumberedsubsubsection=\relax -- \let\section=\relax -- \let\subsec=\relax -- \let\subsubsec=\relax -- \let\subsection=\relax -- \let\subsubsection=\relax -- \let\appendix=\relax -- \let\appendixsec=\relax -- \let\appendixsection=\relax -- \let\appendixsubsec=\relax -- \let\appendixsubsection=\relax -- \let\appendixsubsubsec=\relax -- \let\appendixsubsubsection=\relax -- \let\contents=\relax -- \let\smallbook=\relax -- \let\titlepage=\relax --} - --% Used in nested conditionals, where we have to parse the Texinfo source --% and so want to turn off most commands, in case they are used --% incorrectly. -+% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, -+% @ifnotxml always succeed. They currently do nothing; we don't -+% attempt to check whether the conditionals are properly nested. But we -+% have to remember that they are conditionals, so that @end doesn't -+% attempt to close an environment group. - % --\def\ignoremorecommands{% -- \let\defcodeindex = \relax -- \let\defcv = \relax -- \let\deffn = \relax -- \let\deffnx = \relax -- \let\defindex = \relax -- \let\defivar = \relax -- \let\defmac = \relax -- \let\defmethod = \relax -- \let\defop = \relax -- \let\defopt = \relax -- \let\defspec = \relax -- \let\deftp = \relax -- \let\deftypefn = \relax -- \let\deftypefun = \relax -- \let\deftypeivar = \relax -- \let\deftypeop = \relax -- \let\deftypevar = \relax -- \let\deftypevr = \relax -- \let\defun = \relax -- \let\defvar = \relax -- \let\defvr = \relax -- \let\ref = \relax -- \let\xref = \relax -- \let\printindex = \relax -- \let\pxref = \relax -- \let\settitle = \relax -- \let\setchapternewpage = \relax -- \let\setchapterstyle = \relax -- \let\everyheading = \relax -- \let\evenheading = \relax -- \let\oddheading = \relax -- \let\everyfooting = \relax -- \let\evenfooting = \relax -- \let\oddfooting = \relax -- \let\headings = \relax -- \let\include = \relax -- \let\lowersections = \relax -- \let\down = \relax -- \let\raisesections = \relax -- \let\up = \relax -- \let\set = \relax -- \let\clear = \relax -- \let\item = \relax -+\def\makecond#1{% -+ \expandafter\let\csname #1\endcsname = \relax -+ \expandafter\let\csname iscond.#1\endcsname = 1 - } -+\makecond{iftex} -+\makecond{ifnotdocbook} -+\makecond{ifnothtml} -+\makecond{ifnotinfo} -+\makecond{ifnotplaintext} -+\makecond{ifnotxml} - --% Ignore @ignore ... @end ignore. --% --\def\ignore{\doignore{ignore}} -- --% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text. -+% Ignore @ignore, @ifhtml, @ifinfo, and the like. - % --\def\ifinfo{\doignore{ifinfo}} -+\def\direntry{\doignore{direntry}} -+\def\documentdescription{\doignore{documentdescription}} -+\def\docbook{\doignore{docbook}} -+\def\html{\doignore{html}} -+\def\ifdocbook{\doignore{ifdocbook}} - \def\ifhtml{\doignore{ifhtml}} -+\def\ifinfo{\doignore{ifinfo}} - \def\ifnottex{\doignore{ifnottex}} --\def\html{\doignore{html}} -+\def\ifplaintext{\doignore{ifplaintext}} -+\def\ifxml{\doignore{ifxml}} -+\def\ignore{\doignore{ignore}} - \def\menu{\doignore{menu}} --\def\direntry{\doignore{direntry}} -- --% @dircategory CATEGORY -- specify a category of the dir file --% which this file should belong to. Ignore this in TeX. --\let\dircategory = \comment -+\def\xml{\doignore{xml}} - --% Ignore text until a line `@end #1'. -+% Ignore text until a line `@end #1', keeping track of nested conditionals. - % -+% A count to remember the depth of nesting. -+\newcount\doignorecount -+ - \def\doignore#1{\begingroup -- % Don't complain about control sequences we have declared \outer. -- \ignoresections -- % -- % Define a command to swallow text until we reach `@end #1'. -- % This @ is a catcode 12 token (that is the normal catcode of @ in -- % this texinfo.tex file). We change the catcode of @ below to match. -- \long\def\doignoretext##1@end #1{\enddoignore}% -+ % Scan in ``verbatim'' mode: -+ \obeylines -+ \catcode`\@ = \other -+ \catcode`\{ = \other -+ \catcode`\} = \other - % - % Make sure that spaces turn into tokens that match what \doignoretext wants. -- \catcode32 = 10 -- % -- % Ignore braces, too, so mismatched braces don't cause trouble. -- \catcode`\{ = 9 -- \catcode`\} = 9 -- % -- % We must not have @c interpreted as a control sequence. -- \catcode`\@ = 12 -+ \spaceisspace - % -- % Make the letter c a comment character so that the rest of the line -- % will be ignored. This way, the document can have (for example) -- % @c @end ifinfo -- % and the @end ifinfo will be properly ignored. -- % (We've just changed @ to catcode 12.) -- \catcode`\c = 14 -+ % Count number of #1's that we've seen. -+ \doignorecount = 0 - % -- % And now expand that command. -- \doignoretext --} -- --% What we do to finish off ignored text. --% --\def\enddoignore{\endgroup\ignorespaces}% -- --\newif\ifwarnedobs\warnedobsfalse --\def\obstexwarn{% -- \ifwarnedobs\relax\else -- % We need to warn folks that they may have trouble with TeX 3.0. -- % This uses \immediate\write16 rather than \message to get newlines. -- \immediate\write16{} -- \immediate\write16{WARNING: for users of Unix TeX 3.0!} -- \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).} -- \immediate\write16{If you are running another version of TeX, relax.} -- \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} -- \immediate\write16{ Then upgrade your TeX installation if you can.} -- \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)} -- \immediate\write16{If you are stuck with version 3.0, run the} -- \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} -- \immediate\write16{ to use a workaround.} -- \immediate\write16{} -- \global\warnedobstrue -- \fi -+ % Swallow text until we reach the matching `@end #1'. -+ \dodoignore{#1}% - } - --% **In TeX 3.0, setting text in \nullfont hangs tex. For a --% workaround (which requires the file ``dummy.tfm'' to be installed), --% uncomment the following line: --%%%%%\font\nullfont=dummy\let\obstexwarn=\relax -- --% Ignore text, except that we keep track of conditional commands for --% purposes of nesting, up to an `@end #1' command. --% --\def\nestedignore#1{% -- \obstexwarn -- % We must actually expand the ignored text to look for the @end -- % command, so that nested ignore constructs work. Thus, we put the -- % text into a \vbox and then do nothing with the result. To minimize -- % the change of memory overflow, we follow the approach outlined on -- % page 401 of the TeXbook: make the current font be a dummy font. -+{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. -+ \obeylines % - % -- \setbox0 = \vbox\bgroup -- % Don't complain about control sequences we have declared \outer. -- \ignoresections -- % -- % Define `@end #1' to end the box, which will in turn undefine the -- % @end command again. -- \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}% -- % -- % We are going to be parsing Texinfo commands. Most cause no -- % trouble when they are used incorrectly, but some commands do -- % complicated argument parsing or otherwise get confused, so we -- % undefine them. -- % -- % We can't do anything about stray @-signs, unfortunately; -- % they'll produce `undefined control sequence' errors. -- \ignoremorecommands -- % -- % Set the current font to be \nullfont, a TeX primitive, and define -- % all the font commands to also use \nullfont. We don't use -- % dummy.tfm, as suggested in the TeXbook, because not all sites -- % might have that installed. Therefore, math mode will still -- % produce output, but that should be an extremely small amount of -- % stuff compared to the main input. -- % -- \nullfont -- \let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont -- \let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont -- \let\tensf=\nullfont -- % Similarly for index fonts (mostly for their use in smallexample). -- \let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont -- \let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont -- \let\smallsf=\nullfont -- % -- % Don't complain when characters are missing from the fonts. -- \tracinglostchars = 0 -- % -- % Don't bother to do space factor calculations. -- \frenchspacing -+ \gdef\dodoignore#1{% -+ % #1 contains the command name as a string, e.g., `ifinfo'. - % -- % Don't report underfull hboxes. -- \hbadness = 10000 -+ % Define a command to find the next `@end #1'. -+ \long\def\doignoretext##1^^M@end #1{% -+ \doignoretextyyy##1^^M@#1\_STOP_}% - % -- % Do minimal line-breaking. -- \pretolerance = 10000 -+ % And this command to find another #1 command, at the beginning of a -+ % line. (Otherwise, we would consider a line `@c @ifset', for -+ % example, to count as an @ifset for nesting.) -+ \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% - % -- % Do not execute instructions in @tex -- \def\tex{\doignore{tex}}% -- % Do not execute macro definitions. -- % `c' is a comment character, so the word `macro' will get cut off. -- \def\macro{\doignore{ma}}% -+ % And now expand that command. -+ \doignoretext ^^M% -+ }% -+} -+ -+\def\doignoreyyy#1{% -+ \def\temp{#1}% -+ \ifx\temp\empty % Nothing found. -+ \let\next\doignoretextzzz -+ \else % Found a nested condition, ... -+ \advance\doignorecount by 1 -+ \let\next\doignoretextyyy % ..., look for another. -+ % If we're here, #1 ends with ^^M\ifinfo (for example). -+ \fi -+ \next #1% the token \_STOP_ is present just after this macro. - } - -+% We have to swallow the remaining "\_STOP_". -+% -+\def\doignoretextzzz#1{% -+ \ifnum\doignorecount = 0 % We have just found the outermost @end. -+ \let\next\enddoignore -+ \else % Still inside a nested condition. -+ \advance\doignorecount by -1 -+ \let\next\doignoretext % Look for the next @end. -+ \fi -+ \next -+} -+ -+% Finish off ignored text. -+{ \obeylines% -+ % Ignore anything after the last `@end #1'; this matters in verbatim -+ % 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. - % - % Since we want to separate VAR from REST-OF-LINE (which might be - % empty), we can't just use \parsearg; we have to insert a space of our - % own to delimit the rest of the line, and then take it out again if we --% didn't need it. Make sure the catcode of space is correct to avoid --% losing inside @example, for instance. -+% didn't need it. -+% We rely on the fact that \parsearg sets \catcode`\ =10. - % --\def\set{\begingroup\catcode` =10 -- \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. -- \parsearg\setxxx} --\def\setxxx#1{\setyyy#1 \endsetyyy} -+\parseargdef\set{\setyyy#1 \endsetyyy} - \def\setyyy#1 #2\endsetyyy{% -- \def\temp{#2}% -- \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty -- \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. -- \fi -- \endgroup -+ {% -+ \makevalueexpandable -+ \def\temp{#2}% -+ \edef\next{\gdef\makecsname{SET#1}}% -+ \ifx\temp\empty -+ \next{}% -+ \else -+ \setzzz#2\endsetzzz -+ \fi -+ }% - } --% Can't use \xdef to pre-expand #2 and save some time, since \temp or --% \next or other control sequences that we've defined might get us into --% an infinite loop. Consider `@set foo @cite{bar}'. --\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}} -+% Remove the trailing space \setxxx inserted. -+\def\setzzz#1 \endsetzzz{\next{#1}} - - % @clear VAR clears (i.e., unsets) the variable VAR. - % --\def\clear{\parsearg\clearxxx} --\def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax} -+\parseargdef\clear{% -+ {% -+ \makevalueexpandable -+ \global\expandafter\let\csname SET#1\endcsname=\relax -+ }% -+} - - % @value{foo} gets the text saved in variable foo. -+\def\value{\begingroup\makevalueexpandable\valuexxx} -+\def\valuexxx#1{\expandablevalue{#1}\endgroup} - { -- \catcode`\_ = \active -+ \catcode`\- = \active \catcode`\_ = \active - % -- % We might end up with active _ or - characters in the argument if -- % we're called from @code, as @code{@value{foo-bar_}}. So \let any -- % such active characters to their normal equivalents. -- \gdef\value{\begingroup -- \catcode`\-=12 \catcode`\_=12 -- \indexbreaks \let_\normalunderscore -- \valuexxx} -+ \gdef\makevalueexpandable{% -+ \let\value = \expandablevalue -+ % We don't want these characters active, ... -+ \catcode`\-=\other \catcode`\_=\other -+ % ..., but we might end up with active ones in the argument if -+ % we're called from @code, as @code{@value{foo-bar_}}, though. -+ % So \let them to their normal equivalents. -+ \let-\realdash \let_\normalunderscore -+ } - } --\def\valuexxx#1{\expandablevalue{#1}\endgroup} - - % We have this subroutine so that we can handle at least some @value's --% properly in indexes (we \let\value to this in \indexdummies). Ones --% whose names contain - or _ still won't work, but we can't do anything --% about that. The command has to be fully expandable, since the result --% winds up in the index file. This means that if the variable's value --% contains other Texinfo commands, it's almost certain it will fail --% (although perhaps we could fix that with sufficient work to do a --% one-level expansion on the result, instead of complete). -+% properly in indexes (we call \makevalueexpandable in \indexdummies). -+% The command has to be fully expandable (if the variable is set), since -+% the result winds up in the index file. This means that if the -+% variable's value contains other Texinfo commands, it's almost certain -+% it will fail (although perhaps we could fix that with sufficient work -+% to do a one-level expansion on the result, instead of complete). - % - \def\expandablevalue#1{% - \expandafter\ifx\csname SET#1\endcsname\relax - {[No value for ``#1'']}% -+ \message{Variable `#1', used in @value, is not set.}% - \else - \csname SET#1\endcsname - \fi -@@ -2496,66 +4016,36 @@ - % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined - % with @set. - % --\def\ifset{\parsearg\ifsetxxx} --\def\ifsetxxx #1{% -- \expandafter\ifx\csname SET#1\endcsname\relax -- \expandafter\ifsetfail -- \else -- \expandafter\ifsetsucceed -- \fi -+% To get special treatment of `@end ifset,' call \makeond and the redefine. -+% -+\makecond{ifset} -+\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} -+\def\doifset#1#2{% -+ {% -+ \makevalueexpandable -+ \let\next=\empty -+ \expandafter\ifx\csname SET#2\endcsname\relax -+ #1% If not set, redefine \next. -+ \fi -+ \expandafter -+ }\next - } --\def\ifsetsucceed{\conditionalsucceed{ifset}} --\def\ifsetfail{\nestedignore{ifset}} --\defineunmatchedend{ifset} -+\def\ifsetfail{\doignore{ifset}} - - % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been - % defined with @set, or has been undefined with @clear. - % --\def\ifclear{\parsearg\ifclearxxx} --\def\ifclearxxx #1{% -- \expandafter\ifx\csname SET#1\endcsname\relax -- \expandafter\ifclearsucceed -- \else -- \expandafter\ifclearfail -- \fi --} --\def\ifclearsucceed{\conditionalsucceed{ifclear}} --\def\ifclearfail{\nestedignore{ifclear}} --\defineunmatchedend{ifclear} -- --% @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text --% following, through the first @end iftex (etc.). Make `@end iftex' --% (etc.) valid only after an @iftex. --% --\def\iftex{\conditionalsucceed{iftex}} --\def\ifnothtml{\conditionalsucceed{ifnothtml}} --\def\ifnotinfo{\conditionalsucceed{ifnotinfo}} --\defineunmatchedend{iftex} --\defineunmatchedend{ifnothtml} --\defineunmatchedend{ifnotinfo} -- --% We can't just want to start a group at @iftex (for example) and end it --% at @end iftex, since then @set commands inside the conditional have no --% effect (they'd get reverted at the end of the group). So we must --% define \Eiftex to redefine itself to be its previous value. (We can't --% just define it to fail again with an ``unmatched end'' error, since --% the @ifset might be nested.) -+% The `\else' inside the `\doifset' parameter is a trick to reuse the -+% above code: if the variable is not set, do nothing, if it is set, -+% then redefine \next to \ifclearfail. - % --\def\conditionalsucceed#1{% -- \edef\temp{% -- % Remember the current value of \E#1. -- \let\nece{prevE#1} = \nece{E#1}% -- % -- % At the `@end #1', redefine \E#1 to be its previous value. -- \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}% -- }% -- \temp --} -+\makecond{ifclear} -+\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} -+\def\ifclearfail{\doignore{ifclear}} - --% We need to expand lots of \csname's, but we don't want to expand the --% control sequences after we've constructed them. --% --\def\nece#1{\expandafter\noexpand\csname#1\endcsname} -+% @dircategory CATEGORY -- specify a category of the dir file -+% which this file should belong to. Ignore this in TeX. -+\let\dircategory=\comment - - % @defininfoenclose. - \let\definfoenclose=\comment -@@ -2565,9 +4055,8 @@ - % Index generation facilities - - % Define \newwrite to be identical to plain tex's \newwrite --% except not \outer, so it can be used within \newindex. --{\catcode`\@=11 --\gdef\newwrite{\alloc@7\write\chardef\sixt@@n}} -+% except not \outer, so it can be used within macros and \if's. -+\edef\newwrite{\makecsname{ptexnewwrite}} - - % \newindex {foo} defines an index named foo. - % It automatically defines \fooindex such that -@@ -2587,42 +4076,48 @@ - } - - % @defindex foo == \newindex{foo} -- -+% - \def\defindex{\parsearg\newindex} - - % Define @defcodeindex, like @defindex except put all entries in @code. -- -+% -+\def\defcodeindex{\parsearg\newcodeindex} -+% - \def\newcodeindex#1{% - \iflinks - \expandafter\newwrite \csname#1indfile\endcsname - \openout \csname#1indfile\endcsname \jobname.#1 - \fi - \expandafter\xdef\csname#1index\endcsname{% -- \noexpand\docodeindex{#1}} -+ \noexpand\docodeindex{#1}}% - } - --\def\defcodeindex{\parsearg\newcodeindex} - - % @synindex foo bar makes index foo feed into index bar. - % Do this instead of @defindex foo if you don't want it as a separate index. --% The \closeout helps reduce unnecessary open files; the limit on the --% Acorn RISC OS is a mere 16 files. --\def\synindex#1 #2 {% -- \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname -- \expandafter\closeout\csname#1indfile\endcsname -- \expandafter\let\csname#1indfile\endcsname=\synindexfoo -- \expandafter\xdef\csname#1index\endcsname{% define \xxxindex -- \noexpand\doindex{#2}}% --} -- -+% - % @syncodeindex foo bar similar, but put all entries made for index foo - % inside @code. --\def\syncodeindex#1 #2 {% -- \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname -- \expandafter\closeout\csname#1indfile\endcsname -- \expandafter\let\csname#1indfile\endcsname=\synindexfoo -- \expandafter\xdef\csname#1index\endcsname{% define \xxxindex -- \noexpand\docodeindex{#2}}% -+% -+\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} -+\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} -+ -+% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), -+% #3 the target index (bar). -+\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 \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 -+ \fi -+ % redefine \fooindfile: -+ \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname -+ \expandafter\let\csname#2indfile\endcsname=\temp -+ % redefine \fooindex: -+ \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% - } - - % Define \doindex, the driver for all \fooindex macros. -@@ -2642,265 +4137,456 @@ - \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} - \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} - --\def\indexdummies{% --\def\ { }% --% Take care of the plain tex accent commands. --\def\"{\realbackslash "}% --\def\`{\realbackslash `}% --\def\'{\realbackslash '}% --\def\^{\realbackslash ^}% --\def\~{\realbackslash ~}% --\def\={\realbackslash =}% --\def\b{\realbackslash b}% --\def\c{\realbackslash c}% --\def\d{\realbackslash d}% --\def\u{\realbackslash u}% --\def\v{\realbackslash v}% --\def\H{\realbackslash H}% --% Take care of the plain tex special European modified letters. --\def\oe{\realbackslash oe}% --\def\ae{\realbackslash ae}% --\def\aa{\realbackslash aa}% --\def\OE{\realbackslash OE}% --\def\AE{\realbackslash AE}% --\def\AA{\realbackslash AA}% --\def\o{\realbackslash o}% --\def\O{\realbackslash O}% --\def\l{\realbackslash l}% --\def\L{\realbackslash L}% --\def\ss{\realbackslash ss}% --% Take care of texinfo commands likely to appear in an index entry. --% (Must be a way to avoid doing expansion at all, and thus not have to --% laboriously list every single command here.) --\def\@{@}% will be @@ when we switch to @ as escape char. --% Need these in case \tex is in effect and \{ is a \delimiter again. --% But can't use \lbracecmd and \rbracecmd because texindex assumes --% braces and backslashes are used only as delimiters. --\let\{ = \mylbrace --\let\} = \myrbrace --\def\_{{\realbackslash _}}% --\def\w{\realbackslash w }% --\def\bf{\realbackslash bf }% --%\def\rm{\realbackslash rm }% --\def\sl{\realbackslash sl }% --\def\sf{\realbackslash sf}% --\def\tt{\realbackslash tt}% --\def\gtr{\realbackslash gtr}% --\def\less{\realbackslash less}% --\def\hat{\realbackslash hat}% --\def\TeX{\realbackslash TeX}% --\def\dots{\realbackslash dots }% --\def\result{\realbackslash result}% --\def\equiv{\realbackslash equiv}% --\def\expansion{\realbackslash expansion}% --\def\print{\realbackslash print}% --\def\error{\realbackslash error}% --\def\point{\realbackslash point}% --\def\copyright{\realbackslash copyright}% --\def\tclose##1{\realbackslash tclose {##1}}% --\def\code##1{\realbackslash code {##1}}% --\def\uref##1{\realbackslash uref {##1}}% --\def\url##1{\realbackslash url {##1}}% --\def\env##1{\realbackslash env {##1}}% --\def\command##1{\realbackslash command {##1}}% --\def\option##1{\realbackslash option {##1}}% --\def\dotless##1{\realbackslash dotless {##1}}% --\def\samp##1{\realbackslash samp {##1}}% --\def\,##1{\realbackslash ,{##1}}% --\def\t##1{\realbackslash t {##1}}% --\def\r##1{\realbackslash r {##1}}% --\def\i##1{\realbackslash i {##1}}% --\def\b##1{\realbackslash b {##1}}% --\def\sc##1{\realbackslash sc {##1}}% --\def\cite##1{\realbackslash cite {##1}}% --\def\key##1{\realbackslash key {##1}}% --\def\file##1{\realbackslash file {##1}}% --\def\var##1{\realbackslash var {##1}}% --\def\kbd##1{\realbackslash kbd {##1}}% --\def\dfn##1{\realbackslash dfn {##1}}% --\def\emph##1{\realbackslash emph {##1}}% --\def\acronym##1{\realbackslash acronym {##1}}% -+% Take care of Texinfo commands that can appear in an index entry. -+% Since there are some commands we want to expand, and others we don't, -+% we have to laboriously prevent expansion for those that we don't. - % --% Handle some cases of @value -- where the variable name does not --% contain - or _, and the value does not contain any --% (non-fully-expandable) commands. --\let\value = \expandablevalue -+\def\indexdummies{% -+ \escapechar = `\\ % use backslash in output files. -+ \def\@{@}% change to @@ when we switch to @ as escape char in index files. -+ \def\ {\realbackslash\space }% -+ % -+ % Need these in case \tex is in effect and \{ is a \delimiter again. -+ % But can't use \lbracecmd and \rbracecmd because texindex assumes -+ % braces and backslashes are used only as delimiters. -+ \let\{ = \mylbrace -+ \let\} = \myrbrace -+ % -+ % I don't entirely understand this, but when an index entry is -+ % generated from a macro call, the \endinput which \scanmacro inserts -+ % causes processing to be prematurely terminated. This is, -+ % apparently, because \indexsorttmp is fully expanded, and \endinput -+ % is an expandable command. The redefinition below makes \endinput -+ % disappear altogether for that purpose -- although logging shows that -+ % 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} -+ % @findex xyz -+ % @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 -+ % -+ % Do the redefinitions. -+ \commondummies -+} -+ -+% For the aux and toc files, @ is the escape character. So we want to -+% redefine everything using @ as the escape character (instead of -+% \realbackslash, still used for index files). When everything uses @, -+% this will be simpler. - % --\unsepspaces --% Turn off macro expansion --\turnoffmacros -+\def\atdummies{% -+ \def\@{@@}% -+ \def\ {@ }% -+ \let\{ = \lbraceatcmd -+ \let\} = \rbraceatcmd -+ % -+ % Do the redefinitions. -+ \commondummies -+ \otherbackslash - } - --% If an index command is used in an @example environment, any spaces --% therein should become regular spaces in the raw index file, not the --% expansion of \tie (\\leavevmode \penalty \@M \ ). --{\obeyspaces -- \gdef\unsepspaces{\obeyspaces\let =\space}} -+% Called from \indexdummies and \atdummies. -+% -+\def\commondummies{% -+ % -+ % \definedummyword defines \#1 as \string\#1\space, thus effectively -+ % preventing its expansion. This is used only for control% words, -+ % not control letters, because the \space would be incorrect for -+ % control characters, but is needed to separate the control word -+ % from whatever follows. -+ % -+ % For control letters, we have \definedummyletter, which omits the -+ % space. -+ % -+ % These can be used both for control words that take an argument and -+ % those that do not. If it is followed by {arg} in the input, then -+ % that will dutifully get written to the index (or wherever). -+ % -+ \def\definedummyword ##1{\def##1{\string##1\space}}% -+ \def\definedummyletter##1{\def##1{\string##1}}% -+ \let\definedummyaccent\definedummyletter -+ % -+ \commondummiesnofonts -+ % -+ \definedummyletter\_% -+ % -+ % Non-English letters. -+ \definedummyword\AA -+ \definedummyword\AE -+ \definedummyword\DH -+ \definedummyword\L -+ \definedummyword\O -+ \definedummyword\OE -+ \definedummyword\TH -+ \definedummyword\aa -+ \definedummyword\ae -+ \definedummyword\dh -+ \definedummyword\exclamdown -+ \definedummyword\l -+ \definedummyword\o -+ \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 -+ \definedummyword\gtr -+ \definedummyword\hat -+ \definedummyword\less -+ \definedummyword\sf -+ \definedummyword\sl -+ \definedummyword\tclose -+ \definedummyword\tt -+ % -+ \definedummyword\LaTeX -+ \definedummyword\TeX -+ % -+ % Assorted special characters. -+ \definedummyword\bullet -+ \definedummyword\comma -+ \definedummyword\copyright -+ \definedummyword\registeredsymbol -+ \definedummyword\dots -+ \definedummyword\enddots -+ \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 -+ % -+ % We want to disable all macros so that they are not expanded by \write. -+ \macrolist -+ % -+ \normalturnoffactive -+ % -+ % Handle some cases of @value -- where it does not contain any -+ % (non-fully-expandable) commands. -+ \makevalueexpandable -+} - --% \indexnofonts no-ops all font-change commands. --% This is used when outputting the strings to sort the index by. --\def\indexdummyfont#1{#1} --\def\indexdummytex{TeX} --\def\indexdummydots{...} -+% \commondummiesnofonts: common to \commondummies and \indexnofonts. -+% -+\def\commondummiesnofonts{% -+ % Control letters and accents. -+ \definedummyletter\!% -+ \definedummyaccent\"% -+ \definedummyaccent\'% -+ \definedummyletter\*% -+ \definedummyaccent\,% -+ \definedummyletter\.% -+ \definedummyletter\/% -+ \definedummyletter\:% -+ \definedummyaccent\=% -+ \definedummyletter\?% -+ \definedummyaccent\^% -+ \definedummyaccent\`% -+ \definedummyaccent\~% -+ \definedummyword\u -+ \definedummyword\v -+ \definedummyword\H -+ \definedummyword\dotaccent -+ \definedummyword\ogonek -+ \definedummyword\ringaccent -+ \definedummyword\tieaccent -+ \definedummyword\ubaraccent -+ \definedummyword\udotaccent -+ \definedummyword\dotless -+ % -+ % Texinfo font commands. -+ \definedummyword\b -+ \definedummyword\i -+ \definedummyword\r -+ \definedummyword\sc -+ \definedummyword\t -+ % -+ % Commands that take arguments. -+ \definedummyword\acronym -+ \definedummyword\cite -+ \definedummyword\code -+ \definedummyword\command -+ \definedummyword\dfn -+ \definedummyword\email -+ \definedummyword\emph -+ \definedummyword\env -+ \definedummyword\file -+ \definedummyword\kbd -+ \definedummyword\key -+ \definedummyword\math -+ \definedummyword\option -+ \definedummyword\pxref -+ \definedummyword\ref -+ \definedummyword\samp -+ \definedummyword\strong -+ \definedummyword\tie -+ \definedummyword\uref -+ \definedummyword\url -+ \definedummyword\var -+ \definedummyword\verb -+ \definedummyword\w -+ \definedummyword\xref -+} - -+% \indexnofonts is used when outputting the strings to sort the index -+% by, and when constructing control sequence names. It eliminates all -+% control sequences and just writes whatever the best ASCII sort string -+% would be for a given command (usually its argument). -+% - \def\indexnofonts{% --% Just ignore accents. --\let\,=\indexdummyfont --\let\"=\indexdummyfont --\let\`=\indexdummyfont --\let\'=\indexdummyfont --\let\^=\indexdummyfont --\let\~=\indexdummyfont --\let\==\indexdummyfont --\let\b=\indexdummyfont --\let\c=\indexdummyfont --\let\d=\indexdummyfont --\let\u=\indexdummyfont --\let\v=\indexdummyfont --\let\H=\indexdummyfont --\let\dotless=\indexdummyfont --% Take care of the plain tex special European modified letters. --\def\oe{oe}% --\def\ae{ae}% --\def\aa{aa}% --\def\OE{OE}% --\def\AE{AE}% --\def\AA{AA}% --\def\o{o}% --\def\O{O}% --\def\l{l}% --\def\L{L}% --\def\ss{ss}% --\let\w=\indexdummyfont --\let\t=\indexdummyfont --\let\r=\indexdummyfont --\let\i=\indexdummyfont --\let\b=\indexdummyfont --\let\emph=\indexdummyfont --\let\strong=\indexdummyfont --\let\cite=\indexdummyfont --\let\sc=\indexdummyfont --%Don't no-op \tt, since it isn't a user-level command --% and is used in the definitions of the active chars like <, >, |... --%\let\tt=\indexdummyfont --\let\tclose=\indexdummyfont --\let\code=\indexdummyfont --\let\url=\indexdummyfont --\let\uref=\indexdummyfont --\let\env=\indexdummyfont --\let\acronym=\indexdummyfont --\let\command=\indexdummyfont --\let\option=\indexdummyfont --\let\file=\indexdummyfont --\let\samp=\indexdummyfont --\let\kbd=\indexdummyfont --\let\key=\indexdummyfont --\let\var=\indexdummyfont --\let\TeX=\indexdummytex --\let\dots=\indexdummydots --\def\@{@}% -+ % Accent commands should become @asis. -+ \def\definedummyaccent##1{\let##1\asis}% -+ % We can just ignore other control letters. -+ \def\definedummyletter##1{\let##1\empty}% -+ % Hopefully, all control words can become @asis. -+ \let\definedummyword\definedummyaccent -+ % -+ \commondummiesnofonts -+ % -+ % Don't no-op \tt, since it isn't a user-level command -+ % and is used in the definitions of the active chars like <, >, |, etc. -+ % Likewise with the other plain tex font commands. -+ %\let\tt=\asis -+ % -+ \def\ { }% -+ \def\@{@}% -+ % how to handle braces? -+ \def\_{\normalunderscore}% -+ % -+ % 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\ordf{a}% -+ \def\ordm{o}% -+ \def\o{o}% -+ \def\questiondown{?}% -+ \def\ss{ss}% -+ \def\th{zzz}% -+ % -+ \def\LaTeX{LaTeX}% -+ \def\TeX{TeX}% -+ % -+ % Assorted special characters. -+ % (The following {} will end up in the sort string, but that's ok.) -+ \def\bullet{bullet}% -+ \def\comma{,}% -+ \def\copyright{copyright}% -+ \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\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{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 - } - --% To define \realbackslash, we must make \ not be an escape. --% We must first make another character (@) an escape --% so we do not become unable to do a definition. -- --{\catcode`\@=0 \catcode`\\=\other -- @gdef@realbackslash{\}} -- - \let\indexbackslash=0 %overridden during \printindex. - \let\SETmarginindex=\relax % put index entries in margin (undocumented)? - --% For \ifx comparisons. --\def\emptymacro{\empty} -- - % Most index entries go through here, but \dosubind is the general case. --% --\def\doind#1#2{\dosubind{#1}{#2}\empty} -+% #1 is the index name, #2 is the entry text. -+\def\doind#1#2{\dosubind{#1}{#2}{}} - - % Workhorse for all \fooindexes. - % #1 is name of index, #2 is stuff to put there, #3 is subentry -- --% \empty if called from \doind, as we usually are. The main exception --% is with defuns, which call us directly. -+% empty if called from \doind, as we usually are (the main exception -+% is with most defuns, which call us directly). - % - \def\dosubind#1#2#3{% -+ \iflinks -+ {% -+ % Store the main index entry text (including the third arg). -+ \toks0 = {#2}% -+ % If third arg is present, precede it with a space. -+ \def\thirdarg{#3}% -+ \ifx\thirdarg\empty \else -+ \toks0 = \expandafter{\the\toks0 \space #3}% -+ \fi -+ % -+ \edef\writeto{\csname#1indfile\endcsname}% -+ % -+ \safewhatsit\dosubindwrite -+ }% -+ \fi -+} -+ -+% Write the entry in \toks0 to the index file: -+% -+\def\dosubindwrite{% - % Put the index entry in the margin if desired. - \ifx\SETmarginindex\relax\else -- \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}% -+ \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% - \fi -- {% -- \count255=\lastpenalty -- {% -- \indexdummies % Must do this here, since \bf, etc expand at this stage -- \escapechar=`\\ -- {% -- \let\folio = 0% We will expand all macros now EXCEPT \folio. -- \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now -- % so it will be output as is; and it will print as backslash. -- % -- \def\thirdarg{#3}% -- % -- % If third arg is present, precede it with space in sort key. -- \ifx\thirdarg\emptymacro -- \let\subentry = \empty -- \else -- \def\subentry{ #3}% -- \fi -- % -- % First process the index entry with all font commands turned -- % off to get the string to sort by. -- {\indexnofonts \xdef\indexsorttmp{#2\subentry}}% -- % -- % Now the real index entry with the fonts. -- \toks0 = {#2}% -- % -- % If third (subentry) arg is present, add it to the index -- % string. And include a space. -- \ifx\thirdarg\emptymacro \else -- \toks0 = \expandafter{\the\toks0 \space #3}% -- \fi -- % -- % Set up the complete index entry, with both the sort key -- % and the original text, including any font commands. We write -- % three arguments to \entry to the .?? file, texindex reduces to -- % two when writing the .??s sorted result. -- \edef\temp{% -- \write\csname#1indfile\endcsname{% -- \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}% -- }% -- % -- % If a skip is the last thing on the list now, preserve it -- % by backing up by \lastskip, doing the \write, then inserting -- % the skip again. Otherwise, the whatsit generated by the -- % \write will make \lastskip zero. The result is that sequences -- % like this: -- % @end defun -- % @tindex whatever -- % @defun ... -- % will have extra space inserted, because the \medbreak in the -- % start of the @defun won't see the skip inserted by the @end of -- % the previous defun. -- % -- % But don't do any of this if we're not in vertical mode. We -- % don't want to do a \vskip and prematurely end a paragraph. -- % -- % Avoid page breaks due to these extra skips, too. -- % -- \iflinks -- \ifvmode -- \skip0 = \lastskip -- \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi -- \fi -- % -- \temp % do the write -- % -- % -- \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi -- \fi -- }% -- }% -- \penalty\count255 -+ % -+ % Remember, we are within a group. -+ \indexdummies % Must do this here, since \bf, etc expand at this stage -+ \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now -+ % so it will be output as is; and it will print as backslash. -+ % -+ % Process the index entry with all font commands turned off, to -+ % get the string to sort by. -+ {\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 -+ % three arguments to \entry to the .?? file (four in the -+ % subentry case), texindex reduces to two when writing the .??s -+ % sorted result. -+ \edef\temp{% -+ \write\writeto{% -+ \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% - }% -+ \temp -+} -+ -+% Take care of unwanted page breaks/skips around a whatsit: -+% -+% If a skip is the last thing on the list now, preserve it -+% by backing up by \lastskip, doing the \write, then inserting -+% the skip again. Otherwise, the whatsit generated by the -+% \write or \pdfdest will make \lastskip zero. The result is that -+% sequences like this: -+% @end defun -+% @tindex whatever -+% @defun ... -+% will have extra space inserted, because the \medbreak in the -+% start of the @defun won't see the skip inserted by the @end of -+% the previous defun. -+% -+% But don't do any of this if we're not in vertical mode. We -+% don't want to do a \vskip and prematurely end a paragraph. -+% -+% Avoid page breaks due to these extra skips, too. -+% -+% But wait, there is a catch there: -+% We'll have to check whether \lastskip is zero skip. \ifdim is not -+% sufficient for this purpose, as it ignores stretch and shrink parts -+% of the skip. The only way seems to be to check the textual -+% representation of the skip. -+% -+% The following is almost like \def\zeroskipmacro{0.0pt} except that -+% the ``p'' and ``t'' characters have catcode \other, not 11 (letter). -+% -+\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} -+% -+\newskip\whatsitskip -+\newcount\whatsitpenalty -+% -+% ..., ready, GO: -+% -+\def\safewhatsit#1{% -+\ifhmode -+ #1% -+\else -+ % \lastskip and \lastpenalty cannot both be nonzero simultaneously. -+ \whatsitskip = \lastskip -+ \edef\lastskipmacro{\the\lastskip}% -+ \whatsitpenalty = \lastpenalty -+ % -+ % If \lastskip is nonzero, that means the last item was a -+ % skip. And since a skip is discardable, that means this -+ % -\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 -+ \else -+ \vskip-\whatsitskip -+ \fi -+ % -+ #1% -+ % -+ \ifx\lastskipmacro\zeroskipmacro -+ % If \lastskip was zero, perhaps the last item was a penalty, and -+ % perhaps it was >=10000, e.g., a \nobreak. In that case, we want -+ % 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. -+ % would allow a break between the index-whatever whatsit -+ % and the "Description." paragraph. -+ \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi -+ \else -+ % On the other hand, if we had a nonzero \lastskip, -+ % this make-up glue would be preceded by a non-discardable item -+ % (the whatsit from the \write), so we must insert a \nobreak. -+ \nobreak\vskip\whatsitskip -+ \fi -+\fi - } - - % The index entry written in the file actually looks like -@@ -2938,13 +4624,13 @@ - % @printindex causes a particular index (the ??s file) to get printed. - % It does not print any chapter heading (usually an @unnumbered). - % --\def\printindex{\parsearg\doprintindex} --\def\doprintindex#1{\begingroup -+\parseargdef\printindex{\begingroup - \dobreak \chapheadingskip{10000}% - % - \smallfonts \rm - \tolerance = 9500 -- \indexbreaks -+ \plainfrenchspacing -+ \everypar = {}% don't want the \kern\-parindent from indentation suppression. - % - % See if the index file exists and is nonempty. - % Change catcode of @ here so that if the index file contains -@@ -2971,7 +4657,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. -- \def\indexbackslash{\rawbackslashxx}% -+ \def\indexbackslash{\backslashcurfont}% - \catcode`\\ = 0 - \escapechar = `\\ - \begindoublecolumns -@@ -2993,7 +4679,10 @@ - \removelastskip - % - % We like breaks before the index initials, so insert a bonus. -- \penalty -300 -+ \nobreak -+ \vskip 0pt plus 3\baselineskip -+ \penalty 0 -+ \vskip 0pt plus -3\baselineskip - % - % 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 +4692,117 @@ - % No shrink because it confuses \balancecolumns. - \vskip 1.67\baselineskip plus .5\baselineskip - \leftline{\secbf #1}% -- \vskip .33\baselineskip plus .1\baselineskip -- % - % Do our best not to break after the initial. - \nobreak -+ \vskip .33\baselineskip plus .1\baselineskip - }} - --% This typesets a paragraph consisting of #1, dot leaders, and then #2 --% flush to the right margin. It is used for index and table of contents --% entries. The paragraph is indented by \leftskip. -+% \entry typesets a paragraph consisting of the text (#1), dot leaders, and -+% then page number (#2) flushed to the right margin. It is used for index -+% and table of contents entries. The paragraph is indented by \leftskip. - % --\def\entry#1#2{\begingroup -- % -- % Start a new paragraph if necessary, so our assignments below can't -- % affect previous text. -- \par -- % -- % Do not fill out the last line with white space. -- \parfillskip = 0in -- % -- % No extra space above this paragraph. -- \parskip = 0in -- % -- % Do not prefer a separate line ending with a hyphen to fewer lines. -- \finalhyphendemerits = 0 -- % -- % \hangindent is only relevant when the entry text and page number -- % don't both fit on one line. In that case, bob suggests starting the -- % dots pretty far over on the line. Unfortunately, a large -- % indentation looks wrong when the entry text itself is broken across -- % lines. So we use a small indentation and put up with long leaders. -- % -- % \hangafter is reset to 1 (which is the value we want) at the start -- % of each paragraph, so we need not do anything with that. -- \hangindent = 2em -- % -- % When the entry text needs to be broken, just fill out the first line -- % with blank space. -- \rightskip = 0pt plus1fil -- % -- % A bit of stretch before each entry for the benefit of balancing columns. -- \vskip 0pt plus1pt -- % -- % Start a ``paragraph'' for the index entry so the line breaking -- % parameters we've set above will have an effect. -- \noindent -- % -- % Insert the text of the index entry. TeX will do line-breaking on it. -- #1% -- % The following is kludged to not output a line of dots in the index if -- % there are no page numbers. The next person who breaks this will be -- % cursed by a Unix daemon. -- \def\tempa{{\rm }}% -- \def\tempb{#2}% -- \edef\tempc{\tempa}% -- \edef\tempd{\tempb}% -- \ifx\tempc\tempd\ \else% -+% A straightforward implementation would start like this: -+% \def\entry#1#2{... -+% 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. -+% -+% The right solution is to prevent \entry from swallowing the whole text. -+% --kasal, 21nov03 -+\def\entry{% -+ \begingroup - % -- % If we must, put the page number on a line of its own, and fill out -- % this line with blank space. (The \hfil is overwhelmed with the -- % fill leaders glue in \indexdotfill if the page number does fit.) -- \hfil\penalty50 -- \null\nobreak\indexdotfill % Have leaders before the page number. -+ % Start a new paragraph if necessary, so our assignments below can't -+ % affect previous text. -+ \par - % -- % The `\ ' here is removed by the implicit \unskip that TeX does as -- % part of (the primitive) \par. Without it, a spurious underfull -- % \hbox ensues. -- \ifpdf -- \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. -+ % Do not fill out the last line with white space. -+ \parfillskip = 0in -+ % -+ % No extra space above this paragraph. -+ \parskip = 0in -+ % -+ % Do not prefer a separate line ending with a hyphen to fewer lines. -+ \finalhyphendemerits = 0 -+ % -+ % \hangindent is only relevant when the entry text and page number -+ % don't both fit on one line. In that case, bob suggests starting the -+ % dots pretty far over on the line. Unfortunately, a large -+ % indentation looks wrong when the entry text itself is broken across -+ % lines. So we use a small indentation and put up with long leaders. -+ % -+ % \hangafter is reset to 1 (which is the value we want) at the start -+ % of each paragraph, so we need not do anything with that. -+ \hangindent = 2em -+ % -+ % When the entry text needs to be broken, just fill out the first line -+ % with blank space. -+ \rightskip = 0pt plus1fil -+ % -+ % A bit of stretch before each entry for the benefit of balancing -+ % columns. -+ \vskip 0pt plus1pt -+ % -+ % Swallow the left brace of the text (first parameter): -+ \afterassignment\doentry -+ \let\temp = -+} -+\def\doentry{% -+ \bgroup % Instead of the swallowed brace. -+ \noindent -+ \aftergroup\finishentry -+ % And now comes the text of the entry. -+} -+\def\finishentry#1{% -+ % #1 is the page number. -+ % -+ % The following is kludged to not output a line of dots in the index if -+ % there are no page numbers. The next person who breaks this will be -+ % cursed by a Unix daemon. -+ \setbox\boxA = \hbox{#1}% -+ \ifdim\wd\boxA = 0pt -+ \ % - \else -- \ #2% The page number ends the paragraph. -+ % -+ % If we must, put the page number on a line of its own, and fill out -+ % this line with blank space. (The \hfil is overwhelmed with the -+ % fill leaders glue in \indexdotfill if the page number does fit.) -+ \hfil\penalty50 -+ \null\nobreak\indexdotfill % Have leaders before the page number. -+ % -+ % The `\ ' here is removed by the implicit \unskip that TeX does as -+ % part of (the primitive) \par. Without it, a spurious underfull -+ % \hbox ensues. -+ \ifpdf -+ \pdfgettoks#1.% -+ \ \the\toksA -+ \else -+ \ #1% -+ \fi - \fi -- \fi% -- \par --\endgroup} -+ \par -+ \endgroup -+} - --% Like \dotfill except takes at least 1 em. -+% Like plain.tex's \dotfill, except uses up at least 1 em. - \def\indexdotfill{\cleaders -- \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} -+ \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} - - \def\primary #1{\line{#1\hfil}} - - \newskip\secondaryindent \secondaryindent=0.5cm -- --\def\secondary #1#2{ --{\parfillskip=0in \parskip=0in --\hangindent =1in \hangafter=1 --\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par -+\def\secondary#1#2{{% -+ \parfillskip=0in -+ \parskip=0in -+ \hangindent=1in -+ \hangafter=1 -+ \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill -+ \ifpdf -+ \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. -+ \else -+ #2 -+ \fi -+ \par - }} - - % Define two-column mode, which we use to typeset indexes. -@@ -3149,7 +4862,6 @@ - % - % Double the \vsize as well. (We don't need a separate register here, - % since nobody clobbers \vsize.) -- \advance\vsize by -\ht\partialpage - \vsize = 2\vsize - } - -@@ -3163,6 +4875,7 @@ - % previous page. - \dimen@ = \vsize - \divide\dimen@ by 2 -+ \advance\dimen@ by -\ht\partialpage - % - % box0 will be the left-hand column, box2 the right. - \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ -@@ -3170,16 +4883,47 @@ - \unvbox255 - \penalty\outputpenalty - } -+% -+% Re-output the contents of the output page -- any previous material, -+% followed by the two boxes we just split, in box0 and box2. - \def\pagesofar{% -- % Re-output the contents of the output page -- any previous material, -- % followed by the two boxes we just split, in box0 and box2. - \unvbox\partialpage - % - \hsize = \doublecolumnhsize - \wd0=\hsize \wd2=\hsize - \hbox to\pagewidth{\box0\hfil\box2}% - } -+% -+% All done with double columns. - \def\enddoublecolumns{% -+ % The following penalty ensures that the page builder is exercised -+ % _before_ we change the output routine. This is necessary in the -+ % following situation: -+ % -+ % The last section of the index consists only of a single entry. -+ % Before this section, \pagetotal is less than \pagegoal, so no -+ % break occurs before the last section starts. However, the last -+ % section, consisting of \initial and the single \entry, does not -+ % fit on the page and has to be broken off. Without the following -+ % penalty the page builder will not be exercised until \eject -+ % below, and by that time we'll already have changed the output -+ % routine to the \balancecolumns version, so the next-to-last -+ % double-column page will be processed with \balancecolumns, which -+ % is wrong: The two columns will go to the main vertical list, with -+ % the broken-off section in the recent contributions. As soon as -+ % the output routine finishes, TeX starts reconsidering the page -+ % break. The two columns and the broken-off section both fit on the -+ % page, because the two columns now take up only half of the page -+ % goal. When TeX sees \eject from below which follows the final -+ % section, it invokes the new output routine that we've set after -+ % \balancecolumns below; \onepageout will try to fit the two columns -+ % and the final section into the vbox of \pageheight (see -+ % \pagebody), causing an overfull box. -+ % -+ % Note that glue won't work here, because glue does not exercise the -+ % page builder, unlike penalties (see The TeXbook, pp. 280-281). -+ \penalty0 -+ % - \output = {% - % Split the last of the double-column material. Leave it on the - % current page, no automatic page break. -@@ -3203,8 +4947,9 @@ - % \endgroup where \vsize got restored). - \pagegoal = \vsize - } -+% -+% Called at the end of the double column material. - \def\balancecolumns{% -- % Called at the end of the double column material. - \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. - \dimen@ = \ht0 - \advance\dimen@ by \topskip -@@ -3234,6 +4979,12 @@ - \message{sectioning,} - % Chapters, sections, etc. - -+% \unnumberedno is an oxymoron, of course. But we count the unnumbered -+% sections so that we can refer to them unambiguously in the pdf -+% outlines by their "section number". We avoid collisions with chapter -+% numbers by starting them at 10000. (If a document ever has 10000 -+% chapters, we're in trouble anyway, I'm sure.) -+\newcount\unnumberedno \unnumberedno = 10000 - \newcount\chapno - \newcount\secno \secno=0 - \newcount\subsecno \subsecno=0 -@@ -3241,9 +4992,12 @@ - - % This counter is funny since it counts through charcodes of letters A, B, ... - \newcount\appendixno \appendixno = `\@ -+% - % \def\appendixletter{\char\the\appendixno} --% We do the following for the sake of pdftex, which needs the actual -+% We do the following ugly conditional instead of the above simple -+% construct for the sake of pdftex, which needs the actual - % letter in the expansion, not just typeset. -+% - \def\appendixletter{% - \ifnum\appendixno=`A A% - \else\ifnum\appendixno=`B B% -@@ -3279,13 +5033,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 -+\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count - - % @raisesections: treat @section as chapter, @subsection as section, etc. - \def\raisesections{\global\advance\secbase by -1} -@@ -3295,287 +5054,250 @@ - \def\lowersections{\global\advance\secbase by 1} - \let\down=\lowersections % original BFox name - --% Choose a numbered-heading macro --% #1 is heading level if unmodified by @raisesections or @lowersections --% #2 is text for heading --\def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 --\ifcase\absseclevel -- \chapterzzz{#2} --\or -- \seczzz{#2} --\or -- \numberedsubseczzz{#2} --\or -- \numberedsubsubseczzz{#2} --\else -- \ifnum \absseclevel<0 -- \chapterzzz{#2} -+% we only have subsub. -+\chardef\maxseclevel = 3 -+% -+% A numbered section within an unnumbered changes to unnumbered too. -+% To achive this, remember the "biggest" unnum. sec. we are currently in: -+\chardef\unmlevel = \maxseclevel -+% -+% Trace whether the current chapter is an appendix or not: -+% \chapheadtype is "N" or "A", unnumbered chapters are ignored. -+\def\chapheadtype{N} -+ -+% Choose a heading macro -+% #1 is heading type -+% #2 is heading level -+% #3 is text for heading -+\def\genhead#1#2#3{% -+ % Compute the abs. sec. level: -+ \absseclevel=#2 -+ \advance\absseclevel by \secbase -+ % Make sure \absseclevel doesn't fall outside the range: -+ \ifnum \absseclevel < 0 -+ \absseclevel = 0 - \else -- \numberedsubsubseczzz{#2} -+ \ifnum \absseclevel > 3 -+ \absseclevel = 3 -+ \fi - \fi --\fi --} -- --% like \numhead, but chooses appendix heading levels --\def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 --\ifcase\absseclevel -- \appendixzzz{#2} --\or -- \appendixsectionzzz{#2} --\or -- \appendixsubseczzz{#2} --\or -- \appendixsubsubseczzz{#2} --\else -- \ifnum \absseclevel<0 -- \appendixzzz{#2} -+ % The heading type: -+ \def\headtype{#1}% -+ \if \headtype U% -+ \ifnum \absseclevel < \unmlevel -+ \chardef\unmlevel = \absseclevel -+ \fi - \else -- \appendixsubsubseczzz{#2} -+ % Check for appendix sections: -+ \ifnum \absseclevel = 0 -+ \edef\chapheadtype{\headtype}% -+ \else -+ \if \headtype A\if \chapheadtype N% -+ \errmessage{@appendix... within a non-appendix chapter}% -+ \fi\fi -+ \fi -+ % Check for numbered within unnumbered: -+ \ifnum \absseclevel > \unmlevel -+ \def\headtype{U}% -+ \else -+ \chardef\unmlevel = 3 -+ \fi - \fi --\fi --} -- --% like \numhead, but chooses numberless heading levels --\def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 --\ifcase\absseclevel -- \unnumberedzzz{#2} --\or -- \unnumberedseczzz{#2} --\or -- \unnumberedsubseczzz{#2} --\or -- \unnumberedsubsubseczzz{#2} --\else -- \ifnum \absseclevel<0 -- \unnumberedzzz{#2} -+ % Now print the heading: -+ \if \headtype U% -+ \ifcase\absseclevel -+ \unnumberedzzz{#3}% -+ \or \unnumberedseczzz{#3}% -+ \or \unnumberedsubseczzz{#3}% -+ \or \unnumberedsubsubseczzz{#3}% -+ \fi - \else -- \unnumberedsubsubseczzz{#2} -+ \if \headtype A% -+ \ifcase\absseclevel -+ \appendixzzz{#3}% -+ \or \appendixsectionzzz{#3}% -+ \or \appendixsubseczzz{#3}% -+ \or \appendixsubsubseczzz{#3}% -+ \fi -+ \else -+ \ifcase\absseclevel -+ \chapterzzz{#3}% -+ \or \seczzz{#3}% -+ \or \numberedsubseczzz{#3}% -+ \or \numberedsubsubseczzz{#3}% -+ \fi -+ \fi - \fi --\fi -+ \suppressfirstparagraphindent - } - --% @chapter, @appendix, @unnumbered. --\def\thischaptername{No Chapter Title} --\outer\def\chapter{\parsearg\chapteryyy} --\def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz --\def\chapterzzz #1{% --\secno=0 \subsecno=0 \subsubsecno=0 --\global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% --\chapmacro {#1}{\the\chapno}% --\gdef\thissection{#1}% --\gdef\thischaptername{#1}% --% We don't substitute the actual chapter name into \thischapter --% because we don't want its macros evaluated now. --\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% --\toks0 = {#1}% --\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% -- {\the\chapno}}}% --\temp --\donoderef --\global\let\section = \numberedsec --\global\let\subsection = \numberedsubsec --\global\let\subsubsection = \numberedsubsubsec -+% an interface: -+\def\numhead{\genhead N} -+\def\apphead{\genhead A} -+\def\unnmhead{\genhead U} -+ -+% @chapter, @appendix, @unnumbered. Increment top-level counter, reset -+% all lower-level sectioning counters to zero. -+% -+% Also set \chaplevelprefix, which we prepend to @float sequence numbers -+% (e.g., figures), q.v. By default (before any chapter), that is empty. -+\let\chaplevelprefix = \empty -+% -+\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz -+\def\chapterzzz#1{% -+ % section resetting is \global in case the chapter is in a group, such -+ % as an @include file. -+ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 -+ \global\advance\chapno by 1 -+ % -+ % Used for \float. -+ \gdef\chaplevelprefix{\the\chapno.}% -+ \resetallfloatnos -+ % -+ % \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}% -+ % -+ % So @section and the like are numbered underneath this chapter. -+ \global\let\section = \numberedsec -+ \global\let\subsection = \numberedsubsec -+ \global\let\subsubsection = \numberedsubsubsec - } - --\outer\def\appendix{\parsearg\appendixyyy} --\def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz --\def\appendixzzz #1{% --\secno=0 \subsecno=0 \subsubsecno=0 --\global\advance \appendixno by 1 --\message{\putwordAppendix\space \appendixletter}% --\chapmacro {#1}{\putwordAppendix{} \appendixletter}% --\gdef\thissection{#1}% --\gdef\thischaptername{#1}% --\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% --\toks0 = {#1}% --\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% -- {\putwordAppendix{} \appendixletter}}}% --\temp --\appendixnoderef --\global\let\section = \appendixsec --\global\let\subsection = \appendixsubsec --\global\let\subsubsection = \appendixsubsubsec -+\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 -+ % -+ % \putwordAppendix can contain complex things in translations. -+ \toks0=\expandafter{\putwordAppendix}% -+ \message{\the\toks0 \space \appendixletter}% -+ % -+ \chapmacro{#1}{Yappendix}{\appendixletter}% -+ % -+ \global\let\section = \appendixsec -+ \global\let\subsection = \appendixsubsec -+ \global\let\subsubsection = \appendixsubsubsec -+} -+ -+\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz -+\def\unnumberedzzz#1{% -+ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 -+ \global\advance\unnumberedno by 1 -+ % -+ % Since an unnumbered has no number, no prefix for figures. -+ \global\let\chaplevelprefix = \empty -+ \resetallfloatnos -+ % -+ % This used to be simply \message{#1}, but TeX fully expands the -+ % argument to \message. Therefore, if #1 contained @-commands, TeX -+ % expanded them. For example, in `@unnumbered The @cite{Book}', TeX -+ % expanded @cite (which turns out to cause errors because \cite is meant -+ % to be executed, not expanded). -+ % -+ % Anyway, we don't want the fully-expanded definition of @cite to appear -+ % as a result of the \message, we just want `@cite' itself. We use -+ % \the to achieve this: TeX expands \the only once, -+ % simply yielding the contents of . (We also do this for -+ % the toc entries.) -+ \toks0 = {#1}% -+ \message{(\the\toks0)}% -+ % -+ \chapmacro{#1}{Ynothing}{\the\unnumberedno}% -+ % -+ \global\let\section = \unnumberedsec -+ \global\let\subsection = \unnumberedsubsec -+ \global\let\subsubsection = \unnumberedsubsubsec - } - - % @centerchap is like @unnumbered, but the heading is centered. --\outer\def\centerchap{\parsearg\centerchapyyy} --\def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}} -+\outer\parseargdef\centerchap{% -+ % Well, we could do the following in a group, but that would break -+ % an assumption that \chapmacro is called at the outermost level. -+ % Thus we are safer this way: --kasal, 24feb04 -+ \let\centerparametersmaybe = \centerparameters -+ \unnmhead0{#1}% -+ \let\centerparametersmaybe = \relax -+} - - % @top is like @unnumbered. --\outer\def\top{\parsearg\unnumberedyyy} -- --\outer\def\unnumbered{\parsearg\unnumberedyyy} --\def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz --\def\unnumberedzzz #1{% --\secno=0 \subsecno=0 \subsubsecno=0 --% --% This used to be simply \message{#1}, but TeX fully expands the --% argument to \message. Therefore, if #1 contained @-commands, TeX --% expanded them. For example, in `@unnumbered The @cite{Book}', TeX --% expanded @cite (which turns out to cause errors because \cite is meant --% to be executed, not expanded). --% --% Anyway, we don't want the fully-expanded definition of @cite to appear --% as a result of the \message, we just want `@cite' itself. We use --% \the to achieve this: TeX expands \the only once, --% simply yielding the contents of . (We also do this for --% the toc entries.) --\toks0 = {#1}\message{(\the\toks0)}% --% --\unnumbchapmacro {#1}% --\gdef\thischapter{#1}\gdef\thissection{#1}% --\toks0 = {#1}% --\edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}}}% --\temp --\unnumbnoderef --\global\let\section = \unnumberedsec --\global\let\subsection = \unnumberedsubsec --\global\let\subsubsection = \unnumberedsubsubsec --} -+\let\top\unnumbered - - % Sections. --\outer\def\numberedsec{\parsearg\secyyy} --\def\secyyy #1{\numhead1{#1}} % normally calls seczzz --\def\seczzz #1{% --\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % --\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% --\toks0 = {#1}% --\edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% -- {\the\chapno}{\the\secno}}}% --\temp --\donoderef --\nobreak -+\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz -+\def\seczzz#1{% -+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 -+ \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% - } - --\outer\def\appendixsection{\parsearg\appendixsecyyy} --\outer\def\appendixsec{\parsearg\appendixsecyyy} --\def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz --\def\appendixsectionzzz #1{% --\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % --\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% --\toks0 = {#1}% --\edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% -- {\appendixletter}{\the\secno}}}% --\temp --\appendixnoderef --\nobreak -+\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz -+\def\appendixsectionzzz#1{% -+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 -+ \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% - } -+\let\appendixsec\appendixsection - --\outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} --\def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz --\def\unnumberedseczzz #1{% --\plainsecheading {#1}\gdef\thissection{#1}% --\toks0 = {#1}% --\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}% --\temp --\unnumbnoderef --\nobreak -+\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz -+\def\unnumberedseczzz#1{% -+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 -+ \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% - } - - % Subsections. --\outer\def\numberedsubsec{\parsearg\numberedsubsecyyy} --\def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz --\def\numberedsubseczzz #1{% --\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % --\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% --\toks0 = {#1}% --\edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% -- {\the\chapno}{\the\secno}{\the\subsecno}}}% --\temp --\donoderef --\nobreak -+\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz -+\def\numberedsubseczzz#1{% -+ \global\subsubsecno=0 \global\advance\subsecno by 1 -+ \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% - } - --\outer\def\appendixsubsec{\parsearg\appendixsubsecyyy} --\def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz --\def\appendixsubseczzz #1{% --\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % --\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% --\toks0 = {#1}% --\edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% -- {\appendixletter}{\the\secno}{\the\subsecno}}}% --\temp --\appendixnoderef --\nobreak -+\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz -+\def\appendixsubseczzz#1{% -+ \global\subsubsecno=0 \global\advance\subsecno by 1 -+ \sectionheading{#1}{subsec}{Yappendix}% -+ {\appendixletter.\the\secno.\the\subsecno}% - } - --\outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} --\def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz --\def\unnumberedsubseczzz #1{% --\plainsubsecheading {#1}\gdef\thissection{#1}% --\toks0 = {#1}% --\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry% -- {\the\toks0}}}% --\temp --\unnumbnoderef --\nobreak -+\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz -+\def\unnumberedsubseczzz#1{% -+ \global\subsubsecno=0 \global\advance\subsecno by 1 -+ \sectionheading{#1}{subsec}{Ynothing}% -+ {\the\unnumberedno.\the\secno.\the\subsecno}% - } - - % Subsubsections. --\outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy} --\def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz --\def\numberedsubsubseczzz #1{% --\gdef\thissection{#1}\global\advance \subsubsecno by 1 % --\subsubsecheading {#1} -- {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% --\toks0 = {#1}% --\edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% -- {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% --\temp --\donoderef --\nobreak -+\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz -+\def\numberedsubsubseczzz#1{% -+ \global\advance\subsubsecno by 1 -+ \sectionheading{#1}{subsubsec}{Ynumbered}% -+ {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% - } - --\outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy} --\def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz --\def\appendixsubsubseczzz #1{% --\gdef\thissection{#1}\global\advance \subsubsecno by 1 % --\subsubsecheading {#1} -- {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% --\toks0 = {#1}% --\edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% -- {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% --\temp --\appendixnoderef --\nobreak -+\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz -+\def\appendixsubsubseczzz#1{% -+ \global\advance\subsubsecno by 1 -+ \sectionheading{#1}{subsubsec}{Yappendix}% -+ {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% - } - --\outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} --\def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz --\def\unnumberedsubsubseczzz #1{% --\plainsubsubsecheading {#1}\gdef\thissection{#1}% --\toks0 = {#1}% --\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry% -- {\the\toks0}}}% --\temp --\unnumbnoderef --\nobreak -+\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz -+\def\unnumberedsubsubseczzz#1{% -+ \global\advance\subsubsecno by 1 -+ \sectionheading{#1}{subsubsec}{Ynothing}% -+ {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% - } - --% These are variants which are not "outer", so they can appear in @ifinfo. --% Actually, they should now be obsolete; ordinary section commands should work. --\def\infotop{\parsearg\unnumberedzzz} --\def\infounnumbered{\parsearg\unnumberedzzz} --\def\infounnumberedsec{\parsearg\unnumberedseczzz} --\def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz} --\def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz} -- --\def\infoappendix{\parsearg\appendixzzz} --\def\infoappendixsec{\parsearg\appendixseczzz} --\def\infoappendixsubsec{\parsearg\appendixsubseczzz} --\def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz} -- --\def\infochapter{\parsearg\chapterzzz} --\def\infosection{\parsearg\sectionzzz} --\def\infosubsection{\parsearg\subsectionzzz} --\def\infosubsubsection{\parsearg\subsubsectionzzz} -- - % These macros control what the section commands do, according - % to what kind of chapter we are in (ordinary, appendix, or unnumbered). - % Define them by default for a numbered chapter. --\global\let\section = \numberedsec --\global\let\subsection = \numberedsubsec --\global\let\subsubsection = \numberedsubsubsec -+\let\section = \numberedsec -+\let\subsection = \numberedsubsec -+\let\subsubsection = \numberedsubsubsec - - % Define @majorheading, @heading and @subheading - -@@ -3587,24 +5309,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{% --{\advance\chapheadingskip by 10pt \chapbreak }% --{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 -- \parindent=0pt\raggedright -- \rm #1\hfill}}\bigskip \par\penalty 200} -- --\def\chapheading{\parsearg\chapheadingzzz} --\def\chapheadingzzz #1{\chapbreak % --{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 -- \parindent=0pt\raggedright -- \rm #1\hfill}}\bigskip \par\penalty 200} -+\def\chapheading{\chapbreak \parsearg\chapheadingzzz} -+\def\chapheadingzzz#1{% -+ {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 -+ \parindent=0pt\ptexraggedright -+ \rmisbold #1\hfill}}% -+ \bigskip \par\penalty 200\relax -+ \suppressfirstparagraphindent -+} - - % @heading, @subheading, @subsubheading. --\def\heading{\parsearg\plainsecheading} --\def\subheading{\parsearg\plainsubsecheading} --\def\subsubheading{\parsearg\plainsubsubsecheading} -+\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} -+ \suppressfirstparagraphindent} -+\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} -+ \suppressfirstparagraphindent} -+\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} -+ \suppressfirstparagraphindent} - - % These macros generate a chapter, section, etc. heading only - % (including whitespace, linebreaking, etc. around it), -@@ -3613,8 +5338,6 @@ - %%% Args are the skip and penalty (usually negative) - \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} - --\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} -- - %%% Define plain chapter starts, and page on/off switching for it - % Parameter controlling skip before chapter headings (if needed) - -@@ -3622,7 +5345,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 +5373,7 @@ - \global\let\pagealignmacro=\chappager - \global\def\HEADINGSon{\HEADINGSsingle}} - --\def\CHAPPAGodd{ -+\def\CHAPPAGodd{% - \global\let\contentsalignmacro = \chapoddpage - \global\let\pchapsepmacro=\chapoddpage - \global\let\pagealignmacro=\chapoddpage -@@ -3645,107 +5381,292 @@ - - \CHAPPAGon - --\def\CHAPFplain{ --\global\let\chapmacro=\chfplain --\global\let\unnumbchapmacro=\unnchfplain --\global\let\centerchapmacro=\centerchfplain} -- --% Plain chapter opening. --% #1 is the text, #2 the chapter number or empty if unnumbered. --\def\chfplain#1#2{% -+% Chapter opening. -+% -+% #1 is the text, #2 is the section type (Ynumbered, Ynothing, -+% Yappendix, Yomitfromtoc), #3 the chapter number. -+% -+% To test against our argument. -+\def\Ynothingkeyword{Ynothing} -+\def\Yomitfromtockeyword{Yomitfromtoc} -+\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 -- \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 \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\lastsection{#1}% -+ % -+ % Only insert the separating space if we have a chapter/appendix -+ % number, and don't print the unnumbered ``number''. -+ \ifx\temptype\Ynothingkeyword -+ \setbox0 = \hbox{}% -+ \def\toctype{unnchap}% -+ \else\ifx\temptype\Yomitfromtockeyword -+ \setbox0 = \hbox{}% contents like unnumbered, but no toc entry -+ \def\toctype{omit}% -+ \else\ifx\temptype\Yappendixkeyword -+ \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% -+ \def\toctype{app}% -+ \else -+ \setbox0 = \hbox{#3\enspace}% -+ \def\toctype{numchap}% -+ \fi\fi\fi -+ % -+ % Write the toc entry for this chapter. Must come before the -+ % \donoderef, because we include the current node name in the toc -+ % entry, and \donoderef resets it to empty. -+ \writetocentry{\toctype}{#1}{#3}% -+ % -+ % For pdftex, we have to write out the node definition (aka, make -+ % the pdfdest) after any page break, but before the actual text has -+ % been typeset. If the destination for the pdf outline is after the -+ % text, then jumping from the outline may wind up with the text not -+ % being visible, for instance under high magnification. -+ \donoderef{#2}% -+ % -+ % Typeset the actual heading. -+ \nobreak % Avoid page breaks at the interline glue. -+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright -+ \hangindent=\wd0 \centerparametersmaybe - \unhbox0 #1\par}% - }% - \nobreak\bigskip % no page break after a chapter title - \nobreak - } - --% Plain opening for unnumbered. --\def\unnchfplain#1{\chfplain{#1}{}} -- - % @centerchap -- centered and unnumbered. - \let\centerparametersmaybe = \relax --\def\centerchfplain#1{{% -- \def\centerparametersmaybe{% -- \advance\rightskip by 3\rightskip -- \leftskip = \rightskip -- \parfillskip = 0pt -- }% -- \chfplain{#1}{}% --}} -+\def\centerparameters{% -+ \advance\rightskip by 3\rightskip -+ \leftskip = \rightskip -+ \parfillskip = 0pt -+} - --\CHAPFplain % The default - -+% I don't think this chapter style is supported any more, so I'm not -+% updating it with the new noderef stuff. We'll see. --karl, 11aug03. -+% -+\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} -+% - \def\unnchfopen #1{% - \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 -- \parindent=0pt\raggedright -- \rm #1\hfill}}\bigskip \par\nobreak -+ \parindent=0pt\ptexraggedright -+ \rmisbold #1\hfill}}\bigskip \par\nobreak - } -- - \def\chfopen #1#2{\chapoddpage {\chapfonts - \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% - \par\penalty 5000 % - } -- - \def\centerchfopen #1{% - \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt -- \hfill {\rm #1}\hfill}}\bigskip \par\nobreak -+ \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak - } -- --\def\CHAPFopen{ --\global\let\chapmacro=\chfopen --\global\let\unnumbchapmacro=\unnchfopen --\global\let\centerchapmacro=\centerchfopen} -+\def\CHAPFopen{% -+ \global\let\chapmacro=\chfopen -+ \global\let\centerchapmacro=\centerchfopen} - - --% Section titles. -+% Section titles. These macros combine the section number parts and -+% call the generic \sectionheading to do the printing. -+% - \newskip\secheadingskip --\def\secheadingbreak{\dobreak \secheadingskip {-1000}} --\def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}} --\def\plainsecheading#1{\sectionheading{sec}{}{#1}} -+\def\secheadingbreak{\dobreak \secheadingskip{-1000}} - - % Subsection titles. --\newskip \subsecheadingskip --\def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}} --\def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}} --\def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}} -+\newskip\subsecheadingskip -+\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} - - % Subsubsection titles. --\let\subsubsecheadingskip = \subsecheadingskip --\let\subsubsecheadingbreak = \subsecheadingbreak --\def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}} --\def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}} -+\def\subsubsecheadingskip{\subsecheadingskip} -+\def\subsubsecheadingbreak{\subsecheadingbreak} - - --% Print any size section title. -+% Print any size, any type, section title. - % --% #1 is the section type (sec/subsec/subsubsec), #2 is the section --% number (maybe empty), #3 the text. --\def\sectionheading#1#2#3{% -- {% -- \expandafter\advance\csname #1headingskip\endcsname by \parskip -- \csname #1headingbreak\endcsname -- }% -+% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is -+% 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 \rmisbold - % -- % Only insert the separating space if we have a section number. -- \def\secnum{#2}% -- \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}% -+ \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\lastsection{#1}% -+ \else\ifx\temptype\Yomitfromtockeyword -+ % for @headings -- no section number, don't include in toc, -+ % 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\lastsection{#1}% -+ \else -+ \setbox0 = \hbox{#4\enspace}% -+ \def\toctype{num}% -+ \gdef\lastsection{#1}% -+ \fi\fi\fi -+ % -+ % Write the toc entry (before \donoderef). See comments in \chapmacro. -+ \writetocentry{\toctype\sectionlevel}{#1}{#4}% -+ % -+ % Write the node reference (= pdf destination for pdftex). -+ % Again, see comments in \chapmacro. -+ \donoderef{#3}% -+ % -+ % Interline glue will be inserted when the vbox is completed. -+ % That glue will be a valid breakpoint for the page, since it'll be -+ % preceded by a whatsit (usually from the \donoderef, or from the -+ % \writetocentry if there was no node). We don't want to allow that -+ % break, since then the whatsits could end up on page n while the -+ % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. -+ \nobreak -+ % -+ % Output the actual section heading. -+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright -+ \hangindent=\wd0 % zero if no section number -+ \unhbox0 #1}% - }% -- \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak -+ % Add extra space after the heading -- half of whatever came above it. -+ % Don't allow stretch, though. -+ \kern .5 \csname #2headingskip\endcsname -+ % -+ % Do not let the kern be a potential breakpoint, as it would be if it -+ % was followed by glue. -+ \nobreak -+ % -+ % We'll almost certainly start a paragraph next, so don't let that -+ % 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 +5675,224 @@ - \newwrite\tocfile - - % Write an entry to the toc file, opening it if necessary. --% Called from @chapter, etc. We supply {\folio} at the end of the --% argument, which will end up as the last argument to the \...entry macro. -+% Called from @chapter, etc. - % --% We open the .toc file here instead of at @setfilename or any other --% given time so that @contents can be put in the document anywhere. -+% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} -+% We append the current node name (if any) and page number as additional -+% arguments for the \{chap,sec,...}entry macros which will eventually -+% read this. The node name is used in the pdf outlines as the -+% destination to jump to. -+% -+% We open the .toc file for writing here instead of at @setfilename (or -+% any other fixed time) so that @contents can be anywhere in the document. -+% But if #1 is `omit', then we don't do anything. This is used for the -+% table of contents chapter openings themselves. - % - \newif\iftocfileopened --\def\writetocentry#1{% -- \iftocfileopened\else -- \immediate\openout\tocfile = \jobname.toc -- \global\tocfileopenedtrue -+\def\omitkeyword{omit}% -+% -+\def\writetocentry#1#2#3{% -+ \edef\writetoctype{#1}% -+ \ifx\writetoctype\omitkeyword \else -+ \iftocfileopened\else -+ \immediate\openout\tocfile = \jobname.toc -+ \global\tocfileopenedtrue -+ \fi -+ % -+ \iflinks -+ {\atdummies -+ \edef\temp{% -+ \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% -+ \temp -+ }% -+ \fi - \fi -- \iflinks \write\tocfile{#1{\folio}}\fi -+ % -+ % Tell \shipout to create a pdf destination on each page, if we're -+ % writing pdf. These are used in the table of contents. We can't -+ % just write one on every page because the title pages are numbered -+ % 1 and 2 (the page numbers aren't printed), and so are the first -+ % two pages of the document. Thus, we'd have two destinations named -+ % `1', and two named `2'. -+ \ifpdf \global\pdfmakepagedesttrue \fi -+} -+ -+ -+% 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 -+ \catcode`\<=\active -+ \catcode`\>=\active -+ \catcode`\\=\active -+ \catcode`\^=\active -+ \catcode`\_=\active -+ \catcode`\|=\active -+ \catcode`\~=\active -+} -+ -+ -+% Read the toc file, which is essentially Texinfo input. -+\def\readtocfile{% -+ \setupdatafile -+ \activecatcodes -+ \input \tocreadfilename - } - - \newskip\contentsrightmargin \contentsrightmargin=1in - \newcount\savepageno - \newcount\lastnegativepageno \lastnegativepageno = -1 - --% Finish up the main text and prepare to read what we've written --% to \tocfile. -+% Prepare to read what we've written to \tocfile. - % - \def\startcontents#1{% -- % If @setchapternewpage on, and @headings double, the contents should -- % start on an odd page, unlike chapters. Thus, we maintain -- % \contentsalignmacro in parallel with \pagealignmacro. -- % From: Torbjorn Granlund -- \contentsalignmacro -- \immediate\closeout\tocfile -- % -- % Don't need to put `Contents' or `Short Contents' in the headline. -- % It is abundantly clear what they are. -- \unnumbchapmacro{#1}\def\thischapter{}% -- \savepageno = \pageno -- \begingroup % Set up to handle contents files properly. -- \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 -- % We can't do this, because then an actual ^ in a section -- % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. -- %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi -- \raggedbottom % Worry more about breakpoints than the bottom. -- \advance\hsize by -\contentsrightmargin % Don't use the full line length. -- % -- % Roman numerals for page numbers. -- \ifnum \pageno>0 \pageno = \lastnegativepageno \fi -+ % If @setchapternewpage on, and @headings double, the contents should -+ % start on an odd page, unlike chapters. Thus, we maintain -+ % \contentsalignmacro in parallel with \pagealignmacro. -+ % From: Torbjorn Granlund -+ \contentsalignmacro -+ \immediate\closeout\tocfile -+ % -+ % Don't need to put `Contents' or `Short Contents' in the headline. -+ % It is abundantly clear what they are. -+ \chapmacro{#1}{Yomitfromtoc}{}% -+ % -+ \savepageno = \pageno -+ \begingroup % Set up to handle contents files properly. -+ \raggedbottom % Worry more about breakpoints than the bottom. -+ \advance\hsize by -\contentsrightmargin % Don't use the full line length. -+ % -+ % Roman numerals for page numbers. -+ \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi - } - -+% redefined for the two-volume lispref. We always output on -+% \jobname.toc even if this is redefined. -+% -+\def\tocreadfilename{\jobname.toc} - - % Normal (long) toc. -+% - \def\contents{% -- \startcontents{\putwordTOC}% -- \openin 1 \jobname.toc -- \ifeof 1 \else -- \closein 1 -- \input \jobname.toc -- \fi -- \vfill \eject -- \contentsalignmacro % in case @setchapternewpage odd is in effect -- \pdfmakeoutlines -- \endgroup -- \lastnegativepageno = \pageno -- \pageno = \savepageno -+ \startcontents{\putwordTOC}% -+ \openin 1 \tocreadfilename\space -+ \ifeof 1 \else -+ \readtocfile -+ \fi -+ \vfill \eject -+ \contentsalignmacro % in case @setchapternewpage odd is in effect -+ \ifeof 1 \else -+ \pdfmakeoutlines -+ \fi -+ \closein 1 -+ \endgroup -+ \lastnegativepageno = \pageno -+ \global\pageno = \savepageno - } - - % And just the chapters. - \def\summarycontents{% -- \startcontents{\putwordShortTOC}% -- % -- \let\chapentry = \shortchapentry -- \let\unnumbchapentry = \shortunnumberedentry -- % We want a true roman here for the page numbers. -- \secfonts -- \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl -- \rm -- \hyphenpenalty = 10000 -- \advance\baselineskip by 1pt % Open it up a little. -- \def\secentry ##1##2##3##4{} -- \def\unnumbsecentry ##1##2{} -- \def\subsecentry ##1##2##3##4##5{} -- \def\unnumbsubsecentry ##1##2{} -- \def\subsubsecentry ##1##2##3##4##5##6{} -- \def\unnumbsubsubsecentry ##1##2{} -- \openin 1 \jobname.toc -- \ifeof 1 \else -- \closein 1 -- \input \jobname.toc -- \fi -- \vfill \eject -- \contentsalignmacro % in case @setchapternewpage odd is in effect -- \endgroup -- \lastnegativepageno = \pageno -- \pageno = \savepageno -+ \startcontents{\putwordShortTOC}% -+ % -+ \let\numchapentry = \shortchapentry -+ \let\appentry = \shortchapentry -+ \let\unnchapentry = \shortunnchapentry -+ % We want a true roman here for the page numbers. -+ \secfonts -+ \let\rm=\shortcontrm \let\bf=\shortcontbf -+ \let\sl=\shortcontsl \let\tt=\shortconttt -+ \rm -+ \hyphenpenalty = 10000 -+ \advance\baselineskip by 1pt % Open it up a little. -+ \def\numsecentry##1##2##3##4{} -+ \let\appsecentry = \numsecentry -+ \let\unnsecentry = \numsecentry -+ \let\numsubsecentry = \numsecentry -+ \let\appsubsecentry = \numsecentry -+ \let\unnsubsecentry = \numsecentry -+ \let\numsubsubsecentry = \numsecentry -+ \let\appsubsubsecentry = \numsecentry -+ \let\unnsubsubsecentry = \numsecentry -+ \openin 1 \tocreadfilename\space -+ \ifeof 1 \else -+ \readtocfile -+ \fi -+ \closein 1 -+ \vfill \eject -+ \contentsalignmacro % in case @setchapternewpage odd is in effect -+ \endgroup -+ \lastnegativepageno = \pageno -+ \global\pageno = \savepageno - } - \let\shortcontents = \summarycontents - --\ifpdf -- \pdfcatalog{/PageMode /UseOutlines}% --\fi -+% Typeset the label for a chapter or appendix for the short contents. -+% The arg is, e.g., `A' for an appendix, or `3' for a chapter. -+% -+\def\shortchaplabel#1{% -+ % This space should be enough, since a single number is .5em, and the -+ % widest letter (M) is 1em, at least in the Computer Modern fonts. -+ % But use \hss just in case. -+ % (This space doesn't include the extra space that gets added after -+ % the label; that gets put in by \shortchapentry above.) -+ % -+ % We'd like to right-justify chapter numbers, but that looks strange -+ % with appendix letters. And right-justifying numbers and -+ % left-justifying letters looks strange when there is less than 10 -+ % chapters. Have to read the whole toc once to know how many chapters -+ % there are before deciding ... -+ \hbox to 1em{#1\hss}% -+} - - % These macros generate individual entries in the table of contents. - % The first argument is the chapter or section name. - % The last argument is the page number. - % The arguments in between are the chapter number, section number, ... - --% Chapter-level things, for both the long and short contents. --\def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} -- --% See comments in \dochapentry re vbox and related settings --\def\shortchapentry#1#2#3{% -- \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}% -+% Chapters, in the main contents. -+\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} -+% -+% Chapters, in the short toc. -+% See comments in \dochapentry re vbox and related settings. -+\def\shortchapentry#1#2#3#4{% -+ \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% - } - --% Typeset the label for a chapter or appendix for the short contents. --% The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter. --% We could simplify the code here by writing out an \appendixentry --% command in the toc file for appendices, instead of using \chapentry --% for both, but it doesn't seem worth it. -+% Appendices, in the main contents. -+% Need the word Appendix, and a fixed-size box. - % --\newdimen\shortappendixwidth -+\def\appendixbox#1{% -+ % We use M since it's probably the widest letter. -+ \setbox0 = \hbox{\putwordAppendix{} M}% -+ \hbox to \wd0{\putwordAppendix{} #1\hss}} - % --\def\shortchaplabel#1{% -- % Compute width of word "Appendix", may change with language. -- \setbox0 = \hbox{\shortcontrm \putwordAppendix}% -- \shortappendixwidth = \wd0 -- % -- % We typeset #1 in a box of constant width, regardless of the text of -- % #1, so the chapter titles will come out aligned. -- \setbox0 = \hbox{#1}% -- \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi -- % -- % This space should be plenty, since a single number is .5em, and the -- % widest letter (M) is 1em, at least in the Computer Modern fonts. -- % (This space doesn't include the extra space that gets added after -- % the label; that gets put in by \shortchapentry above.) -- \advance\dimen0 by 1.1em -- \hbox to \dimen0{#1\hfil}% --} -+\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} - --\def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} --\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}} -+% Unnumbered chapters. -+\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} -+\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} - - % Sections. --\def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}} --\def\unnumbsecentry#1#2{\dosecentry{#1}{#2}} -+\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} -+\let\appsecentry=\numsecentry -+\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} - - % Subsections. --\def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}} --\def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}} -+\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} -+\let\appsubsecentry=\numsubsecentry -+\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} - - % And subsubsections. --\def\subsubsecentry#1#2#3#4#5#6{% -- \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} --\def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}} -+\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} -+\let\appsubsubsecentry=\numsubsubsecentry -+\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} - - % This parameter controls the indentation of the various levels. --\newdimen\tocindent \tocindent = 3pc -+% Same as \defaultparindent. -+\newdimen\tocindent \tocindent = 15pt - - % Now for the actual typesetting. In all these, #1 is the text and #2 is the - % page number. -@@ -3939,17 +5923,8 @@ - \tocentry{#1}{\dopageno\bgroup#2\egroup}% - \endgroup} - --% Final typesetting of a toc entry; we use the same \entry macro as for --% the index entries, but we want to suppress hyphenation here. (We --% can't do that in the \entry macro, since index entries might consist --% of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) --\def\tocentry#1#2{\begingroup -- \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks -- % Do not use \turnoffactive in these arguments. Since the toc is -- % typeset in cmr, so characters such as _ would come out wrong; we -- % have to do the usual translation tricks. -- \entry{#1}{#2}% --\endgroup} -+% We use the same \entry macro as for the index entries. -+\let\tocentry = \entry - - % Space between chapter (or whatever) number and the title. - \def\labelspace{\hskip1em \relax} -@@ -3959,74 +5934,36 @@ - - \def\chapentryfonts{\secfonts \rm} - \def\secentryfonts{\textfonts} --\let\subsecentryfonts = \textfonts --\let\subsubsecentryfonts = \textfonts -+\def\subsecentryfonts{\textfonts} -+\def\subsubsecentryfonts{\textfonts} - - - \message{environments,} - % @foo ... @end foo. - --% 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 --\newbox\equivbox \newbox\errorbox -- --%{\tentt --%\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil} --%\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil} --%\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil} --%\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil} --% Adapted from the manmac format (p.420 of TeXbook) --%\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex --% depth .1ex\hfil} --%} -- --% @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}} -- --% 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 -- \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} -- --% The @error{} command. --\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 -+ \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie - \catcode `\%=14 -- \catcode 43=12 % plus -- \catcode`\"=12 -- \catcode`\==12 -- \catcode`\|=12 -- \catcode`\<=12 -- \catcode`\>=12 -+ \catcode `\+=\other -+ \catcode `\"=\other -+ \catcode `\|=\other -+ \catcode `\<=\other -+ \catcode `\>=\other -+ \catcode`\`=\other -+ \catcode`\'=\other - \escapechar=`\\ - % -+ % ' is active in math mode (mathcode"8000). So reset it, and all our -+ % other math active characters (just in case), to plain's definitions. -+ \mathactive -+ % - \let\b=\ptexb - \let\bullet=\ptexbullet - \let\c=\ptexc -@@ -4036,20 +5973,26 @@ - \let\equiv=\ptexequiv - \let\!=\ptexexclam - \let\i=\ptexi -+ \let\indent=\ptexindent -+ \let\noindent=\ptexnoindent - \let\{=\ptexlbrace - \let\+=\tabalign - \let\}=\ptexrbrace -+ \let\/=\ptexslash - \let\*=\ptexstar - \let\t=\ptext -+ \expandafter \let\csname top\endcsname=\ptextop % outer -+ \let\frenchspacing=\plainfrenchspacing - % - \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% - \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% - \def\@{@}% --\let\Etex=\endgroup} -+} -+% There is no need to define \Etex. - --% Define @lisp ... @endlisp. --% @lisp does a \begingroup so it can rebind things, --% including the definition of @endlisp (which normally is erroneous). -+% Define @lisp ... @end lisp. -+% @lisp environment forms a group so it can rebind things, -+% including the definition of @end lisp (which normally is erroneous). - - % Amount to narrow the margins by for @lisp. - \newskip\lispnarrowing \lispnarrowing=0.4in -@@ -4059,34 +6002,34 @@ - % have any width. - \def\lisppar{\null\endgraf} - --% Make each space character in the input produce a normal interword --% space in the output. Don't allow a line break at this space, as this --% is used only in environments like @example, where each line of input --% should produce a line of output anyway. --% --{\obeyspaces % --\gdef\sepspaces{\obeyspaces\let =\tie}} -- --% Define \obeyedspace to be our active space, whatever it is. This is --% for use in \parsearg. --{\sepspaces% --\global\let\obeyedspace= } -- - % This space is always present above and below environments. - \newskip\envskipamount \envskipamount = 0pt - - % Make spacing and below environment symmetrical. We use \parskip here - % to help in doing that, since in @example-like environments \parskip - % is reset to zero; thus the \afterenvbreak inserts no space -- but the --% start of the next paragraph will insert \parskip -+% start of the next paragraph will insert \parskip. - % --\def\aboveenvbreak{{\advance\envskipamount by \parskip --\endgraf \ifdim\lastskip<\envskipamount --\removelastskip \penalty-50 \vskip\envskipamount \fi}} -+\def\aboveenvbreak{{% -+ % =10000 instead of <10000 because of a special case in \itemzzz and -+ % \sectionheading, q.v. -+ \ifnum \lastpenalty=10000 \else -+ \advance\envskipamount by \parskip -+ \endgraf -+ \ifdim\lastskip<\envskipamount -+ \removelastskip -+ % it's not a good place to break if the last penalty was \nobreak -+ % or better ... -+ \ifnum\lastpenalty<10000 \penalty-50 \fi -+ \vskip\envskipamount -+ \fi -+ \fi -+}} - - \let\afterenvbreak = \aboveenvbreak - --% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. -+% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will -+% also clear it, so that its embedded environments do the narrowing again. - \let\nonarrowing=\relax - - % @cartouche ... @end cartouche: draw rectangle w/rounded corners around -@@ -4110,738 +6053,756 @@ - % - \newskip\lskip\newskip\rskip - --\long\def\cartouche{% --\begingroup -- \lskip=\leftskip \rskip=\rightskip -- \leftskip=0pt\rightskip=0pt %we want these *outside*. -- \cartinner=\hsize \advance\cartinner by-\lskip -- \advance\cartinner by-\rskip -- \cartouter=\hsize -- \advance\cartouter by 18.4pt % allow for 3pt kerns on either --% side, and for 6pt waste from --% each corner char, and rule thickness -- \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip -- % Flag to tell @lisp, etc., not to narrow margin. -- \let\nonarrowing=\comment -- \vbox\bgroup -- \baselineskip=0pt\parskip=0pt\lineskip=0pt -- \carttop -- \hbox\bgroup -- \hskip\lskip -- \vrule\kern3pt -- \vbox\bgroup -- \hsize=\cartinner -- \kern3pt -- \begingroup -- \baselineskip=\normbskip -- \lineskip=\normlskip -- \parskip=\normpskip -- \vskip -\parskip -+\envdef\cartouche{% -+ \ifhmode\par\fi % can't be in the midst of a paragraph. -+ \startsavinginserts -+ \lskip=\leftskip \rskip=\rightskip -+ \leftskip=0pt\rightskip=0pt % we want these *outside*. -+ \cartinner=\hsize \advance\cartinner by-\lskip -+ \advance\cartinner by-\rskip -+ \cartouter=\hsize -+ \advance\cartouter by 18.4pt % allow for 3pt kerns on either -+ % side, and for 6pt waste from -+ % each corner char, and rule thickness -+ \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip -+ % Flag to tell @lisp, etc., not to narrow margin. -+ \let\nonarrowing = t% -+ \vbox\bgroup -+ \baselineskip=0pt\parskip=0pt\lineskip=0pt -+ \carttop -+ \hbox\bgroup -+ \hskip\lskip -+ \vrule\kern3pt -+ \vbox\bgroup -+ \kern3pt -+ \hsize=\cartinner -+ \baselineskip=\normbskip -+ \lineskip=\normlskip -+ \parskip=\normpskip -+ \vskip -\parskip -+ \comment % For explanation, see the end of \def\group. -+} - \def\Ecartouche{% -- \endgroup -- \kern3pt -- \egroup -- \kern3pt\vrule -- \hskip\rskip -- \egroup -- \cartbot -- \egroup --\endgroup --}} -+ \ifhmode\par\fi -+ \kern3pt -+ \egroup -+ \kern3pt\vrule -+ \hskip\rskip -+ \egroup -+ \cartbot -+ \egroup -+ \checkinserts -+} - - - % 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 - \hfuzz = 12pt % Don't be fussy - \sepspaces % Make spaces be word-separators rather than space tokens. -- \singlespace - \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. - \ifx\nonarrowing\relax - \advance \leftskip by \lispnarrowing - \exdentamount=\lispnarrowing -- \let\exdent=\nofillexdent -- \let\nonarrowing=\relax -+ \else -+ \let\nonarrowing = \relax - \fi -+ \let\exdent=\nofillexdent - } - --% Define the \E... control sequence only if we are inside the particular --% environment, so the error checking in \end will work. --% --% To end an @example-like environment, we first end the paragraph (via --% \afterenvbreak's vertical glue), and then the group. That way we keep --% 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: -+% @example, @display, @format, @lisp - % --\def\nonfillfinish{\afterenvbreak\endgroup} -+\def\smallword{small} -+\def\nosmallword{nosmall} -+\let\SETdispenvsize\relax -+\def\setnormaldispenv{% -+ \ifx\SETdispenvsize\smallword -+ % end paragraph for sake of leading, in case document has no blank -+ % line. This is redundant with what happens in \aboveenvbreak, but -+ % we need to do it before changing the fonts, and it's inconvenient -+ % to change the fonts afterward. -+ \ifnum \lastpenalty=10000 \else \endgraf \fi -+ \smallexamplefonts \rm -+ \fi -+} -+\def\setsmalldispenv{% -+ \ifx\SETdispenvsize\nosmallword -+ \else -+ \ifnum \lastpenalty=10000 \else \endgraf \fi -+ \smallexamplefonts \rm -+ \fi -+} - --% @lisp: indented, narrowed, typewriter font. --\def\lisp{\begingroup -- \nonfillstart -- \let\Elisp = \nonfillfinish -- \tt -- \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. -- \gobble % eat return -+% We often define two environments, @foo and @smallfoo. -+% Let's do it by one command: -+\def\makedispenv #1#2{ -+ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} -+ \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} -+ \expandafter\let\csname E#1\endcsname \afterenvbreak -+ \expandafter\let\csname Esmall#1\endcsname \afterenvbreak - } - --% @example: Same as @lisp. --\def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} -+% Define two synonyms: -+\def\maketwodispenvs #1#2#3{ -+ \makedispenv{#1}{#3} -+ \makedispenv{#2}{#3} -+} - --% @small... is usually equivalent to the non-small (@smallbook --% redefines). We must call \example (or whatever) last in the --% definition, since it reads the return following the @example (or --% whatever) command. --% --% This actually allows (for example) @end display inside an --% @smalldisplay. Too bad, but makeinfo will catch the error anyway. -+% @lisp: indented, narrowed, typewriter font; @example: same as @lisp. - % --\def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display} --\def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp} --\def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format} --\def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp} -- --% Real @smallexample and @smalllisp (when @smallbook): use smaller fonts. -+% @smallexample and @smalllisp: use smaller fonts. - % Originally contributed by Pavel@xerox. --\def\smalllispx{\begingroup -- \def\Esmalllisp{\nonfillfinish\endgroup}% -- \def\Esmallexample{\nonfillfinish\endgroup}% -- \smallfonts -- \lisp --} -- --% @display: same as @lisp except keep current font. - % --\def\display{\begingroup -+\maketwodispenvs {lisp}{example}{% - \nonfillstart -- \let\Edisplay = \nonfillfinish -- \gobble -+ \tt\setupmarkupstyle{example}% -+ \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. -+ \gobble % eat return - } -- --% @smalldisplay (when @smallbook): @display plus smaller fonts. -+% @display/@smalldisplay: same as @lisp except keep current font. - % --\def\smalldisplayx{\begingroup -- \def\Esmalldisplay{\nonfillfinish\endgroup}% -- \smallfonts \rm -- \display -+\makedispenv {display}{% -+ \nonfillstart -+ \gobble - } - --% @format: same as @display except don't narrow margins. -+% @format/@smallformat: same as @display except don't narrow margins. - % --\def\format{\begingroup -- \let\nonarrowing = t -+\makedispenv{format}{% -+ \let\nonarrowing = t% - \nonfillstart -- \let\Eformat = \nonfillfinish - \gobble - } - --% @smallformat (when @smallbook): @format plus smaller fonts. --% --\def\smallformatx{\begingroup -- \def\Esmallformat{\nonfillfinish\endgroup}% -- \smallfonts \rm -- \format -+% @flushleft: same as @format, but doesn't obey \SETdispenvsize. -+\envdef\flushleft{% -+ \let\nonarrowing = t% -+ \nonfillstart -+ \gobble - } -- --% @flushleft (same as @format). --% --\def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format} -+\let\Eflushleft = \afterenvbreak - - % @flushright. - % --\def\flushright{\begingroup -- \let\nonarrowing = t -+\envdef\flushright{% -+ \let\nonarrowing = t% - \nonfillstart -- \let\Eflushright = \nonfillfinish - \advance\leftskip by 0pt plus 1fill - \gobble - } -+\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. -+% and narrows the margins. We keep \parskip nonzero in general, since -+% we're doing normal filling. So, when using \aboveenvbreak and -+% \afterenvbreak, temporarily make \parskip 0. - % --\def\quotation{% -- \begingroup\inENV %This group ends at the end of the @quotation body -+\def\quotationstart{% - {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip -- \singlespace - \parindent=0pt -- % We have retained a nonzero parskip for the environment, since we're -- % doing normal filling. So to avoid extra space below the environment... -- \def\Equotation{\parskip = 0pt \nonfillfinish}% - % - % @cartouche defines \nonarrowing to inhibit narrowing at next level down. - \ifx\nonarrowing\relax - \advance\leftskip by \lispnarrowing - \advance\rightskip by \lispnarrowing - \exdentamount = \lispnarrowing -+ \else - \let\nonarrowing = \relax - \fi -+ \parsearg\quotationlabel - } - -+\envdef\quotation{% -+ \setnormaldispenv -+ \quotationstart -+} - --\message{defuns,} --% @defun etc. -- --% Allow user to change definition object font (\df) internally --\def\setdeffont #1 {\csname DEF#1\endcsname} -- --\newskip\defbodyindent \defbodyindent=.4in --\newskip\defargsindent \defargsindent=50pt --\newskip\deftypemargin \deftypemargin=12pt --\newskip\deflastargmargin \deflastargmargin=18pt -- --\newcount\parencount --% define \functionparens, which makes ( and ) and & do special things. --% \functionparens affects the group it is contained in. --\def\activeparens{% --\catcode`\(=\active \catcode`\)=\active \catcode`\&=\active --\catcode`\[=\active \catcode`\]=\active} -- --% 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. --\global\let(=\lparen \global\let)=\rparen --\global\let[=\lbrack \global\let]=\rbrack -+% If we're given an argument, typeset it in bold with a colon after. -+\def\quotationlabel#1{% -+ \def\temp{#1}% -+ \ifx\temp\empty \else -+ {\bf #1: }% -+ \fi -+} - --\gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 } --\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} --% This is used to turn on special parens --% but make & act ordinary (given that it's active). --\gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr} - --% Definitions of (, ) and & used in args for functions. --% This is the definition of ( outside of all parentheses. --\gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested -- \global\advance\parencount by 1 -+% LaTeX-like @verbatim...@end verbatim and @verb{...} -+% If we want to allow any as delimiter, -+% we need the curly braces so that makeinfo sees the @verb command, eg: -+% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org -+% -+% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. -+% -+% [Knuth] p.344; only we need to do the other characters Texinfo sets -+% active too. Otherwise, they get lost as the first character on a -+% verbatim line. -+\def\dospecials{% -+ \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. --\gdef\opnested{\char`\(\global\advance\parencount by 1 } -+% [Knuth] p. 380 -+\def\uncatcodespecials{% -+ \def\do##1{\catcode`##1=\other}\dospecials} - % --\gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. -- % also in that case restore the outer-level definition of (. -- \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi -- \global\advance \parencount by -1 } --% If we encounter &foo, then turn on ()-hacking afterwards --\gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } -+% Setup for the @verb command. - % --\gdef\normalparens{\boldbrax\let&=\ampnr} --} % End of definition inside \activeparens --%% These parens (in \boldbrax) actually are a little bolder than the --%% contained text. This is especially needed for [ and ] --\def\opnr{{\sf\char`\(}\global\advance\parencount by 1 } --\def\clnr{{\sf\char`\)}\global\advance\parencount by -1 } --\let\ampnr = \& --\def\lbrb{{\bf\char`\[}} --\def\rbrb{{\bf\char`\]}} -- --% Active &'s sneak into the index arguments, so make sure it's defined. --{ -- \catcode`& = 13 -- \global\let& = \ampnr -+% Eight spaces for a tab -+\begingroup -+ \catcode`\^^I=\active -+ \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} -+\endgroup -+% -+\def\setupverb{% -+ \tt % easiest (and conventionally used) font for verbatim -+ \def\par{\leavevmode\endgraf}% -+ \setupmarkupstyle{verb}% -+ \tabeightspaces -+ % Respect line breaks, -+ % print special symbols as themselves, and -+ % make each space count -+ % must do in this order: -+ \obeylines \uncatcodespecials \sepspaces - } - --% First, defname, which formats the header line itself. --% #1 should be the function name. --% #2 should be the type of definition, such as "Function". -+% Setup for the @verbatim environment -+% -+% Real tab expansion -+\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 --% outside the @def... --\dimen2=\leftskip --\advance\dimen2 by -\defbodyindent --\noindent --\setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}% --\dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line --\dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations --\parshape 2 0in \dimen0 \defargsindent \dimen1 --% Now output arg 2 ("Function" or some such) --% ending at \deftypemargin from the right margin, --% but stuck inside a box of width 0 so it does not interfere with linebreaking --{% Adjust \hsize to exclude the ambient margins, --% so that \rightline will obey them. --\advance \hsize by -\dimen2 --\rlap{\rightline{{\rm #2}\hskip -1.25pc }}}% --% Make all lines underfull and no complaints: --\tolerance=10000 \hbadness=10000 --\advance\leftskip by -\defbodyindent --\exdentamount=\defbodyindent --{\df #1}\enskip % Generate function name -+% start the verbatim environment. -+\def\setupverbatim{% -+ \let\nonarrowing = t% -+ \nonfillstart -+ % Easiest (and conventionally used) font for verbatim -+ \tt -+ \def\par{\leavevmode\egroup\box0\endgraf}% -+ \tabexpand -+ \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}% - } - --% 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\doverb'{'#1'}'{#1} -+% -+% [Knuth] p. 382; only eat outer {} -+\begingroup -+ \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other -+ \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] -+\endgroup -+% -+\def\verb{\begingroup\setupverb\doverb} -+% -+% -+% Do the @verbatim magic: define the macro \doverbatim so that -+% the (first) argument ends when '@end verbatim' is reached, ie: -+% -+% \def\doverbatim#1@end verbatim{#1} -+% -+% For Texinfo it's a lot easier than for LaTeX, -+% because texinfo's \verbatim doesn't stop at '\end{verbatim}': -+% we need not redefine '\', '{' and '}'. -+% -+% Inspired by LaTeX's verbatim command set [latex.ltx] -+% -+\begingroup -+ \catcode`\ =\active -+ \obeylines % -+ % ignore everything up to the first ^^M, that's the newline at the end -+ % of the @verbatim input line itself. Otherwise we get an extra blank -+ % line in the output. -+ \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% -+ % We really want {...\end verbatim} in the body of the macro, but -+ % without the active space; thus we have to use \xdef and \gobble. -+\endgroup -+% -+\envdef\verbatim{% -+ \setupverbatim\doverbatim -+} -+\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. -+\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} - % --\def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV -- \medbreak -- \def#1{\endgraf\endgroup\medbreak}% -- \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}% -- \parindent=0in -- \advance\leftskip by \defbodyindent -- \exdentamount=\defbodyindent -- \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}} -+\def\doverbatiminclude#1{% -+ {% -+ \makevalueexpandable -+ \setupverbatim -+ \indexnofonts % Allow `@@' and other weird things in file names. -+ \input #1 -+ \afterenvbreak -+ }% -+} - --% Used for @deftypeop. The change from \deftypemethparsebody is an --% extra argument at the beginning which is the `category', instead of it --% being the hardwired string `Method' or `Instance Variable'. We have --% to account for this both in the \...x definition and in parsing the --% input at hand. Thus also need a control sequence (passed as #5) for --% the \E... definition to assign the category name to. --% --\def\deftypeopparsebody#1#2#3#4#5 #6 {\begingroup\inENV -- \medbreak -- \def#1{\endgraf\endgroup\medbreak}% -- \def#2##1 ##2 ##3 {% -- \def#4{##1}% -- \begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}% -- \parindent=0in -- \advance\leftskip by \defbodyindent -- \exdentamount=\defbodyindent -- \begingroup\obeylines\activeparens\spacesplit{#3{#5}{#6}}} -+% @copying ... @end copying. -+% Save the text away for @insertcopying later. -+% -+% We save the uninterpreted tokens, rather than creating a box. -+% Saving the text in a box would be much easier, but then all the -+% typesetting commands (@smallbook, font changes, etc.) have to be done -+% beforehand -- and a) we want @copying to be done first in the source -+% file; b) letting users define the frontmatter in as flexible order as -+% possible is very desirable. -+% -+\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} -+\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} -+% -+\def\insertcopying{% -+ \begingroup -+ \parindent = 0pt % paragraph indentation looks wrong on title page -+ \scanexp\copyingtext -+ \endgroup -+} - --\def\defopparsebody #1#2#3#4#5 {\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 ##2 {\def#4{##1}% --\begingroup\obeylines\activeparens\spacesplit{#3{##2}}}% --\parindent=0in --\advance\leftskip by \defbodyindent --\exdentamount=\defbodyindent --\begingroup\obeylines\activeparens\spacesplit{#3{#5}}} - --% These parsing functions are similar to the preceding ones --% except that they do not make parens into active characters. --% These are used for "variables" since they have no arguments. -+\message{defuns,} -+% @defun etc. - --\def\defvarparsebody #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\spacesplit#3}% --\parindent=0in --\advance\leftskip by \defbodyindent --\exdentamount=\defbodyindent --\begingroup % --\catcode 61=\active % --\obeylines\spacesplit#3} -+\newskip\defbodyindent \defbodyindent=.4in -+\newskip\defargsindent \defargsindent=50pt -+\newskip\deflastargmargin \deflastargmargin=18pt -+\newcount\defunpenalty - --% This is used for \def{tp,vr}parsebody. It could probably be used for --% some of the others, too, with some judicious conditionals. --% --\def\parsebodycommon#1#2#3{% -- \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\spacesplit{#3{##1}}}% -+% Start the processing of @deffn: -+\def\startdefun{% -+ \ifnum\lastpenalty<10000 -+ \medbreak -+ \defunpenalty=10003 % Will keep this @deffn together with the -+ % following @def command, see below. -+ \else -+ % If there are two @def commands in a row, we'll have a \nobreak, -+ % which is there to keep the function description together with its -+ % header. But if there's nothing but headers, we need to allow a -+ % break somewhere. Check specifically for penalty 10002, inserted -+ % by \printdefunline, instead of 10000, since the sectioning -+ % commands also insert a nobreak penalty, and we don't want to allow -+ % a break between a section heading and a defun. -+ % -+ % As a minor refinement, we avoid "club" headers by signalling -+ % with penalty of 10003 after the very first @deffn in the -+ % sequence (see above), and penalty of 10002 after any following -+ % @def command. -+ \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi -+ % -+ % Similarly, after a section heading, do not allow a break. -+ % But do insert the glue. -+ \medskip % preceded by discardable penalty, so not a breakpoint -+ \fi -+ % - \parindent=0in - \advance\leftskip by \defbodyindent - \exdentamount=\defbodyindent -- \begingroup\obeylines - } - --\def\defvrparsebody#1#2#3#4 {% -- \parsebodycommon{#1}{#2}{#3}% -- \spacesplit{#3{#4}}% -+\def\dodefunx#1{% -+ % First, check whether we are in the right environment: -+ \checkenv#1% -+ % -+ % As above, allow line break if we have multiple x headers in a row. -+ % It's not a great place, though. -+ \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi -+ % -+ % And now, it's time to reuse the body of the original defun: -+ \expandafter\gobbledefun#1% - } -+\def\gobbledefun#1\startdefun{} - --% This loses on `@deftp {Data Type} {struct termios}' -- it thinks the --% type is just `struct', because we lose the braces in `{struct --% termios}' when \spacesplit reads its undelimited argument. Sigh. --% \let\deftpparsebody=\defvrparsebody --% --% So, to get around this, we put \empty in with the type name. That --% way, TeX won't find exactly `{...}' as an undelimited argument, and --% won't strip off the braces. -+% \printdefunline \deffnheader{text} - % --\def\deftpparsebody #1#2#3#4 {% -- \parsebodycommon{#1}{#2}{#3}% -- \spacesplit{\parsetpheaderline{#3{#4}}}\empty -+\def\printdefunline#1#2{% -+ \begingroup -+ % call \deffnheader: -+ #1#2 \endheader -+ % common ending: -+ \interlinepenalty = 10000 -+ \advance\rightskip by 0pt plus 1fil -+ \endgraf -+ \nobreak\vskip -\parskip -+ \penalty\defunpenalty % signal to \startdefun and \dodefunx -+ % Some of the @defun-type tags do not enable magic parentheses, -+ % rendering the following check redundant. But we don't optimize. -+ \checkparencounts -+ \endgroup - } - --% Fine, but then we have to eventually remove the \empty *and* the --% braces (if any). That's what this does. --% --\def\removeemptybraces\empty#1\relax{#1} -+\def\Edefun{\endgraf\medbreak} - --% After \spacesplit has done its work, this is called -- #1 is the final --% 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 remaining is to define \deffnheader. - % --\def\parsetpheaderline#1#2#3{% -- #1{\removeemptybraces#2\relax}{#3}% --}% -- --\def\defopvarparsebody #1#2#3#4#5 {\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 ##2 {\def#4{##1}% --\begingroup\obeylines\spacesplit{#3{##2}}}% --\parindent=0in --\advance\leftskip by \defbodyindent --\exdentamount=\defbodyindent --\begingroup\obeylines\spacesplit{#3{#5}}} -+\def\makedefun#1{% -+ \expandafter\let\csname E#1\endcsname = \Edefun -+ \edef\temp{\noexpand\domakedefun -+ \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% -+ \temp -+} - --% Split up #2 at the first space token. --% call #1 with two arguments: --% the first is all of #2 before the space token, --% the second is all of #2 after that space token. --% If #2 contains no space token, all of it is passed as the first arg --% and the second is passed as empty. -+% \domakedefun \deffn \deffnx \deffnheader -+% -+% Define \deffn and \deffnx, without parameters. -+% \deffnheader has to be defined explicitly. -+% -+\def\domakedefun#1#2#3{% -+ \envdef#1{% -+ \startdefun -+ \parseargusing\activeparens{\printdefunline#3}% -+ }% -+ \def#2{\dodefunx#1}% -+ \def#3% -+} - --{\obeylines --\gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}% --\long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{% --\ifx\relax #3% --#1{#2}{}\else #1{#2}{#3#4}\fi}} -+%%% Untyped functions: - --% So much for the things common to all kinds of definitions. -+% @deffn category name args -+\makedefun{deffn}{\deffngeneral{}} - --% Define @defun. -+% @deffn category class name args -+\makedefun{defop}#1 {\defopon{#1\ \putwordon}} - --% First, define the processing that is wanted for arguments of \defun --% Use this to expand the args and terminate the paragraph they make up -+% \defopon {category on}class name args -+\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } - --\def\defunargs#1{\functionparens \sl --% Expand, preventing hyphenation at `-' chars. --% Note that groups don't affect changes in \hyphenchar. --% Set the font temporarily and use \font in case \setfont made \tensl a macro. --{\tensl\hyphenchar\font=0}% --#1% --{\tensl\hyphenchar\font=45}% --\ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% --\interlinepenalty=10000 --\advance\rightskip by 0pt plus 1fil --\endgraf\nobreak\vskip -\parskip\nobreak -+% \deffngeneral {subind}category name args -+% -+\def\deffngeneral#1#2 #3 #4\endheader{% -+ % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. -+ \dosubind{fn}{\code{#3}}{#1}% -+ \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% - } - --\def\deftypefunargs #1{% --% Expand, preventing hyphenation at `-' chars. --% Note that groups don't affect changes in \hyphenchar. --% Use \boldbraxnoamp, not \functionparens, so that & is not special. --\boldbraxnoamp --\tclose{#1}% avoid \code because of side effects on active chars --\interlinepenalty=10000 --\advance\rightskip by 0pt plus 1fil --\endgraf\nobreak\vskip -\parskip\nobreak --} -+%%% Typed functions: - --% Do complete processing of one @defun or @defunx line already parsed. -+% @deftypefn category type name args -+\makedefun{deftypefn}{\deftypefngeneral{}} - --% @deffn Command forward-char nchars -+% @deftypeop category class type name args -+\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} - --\def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader} -+% \deftypeopon {category on}class type name args -+\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } - --\def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% --\begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % --\catcode 61=\other % Turn off change made in \defparsebody -+% \deftypefngeneral {subind}category type name args -+% -+\def\deftypefngeneral#1#2 #3 #4 #5\endheader{% -+ \dosubind{fn}{\code{#4}}{#1}% -+ \defname{#2}{#3}{#4}\defunargs{#5\unskip}% - } - --% @defun == @deffn Function -- --\def\defun{\defparsebody\Edefun\defunx\defunheader} -+%%% Typed variables: - --\def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index --\begingroup\defname {#1}{\putwordDeffunc}% --\defunargs {#2}\endgroup % --\catcode 61=\other % Turn off change made in \defparsebody --} -+% @deftypevr category type var args -+\makedefun{deftypevr}{\deftypecvgeneral{}} - --% @deftypefun int foobar (int @var{foo}, float @var{bar}) -+% @deftypecv category class type var args -+\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} - --\def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader} -+% \deftypecvof {category of}class type var args -+\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } - --% #1 is the data type. #2 is the name and args. --\def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax} --% #1 is the data type, #2 the name, #3 the args. --\def\deftypefunheaderx #1#2 #3\relax{% --\doind {fn}{\code{#2}}% Make entry in function index --\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypefun}% --\deftypefunargs {#3}\endgroup % --\catcode 61=\other % Turn off change made in \defparsebody -+% \deftypecvgeneral {subind}category type var args -+% -+\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% -+ \dosubind{vr}{\code{#4}}{#1}% -+ \defname{#2}{#3}{#4}\defunargs{#5\unskip}% - } - --% @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar}) -- --\def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader} -- --% \defheaderxcond#1\relax$$$ --% puts #1 in @code, followed by a space, but does nothing if #1 is null. --\def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi} -+%%% Untyped variables: - --% #1 is the classification. #2 is the data type. #3 is the name and args. --\def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax} --% #1 is the classification, #2 the data type, #3 the name, #4 the args. --\def\deftypefnheaderx #1#2#3 #4\relax{% --\doind {fn}{\code{#3}}% Make entry in function index --\begingroup --\normalparens % notably, turn off `&' magic, which prevents --% at least some C++ text from working --\defname {\defheaderxcond#2\relax$$$#3}{#1}% --\deftypefunargs {#4}\endgroup % --\catcode 61=\other % Turn off change made in \defparsebody --} -+% @defvr category var args -+\makedefun{defvr}#1 {\deftypevrheader{#1} {} } - --% @defmac == @deffn Macro -+% @defcv category class var args -+\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} - --\def\defmac{\defparsebody\Edefmac\defmacx\defmacheader} -+% \defcvof {category of}class var args -+\def\defcvof#1#2 {\deftypecvof{#1}#2 {} } - --\def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index --\begingroup\defname {#1}{\putwordDefmac}% --\defunargs {#2}\endgroup % --\catcode 61=\other % Turn off change made in \defparsebody -+%%% Type: -+% @deftp category name args -+\makedefun{deftp}#1 #2 #3\endheader{% -+ \doind{tp}{\code{#2}}% -+ \defname{#1}{}{#2}\defunargs{#3\unskip}% - } - --% @defspec == @deffn Special Form -- --\def\defspec{\defparsebody\Edefspec\defspecx\defspecheader} -- --\def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index --\begingroup\defname {#1}{\putwordDefspec}% --\defunargs {#2}\endgroup % --\catcode 61=\other % Turn off change made in \defparsebody --} -+% Remaining @defun-like shortcuts: -+\makedefun{defun}{\deffnheader{\putwordDeffunc} } -+\makedefun{defmac}{\deffnheader{\putwordDefmac} } -+\makedefun{defspec}{\deffnheader{\putwordDefspec} } -+\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } -+\makedefun{defvar}{\defvrheader{\putwordDefvar} } -+\makedefun{defopt}{\defvrheader{\putwordDefopt} } -+\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } -+\makedefun{defmethod}{\defopon\putwordMethodon} -+\makedefun{deftypemethod}{\deftypeopon\putwordMethodon} -+\makedefun{defivar}{\defcvof\putwordInstanceVariableof} -+\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} - --% @defop CATEGORY CLASS OPERATION ARG... -+% \defname, which formats the name of the @def (not the args). -+% #1 is the category, such as "Function". -+% #2 is the return type, if any. -+% #3 is the function name. - % --\def\defop #1 {\def\defoptype{#1}% --\defopparsebody\Edefop\defopx\defopheader\defoptype} -+% We are followed by (but not passed) the arguments, if any. - % --\def\defopheader#1#2#3{% --\dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index --\begingroup\defname {#2}{\defoptype\ \putwordon\ #1}% --\defunargs {#3}\endgroup % -+\def\defname#1#2#3{% -+ % Get the values of \leftskip and \rightskip as they were outside the @def... -+ \advance\leftskip by -\defbodyindent -+ % -+ % How we'll format the type name. Putting it in brackets helps -+ % distinguish it from the body text that may end up on the next line -+ % just below it. -+ \def\temp{#1}% -+ \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} -+ % -+ % Figure out line sizes for the paragraph shape. -+ % The first line needs space for \box0; but if \rightskip is nonzero, -+ % we need only space for the part of \box0 which exceeds it: -+ \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip -+ % The continuations: -+ \dimen2=\hsize \advance\dimen2 by -\defargsindent -+ % (plain.tex says that \dimen1 should be used only as global.) -+ \parshape 2 0in \dimen0 \defargsindent \dimen2 -+ % -+ % Put the type name to the right margin. -+ \noindent -+ \hbox to 0pt{% -+ \hfil\box0 \kern-\hsize -+ % \hsize has to be shortened this way: -+ \kern\leftskip -+ % Intentionally do not respect \rightskip, since we need the space. -+ }% -+ % -+ % Allow all lines to be underfull without complaint: -+ \tolerance=10000 \hbadness=10000 -+ \exdentamount=\defbodyindent -+ {% -+ % defun fonts. We use typewriter by default (used to be bold) because: -+ % . we're printing identifiers, they should be in tt in principle. -+ % . in languages with many accents, such as Czech or French, it's -+ % common to leave accents off identifiers. The result looks ok in -+ % tt, but exceedingly strange in rm. -+ % . we don't want -- and --- to be treated as ligatures. -+ % . this still does not fix the ?` and !` ligatures, but so far no -+ % one has made identifiers using them :). -+ \df \tt -+ \def\temp{#2}% return value type -+ \ifx\temp\empty\else \tclose{\temp} \fi -+ #3% output function name -+ }% -+ {\rm\enskip}% hskip 0.5 em of \tenrm -+ % -+ \boldbrax -+ % arguments will be output next, if any. - } - --% @deftypeop CATEGORY CLASS TYPE OPERATION ARG... --% --\def\deftypeop #1 {\def\deftypeopcategory{#1}% -- \deftypeopparsebody\Edeftypeop\deftypeopx\deftypeopheader -- \deftypeopcategory} -+% Print arguments in slanted roman (not ttsl), inconsistently with using -+% tt for the name. This is because literal text is sometimes needed in -+% the argument list (groff manual), and ttsl and tt are not very -+% distinguishable. Prevent hyphenation at `-' chars. - % --% #1 is the class name, #2 the data type, #3 the operation name, #4 the args. --\def\deftypeopheader#1#2#3#4{% -- \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index -- \begingroup -- \defname{\defheaderxcond#2\relax$$$#3} -- {\deftypeopcategory\ \putwordon\ \code{#1}}% -- \deftypefunargs{#4}% -- \endgroup -+\def\defunargs#1{% -+ % use sl by default (not ttsl), -+ % tt for the names. -+ \df \sl \hyphenchar\font=0 -+ % -+ % 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. -+ \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% -+ #1% -+ \sl\hyphenchar\font=45 - } - --% @deftypemethod CLASS TYPE METHOD ARG... --% --\def\deftypemethod{% -- \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} -+% We want ()&[] to print specially on the defun line. - % --% #1 is the class name, #2 the data type, #3 the method name, #4 the args. --\def\deftypemethodheader#1#2#3#4{% -- \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index -- \begingroup -- \defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}% -- \deftypefunargs{#4}% -- \endgroup -+\def\activeparens{% -+ \catcode`\(=\active \catcode`\)=\active -+ \catcode`\[=\active \catcode`\]=\active -+ \catcode`\&=\active - } - --% @deftypeivar CLASS TYPE VARNAME --% --\def\deftypeivar{% -- \deftypemethparsebody\Edeftypeivar\deftypeivarx\deftypeivarheader} --% --% #1 is the class name, #2 the data type, #3 the variable name. --\def\deftypeivarheader#1#2#3{% -- \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index -- \begingroup -- \defname{#3}{\putwordInstanceVariableof\ \code{#1}}% -- \defvarargs{#3}% -- \endgroup --} -+% Make control sequences which act like normal parenthesis chars. -+\let\lparen = ( \let\rparen = ) - --% @defmethod == @defop Method --% --\def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} --% --% #1 is the class name, #2 the method name, #3 the args. --\def\defmethodheader#1#2#3{% -- \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index -- \begingroup -- \defname{#2}{\putwordMethodon\ \code{#1}}% -- \defunargs{#3}% -- \endgroup -+% 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. -+{ -+ \activeparens -+ \global\let(=\lparen \global\let)=\rparen -+ \global\let[=\lbrack \global\let]=\rbrack -+ \global\let& = \& -+ -+ \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} -+ \gdef\magicamp{\let&=\amprm} - } - --% @defcv {Class Option} foo-class foo-flag -+\newcount\parencount - --\def\defcv #1 {\def\defcvtype{#1}% --\defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype} -+% If we encounter &foo, then turn on ()-hacking afterwards -+\newif\ifampseen -+\def\amprm#1 {\ampseentrue{\bf\ }} - --\def\defcvarheader #1#2#3{% --\dosubind {vr}{\code{#2}}{\putwordof\ #1}% Make entry in var index --\begingroup\defname {#2}{\defcvtype\ \putwordof\ #1}% --\defvarargs {#3}\endgroup % -+\def\parenfont{% -+ \ifampseen -+ % At the first level, print parens in roman, -+ % otherwise use the default font. -+ \ifnum \parencount=1 \rm \fi -+ \else -+ % The \sf parens (in \boldbrax) actually are a little bolder than -+ % the contained text. This is especially needed for [ and ] . -+ \sf -+ \fi - } -- --% @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME --% --\def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader} --% --\def\defivarheader#1#2#3{% -- \dosubind {vr}{\code{#2}}{\putwordof\ #1}% entry in var index -- \begingroup -- \defname{#2}{\putwordInstanceVariableof\ #1}% -- \defvarargs{#3}% -- \endgroup -+\def\infirstlevel#1{% -+ \ifampseen -+ \ifnum\parencount=1 -+ #1% -+ \fi -+ \fi - } -+\def\bfafterword#1 {#1 \bf} - --% @defvar --% First, define the processing that is wanted for arguments of @defvar. --% This is actually simple: just print them in roman. --% This must expand the args and terminate the paragraph they make up --\def\defvarargs #1{\normalparens #1% --\interlinepenalty=10000 --\endgraf\nobreak\vskip -\parskip\nobreak} -- --% @defvr Counter foo-count -- --\def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader} -- --\def\defvrheader #1#2#3{\doind {vr}{\code{#2}}% --\begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup} -- --% @defvar == @defvr Variable -- --\def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader} -- --\def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index --\begingroup\defname {#1}{\putwordDefvar}% --\defvarargs {#2}\endgroup % -+\def\opnr{% -+ \global\advance\parencount by 1 -+ {\parenfont(}% -+ \infirstlevel \bfafterword - } -- --% @defopt == @defvr {User Option} -- --\def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader} -- --\def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index --\begingroup\defname {#1}{\putwordDefopt}% --\defvarargs {#2}\endgroup % -+\def\clnr{% -+ {\parenfont)}% -+ \infirstlevel \sl -+ \global\advance\parencount by -1 - } - --% @deftypevar int foobar -- --\def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader} -- --% #1 is the data type. #2 is the name, perhaps followed by text that --% is actually part of the data type, which should not be put into the index. --\def\deftypevarheader #1#2{% --\dovarind#2 \relax% Make entry in variables index --\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}% --\interlinepenalty=10000 --\endgraf\nobreak\vskip -\parskip\nobreak --\endgroup} --\def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} -- --% @deftypevr {Global Flag} int enable -- --\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader} -- --\def\deftypevrheader #1#2#3{\dovarind#3 \relax% --\begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1} --\interlinepenalty=10000 --\endgraf\nobreak\vskip -\parskip\nobreak --\endgroup} -- --% Now define @deftp --% Args are printed in bold, a slight difference from @defvar. -- --\def\deftpargs #1{\bf \defvarargs{#1}} -- --% @deftp Class window height width ... -- --\def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader} -- --\def\deftpheader #1#2#3{\doind {tp}{\code{#2}}% --\begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup} -+\newcount\brackcount -+\def\lbrb{% -+ \global\advance\brackcount by 1 -+ {\bf[}% -+} -+\def\rbrb{% -+ {\bf]}% -+ \global\advance\brackcount by -1 -+} - --% These definitions are used if you use @defunx (etc.) --% anywhere other than immediately after a @defun or @defunx. --% --\def\defcvx#1 {\errmessage{@defcvx in invalid context}} --\def\deffnx#1 {\errmessage{@deffnx in invalid context}} --\def\defivarx#1 {\errmessage{@defivarx in invalid context}} --\def\defmacx#1 {\errmessage{@defmacx in invalid context}} --\def\defmethodx#1 {\errmessage{@defmethodx in invalid context}} --\def\defoptx #1 {\errmessage{@defoptx in invalid context}} --\def\defopx#1 {\errmessage{@defopx in invalid context}} --\def\defspecx#1 {\errmessage{@defspecx in invalid context}} --\def\deftpx#1 {\errmessage{@deftpx in invalid context}} --\def\deftypefnx#1 {\errmessage{@deftypefnx in invalid context}} --\def\deftypefunx#1 {\errmessage{@deftypefunx in invalid context}} --\def\deftypeivarx#1 {\errmessage{@deftypeivarx in invalid context}} --\def\deftypemethodx#1 {\errmessage{@deftypemethodx in invalid context}} --\def\deftypeopx#1 {\errmessage{@deftypeopx in invalid context}} --\def\deftypevarx#1 {\errmessage{@deftypevarx in invalid context}} --\def\deftypevrx#1 {\errmessage{@deftypevrx in invalid context}} --\def\defunx#1 {\errmessage{@defunx in invalid context}} --\def\defvarx#1 {\errmessage{@defvarx in invalid context}} --\def\defvrx#1 {\errmessage{@defvrx in invalid context}} -+\def\checkparencounts{% -+ \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{% -+ \message{Warning: unbalanced parentheses in @def...}% -+ \global\parencount=0 -+} -+\def\badbrackcount{% -+ \message{Warning: unbalanced square brackets in @def...}% -+ \global\brackcount=0 -+} - - - \message{macros,} -@@ -4850,42 +6811,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 -- \newwrite\macscribble -- \def\scanmacro#1{% -- \begingroup \newlinechar`\^^M -- % Undo catcode changes of \startcontents and \doprintindex -- \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ -- % Append \endinput to make sure that TeX does not see the ending newline. -- \toks0={#1\endinput}% -- \immediate\openout\macscribble=\jobname.tmp -- \immediate\write\macscribble{\the\toks0}% -- \immediate\closeout\macscribble -- \let\xeatspaces\eatspaces -- \input \jobname.tmp -- \endgroup --} --\else --\def\scanmacro#1{% --\begingroup \newlinechar`\^^M --% Undo catcode changes of \startcontents and \doprintindex --\catcode`\@=0 \catcode`\\=12 \escapechar=`\@ --\let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} -+ \newwrite\macscribble -+ \def\scantokens#1{% -+ \toks0={#1}% -+ \immediate\openout\macscribble=\jobname.tmp -+ \immediate\write\macscribble{\the\toks0}% -+ \immediate\closeout\macscribble -+ \input \jobname.tmp -+ } - \fi - -+\def\scanmacro#1{% -+ \begingroup -+ \newlinechar`\^^M -+ \let\xeatspaces\eatspaces -+ % Undo catcode changes of \startcontents and \doprintindex -+ % When called from @insertcopying or (short)caption, we need active -+ % backslash to get it printed correctly. Previously, we had -+ % \catcode`\\=\other instead. We'll see whether a problem appears -+ % with macro expansion. --kasal, 19aug04 -+ \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ -+ % ... and \example -+ \spaceisspace -+ % -+ % Append \endinput to make sure that TeX does not see the ending newline. -+ % I've verified that it is necessary both for e-TeX and for ordinary TeX -+ % --kasal, 29nov03 -+ \scantokens{#1\endinput}% -+ \endgroup -+} -+ -+\def\scanexp#1{% -+ \edef\temp{\noexpand\scanmacro{#1}}% -+ \temp -+} -+ - \newcount\paramno % Count of parameters - \newtoks\macname % Macro name - \newif\ifrecursive % Is it recursive? --\def\macrolist{} % List of all defined macros in the form -- % \do\macro1\do\macro2... -+ -+% List of all defined macros in the form -+% \definedummyword\macro1\definedummyword\macro2... -+% Currently is also contains all @aliases; the list can be split -+% if there is a need. -+\def\macrolist{} -+ -+% Add the macro to \macrolist -+\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} -+\def\addtomacrolistxxx#1{% -+ \toks0 = \expandafter{\macrolist\definedummyword#1}% -+ \xdef\macrolist{\the\toks0}% -+} - - % Utility routines. --% Thisdoes \let #1 = #2, except with \csnames. -+% 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 --\expandafter\expandafter --\csname#1\endcsname --\csname#2\endcsname} -+ \expandafter\let -+ \csname#1\expandafter\endcsname -+ \csname#2\endcsname -+} - - % Trim leading and trailing spaces off a string. - % Concepts from aro-bend problem 15 (see CTAN). -@@ -4898,7 +6885,7 @@ - } - - % Trim a single trailing ^^M off a string. --{\catcode`\^^M=12\catcode`\Q=3% -+{\catcode`\^^M=\other \catcode`\Q=3% - \gdef\eatcr #1{\eatcra #1Q^^MQ}% - \gdef\eatcra#1^^MQ{\eatcrb#1Q}% - \gdef\eatcrb#1Q#2Q{#1}% -@@ -4908,34 +6895,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. - -+\def\scanctxt{% -+ \catcode`\"=\other -+ \catcode`\+=\other -+ \catcode`\<=\other -+ \catcode`\>=\other -+ \catcode`\@=\other -+ \catcode`\^=\other -+ \catcode`\_=\other -+ \catcode`\|=\other -+ \catcode`\~=\other -+ \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi -+} -+ -+\def\scanargctxt{% -+ \scanctxt -+ \catcode`\\=\other -+ \catcode`\^^M=\other -+} -+ - \def\macrobodyctxt{% -- \catcode`\~=12 -- \catcode`\^=12 -- \catcode`\_=12 -- \catcode`\|=12 -- \catcode`\<=12 -- \catcode`\>=12 -- \catcode`\+=12 -- \catcode`\{=12 -- \catcode`\}=12 -- \catcode`\@=12 -- \catcode`\^^M=12 -- \usembodybackslash} -+ \scanctxt -+ \catcode`\{=\other -+ \catcode`\}=\other -+ \catcode`\^^M=\other -+ \usembodybackslash -+} - - \def\macroargctxt{% -- \catcode`\~=12 -- \catcode`\^=12 -- \catcode`\_=12 -- \catcode`\|=12 -- \catcode`\<=12 -- \catcode`\>=12 -- \catcode`\+=12 -- \catcode`\@=12 -- \catcode`\\=12} -+ \scanctxt -+ \catcode`\\=\other -+} - - % \mbodybackslash is the definition of \ in @macro bodies. - % It maps \foo\ => \csname macarg.foo\endcsname => #N -@@ -4963,45 +6961,42 @@ - \message{Warning: redefining \the\macname}% - \else - \expandafter\ifx\csname \the\macname\endcsname \relax -- \else \errmessage{The name \the\macname\space is reserved}\fi -+ \else \errmessage{Macro name \the\macname\space already defined}\fi - \global\cslet{macsave.\the\macname}{\the\macname}% - \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% -- % Add the macroname to \macrolist -- \toks0 = \expandafter{\macrolist\do}% -- \xdef\macrolist{\the\toks0 -- \expandafter\noexpand\csname\the\macname\endcsname}% -+ \addtomacrolist{\the\macname}% - \fi - \begingroup \macrobodyctxt - \ifrecursive \expandafter\parsermacbody - \else \expandafter\parsemacbody - \fi} - --\def\unmacro{\parsearg\unmacroxxx} --\def\unmacroxxx#1{% -+\parseargdef\unmacro{% - \if1\csname ismacro.#1\endcsname - \global\cslet{#1}{macsave.#1}% - \global\expandafter\let \csname ismacro.#1\endcsname=0% -- % Remove the macro name from \macrolist -+ % Remove the macro name from \macrolist: - \begingroup -- \edef\tempa{\expandafter\noexpand\csname#1\endcsname}% -- \def\do##1{% -- \def\tempb{##1}% -- \ifx\tempa\tempb -- % remove this -- \else -- \toks0 = \expandafter{\newmacrolist\do}% -- \edef\newmacrolist{\the\toks0\expandafter\noexpand\tempa}% -- \fi}% -- \def\newmacrolist{}% -- % Execute macro list to define \newmacrolist -- \macrolist -- \global\let\macrolist\newmacrolist -+ \expandafter\let\csname#1\endcsname \relax -+ \let\definedummyword\unmacrodo -+ \xdef\macrolist{\macrolist}% - \endgroup - \else - \errmessage{Macro #1 not defined}% - \fi - } - -+% Called by \do from \dounmacro on each macro. The idea is to omit any -+% macro definitions that have been changed to \relax. -+% -+\def\unmacrodo#1{% -+ \ifx #1\relax -+ % remove this -+ \else -+ \noexpand\definedummyword \noexpand#1% -+ \fi -+} -+ - % 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 +7106,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) --\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx} -+\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} - \def\braceorlinexxx{% - \ifx\nchar\bgroup\else - \expandafter\parsearg -- \fi \next} -- --% We mant to disable all macros during \shipout so that they are not --% expanded by \write. --\def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}% -- \edef\next{\macrolist}\expandafter\endgroup\next} -+ \fi \macnamexxx} - - - % @alias. - % We need some trickery to remove the optional spaces around the equal - % sign. Just make them active and then expand them all to nothing. --\def\alias{\begingroup\obeyspaces\parsearg\aliasxxx} -+\def\alias{\parseargusing\obeyspaces\aliasxxx} - \def\aliasxxx #1{\aliasyyy#1\relax} --\def\aliasyyy #1=#2\relax{\ignoreactivespaces --\edef\next{\global\let\expandafter\noexpand\csname#1\endcsname=% -- \expandafter\noexpand\csname#2\endcsname}% --\expandafter\endgroup\next} -+\def\aliasyyy #1=#2\relax{% -+ {% -+ \expandafter\let\obeyedspace=\empty -+ \addtomacrolist{#1}% -+ \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% -+ }% -+ \next -+} - - - \message{cross references,} --% @xref etc. - - \newwrite\auxfile -- - \newif\ifhavexrefs % True if xref values are known. - \newif\ifwarnedxrefs % True if we warned once that they aren't known. - -@@ -5147,56 +7139,68 @@ - \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, - node \samp{\ignorespaces#1{}}} - --% @node's job is to define \lastnode. --\def\node{\ENVcheck\parsearg\nodezzz} --\def\nodezzz#1{\nodexxx [#1,]} --\def\nodexxx[#1,#2]{\gdef\lastnode{#1}} -+% @node's only job in TeX is to define \lastnode, which is used in -+% cross-references. The @node line might or might not have commas, and -+% might or might not have spaces before the first comma, like: -+% @node foo , bar , ... -+% We don't want such trailing spaces in the node name. -+% -+\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} -+% -+% also remove a trailing comma, in case of something like this: -+% @node Help-Cross, , , Cross-refs -+\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} -+\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} -+ - \let\nwnode=\node --\let\lastnode=\relax -+\let\lastnode=\empty - --% The sectioning commands (@chapter, etc.) call these. --\def\donoderef{% -- \ifx\lastnode\relax\else -- \expandafter\expandafter\expandafter\setref{\lastnode}% -- {Ysectionnumberandtype}% -- \global\let\lastnode=\relax -- \fi --} --\def\unnumbnoderef{% -- \ifx\lastnode\relax\else -- \expandafter\expandafter\expandafter\setref{\lastnode}{Ynothing}% -- \global\let\lastnode=\relax -- \fi --} --\def\appendixnoderef{% -- \ifx\lastnode\relax\else -- \expandafter\expandafter\expandafter\setref{\lastnode}% -- {Yappendixletterandtype}% -- \global\let\lastnode=\relax -+% Write a cross-reference definition for the current node. #1 is the -+% type (Ynumbered, Yappendix, Ynothing). -+% -+\def\donoderef#1{% -+ \ifx\lastnode\empty\else -+ \setref{\lastnode}{#1}% -+ \global\let\lastnode=\empty - \fi - } - -- - % @anchor{NAME} -- define xref target at arbitrary point. - % - \newcount\savesfregister --\gdef\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} --\gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} --\gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} -+% -+\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} -+\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} -+\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} - --% \setref{NAME}{SNT} defines a cross-reference point NAME, namely --% NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have --% to set \indexdummies so commands such as @code in a section title --% aren't expanded. It would be nicer not to expand the titles in the --% 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 \lastsection, -+% or the anchor name. -+% 2) NAME-snt - section number and type, passed as the SNT arg, or -+% empty for anchors. -+% 3) NAME-pg - the page number. - % --\def\setref#1#2{{% -- \indexdummies -+% This is called from \donoderef, \anchor, and \dofloat. In the case of -+% floats, there is an additional part, which is not written here: -+% 4) NAME-lof - the text as it should appear in a @listoffloats. -+% -+\def\setref#1#2{% - \pdfmkdest{#1}% -- \dosetq{#1-title}{Ytitle}% -- \dosetq{#1-pg}{Ypagenumber}% -- \dosetq{#1-snt}{#2}% --}} -+ \iflinks -+ {% -+ \atdummies % preserve commands, but don't expand them -+ \edef\writexrdef##1##2{% -+ \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef -+ ##1}{##2}}% these are parameters of \writexrdef -+ }% -+ \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 -+ }% -+ \fi -+} - - % @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 +7213,162 @@ - \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup - \unsepspaces - \def\printedmanual{\ignorespaces #5}% -- \def\printednodename{\ignorespaces #3}% -- \setbox1=\hbox{\printedmanual}% -- \setbox0=\hbox{\printednodename}% -+ \def\printedrefname{\ignorespaces #3}% -+ \setbox1=\hbox{\printedmanual\unskip}% -+ \setbox0=\hbox{\printedrefname\unskip}% - \ifdim \wd0 = 0pt - % No printed node name was explicitly given. - \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax - % Use the node name inside the square brackets. -- \def\printednodename{\ignorespaces #1}% -+ \def\printedrefname{\ignorespaces #1}% - \else - % Use the actual chapter/section title appear inside - % the square brackets. Use the real section title if we have it. - \ifdim \wd1 > 0pt - % It is in another manual, so we don't have it. -- \def\printednodename{\ignorespaces #1}% -+ \def\printedrefname{\ignorespaces #1}% - \else - \ifhavexrefs - % We know the real title if we have the xref values. -- \def\printednodename{\refx{#1-title}{}}% -+ \def\printedrefname{\refx{#1-title}{}}% - \else - % Otherwise just copy the Info node name. -- \def\printednodename{\ignorespaces #1}% -+ \def\printedrefname{\ignorespaces #1}% - \fi% - \fi - \fi - \fi - % -- % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not -- % insert empty discretionaries after hyphens, which means that it will -- % not find a line break at a hyphen in a node names. Since some manuals -- % are best written with fairly long node names, containing hyphens, this -- % 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. -+ % Make link in pdf output. - \ifpdf -- \leavevmode -- \getfilename{#4}% -- \ifnum\filenamelength>0 -- \startlink attr{/Border [0 0 0]}% -- goto file{\the\filename.pdf} name{#1@}% -- \else -- \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 -+ goto file{\the\filename.pdf} name{\pdfxrefdest}% -+ \else -+ goto name{\pdfmkpgn{\pdfxrefdest}}% -+ \fi -+ }% -+ \setcolor{\linkcolor}% - \fi - % -- \ifdim \wd1 > 0pt -- \putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}% -+ % Float references are printed completely differently: "Figure 1.2" -+ % instead of "[somenode], p.3". We distinguish them by the -+ % LABEL-title being set to a magic string. -+ {% -+ % Have to otherify everything special to allow the \csname to -+ % include an _ in the xref name, etc. -+ \indexnofonts -+ \turnoffactive -+ \expandafter\global\expandafter\let\expandafter\Xthisreftitle -+ \csname XR#1-title\endcsname -+ }% -+ \iffloat\Xthisreftitle -+ % If the user specified the print name (third arg) to the ref, -+ % print it instead of our usual "Figure 1.2". -+ \ifdim\wd0 = 0pt -+ \refx{#1-snt}{}% -+ \else -+ \printedrefname -+ \fi -+ % -+ % if the user also gave the printed manual name (fifth arg), append -+ % "in MANUALNAME". -+ \ifdim \wd1 > 0pt -+ \space \putwordin{} \cite{\printedmanual}% -+ \fi - \else -- % _ (for example) has to be the character _ for the purposes of the -- % control sequence corresponding to the node, but it has to expand -- % into the usual \leavevmode...\vrule stuff for purposes of -- % printing. So we \turnoffactive for the \refx-snt, back on for the -- % printing, back off for the \refx-pg. -- {\normalturnoffactive -- % Only output a following space if the -snt ref is nonempty; for -- % @unnumbered and @anchor, it won't be. -- \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% -- \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi -- }% -- % [mynode], -- [\printednodename],\space -- % page 3 -- \turnoffactive \putwordpage\tie\refx{#1-pg}{}% -+ % node/anchor (non-float) references. -+ % -+ % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not -+ % insert empty discretionaries after hyphens, which means that it will -+ % not find a line break at a hyphen in a node names. Since some manuals -+ % are best written with fairly long node names, containing hyphens, this -+ % 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}% -+ \else -+ % _ (for example) has to be the character _ for the purposes of the -+ % control sequence corresponding to the node, but it has to expand -+ % into the usual \leavevmode...\vrule stuff for purposes of -+ % printing. So we \turnoffactive for the \refx-snt, back on for the -+ % printing, back off for the \refx-pg. -+ {\turnoffactive -+ % Only output a following space if the -snt ref is nonempty; for -+ % @unnumbered and @anchor, it won't be. -+ \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% -+ \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi -+ }% -+ % output the `[mynode]' via a macro so it can be overridden. -+ \xrefprintnodename\printedrefname -+ % -+ % But we always want a comma and a space: -+ ,\space -+ % -+ % output the `page 3'. -+ \turnoffactive \putwordpage\tie\refx{#1-pg}{}% -+ \fi - \fi - \endlink - \endgroup} - --% \dosetq is the interface for calls from other macros -- --% Use \normalturnoffactive so that punctuation chars such as underscore --% and backslash work in node names. (\turnoffactive doesn't do \.) --\def\dosetq#1#2{% -- {\let\folio=0% -- \normalturnoffactive -- \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}% -- \iflinks -- \next -- \fi -- }% --} -- --% \internalsetq {foo}{page} expands into --% CHARACTERS 'xrdef {foo}{...expansion of \Ypage...} --% When the aux file is read, ' is the escape character -- --\def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}} -- --% Things to be expanded by \internalsetq -- --\def\Ypagenumber{\folio} -- --\def\Ytitle{\thissection} -- --\def\Ynothing{} -- --\def\Ysectionnumberandtype{% --\ifnum\secno=0 \putwordChapter\xreftie\the\chapno % --\else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno % --\else \ifnum \subsubsecno=0 % --\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno % --\else % --\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno % --\fi \fi \fi } -- --\def\Yappendixletterandtype{% --\ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}% --\else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno % --\else \ifnum \subsubsecno=0 % --\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno % --\else % --\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno % --\fi \fi \fi } -- --\gdef\xreftie{'tie} -+% This macro is called from \xrefX for the `[nodename]' part of xref -+% output. It's a separate macro only so it can be changed more easily, -+% since square brackets don't work well in some documents. Particularly -+% one that Bob is working on :). -+% -+\def\xrefprintnodename#1{[#1]} - --% Use TeX 3.0's \inputlineno to get the line number, for better error --% messages, but if we're using an old version of TeX, don't do anything. -+% Things referred to by \setref. - % --\ifx\inputlineno\thisisundefined -- \let\linenumber = \empty % Non-3.0. --\else -- \def\linenumber{\the\inputlineno:\space} --\fi -+\def\Ynothing{} -+\def\Yomitfromtoc{} -+\def\Ynumbered{% -+ \ifnum\secno=0 -+ \putwordChapter@tie \the\chapno -+ \else \ifnum\subsecno=0 -+ \putwordSection@tie \the\chapno.\the\secno -+ \else \ifnum\subsubsecno=0 -+ \putwordSection@tie \the\chapno.\the\secno.\the\subsecno -+ \else -+ \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno -+ \fi\fi\fi -+} -+\def\Yappendix{% -+ \ifnum\secno=0 -+ \putwordAppendix@tie @char\the\appendixno{}% -+ \else \ifnum\subsecno=0 -+ \putwordSection@tie @char\the\appendixno.\the\secno -+ \else \ifnum\subsubsecno=0 -+ \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno -+ \else -+ \putwordSection@tie -+ @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno -+ \fi\fi\fi -+} - - % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. - % If its value is nonempty, SUFFIX is output afterward. -- -+% - \def\refx#1#2{% -- \expandafter\ifx\csname X#1\endcsname\relax -+ {% -+ \indexnofonts -+ \otherbackslash -+ \expandafter\global\expandafter\let\expandafter\thisrefX -+ \csname XR#1\endcsname -+ }% -+ \ifx\thisrefX\relax - % If not defined, say something at least. - \angleleft un\-de\-fined\angleright - \iflinks -@@ -5352,22 +7383,59 @@ - \fi - \else - % It's defined, so just use it. -- \csname X#1\endcsname -+ \thisrefX - \fi - #2% Output the suffix in any case. - } - --% This is the macro invoked by entries in the aux file. -+% This is the macro invoked by entries in the aux file. Usually it's -+% just a \def (we prepend XR to the control sequence name to avoid -+% collisions). But if this is a float type, we have more work to do. - % --\def\xrdef#1{\begingroup -- % Reenable \ as an escape while reading the second argument. -- \catcode`\\ = 0 -- \afterassignment\endgroup -- \expandafter\gdef\csname X#1\endcsname -+\def\xrdef#1#2{% -+ {% The node name might contain 8-bit characters, which in our current -+ % implementation are changed to commands like @'e. Don't let these -+ % mess up the control sequence name. -+ \indexnofonts -+ \turnoffactive -+ \xdef\safexrefname{#1}% -+ }% -+ % -+ \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref -+ % -+ % Was that xref control sequence that we just defined for a float? -+ \expandafter\iffloat\csname XR\safexrefname\endcsname -+ % it was a float, and we have the (safe) float type in \iffloattype. -+ \expandafter\let\expandafter\floatlist -+ \csname floatlist\iffloattype\endcsname -+ % -+ % Is this the first time we've seen this float type? -+ \expandafter\ifx\floatlist\relax -+ \toks0 = {\do}% yes, so just \do -+ \else -+ % had it before, so preserve previous elements in list. -+ \toks0 = \expandafter{\floatlist\do}% -+ \fi -+ % -+ % Remember this xref in the control sequence \floatlistFLOATTYPE, -+ % for later use in \listoffloats. -+ \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 -+ {\safexrefname}}% -+ \fi - } - - % Read the last existing aux file, if any. No error if none exists. --\def\readauxfile{\begingroup -+% -+\def\tryauxfile{% -+ \openin 1 \jobname.aux -+ \ifeof 1 \else -+ \readdatafile{aux}% -+ \global\havexrefstrue -+ \fi -+ \closein 1 -+} -+ -+\def\setupdatafile{% - \catcode`\^^@=\other - \catcode`\^^A=\other - \catcode`\^^B=\other -@@ -5395,9 +7463,7 @@ - \catcode`\^^]=\other - \catcode`\^^^=\other - \catcode`\^^_=\other -- \catcode`\@=\other -- \catcode`\^=\other -- % It was suggested to define this as 7, which would allow ^^e4 etc. -+ % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. - % 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 +7476,9 @@ - % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter - % and then to call \auxhat in \setq. - % -+ \catcode`\^=\other -+ % -+ % Special characters. Should be turned off anyway, but... - \catcode`\~=\other - \catcode`\[=\other - \catcode`\]=\other -@@ -5421,41 +7490,43 @@ - \catcode`\$=\other - \catcode`\#=\other - \catcode`\&=\other -+ \catcode`\%=\other - \catcode`+=\other % avoid \+ for paranoia even though we've turned it off -- % Make the characters 128-255 be printing characters -+ % -+ % This is to support \ in node names and titles, since the \ -+ % characters end up in a \csname. It's easier than -+ % leaving it active and making its active definition an actual \ -+ % character. What I don't understand is why it works in the *value* -+ % of the xrdef. Seems like it should be a catcode12 \, and that -+ % should not typeset properly. But it works, so I'm moving on for -+ % now. --karl, 15jan04. -+ \catcode`\\=\other -+ % -+ % Make the characters 128-255 be printing characters. - {% -- \count 1=128 -+ \count1=128 - \def\loop{% -- \catcode\count 1=\other -- \advance\count 1 by 1 -- \ifnum \count 1<256 \loop \fi -+ \catcode\count1=\other -+ \advance\count1 by 1 -+ \ifnum \count1<256 \loop \fi - }% - }% -- % The aux file uses ' as the escape (for now). -- % Turn off \ as an escape so we do not lose on -- % entries which were dumped with control sequences in their names. -- % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ -- % Reference to such entries still does not work the way one would wish, -- % but at least they do not bomb out when the aux file is read in. -+ % -+ % @ is our escape character in .aux files, and we need braces. - \catcode`\{=1 - \catcode`\}=2 -- \catcode`\%=\other -- \catcode`\'=0 -- \catcode`\\=\other -- % -- \openin 1 \jobname.aux -- \ifeof 1 \else -- \closein 1 -- \input \jobname.aux -- \global\havexrefstrue -- \global\warnedobstrue -- \fi -- % Open the new aux file. TeX will close it automatically at exit. -- \openout\auxfile=\jobname.aux -+ \catcode`\@=0 -+} -+ -+\def\readdatafile#1{% -+\begingroup -+ \setupdatafile -+ \input\jobname.#1 - \endgroup} - - --% Footnotes. -+\message{insertions,} -+% including footnotes. - - \newcount \footnoteno - -@@ -5469,37 +7540,39 @@ - % @footnotestyle is meaningful for info output only. - \let\footnotestyle=\comment - --\let\ptexfootnote=\footnote -- - {\catcode `\@=11 - % - % Auto-number footnotes. Otherwise like plain. - \gdef\footnote{% -+ \let\indent=\ptexindent -+ \let\noindent=\ptexnoindent - \global\advance\footnoteno by \@ne - \edef\thisfootno{$^{\the\footnoteno}$}% - % - % In case the footnote comes at the end of a sentence, preserve the - % extra spacing after we do the footnote number. - \let\@sf\empty -- \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi -+ \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi - % - % Remove inadvertent blank space before typesetting the footnote number. - \unskip - \thisfootno\@sf -- \footnotezzz -+ \dofootnote - }% - - % Don't bother with the trickery in plain.tex to not require the - % footnote text as a parameter. Our footnotes don't need to be so general. - % --% Oh yes, they do; otherwise, @ifset and anything else that uses --% \parseargline fail inside footnotes because the tokens are fixed when -+% Oh yes, they do; otherwise, @ifset (and anything else that uses -+% \parseargline) fails inside footnotes because the tokens are fixed when - % the footnote is read. --karl, 16nov96. - % --\long\gdef\footnotezzz{\insert\footins\bgroup -+\gdef\dofootnote{% -+ \insert\footins\bgroup - % We want to typeset this text as a normal paragraph, even if the - % footnote reference occurs in (for example) a display environment. - % So reset some parameters. -+ \hsize=\pagewidth - \interlinepenalty\interfootnotelinepenalty - \splittopskip\ht\strutbox % top baseline for broken footnotes - \splitmaxdepth\dp\strutbox -@@ -5512,8 +7585,15 @@ - % - \smallfonts \rm - % -- % Hang the footnote text off the number. -- \hang -+ % Because we use hanging indentation in footnotes, a @noindent appears -+ % to exdent this text, so make it be a no-op. makeinfo does not use -+ % hanging indentation so @noindent can still be needed within footnote -+ % text after an @example or the like (not that this is good style). -+ \let\noindent = \relax -+ % -+ % Hang the footnote text off the number. Use \everypar in case the -+ % footnote extends for more than one paragraph. -+ \everypar = {\hang}% - \textindent{\thisfootno}% - % - % Don't crash into the line above the footnote text. Since this -@@ -5522,66 +7602,68 @@ - \footstrut - \futurelet\next\fo@t - } --\def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t -- \else\let\next\f@t\fi \next} --\def\f@@t{\bgroup\aftergroup\@foot\let\next} --\def\f@t#1{#1\@foot} --\def\@foot{\strut\par\egroup} -- - }%end \catcode `\@=11 - --% Set the baselineskip to #1, and the lineskip and strut size --% correspondingly. There is no deep meaning behind these magic numbers --% used as factors; they just match (closely enough) what Knuth defined. --% --\def\lineskipfactor{.08333} --\def\strutheightpercent{.70833} --\def\strutdepthpercent {.29167} -+% 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. -+% 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. -+ -+% Replace the \insert primitive by a cheating macro. -+% Deeper inside, just make sure that the saved insertions are not spilled -+% out prematurely. - % --\def\setleading#1{% -- \normalbaselineskip = #1\relax -- \normallineskip = \lineskipfactor\normalbaselineskip -- \normalbaselines -- \setbox\strutbox =\hbox{% -- \vrule width0pt height\strutheightpercent\baselineskip -- depth \strutdepthpercent \baselineskip -- }% -+\def\startsavinginserts{% -+ \ifx \insert\ptexinsert -+ \let\insert\saveinsert -+ \else -+ \let\checkinserts\relax -+ \fi - } - --% @| inserts a changebar to the left of the current line. It should --% surround any changed text. This approach does *not* work if the --% change spans more than two lines of output. To handle that, we would --% have adopt a much more difficult approach (putting marks into the main --% vertical list for the beginning and end of each change). -+% This \insert replacement works for both \insert\footins{foo} and -+% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. - % --\def\|{% -- % \vadjust can only be used in horizontal mode. -- \leavevmode -- % -- % Append this vertical mode material after the current line in the output. -- \vadjust{% -- % We want to insert a rule with the height and depth of the current -- % leading; that is exactly what \strutbox is supposed to record. -- \vskip-\baselineskip -- % -- % \vadjust-items are inserted at the left edge of the type. So -- % the \llap here moves out into the left-hand margin. -- \llap{% -- % -- % For a thicker or thinner bar, change the `1pt'. -- \vrule height\baselineskip width1pt -- % -- % This is the space between the bar and the text. -- \hskip 12pt -- }% -- }% -+\def\saveinsert#1{% -+ \edef\next{\noexpand\savetobox \makeSAVEname#1}% -+ \afterassignment\next -+ % swallow the left brace -+ \let\temp = - } -+\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} -+\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} -+ -+\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} -+ -+\def\placesaveins#1{% -+ \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname -+ {\box#1}% -+} -+ -+% eat @SAVE -- beware, all of them have catcode \other: -+{ -+ \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) -+ \gdef\gobblesave @SAVE{} -+} -+ -+% initialization: -+\def\newsaveins #1{% -+ \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% -+ \next -+} -+\def\newsaveinsX #1{% -+ \csname newbox\endcsname #1% -+ \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts -+ \checksaveins #1}% -+} -+ -+% initialize: -+\let\checkinserts\empty -+\newsaveins\footins -+\newsaveins\margin - --% For a final copy, take out the rectangles --% that mark overfull boxes (in case you have decided --% that the text looks ok even though it passes the margin). --% --\def\finalout{\overfullrule=0pt} - - % @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 +7673,12 @@ - % undone and the next image would fail. - \openin 1 = epsf.tex - \ifeof 1 \else -- \closein 1 -- % Do not bother showing banner with post-v2.7 epsf.tex (available in -- % doc/epsf.tex until it shows up on ctan). -+ % Do not bother showing banner with epsf.tex v2.7k (available in -+ % doc/epsf.tex and on ctan). - \def\epsfannounce{\toks0 = }% - \input epsf.tex - \fi -+\closein 1 - % - % We will only complain once about lack of epsf.tex. - \newif\ifwarnednoepsf -@@ -5612,77 +7694,1218 @@ - \global\warnednoepsftrue - \fi - \else -- \imagexxx #1,,,\finish -+ \imagexxx #1,,,,,\finish - \fi - } - % - % Arguments to @image: - % #1 is (mandatory) image filename; we tack on .eps extension. - % #2 is (optional) width, #3 is (optional) height. --% #4 is just the usual extra ignored arg for parsing this stuff. --\def\imagexxx#1,#2,#3,#4\finish{% -+% #4 is (ignored optional) html alt text. -+% #5 is (ignored optional) extension. -+% #6 is just the usual extra ignored arg for parsing this stuff. -+\newif\ifimagevmode -+\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup -+ \catcode`\^^M = 5 % in case we're inside an example -+ \normalturnoffactive % allow _ et al. in names -+ % If the image is by itself, center it. -+ \ifvmode -+ \imagevmodetrue -+ \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 -+ \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}}% -+ \dopdfimage{#1}{#2}{#3}% - \else - % \epsfbox itself resets \epsf?size at each figure. - \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi - \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi -- \begingroup -- \catcode`\^^M = 5 % in case we're inside an example -- % If the image is by itself, center it. -- \ifvmode -- \nobreak\bigskip -- % 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 -- \centerline{\epsfbox{#1.eps}}% -- \bigbreak -- \else -- % In the middle of a paragraph, no extra space. -- \epsfbox{#1.eps}% -+ \epsfbox{#1.eps}% -+ \fi -+ % -+ \ifimagevmode \medskip \fi % space after the standalone image -+\endgroup} -+ -+ -+% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, -+% etc. We don't actually implement floating yet, we always include the -+% float "here". But it seemed the best name for the future. -+% -+\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} -+ -+% There may be a space before second and/or third parameter; delete it. -+\def\eatcommaspace#1, {#1,} -+ -+% #1 is the optional FLOATTYPE, the text label for this float, typically -+% "Figure", "Table", "Example", etc. Can't contain commas. If omitted, -+% this float will not be numbered and cannot be referred to. -+% -+% #2 is the optional xref label. Also must be present for the float to -+% be referable. -+% -+% #3 is the optional positioning argument; for now, it is ignored. It -+% will somehow specify the positions allowed to float to (here, top, bottom). -+% -+% We keep a separate counter for each FLOATTYPE, which we reset at each -+% chapter-level command. -+\let\resetallfloatnos=\empty -+% -+\def\dofloat#1,#2,#3,#4\finish{% -+ \let\thiscaption=\empty -+ \let\thisshortcaption=\empty -+ % -+ % don't lose footnotes inside @float. -+ % -+ % BEWARE: when the floats start float, we have to issue warning whenever an -+ % insert appears inside a float which could possibly float. --kasal, 26may04 -+ % -+ \startsavinginserts -+ % -+ % We can't be used inside a paragraph. -+ \par -+ % -+ \vtop\bgroup -+ \def\floattype{#1}% -+ \def\floatlabel{#2}% -+ \def\floatloc{#3}% we do nothing with this yet. -+ % -+ \ifx\floattype\empty -+ \let\safefloattype=\empty -+ \else -+ {% -+ % the floattype might have accents or other special characters, -+ % but we need to use it in a control sequence name. -+ \indexnofonts -+ \turnoffactive -+ \xdef\safefloattype{\floattype}% -+ }% -+ \fi -+ % -+ % If label is given but no type, we handle that as the empty type. -+ \ifx\floatlabel\empty \else -+ % We want each FLOATTYPE to be numbered separately (Figure 1, -+ % Table 1, Figure 2, ...). (And if no label, no number.) -+ % -+ \expandafter\getfloatno\csname\safefloattype floatno\endcsname -+ \global\advance\floatno by 1 -+ % -+ {% -+ % 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\lastsection{\floatmagic=\safefloattype}% -+ \setref{\floatlabel}{Yfloat}% -+ }% -+ \fi -+ % -+ % start with \parskip glue, I guess. -+ \vskip\parskip -+ % -+ % Don't suppress indentation if a float happens to start a section. -+ \restorefirstparagraphindent -+} -+ -+% we have these possibilities: -+% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap -+% @float Foo,lbl & no caption: Foo 1.1 -+% @float Foo & @caption{Cap}: Foo: Cap -+% @float Foo & no caption: Foo -+% @float ,lbl & Caption{Cap}: 1.1: Cap -+% @float ,lbl & no caption: 1.1 -+% @float & @caption{Cap}: Cap -+% @float & no caption: -+% -+\def\Efloat{% -+ \let\floatident = \empty -+ % -+ % In all cases, if we have a float type, it comes first. -+ \ifx\floattype\empty \else \def\floatident{\floattype}\fi -+ % -+ % If we have an xref label, the number comes next. -+ \ifx\floatlabel\empty \else -+ \ifx\floattype\empty \else % if also had float type, need tie first. -+ \appendtomacro\floatident{\tie}% - \fi -+ % the number. -+ \appendtomacro\floatident{\chaplevelprefix\the\floatno}% -+ \fi -+ % -+ % Start the printed caption with what we've constructed in -+ % \floatident, but keep it separate; we need \floatident again. -+ \let\captionline = \floatident -+ % -+ \ifx\thiscaption\empty \else -+ \ifx\floatident\empty \else -+ \appendtomacro\captionline{: }% had ident, so need a colon between -+ \fi -+ % -+ % caption text. -+ \appendtomacro\captionline{\scanexp\thiscaption}% -+ \fi -+ % -+ % If we have anything to print, print it, with space before. -+ % Eventually this needs to become an \insert. -+ \ifx\captionline\empty \else -+ \vskip.5\parskip -+ \captionline -+ % -+ % Space below caption. -+ \vskip\parskip -+ \fi -+ % -+ % If have an xref label, write the list of floats info. Do this -+ % after the caption, to avoid chance of it being a breakpoint. -+ \ifx\floatlabel\empty \else -+ % Write the text that goes in the lof to the aux file as -+ % \floatlabel-lof. Besides \floatident, we include the short -+ % caption if specified, else the full caption if specified, else nothing. -+ {% -+ \atdummies -+ % -+ % since we read the caption text in the macro world, where ^^M -+ % is turned into a normal character, we have to scan it back, so -+ % we don't write the literal three characters "^^M" into the aux file. -+ \scanexp{% -+ \xdef\noexpand\gtemp{% -+ \ifx\thisshortcaption\empty -+ \thiscaption -+ \else -+ \thisshortcaption -+ \fi -+ }% -+ }% -+ \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident -+ \ifx\gtemp\empty \else : \gtemp \fi}}% -+ }% -+ \fi -+ \egroup % end of \vtop -+ % -+ % place the captured inserts -+ % -+ % BEWARE: when the floats start floating, we have to issue warning -+ % whenever an insert appears inside a float which could possibly -+ % float. --kasal, 26may04 -+ % -+ \checkinserts -+} -+ -+% Append the tokens #2 to the definition of macro #1, not expanding either. -+% -+\def\appendtomacro#1#2{% -+ \expandafter\def\expandafter#1\expandafter{#1#2}% -+} -+ -+% @caption, @shortcaption -+% -+\def\caption{\docaption\thiscaption} -+\def\shortcaption{\docaption\thisshortcaption} -+\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} -+\def\defcaption#1#2{\egroup \def#1{#2}} -+ -+% The parameter is the control sequence identifying the counter we are -+% going to use. Create it if it doesn't exist and assign it to \floatno. -+\def\getfloatno#1{% -+ \ifx#1\relax -+ % Haven't seen this figure type before. -+ \csname newcount\endcsname #1% -+ % -+ % Remember to reset this floatno at the next chap. -+ \expandafter\gdef\expandafter\resetallfloatnos -+ \expandafter{\resetallfloatnos #1=0 }% -+ \fi -+ \let\floatno#1% -+} -+ -+% \setref calls this to get the XREFLABEL-snt value. We want an @xref -+% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we -+% first read the @float command. -+% -+\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% -+ -+% Magic string used for the XREFLABEL-title value, so \xrefX can -+% distinguish floats from other xref types. -+\def\floatmagic{!!float!!} -+ -+% #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 -+% \lastsection value which we \setref above. -+% -+\def\iffloat#1{\expandafter\doiffloat#1==\finish} -+% -+% #1 is (maybe) the \floatmagic string. If so, #2 will be the -+% (safe) float type for this float. We set \iffloattype to #2. -+% -+\def\doiffloat#1=#2=#3\finish{% -+ \def\temp{#1}% -+ \def\iffloattype{#2}% -+ \ifx\temp\floatmagic -+} -+ -+% @listoffloats FLOATTYPE - print a list of floats like a table of contents. -+% -+\parseargdef\listoffloats{% -+ \def\floattype{#1}% floattype -+ {% -+ % the floattype might have accents or other special characters, -+ % but we need to use it in a control sequence name. -+ \indexnofonts -+ \turnoffactive -+ \xdef\safefloattype{\floattype}% -+ }% -+ % -+ % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. -+ \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax -+ \ifhavexrefs -+ % if the user said @listoffloats foo but never @float foo. -+ \message{\linenumber No `\safefloattype' floats to list.}% -+ \fi -+ \else -+ \begingroup -+ \leftskip=\tocindent % indent these entries like a toc -+ \let\do=\listoffloatsdo -+ \csname floatlist\safefloattype\endcsname - \endgroup - \fi - } - -+% This is called on each entry in a list of floats. We're passed the -+% xref label, in the form LABEL-title, which is how we save it in the -+% aux file. We strip off the -title and look up \XRLABEL-lof, which -+% has the text we're supposed to typeset here. -+% -+% Figures without xref labels will not be included in the list (since -+% they won't appear in the aux file). -+% -+\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} -+\def\listoffloatsdoentry#1-title\finish{{% -+ % Can't fully expand XR#1-lof because it can contain anything. Just -+ % pass the control sequence. On the other hand, XR#1-pg is just the -+ % page number, and we want to fully expand that so we can get a link -+ % in pdf output. -+ \toksA = \expandafter{\csname XR#1-lof\endcsname}% -+ % -+ % use the same \entry macro we use to generate the TOC and index. -+ \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% -+ \writeentry -+}} -+ - - \message{localization,} --% and i18n. - --% @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. -+% 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{% -+{ -+ \catcode`\_ = \active -+ \globaldefs=1 -+\parseargdef\documentlanguage{\begingroup -+ \let_=\normalunderscore % normal _ character for filenames - \tex % read txi-??.tex file in plain TeX. -- % Read the file if it exists. -+ % Read the file by the name they passed if it exists. -+ \openin 1 txi-#1.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 % end raw TeX -+\endgroup} -+% -+% If they passed de_DE, and txi-de_DE.tex doesn't exist, -+% try txi-de.tex. -+% -+\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% - \openin 1 txi-#1.tex -- \ifeof1 -+ \ifeof 1 - \errhelp = \nolanghelp - \errmessage{Cannot read language file txi-#1.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? 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 -+} - --% @documentencoding should change something in TeX eventually, most --% likely, but for now just recognize it. --\let\documentencoding = \comment -+% 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\relax -+ \advance\count255 by 1 -+ \repeat -+} - -+\def\setnonasciicharscatcodenonglobal#1{% -+ \count255=128 -+ \loop\ifnum\count255<256 -+ \catcode\count255=#1\relax -+ \advance\count255 by 1 -+ \repeat -+} - --% Page size parameters. -+% @documentencoding sets the definition of non-ASCII characters -+% according to the specified encoding. -+% -+\parseargdef\documentencoding{% -+ % Encoding being declared for the document. -+ \def\declaredencoding{\csname #1.enc\endcsname}% -+ % -+ % Supported encodings: names converted to tokens in order to be able -+ % to compare them with \ifx. -+ \def\ascii{\csname US-ASCII.enc\endcsname}% -+ \def\latnine{\csname ISO-8859-15.enc\endcsname}% -+ \def\latone{\csname ISO-8859-1.enc\endcsname}% -+ \def\lattwo{\csname ISO-8859-2.enc\endcsname}% -+ \def\utfeight{\csname UTF-8.enc\endcsname}% -+ % -+ \ifx \declaredencoding \ascii -+ \asciichardefs -+ % -+ \else \ifx \declaredencoding \lattwo -+ \setnonasciicharscatcode\active -+ \lattwochardefs -+ % -+ \else \ifx \declaredencoding \latone -+ \setnonasciicharscatcode\active -+ \latonechardefs -+ % -+ \else \ifx \declaredencoding \latnine -+ \setnonasciicharscatcode\active -+ \latninechardefs -+ % -+ \else \ifx \declaredencoding \utfeight -+ \setnonasciicharscatcode\active -+ \utfeightchardefs -+ % -+ \else -+ \message{Unknown document encoding #1, ignoring.}% -+ % -+ \fi % utfeight -+ \fi % latnine -+ \fi % latone -+ \fi % lattwo -+ \fi % ascii -+} -+ -+% 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} -+ -+% 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. -+\setnonasciicharscatcode\active -+% -+% Latin1 (ISO-8859-1) character definitions. -+\def\latonechardefs{% -+ \gdef^^a0{~} -+ \gdef^^a1{\exclamdown} -+ \gdef^^a2{\missingcharmsg{CENT SIGN}} -+ \gdef^^a3{{\pounds}} -+ \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} -+ \gdef^^a5{\missingcharmsg{YEN SIGN}} -+ \gdef^^a6{\missingcharmsg{BROKEN BAR}} -+ \gdef^^a7{\S} -+ \gdef^^a8{\"{}} -+ \gdef^^a9{\copyright} -+ \gdef^^aa{\ordf} -+ \gdef^^ab{\guillemetleft} -+ \gdef^^ac{$\lnot$} -+ \gdef^^ad{\-} -+ \gdef^^ae{\registeredsymbol} -+ \gdef^^af{\={}} -+ % -+ \gdef^^b0{\textdegree} -+ \gdef^^b1{$\pm$} -+ \gdef^^b2{$^2$} -+ \gdef^^b3{$^3$} -+ \gdef^^b4{\'{}} -+ \gdef^^b5{$\mu$} -+ \gdef^^b6{\P} -+ % -+ \gdef^^b7{$^.$} -+ \gdef^^b8{\cedilla\ } -+ \gdef^^b9{$^1$} -+ \gdef^^ba{\ordm} -+ % -+ \gdef^^bb{\guilletright} -+ \gdef^^bc{$1\over4$} -+ \gdef^^bd{$1\over2$} -+ \gdef^^be{$3\over4$} -+ \gdef^^bf{\questiondown} -+ % -+ \gdef^^c0{\`A} -+ \gdef^^c1{\'A} -+ \gdef^^c2{\^A} -+ \gdef^^c3{\~A} -+ \gdef^^c4{\"A} -+ \gdef^^c5{\ringaccent A} -+ \gdef^^c6{\AE} -+ \gdef^^c7{\cedilla C} -+ \gdef^^c8{\`E} -+ \gdef^^c9{\'E} -+ \gdef^^ca{\^E} -+ \gdef^^cb{\"E} -+ \gdef^^cc{\`I} -+ \gdef^^cd{\'I} -+ \gdef^^ce{\^I} -+ \gdef^^cf{\"I} -+ % -+ \gdef^^d0{\DH} -+ \gdef^^d1{\~N} -+ \gdef^^d2{\`O} -+ \gdef^^d3{\'O} -+ \gdef^^d4{\^O} -+ \gdef^^d5{\~O} -+ \gdef^^d6{\"O} -+ \gdef^^d7{$\times$} -+ \gdef^^d8{\O} -+ \gdef^^d9{\`U} -+ \gdef^^da{\'U} -+ \gdef^^db{\^U} -+ \gdef^^dc{\"U} -+ \gdef^^dd{\'Y} -+ \gdef^^de{\TH} -+ \gdef^^df{\ss} -+ % -+ \gdef^^e0{\`a} -+ \gdef^^e1{\'a} -+ \gdef^^e2{\^a} -+ \gdef^^e3{\~a} -+ \gdef^^e4{\"a} -+ \gdef^^e5{\ringaccent a} -+ \gdef^^e6{\ae} -+ \gdef^^e7{\cedilla c} -+ \gdef^^e8{\`e} -+ \gdef^^e9{\'e} -+ \gdef^^ea{\^e} -+ \gdef^^eb{\"e} -+ \gdef^^ec{\`{\dotless i}} -+ \gdef^^ed{\'{\dotless i}} -+ \gdef^^ee{\^{\dotless i}} -+ \gdef^^ef{\"{\dotless i}} -+ % -+ \gdef^^f0{\dh} -+ \gdef^^f1{\~n} -+ \gdef^^f2{\`o} -+ \gdef^^f3{\'o} -+ \gdef^^f4{\^o} -+ \gdef^^f5{\~o} -+ \gdef^^f6{\"o} -+ \gdef^^f7{$\div$} -+ \gdef^^f8{\o} -+ \gdef^^f9{\`u} -+ \gdef^^fa{\'u} -+ \gdef^^fb{\^u} -+ \gdef^^fc{\"u} -+ \gdef^^fd{\'y} -+ \gdef^^fe{\th} -+ \gdef^^ff{\"y} -+} -+ -+% Latin9 (ISO-8859-15) encoding character definitions. -+\def\latninechardefs{% -+ % Encoding is almost identical to Latin1. -+ \latonechardefs -+ % -+ \gdef^^a4{\euro} -+ \gdef^^a6{\v S} -+ \gdef^^a8{\v s} -+ \gdef^^b4{\v Z} -+ \gdef^^b8{\v z} -+ \gdef^^bc{\OE} -+ \gdef^^bd{\oe} -+ \gdef^^be{\"Y} -+} -+ -+% Latin2 (ISO-8859-2) character definitions. -+\def\lattwochardefs{% -+ \gdef^^a0{~} -+ \gdef^^a1{\ogonek{A}} -+ \gdef^^a2{\u{}} -+ \gdef^^a3{\L} -+ \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} -+ \gdef^^a5{\v L} -+ \gdef^^a6{\'S} -+ \gdef^^a7{\S} -+ \gdef^^a8{\"{}} -+ \gdef^^a9{\v S} -+ \gdef^^aa{\cedilla S} -+ \gdef^^ab{\v T} -+ \gdef^^ac{\'Z} -+ \gdef^^ad{\-} -+ \gdef^^ae{\v Z} -+ \gdef^^af{\dotaccent Z} -+ % -+ \gdef^^b0{\textdegree} -+ \gdef^^b1{\ogonek{a}} -+ \gdef^^b2{\ogonek{ }} -+ \gdef^^b3{\l} -+ \gdef^^b4{\'{}} -+ \gdef^^b5{\v l} -+ \gdef^^b6{\'s} -+ \gdef^^b7{\v{}} -+ \gdef^^b8{\cedilla\ } -+ \gdef^^b9{\v s} -+ \gdef^^ba{\cedilla s} -+ \gdef^^bb{\v t} -+ \gdef^^bc{\'z} -+ \gdef^^bd{\H{}} -+ \gdef^^be{\v z} -+ \gdef^^bf{\dotaccent z} -+ % -+ \gdef^^c0{\'R} -+ \gdef^^c1{\'A} -+ \gdef^^c2{\^A} -+ \gdef^^c3{\u A} -+ \gdef^^c4{\"A} -+ \gdef^^c5{\'L} -+ \gdef^^c6{\'C} -+ \gdef^^c7{\cedilla C} -+ \gdef^^c8{\v C} -+ \gdef^^c9{\'E} -+ \gdef^^ca{\ogonek{E}} -+ \gdef^^cb{\"E} -+ \gdef^^cc{\v E} -+ \gdef^^cd{\'I} -+ \gdef^^ce{\^I} -+ \gdef^^cf{\v D} -+ % -+ \gdef^^d0{\DH} -+ \gdef^^d1{\'N} -+ \gdef^^d2{\v N} -+ \gdef^^d3{\'O} -+ \gdef^^d4{\^O} -+ \gdef^^d5{\H O} -+ \gdef^^d6{\"O} -+ \gdef^^d7{$\times$} -+ \gdef^^d8{\v R} -+ \gdef^^d9{\ringaccent U} -+ \gdef^^da{\'U} -+ \gdef^^db{\H U} -+ \gdef^^dc{\"U} -+ \gdef^^dd{\'Y} -+ \gdef^^de{\cedilla T} -+ \gdef^^df{\ss} -+ % -+ \gdef^^e0{\'r} -+ \gdef^^e1{\'a} -+ \gdef^^e2{\^a} -+ \gdef^^e3{\u a} -+ \gdef^^e4{\"a} -+ \gdef^^e5{\'l} -+ \gdef^^e6{\'c} -+ \gdef^^e7{\cedilla c} -+ \gdef^^e8{\v c} -+ \gdef^^e9{\'e} -+ \gdef^^ea{\ogonek{e}} -+ \gdef^^eb{\"e} -+ \gdef^^ec{\v e} -+ \gdef^^ed{\'\i} -+ \gdef^^ee{\^\i} -+ \gdef^^ef{\v d} -+ % -+ \gdef^^f0{\dh} -+ \gdef^^f1{\'n} -+ \gdef^^f2{\v n} -+ \gdef^^f3{\'o} -+ \gdef^^f4{\^o} -+ \gdef^^f5{\H o} -+ \gdef^^f6{\"o} -+ \gdef^^f7{$\div$} -+ \gdef^^f8{\v r} -+ \gdef^^f9{\ringaccent u} -+ \gdef^^fa{\'u} -+ \gdef^^fb{\H u} -+ \gdef^^fc{\"u} -+ \gdef^^fd{\'y} -+ \gdef^^fe{\cedilla t} -+ \gdef^^ff{\dotaccent{}} -+} -+ -+% 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 -+ -+\gdef\UTFviiiTwoOctets#1#2{\expandafter -+ \UTFviiiDefined\csname u8:#1\string #2\endcsname} -+% -+\gdef\UTFviiiThreeOctets#1#2#3{\expandafter -+ \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} -+% -+\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter -+ \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} -+ -+\gdef\UTFviiiDefined#1{% -+ \ifx #1\relax -+ \message{\linenumber Unicode char \string #1 not defined for Texinfo}% -+ \else -+ \expandafter #1% -+ \fi -+} -+ -+\begingroup -+ \catcode`\~13 -+ \catcode`\"12 -+ -+ \def\UTFviiiLoop{% -+ \global\catcode\countUTFx\active -+ \uccode`\~\countUTFx -+ \uppercase\expandafter{\UTFviiiTmp}% -+ \advance\countUTFx by 1 -+ \ifnum\countUTFx < \countUTFy -+ \expandafter\UTFviiiLoop -+ \fi} -+ -+ \countUTFx = "C2 -+ \countUTFy = "E0 -+ \def\UTFviiiTmp{% -+ \xdef~{\noexpand\UTFviiiTwoOctets\string~}} -+ \UTFviiiLoop -+ -+ \countUTFx = "E0 -+ \countUTFy = "F0 -+ \def\UTFviiiTmp{% -+ \xdef~{\noexpand\UTFviiiThreeOctets\string~}} -+ \UTFviiiLoop -+ -+ \countUTFx = "F0 -+ \countUTFy = "F4 -+ \def\UTFviiiTmp{% -+ \xdef~{\noexpand\UTFviiiFourOctets\string~}} -+ \UTFviiiLoop -+\endgroup -+ -+\begingroup -+ \catcode`\"=12 -+ \catcode`\<=12 -+ \catcode`\.=12 -+ \catcode`\,=12 -+ \catcode`\;=12 -+ \catcode`\!=12 -+ \catcode`\~=13 -+ -+ \gdef\DeclareUnicodeCharacter#1#2{% -+ \countUTFz = "#1\relax -+ \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% -+ \begingroup -+ \parseXMLCharref -+ \def\UTFviiiTwoOctets##1##2{% -+ \csname u8:##1\string ##2\endcsname}% -+ \def\UTFviiiThreeOctets##1##2##3{% -+ \csname u8:##1\string ##2\string ##3\endcsname}% -+ \def\UTFviiiFourOctets##1##2##3##4{% -+ \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% -+ \expandafter\expandafter\expandafter\expandafter -+ \expandafter\expandafter\expandafter -+ \gdef\UTFviiiTmp{#2}% -+ \endgroup} -+ -+ \gdef\parseXMLCharref{% -+ \ifnum\countUTFz < "A0\relax -+ \errhelp = \EMsimple -+ \errmessage{Cannot define Unicode char value < 00A0}% -+ \else\ifnum\countUTFz < "800\relax -+ \parseUTFviiiA,% -+ \parseUTFviiiB C\UTFviiiTwoOctets.,% -+ \else\ifnum\countUTFz < "10000\relax -+ \parseUTFviiiA;% -+ \parseUTFviiiA,% -+ \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% -+ \else -+ \parseUTFviiiA;% -+ \parseUTFviiiA,% -+ \parseUTFviiiA!% -+ \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% -+ \fi\fi\fi -+ } -+ -+ \gdef\parseUTFviiiA#1{% -+ \countUTFx = \countUTFz -+ \divide\countUTFz by 64 -+ \countUTFy = \countUTFz -+ \multiply\countUTFz by 64 -+ \advance\countUTFx by -\countUTFz -+ \advance\countUTFx by 128 -+ \uccode `#1\countUTFx -+ \countUTFz = \countUTFy} -+ -+ \gdef\parseUTFviiiB#1#2#3#4{% -+ \advance\countUTFz by "#10\relax -+ \uccode `#3\countUTFz -+ \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} -+\endgroup -+ -+\def\utfeightchardefs{% -+ \DeclareUnicodeCharacter{00A0}{\tie} -+ \DeclareUnicodeCharacter{00A1}{\exclamdown} -+ \DeclareUnicodeCharacter{00A3}{\pounds} -+ \DeclareUnicodeCharacter{00A8}{\"{ }} -+ \DeclareUnicodeCharacter{00A9}{\copyright} -+ \DeclareUnicodeCharacter{00AA}{\ordf} -+ \DeclareUnicodeCharacter{00AB}{\guillemetleft} -+ \DeclareUnicodeCharacter{00AD}{\-} -+ \DeclareUnicodeCharacter{00AE}{\registeredsymbol} -+ \DeclareUnicodeCharacter{00AF}{\={ }} -+ -+ \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} -+ \DeclareUnicodeCharacter{00B4}{\'{ }} -+ \DeclareUnicodeCharacter{00B8}{\cedilla{ }} -+ \DeclareUnicodeCharacter{00BA}{\ordm} -+ \DeclareUnicodeCharacter{00BB}{\guillemetright} -+ \DeclareUnicodeCharacter{00BF}{\questiondown} -+ -+ \DeclareUnicodeCharacter{00C0}{\`A} -+ \DeclareUnicodeCharacter{00C1}{\'A} -+ \DeclareUnicodeCharacter{00C2}{\^A} -+ \DeclareUnicodeCharacter{00C3}{\~A} -+ \DeclareUnicodeCharacter{00C4}{\"A} -+ \DeclareUnicodeCharacter{00C5}{\AA} -+ \DeclareUnicodeCharacter{00C6}{\AE} -+ \DeclareUnicodeCharacter{00C7}{\cedilla{C}} -+ \DeclareUnicodeCharacter{00C8}{\`E} -+ \DeclareUnicodeCharacter{00C9}{\'E} -+ \DeclareUnicodeCharacter{00CA}{\^E} -+ \DeclareUnicodeCharacter{00CB}{\"E} -+ \DeclareUnicodeCharacter{00CC}{\`I} -+ \DeclareUnicodeCharacter{00CD}{\'I} -+ \DeclareUnicodeCharacter{00CE}{\^I} -+ \DeclareUnicodeCharacter{00CF}{\"I} -+ -+ \DeclareUnicodeCharacter{00D0}{\DH} -+ \DeclareUnicodeCharacter{00D1}{\~N} -+ \DeclareUnicodeCharacter{00D2}{\`O} -+ \DeclareUnicodeCharacter{00D3}{\'O} -+ \DeclareUnicodeCharacter{00D4}{\^O} -+ \DeclareUnicodeCharacter{00D5}{\~O} -+ \DeclareUnicodeCharacter{00D6}{\"O} -+ \DeclareUnicodeCharacter{00D8}{\O} -+ \DeclareUnicodeCharacter{00D9}{\`U} -+ \DeclareUnicodeCharacter{00DA}{\'U} -+ \DeclareUnicodeCharacter{00DB}{\^U} -+ \DeclareUnicodeCharacter{00DC}{\"U} -+ \DeclareUnicodeCharacter{00DD}{\'Y} -+ \DeclareUnicodeCharacter{00DE}{\TH} -+ \DeclareUnicodeCharacter{00DF}{\ss} -+ -+ \DeclareUnicodeCharacter{00E0}{\`a} -+ \DeclareUnicodeCharacter{00E1}{\'a} -+ \DeclareUnicodeCharacter{00E2}{\^a} -+ \DeclareUnicodeCharacter{00E3}{\~a} -+ \DeclareUnicodeCharacter{00E4}{\"a} -+ \DeclareUnicodeCharacter{00E5}{\aa} -+ \DeclareUnicodeCharacter{00E6}{\ae} -+ \DeclareUnicodeCharacter{00E7}{\cedilla{c}} -+ \DeclareUnicodeCharacter{00E8}{\`e} -+ \DeclareUnicodeCharacter{00E9}{\'e} -+ \DeclareUnicodeCharacter{00EA}{\^e} -+ \DeclareUnicodeCharacter{00EB}{\"e} -+ \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} -+ \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} -+ \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} -+ \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} -+ -+ \DeclareUnicodeCharacter{00F0}{\dh} -+ \DeclareUnicodeCharacter{00F1}{\~n} -+ \DeclareUnicodeCharacter{00F2}{\`o} -+ \DeclareUnicodeCharacter{00F3}{\'o} -+ \DeclareUnicodeCharacter{00F4}{\^o} -+ \DeclareUnicodeCharacter{00F5}{\~o} -+ \DeclareUnicodeCharacter{00F6}{\"o} -+ \DeclareUnicodeCharacter{00F8}{\o} -+ \DeclareUnicodeCharacter{00F9}{\`u} -+ \DeclareUnicodeCharacter{00FA}{\'u} -+ \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}} -+ \DeclareUnicodeCharacter{010D}{\v{c}} -+ \DeclareUnicodeCharacter{010E}{\v{D}} -+ -+ \DeclareUnicodeCharacter{0112}{\=E} -+ \DeclareUnicodeCharacter{0113}{\=e} -+ \DeclareUnicodeCharacter{0114}{\u{E}} -+ \DeclareUnicodeCharacter{0115}{\u{e}} -+ \DeclareUnicodeCharacter{0116}{\dotaccent{E}} -+ \DeclareUnicodeCharacter{0117}{\dotaccent{e}} -+ \DeclareUnicodeCharacter{011A}{\v{E}} -+ \DeclareUnicodeCharacter{011B}{\v{e}} -+ \DeclareUnicodeCharacter{011C}{\^G} -+ \DeclareUnicodeCharacter{011D}{\^g} -+ \DeclareUnicodeCharacter{011E}{\u{G}} -+ \DeclareUnicodeCharacter{011F}{\u{g}} -+ -+ \DeclareUnicodeCharacter{0120}{\dotaccent{G}} -+ \DeclareUnicodeCharacter{0121}{\dotaccent{g}} -+ \DeclareUnicodeCharacter{0124}{\^H} -+ \DeclareUnicodeCharacter{0125}{\^h} -+ \DeclareUnicodeCharacter{0128}{\~I} -+ \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} -+ \DeclareUnicodeCharacter{012A}{\=I} -+ \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} -+ \DeclareUnicodeCharacter{012C}{\u{I}} -+ \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} -+ -+ \DeclareUnicodeCharacter{0130}{\dotaccent{I}} -+ \DeclareUnicodeCharacter{0131}{\dotless{i}} -+ \DeclareUnicodeCharacter{0132}{IJ} -+ \DeclareUnicodeCharacter{0133}{ij} -+ \DeclareUnicodeCharacter{0134}{\^J} -+ \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} -+ \DeclareUnicodeCharacter{0139}{\'L} -+ \DeclareUnicodeCharacter{013A}{\'l} -+ -+ \DeclareUnicodeCharacter{0141}{\L} -+ \DeclareUnicodeCharacter{0142}{\l} -+ \DeclareUnicodeCharacter{0143}{\'N} -+ \DeclareUnicodeCharacter{0144}{\'n} -+ \DeclareUnicodeCharacter{0147}{\v{N}} -+ \DeclareUnicodeCharacter{0148}{\v{n}} -+ \DeclareUnicodeCharacter{014C}{\=O} -+ \DeclareUnicodeCharacter{014D}{\=o} -+ \DeclareUnicodeCharacter{014E}{\u{O}} -+ \DeclareUnicodeCharacter{014F}{\u{o}} -+ -+ \DeclareUnicodeCharacter{0150}{\H{O}} -+ \DeclareUnicodeCharacter{0151}{\H{o}} -+ \DeclareUnicodeCharacter{0152}{\OE} -+ \DeclareUnicodeCharacter{0153}{\oe} -+ \DeclareUnicodeCharacter{0154}{\'R} -+ \DeclareUnicodeCharacter{0155}{\'r} -+ \DeclareUnicodeCharacter{0158}{\v{R}} -+ \DeclareUnicodeCharacter{0159}{\v{r}} -+ \DeclareUnicodeCharacter{015A}{\'S} -+ \DeclareUnicodeCharacter{015B}{\'s} -+ \DeclareUnicodeCharacter{015C}{\^S} -+ \DeclareUnicodeCharacter{015D}{\^s} -+ \DeclareUnicodeCharacter{015E}{\cedilla{S}} -+ \DeclareUnicodeCharacter{015F}{\cedilla{s}} -+ -+ \DeclareUnicodeCharacter{0160}{\v{S}} -+ \DeclareUnicodeCharacter{0161}{\v{s}} -+ \DeclareUnicodeCharacter{0162}{\cedilla{t}} -+ \DeclareUnicodeCharacter{0163}{\cedilla{T}} -+ \DeclareUnicodeCharacter{0164}{\v{T}} -+ -+ \DeclareUnicodeCharacter{0168}{\~U} -+ \DeclareUnicodeCharacter{0169}{\~u} -+ \DeclareUnicodeCharacter{016A}{\=U} -+ \DeclareUnicodeCharacter{016B}{\=u} -+ \DeclareUnicodeCharacter{016C}{\u{U}} -+ \DeclareUnicodeCharacter{016D}{\u{u}} -+ \DeclareUnicodeCharacter{016E}{\ringaccent{U}} -+ \DeclareUnicodeCharacter{016F}{\ringaccent{u}} -+ -+ \DeclareUnicodeCharacter{0170}{\H{U}} -+ \DeclareUnicodeCharacter{0171}{\H{u}} -+ \DeclareUnicodeCharacter{0174}{\^W} -+ \DeclareUnicodeCharacter{0175}{\^w} -+ \DeclareUnicodeCharacter{0176}{\^Y} -+ \DeclareUnicodeCharacter{0177}{\^y} -+ \DeclareUnicodeCharacter{0178}{\"Y} -+ \DeclareUnicodeCharacter{0179}{\'Z} -+ \DeclareUnicodeCharacter{017A}{\'z} -+ \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} -+ \DeclareUnicodeCharacter{017C}{\dotaccent{z}} -+ \DeclareUnicodeCharacter{017D}{\v{Z}} -+ \DeclareUnicodeCharacter{017E}{\v{z}} -+ -+ \DeclareUnicodeCharacter{01C4}{D\v{Z}} -+ \DeclareUnicodeCharacter{01C5}{D\v{z}} -+ \DeclareUnicodeCharacter{01C6}{d\v{z}} -+ \DeclareUnicodeCharacter{01C7}{LJ} -+ \DeclareUnicodeCharacter{01C8}{Lj} -+ \DeclareUnicodeCharacter{01C9}{lj} -+ \DeclareUnicodeCharacter{01CA}{NJ} -+ \DeclareUnicodeCharacter{01CB}{Nj} -+ \DeclareUnicodeCharacter{01CC}{nj} -+ \DeclareUnicodeCharacter{01CD}{\v{A}} -+ \DeclareUnicodeCharacter{01CE}{\v{a}} -+ \DeclareUnicodeCharacter{01CF}{\v{I}} -+ -+ \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} -+ \DeclareUnicodeCharacter{01D1}{\v{O}} -+ \DeclareUnicodeCharacter{01D2}{\v{o}} -+ \DeclareUnicodeCharacter{01D3}{\v{U}} -+ \DeclareUnicodeCharacter{01D4}{\v{u}} -+ -+ \DeclareUnicodeCharacter{01E2}{\={\AE}} -+ \DeclareUnicodeCharacter{01E3}{\={\ae}} -+ \DeclareUnicodeCharacter{01E6}{\v{G}} -+ \DeclareUnicodeCharacter{01E7}{\v{g}} -+ \DeclareUnicodeCharacter{01E8}{\v{K}} -+ \DeclareUnicodeCharacter{01E9}{\v{k}} -+ -+ \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} -+ \DeclareUnicodeCharacter{01F1}{DZ} -+ \DeclareUnicodeCharacter{01F2}{Dz} -+ \DeclareUnicodeCharacter{01F3}{dz} -+ \DeclareUnicodeCharacter{01F4}{\'G} -+ \DeclareUnicodeCharacter{01F5}{\'g} -+ \DeclareUnicodeCharacter{01F8}{\`N} -+ \DeclareUnicodeCharacter{01F9}{\`n} -+ \DeclareUnicodeCharacter{01FC}{\'{\AE}} -+ \DeclareUnicodeCharacter{01FD}{\'{\ae}} -+ \DeclareUnicodeCharacter{01FE}{\'{\O}} -+ \DeclareUnicodeCharacter{01FF}{\'{\o}} -+ -+ \DeclareUnicodeCharacter{021E}{\v{H}} -+ \DeclareUnicodeCharacter{021F}{\v{h}} -+ -+ \DeclareUnicodeCharacter{0226}{\dotaccent{A}} -+ \DeclareUnicodeCharacter{0227}{\dotaccent{a}} -+ \DeclareUnicodeCharacter{0228}{\cedilla{E}} -+ \DeclareUnicodeCharacter{0229}{\cedilla{e}} -+ \DeclareUnicodeCharacter{022E}{\dotaccent{O}} -+ \DeclareUnicodeCharacter{022F}{\dotaccent{o}} -+ -+ \DeclareUnicodeCharacter{0232}{\=Y} -+ \DeclareUnicodeCharacter{0233}{\=y} -+ \DeclareUnicodeCharacter{0237}{\dotless{j}} -+ -+ \DeclareUnicodeCharacter{02DB}{\ogonek{ }} -+ -+ \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} -+ \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} -+ \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} -+ \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} -+ \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} -+ \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} -+ \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} -+ \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} -+ \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} -+ \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} -+ \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} -+ \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} -+ -+ \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} -+ \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} -+ -+ \DeclareUnicodeCharacter{1E20}{\=G} -+ \DeclareUnicodeCharacter{1E21}{\=g} -+ \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} -+ \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} -+ \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} -+ \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} -+ \DeclareUnicodeCharacter{1E26}{\"H} -+ \DeclareUnicodeCharacter{1E27}{\"h} -+ -+ \DeclareUnicodeCharacter{1E30}{\'K} -+ \DeclareUnicodeCharacter{1E31}{\'k} -+ \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} -+ \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} -+ \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} -+ \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} -+ \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} -+ \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} -+ \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} -+ \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} -+ \DeclareUnicodeCharacter{1E3E}{\'M} -+ \DeclareUnicodeCharacter{1E3F}{\'m} -+ -+ \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} -+ \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} -+ \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} -+ \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} -+ \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} -+ \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} -+ \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} -+ \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} -+ \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} -+ \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} -+ -+ \DeclareUnicodeCharacter{1E54}{\'P} -+ \DeclareUnicodeCharacter{1E55}{\'p} -+ \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} -+ \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} -+ \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} -+ \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} -+ \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} -+ \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} -+ \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} -+ \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} -+ -+ \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} -+ \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} -+ \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} -+ \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} -+ \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} -+ \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} -+ \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} -+ \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} -+ \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} -+ \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} -+ -+ \DeclareUnicodeCharacter{1E7C}{\~V} -+ \DeclareUnicodeCharacter{1E7D}{\~v} -+ \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} -+ \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} -+ -+ \DeclareUnicodeCharacter{1E80}{\`W} -+ \DeclareUnicodeCharacter{1E81}{\`w} -+ \DeclareUnicodeCharacter{1E82}{\'W} -+ \DeclareUnicodeCharacter{1E83}{\'w} -+ \DeclareUnicodeCharacter{1E84}{\"W} -+ \DeclareUnicodeCharacter{1E85}{\"w} -+ \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} -+ \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} -+ \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} -+ \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} -+ \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} -+ \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} -+ \DeclareUnicodeCharacter{1E8C}{\"X} -+ \DeclareUnicodeCharacter{1E8D}{\"x} -+ \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} -+ \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} -+ -+ \DeclareUnicodeCharacter{1E90}{\^Z} -+ \DeclareUnicodeCharacter{1E91}{\^z} -+ \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} -+ \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} -+ \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} -+ \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} -+ \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} -+ \DeclareUnicodeCharacter{1E97}{\"t} -+ \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} -+ \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} -+ -+ \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} -+ \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} -+ -+ \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} -+ \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} -+ \DeclareUnicodeCharacter{1EBC}{\~E} -+ \DeclareUnicodeCharacter{1EBD}{\~e} -+ -+ \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} -+ \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} -+ \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} -+ \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} -+ -+ \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} -+ \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} -+ -+ \DeclareUnicodeCharacter{1EF2}{\`Y} -+ \DeclareUnicodeCharacter{1EF3}{\`y} -+ \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} -+ -+ \DeclareUnicodeCharacter{1EF8}{\~Y} -+ \DeclareUnicodeCharacter{1EF9}{\~y} -+ -+ \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} -+ \DeclareUnicodeCharacter{21D2}{\result} -+ -+ \DeclareUnicodeCharacter{2212}{\minus} -+ \DeclareUnicodeCharacter{2217}{\point} -+ \DeclareUnicodeCharacter{2261}{\equiv} -+}% end of \utfeightchardefs -+ -+ -+% US-ASCII character definitions. -+\def\asciichardefs{% nothing need be done -+ \relax -+} -+ -+% Make non-ASCII characters printable again for compatibility with -+% existing Texinfo documents that may use them, even without declaring a -+% document encoding. - % -+\setnonasciicharscatcode \other -+ -+ -+\message{formatting,} -+ - \newdimen\defaultparindent \defaultparindent = 15pt - - \chapheadingskip = 15pt plus 4pt minus 2pt -@@ -5695,7 +8918,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 +8936,14 @@ - \fi - } - --% Parameters in order: 1) textheight; 2) textwidth; 3) voffset; --% 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can --% set \parskip and call \setleading for \baselineskip. -+% Parameters in order: 1) textheight; 2) textwidth; -+% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; -+% 7) physical page height; 8) physical page width. - % --\def\internalpagesizes#1#2#3#4#5#6{% -+% We also call \setleading{\textleading}, so the caller should define -+% \textleading. The caller should also set \parskip. -+% -+\def\internalpagesizes#1#2#3#4#5#6#7#8{% - \voffset = #3\relax - \topskip = #6\relax - \splittopskip = \topskip -@@ -5736,6 +8962,17 @@ - \normaloffset = #4\relax - \bindingoffset = #5\relax - % -+ \ifpdf -+ \pdfpageheight #7\relax -+ \pdfpagewidth #8\relax -+ % if we don't reset these, they will remain at "1 true in" of -+ % whatever layout pdftex was dumped with. -+ \pdfhorigin = 1 true in -+ \pdfvorigin = 1 true in -+ \fi -+ % -+ \setleading{\textleading} -+ % - \parindent = \defaultparindent - \setemergencystretch - } -@@ -5743,76 +8980,140 @@ - % @letterpaper (the default). - \def\letterpaper{{\globaldefs = 1 - \parskip = 3pt plus 2pt minus 1pt -- \setleading{13.2pt}% -+ \textleading = 13.2pt - % - % If page is nothing but text, make it come out even. -- \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}% -+ \internalpagesizes{607.2pt}{6in}% that's 46 lines -+ {\voffset}{.25in}% -+ {\bindingoffset}{36pt}% -+ {11in}{8.5in}% - }} - --% Use @smallbook to reset parameters for 7x9.5 (or so) format. -+% Use @smallbook to reset parameters for 7x9.25 trim size. - \def\smallbook{{\globaldefs = 1 - \parskip = 2pt plus 1pt -- \setleading{12pt}% -+ \textleading = 12pt - % -- \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}% -+ \internalpagesizes{7.5in}{5in}% -+ {-.2in}{0in}% -+ {\bindingoffset}{16pt}% -+ {9.25in}{7in}% - % - \lispnarrowing = 0.3in - \tolerance = 700 - \hfuzz = 1pt - \contentsrightmargin = 0pt -- \deftypemargin = 0pt - \defbodyindent = .5cm -+}} -+ -+% Use @smallerbook to reset parameters for 6x9 trim size. -+% (Just testing, parameters still in flux.) -+\def\smallerbook{{\globaldefs = 1 -+ \parskip = 1.5pt plus 1pt -+ \textleading = 12pt - % -- \let\smalldisplay = \smalldisplayx -- \let\smallexample = \smalllispx -- \let\smallformat = \smallformatx -- \let\smalllisp = \smalllispx -+ \internalpagesizes{7.4in}{4.8in}% -+ {-.2in}{-.4in}% -+ {0pt}{14pt}% -+ {9in}{6in}% -+ % -+ \lispnarrowing = 0.25in -+ \tolerance = 700 -+ \hfuzz = 1pt -+ \contentsrightmargin = 0pt -+ \defbodyindent = .4cm - }} - - % Use @afourpaper to print on European A4 paper. - \def\afourpaper{{\globaldefs = 1 -- \setleading{12pt}% - \parskip = 3pt plus 2pt minus 1pt -+ \textleading = 13.2pt - % -- \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}% -+ % Double-side printing via postscript on Laserjet 4050 -+ % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. -+ % To change the settings for a different printer or situation, adjust -+ % \normaloffset until the front-side and back-side texts align. Then -+ % do the same for \bindingoffset. You can set these for testing in -+ % your texinfo source file like this: -+ % @tex -+ % \global\normaloffset = -6mm -+ % \global\bindingoffset = 10mm -+ % @end tex -+ \internalpagesizes{673.2pt}{160mm}% that's 51 lines -+ {\voffset}{\hoffset}% -+ {\bindingoffset}{44pt}% -+ {297mm}{210mm}% - % - \tolerance = 700 - \hfuzz = 1pt -+ \contentsrightmargin = 0pt -+ \defbodyindent = 5mm - }} - --% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin --% 29mm, hence bottom margin 28mm, nominal side margin 3cm. --\def\afourlatex{{\globaldefs = 1 -- \setleading{13.6pt}% -+% Use @afivepaper to print on European A5 paper. -+% From romildo@urano.iceb.ufop.br, 2 July 2000. -+% He also recommends making @example and @lisp be small. -+\def\afivepaper{{\globaldefs = 1 -+ \parskip = 2pt plus 1pt minus 0.1pt -+ \textleading = 12.5pt - % -+ \internalpagesizes{160mm}{120mm}% -+ {\voffset}{\hoffset}% -+ {\bindingoffset}{8pt}% -+ {210mm}{148mm}% -+ % -+ \lispnarrowing = 0.2in -+ \tolerance = 800 -+ \hfuzz = 1.2pt -+ \contentsrightmargin = 0pt -+ \defbodyindent = 2mm -+ \tableindent = 12mm -+}} -+ -+% A specific text layout, 24x15cm overall, intended for A4 paper. -+\def\afourlatex{{\globaldefs = 1 - \afourpaper -- \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}% -+ \internalpagesizes{237mm}{150mm}% -+ {\voffset}{4.6mm}% -+ {\bindingoffset}{7mm}% -+ {297mm}{210mm}% - % -+ % Must explicitly reset to 0 because we call \afourpaper. - \globaldefs = 0 - }} - --% Use @afourwide to print on European A4 paper in wide format. --\def\afourwide{% -+% Use @afourwide to print on A4 paper in landscape format. -+\def\afourwide{{\globaldefs = 1 - \afourpaper -- \internalpagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}% -- % -+ \internalpagesizes{241mm}{165mm}% -+ {\voffset}{-2.95mm}% -+ {\bindingoffset}{7mm}% -+ {297mm}{210mm}% - \globaldefs = 0 --} -+}} - - % @pagesizes TEXTHEIGHT[,TEXTWIDTH] - % Perhaps we should allow setting the margins, \topskip, \parskip, - % and/or leading, also. Or perhaps we should compute them somehow. - % --\def\pagesizes{\parsearg\pagesizesxxx} --\def\pagesizesxxx#1{\pagesizesyyy #1,,\finish} -+\parseargdef\pagesizes{\pagesizesyyy #1,,\finish} - \def\pagesizesyyy#1,#2,#3\finish{{% - \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi - \globaldefs = 1 - % - \parskip = 3pt plus 2pt minus 1pt -- \setleading{13.2pt}% -+ \setleading{\textleading}% - % -- \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}% -+ \dimen0 = #1\relax -+ \advance\dimen0 by \voffset -+ % -+ \dimen2 = \hsize -+ \advance\dimen2 by \normaloffset -+ % -+ \internalpagesizes{#1}{\hsize}% -+ {\voffset}{\normaloffset}% -+ {\bindingoffset}{44pt}% -+ {\dimen0}{\dimen2}% - }} - - % Set default to letter. -@@ -5822,6 +9123,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 +9144,10 @@ - \def\normalless{<} - \def\normalgreater{>} - \def\normalplus{+} --\def\normaldollar{$} -+\def\normaldollar{$}%$ font-lock fix - --% This macro is used to make a character print one way in ttfont --% where it can probably just be output, and another way in other fonts, -+% This macro is used to make a character print one way in \tt -+% (where it can probably be output as-is), and another way in other fonts, - % where something hairier probably needs to be done. - % - % #1 is what to print if we are indeed using \tt; #2 is what to print -@@ -5875,8 +9179,9 @@ - - \catcode`\_=\active - \def_{\ifusingtt\normalunderscore\_} -+\let\realunder=_ - % Subroutine for the previous macro. --\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}} -+\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } - - \catcode`\|=\active - \def|{{\tt\char124}} -@@ -5889,16 +9194,7 @@ - \catcode`\+=\active - \def+{{\tt \char 43}} - \catcode`\$=\active --\def${\ifusingit{{\sl\$}}\normaldollar} --%\catcode 27=\active --%\def^^[{$\diamondsuit$} -- --% Set up an active definition for =, but don't enable it most of the time. --{\catcode`\==\active --\global\def={{\tt \char 61}}} -- --\catcode`+=\active --\catcode`\_=\active -+\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix - - % If a .fmt file is being used, characters that might appear in a file - % name cannot be active until we have parsed the command line. -@@ -5906,46 +9202,55 @@ - % \otherifyactive is called near the end of this file. - \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} - --\catcode`\@=0 -+% Used sometimes to turn off (effectively) the active characters even after -+% parsing them. -+\def\turnoffactive{% -+ \normalturnoffactive -+ \otherbackslash -+} - --% \rawbackslashxx output one backslash character in current font --\global\chardef\rawbackslashxx=`\\ --%{\catcode`\\=\other --%@gdef@rawbackslashxx{\}} -+\catcode`\@=0 - --% \rawbackslash redefines \ as input to do \rawbackslashxx. --{\catcode`\\=\active --@gdef@rawbackslash{@let\=@rawbackslashxx }} -+% \backslashcurfont outputs one backslash character in current font, -+% as in \char`\\. -+\global\chardef\backslashcurfont=`\\ -+\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work - --% \normalbackslash outputs one backslash in fixed width font. --\def\normalbackslash{{\tt\rawbackslashxx}} -+% \realbackslash is an actual character `\' with catcode other, and -+% \doublebackslash is two of them (for the pdf outlines). -+{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} - --% \catcode 17=0 % Define control-q -+% In texinfo, backslash is an active character; it prints the backslash -+% in fixed width font. - \catcode`\\=\active -+@def@normalbackslash{{@tt@backslashcurfont}} -+% On startup, @fixbackslash assigns: -+% @let \ = @normalbackslash - --% Used sometimes to turn off (effectively) the active characters --% even after parsing them. --@def@turnoffactive{@let"=@normaldoublequote --@let\=@realbackslash --@let~=@normaltilde --@let^=@normalcaret --@let_=@normalunderscore --@let|=@normalverticalbar --@let<=@normalless --@let>=@normalgreater --@let+=@normalplus --@let$=@normaldollar} -+% \rawbackslash defines an active \ to do \backslashcurfont. -+% \otherbackslash defines an active \ to be a literal `\' character with -+% catcode other. -+@gdef@rawbackslash{@let\=@backslashcurfont} -+@gdef@otherbackslash{@let\=@realbackslash} - --@def@normalturnoffactive{@let"=@normaldoublequote --@let\=@normalbackslash --@let~=@normaltilde --@let^=@normalcaret --@let_=@normalunderscore --@let|=@normalverticalbar --@let<=@normalless --@let>=@normalgreater --@let+=@normalplus --@let$=@normaldollar} -+% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of -+% the literal character `\'. -+% -+@def@normalturnoffactive{% -+ @let\=@normalbackslash -+ @let"=@normaldoublequote -+ @let~=@normaltilde -+ @let^=@normalcaret -+ @let_=@normalunderscore -+ @let|=@normalverticalbar -+ @let<=@normalless -+ @let>=@normalgreater -+ @let+=@normalplus -+ @let$=@normaldollar %$ font-lock fix -+ @markupsetuplqdefault -+ @markupsetuprqdefault -+ @unsepspaces -+} - - % Make _ and + \other characters, temporarily. - % This is canceled by @fixbackslash. -@@ -5959,9 +9264,9 @@ - @global@let\ = @eatinput - - % On the other hand, perhaps the file did not have a `\input texinfo'. Then --% the first `\{ in the file would cause an error. This macro tries to fix -+% the first `\' in the file would cause an error. This macro tries to fix - % that, assuming it is called before the first `\' could plausibly occur. --% Also back turn on active characters that might appear in the input -+% Also turn back on active characters that might appear in the input - % file name, in case not using a pre-dumped format. - % - @gdef@fixbackslash{% -@@ -5973,15 +9278,19 @@ - % Say @foo, not \foo, in error messages. - @escapechar = `@@ - --% These look ok in all fonts, so just make them not special. -+% These look ok in all fonts, so just make them not special. - @catcode`@& = @other - @catcode`@# = @other - @catcode`@% = @other - --@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 Local variables: - @c eval: (add-hook 'write-file-hooks 'time-stamp) -@@ -5990,3 +9299,9 @@ - @c time-stamp-format: "%:y-%02m-%02d.%02H" - @c time-stamp-end: "}" - @c End: -+ -+@c vim:sw=2: -+ -+@ignore -+ arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 -+@end ignore -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 2010-03-23 09:57:24.762010157 -0600 -@@ -1,19 +1,38 @@ --#! /bin/sh --# -+#!/bin/sh - # install - install a program, script, or datafile --# This comes from X11R5 (mit/util/scripts/install.sh). -+ -+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 -+# following copyright and license. - # --# Copyright 1991 by the Massachusetts Institute of Technology -+# Copyright (C) 1994 X Consortium - # --# Permission to use, copy, modify, distribute, and sell this software and its --# documentation for any purpose is hereby granted without fee, provided that --# the above copyright notice appear in all copies and that both that --# copyright notice and this permission notice appear in supporting --# documentation, and that the name of M.I.T. not be used in advertising or --# publicity pertaining to distribution of the software without specific, --# written prior permission. M.I.T. makes no representations about the --# suitability of this software for any purpose. It is provided "as is" --# without express or implied warranty. -+# Permission is hereby granted, free of charge, to any person obtaining a copy -+# of this software and associated documentation files (the "Software"), to -+# deal in the Software without restriction, including without limitation the -+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -+# sell copies of the Software, and to permit persons to whom the Software is -+# furnished to do so, subject to the following conditions: -+# -+# The above copyright notice and this permission notice shall be included in -+# all copies or substantial portions of the Software. -+# -+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+# -+# Except as contained in this notice, the name of the X Consortium shall not -+# be used in advertising or otherwise to promote the sale, use or other deal- -+# ings in this Software without prior written authorization from the X Consor- -+# tium. -+# -+# -+# FSF changes to this file are in the public domain. - # - # 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,481 @@ - # - # This script is compatible with the BSD install script, but was written - # from scratch. --# - -+nl=' -+' -+IFS=" "" $nl" - - # set DOITPROG to echo to test this script - - # Don't use :- since 4.3BSD and earlier shells don't like it. --doit="${DOITPROG-}" -+doit=${DOITPROG-} -+if test -z "$doit"; then -+ doit_exec=exec -+else -+ doit_exec=$doit -+fi - -+# Put in absolute file names if you don't have them in your path; -+# or use environment vars. - --# put in absolute paths if you don't have them in your path; or use env. vars. -+chgrpprog=${CHGRPPROG-chgrp} -+chmodprog=${CHMODPROG-chmod} -+chownprog=${CHOWNPROG-chown} -+cmpprog=${CMPPROG-cmp} -+cpprog=${CPPROG-cp} -+mkdirprog=${MKDIRPROG-mkdir} -+mvprog=${MVPROG-mv} -+rmprog=${RMPROG-rm} -+stripprog=${STRIPPROG-strip} - --mvprog="${MVPROG-mv}" --cpprog="${CPPROG-cp}" --chmodprog="${CHMODPROG-chmod}" --chownprog="${CHOWNPROG-chown}" --chgrpprog="${CHGRPPROG-chgrp}" --stripprog="${STRIPPROG-strip}" --rmprog="${RMPROG-rm}" --mkdirprog="${MKDIRPROG-mkdir}" -+posix_glob='?' -+initialize_posix_glob=' -+ test "$posix_glob" != "?" || { -+ if (set -f) 2>/dev/null; then -+ posix_glob= -+ else -+ posix_glob=: -+ fi -+ } -+' - --transformbasename="" --transform_arg="" --instcmd="$mvprog" --chmodcmd="$chmodprog 0755" --chowncmd="" --chgrpcmd="" --stripcmd="" -+posix_mkdir= -+ -+# Desired mode of installed file. -+mode=0755 -+ -+chgrpcmd= -+chmodcmd=$chmodprog -+chowncmd= -+mvcmd=$mvprog - rmcmd="$rmprog -f" --mvcmd="$mvprog" --src="" --dst="" --dir_arg="" -+stripcmd= - --while [ x"$1" != x ]; do -- case $1 in -- -c) instcmd="$cpprog" -- shift -- continue;; -+src= -+dst= -+dir_arg= -+dst_arg= - -- -d) dir_arg=true -- shift -- continue;; -+copy_on_change=false -+no_target_directory= - -- -m) chmodcmd="$chmodprog $2" -- shift -- shift -- continue;; -+usage="\ -+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE -+ or: $0 [OPTION]... SRCFILES... DIRECTORY -+ or: $0 [OPTION]... -t DIRECTORY SRCFILES... -+ or: $0 [OPTION]... -d DIRECTORIES... - -- -o) chowncmd="$chownprog $2" -- shift -- shift -- continue;; -+In the 1st form, copy SRCFILE to DSTFILE. -+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -+In the 4th, create DIRECTORIES. - -- -g) chgrpcmd="$chgrpprog $2" -- shift -- shift -- continue;; -+Options: -+ --help display this help and exit. -+ --version display version info and exit. - -- -s) stripcmd="$stripprog" -- shift -- continue;; -+ -c (ignored) -+ -C install only if different (preserve the last data modification time) -+ -d create directories instead of installing files. -+ -g GROUP $chgrpprog installed files to GROUP. -+ -m MODE $chmodprog installed files to MODE. -+ -o USER $chownprog installed files to USER. -+ -s $stripprog installed files. -+ -t DIRECTORY install into DIRECTORY. -+ -T report an error if DSTFILE is a directory. - -- -t=*) transformarg=`echo $1 | sed 's/-t=//'` -- shift -- continue;; -+Environment variables override the default commands: -+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG -+ RMPROG STRIPPROG -+" - -- -b=*) transformbasename=`echo $1 | sed 's/-b=//'` -- shift -- continue;; -+while test $# -ne 0; do -+ case $1 in -+ -c) ;; - -- *) if [ x"$src" = x ] -- then -- src=$1 -- else -- # this colon is to work around a 386BSD /bin/sh bug -- : -- dst=$1 -- fi -- shift -- continue;; -- esac -+ -C) copy_on_change=true;; -+ -+ -d) dir_arg=true;; -+ -+ -g) chgrpcmd="$chgrpprog $2" -+ shift;; -+ -+ --help) echo "$usage"; exit $?;; -+ -+ -m) mode=$2 -+ case $mode in -+ *' '* | *' '* | *' -+'* | *'*'* | *'?'* | *'['*) -+ echo "$0: invalid mode: $mode" >&2 -+ exit 1;; -+ esac -+ shift;; -+ -+ -o) chowncmd="$chownprog $2" -+ shift;; -+ -+ -s) stripcmd=$stripprog;; -+ -+ -t) dst_arg=$2 -+ shift;; -+ -+ -T) no_target_directory=true;; -+ -+ --version) echo "$0 $scriptversion"; exit $?;; -+ -+ --) shift -+ break;; -+ -+ -*) echo "$0: invalid option: $1" >&2 -+ exit 1;; -+ -+ *) break;; -+ esac -+ shift - done - --if [ x"$src" = x ] --then -- echo "install: no input file specified" -- exit 1 --else -- true -+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then -+ # When -d is used, all remaining arguments are directories to create. -+ # When -t is used, the destination is already specified. -+ # Otherwise, the last argument is the destination. Remove it from $@. -+ for arg -+ do -+ if test -n "$dst_arg"; then -+ # $@ is not empty: it contains at least $arg. -+ set fnord "$@" "$dst_arg" -+ shift # fnord -+ fi -+ shift # arg -+ dst_arg=$arg -+ done - fi - --if [ x"$dir_arg" != x ]; then -- dst=$src -- src="" -- -- if [ -d $dst ]; then -- instcmd=: -- else -- instcmd=mkdir -- fi --else -- --# Waiting for this to be detected by the "$instcmd $src $dsttmp" command --# might cause directories to be created, which would be especially bad --# if $src (and thus $dsttmp) contains '*'. -+if test $# -eq 0; then -+ if test -z "$dir_arg"; then -+ echo "$0: no input file specified." >&2 -+ exit 1 -+ fi -+ # It's OK to call `install-sh -d' without argument. -+ # This can happen when creating conditional directories. -+ exit 0 -+fi - -- if [ -f $src -o -d $src ] -- then -- true -- else -- echo "install: $src does not exist" -- exit 1 -- fi -- -- if [ x"$dst" = x ] -- then -- echo "install: no destination specified" -- exit 1 -- else -- true -- fi -+if test -z "$dir_arg"; then -+ trap '(exit $?); exit' 1 2 13 15 - --# If destination is a directory, append the input filename; if your system --# does not like double slashes in filenames, you may need to add some logic -+ # Set umask so as not to create temps with too-generous modes. -+ # However, 'strip' requires both read and write access to temps. -+ case $mode in -+ # Optimize common cases. -+ *644) cp_umask=133;; -+ *755) cp_umask=22;; - -- if [ -d $dst ] -- then -- dst="$dst"/`basename $src` -- else -- true -- fi -+ *[0-7]) -+ if test -z "$stripcmd"; then -+ u_plus_rw= -+ else -+ u_plus_rw='% 200' -+ fi -+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; -+ *) -+ if test -z "$stripcmd"; then -+ u_plus_rw= -+ else -+ u_plus_rw=,u+rw -+ fi -+ cp_umask=$mode$u_plus_rw;; -+ esac - fi - --## this sed command emulates the dirname command --dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` -+for src -+do -+ # Protect names starting with `-'. -+ case $src in -+ -*) src=./$src;; -+ esac - --# Make sure that the destination directory exists. --# this part is taken from Noah Friedman's mkinstalldirs script -+ if test -n "$dir_arg"; then -+ dst=$src -+ dstdir=$dst -+ test -d "$dstdir" -+ dstdir_status=$? -+ else - --# Skip lots of stat calls in the usual case. --if [ ! -d "$dstdir" ]; then --defaultIFS=' --' --IFS="${IFS-${defaultIFS}}" -+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command -+ # might cause directories to be created, which would be especially bad -+ # if $src (and thus $dsttmp) contains '*'. -+ if test ! -f "$src" && test ! -d "$src"; then -+ echo "$0: $src does not exist." >&2 -+ exit 1 -+ fi - --oIFS="${IFS}" --# Some sh's can't handle IFS=/ for some reason. --IFS='%' --set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` --IFS="${oIFS}" -+ if test -z "$dst_arg"; then -+ echo "$0: no destination specified." >&2 -+ exit 1 -+ fi - --pathcomp='' -+ dst=$dst_arg -+ # Protect names starting with `-'. -+ case $dst in -+ -*) dst=./$dst;; -+ esac - --while [ $# -ne 0 ] ; do -- pathcomp="${pathcomp}${1}" -- shift -+ # If destination is a directory, append the input filename; won't work -+ # if double slashes aren't ignored. -+ if test -d "$dst"; then -+ if test -n "$no_target_directory"; then -+ echo "$0: $dst_arg: Is a directory" >&2 -+ exit 1 -+ fi -+ dstdir=$dst -+ dst=$dstdir/`basename "$src"` -+ dstdir_status=0 -+ else -+ # Prefer dirname, but fall back on a substitute if dirname fails. -+ dstdir=` -+ (dirname "$dst") 2>/dev/null || -+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$dst" : 'X\(//\)[^/]' \| \ -+ X"$dst" : 'X\(//\)$' \| \ -+ X"$dst" : 'X\(/\)' \| . 2>/dev/null || -+ echo X"$dst" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)[^/].*/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q' -+ ` - -- if [ ! -d "${pathcomp}" ] ; -- then -- $mkdirprog "${pathcomp}" -+ test -d "$dstdir" -+ dstdir_status=$? -+ fi -+ fi -+ -+ obsolete_mkdir_used=false -+ -+ if test $dstdir_status != 0; then -+ case $posix_mkdir in -+ '') -+ # Create intermediate dirs using mode 755 as modified by the umask. -+ # This is like FreeBSD 'install' as of 1997-10-28. -+ umask=`umask` -+ case $stripcmd.$umask in -+ # Optimize common cases. -+ *[2367][2367]) mkdir_umask=$umask;; -+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; -+ -+ *[0-7]) -+ mkdir_umask=`expr $umask + 22 \ -+ - $umask % 100 % 40 + $umask % 20 \ -+ - $umask % 10 % 4 + $umask % 2 -+ `;; -+ *) mkdir_umask=$umask,go-w;; -+ esac -+ -+ # With -d, create the new directory with the user-specified mode. -+ # Otherwise, rely on $mkdir_umask. -+ if test -n "$dir_arg"; then -+ mkdir_mode=-m$mode - else -- true -+ mkdir_mode= - fi - -- pathcomp="${pathcomp}/" --done --fi -+ posix_mkdir=false -+ case $umask in -+ *[123567][0-7][0-7]) -+ # POSIX mkdir -p sets u+wx bits regardless of umask, which -+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0. -+ ;; -+ *) -+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ -+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - --if [ x"$dir_arg" != x ] --then -- $doit $instcmd $dst && -+ if (umask $mkdir_umask && -+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 -+ then -+ if test -z "$dir_arg" || { -+ # Check for POSIX incompatibilities with -m. -+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or -+ # other-writeable bit of parent directory when it shouldn't. -+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. -+ ls_ld_tmpdir=`ls -ld "$tmpdir"` -+ case $ls_ld_tmpdir in -+ d????-?r-*) different_mode=700;; -+ d????-?--*) different_mode=755;; -+ *) false;; -+ esac && -+ $mkdirprog -m$different_mode -p -- "$tmpdir" && { -+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"` -+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" -+ } -+ } -+ then posix_mkdir=: -+ fi -+ rmdir "$tmpdir/d" "$tmpdir" -+ else -+ # Remove any dirs left behind by ancient mkdir implementations. -+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null -+ fi -+ trap '' 0;; -+ esac;; -+ esac - -- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && -- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && -- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && -- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi --else -+ if -+ $posix_mkdir && ( -+ umask $mkdir_umask && -+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" -+ ) -+ then : -+ else - --# If we're going to rename the final executable, determine the name now. -+ # The umask is ridiculous, or mkdir does not conform to POSIX, -+ # or it failed possibly due to a race condition. Create the -+ # directory the slow way, step by step, checking for races as we go. - -- if [ x"$transformarg" = x ] -- then -- dstfile=`basename $dst` -- else -- dstfile=`basename $dst $transformbasename | -- sed $transformarg`$transformbasename -- fi -+ case $dstdir in -+ /*) prefix='/';; -+ -*) prefix='./';; -+ *) prefix='';; -+ esac - --# don't allow the sed command to completely eliminate the filename -+ eval "$initialize_posix_glob" - -- if [ x"$dstfile" = x ] -- then -- dstfile=`basename $dst` -+ oIFS=$IFS -+ IFS=/ -+ $posix_glob set -f -+ set fnord $dstdir -+ shift -+ $posix_glob set +f -+ IFS=$oIFS -+ -+ prefixes= -+ -+ for d -+ do -+ test -z "$d" && continue -+ -+ prefix=$prefix$d -+ if test -d "$prefix"; then -+ prefixes= - else -- true -+ if $posix_mkdir; then -+ (umask=$mkdir_umask && -+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break -+ # Don't fail if two instances are running concurrently. -+ test -d "$prefix" || exit 1 -+ else -+ case $prefix in -+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; -+ *) qprefix=$prefix;; -+ esac -+ prefixes="$prefixes '$qprefix'" -+ fi - fi -+ prefix=$prefix/ -+ done - --# Make a temp file name in the proper directory. -+ if test -n "$prefixes"; then -+ # Don't fail if two instances are running concurrently. -+ (umask $mkdir_umask && -+ eval "\$doit_exec \$mkdirprog $prefixes") || -+ test -d "$dstdir" || exit 1 -+ obsolete_mkdir_used=true -+ fi -+ fi -+ fi - -- dsttmp=$dstdir/#inst.$$# -+ if test -n "$dir_arg"; then -+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && -+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && -+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || -+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 -+ else - --# Move or copy the file name to the temp name -+ # Make a couple of temp file names in the proper directory. -+ dsttmp=$dstdir/_inst.$$_ -+ rmtmp=$dstdir/_rm.$$_ - -- $doit $instcmd $src $dsttmp && -+ # Trap to clean up those temp files at exit. -+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - -- trap "rm -f ${dsttmp}" 0 && -+ # Copy the file name to the temp name. -+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - --# and set any options; do chmod last to preserve setuid bits -+ # and set any options; do chmod last to preserve setuid bits. -+ # -+ # If any of these fail, we abort the whole thing. If we want to -+ # ignore errors from any of these, just make sure not to ignore -+ # errors from the above "$doit $cpprog $src $dsttmp" command. -+ # -+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && -+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && -+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && -+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - --# If any of these fail, we abort the whole thing. If we want to --# ignore errors from any of these, just make sure not to ignore --# errors from the above "$doit $instcmd $src $dsttmp" command. -+ # If -C, don't bother to copy if it wouldn't change the file. -+ if $copy_on_change && -+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && -+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - -- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && -- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && -- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && -- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && -+ eval "$initialize_posix_glob" && -+ $posix_glob set -f && -+ set X $old && old=:$2:$4:$5:$6 && -+ set X $new && new=:$2:$4:$5:$6 && -+ $posix_glob set +f && - --# Now rename the file to the real destination. -+ test "$old" = "$new" && -+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 -+ then -+ rm -f "$dsttmp" -+ else -+ # Rename the file to the real destination. -+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - -- $doit $rmcmd -f $dstdir/$dstfile && -- $doit $mvcmd $dsttmp $dstdir/$dstfile -+ # The rename failed, perhaps because mv can't rename something else -+ # to itself, or perhaps because mv is so ancient that it does not -+ # support -f. -+ { -+ # Now remove or move aside any old file at destination location. -+ # We try this two ways since rm can't unlink itself on some -+ # systems and the destination file might be busy for other -+ # reasons. In this case, the final cleanup might fail but the new -+ # file should still install successfully. -+ { -+ test ! -f "$dst" || -+ $doit $rmcmd -f "$dst" 2>/dev/null || -+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && -+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } -+ } || -+ { echo "$0: cannot unlink or rename $dst" >&2 -+ (exit 1); exit 1 -+ } -+ } && - --fi && -+ # Now rename the file to the real destination. -+ $doit $mvcmd "$dsttmp" "$dst" -+ } -+ fi || exit 1 - -+ trap '' 0 -+ fi -+done - --exit 0 -+# Local variables: -+# eval: (add-hook 'write-file-hooks 'time-stamp) -+# time-stamp-start: "scriptversion=" -+# time-stamp-format: "%:y-%02m-%02d.%02H" -+# time-stamp-time-zone: "UTC" -+# time-stamp-end: "; # UTC" -+# End: -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 2010-01-22 09:05:36.000000000 -0700 -@@ -1,42 +1,574 @@ --# ltmain.sh - Provide generalized library-building support services. --# NOTE: Changing this file will not affect anything until you rerun ltconfig. --# --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 --# Free Software Foundation, Inc. --# Originally by Gordon Matzigkeit , 1996 --# --# This program is free software; you can redistribute it and/or modify -+# Generated from ltmain.m4sh. -+ -+# ltmain.sh (GNU libtool) 2.2.6b -+# 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 distributed in the hope that it will be useful, but -+# As a special exception to the GNU General Public License, -+# if you distribute this file as part of a program or library that -+# is built using GNU Libtool, you may include this file under the -+# same distribution terms that you use for the rest of that program. -+# -+# GNU Libtool is distributed in the hope that it will be useful, but - # WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - # General Public License for more details. - # - # You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# along with GNU Libtool; see the file COPYING. If not, a copy -+# can be downloaded from http://www.gnu.org/licenses/gpl.html, -+# or obtained by writing to the Free Software Foundation, Inc., -+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ -+# Usage: $progname [OPTION]... [MODE-ARG]... - # --# As a special exception to the GNU General Public License, if you --# distribute this file as part of a program that contains a --# configuration script generated by Autoconf, you may include it under --# the same distribution terms that you use for the rest of that program. -+# Provide generalized library-building support services. -+# -+# --config show all configuration variables -+# --debug enable verbose shell tracing -+# -n, --dry-run display commands without modifying any files -+# --features display basic configuration information and exit -+# --mode=MODE use operation mode MODE -+# --preserve-dup-deps don't remove duplicate dependency libraries -+# --quiet, --silent don't print informational messages -+# --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.6b -+# automake: $automake_version -+# autoconf: $autoconf_version -+# -+# Report bugs to . - --# Check that we have a working $echo. -+PROGRAM=ltmain.sh -+PACKAGE=libtool -+VERSION=2.2.6b -+TIMESTAMP="" -+package_revision=1.3017 -+ -+# 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 -+ -+# 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. - 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. -- 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,509 +577,695 @@ - cat <&2 -- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 -- exit 1 --fi -- --if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then -- echo "$modename: not configured to build any kind of library" 1>&2 -- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 -- exit 1 --fi -+magic_exe="%%%MAGIC EXE variable%%%" - - # Global variables. --mode=$default_mode -+# $mode is unset - nonopt= --prev= --prevopt= --run= --show="$echo" --show_help= - execute_dlfiles= -+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 - -- # 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 -- ;; -- 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" -- # 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 -- ;; -- 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) -- echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" -- exit 0 -- ;; -+ # Default configuration. -+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - -- --config) -- sed -n -e '/^### BEGIN LIBTOOL CONFIG/,/^### END LIBTOOL CONFIG/p' < "$0" - # Now print the configurations for the tags. - for tagname in $taglist; do -- sed -n -e "/^### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0" -+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done -- exit 0 -- ;; - -- --debug) -- echo "$progname: enabling shell trace mode" -- set -x -- ;; -- -- --dry-run | -n) -- run=: -- ;; -+ exit $? -+} - -- --features) -- 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" - else -- echo "disable shared libraries" -+ $ECHO "disable shared libraries" - fi - if test "$build_old_libs" = yes; then -- echo "enable static libraries" -+ $ECHO "enable static libraries" - else -- echo "disable static libraries" -+ $ECHO "disable static libraries" - fi -- exit 0 -- ;; - -- --finish) mode="finish" ;; -+ exit $? -+} - -- --mode) prevopt="--mode" prev=mode ;; -- --mode=*) mode="$optarg" ;; -+# func_enable_tag tagname -+# Verify that TAGNAME is valid, and either flag an error and exit, or -+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -+# variable here. -+func_enable_tag () -+{ -+ # Global variable: -+ tagname="$1" - -- --quiet | --silent) -- show=: -- ;; -+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" -+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" -+ sed_extractcf="/$re_begincf/,/$re_endcf/p" - -- --tag) prevopt="--tag" prev=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) -- 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 -- ;; -+ # 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 - --if test -n "$prevopt"; then -- $echo "$modename: option \`$prevopt' requires an argument" 1>&2 -- $echo "$help" 1>&2 -- exit 1 --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 -+ ;; - -- # 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 -+ ;; -+ -+ --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 - -- # 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 -- exit 1 -+ func_error "unrecognized option \`-dlopen'" -+ $ECHO "$help" 1>&2 -+ exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" -- help="Try \`$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" -- suppress_output= - -- user_target=no -- for arg -- do -- case $prev in -- "") ;; -- xcompiler) -- # Aesthetically quote the previous argument. -- prev= -- lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -+# 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 -- # in scan sets, so we specify it separately. -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -- arg="\"$arg\"" -- ;; -- esac -+# 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 -- base_compile="$lastarg" -- else -- base_compile="$base_compile $lastarg" -- fi -- 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 -- -o) -- if test "$user_target" != "no"; then -- $echo "$modename: you cannot specify \`-o' more than once" 1>&2 -- exit 1 -- fi -- user_target=next -- ;; -+# func_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 -- ;; -+# 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 -- ;; -+# 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) -- prev=xcompiler -- continue -- ;; -+# 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 -- IFS="$save_ifs" - -- # Double-quote args containing other shell metacharacters. -- # Many Bourne shells cannot handle close brackets correctly -- # in scan sets, so we specify it separately. -- case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -- arg="\"$arg\"" -- ;; -- esac -- lastarg="$lastarg $arg" -- done -- IFS="$save_ifs" -- lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` -+# func_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 -- 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 -+ fi -+} - -- case $user_target in -- next) -- # The next one is the -o target name -- user_target=yes -- continue -+ -+ -+# 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\"" -+ -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 # case $arg_mode - -- # Add the previous argument to base_compile. -- if test -z "$base_compile"; then -- base_compile="$lastarg" -- else -- base_compile="$base_compile $lastarg" -- fi -- done -+ # Aesthetically quote the previous argument. -+ func_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) -+ func_fatal_error "you must specify an argument for -Xcompile" - ;; -- no) -- # Get the name of the library object. -- libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` -+ target) -+ func_fatal_error "you must specify a target with \`-o'" - ;; - *) -- $echo "$modename: you must specify a target with \`-o'" 1>&2 -- exit 1 -+ # Get the name of the library object. -+ test -z "$libobj" && { -+ func_basename "$srcfile" -+ libobj="$func_basename_result" -+ } - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo -- xform='[cCFSfmso]' - case $libobj in -- *.ada) xform=ada ;; -- *.adb) xform=adb ;; -- *.ads) xform=ads ;; -- *.asm) xform=asm ;; -- *.c++) xform=c++ ;; -- *.cc) xform=cc ;; -- *.class) xform=class ;; -- *.cpp) xform=cpp ;; -- *.cxx) xform=cxx ;; -- *.f90) xform=f90 ;; -- *.for) xform=for ;; -- *.java) xform=java ;; -+ *.[cCFSifmso] | \ -+ *.ada | *.adb | *.ads | *.asm | \ -+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ -+ *.[fF][09]? | *.for | *.java | *.obj | *.sx) -+ func_xform "$libobj" -+ libobj=$func_xform_result -+ ;; - esac - -- libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` -- - case $libobj in -- *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; -+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; - *) -- $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 -- exit 1 -+ func_fatal_error "cannot determine name of library object from \`$libobj'" - ;; - esac - -- # Infer tagged configuration to use if any are available and -- # if one wasn't chosen via the "--tag" command line option. -- # Only attempt this if the compiler in the base compile -- # command doesn't match the default compiler. -- if test -n "$available_tags" && test -z "$tagname"; then -- case $base_compile in -- "$CC "*) ;; -- # Blanks in the command may have been stripped by the calling shell, -- # but not from the CC environment variable when ltconfig was run. -- "`$echo $CC` "*) ;; -- *) -- for z in $available_tags; do -- if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then -- # Evaluate the configuration. -- eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" -- case $base_compile in -- "$CC "*) -- # The compiler in the base compile command matches -- # the one in the tagged configuration. -- # Assume this is the tagged configuration we want. -- tagname=$z -- break -- ;; -- "`$echo $CC` "*) -- tagname=$z -- break -- ;; -- esac -- fi -- done -- # If $tagname still isn't set, then no tagged configuration -- # was found and let the user know that the "--tag" command -- # line option must be used. -- if test -z "$tagname"; then -- echo "$modename: unable to infer tagged configuration" -- echo "$modename: specify a tag with \`--tag'" 1>&2 -- exit 1 --# else --# echo "$modename: using $tagname tagged configuration" -- fi -+ func_infer_tag $base_compile -+ -+ 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 -+ ;; -+ -+ -prefer-pic) -+ pic_mode=yes -+ continue -+ ;; -+ -+ -prefer-non-pic) -+ pic_mode=no -+ continue - ;; - esac -- fi -+ done - -- objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` -- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` -- if test "X$xdir" = "X$obj"; then -- xdir= -- else -- xdir=$xdir/ -- fi -+ func_quote_for_eval "$libobj" -+ test "X$libobj" != "X$func_quote_for_eval_result" \ -+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ -+ && func_warning "libobj name \`$libobj' may not contain shell special characters." -+ func_dirname_and_basename "$obj" "/" "" -+ objname="$func_basename_result" -+ xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - -- if test -z "$base_compile"; then -- $echo "$modename: you must specify a compilation command" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi -+ test -z "$base_compile" && \ -+ func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then -@@ -556,16 +1274,13 @@ - removelist="$lobj $libobj ${libobj}T" - fi - -- $run $rm $removelist -- trap "$run $rm $removelist; exit 1" 1 2 15 -- - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in -- cygwin* | mingw* | pw32* | os2*) -+ cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac -- if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then -+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi -@@ -573,10 +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" -- trap "$run $rm $removelist; exit 1" 1 2 15 - else - output_obj= - need_locks=no -@@ -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 -- $show "Waiting for $lockfile to be removed" -+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do -+ func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then -- echo "\ -+ $ECHO "\ - *** ERROR, $lockfile exists and contains: - `cat $lockfile 2>/dev/null` - -@@ -603,29 +1316,22 @@ - avoid parallel builds (make -j) in this platform, or get a better - compiler." - -- $run $rm $removelist -- exit 1 -+ $opt_dry_run || $RM $removelist -+ exit $EXIT_FAILURE - fi -- echo $srcfile > "$lockfile" -+ 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 -- -- $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 "\ - *** ERROR, $lockfile contains: - `cat $lockfile 2>/dev/null` - -@@ -678,45 +1371,29 @@ - avoid parallel builds (make -j) in this platform, or get a better - compiler." - -- $run $rm $removelist -- exit 1 -+ $opt_dry_run || $RM $removelist -+ exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one -- if test -n "$output_obj" && test "x$output_obj" != "x$lobj"; then -- $show "$mv $output_obj $lobj" -- if $run $mv $output_obj $lobj; then : -- else -- error=$? -- $run $rm $removelist -- exit $error -- fi -+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then -+ func_show_eval '$MV "$output_obj" "$lobj"' \ -+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - -- # Append the name of the PIC object to the libtool object file. -- test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != x"$srcfile"; then -- echo "\ -+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then -+ $ECHO "\ - *** ERROR, $lockfile contains: - `cat $lockfile 2>/dev/null` - -@@ -748,57 +1420,2624 @@ - avoid parallel builds (make -j) in this platform, or get a better - compiler." - -- $run $rm $removelist -- exit 1 -+ $opt_dry_run || $RM $removelist -+ exit $EXIT_FAILURE - fi - - # Just move the object if needed -- if test -n "$output_obj" && test "x$output_obj" != "x$obj"; then -- $show "$mv $output_obj $obj" -- if $run $mv $output_obj $obj; then : -+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then -+ func_show_eval '$MV "$output_obj" "$obj"' \ -+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' -+ fi -+ fi -+ -+ $opt_dry_run || { -+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" -+ -+ # Unlock the critical section if it was locked -+ if test "$need_locks" != no; then -+ removelist=$lockfile -+ $RM "$lockfile" -+ fi -+ } -+ -+ 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 -- 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 - -- # 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 ++ case $nonopt in *shtool*) :;; *) false;; esac; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " @@ -34912,7 +7249,12 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + # 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" ++ func_append install_prog "$func_quote_for_eval_result" ++ install_shared_prog=$install_prog ++ case " $install_prog " in ++ *[\\\ /]cp\ *) install_cp=: ;; ++ *) install_cp=false ;; ++ esac + + # We need to accept at least all the BSD install flags. + dest= @@ -34922,10 +7264,12 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + install_type= + isdir=no + stripme= ++ no_mode=: + for arg + do ++ arg2= + if test -n "$dest"; then -+ files="$files $dest" ++ func_append files " $dest" + dest=$arg + continue + fi @@ -34933,10 +7277,9 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + case $arg in + -d) isdir=yes ;; + -f) -+ case " $install_prog " in -+ *[\\\ /]cp\ *) ;; -+ *) prev=$arg ;; -+ esac ++ if $install_cp; then :; else ++ prev=$arg ++ fi + ;; + -g | -m | -o) + prev=$arg @@ -34950,6 +7293,10 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then ++ if test "x$prev" = x-m && test -n "$install_override_mode"; then ++ arg2=$install_override_mode ++ no_mode=false ++ fi + prev= + else + dest=$arg @@ -34960,7 +7307,11 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" -+ install_prog="$install_prog $func_quote_for_eval_result" ++ func_append install_prog " $func_quote_for_eval_result" ++ if test -n "$arg2"; then ++ func_quote_for_eval "$arg2" ++ fi ++ func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ @@ -34969,6 +7320,13 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + ++ if test -n "$install_override_mode" && $no_mode; then ++ if $install_cp; then :; else ++ func_quote_for_eval "$install_override_mode" ++ func_append install_shared_prog " -m $func_quote_for_eval_result" ++ fi ++ fi ++ + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" @@ -35023,10 +7381,13 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + case $file in + *.$libext) + # Do the static libraries later. -+ staticlibs="$staticlibs $file" ++ func_append staticlibs " $file" + ;; + + *.la) ++ func_resolve_sysroot "$file" ++ file=$func_resolve_sysroot_result ++ + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" @@ -35040,23 +7401,23 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; -+ *) current_libdirs="$current_libdirs $libdir" ;; ++ *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; -+ *) future_libdirs="$future_libdirs $libdir" ;; ++ *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" -+ dir="$dir$objdir" ++ func_append dir "$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. -+ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` ++ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that @@ -35069,9 +7430,9 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + + 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%"` ++ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else -+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` ++ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" @@ -35089,7 +7450,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. -+ func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ ++ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in @@ -35129,7 +7490,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. -+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ++ test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) @@ -35229,7 +7590,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + if test -f "$lib"; then + func_source "$lib" + fi -+ libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test ++ libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no @@ -35248,7 +7609,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. -+ relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` ++ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" @@ -35267,7 +7628,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + } + else + # Install the binary that we compiled earlier. -+ file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` ++ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + @@ -35326,7 +7687,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + fi +} + -+test "$mode" = install && func_mode_install ${1+"$@"} ++test "$opt_mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p @@ -35369,6 +7730,22 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh +extern \"C\" { +#endif + ++#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) ++#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" ++#endif ++ ++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) ++/* DATA imports from DLLs on WIN32 con't be const, because runtime ++ relocations are performed -- see ld's documentation on pseudo-relocs. */ ++# define LT_DLSYM_CONST ++#elif defined(__osf__) ++/* This system does not cope well with relocations in const data. */ ++# define LT_DLSYM_CONST ++#else ++# define LT_DLSYM_CONST const ++#endif ++ +/* External symbol declarations for the compiler. */\ +" + @@ -35378,10 +7755,11 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + $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` ++ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$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'" ++ func_to_tool_file "$progfile" func_convert_file_msys_to_w32 ++ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" ++ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then @@ -35417,7 +7795,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in -+ *cygwin | *mingw* | *cegcc* ) ++ *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; @@ -35430,10 +7808,52 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + 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'" -+ } ++ case $host in ++ *cygwin* | *mingw* | *cegcc* ) ++ # if an import library, we need to obtain dlname ++ if func_win32_import_lib_p "$dlprefile"; then ++ func_tr_sh "$dlprefile" ++ eval "curr_lafile=\$libfile_$func_tr_sh_result" ++ dlprefile_dlbasename="" ++ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then ++ # Use subshell, to avoid clobbering current variable values ++ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` ++ if test -n "$dlprefile_dlname" ; then ++ func_basename "$dlprefile_dlname" ++ dlprefile_dlbasename="$func_basename_result" ++ else ++ # no lafile. user explicitly requested -dlpreopen . ++ $sharedlib_from_linklib_cmd "$dlprefile" ++ dlprefile_dlbasename=$sharedlib_from_linklib_result ++ fi ++ fi ++ $opt_dry_run || { ++ if test -n "$dlprefile_dlbasename" ; then ++ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' ++ else ++ func_warning "Could not compute DLL name from $name" ++ eval '$ECHO ": $name " >> "$nlist"' ++ fi ++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 ++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | ++ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" ++ } ++ else # not an import lib ++ $opt_dry_run || { ++ eval '$ECHO ": $name " >> "$nlist"' ++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 ++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" ++ } ++ fi ++ ;; ++ *) ++ $opt_dry_run || { ++ eval '$ECHO ": $name " >> "$nlist"' ++ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 ++ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" ++ } ++ ;; ++ esac + done + + $opt_dry_run || { @@ -35461,36 +7881,19 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else -+ $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" ++ echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + -+ $ECHO >> "$output_objdir/$my_dlsyms" "\ ++ 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 ++extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; -+$lt_dlsym_const lt_dlsymlist ++LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," @@ -35503,7 +7906,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac -+ $ECHO >> "$output_objdir/$my_dlsyms" "\ ++ echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + @@ -35546,7 +7949,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; -+ *) symtab_cflags="$symtab_cflags $arg" ;; ++ *) func_append symtab_cflags " $arg" ;; + esac + done + @@ -35561,16 +7964,16 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + 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%"` ++ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` ++ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else -+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` -+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ++ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` ++ finalize_command=`$ECHO "$finalize_command" | $SED "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%"` ++ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` ++ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; @@ -35584,8 +7987,8 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + # 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@%%"` ++ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` ++ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + @@ -35595,6 +7998,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. ++# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $opt_debug @@ -35603,11 +8007,13 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" - ;; ++ ;; + *ar\ archive*) # could be an import, or static ++ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | -+ $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then -+ win32_nmres=`eval $NM -f posix -A $1 | ++ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then ++ func_to_tool_file "$1" func_convert_file_msys_to_w32 ++ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ @@ -35631,7 +8037,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + win32_libid_type="x86 DLL" + ;; + esac -+ ;; + ;; + esac + $ECHO "$win32_libid_type" +} @@ -35639,6 +8045,131 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh - # libtool link mode - link | relink) - modename="$modename: link" ++# func_cygming_dll_for_implib ARG ++# ++# Platform-specific function to extract the ++# name of the DLL associated with the specified ++# import library ARG. ++# Invoked by eval'ing the libtool variable ++# $sharedlib_from_linklib_cmd ++# Result is available in the variable ++# $sharedlib_from_linklib_result ++func_cygming_dll_for_implib () ++{ ++ $opt_debug ++ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` ++} ++ ++# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs ++# ++# The is the core of a fallback implementation of a ++# platform-specific function to extract the name of the ++# DLL associated with the specified import library LIBNAME. ++# ++# SECTION_NAME is either .idata$6 or .idata$7, depending ++# on the platform and compiler that created the implib. ++# ++# Echos the name of the DLL associated with the ++# specified import library. ++func_cygming_dll_for_implib_fallback_core () ++{ ++ $opt_debug ++ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` ++ $OBJDUMP -s --section "$1" "$2" 2>/dev/null | ++ $SED '/^Contents of section '"$match_literal"':/{ ++ # Place marker at beginning of archive member dllname section ++ s/.*/====MARK====/ ++ p ++ d ++ } ++ # These lines can sometimes be longer than 43 characters, but ++ # are always uninteresting ++ /:[ ]*file format pe[i]\{,1\}-/d ++ /^In archive [^:]*:/d ++ # Ensure marker is printed ++ /^====MARK====/p ++ # Remove all lines with less than 43 characters ++ /^.\{43\}/!d ++ # From remaining lines, remove first 43 characters ++ s/^.\{43\}//' | ++ $SED -n ' ++ # Join marker and all lines until next marker into a single line ++ /^====MARK====/ b para ++ H ++ $ b para ++ b ++ :para ++ x ++ s/\n//g ++ # Remove the marker ++ s/^====MARK====// ++ # Remove trailing dots and whitespace ++ s/[\. \t]*$// ++ # Print ++ /./p' | ++ # we now have a list, one entry per line, of the stringified ++ # contents of the appropriate section of all members of the ++ # archive which possess that section. Heuristic: eliminate ++ # all those which have a first or second character that is ++ # a '.' (that is, objdump's representation of an unprintable ++ # character.) This should work for all archives with less than ++ # 0x302f exports -- but will fail for DLLs whose name actually ++ # begins with a literal '.' or a single character followed by ++ # a '.'. ++ # ++ # Of those that remain, print the first one. ++ $SED -e '/^\./d;/^.\./d;q' ++} ++ ++# func_cygming_gnu_implib_p ARG ++# This predicate returns with zero status (TRUE) if ++# ARG is a GNU/binutils-style import library. Returns ++# with nonzero status (FALSE) otherwise. ++func_cygming_gnu_implib_p () ++{ ++ $opt_debug ++ func_to_tool_file "$1" func_convert_file_msys_to_w32 ++ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` ++ test -n "$func_cygming_gnu_implib_tmp" ++} ++ ++# func_cygming_ms_implib_p ARG ++# This predicate returns with zero status (TRUE) if ++# ARG is an MS-style import library. Returns ++# with nonzero status (FALSE) otherwise. ++func_cygming_ms_implib_p () ++{ ++ $opt_debug ++ func_to_tool_file "$1" func_convert_file_msys_to_w32 ++ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` ++ test -n "$func_cygming_ms_implib_tmp" ++} ++ ++# func_cygming_dll_for_implib_fallback ARG ++# Platform-specific function to extract the ++# name of the DLL associated with the specified ++# import library ARG. ++# ++# This fallback implementation is for use when $DLLTOOL ++# does not support the --identify-strict option. ++# Invoked by eval'ing the libtool variable ++# $sharedlib_from_linklib_cmd ++# Result is available in the variable ++# $sharedlib_from_linklib_result ++func_cygming_dll_for_implib_fallback () ++{ ++ $opt_debug ++ if func_cygming_gnu_implib_p "$1" ; then ++ # binutils import library ++ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` ++ elif func_cygming_ms_implib_p "$1" ; then ++ # ms-generated import library ++ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` ++ else ++ # unknown ++ sharedlib_from_linklib_result="" ++ fi ++} + + +# func_extract_an_archive dir oldlib @@ -35647,7 +8178,18 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + $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 test "$lock_old_archive_extraction" = yes; then ++ lockfile=$f_ex_an_ar_oldlib.lock ++ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do ++ func_echo "Waiting for $lockfile to be removed" ++ sleep 2 ++ done ++ fi ++ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ ++ 'stat=$?; rm -f "$lockfile"; exit $stat' ++ if test "$lock_old_archive_extraction" = yes; then ++ $opt_dry_run || rm -f "$lockfile" ++ fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else @@ -35718,7 +8260,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do -+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` ++ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ @@ -35733,25 +8275,30 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac -+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` ++ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + -+ -+# func_emit_wrapper_part1 [arg=no] ++# 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. +# -+# 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 () ++# 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_part1_arg1=no -+ if test -n "$1" ; then -+ func_emit_wrapper_part1_arg1=$1 -+ fi ++ func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL @@ -35767,7 +8314,6 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + +# 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 @@ -35798,31 +8344,132 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh +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\ ++ file=\"\$0\"" ++ ++ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` ++ $ECHO "\ ++ ++# A function that is used when there is no print builtin or printf. ++func_fallback_echo () ++{ ++ eval 'cat <<_LTECHO_EOF ++\$1 ++_LTECHO_EOF' ++} ++ ECHO=\"$qECHO\" ++ fi ++ ++# Very basic option parsing. These options are (a) specific to ++# the libtool wrapper, (b) are identical between the wrapper ++# /script/ and the wrapper /executable/ which is used only on ++# windows platforms, and (c) all begin with the string "--lt-" ++# (application programs are unlikely to have options which match ++# this pattern). ++# ++# There are only two supported options: --lt-debug and ++# --lt-dump-script. There is, deliberately, no --lt-help. ++# ++# The first argument to this parsing function should be the ++# script's $0 value, followed by "$@". ++lt_option_debug= ++func_parse_lt_options () ++{ ++ lt_script_arg0=\$0 ++ shift ++ for lt_opt ++ do ++ case \"\$lt_opt\" in ++ --lt-debug) lt_option_debug=1 ;; ++ --lt-dump-script) ++ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` ++ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. ++ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` ++ cat \"\$lt_dump_D/\$lt_dump_F\" ++ exit 0 ++ ;; ++ --lt-*) ++ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 ++ exit 1 ++ ;; ++ esac ++ done ++ ++ # Print the debug banner immediately: ++ if test -n \"\$lt_option_debug\"; then ++ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 ++ fi ++} ++ ++# Used when --lt-debug. Prints its arguments to stdout ++# (redirection is the responsibility of the caller) ++func_lt_dump_args () ++{ ++ lt_dump_args_N=1; ++ for lt_arg ++ do ++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" ++ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` ++ done ++} ++ ++# Core function for launching the target application ++func_exec_program_core () ++{ +" -+ $ECHO "\ ++ case $host in ++ # Backslashes separate directories on plain windows ++ *-*-mingw | *-*-os2* | *-cegcc*) ++ $ECHO "\ ++ if test -n \"\$lt_option_debug\"; then ++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 ++ func_lt_dump_args \${1+\"\$@\"} 1>&2 ++ fi ++ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} ++" ++ ;; ++ ++ *) ++ $ECHO "\ ++ if test -n \"\$lt_option_debug\"; then ++ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 ++ func_lt_dump_args \${1+\"\$@\"} 1>&2 ++ fi ++ exec \"\$progdir/\$program\" \${1+\"\$@\"} ++" ++ ;; ++ esac ++ $ECHO "\ ++ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 ++ exit 1 ++} ++ ++# A function to encapsulate launching the target application ++# Strips options in the --lt-* namespace from \$@ and ++# launches target application with the remaining arguments. ++func_exec_program () ++{ ++ for lt_wr_arg ++ do ++ case \$lt_wr_arg in ++ --lt-*) ;; ++ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; ++ esac ++ shift ++ done ++ func_exec_program_core \${1+\"\$@\"} ++} ++ ++ # Parse options ++ func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. -+ thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` ++ thisdir=\`\$ECHO \"\$file\" | $SED '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%/[^/]*\$%%'\` ++ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then @@ -35832,30 +8479,13 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + esac + fi + -+ file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` -+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` ++ file=\`\$ECHO \"\$file\" | $SED '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 ++ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then @@ -35863,7 +8493,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + fi + # remove .libs from thisdir + case \"\$thisdir\" in -+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; ++ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi @@ -35918,21 +8548,11 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + + 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. ++ # ++ # Fix the DLL searchpath if we need to. Do this before prepending ++ # to shlibpath, because on Windows, both are PATH and uninstalled ++ # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH @@ -35940,240 +8560,36 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh +" + 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+\"\$@\"} -+" -+ ;; -+ -+ *) ++ # Export our shlibpath_var if we have one. ++ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $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 ++ # Add our own library path to $shlibpath_var ++ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + -+ # 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}" -+} ++ # Some systems cannot cope with colon-terminated $shlibpath_var ++ # The second colon is a workaround for a bug in BeOS R4 sed ++ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + ++ export $shlibpath_var ++" ++ fi + -+# 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 ++ $ECHO "\ ++ if test \"\$libtool_execute_magic\" != \"$magic\"; then ++ # Run the actual program with our arguments. ++ func_exec_program \${1+\"\$@\"} ++ fi ++ else ++ # The program doesn't exist. ++ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 ++ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 ++ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 ++ exit 1 + fi ++fi\ ++" +} -+# 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 @@ -36191,31 +8607,23 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + + This wrapper executable should never be moved out of the build directory. + If it is, it will not operate correctly. -+ -+ Currently, it simply execs the wrapper *script* "$SHELL $output", -+ but could eventually absorb all of the scripts functionality and -+ exec $objdir/$outputname directly. +*/ +EOF + cat <<"EOF" ++#ifdef _MSC_VER ++# define _CRT_SECURE_NO_DEPRECATE 1 ++#endif +#include +#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 @@ -36227,6 +8635,44 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh +#include +#include + ++/* declarations of non-ANSI functions */ ++#if defined(__MINGW32__) ++# ifdef __STRICT_ANSI__ ++int _putenv (const char *); ++# endif ++#elif defined(__CYGWIN__) ++# ifdef __STRICT_ANSI__ ++char *realpath (const char *, char *); ++int putenv (char *); ++int setenv (const char *, const char *, int); ++# endif ++/* #elif defined (other platforms) ... */ ++#endif ++ ++/* portability defines, excluding path handling macros */ ++#if defined(_MSC_VER) ++# define setmode _setmode ++# define stat _stat ++# define chmod _chmod ++# define getcwd _getcwd ++# define putenv _putenv ++# define S_IXUSR _S_IEXEC ++# ifndef _INTPTR_T_DEFINED ++# define _INTPTR_T_DEFINED ++# define intptr_t int ++# endif ++#elif defined(__MINGW32__) ++# define setmode _setmode ++# define stat _stat ++# define chmod _chmod ++# define getcwd _getcwd ++# define putenv _putenv ++#elif defined(__CYGWIN__) ++# define HAVE_SETENV ++# define FOPEN_WB "wb" ++/* #elif defined (other platforms) ... */ ++#endif ++ +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) @@ -36242,14 +8688,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh +# 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 -+ ++/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' @@ -36280,10 +8719,6 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh +# 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 @@ -36296,22 +8731,13 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + 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); -+} ++#if defined(LT_DEBUGWRAPPER) ++static int lt_debug = 1; +#else -+# define LTWRAPPER_DEBUGPRINTF(args) ++static int lt_debug = 0; +#endif + -+const char *program_name = NULL; ++const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); @@ -36321,41 +8747,27 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh +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_debugprintf (const char *file, int line, const char *fmt, ...); ++void lt_fatal (const char *file, int line, const char *message, ...); ++static const char *nonnull (const char *s); ++static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); -+void lt_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 <"))); ++ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", ++ nonnull (lt_argv_zero)); + for (i = 0; i < newargc; i++) + { -+ LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); ++ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", ++ i, nonnull (newargz[i])); + } + +EOF @@ -36610,11 +8983,14 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + mingw*) + cat <<"EOF" + /* execv doesn't actually work on mingw as expected on unix */ ++ newargz = prepare_spawn (newargz); + rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + if (rval == -1) + { + /* failed to start process */ -+ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); ++ lt_debugprintf (__FILE__, __LINE__, ++ "(main) failed to launch target \"%s\": %s\n", ++ lt_argv_zero, nonnull (strerror (errno))); + return 127; + } + return rval; @@ -36636,7 +9012,7 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh +{ + void *p = (void *) malloc (num); + if (!p) -+ lt_fatal ("Memory exhausted"); ++ lt_fatal (__FILE__, __LINE__, "memory exhausted"); + + return p; +} @@ -36670,8 +9046,8 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh +{ + struct stat st; + -+ LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", -+ path ? (*path ? path : "EMPTY!") : "NULL!")); ++ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", ++ nonempty (path)); + if ((!path) || (!*path)) + return 0; + @@ -36688,8 +9064,8 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + int rval = 0; + struct stat st; + -+ LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", -+ path ? (*path ? path : "EMPTY!") : "NULL!")); ++ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", ++ nonempty (path)); + if ((!path) || (!*path)) + return 0; + @@ -36715,8 +9091,8 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + int tmp_len; + char *concat_name; + -+ LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", -+ wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); ++ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", ++ nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; @@ -36769,7 +9145,8 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) -+ lt_fatal ("getcwd failed"); ++ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", ++ nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); @@ -36794,7 +9171,8 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) -+ lt_fatal ("getcwd failed"); ++ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", ++ nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); @@ -36820,8 +9198,9 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { -+ LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", -+ tmp_pathspec)); ++ lt_debugprintf (__FILE__, __LINE__, ++ "checking path component for symlinks: %s\n", ++ tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) @@ -36843,8 +9222,9 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + } + else + { -+ char *errstr = strerror (errno); -+ lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); ++ lt_fatal (__FILE__, __LINE__, ++ "error accessing file \"%s\": %s", ++ tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); @@ -36857,7 +9237,8 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { -+ lt_fatal ("Could not follow symlinks for %s", pathspec); ++ lt_fatal (__FILE__, __LINE__, ++ "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif @@ -36883,11 +9264,25 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + return str; +} + ++void ++lt_debugprintf (const char *file, int line, const char *fmt, ...) ++{ ++ va_list args; ++ if (lt_debug) ++ { ++ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); ++ va_start (args, fmt); ++ (void) vfprintf (stderr, fmt, args); ++ va_end (args); ++ } ++} ++ +static void -+lt_error_core (int exit_status, const char *mode, ++lt_error_core (int exit_status, const char *file, ++ int line, const char *mode, + const char *message, va_list ap) +{ -+ fprintf (stderr, "%s: %s: ", program_name, mode); ++ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + @@ -36896,20 +9291,32 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh +} + +void -+lt_fatal (const char *message, ...) ++lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); -+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap); ++ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + ++static const char * ++nonnull (const char *s) ++{ ++ return s ? s : "(null)"; ++} ++ ++static const char * ++nonempty (const char *s) ++{ ++ return (s && !*s) ? "(empty)" : nonnull (s); ++} ++ +void +lt_setenv (const char *name, const char *value) +{ -+ LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", -+ (name ? name : ""), -+ (value ? value : ""))); ++ lt_debugprintf (__FILE__, __LINE__, ++ "(lt_setenv) setting '%s' to '%s'\n", ++ nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ @@ -36954,6507 +9361,17917 @@ diff -durN gcl-2.6.8.ORIG/ltmain.sh gcl-2.6.8/ltmain.sh + return new_value; +} + -+int -+lt_split_name_value (const char *arg, char** name, char** value) ++void ++lt_update_exe_path (const char *name, const char *value) +{ -+ const char *p; -+ int len; -+ if (!arg || !*arg) -+ return 1; ++ lt_debugprintf (__FILE__, __LINE__, ++ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", ++ nonnull (name), nonnull (value)); + -+ p = strchr (arg, (int)'='); -+ -+ if (!p) -+ return 1; -+ -+ *value = xstrdup (++p); ++ 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); ++ } ++} + -+ len = strlen (arg) - strlen (*value); -+ *name = XMALLOC (char, len); -+ strncpy (*name, arg, len-1); -+ (*name)[len - 1] = '\0'; ++void ++lt_update_lib_path (const char *name, const char *value) ++{ ++ lt_debugprintf (__FILE__, __LINE__, ++ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", ++ nonnull (name), nonnull (value)); + -+ return 0; ++ if (name && *name && value && *value) ++ { ++ char *new_value = lt_extend_str (getenv (name), value, 0); ++ lt_setenv (name, new_value); ++ XFREE (new_value); ++ } +} + -+void -+lt_opt_process_env_set (const char *arg) ++EOF ++ case $host_os in ++ mingw*) ++ cat <<"EOF" ++ ++/* Prepares an argument vector before calling spawn(). ++ Note that spawn() does not by itself call the command interpreter ++ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ++ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); ++ GetVersionEx(&v); ++ v.dwPlatformId == VER_PLATFORM_WIN32_NT; ++ }) ? "cmd.exe" : "command.com"). ++ Instead it simply concatenates the arguments, separated by ' ', and calls ++ CreateProcess(). We must quote the arguments since Win32 CreateProcess() ++ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a ++ special way: ++ - Space and tab are interpreted as delimiters. They are not treated as ++ delimiters if they are surrounded by double quotes: "...". ++ - Unescaped double quotes are removed from the input. Their only effect is ++ that within double quotes, space and tab are treated like normal ++ characters. ++ - Backslashes not followed by double quotes are not special. ++ - But 2*n+1 backslashes followed by a double quote become ++ n backslashes followed by a double quote (n >= 0): ++ \" -> " ++ \\\" -> \" ++ \\\\\" -> \\" ++ */ ++#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" ++#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" ++char ** ++prepare_spawn (char **argv) +{ -+ char *name = NULL; -+ char *value = NULL; ++ size_t argc; ++ char **new_argv; ++ size_t i; ++ ++ /* Count number of arguments. */ ++ for (argc = 0; argv[argc] != NULL; argc++) ++ ; + -+ if (lt_split_name_value (arg, &name, &value) != 0) ++ /* Allocate new argument vector. */ ++ new_argv = XMALLOC (char *, argc + 1); ++ ++ /* Put quoted arguments into the new argument vector. */ ++ for (i = 0; i < argc; i++) + { -+ XFREE (name); -+ XFREE (value); -+ lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); ++ const char *string = argv[i]; ++ ++ if (string[0] == '\0') ++ new_argv[i] = xstrdup ("\"\""); ++ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) ++ { ++ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); ++ size_t length; ++ unsigned int backslashes; ++ const char *s; ++ char *quoted_string; ++ char *p; ++ ++ length = 0; ++ backslashes = 0; ++ if (quote_around) ++ length++; ++ for (s = string; *s != '\0'; s++) ++ { ++ char c = *s; ++ if (c == '"') ++ length += backslashes + 1; ++ length++; ++ if (c == '\\') ++ backslashes++; ++ else ++ backslashes = 0; ++ } ++ if (quote_around) ++ length += backslashes + 1; ++ ++ quoted_string = XMALLOC (char, length + 1); ++ ++ p = quoted_string; ++ backslashes = 0; ++ if (quote_around) ++ *p++ = '"'; ++ for (s = string; *s != '\0'; s++) ++ { ++ char c = *s; ++ if (c == '"') ++ { ++ unsigned int j; ++ for (j = backslashes + 1; j > 0; j--) ++ *p++ = '\\'; ++ } ++ *p++ = c; ++ if (c == '\\') ++ backslashes++; ++ else ++ backslashes = 0; ++ } ++ if (quote_around) ++ { ++ unsigned int j; ++ for (j = backslashes; j > 0; j--) ++ *p++ = '\\'; ++ *p++ = '"'; ++ } ++ *p = '\0'; ++ ++ new_argv[i] = quoted_string; ++ } ++ else ++ new_argv[i] = (char *) string; + } ++ new_argv[argc] = NULL; ++ ++ return new_argv; ++} ++EOF ++ ;; ++ esac ++ ++ cat <<"EOF" ++void lt_dump_script (FILE* f) ++{ ++EOF ++ func_emit_wrapper yes | ++ $SED -e 's/\([\\"]\)/\\\1/g' \ ++ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' ++ ++ cat <<"EOF" ++} ++EOF ++} ++# end: func_emit_cwrapperexe_src ++ ++# func_win32_import_lib_p ARG ++# True if ARG is an import lib, as indicated by $file_magic_cmd ++func_win32_import_lib_p () ++{ ++ $opt_debug ++ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in ++ *import*) : ;; ++ *) false ;; ++ esac ++} ++ ++# func_mode_link arg... ++func_mode_link () ++{ ++ $opt_debug + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) ++ *-*-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 +5100,10 @@ EOF + 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,8 +5117,11 @@ EOF + linker_flags= + dllsearchpath= + lib_search_path=`pwd` ++ inst_prefix_dir= ++ new_inherited_linker_flags= + + avoid_version=no ++ bindir= + dlfiles= + dlprefiles= + dlself=no +@@ -844,6 +5135,7 @@ EOF + no_install=no + objs= + non_pic_objects= ++ precious_files_regex= + prefer_static_libs=no + preload=no + prev= +@@ -855,27 +5147,47 @@ EOF + 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 ++ func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi +- else ++ prefer_static_libs=yes ++ ;; ++ -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi +- fi ++ prefer_static_libs=built ++ ;; ++ -static-libtool-libs) ++ if test -z "$pic_flag" && test -n "$link_static_flag"; then ++ dlopen_self=$dlopen_self_static ++ fi ++ prefer_static_libs=yes ++ ;; ++ esac + build_libtool_libs=no + build_old_libs=yes +- prefer_static_libs=yes + break + ;; + esac +@@ -885,33 +5197,33 @@ EOF + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. +- while test $# -gt 0; do ++ while test "$#" -gt 0; do + arg="$1" +- base_compile="$base_compile $arg" + shift +- 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 + + case $prev in ++ bindir) ++ bindir="$arg" ++ prev= ++ continue ++ ;; + 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 +@@ -938,9 +5250,9 @@ EOF + ;; + *) + if test "$prev" = dlfiles; then +- dlfiles="$dlfiles $arg" ++ func_append dlfiles " $arg" + else +- dlprefiles="$dlprefiles $arg" ++ func_append dlprefiles " $arg" + fi + prev= + continue +@@ -949,10 +5261,8 @@ EOF + ;; + expsyms) + export_symbols="$arg" +- if test ! -f "$arg"; then +- $echo "$modename: symbol file \`$arg' does not exist" +- exit 1 +- fi ++ test -f "$arg" \ ++ || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; +@@ -961,115 +5271,127 @@ EOF + prev= + continue + ;; +- release) +- release="-$arg" ++ framework) ++ case $host in ++ *-*-darwin*) ++ case "$deplibs " in ++ *" $qarg.ltframework "*) ;; ++ *) func_append deplibs " $qarg.ltframework" # this is fixed later ++ ;; ++ esac ++ ;; ++ esac ++ prev= ++ continue ++ ;; ++ inst_prefix) ++ inst_prefix_dir="$arg" + prev= + 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"` + do +-# moreargs="$moreargs $fil" +- arg=$fil +- # A libtool-controlled object. ++# func_append moreargs " $fil" ++ arg=$fil ++ # 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= +- +- # 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" || +- test "$pic_object" = none && \ +- test "$non_pic_object" = none; then +- $echo "$modename: cannot find name of object for \`$arg'" 1>&2 +- exit 1 +- fi ++ # Read the .lo file ++ func_source "$arg" + +- # 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 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" ++ # 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 +- dlfiles="$dlfiles $pic_object" +- prev= +- continue +- else +- # If libtool objects are unsupported, then we need to preload. +- 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 ++ func_append dlfiles " $pic_object" ++ prev= ++ continue ++ else ++ # If libtool objects are unsupported, then we need to preload. ++ prev=dlprefiles ++ fi ++ 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. ++ func_append dlprefiles " $pic_object" ++ prev= ++ 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" ++ # 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" +- if test -z "$pic_object" || test "$pic_object" = none ; then +- arg="$non_pic_object" +- fi +- 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 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 ++ func_append non_pic_objects " $non_pic_object" ++ if test -z "$pic_object" || test "$pic_object" = none ; then ++ arg="$non_pic_object" ++ fi ++ else ++ # If the PIC object exists, use it instead. ++ # $xdir was prepended to $pic_object above. ++ non_pic_object="$pic_object" ++ func_append non_pic_objects " $non_pic_object" ++ fi ++ else ++ # Only an error if not doing a dry-run. ++ 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"` +- libobjs="$libobjs $pic_object" +- non_pic_objects="$non_pic_objects $non_pic_object" +- fi ++ 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" +- exit 1 ++ 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 + ;; +@@ -1078,37 +5400,54 @@ EOF + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) +- $echo "$modename: only absolute run-paths are allowed" 1>&2 +- exit 1 ++ func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; +- *) rpath="$rpath $arg" ;; ++ *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; +- *) xrpath="$xrpath $arg" ;; ++ *) func_append xrpath " $arg" ;; + esac + fi + prev= + continue + ;; ++ shrext) ++ shrext_cmds="$arg" ++ prev= ++ continue ++ ;; ++ weak) ++ func_append weak_libs " $arg" ++ prev= ++ continue ++ ;; ++ xcclinker) ++ func_append linker_flags " $qarg" ++ func_append compiler_flags " $qarg" ++ prev= ++ func_append compile_command " $qarg" ++ func_append finalize_command " $qarg" ++ continue ++ ;; + xcompiler) +- compiler_flags="$compiler_flags $qarg" ++ func_append 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" ++ func_append linker_flags " $qarg" ++ func_append 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 +5456,23 @@ EOF + continue + ;; + esac +- fi # test -n $prev ++ fi # test -n "$prev" + + prevarg="$arg" + + 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) +@@ -1141,6 +5480,11 @@ EOF + continue + ;; + ++ -bindir) ++ prev=bindir ++ continue ++ ;; + -+ lt_setenv (name, value); -+ XFREE (name); -+ XFREE (value); -+} + -dlopen) + prev=dlfiles + continue +@@ -1158,8 +5502,7 @@ EOF + + -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" +- exit 1 ++ func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms +@@ -1169,44 +5512,74 @@ EOF + continue + ;; + ++ -framework) ++ prev=framework ++ continue ++ ;; + -+void -+lt_opt_process_env_prepend (const char *arg) -+{ -+ char *name = NULL; -+ char *value = NULL; -+ char *new_value = NULL; ++ -inst-prefix-dir) ++ prev=inst_prefix ++ continue ++ ;; + -+ if (lt_split_name_value (arg, &name, &value) != 0) -+ { -+ XFREE (name); -+ XFREE (value); -+ lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); -+ } + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -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*) ++ func_append compile_command " $arg" ++ func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) +- dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` ++ func_stripname "-L" '' "$arg" ++ if test -z "$func_stripname_result"; 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 ++ func_resolve_sysroot "$func_stripname_result" ++ dir=$func_resolve_sysroot_result + # 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 +- exit 1 +- fi ++ test -z "$absdir" && \ ++ func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in +- *" -L$dir "*) ;; ++ *" -L$dir "* | *" $arg "*) ++ # Will only happen for absolute or sysroot arguments ++ ;; + *) +- deplibs="$deplibs -L$dir" +- lib_search_path="$lib_search_path $dir" ++ # Preserve sysroot, but never include relative directories ++ case $dir in ++ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; ++ *) func_append deplibs " -L$dir" ;; ++ esac ++ func_append lib_search_path " $dir" + ;; + esac + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; +- *) dllsearchpath="$dllsearchpath:$dir";; ++ ::) dllsearchpath=$dir;; ++ *) func_append dllsearchpath ":$dir";; ++ esac ++ case :$dllsearchpath: in ++ *":$testbindir:"*) ;; ++ ::) dllsearchpath=$testbindir;; ++ *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac +@@ -1216,17 +5589,41 @@ EOF + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in +- *-*-cygwin* | *-*-pw32* | *-*-beos*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; +- *-*-mingw* | *-*-os2*) ++ *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; ++ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) ++ # Do not include libc due to us having libc/libc_r. ++ test "X$arg" = "X-lc" && continue ++ ;; ++ *-*-rhapsody* | *-*-darwin1.[012]) ++ # Rhapsody C and math libraries are in the System framework ++ func_append deplibs " System.ltframework" ++ continue ++ ;; ++ *-*-sco3.2v5* | *-*-sco5v6*) ++ # Causes problems with __ctype ++ test "X$arg" = "X-lc" && continue ++ ;; ++ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) ++ # Compiler inserts libc in the correct place for threads to work ++ test "X$arg" = "X-lc" && continue ++ ;; + esac ++ elif test "X$arg" = "X-lc_r"; then ++ case $host in ++ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) ++ # Do not include libc_r directly, use -pthread flag. ++ continue ++ ;; ++ esac + fi +- deplibs="$deplibs $arg" ++ func_append deplibs " $arg" + continue + ;; + +@@ -1235,6 +5632,33 @@ EOF + continue + ;; + ++ # Tru64 UNIX uses -model [arg] to determine the layout of C++ ++ # classes, name mangling, and exception handling. ++ # Darwin uses the -arch flag to determine output architecture. ++ -model|-arch|-isysroot|--sysroot) ++ func_append compiler_flags " $arg" ++ func_append compile_command " $arg" ++ func_append finalize_command " $arg" ++ prev=xcompiler ++ continue ++ ;; + -+ new_value = lt_extend_str (getenv (name), value, 0); -+ lt_setenv (name, new_value); -+ XFREE (new_value); -+ XFREE (name); -+ XFREE (value); -+} ++ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) ++ func_append compiler_flags " $arg" ++ func_append compile_command " $arg" ++ func_append finalize_command " $arg" ++ case "$new_inherited_linker_flags " in ++ *" $arg "*) ;; ++ * ) func_append new_inherited_linker_flags " $arg" ;; ++ esac ++ continue ++ ;; + -+void -+lt_opt_process_env_append (const char *arg) -+{ -+ char *name = NULL; -+ char *value = NULL; -+ char *new_value = NULL; ++ -multi_module) ++ single_module="${wl}-multi_module" ++ continue ++ ;; + -+ if (lt_split_name_value (arg, &name, &value) != 0) -+ { -+ XFREE (name); -+ XFREE (value); -+ lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); -+ } + -no-fast-install) + fast_install=no + continue +@@ -1242,11 +5666,11 @@ EOF + + -no-install) + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) ++ *-*-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. ++ func_warning "\`-no-install' is ignored for $host" ++ func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; +@@ -1266,6 +5690,11 @@ EOF + + -o) prev=output ;; + ++ -precious-files-regex) ++ prev=precious_regex ++ continue ++ ;; + -+ new_value = lt_extend_str (getenv (name), value, 1); -+ lt_setenv (name, new_value); -+ XFREE (new_value); -+ XFREE (name); -+ XFREE (value); -+} + -release) + prev=release + continue +@@ -1282,23 +5711,37 @@ EOF + ;; + + -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]:[\\/]*) ;; ++ =*) ++ func_stripname '=' '' "$dir" ++ dir=$lt_sysroot$func_stripname_result ++ ;; + *) +- $echo "$modename: only absolute run-paths are allowed" 1>&2 +- exit 1 ++ func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; +- *) xrpath="$xrpath $dir" ;; ++ *) func_append xrpath " $dir" ;; + esac + continue + ;; + +- -static) ++ -shared) ++ # The effects of -shared are defined in a previous loop. ++ continue ++ ;; + -+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 : ""))); ++ -shrext) ++ prev=shrext ++ continue ++ ;; + -+ 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); -+ } -+} ++ -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 +@@ -1317,41 +5760,48 @@ EOF + continue + ;; + ++ -version-number) ++ prev=vinfo ++ vinfo_number=yes ++ continue ++ ;; + -+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 : ""))); ++ -weak) ++ prev=weak ++ continue ++ ;; + -+ if (name && *name && value && *value) -+ { -+ char *new_value = lt_extend_str (getenv (name), value, 0); -+ lt_setenv (name, new_value); -+ XFREE (new_value); -+ } -+} + -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 +- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") +- flag="\"$flag\"" +- ;; +- esac +- arg="$arg $wl$flag" +- compiler_flags="$compiler_flags $flag" ++ func_quote_for_eval "$flag" ++ func_append arg " $func_quote_for_eval_result" ++ func_append 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,//'` ++ 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 +- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") +- flag="\"$flag\"" +- ;; +- esac +- arg="$arg $wl$flag" +- compiler_flags="$compiler_flags $wl$flag" +- linker_flags="$linker_flags $flag" ++ func_quote_for_eval "$flag" ++ func_append arg " $wl$func_quote_for_eval_result" ++ func_append compiler_flags " $wl$func_quote_for_eval_result" ++ func_append 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,136 +5814,156 @@ EOF + continue + ;; + ++ -XCClinker) ++ prev=xcclinker ++ continue ++ ;; + ++ # -msg_* for osf cc ++ -msg_*) ++ func_quote_for_eval "$arg" ++ arg="$func_quote_for_eval_result" ++ ;; + -+EOF -+} -+# end: func_emit_cwrapperexe_src ++ # Flags to be passed through unchanged, with rationale: ++ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler ++ # -r[0-9][0-9]* specify processor for the SGI compiler ++ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler ++ # +DA*, +DD* enable 64-bit mode for the HP compiler ++ # -q* compiler args for the IBM compiler ++ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC ++ # -F/path path to uninstalled frameworks, gcc on darwin ++ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC ++ # @file GCC response files ++ # -tp=* Portland pgcc target processor selection ++ # --sysroot=* for sysroot support ++ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization ++ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ ++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ ++ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) ++ func_quote_for_eval "$arg" ++ arg="$func_quote_for_eval_result" ++ func_append compile_command " $arg" ++ func_append finalize_command " $arg" ++ func_append compiler_flags " $arg" ++ continue ++ ;; + -+# 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 + # Some other compiler flag. + -* | +*) +- # 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) + # A standard object. +- objs="$objs $arg" ++ func_append objs " $arg" + ;; + + *.lo) + # 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 func_lalib_unsafe_p "$arg"; 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 ++ func_source "$arg" + +- 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 1 +- fi ++ 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 + + # 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" + +- if test "$pic_object" != none; then +- # Prepend the subdirectory the object is found in. ++ if test "$pic_object" != none; then ++ # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then +- dlfiles="$dlfiles $pic_object" +- prev= +- continue ++ func_append dlfiles " $pic_object" ++ prev= ++ continue + else +- # If libtool objects are unsupported, then we need to preload. +- prev=dlprefiles ++ # If libtool objects are unsupported, then we need to preload. ++ prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama +- if test "$prev" = dlprefiles; then ++ if test "$prev" = dlprefiles; then + # Preload the old-style object. +- dlprefiles="$dlprefiles $pic_object" ++ func_append dlprefiles " $pic_object" + prev= +- fi ++ fi + +- # A PIC object. +- libobjs="$libobjs $pic_object" ++ # A PIC object. ++ func_append libobjs " $pic_object" + arg="$pic_object" +- fi ++ fi + +- # Non-PIC object. +- if test "$non_pic_object" != none; then +- # Prepend the subdirectory the object is found in. ++ # 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 standard non-PIC object +- non_pic_objects="$non_pic_objects $non_pic_object" +- if test -z "$pic_object" || test "$pic_object" = none ; then +- arg="$non_pic_object" +- fi +- 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 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 ++ func_append non_pic_objects " $non_pic_object" ++ if test -z "$pic_object" || test "$pic_object" = none ; then ++ arg="$non_pic_object" + fi ++ else ++ # If the PIC object exists, use it instead. ++ # $xdir was prepended to $pic_object above. ++ non_pic_object="$pic_object" ++ func_append non_pic_objects " $non_pic_object" ++ fi ++ else ++ # Only an error if not doing a dry-run. ++ 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"` +- libobjs="$libobjs $pic_object" +- non_pic_objects="$non_pic_objects $non_pic_object" +- fi ++ 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 + ;; + + *.$libext) + # An archive. +- deplibs="$deplibs $arg" +- old_deplibs="$old_deplibs $arg" ++ func_append deplibs " $arg" ++ func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + ++ func_resolve_sysroot "$arg" + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. +- dlfiles="$dlfiles $arg" ++ func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. +- dlprefiles="$dlprefiles $arg" ++ func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else +- deplibs="$deplibs $arg" ++ func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; +@@ -1502,113 +5972,53 @@ EOF + *) + # 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 +- +- # 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 link +- # command doesn't match the default compiler. +- if test -n "$available_tags" && test -z "$tagname"; then +- case $base_compile in +- "$CC "*) ;; +- # Blanks in the command may have been stripped by the calling shell, +- # but not from the CC environment variable when ltconfig was run. +- "`$echo $CC` "*) ;; +- *) +- for z in $available_tags; do +- if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then +- # Evaluate the configuration. +- eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" +- case $base_compile in +- "$CC "*) +- # The compiler in $compile_command matches +- # the one in the tagged configuration. +- # Assume this is the tagged configuration we want. +- tagname=$z +- break +- ;; +- "`$echo $CC` "*) +- tagname=$z +- break +- ;; +- esac +- fi +- done +- # If $tagname still isn't set, then no tagged configuration +- # was found and let the user know that the "--tag" command +- # line option must be used. +- if test -z "$tagname"; then +- echo "$modename: unable to infer tagged configuration" +- echo "$modename: specify a tag with \`--tag'" 1>&2 +- exit 1 +-# else +-# echo "$modename: using $tagname tagged configuration" +- fi +- ;; +- esac +- 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 + 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%^.*/%%'` ++ func_basename "$output" ++ outputname="$func_basename_result" + libobjs_save="$libobjs" + + 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 \"\${$shlibpath_var}\" \| \$SED \'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" ++ func_to_tool_file "$output_objdir/" ++ tool_output_objdir=$func_to_tool_file_result + # Create the object directory. +- if test ! -d $output_objdir; then +- $show "$mkdir $output_objdir" +- $run $mkdir $output_objdir +- status=$? +- if test $status -ne 0 && test ! -d $output_objdir; then +- exit $status +- fi +- fi ++ func_mkdir_p "$output_objdir" - # FIXME: Unfortunately, there are problems with the above when trying -@@ -812,10 +4051,10 @@ - allow_undefined=yes + # Determine the type of output + case $output in + "") +- $echo "$modename: you must specify an output file" 1>&2 +- $echo "$help" 1>&2 +- exit 1 ++ func_fatal_help "you must specify an output file" ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; +@@ -1617,29 +6027,34 @@ EOF 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= + specialdeplibs= ++ + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do +- case "$libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; +- esac +- libs="$libs $deplib" ++ if $opt_preserve_dup_deps ; then ++ case "$libs " in ++ *" $deplib "*) func_append specialdeplibs " $deplib" ;; ++ esac ++ fi ++ func_append libs " $deplib" + done - 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 +- if test $linkmode = lib; then ++ if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" - # 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 -+ func_warning "complete static linking is impossible in this configuration" + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= +- for pre_post_dep in $predeps $postdeps; do +- case "$pre_post_deps " in +- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; +- esac +- pre_post_deps="$pre_post_deps $pre_post_dep" +- done ++ if $opt_duplicate_compiler_generated_deps; then ++ for pre_post_dep in $predeps $postdeps; do ++ case "$pre_post_deps " in ++ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; ++ esac ++ func_append pre_post_deps " $pre_post_dep" ++ done ++ fi + pre_post_deps= + fi + +@@ -1649,15 +6064,15 @@ EOF + 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 ++ + case $linkmode in + lib) +- 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 +- exit 1 ++ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done +@@ -1673,40 +6088,105 @@ EOF + *) 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" ++ deplibs= ++ fi ++ if test "$linkmode" = prog; then + case $pass in +- dlopen) +- libs="$dlfiles" +- save_deplibs="$deplibs" # Collect dlpreopened libraries +- deplibs= +- ;; ++ dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + 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= ++ func_resolve_sysroot "$lib" ++ case $lib in ++ *.la) func_source "$func_resolve_sysroot_result" ;; ++ esac ++ ++ # Collect preopened libtool deplibs, except any this library ++ # has declared as weak libs ++ for deplib in $dependency_libs; do ++ func_basename "$deplib" ++ deplib_base=$func_basename_result ++ case " $weak_libs " in ++ *" $deplib_base "*) ;; ++ *) func_append 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 ++ -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 ++ func_append compiler_flags " $deplib" ++ if test "$linkmode" = lib ; then ++ case "$new_inherited_linker_flags " in ++ *" $deplib "*) ;; ++ * ) func_append new_inherited_linker_flags " $deplib" ;; ++ esac ++ fi ++ fi ++ continue ++ ;; + -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 ++ func_warning "\`-l' is ignored for archives/objects" + continue fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static +- 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 -- else -+ prefer_static_libs=yes -+ ;; -+ -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static +- 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" +- if test -f "$lib"; then +- found=yes +- break +- fi ++ for searchdir in $searchdirs; do ++ for search_ext in .la $std_shrext .so .a; do ++ # Search the libtool library ++ lib="$searchdir/lib${name}${search_ext}" ++ if test -f "$lib"; then ++ if test "$search_ext" = ".la"; then ++ found=yes ++ else ++ found=no ++ fi ++ break 2 ++ fi ++ done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library +@@ -1715,74 +6195,153 @@ EOF + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" +- test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs" ++ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue ++ else # deplib is a libtool library ++ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, ++ # We need to do some special things here, and not later. ++ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then ++ case " $predeps $postdeps " in ++ *" $deplib "*) ++ if func_lalib_p "$lib"; then ++ library_names= ++ old_library= ++ 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 ++ func_dirname "$lib" "" "." ++ ladir="$func_dirname_result" ++ lib=$ladir/$old_library ++ if test "$linkmode,$pass" = "prog,link"; then ++ compile_deplibs="$deplib $compile_deplibs" ++ finalize_deplibs="$deplib $finalize_deplibs" ++ else ++ deplibs="$deplib $deplibs" ++ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" ++ fi ++ continue ++ fi ++ fi ++ ;; ++ *) ;; ++ esac ++ fi fi -- fi -+ prefer_static_libs=built -+ ;; -+ -static-libtool-libs) -+ if test -z "$pic_flag" && test -n "$link_static_flag"; then -+ dlopen_self=$dlopen_self_static + ;; # -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 "*) ;; ++ * ) func_append new_inherited_linker_flags " $deplib" ;; ++ esac ++ fi + fi -+ prefer_static_libs=yes ++ continue + ;; -+ esac - build_libtool_libs=no - build_old_libs=yes -- prefer_static_libs=yes - break - ;; - esac -@@ -885,24 +4147,19 @@ - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. -- while test $# -gt 0; do -+ while test "$#" -gt 0; do - arg="$1" -- base_compile="$base_compile $arg" - shift -- 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" -- exit 1 -- fi -+ test -f "$arg" \ -+ || func_fatal_error "symbol file \`$arg' does not exist" - prev= + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" +- 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//'` ++ func_stripname '-L' '' "$deplib" ++ func_resolve_sysroot "$func_stripname_result" ++ func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) +- if test $pass = conv; then ++ if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi +- if test $pass = scan; then ++ if test "$pass" = scan; then + deplibs="$deplib $deplibs" +- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi ++ func_stripname '-L' '' "$deplib" ++ func_resolve_sysroot "$func_stripname_result" ++ func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) +- $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2 ++ func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode continue - ;; -@@ -961,115 +4216,127 @@ - prev= + ;; # -L + -R*) +- if test $pass = link; then +- dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` ++ if test "$pass" = link; then ++ func_stripname '-R' '' "$deplib" ++ func_resolve_sysroot "$func_stripname_result" ++ dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; +- *) xrpath="$xrpath $dir" ;; ++ *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" continue ;; -- 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 +- *.la) lib="$deplib" ;; ++ *.la) ++ func_resolve_sysroot "$deplib" ++ lib=$func_resolve_sysroot_result + ;; -+ inst_prefix) -+ inst_prefix_dir="$arg" - prev= - 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"` - do - # moreargs="$moreargs $fil" -- arg=$fil -- # A libtool-controlled object. -+ arg=$fil -+ # 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= -- -- # 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" || -- test "$pic_object" = none && \ -- test "$non_pic_object" = none; then -- $echo "$modename: cannot find name of object for \`$arg'" 1>&2 -- exit 1 -- fi -+ # Read the .lo file -+ func_source "$arg" - -- # 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 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" -+ # Extract subdirectory from the argument. -+ func_dirname "$arg" "/" "" -+ xdir="$func_dirname_result" + *.$libext) +- if test $pass = conv; then ++ if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) +- if test "$deplibs_check_method" != pass_all; then +- echo +- echo "*** Warning: This library needs some functionality provided by $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." +- else +- echo +- echo "*** Warning: Linking the shared library $output against the" +- echo "*** static library $deplib is not portable!" +- 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 \"$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 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) +- if test $pass != link; then ++ if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" +@@ -1793,14 +6352,18 @@ EOF + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) +- if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then +- # If there is no dlopen support or we're linking statically, +- # we need to preload. +- newdlprefiles="$newdlprefiles $deplib" +- compile_deplibs="$deplib $compile_deplibs" +- finalize_deplibs="$deplib $finalize_deplibs" +- else +- newdlfiles="$newdlfiles $deplib" ++ if test "$pass" = conv; then ++ deplibs="$deplib $deplibs" ++ elif test "$linkmode" = prog; then ++ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then ++ # If there is no dlopen support or we're linking statically, ++ # we need to preload. ++ func_append newdlprefiles " $deplib" ++ compile_deplibs="$deplib $compile_deplibs" ++ finalize_deplibs="$deplib $finalize_deplibs" ++ else ++ func_append newdlfiles " $deplib" ++ fi + fi + continue + ;; +@@ -1809,21 +6372,18 @@ EOF + 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 ++ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi -- if test "$prev" = dlfiles; then -- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then -- dlfiles="$dlfiles $pic_object" -- prev= -- continue -- else -- # If libtool objects are unsupported, then we need to preload. -- prev=dlprefiles -- fi -- fi -+ if test "$pic_object" != none; then -+ # Prepend the subdirectory the object is found in. -+ pic_object="$xdir$pic_object" + # Check to see that this really is a libtool archive. +- if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : +- else +- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 +- exit 1 +- fi ++ func_lalib_unsafe_p "$lib" \ ++ || func_fatal_error "\`$lib' is not a valid libtool archive" -- # 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" -+ prev= -+ continue -+ else -+ # If libtool objects are unsupported, then we need to preload. -+ prev=dlprefiles -+ fi -+ fi +- ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` +- test "X$ladir" = "X$lib" && ladir="." ++ func_dirname "$lib" "" "." ++ ladir="$func_dirname_result" -- # 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. -+ dlprefiles="$dlprefiles $pic_object" -+ prev= -+ fi + dlname= + dlopen= +@@ -1831,72 +6391,92 @@ EOF + 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 + installed=yes ++ shouldnotlink=no ++ avoidtemprpath= ++ -- # 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 + # Read the .la file +- case $lib in +- */* | *\\*) . $lib ;; +- *) . ./$lib ;; +- esac ++ func_source "$lib" -- # A standard non-PIC object -- non_pic_objects="$non_pic_objects $non_pic_object" -- if test -z "$pic_object" || test "$pic_object" = none ; then -- arg="$non_pic_object" -- fi -- 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 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" ++ # Convert "-framework foo" to "foo.ltframework" ++ if test -n "$inherited_linker_flags"; then ++ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED '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 "*) ;; ++ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; ++ esac ++ done ++ fi ++ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || +- { test $linkmode = oldlib && test $linkmode = obj; }; then +- # Add dl[pre]opened files of deplib +- test -n "$dlopen" && dlfiles="$dlfiles $dlopen" +- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" ++ { test "$linkmode" != prog && test "$linkmode" != lib; }; then ++ test -n "$dlopen" && func_append dlfiles " $dlopen" ++ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi -- # 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 -+ func_append non_pic_objects " $non_pic_object" -+ if test -z "$pic_object" || test "$pic_object" = none ; then -+ arg="$non_pic_object" -+ fi -+ else -+ # If the PIC object exists, use it instead. -+ # $xdir was prepended to $pic_object above. -+ non_pic_object="$pic_object" -+ func_append non_pic_objects " $non_pic_object" -+ fi -+ else -+ # Only an error if not doing a dry-run. -+ if $opt_dry_run; then -+ # Extract subdirectory from the argument. -+ func_dirname "$arg" "/" "" -+ xdir="$func_dirname_result" +- if test $pass = conv; then ++ if test "$pass" = conv; then + # Only check for convenience libraries + 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 +- exit 1 ++ 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" +- old_convenience="$old_convenience $ladir/$objdir/$old_library" +- tmp_libs= +- for deplib in $dependency_libs; do +- deplibs="$deplib $deplibs" ++ func_append convenience " $ladir/$objdir/$old_library" ++ func_append old_convenience " $ladir/$objdir/$old_library" ++ elif test "$linkmode" != prog && test "$linkmode" != lib; then ++ func_fatal_error "\`$lib' is not a convenience library" ++ fi ++ tmp_libs= ++ for deplib in $dependency_libs; do ++ deplibs="$deplib $deplibs" ++ if $opt_preserve_dup_deps ; then + case "$tmp_libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ++ *" $deplib "*) func_append 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 +- fi ++ fi ++ func_append tmp_libs " $deplib" ++ done + continue + fi # $pass = conv -- 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 -+ 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" ++ + # Get the name of the library we link against. + linklib= +- for l in $old_library $library_names; do +- linklib="$l" +- done ++ if test -n "$old_library" && ++ { test "$prefer_static_libs" = yes || ++ test "$prefer_static_libs,$installed" = "built,no"; }; then ++ linklib=$old_library ++ else ++ for l in $old_library $library_names; do ++ linklib="$l" ++ done ++ fi + if test -z "$linklib"; then +- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 +- exit 1 ++ 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 - exit 1 -+ func_fatal_error "link input file \`$arg' does not exist" ++ 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" || ++ test "$dlopen_support" != yes || ++ test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking +- # statically, we need to preload. +- dlprefiles="$dlprefiles $lib" ++ # statically, we need to preload. We also need to preload any ++ # dependent libraries so libltdl's deplib preloader doesn't ++ # bomb out in the load deplibs phase. ++ func_append dlprefiles " $lib $dependency_libs" + else +- newdlfiles="$newdlfiles $lib" ++ func_append newdlfiles " $lib" fi -- arg=$save_arg -+ arg=$save_arg -+ prev= -+ continue -+ ;; -+ precious_regex) -+ precious_files_regex="$arg" -+ prev= -+ continue -+ ;; -+ release) -+ release="-$arg" - prev= continue + fi # $pass = dlopen +@@ -1907,66 +6487,106 @@ EOF + *) + 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 ;; -@@ -1078,8 +4345,7 @@ - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) -- $echo "$modename: only absolute run-paths are allowed" 1>&2 + 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 ++ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then ++ func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else +- dir="$libdir" +- absdir="$libdir" ++ dir="$lt_sysroot$libdir" ++ absdir="$lt_sysroot$libdir" + fi ++ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else +- dir="$ladir/$objdir" +- absdir="$abs_ladir/$objdir" +- # Remove this search path later +- notinst_path="$notinst_path $abs_ladir" ++ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then ++ dir="$ladir" ++ absdir="$abs_ladir" ++ # Remove this search path later ++ func_append notinst_path " $abs_ladir" ++ else ++ dir="$ladir/$objdir" ++ absdir="$abs_ladir/$objdir" ++ # Remove this search path later ++ func_append notinst_path " $abs_ladir" ++ fi + fi # $installed = yes +- 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 -z "$libdir"; then +- $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit 1 -+ func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then -@@ -1096,19 +4362,37 @@ - prev= - continue - ;; -+ shrext) -+ shrext_cmds="$arg" -+ prev= -+ continue -+ ;; -+ weak) -+ weak_libs="$weak_libs $arg" -+ prev= -+ continue -+ ;; -+ xcclinker) -+ linker_flags="$linker_flags $qarg" -+ compiler_flags="$compiler_flags $qarg" -+ prev= -+ func_append compile_command " $qarg" -+ func_append finalize_command " $qarg" -+ continue -+ ;; - 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" +- fi +- # Prefer using a static library (so that no silly _DYNAMIC symbols +- # are required to link). +- if test -n "$old_library"; then +- newdlprefiles="$newdlprefiles $dir/$old_library" +- # Otherwise, use the dlname, so that lt_dlopen finds it. +- elif test -n "$dlname"; then +- newdlprefiles="$newdlprefiles $dir/$dlname" +- else +- newdlprefiles="$newdlprefiles $dir/$linklib" ++ 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 ++ case "$host" in ++ # special handling for platforms with PE-DLLs. ++ *cygwin* | *mingw* | *cegcc* ) ++ # Linker will automatically link against shared library if both ++ # static and shared are present. Therefore, ensure we extract ++ # symbols from the import library if a shared library is present ++ # (otherwise, the dlopen module name will be incorrect). We do ++ # this by putting the import library name into $newdlprefiles. ++ # We recover the dlopen module name by 'saving' the la file ++ # name in a special purpose variable, and (later) extracting the ++ # dlname from the la file. ++ if test -n "$dlname"; then ++ func_tr_sh "$dir/$linklib" ++ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" ++ func_append newdlprefiles " $dir/$linklib" ++ else ++ func_append 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" && \ ++ func_append dlpreconveniencelibs " $dir/$old_library" ++ fi ++ ;; ++ * ) ++ # Prefer using a static library (so that no silly _DYNAMIC symbols ++ # are required to link). ++ if test -n "$old_library"; then ++ func_append 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" && \ ++ func_append dlpreconveniencelibs " $dir/$old_library" ++ # Otherwise, use the dlname, so that lt_dlopen finds it. ++ elif test -n "$dlname"; then ++ func_append newdlprefiles " $dir/$dlname" ++ else ++ func_append newdlprefiles " $dir/$linklib" ++ fi ++ ;; ++ esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library +- if test $linkmode = lib; then ++ if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else +- deplibs="$lib $deplibs" ++ deplibs="$lib $deplibs" # used for prog,scan pass + fi continue - ;; - *) -@@ -1117,23 +4401,23 @@ + fi + +- if test $linkmode = prog && test $pass != link; then +- newlib_search_path="$newlib_search_path $ladir" ++ ++ if test "$linkmode" = prog && test "$pass" != link; then ++ func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no +@@ -1978,31 +6598,43 @@ EOF + 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" ++ func_resolve_sysroot "$func_stripname_result" ++ func_append newlib_search_path " $func_resolve_sysroot_result" ++ ;; + esac + # Need to link against all dependency_libs? +- if test $linkalldeplibs = yes; then ++ if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi +- case "$tmp_libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; +- esac +- tmp_libs="$tmp_libs $deplib" ++ if $opt_preserve_dup_deps ; then ++ case "$tmp_libs " in ++ *" $deplib "*) func_append specialdeplibs " $deplib" ;; ++ esac ++ fi ++ func_append tmp_libs " $deplib" + done # for deplib continue - ;; - esac -- fi # test -n $prev -+ fi # test -n "$prev" + fi # $linkmode = prog... + +- link_static=no # Whether the deplib will be linked statically +- if test -n "$library_names" && +- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then +- # Link against this shared library ++ 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 -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 ++ *"$absdir:"*) ;; ++ *) func_append temp_rpath "$absdir:" ;; ++ esac ++ fi + +- if test "$linkmode,$pass" = "prog,link" || +- { test $linkmode = lib && test $hardcode_into_libs = yes; }; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. +@@ -2011,7 +6643,7 @@ EOF + *) + case "$compile_rpath " in + *" $absdir "*) ;; +- *) compile_rpath="$compile_rpath $absdir" ++ *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac +@@ -2020,21 +6652,10 @@ EOF + *) + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ++ *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac +- if test $linkmode = prog; then +- # We need to hardcode the library path +- if test -n "$shlibpath_var"; then +- # Make sure the rpath contains only unique directories. +- case "$temp_rpath " in +- *" $dir "*) ;; +- *" $absdir "*) ;; +- *) temp_rpath="$temp_rpath $dir" ;; +- esac +- fi +- fi + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && +@@ -2044,26 +6665,89 @@ EOF + # 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 ++ use_static_libs=no ++ fi ++ if test -n "$library_names" && ++ { test "$use_static_libs" = no || test -z "$old_library"; }; then ++ case $host in ++ *cygwin* | *mingw* | *cegcc*) ++ # No point in relinking DLLs because paths are not encoded ++ func_append notinst_deplibs " $lib" ++ need_relink=no ++ ;; ++ *) ++ if test "$installed" = no; then ++ func_append 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). 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" ++ else ++ $ECHO "*** Warning: Linking the shared library $output against the loadable module" ++ fi ++ $ECHO "*** $linklib is not portable!" ++ fi ++ if test "$linkmode" = lib && ++ test "$hardcode_into_libs" = yes; then ++ # Hardcode the library path. ++ # Skip directories that are in the system default run-time ++ # search path. ++ case " $sys_lib_dlsearch_path " in ++ *" $absdir "*) ;; ++ *) ++ case "$compile_rpath " in ++ *" $absdir "*) ;; ++ *) func_append compile_rpath " $absdir" ;; ++ esac ++ ;; ++ esac ++ case " $sys_lib_dlsearch_path " in ++ *" $libdir "*) ;; ++ *) ++ case "$finalize_rpath " in ++ *" $libdir "*) ;; ++ *) func_append finalize_rpath " $libdir" ;; ++ esac ++ ;; ++ esac + fi - prevarg="$arg" + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + 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*) +- major=`expr $current - $age` ++ *cygwin* | mingw* | *cegcc*) ++ func_arith $current - $age ++ major=$func_arith_result + versuffix="-$major" + ;; + esac +@@ -2074,41 +6758,29 @@ EOF - 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 - ;; + # 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" ++ func_basename "$soroot" ++ soname="$func_basename_result" ++ func_stripname 'lib' '.dll' "$soname" ++ newlib=libimp-$func_stripname_result.a - -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" - ;; + # 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'" +- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' +- eval cmds=\"$extract_expsyms_cmds\" +- 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 - -avoid-version) -@@ -1158,8 +4442,7 @@ + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else +- $show "generating import library for \`$soname'" +- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' +- eval cmds=\"$old_archive_from_expsyms_cmds\" +- 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 +- fi # test -n $old_archive_from_expsyms_cmds ++ fi # test -n "$old_archive_from_expsyms_cmds" - -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" -- exit 1 -+ func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms -@@ -1169,29 +4452,45 @@ - continue - ;; +- if test $linkmode = prog || test "$mode" != relink; then ++ if test "$linkmode" = prog || test "$opt_mode" != relink; then + add_shlibpath= + add_dir= + add= +@@ -2117,6 +6789,30 @@ EOF + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" ++ case $host in ++ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; ++ *-*-sysv4*uw2*) add_dir="-L$dir" ;; ++ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ ++ *-*-unixware7*) add_dir="-L$dir" ;; ++ *-*-darwin* ) ++ # 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 | ++ $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" ;; +@@ -2131,10 +6827,19 @@ EOF + 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" ++ # Try looking first in the location we're being installed to. ++ if test -n "$inst_prefix_dir"; then ++ case $libdir in ++ [\\/]*) ++ func_append add_dir " -L$inst_prefix_dir$libdir" ++ ;; ++ esac ++ fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" +@@ -2147,39 +6852,39 @@ EOF + esac -+ -framework) -+ prev=framework -+ continue -+ ;; -+ -+ -inst-prefix-dir) -+ prev=inst_prefix -+ continue -+ ;; -+ - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -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*) -+ func_append compile_command " $arg" -+ func_append finalize_command " $arg" - ;; - esac - continue - ;; + if test "$lib_linked" != yes; then +- $echo "$modename: configuration error: unsupported hardcode properties" +- exit 1 ++ func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; +- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; ++ *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi +- if test $linkmode = prog; then ++ if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + 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:"*) ;; +- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; ++ *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + +- if test $linkmode = prog || test "$mode" = relink; then ++ if test "$linkmode" = prog || test "$opt_mode" = relink; then + add_shlibpath= + add_dir= + add= + # 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" +@@ -2187,16 +6892,31 @@ EOF + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; +- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; ++ *) func_append 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" ++ else ++ add="$libdir/$linklib" ++ fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" ++ # Try looking first in the location we're being installed to. ++ if test -n "$inst_prefix_dir"; then ++ case $libdir in ++ [\\/]*) ++ func_append add_dir " -L$inst_prefix_dir$libdir" ++ ;; ++ esac ++ fi + add="-l$name" + fi - -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 -- exit 1 +- if test $linkmode = prog; then ++ if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else +@@ -2204,16 +6924,7 @@ EOF + test -n "$add" && deplibs="$add $deplibs" + fi + fi +- elif test $linkmode = prog; then +- if test "$alldeplibs" = yes && +- { test "$deplibs_check_method" = pass_all || +- { test "$build_libtool_libs" = yes && +- test -n "$library_names"; }; }; then +- # We only need to search for static libraries +- continue - fi -+ test -z "$absdir" && \ -+ func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac -@@ -1203,11 +4502,18 @@ - ;; - esac - case $host in -- *-*-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,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* | *-cegcc*) - # These systems don't actually have a C or math library (as such) - continue - ;; -- *-*-mingw* | *-*-os2*) -+ *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; -+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) -+ # Do not include libc due to us having libc/libc_r. -+ test "X$arg" = "X-lc" && continue -+ ;; -+ *-*-rhapsody* | *-*-darwin1.[012]) -+ # Rhapsody C and math libraries are in the System framework -+ deplibs="$deplibs System.ltframework" -+ continue -+ ;; -+ *-*-sco3.2v5* | *-*-sco5v6*) -+ # Causes problems with __ctype -+ test "X$arg" = "X-lc" && continue -+ ;; -+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) -+ # Compiler inserts libc in the correct place for threads to work -+ test "X$arg" = "X-lc" && continue -+ ;; - esac -+ elif test "X$arg" = "X-lc_r"; then -+ case $host in -+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) -+ # Do not include libc_r directly, use -pthread flag. -+ continue -+ ;; -+ esac - fi - deplibs="$deplibs $arg" - continue -@@ -1235,6 +4565,33 @@ - continue - ;; +- +- # Try to link the static library ++ elif test "$linkmode" = prog; then + # 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. +@@ -2234,101 +6945,133 @@ EOF + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo +- echo "*** Warning: This library needs some functionality provided by $lib." ++ $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." + 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." + fi + if test "$build_old_libs" = no; then +- build_libtool_libs=module +- build_old_libs=yes ++ build_libtool_libs=module ++ build_old_libs=yes + else +- build_libtool_libs=no ++ build_libtool_libs=no + fi + fi + else +- convenience="$convenience $dir/$old_library" +- old_convenience="$old_convenience $dir/$old_library" + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? -+ # Tru64 UNIX uses -model [arg] to determine the layout of C++ -+ # classes, name mangling, and exception handling. -+ # Darwin uses the -arch flag to determine output architecture. -+ -model|-arch|-isysroot) -+ compiler_flags="$compiler_flags $arg" -+ func_append compile_command " $arg" -+ func_append finalize_command " $arg" -+ prev=xcompiler -+ continue -+ ;; -+ -+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) -+ compiler_flags="$compiler_flags $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 -+ ;; -+ -+ -multi_module) -+ single_module="${wl}-multi_module" -+ continue -+ ;; +- if test $linkmode = lib; then ++ if test "$linkmode" = lib; then + if test -n "$dependency_libs" && +- { test $hardcode_into_libs != yes || test $build_old_libs = yes || +- test $link_static = yes; }; then ++ { test "$hardcode_into_libs" != yes || ++ test "$build_old_libs" = yes || ++ test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + 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";; ++ *) func_append xrpath " $temp_xrpath";; + esac;; +- *) temp_deplibs="$temp_deplibs $libdir";; ++ *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + +- newlib_search_path="$newlib_search_path $absdir" ++ func_append newlib_search_path " $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" +- case "$tmp_libs " in +- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; +- esac +- tmp_libs="$tmp_libs $deplib" ++ case $deplib in ++ -L*) func_stripname '-L' '' "$deplib" ++ func_resolve_sysroot "$func_stripname_result";; ++ *) func_resolve_sysroot "$deplib" ;; ++ esac ++ if $opt_preserve_dup_deps ; then ++ case "$tmp_libs " in ++ *" $func_resolve_sysroot_result "*) ++ func_append specialdeplibs " $func_resolve_sysroot_result" ;; ++ esac ++ fi ++ func_append tmp_libs " $func_resolve_sysroot_result" + done + +- if test $link_all_deplibs != no; then ++ if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do ++ path= + case $deplib in + -L*) path="$deplib" ;; + *.la) +- dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` +- test "X$dir" = "X$deplib" && dir="." ++ func_resolve_sysroot "$deplib" ++ deplib=$func_resolve_sysroot_result ++ 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 ++ if $GREP "^installed=no" $deplib > /dev/null; then ++ case $host in ++ *-*-darwin*) ++ depdepl= ++ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` ++ if test -n "$deplibrary_names" ; then ++ for tmp in $deplibrary_names ; do ++ depdepl=$tmp ++ done ++ 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 ++ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" ++ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" ++ path= ++ fi ++ fi ++ ;; ++ *) + path="-L$absdir/$objdir" ++ ;; ++ 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" + - -no-fast-install) - fast_install=no - continue -@@ -1242,11 +4599,11 @@ + path="-L$absdir" + fi + ;; +- *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; +@@ -2338,21 +7081,29 @@ EOF + 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 " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ++ fi ++ fi ++ dependency_libs="$newdependency_libs" ++ if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi +- if test $pass != dlopen; then +- test $pass != scan && dependency_libs="$newdependency_libs" +- if test $pass != conv; then ++ if test "$pass" != dlopen; then ++ if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; +- *) lib_search_path="$lib_search_path $dir" ;; ++ *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= +@@ -2368,9 +7119,30 @@ EOF + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do ++ # FIXME: Pedantically, this is the right thing to do, so ++ # that some nasty dependency loop isn't accidentally ++ # broken: ++ #new_libs="$deplib $new_libs" ++ # Pragmatically, this seems to cause very few problems in ++ # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; ++ -R*) ;; + *) ++ # And here is the reason: when a library appears more ++ # than once as an explicit dependence of a library, or ++ # is implicitly linked in more than once by the ++ # compiler, it is considered special, and multiple ++ # occurrences thereof are not removed. Compare this ++ # with having the same library being listed as a ++ # dependency of multiple other libraries: in this case, ++ # we know (pedantically, we assume) the library does not ++ # need to be listed more than once, so we keep only the ++ # last copy. This is not always right, but it is rare ++ # enough that we require users that really mean to play ++ # such unportable linking tricks to link the library ++ # using -Wl,-lname, so that libtool does not consider it ++ # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) +@@ -2389,171 +7161,216 @@ EOF + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; +- *) tmp_libs="$tmp_libs $deplib" ;; ++ *) func_append tmp_libs " $deplib" ;; + esac + ;; +- *) tmp_libs="$tmp_libs $deplib" ;; ++ *) func_append tmp_libs " $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi +- if test "$pass" = "conv" && +- { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then +- libs="$deplibs" # reset libs +- deplibs= +- fi ++ # Last step: remove runtime libs from dependency_libs ++ # (they stay in deplibs) ++ tmp_libs= ++ for i in $dependency_libs ; do ++ case " $predeps $postdeps $compiler_lib_search_path " in ++ *" $i "*) ++ i="" ++ ;; ++ esac ++ if test -n "$i" ; then ++ func_append tmp_libs " $i" ++ fi ++ done ++ dependency_libs=$tmp_libs + done # for pass +- if test $linkmode = prog; then ++ if test "$linkmode" = prog; then + dlfiles="$newdlfiles" ++ fi ++ if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi - -no-install) - case $host in -- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -+ *-*-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. -+ func_warning "\`-no-install' is ignored for $host" -+ func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; -@@ -1266,6 +4623,11 @@ + 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 - -o) prev=output ;; +- if test -n "$rpath"; then +- $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 +- fi ++ case " $deplibs" in ++ *\ -l* | *\ -L*) ++ func_warning "\`-l' and \`-L' are ignored for archives" ;; ++ esac -+ -precious-files-regex) -+ prev=precious_regex -+ continue -+ ;; -+ - -release) - prev=release - continue -@@ -1282,13 +4644,13 @@ - ;; +- 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" - -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 -- exit 1 -+ func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in -@@ -1298,7 +4660,17 @@ - continue - ;; +- if test -n "$vinfo"; then +- $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 +- fi ++ test -n "$xrpath" && \ ++ func_warning "\`-R' is ignored for archives" -- -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 -@@ -1317,41 +4689,48 @@ - continue - ;; +- 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" -+ -version-number) -+ prev=vinfo -+ vinfo_number=yes -+ continue -+ ;; -+ -+ -weak) -+ prev=weak -+ continue -+ ;; +- 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" + - -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 -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -- 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 - ;; ++ test -n "$export_symbols$export_symbols_regex" && \ ++ func_warning "\`-export-symbols' is ignored for archives" - -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 -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -- 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 - ;; + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" +- objs="$objs$old_deplibs" ++ func_append objs "$old_deplibs" + ;; - -Xcompiler) -@@ -1364,16 +4743,41 @@ - continue + lib) + # 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//'` ++ func_stripname 'lib' '.la' "$outputname" ++ name=$func_stripname_result ++ eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" ;; - -+ -XCClinker) -+ prev=xcclinker -+ 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 -+ ;; + *) +- if test "$module" = no; then +- $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 +- $echo "$help" 1>&2 +- exit 1 +- fi ++ test "$module" = no && \ ++ func_fatal_help "libtool library \`$output' must begin with \`lib'" + - # Some other compiler flag. - -* | +*) -- # 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" + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required +- 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$//'` ++ func_stripname '' '.la' "$outputname" ++ libname=$func_stripname_result + fi ;; + esac - *.$objext) -@@ -1385,92 +4789,82 @@ - # A libtool-controlled object. + 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 +- exit 1 ++ 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!" +- libobjs="$libobjs $objs" ++ $ECHO "*** Warning: Linking the shared library $output against the non-libtool" ++ $ECHO "*** objects $objs is not portable!" ++ func_append libobjs " $objs" + fi + fi - # 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 func_lalib_unsafe_p "$arg"; then -+ pic_object= -+ non_pic_object= +- 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" -- # Read the .lo file -- # If there is no directory component, then add one. -- case $arg in -- */* | *\\*) . $arg ;; -- *) . ./$arg ;; -- esac -+ # Read the .lo file -+ func_source "$arg" + set dummy $rpath +- if test $# -gt 2; then +- $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" -- 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 1 -- fi -+ 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 + 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 +- # convenience libraries should have the same extension an +- # archive normally would. ++ # convenience libraries should have the same extension an ++ # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi - # 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" +- if test -n "$vinfo"; then +- $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 +- fi ++ test -n "$vinfo" && \ ++ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" -- if test "$pic_object" != none; then -- # Prepend the subdirectory the object is found in. -+ if test "$pic_object" != none; then -+ # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" +- 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 - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then -- dlfiles="$dlfiles $pic_object" -- prev= -- continue -+ dlfiles="$dlfiles $pic_object" -+ prev= -+ continue - else -- # If libtool objects are unsupported, then we need to preload. -- prev=dlprefiles -+ # If libtool objects are unsupported, then we need to preload. -+ prev=dlprefiles - fi - fi + # 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" - # CHECK ME: I think I busted this. -Ossama -- if test "$prev" = dlprefiles; then -+ if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= -- fi -+ fi +- if test -n "$8"; then +- $echo "$modename: too many parameters to \`-version-info'" 1>&2 +- $echo "$help" 1>&2 +- exit 1 +- fi ++ test -n "$7" && \ ++ func_fatal_help "too many parameters to \`-version-info'" -- # A PIC object. -- libobjs="$libobjs $pic_object" -+ # A PIC object. -+ func_append libobjs " $pic_object" - arg="$pic_object" -- fi -+ fi +- current="$2" +- revision="$3" +- age="$4" ++ # convert absolute version numbers to libtool ages ++ # this retains compatibility with .la files and attempts ++ # to make the code below a bit more comprehensible ++ ++ case $vinfo_number in ++ yes) ++ 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 ++ # and those that subtract age and use age as ++ # a minor version. But, then there is irix ++ # which has an extra 1 added just for fun ++ # ++ case $version_type in ++ darwin|linux|osf|windows|none) ++ func_arith $number_major + $number_minor ++ current=$func_arith_result ++ age="$number_minor" ++ revision="$number_revision" ++ ;; ++ freebsd-aout|freebsd-elf|qnx|sunos) ++ current="$number_major" ++ revision="$number_minor" ++ age="0" ++ ;; ++ irix|nonstopux) ++ func_arith $number_major + $number_minor ++ current=$func_arith_result ++ age="$number_minor" ++ revision="$number_minor" ++ lt_irix_increment=no ++ ;; ++ esac ++ ;; ++ no) ++ current="$1" ++ revision="$2" ++ age="$3" ++ ;; ++ esac + + # Check that each of the things are valid numbers. + case $current in +- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; ++ 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: \`$vinfo' is not valid version information" 1>&2 +- exit 1 ++ func_error "CURRENT \`$current' must be a nonnegative integer" ++ func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac -- # Non-PIC object. -- if test "$non_pic_object" != none; then -- # Prepend the subdirectory the object is found in. -+ # 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" + case $revision in +- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; ++ 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: \`$vinfo' is not valid version information" 1>&2 +- exit 1 ++ func_error "REVISION \`$revision' must be a nonnegative integer" ++ func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac -- # A standard non-PIC object -- non_pic_objects="$non_pic_objects $non_pic_object" -- if test -z "$pic_object" || test "$pic_object" = none ; then -- arg="$non_pic_object" -- fi -- 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 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 -+ func_append non_pic_objects " $non_pic_object" -+ if test -z "$pic_object" || test "$pic_object" = none ; then -+ arg="$non_pic_object" - fi -+ else -+ # If the PIC object exists, use it instead. -+ # $xdir was prepended to $pic_object above. -+ non_pic_object="$pic_object" -+ func_append non_pic_objects " $non_pic_object" -+ fi -+ else -+ # Only an error if not doing a dry-run. -+ if $opt_dry_run; then -+ # Extract subdirectory from the argument. -+ func_dirname "$arg" "/" "" -+ xdir="$func_dirname_result" + case $age in +- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; ++ 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: \`$vinfo' is not valid version information" 1>&2 +- exit 1 ++ func_error "AGE \`$age' must be a nonnegative integer" ++ func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac -- 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 -+ 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 +- 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 +- exit 1 ++ 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 - ;; -@@ -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 + # Calculate the version variables. +@@ -2566,10 +7383,13 @@ EOF + 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` ++ 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" + ;; - # 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 +@@ -2580,19 +7400,31 @@ EOF -- if test -n "$prev"; then -- $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi -- -- # 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 link -- # command doesn't match the default compiler. -- if test -n "$available_tags" && test -z "$tagname"; then -- case $base_compile in -- "$CC "*) ;; -- # Blanks in the command may have been stripped by the calling shell, -- # but not from the CC environment variable when ltconfig was run. -- "`$echo $CC` "*) ;; -- *) -- for z in $available_tags; do -- if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then -- # Evaluate the configuration. -- eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" -- case $base_compile in -- "$CC "*) -- # The compiler in $compile_command matches -- # the one in the tagged configuration. -- # Assume this is the tagged configuration we want. -- tagname=$z -- break -- ;; -- "`$echo $CC` "*) -- tagname=$z -- break -- ;; -- esac -- fi -- done -- # If $tagname still isn't set, then no tagged configuration -- # was found and let the user know that the "--tag" command -- # line option must be used. -- if test -z "$tagname"; then -- echo "$modename: unable to infer tagged configuration" -- echo "$modename: specify a tag with \`--tag'" 1>&2 -- exit 1 --# else --# echo "$modename: using $tagname tagged configuration" -- fi -- ;; -- esac -- fi -+ test -n "$prev" && \ -+ func_fatal_help "the \`$prevarg' option requires an argument" + freebsd-elf) + major=".$current" +- versuffix=".$current"; ++ versuffix=".$current" + ;; - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - 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 +- irix) +- major=`expr $current - $age + 1` +- verstring="sgi$major.$revision" ++ irix | nonstopux) ++ if test "X$lt_irix_increment" = "Xno"; then ++ func_arith $current - $age ++ else ++ func_arith $current - $age + 1 ++ fi ++ major=$func_arith_result ++ ++ case $version_type in ++ nonstopux) verstring_prefix=nonstopux ;; ++ *) verstring_prefix=sgi ;; ++ esac ++ verstring="$verstring_prefix$major.$revision" -+ oldlibs= - # calculate the name of the file, without its directory -- outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` -+ func_basename "$output" -+ outputname="$func_basename_result" - libobjs_save="$libobjs" + # Add in all the interfaces that we are compatible with. + loop=$revision +- while test $loop != 0; do +- 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 - 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\" + # Before this point, $major must not contain `.'. +@@ -2601,25 +7433,34 @@ EOF + ;; -- 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 -- $show "$mkdir $output_objdir" -- $run $mkdir $output_objdir -- status=$? -- if test $status -ne 0 && test ! -d $output_objdir; then -- exit $status -- fi -- fi -+ func_mkdir_p "$output_objdir" + linux) +- major=.`expr $current - $age` ++ func_arith $current - $age ++ major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; - # Determine the type of output - case $output in - "") -- $echo "$modename: you must specify an output file" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -+ func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; -@@ -1617,29 +4949,34 @@ - esac + osf) +- major=`expr $current - $age` ++ func_arith $current - $age ++ major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" - specialdeplibs= + # 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 ++ func_arith $current - $loop ++ iface=$func_arith_result ++ func_arith $loop - 1 ++ loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. +- verstring="$verstring:${current}.0" ++ func_append verstring ":${current}.0" ++ ;; + - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do -- case "$libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -- esac -+ if $opt_duplicate_deps ; then -+ case "$libs " in -+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ esac -+ fi - libs="$libs $deplib" - done ++ qnx) ++ major=".$current" ++ versuffix=".$current" + ;; -- if test $linkmode = lib; then -+ if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" + sunos) +@@ -2630,21 +7471,29 @@ EOF + 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" + ;; - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= -- for pre_post_dep in $predeps $postdeps; do -- case "$pre_post_deps " in -- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; -- esac -- pre_post_deps="$pre_post_deps $pre_post_dep" -- done -+ 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" ;; -+ esac -+ pre_post_deps="$pre_post_deps $pre_post_dep" -+ done -+ fi - pre_post_deps= - fi + *) +- $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 ++ func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac -@@ -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 -+ - case $linkmode in - lib) -- 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 -- exit 1 -+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done -@@ -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 + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= +- verstring="0.0" ++ case $version_type in ++ darwin) ++ # we can't check for "0.0" in archive_cmds due to quoting ++ # problems, so we reset it completely ++ verstring= ++ ;; ++ *) ++ verstring="0.0" ++ ;; ++ esac + if test "$need_version" = no; then + versuffix= + else +@@ -2662,7 +7511,7 @@ EOF + # 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,55 +7519,65 @@ EOF + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + -+ if test "$linkmode,$pass" = "lib,link" || -+ test "$linkmode,$pass" = "prog,scan"; then -+ libs="$deplibs" -+ deplibs= -+ fi -+ if test "$linkmode" = prog; then - case $pass in -- dlopen) -- libs="$dlfiles" -- save_deplibs="$deplibs" # Collect dlpreopened libraries -- deplibs= -- ;; -+ dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - 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 + +- if test "$mode" != relink; then ++ func_generate_dlsyms "$libname" "$libname" "yes" ++ func_append libobjs " $symfileobj" ++ test "X$libobjs" = "X " && libobjs= + -+ # 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 ++ if test "$opt_mode" != relink; then + # Remove our outputs, but don't remove object files since they +- # may have been created when compiling PIC objects. +- removelist= +- tempremovelist=`echo "$output_objdir/*"` ++ # may have been created when compiling PIC objects. ++ removelist= ++ tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do +- case $p in +- *.$objext) +- ;; +- $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) +- removelist="$removelist $p" +- ;; +- *) ;; +- esac +- done +- if test -n "$removelist"; then +- $show "${rm}r $removelist" +- $run ${rm}r $removelist +- fi ++ case $p in ++ *.$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 ++ continue ++ fi ++ fi ++ func_append removelist " $p" ++ ;; ++ *) ;; ++ esac + 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 -+ -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" -+ 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*) -- 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 -+ func_warning "\`-l' is ignored for archives/objects" - continue - fi -- 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" ++ test -n "$removelist" && \ ++ func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then +- oldlibs="$oldlibs $output_objdir/$libname.$libext" ++ func_append 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 "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. +- 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'` +- done ++ #for path in $notinst_path; do ++ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` ++ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` ++ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` ++ #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do +- temp_xrpath="$temp_xrpath -R$libdir" ++ func_replace_sysroot "$libdir" ++ func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ;; ++ *) func_append finalize_rpath " $libdir" ;; + esac + done +- if test $hardcode_into_libs != yes || test $build_old_libs = yes; then ++ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi +@@ -2729,7 +7588,7 @@ EOF + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; +- *) dlfiles="$dlfiles $lib" ;; ++ *) func_append dlfiles " $lib" ;; + esac + done + +@@ -2739,27 +7598,36 @@ EOF + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; +- *) dlprefiles="$dlprefiles $lib" ;; ++ *) func_append dlprefiles " $lib" ;; + esac + done + + 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* | *-*-haiku*) + # 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" ++ func_append 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. ++ ;; ++ *-*-sco3.2v5* | *-*-sco5v6*) ++ # Causes problems with __ctype ++ ;; ++ *-*-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 +- deplibs="$deplibs -lc" ++ if test "$build_libtool_need_lc" = "yes"; then ++ func_append deplibs " -lc" + fi + ;; + esac +@@ -2785,7 +7653,7 @@ EOF + # 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 +- # implementing what was already the behaviour. ++ # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) +@@ -2793,90 +7661,139 @@ EOF + # 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 ++ 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 "*) ++ func_append newdeplibs " $a_deplib" ++ a_deplib="" ++ ;; ++ esac ++ fi ++ if test -n "$a_deplib" ; then ++ libname=`eval "\\$ECHO \"$libname_spec\""` ++ if test -n "$file_magic_glob"; then ++ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` ++ else ++ libnameglob=$libname ++ fi ++ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` ++ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do ++ if test "$want_nocaseglob" = yes; then ++ shopt -s nocaseglob ++ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` ++ $nocaseglob ++ else ++ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` ++ fi ++ for potent_lib in $potential_libs; do + # Follow soft links. +- 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,81 +7803,110 @@ EOF + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do +- potliblink=`ls -ld $potlib | sed 's/.* -> //'` ++ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; +- *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; ++ *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + esac + done +- # It is ok to link against an archive when +- # building a shared library. +- if $AR -t $potlib > /dev/null 2>&1; then +- newdeplibs="$newdeplibs $a_deplib" +- a_deplib="" +- break 2 +- fi +- if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ +- | sed 10q \ +- | egrep "$file_magic_regex" > /dev/null; then +- newdeplibs="$newdeplibs $a_deplib" ++ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | ++ $SED -e 10q | ++ $EGREP "$file_magic_regex" > /dev/null; then ++ func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi +- done +- done ++ done ++ done ++ fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo +- echo "*** Warning: This library needs some functionality provided by $a_deplib." ++ $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 "*** 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)" + else -+ found=no ++ $ECHO "*** with $libname and none of the candidates passed a file format test" ++ $ECHO "*** using a file magic. Last file checked: $potlib" + fi -+ break 2 + fi +- else ++ ;; ++ *) + # Add a -L argument. +- newdeplibs="$newdeplibs $a_deplib" +- fi ++ func_append newdeplibs " $a_deplib" ++ ;; ++ 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\(.*\)'`" +- # 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` +- for potent_lib in $potential_libs; do +- if eval echo \"$potent_lib\" 2>/dev/null \ +- | sed 10q \ +- | egrep "$match_pattern_regex" > /dev/null; then +- newdeplibs="$newdeplibs $a_deplib" +- 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 "*) ++ func_append newdeplibs " $a_deplib" ++ a_deplib="" ++ ;; ++ esac + fi -+ done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library -@@ -1715,41 +5115,91 @@ - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" -- test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs" -+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue -+ else # deplib is a libtool library -+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, -+ # We need to do some special things here, and not later. -+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then -+ case " $predeps $postdeps " in -+ *" $deplib "*) -+ if func_lalib_p "$lib"; then -+ library_names= -+ old_library= -+ 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 -+ func_dirname "$lib" "" "." -+ ladir="$func_dirname_result" -+ lib=$ladir/$old_library -+ if test "$linkmode,$pass" = "prog,link"; then -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" -+ else -+ deplibs="$deplib $deplibs" -+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" ++ if test -n "$a_deplib" ; 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` ++ 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 ++ func_append newdeplibs " $a_deplib" ++ a_deplib="" ++ break 2 + fi -+ continue -+ fi ++ done + done +- done ++ fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo +- echo "*** Warning: This library needs some functionality provided by $a_deplib." ++ $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 "*** 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)" ++ else ++ $ECHO "*** with $libname and none of the candidates passed a file format test" ++ $ECHO "*** using a regex pattern. Last file checked: $potlib" + 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 +- else ++ ;; ++ *) + # Add a -L argument. +- newdeplibs="$newdeplibs $a_deplib" +- fi ++ func_append newdeplibs " $a_deplib" ++ ;; ++ esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" +- if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ +- -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | +- grep . >/dev/null; then ++ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; 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 " $tmp_deplibs" | $SED "s,$i,,"` ++ done + fi -+ continue -+ ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" -- 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//'` -+ func_stripname '-L' '' "$deplib" -+ newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) -- if test $pass = conv; then -+ if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue ++ case $tmp_deplibs in ++ *[!\ \ ]*) + echo + if test "X$deplibs_check_method" = "Xnone"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." +@@ -2969,7 +7915,8 @@ EOF fi -- if test $pass = scan; then -+ if test "$pass" = scan; then - deplibs="$deplib $deplibs" -- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes +- fi ++ ;; ++ esac + ;; + esac + versuffix=$versuffix_save +@@ -2980,8 +7927,8 @@ EOF + + 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 " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + +@@ -2989,7 +7936,7 @@ EOF + if test "$module" = yes; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" +- echo "*** dependencies of module $libname. Therefore, libtool will create" ++ $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 +@@ -3011,7 +7958,7 @@ EOF + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + +- if test $allow_undefined = no; then ++ 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" +@@ -3030,6 +7977,41 @@ EOF + # Done checking deplibs! + deplibs=$newdeplibs + fi ++ # Time to change all our "foo.ltframework" stuff back to "-framework foo" ++ case $host in ++ *-*-darwin*) ++ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ++ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ++ deplibs=`$ECHO " $deplibs" | $SED '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 ++ new_libs= ++ for path in $notinst_path; do ++ case " $new_libs " in ++ *" -L$path/$objdir "*) ;; ++ *) ++ case " $deplibs " in ++ *" -L$path/$objdir "*) ++ func_append new_libs " -L$path/$objdir" ;; ++ esac ++ ;; ++ esac ++ done ++ for deplib in $deplibs; do ++ case $deplib in ++ -L*) ++ case " $new_libs " in ++ *" $deplib "*) ;; ++ *) func_append new_libs " $deplib" ;; ++ esac ++ ;; ++ *) func_append new_libs " $deplib" ;; ++ esac ++ done ++ deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= +@@ -3038,15 +8020,17 @@ EOF + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then +- if test $hardcode_into_libs = yes; then ++ if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" +- test "$mode" != relink && rpath="$compile_rpath$rpath" ++ test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then ++ func_replace_sysroot "$libdir" ++ libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else +@@ -3055,18 +8039,18 @@ EOF + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) +- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ++ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" +- dep_rpath="$dep_rpath $flag" ++ func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; +- *) perm_rpath="$perm_rpath $libdir" ;; ++ *) func_apped perm_rpath " $libdir" ;; + esac fi -+ 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 -+ 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 -+ func_stripname '-R' '' "$deplib" -+ dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; -@@ -1761,28 +5211,51 @@ - ;; - *.la) lib="$deplib" ;; - *.$libext) -- if test $pass = conv; then -+ if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) -- if test "$deplibs_check_method" != pass_all; then -- echo -- echo "*** Warning: This library needs some functionality provided by $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." -- else -- echo -- echo "*** Warning: Linking the shared library $output against the" -- echo "*** static library $deplib is not portable!" -- 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) -- if test $pass != link; then -+ if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" -@@ -1793,14 +5266,18 @@ - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) -- if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then -- # If there is no dlopen support or we're linking statically, -- # we need to preload. -- newdlprefiles="$newdlprefiles $deplib" -- compile_deplibs="$deplib $compile_deplibs" -- finalize_deplibs="$deplib $finalize_deplibs" -- else -- newdlfiles="$newdlfiles $deplib" -+ if test "$pass" = conv; then -+ deplibs="$deplib $deplibs" -+ elif test "$linkmode" = prog; then -+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then -+ # If there is no dlopen support or we're linking statically, -+ # we need to preload. -+ newdlprefiles="$newdlprefiles $deplib" -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" + done +@@ -3074,13 +8058,17 @@ EOF + 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 ++ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else -+ newdlfiles="$newdlfiles $deplib" ++ eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi fi - continue - ;; -@@ -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 -+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do +- rpath="$rpath$dir:" ++ func_append rpath "$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi +@@ -3088,140 +8076,222 @@ EOF 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 : -- else -- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -- exit 1 -- fi -+ func_lalib_unsafe_p "$lib" \ -+ || func_fatal_error "\`$lib' is not a valid libtool archive" + shlibpath="$finalize_shlibpath" +- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" ++ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi -- ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` -- test "X$ladir" = "X$lib" && ladir="." -+ func_dirname "$lib" "" "." -+ ladir="$func_dirname_result" + # 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" +- shift; shift ++ shift ++ realname="$1" ++ shift - 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 - installed=yes -+ shouldnotlink=no -+ avoidtemprpath= + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi +- test -z "$dlname" && dlname=$soname ++ if test -z "$dlname"; then ++ dlname=$soname ++ fi + + lib="$output_objdir/$realname" ++ linknames= + for link + do +- linknames="$linknames $link" ++ func_append linknames " $link" + done + +-# # Ensure that we have .o objects for linkers which dislike .lo +-# # (e.g. aix) in case we are running --disable-static +-# for obj in $libobjs; do +-# xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` +-# if test "X$xdir" = "X$obj"; then +-# xdir="." +-# else +-# xdir="$xdir" +-# fi +-# baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` +-# oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` +-# if test ! -f $xdir/$oldobj && test "$baseobj" != "$oldobj"; then +-# $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" +-# $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? +-# fi +-# 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 "$libobjs" | $SP2NL | $SED "$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" ++ func_append 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 - # Read the .la file -- case $lib in -- */* | *\\*) . $lib ;; -- *) . ./$lib ;; -- esac -+ func_source "$lib" + # 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 +- eval cmds=\"$export_symbols_cmds\" +- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' +- for cmd in $cmds; do ++ $opt_dry_run || $RM $export_symbols ++ cmds=$export_symbols_cmds ++ save_ifs="$IFS"; IFS='~' ++ for cmd1 in $cmds; do + IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" || exit $? ++ # Take the normal branch if the nm_file_list_spec branch ++ # doesn't work or if tool conversion is not needed. ++ case $nm_file_list_spec~$to_tool_file_cmd in ++ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) ++ try_normal_branch=yes ++ eval cmd=\"$cmd1\" ++ func_len " $cmd" ++ len=$func_len_result ++ ;; ++ *) ++ try_normal_branch=no ++ ;; ++ esac ++ if test "$try_normal_branch" = yes \ ++ && { test "$len" -lt "$max_cmd_len" \ ++ || test "$max_cmd_len" -le -1; } ++ then ++ func_show_eval "$cmd" 'exit $?' ++ skipped_export=false ++ elif test -n "$nm_file_list_spec"; then ++ func_basename "$output" ++ output_la=$func_basename_result ++ save_libobjs=$libobjs ++ save_output=$output ++ output=${output_objdir}/${output_la}.nm ++ func_to_tool_file "$output" ++ libobjs=$nm_file_list_spec$func_to_tool_file_result ++ func_append delfiles " $output" ++ func_verbose "creating $NM input file list: $output" ++ for obj in $save_libobjs; do ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" ++ done > "$output" ++ eval cmd=\"$cmd1\" ++ func_show_eval "$cmd" 'exit $?' ++ output=$save_output ++ libobjs=$save_libobjs ++ skipped_export=false ++ else ++ # 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 +- $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"' ++ 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 + fi + fi -+ # 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 + 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 "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + 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 -- # Add dl[pre]opened files of deplib -+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" ++ ++ 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 ++ func_append 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 -- if test $pass = conv; then -+ if test "$pass" = conv; then - # Only check for convenience libraries - 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 -- exit 1 -+ 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" - 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 -+ func_fatal_error "\`$lib' is not a convenience library" ++ tmp_deplibs= ++ for test_deplib in $deplibs; do ++ case " $convenience " in ++ *" $test_deplib "*) ;; ++ *) ++ func_append 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 -+ 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" + 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" +- $run ${rm}r "$gentop" +- $show "$mkdir $gentop" +- $run $mkdir "$gentop" +- status=$? +- if test $status -ne 0 && test ! -d "$gentop"; then +- exit $status +- fi +- generated="$generated $gentop" +- +- for xlib in $convenience; do +- # Extract the objects. +- case $xlib in +- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; +- *) xabs=`pwd`"/$xlib" ;; +- esac +- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` +- xdir="$gentop/$xlib" +- +- $show "${rm}r $xdir" +- $run ${rm}r "$xdir" +- $show "$mkdir $xdir" +- $run $mkdir "$xdir" +- status=$? +- if test $status -ne 0 && test ! -d "$xdir"; then +- exit $status +- fi +- $show "(cd $xdir && $AR x $xabs)" +- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? ++ func_append generated " $gentop" + +- libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done -- elif test $linkmode != prog && test $linkmode != lib; then -- $echo "$modename: \`$lib' is not a convenience library" 1>&2 -- exit 1 -- fi -+ fi -+ tmp_libs="$tmp_libs $deplib" -+ done - continue - fi # $pass = conv ++ func_extract_archives $gentop $convenience ++ func_append libobjs " $func_extract_archives_result" ++ test "X$libobjs" = "X " && libobjs= + fi + fi -+ - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then -- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 -- exit 1 -+ func_fatal_error "cannot find name of link library for \`$lib'" + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" +- linker_flags="$linker_flags $flag" ++ func_append linker_flags " $flag" 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 -- exit 1 -+ 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" || -+ test "$dlopen_support" != yes || -+ test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking -- # statically, we need to preload. -- dlprefiles="$dlprefiles $lib" -+ # statically, we need to preload. We also need to preload any -+ # dependent libraries so libltdl's deplib preloader doesn't -+ # bomb out in the load deplibs phase. -+ dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi -@@ -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" + # 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 $? ++ if test "$opt_mode" = relink; then ++ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi - # 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 -+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + # 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\" ++ cmds=$module_expsym_cmds ++ else ++ eval test_cmds=\"$module_cmds\" ++ cmds=$module_cmds ++ fi else -- dir="$ladir/$objdir" -- absdir="$abs_ladir/$objdir" -- # Remove this search path later -- notinst_path="$notinst_path $abs_ladir" -+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then -+ dir="$ladir" -+ absdir="$abs_ladir" -+ # Remove this search path later -+ notinst_path="$notinst_path $abs_ladir" +- eval 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 -+ dir="$ladir/$objdir" -+ absdir="$abs_ladir/$objdir" -+ # Remove this search path later -+ notinst_path="$notinst_path $abs_ladir" ++ eval test_cmds=\"$archive_cmds\" ++ cmds=$archive_cmds + fi - fi # $installed = yes -- 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 -z "$libdir"; then -- $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 -- exit 1 -+ 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). - 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 -- if test $linkmode = lib; then -+ if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else -- deplibs="$lib $deplibs" -+ deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue fi - -- if test $linkmode = prog && test $pass != link; then +- 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 "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" ++ if test "X$skipped_export" != "X:" && ++ 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 ++ # 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,109 +8304,255 @@ EOF + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi +- save_output=$output ++ save_output=$output ++ func_basename "$output" ++ output_la=$func_basename_result -@@ -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 -+ if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi -- case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -- esac -+ if $opt_duplicate_deps ; then -+ case "$tmp_libs " in -+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ esac -+ fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... + # Clear the reloadable object creation command queue and + # initialize k to one. +- test_cmds= +- concat_cmds= +- objlist= +- delfiles= +- last_robj= +- k=1 +- output=$output_objdir/$save_output-${k}.$objext +- # Loop over the list of objects to be linked. +- for obj in $save_libobjs +- do +- eval test_cmds=\"$reload_cmds $objlist $last_robj\" +- if test "X$objlist" = X || +- { len=`expr "X$test_cmds" : ".*"` && +- 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. +- 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/$save_output-${k}.$objext +- k=`expr $k + 1` +- output=$output_objdir/$save_output-${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~ +- eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" ++ test_cmds= ++ concat_cmds= ++ objlist= ++ last_robj= ++ k=1 -- link_static=no # Whether the deplib will be linked statically -- if test -n "$library_names" && -- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then -- # Link against this shared library -+ 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 -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 -+ *"$absdir:"*) ;; -+ *) temp_rpath="$temp_rpath$absdir:" ;; -+ esac +- # Set up a command to remove the reloadale object files +- # 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 ++ 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 ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" >> $output ++ done ++ echo ')' >> $output ++ func_append delfiles " $output" ++ func_to_tool_file "$output" ++ output=$func_to_tool_file_result ++ 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 ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" >> $output ++ done ++ func_append delfiles " $output" ++ func_to_tool_file "$output" ++ output=$firstobj\"$file_list_spec$func_to_tool_file_result\" ++ 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 -- if test "$linkmode,$pass" = "prog,link" || -- { test $linkmode = lib && test $hardcode_into_libs = yes; }; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. -@@ -2024,17 +5537,6 @@ - esac - ;; - esac -- if test $linkmode = prog; then -- # We need to hardcode the library path -- if test -n "$shlibpath_var"; then -- # Make sure the rpath contains only unique directories. -- case "$temp_rpath " in -- *" $dir "*) ;; -- *" $absdir "*) ;; -- *) temp_rpath="$temp_rpath $dir" ;; -- esac -- fi -- fi - fi # $linkmode,$pass = prog,link... +- $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. ++ reload_objs=$objlist ++ eval concat_cmds=\"$reload_cmds\" ++ else ++ # All subsequent reloadable object files will link in ++ # the last one created. ++ reload_objs="$objlist $last_robj" ++ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$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~ ++ reload_objs="$objlist $last_robj" ++ eval concat_cmds=\"\${concat_cmds}$reload_cmds\" ++ if test -n "$last_robj"; then ++ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" ++ fi ++ func_append delfiles " $output" - if test "$alldeplibs" = yes && -@@ -2044,26 +5546,89 @@ - # We only need to search for static libraries - continue - fi -+ fi +- # Loop through the commands generated above and execute them. +- IFS="${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 -- 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 -+ use_static_libs=no -+ fi -+ if test -n "$library_names" && -+ { test "$use_static_libs" = no || test -z "$old_library"; }; then -+ 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 +- 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 "$opt_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 -+ ;; -+ esac -+ # This is a shared library ++ fi + -+ # 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 ++ 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 "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + 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" -+ else -+ $ECHO "*** Warning: Linking the shared library $output against the loadable module" ++ ++ 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 ++ func_append 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 -+ $ECHO "*** $linklib is not portable!" + fi -+ if test "$linkmode" = lib && -+ test "$hardcode_into_libs" = yes; then -+ # Hardcode the library path. -+ # Skip directories that are in the system default run-time -+ # search path. -+ case " $sys_lib_dlsearch_path " in -+ *" $absdir "*) ;; -+ *) -+ case "$compile_rpath " in -+ *" $absdir "*) ;; -+ *) compile_rpath="$compile_rpath $absdir" -+ esac -+ ;; -+ esac -+ case " $sys_lib_dlsearch_path " in -+ *" $libdir "*) ;; -+ *) -+ case "$finalize_rpath " in -+ *" $libdir "*) ;; -+ *) finalize_rpath="$finalize_rpath $libdir" -+ esac -+ ;; -+ esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - 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*) -- major=`expr $current - $age` -+ *cygwin* | mingw* | *cegcc*) -+ func_arith $current - $age -+ major=$func_arith_result - versuffix="-$major" - ;; - 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" -+ 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'" -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -- eval cmds=\"$extract_expsyms_cmds\" -- 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 ++ ++ libobjs=$output + # Restore the value of output. +- output=$save_output ++ output=$save_output - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else -- $show "generating import library for \`$soname'" -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -- eval cmds=\"$old_archive_from_expsyms_cmds\" -- 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 -- fi # test -n $old_archive_from_expsyms_cmds -+ fi # test -n "$old_archive_from_expsyms_cmds" + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" ++ test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. -- if test $linkmode = prog || test "$mode" != relink; then -+ if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= -@@ -2117,6 +5670,30 @@ - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" -+ case $host in -+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; -+ *-*-sysv4*uw2*) add_dir="-L$dir" ;; -+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ -+ *-*-unixware7*) add_dir="-L$dir" ;; -+ *-*-darwin* ) -+ # 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 | -+ $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" ;; -@@ -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" -+ # Try looking first in the location we're being installed to. -+ if test -n "$inst_prefix_dir"; then -+ case $libdir in -+ [\\/]*) -+ add_dir="$add_dir -L$inst_prefix_dir$libdir" -+ ;; -+ esac -+ fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" -@@ -2147,8 +5733,7 @@ - esac + # Do each of the archive commands. +- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then +- eval cmds=\"$archive_expsym_cmds\" +- else +- eval cmds=\"$archive_cmds\" +- fi ++ if test "$module" = yes && test -n "$module_cmds" ; then ++ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then ++ cmds=$module_expsym_cmds ++ else ++ cmds=$module_cmds ++ fi ++ else ++ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then ++ cmds=$archive_expsym_cmds ++ else ++ cmds=$archive_cmds ++ fi ++ fi ++ fi - if test "$lib_linked" != yes; then -- $echo "$modename: configuration error: unsupported hardcode properties" -- exit 1 -+ func_fatal_configuration "unsupported hardcode properties" - fi +- # 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='~' +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" || exit $? +- done +- IFS="$save_ifs" ++ 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" ++ func_append generated " $gentop" ++ ++ func_extract_archives $gentop $dlprefiles ++ func_append 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\" ++ $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 "$opt_mode" = relink; then ++ ( cd "$output_objdir" && \ ++ $RM "${realname}T" && \ ++ $MV "${realname}U" "$realname" ) ++ fi ++ ++ exit $lt_exit ++ } ++ done ++ IFS="$save_ifs" - if test -n "$add_shlibpath"; then -@@ -2157,14 +5742,14 @@ - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi -- if test $linkmode = prog; then -+ if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - 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 + # 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 $? +- exit 0 ++ if test "$opt_mode" = relink; then ++ $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 ++ func_show_eval '${RM}r "$gentop"' ++ fi ++ fi ++ ++ exit $EXIT_SUCCESS + fi + + # Create links to the real library. + 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 -- if test $linkmode = prog || test "$mode" = relink; then -+ if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # 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" -+ else -+ add="$libdir/$linklib" -+ fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" -+ # Try looking first in the location we're being installed to. -+ if test -n "$inst_prefix_dir"; then -+ case $libdir in -+ [\\/]*) -+ add_dir="$add_dir -L$inst_prefix_dir$libdir" -+ ;; -+ esac -+ fi - add="-l$name" - fi +@@ -3349,38 +8565,35 @@ EOF + ;; -- if test $linkmode = prog; then -+ if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else -@@ -2204,16 +5805,7 @@ - test -n "$add" && deplibs="$add $deplibs" - fi - fi -- elif test $linkmode = prog; then -- if test "$alldeplibs" = yes && -- { test "$deplibs_check_method" = pass_all || -- { test "$build_libtool_libs" = yes && -- test -n "$library_names"; }; }; then -- # We only need to search for static libraries -- continue -- fi + obj) +- if test -n "$deplibs"; then +- $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 +- fi - -- # Try to link the static library -+ elif test "$linkmode" = prog; then - # 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,45 +5825,46 @@ + 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 - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. -- echo -- echo "*** Warning: This library needs some functionality provided by $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." - 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." - fi - if test "$build_old_libs" = no; then -- build_libtool_libs=module -- build_old_libs=yes -+ build_libtool_libs=module -+ build_old_libs=yes - else -- build_libtool_libs=no -+ build_libtool_libs=no - fi - fi - else -- convenience="$convenience $dir/$old_library" -- old_convenience="$old_convenience $dir/$old_library" - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? +- if test -n "$rpath"; then +- $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 +- fi ++ case " $deplibs" in ++ *\ -l* | *\ -L*) ++ func_warning "\`-l' and \`-L' are ignored for objects" ;; ++ esac -- if test $linkmode = lib; then -+ if test "$linkmode" = lib; then - if test -n "$dependency_libs" && -- { test $hardcode_into_libs != yes || test $build_old_libs = yes || -- test $link_static = yes; }; then -+ { test "$hardcode_into_libs" != yes || -+ test "$build_old_libs" = yes || -+ test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - 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" ;; +- 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 +- exit 1 +- 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 +8602,7 @@ EOF + 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,150 +8611,141 @@ EOF + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of +- # -Wl from whole_archive_flag_spec ++ # -Wl from whole_archive_flag_spec and hope we can get by with ++ # turning comma into space.. + wl= + + if test -n "$convenience"; then + 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 "$tmp_whole_archive_flags" | $SED 's|,| |g'` + else + gentop="$output_objdir/${obj}x" +- $show "${rm}r $gentop" +- $run ${rm}r "$gentop" +- $show "$mkdir $gentop" +- $run $mkdir "$gentop" +- status=$? +- if test $status -ne 0 && test ! -d "$gentop"; then +- exit $status +- fi +- generated="$generated $gentop" +- +- for xlib in $convenience; do +- # Extract the objects. +- case $xlib in +- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; +- *) xabs=`pwd`"/$xlib" ;; - esac -+ if $opt_duplicate_deps ; then -+ case "$tmp_libs " in -+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ esac -+ fi - tmp_libs="$tmp_libs $deplib" - done +- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` +- xdir="$gentop/$xlib" +- +- $show "${rm}r $xdir" +- $run ${rm}r "$xdir" +- $show "$mkdir $xdir" +- $run $mkdir "$xdir" +- status=$? +- if test $status -ne 0 && test ! -d "$xdir"; then +- exit $status +- fi +- $show "(cd $xdir && $AR x $xabs)" +- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? ++ func_append generated " $gentop" + +- reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` +- done ++ func_extract_archives $gentop $convenience ++ reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi -- if test $link_all_deplibs != no; then -+ if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -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 -+ if $GREP "^installed=no" $deplib > /dev/null; then -+ case $host in -+ *-*-darwin*) -+ depdepl= -+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` -+ if test -n "$deplibrary_names" ; then -+ for tmp in $deplibrary_names ; do -+ depdepl=$tmp -+ done -+ 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 -+ fi -+ ;; -+ *) - path="-L$absdir/$objdir" -+ ;; -+ 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" ++ # If we're not building shared, we need to use non_pic_objs ++ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + - path="-L$absdir" - fi - ;; -- *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; -@@ -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 - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done + # 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 "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" +- eval cmds=\"$reload_cmds\" +- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' +- 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 ++ exit $EXIT_SUCCESS fi -- if test $pass != dlopen; then -- test $pass != scan && dependency_libs="$newdependency_libs" -- if test $pass != conv; then -+ if test "$pass" != dlopen; then -+ if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do -@@ -2368,9 +5991,30 @@ - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do -+ # FIXME: Pedantically, this is the right thing to do, so -+ # that some nasty dependency loop isn't accidentally -+ # broken: -+ #new_libs="$deplib $new_libs" -+ # Pragmatically, this seems to cause very few problems in -+ # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; -+ -R*) ;; - *) -+ # And here is the reason: when a library appears more -+ # than once as an explicit dependence of a library, or -+ # is implicitly linked in more than once by the -+ # compiler, it is considered special, and multiple -+ # occurrences thereof are not removed. Compare this -+ # with having the same library being listed as a -+ # dependency of multiple other libraries: in this case, -+ # we know (pedantically, we assume) the library does not -+ # need to be listed more than once, so we keep only the -+ # last copy. This is not always right, but it is rare -+ # enough that we require users that really mean to play -+ # such unportable linking tricks to link the library -+ # using -Wl,-lname, so that libtool does not consider it -+ # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) -@@ -2398,42 +6042,53 @@ - eval $var=\"$tmp_libs\" - done # for var + + if test "$build_libtool_libs" != yes; then + 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 $? +- exit 0 ++ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? ++ exit $EXIT_SUCCESS fi -- if test "$pass" = "conv" && -- { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then -- libs="$deplibs" # reset libs -- deplibs= + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" +- eval cmds=\"$reload_cmds\" +- IFS="${IFS= }"; save_ifs="$IFS"; 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 +-# $run $rm $libobj +-# xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` +-# if test "X$xdir" = "X$libobj"; then +-# xdir="." +-# else +-# xdir="$xdir" +-# fi +-# baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` +-# 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 +- $show "${rm}r $gentop" +- $run ${rm}r $gentop ++ func_show_eval '${RM}r "$gentop"' + fi + +- exit 0 ++ exit $EXIT_SUCCESS + ;; + + prog) + case $host in +- *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; ++ *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 -+ # Last step: remove runtime libs from dependency_libs -+ # (they stay in deplibs) -+ tmp_libs= -+ for i in $dependency_libs ; do -+ case " $predeps $postdeps $compiler_lib_search_path " in -+ *" $i "*) -+ i="" ++ test -n "$vinfo" && \ ++ func_warning "\`-version-info' is ignored for programs" + +- 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 " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` ++ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + +- compile_command="$compile_command $compile_deplibs" +- finalize_command="$finalize_command $finalize_deplibs" ++ 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]) ++ func_append compile_command " ${wl}-bind_at_load" ++ func_append finalize_command " ${wl}-bind_at_load" ++ ;; ++ esac ++ fi ++ # Time to change all our "foo.ltframework" stuff back to "-framework foo" ++ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ++ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED '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 ++ new_libs= ++ for path in $notinst_path; do ++ case " $new_libs " in ++ *" -L$path/$objdir "*) ;; ++ *) ++ case " $compile_deplibs " in ++ *" -L$path/$objdir "*) ++ func_append new_libs " -L$path/$objdir" ;; ++ esac + ;; + esac -+ if test -n "$i" ; then -+ tmp_libs="$tmp_libs $i" -+ fi + done -+ dependency_libs=$tmp_libs - done # for pass -- if test $linkmode = prog; then -+ if test "$linkmode" = prog; then - dlfiles="$newdlfiles" -+ fi -+ if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi ++ for deplib in $compile_deplibs; do ++ case $deplib in ++ -L*) ++ case " $new_libs " in ++ *" $deplib "*) ;; ++ *) func_append new_libs " $deplib" ;; ++ esac ++ ;; ++ *) func_append new_libs " $deplib" ;; ++ esac ++ done ++ compile_deplibs="$new_libs" ++ ++ ++ func_append compile_command " $compile_deplibs" ++ func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. +@@ -3549,7 +8753,7 @@ EOF + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; +- *) finalize_rpath="$finalize_rpath $libdir" ;; ++ *) func_append finalize_rpath " $libdir" ;; + esac + done + fi +@@ -3568,25 +8772,32 @@ EOF + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) +- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ++ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" +- rpath="$rpath $flag" ++ func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; +- *) perm_rpath="$perm_rpath $libdir" ;; ++ *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) ++ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; +- *) dllsearchpath="$dllsearchpath:$libdir";; ++ ::) dllsearchpath=$libdir;; ++ *) func_append dllsearchpath ":$libdir";; ++ esac ++ case :$dllsearchpath: in ++ *":$testbindir:"*) ;; ++ ::) dllsearchpath=$testbindir;; ++ *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac +@@ -3612,18 +8823,18 @@ EOF + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) +- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ++ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" +- rpath="$rpath $flag" ++ func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; +- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; ++ *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done +@@ -3635,227 +8846,57 @@ EOF + 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 "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` ++ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + +- 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" +- 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 '$mv "$nlist"T "$nlist"' +- fi +- +- if test -n "$export_symbols_regex"; then +- $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 +- export_symbols="$output_objdir/$output.exp" +- $run $rm $export_symbols +- $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' +- 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 '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"' +- $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 +- $mv "$nlist"T "$nlist" +- fi +- +- # Try sorting and uniquifying the output. +- if grep -v "^: " < "$nlist" | sort +2 | 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/$dlsyms"' +- else +- echo '/* NONE */' >> "$output_objdir/$dlsyms" +- 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_preloaded_symbols[] = +-{\ +-" +- +- sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ +- -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ +- < "$nlist" >> "$output_objdir/$dlsyms" +- +- $echo >> "$output_objdir/$dlsyms" "\ +- {0, (lt_ptr_t) 0} +-}; +- +-/* 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 $? +- +- # 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}%"` +- ;; +- *) +- $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 +- exit 1 +- ;; +- 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" - 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" +- # Nullify the symbol file. +- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` +- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` ++ # template prelinking step ++ if test -n "$prelink_cmds"; then ++ func_execute_cmds "$prelink_cmds" 'exit $?' fi -- if test -n "$rpath"; then -- $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 -- fi -+ case " $deplibs" in -+ *\ -l* | *\ -L*) -+ func_warning "\`-l' and \`-L' are ignored for archives" ;; +- if test $need_relink = no || test "$build_libtool_libs" != yes; then ++ wrappers_required=yes ++ case $host in ++ *cegcc* | *mingw32ce*) ++ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. ++ wrappers_required=no ++ ;; ++ *cygwin* | *mingw* ) ++ if test "$build_libtool_libs" != yes; then ++ wrappers_required=no ++ fi ++ ;; ++ *) ++ 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 "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" -- 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" + # We have no uninstalled library dependencies, so finalize right now. +- $show "$link_command" +- $run eval "$link_command" +- status=$? ++ exit_status=0 ++ func_show_eval "$link_command" 'exit_status=$?' -- if test -n "$vinfo"; then -- $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 -- fi -+ test -n "$xrpath" && \ -+ func_warning "\`-R' is ignored for archives" +- # Delete the generated files. +- if test -n "$dlsyms"; then +- $show "$rm $output_objdir/${outputname}S.${objext}" +- $run $rm "$output_objdir/${outputname}S.${objext}" ++ if test -n "$postlink_cmds"; then ++ func_to_tool_file "$output" ++ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` ++ func_execute_cmds "$postlink_cmds" 'exit $?' + fi -- if test -n "$release"; then -- $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 +- exit $status - fi -+ test -n "$vinfo" && \ -+ func_warning "\`-version-info/-version-number' is ignored for archives" ++ # Delete the generated files. ++ if test -f "$output_objdir/${outputname}S.${objext}"; then ++ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' ++ fi -- 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 "$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 - # 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//'` -+ 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 -- exit 1 -- 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$//'` -+ 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$//'` -+ func_stripname '' '.la' "$outputname" -+ libname=$func_stripname_result + if test -n "$compile_shlibpath$finalize_shlibpath"; then +@@ -3872,7 +8913,7 @@ static const void *lt_preloaded_setup() + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do +- rpath="$rpath$dir:" ++ func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " 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 -- exit 1 -+ 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!" - libobjs="$libobjs $objs" +@@ -3880,7 +8921,7 @@ static const void *lt_preloaded_setup() + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do +- rpath="$rpath$dir:" ++ func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi +@@ -3890,13 +8931,19 @@ static const void *lt_preloaded_setup() + # 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 "$link_command" | $SED '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 $? +- exit 0 ++ func_show_eval "$link_command" 'exit $?' ++ ++ if test -n "$postlink_cmds"; then ++ func_to_tool_file "$output" ++ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` ++ func_execute_cmds "$postlink_cmds" 'exit $?' ++ fi ++ ++ exit $EXIT_SUCCESS 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" + if test "$hardcode_action" = relink; then +@@ -3904,13 +8951,13 @@ static const void *lt_preloaded_setup() + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" - set dummy $rpath -- if test $# -gt 2; then -- $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" +- $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 "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= +@@ -3922,246 +8969,99 @@ static const void *lt_preloaded_setup() + fi + + # Replace the output file specification. +- link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` ++ link_command=`$ECHO "$link_command" | $SED '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 $?' + -+ install_libdir="$1" ++ if test -n "$postlink_cmds"; then ++ func_to_tool_file "$output_objdir/$outputname" ++ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` ++ func_execute_cmds "$postlink_cmds" 'exit $?' ++ fi - 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 -- # convenience libraries should have the same extension an -- # archive normally would. -+ # convenience libraries should have the same extension an -+ # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi + # 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"` +- fi +- +- # 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";; +- esac +- qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` +- else +- qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` ++ relink_command="(cd `pwd`; $relink_command)" ++ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi -- if test -n "$vinfo"; then -- $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 +- # 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) 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 ++ func_stripname '' '.exe' "$outputname" ++ outputname=$func_stripname_result ;; + *) exeext= ;; + esac +- $rm $output +- trap "$rm $output; exit 1" 1 2 15 +- +- $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//' +-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 +- +-relink_command=\"$relink_command > /dev/null 2>&1\" +- +-# 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'\` +- 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 +- +- # Try to get the absolute directory name. +- absdir=\`cd \"\$thisdir\" && pwd\` +- test -n \"\$absdir\" && thisdir=\"\$absdir\" +-" +- +- if test "$fast_install" = yes; then +- echo >> $output "\ +- 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 >> $output "\ +- +- # 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 >> $output "\ +- program='$outputname' +- progdir=\"\$thisdir/$objdir\" +-" - fi -+ test -n "$vinfo" && \ -+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - -- if test -n "$release"; then -- $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 +- +- echo >> $output "\ +- +- 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 -+ 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" ++ 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 -- if test -n "$8"; then -- $echo "$modename: too many parameters to \`-version-info'" 1>&2 -- $echo "$help" 1>&2 -- exit 1 +- # 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 -+ test -n "$7" && \ -+ func_fatal_help "too many parameters to \`-version-info'" ++ func_emit_cwrapperexe_src > $cwrappersource -- current="$2" -- revision="$3" -- age="$4" -+ # convert absolute version numbers to libtool ages -+ # this retains compatibility with .la files and attempts -+ # to make the code below a bit more comprehensible -+ -+ case $vinfo_number in -+ yes) -+ 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 -+ # and those that subtract age and use age as -+ # a minor version. But, then there is irix -+ # which has an extra 1 added just for fun -+ # -+ case $version_type in -+ darwin|linux|osf|windows|none) -+ func_arith $number_major + $number_minor -+ current=$func_arith_result -+ age="$number_minor" -+ revision="$number_revision" -+ ;; -+ freebsd-aout|freebsd-elf|sunos) -+ current="$number_major" -+ revision="$number_minor" -+ age="0" -+ ;; -+ irix|nonstopux) -+ func_arith $number_major + $number_minor -+ current=$func_arith_result -+ age="$number_minor" -+ revision="$number_minor" -+ lt_irix_increment=no -+ ;; -+ esac -+ ;; -+ no) -+ current="$1" -+ revision="$2" -+ age="$3" -+ ;; -+ esac +- $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*) +- $echo >> $output "\ +- exec \$progdir/\$program \${1+\"\$@\"} +-" +- ;; ++ # 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 ++ } - # Check that each of the things are valid numbers. - case $current in -- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; -+ 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: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ func_error "CURRENT \`$current' must be a nonnegative integer" -+ func_fatal_error "\`$vinfo' is not valid version information" +- # Backslashes separate directories on plain windows +- *-*-mingw | *-*-os2*) +- $echo >> $output "\ +- 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 ++ } ;; - esac ++ * ) ++ $RM $output ++ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - case $revision in -- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; -+ 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: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ func_error "REVISION \`$revision' must be a nonnegative integer" -+ func_fatal_error "\`$vinfo' is not valid version information" +- *) +- $echo >> $output "\ +- # Export the path to the program. +- PATH=\"\$progdir:\$PATH\" +- export PATH +- +- exec \$program \${1+\"\$@\"} +-" ++ func_emit_wrapper no > $output ++ chmod +x $output ;; esac +- $echo >> $output "\ +- \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" +- 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\ +-" +- chmod +x $output +- fi +- exit 0 ++ } ++ exit $EXIT_SUCCESS + ;; + esac - case $age in -- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; -+ 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: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ func_error "AGE \`$age' must be a nonnegative integer" -+ func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac +@@ -4169,7 +9069,7 @@ fi\ + for oldlib in $oldlibs; do -- 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 -- exit 1 -+ 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" + if test "$build_libtool_libs" = convenience; then +- oldobjs="$libobjs_save" ++ oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else +@@ -4177,146 +9077,177 @@ fi\ + 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 ++ func_append oldobjs " $symfileobj" ++ fi fi + addlibs="$old_convenience" + fi - # Calculate the version variables. -@@ -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` -+ 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" - ;; + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" +- $show "${rm}r $gentop" +- $run ${rm}r "$gentop" +- $show "$mkdir $gentop" +- $run $mkdir "$gentop" +- status=$? +- if test $status -ne 0 && test ! -d "$gentop"; then +- exit $status +- fi +- generated="$generated $gentop" +- +- # Add in members from convenience archives. +- for xlib in $addlibs; do +- # Extract the objects. +- case $xlib in +- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; +- *) xabs=`pwd`"/$xlib" ;; +- esac +- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` +- xdir="$gentop/$xlib" +- +- $show "${rm}r $xdir" +- $run ${rm}r "$xdir" +- $show "$mkdir $xdir" +- $run $mkdir "$xdir" +- status=$? +- if test $status -ne 0 && test ! -d "$xdir"; then +- exit $status +- fi +- $show "(cd $xdir && $AR x $xabs)" +- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? ++ func_append generated " $gentop" -@@ -2580,19 +6272,31 @@ +- oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print | $NL2SP` +- done ++ func_extract_archives $gentop $addlibs ++ func_append oldobjs " $func_extract_archives_result" + fi - freebsd-elf) - major=".$current" -- versuffix=".$current"; -+ versuffix=".$current" - ;; + # 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 + 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 +-# # static libs even though --disable-static was passed! +-# for oldobj in $oldobjs; do +-# if test ! -f $oldobj; then +-# xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` +-# if test "X$xdir" = "X$oldobj"; then +-# xdir="." +-# else +-# xdir="$xdir" +-# fi +-# baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` +-# obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` +-# $show "(cd $xdir && ${LN_S} $obj $baseobj)" +-# $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? +-# fi +-# done -- irix) -- major=`expr $current - $age + 1` -- verstring="sgi$major.$revision" -+ irix | nonstopux) -+ if test "X$lt_irix_increment" = "Xno"; then -+ func_arith $current - $age +- eval cmds=\"$old_archive_cmds\" ++ # Add any objects from preloaded convenience libraries ++ if test -n "$dlprefiles"; then ++ gentop="$output_objdir/${outputname}x" ++ func_append 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 ++ func_append 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 ++ # static archive out of a convenience library, or when linking ++ # the entirety of a libtool archive into another (currently ++ # not supported by libtool). ++ if (for obj in $oldobjs ++ do ++ 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..." ++ gentop="$output_objdir/${outputname}x" ++ func_append generated " $gentop" ++ func_mkdir_p "$gentop" ++ save_oldobjs=$oldobjs ++ oldobjs= ++ counter=1 ++ for obj in $save_oldobjs ++ do ++ func_basename "$obj" ++ objbase="$func_basename_result" ++ case " $oldobjs " in ++ " ") oldobjs=$obj ;; ++ *[\ /]"$objbase "*) ++ while :; do ++ # Make sure we don't pick an alternate name that also ++ # overlaps. ++ newobj=lt$counter-$objbase ++ func_arith $counter + 1 ++ counter=$func_arith_result ++ case " $oldobjs " in ++ *[\ /]"$newobj "*) ;; ++ *) if test ! -f "$gentop/$newobj"; then break; fi ;; ++ esac ++ done ++ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" ++ func_append oldobjs " $gentop/$newobj" ++ ;; ++ *) func_append oldobjs " $obj" ;; ++ esac ++ done ++ fi ++ eval cmds=\"$old_archive_cmds\" ++ ++ 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 ++ elif test -n "$archiver_list_spec"; then ++ func_verbose "using command file archive linking..." ++ for obj in $oldobjs ++ do ++ func_to_tool_file "$obj" ++ $ECHO "$func_to_tool_file_result" ++ done > $output_objdir/$libname.libcmd ++ func_to_tool_file "$output_objdir/$libname.libcmd" ++ oldobjs=" $archiver_list_spec$func_to_tool_file_result" ++ cmds=$old_archive_cmds ++ else ++ # the command line is too long to link in one step, link in parts ++ func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: +- objlist= +- concat_cmds= +- save_oldobjs=$oldobjs +- for obj in $save_oldobjs +- do +- oldobjs="$objlist $obj" +- objlist="$objlist $obj" +- eval test_cmds=\"$old_archive_cmds\" +- if len=`expr "X$test_cmds" : ".*"` && +- test $len -le $max_cmd_len; then +- : +- else +- # the above command should be used before it gets too long +- oldobjs=$objlist ++ 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 ++ 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 ++ fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ +- eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" +- objlist= +- fi +- done ++ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" ++ objlist= ++ len=$len0 ++ fi ++ done + RANLIB=$save_RANLIB +- oldobjs=$objlist +- eval cmds=\"\$concat_cmds~$old_archive_cmds\" +- fi ++ oldobjs=$objlist ++ if test "X$oldobjs" = "X" ; then ++ eval cmds=\"\$concat_cmds\" + else -+ func_arith $current - $age + 1 ++ eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi -+ major=$func_arith_result -+ -+ case $version_type in -+ nonstopux) verstring_prefix=nonstopux ;; -+ *) verstring_prefix=sgi ;; -+ esac -+ verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision -- while test $loop != 0; do -- 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 `.'. -@@ -2601,20 +6305,24 @@ - ;; ++ fi + fi +- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" || exit $? +- done +- IFS="$save_ifs" ++ func_execute_cmds "$cmds" 'exit $?' + done - linux) -- major=.`expr $current - $age` -+ func_arith $current - $age -+ major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; +- if test -n "$generated"; then +- $show "${rm}r$generated" +- $run ${rm}r$generated +- fi ++ test -n "$generated" && \ ++ func_show_eval "${RM}r$generated" - osf) -- major=`expr $current - $age` -+ func_arith $current - $age -+ major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" + # 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" - # 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 -+ func_arith $current - $loop -+ iface=$func_arith_result -+ func_arith $loop - 1 -+ loop=$func_arith_result - verstring="$verstring:${iface}.0" - done + # 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. +- tagopts= +- for tag in $taglist; do +- tagopts="$tagopts --tag $tag" +- done +- 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 "$relink_command" | $SED "$sed_quote_subst"` ++ if test "$hardcode_automatic" = yes ; then ++ relink_command= ++ fi -@@ -2622,6 +6330,11 @@ - verstring="$verstring:${current}.0" - ;; + # Only create the output if not a dry run. +- 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,50 +9259,108 @@ fi\ + for deplib in $dependency_libs; do + case $deplib in + *.la) +- name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` +- 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 +- newdependency_libs="$newdependency_libs $libdir/$name" ++ 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" ++ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; +- *) newdependency_libs="$newdependency_libs $deplib" ;; ++ -L*) ++ func_stripname -L '' "$deplib" ++ func_replace_sysroot "$func_stripname_result" ++ func_append newdependency_libs " -L$func_replace_sysroot_result" ++ ;; ++ -R*) ++ func_stripname -R '' "$deplib" ++ func_replace_sysroot "$func_stripname_result" ++ func_append newdependency_libs " -R$func_replace_sysroot_result" ++ ;; ++ *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= ++ + for lib in $dlfiles; do +- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` +- 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 +- exit 1 +- 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" ++ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ++ ;; ++ *) func_append newdlfiles " $lib" ;; ++ esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do +- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` +- 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 +- exit 1 +- 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" ++ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ++ ;; ++ esac ++ done ++ dlprefiles="$newdlprefiles" ++ else ++ newdlfiles= ++ for lib in $dlfiles; do ++ case $lib in ++ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; ++ *) abs=`pwd`"/$lib" ;; ++ esac ++ func_append newdlfiles " $abs" ++ done ++ dlfiles="$newdlfiles" ++ newdlprefiles= ++ for lib in $dlprefiles; do ++ case $lib in ++ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; ++ *) abs=`pwd`"/$lib" ;; ++ esac ++ func_append newdlprefiles " $abs" + done + dlprefiles="$newdlprefiles" + fi +- $rm $output ++ $RM $output + # place dlname in correct position for cygwin ++ # In fact, it would be nice if we could use this code for all target ++ # systems that can't hard-code library paths into their executables ++ # and that have no shared library path variable independent of PATH, ++ # but it turns out we can't easily determine that from inspecting ++ # libtool variables, so we have to hard-code the OSs to which it ++ # applies here; at the moment, that means platforms that use the PE ++ # object format with DLL files. See the long comment at the top of ++ # tests/bindir.at for full details. + 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 | *cegcc*,*lai,yes,no,*.dll) ++ # If a -bindir argument was supplied, place the dll there. ++ if test "x$bindir" != x ; ++ then ++ func_relative_path "$install_libdir" "$bindir" ++ tdlname=$func_relative_path_result$dlname ++ else ++ # Otherwise fall back on heuristic. ++ tdlname=../bin/$dlname ++ fi ++ ;; + esac +- $echo > $output "\ ++ $ECHO > $output "\ + # $outputname - a libtool library file +-# 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 +9374,15 @@ library_names='$library_names' + # The name of the static archive. + old_library='$old_library' -+ qnx) -+ major=".$current" -+ versuffix=".$current" -+ ;; ++# Linker flags that can not go in dependency_libs. ++inherited_linker_flags='$new_inherited_linker_flags' + - 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 "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 -- exit 1 -+ func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac + # Libraries that this one depends upon. + dependency_libs='$dependency_libs' - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= -- verstring="0.0" -+ case $version_type in -+ darwin) -+ # we can't check for "0.0" in archive_cmds due to quoting -+ # problems, so we reset it completely -+ verstring= -+ ;; -+ *) -+ verstring="0.0" -+ ;; -+ esac - if test "$need_version" = no; then - versuffix= - else -@@ -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 ++# Names of additional weak libraries provided by this library ++weak_library_names='$weak_libs' + - fi + # Version information for $libname. + current=$current + age=$age +@@ -4396,692 +9391,39 @@ revision=$revision + # Is this an already installed library? + installed=$installed -+ func_generate_dlsyms "$libname" "$libname" "yes" -+ libobjs="$libobjs $symfileobj" -+ test "X$libobjs" = "X " && libobjs= ++# Should we warn about portability when linking against -modules? ++shouldnotlink=$module + - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they -- # may have been created when compiling PIC objects. -- removelist= -- tempremovelist=`echo "$output_objdir/*"` -+ # may have been created when compiling PIC objects. -+ removelist= -+ tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do -- case $p in -- *.$objext) -- ;; -- $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) -- removelist="$removelist $p" -- ;; -- *) ;; -- esac -- done -- if test -n "$removelist"; then -- $show "${rm}r $removelist" -- $run ${rm}r $removelist -- fi -+ case $p in -+ *.$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 -+ continue -+ fi -+ fi -+ removelist="$removelist $p" -+ ;; -+ *) ;; -+ esac -+ done -+ test -n "$removelist" && \ -+ func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. -@@ -2698,15 +6428,15 @@ - oldlibs="$oldlibs $output_objdir/$libname.$libext" + # Files to dlopen/dlpreopen + dlopen='$dlfiles' + dlpreopen='$dlprefiles' - # 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 + # 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 "\ + relink_command=\"$relink_command\"" + fi + done +- fi ++ } - # Eliminate all temporary directories. -- 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'` + # 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 +- # Aesthetically quote it. +- arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` +- case $arg in +- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) +- arg="\"$arg\"" +- ;; +- esac +- install_prog="$arg " +- arg="$1" +- shift +- else +- install_prog= +- 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 +- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) +- 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" +- continue +- fi +- +- case $arg in +- -d) isdir=yes ;; +- -f) prev="-f" ;; +- -g) prev="-g" ;; +- -m) prev="-m" ;; +- -o) prev="-o" ;; +- -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. +- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` +- case $arg in +- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) +- 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 +- fi +- +- if test -n "$prev"; then +- $echo "$modename: the \`$prev' option requires an argument" 1>&2 +- $echo "$help" 1>&2 +- exit 1 +- 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 +- 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 +- $echo "$modename: \`$dest' is not a directory" 1>&2 +- $echo "$help" 1>&2 +- exit 1 +- 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 +- ;; +- esac - done -+ #for path in $notinst_path; do -+ # 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 ++ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac ++ exit $EXIT_SUCCESS ++} - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. -@@ -2718,7 +6448,7 @@ - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done -- if test $hardcode_into_libs != yes || test $build_old_libs = yes; then -+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi -@@ -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. -+ ;; -+ *-*-sco3.2v5* | *-*-sco5v6*) -+ # Causes problems with __ctype -+ ;; -+ *-*-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 +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 -- # implementing what was already the behaviour. -+ # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) -@@ -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 2>&1; then : +- else +- $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 +- $echo "$help" 1>&2 +- exit 1 +- 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 +- 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 +- # 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)" +- fi +- done +- fi +- +- # Do each command in the postinstall commands. +- lib="$destdir/$realname" +- eval cmds=\"$postinstall_cmds\" +- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" || exit $? +- 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 +- ;; +- 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 +- ;; +- +- *) +- # 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 +- notinst_deplibs= +- relink_command= +- +- # If there is no directory component, then add one. +- case $file in +- */* | *\\*) . $file ;; +- *) . ./$file ;; +- 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 +- 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 ;; +- 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-$$" +- if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : - else -+ if test -n "$i" ; then -+ libname=`eval "\\$ECHO \"$libname_spec\""` -+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` -+ set dummy $deplib_matches; shift -+ deplib_match=$1 -+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then -+ newdeplibs="$newdeplibs $i" -+ else -+ droppeddeps=yes -+ $ECHO -+ $ECHO "*** Warning: dynamic linker does not accept needed library $i." -+ $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 I believe you do not have" -+ $ECHO "*** because a test_compile did reveal that the linker did not use it for" -+ $ECHO "*** its dynamic dependency list that programs get resolved with at runtime." -+ fi -+ fi -+ ;; -+ *) - newdeplibs="$newdeplibs $i" +- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 +- continue - fi -+ ;; -+ esac - done - else -- # Error occured in the first compile. Let's try to salvage the situation: -- # Compile a seperate program for each library. -+ # Error occurred in the first compile. Let's try to salvage -+ # the situation: Compile a separate program for each library. - for i in $deplibs; do -- name="`expr $i : '-l\(.*\)'`" -- # If $name is empty we are operating on a -L argument. -- if test -n "$name" && test "$name" != "0"; then -- $rm conftest -- $LTCC -o conftest conftest.c $i -- # Did it work? -- if test $? -eq 0 ; then -+ case $i in -+ -l*) -+ func_stripname -l '' "$i" -+ name=$func_stripname_result -+ $opt_dry_run || $RM conftest -+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then - ldd_output=`ldd conftest` -- libname=`eval \\$echo \"$libname_spec\"` -- deplib_matches=`eval \\$echo \"$library_names_spec\"` -- set dummy $deplib_matches -- deplib_match=$2 -- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then -- newdeplibs="$newdeplibs $i" -- else -- droppeddeps=yes -- echo -- echo "*** Warning: This library needs some functionality provided by $i." -- 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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then -+ case " $predeps $postdeps " in -+ *" $i "*) -+ newdeplibs="$newdeplibs $i" -+ i="" -+ ;; -+ esac -+ fi -+ if test -n "$i" ; then -+ libname=`eval "\\$ECHO \"$libname_spec\""` -+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` -+ set dummy $deplib_matches; shift -+ deplib_match=$1 -+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then -+ newdeplibs="$newdeplibs $i" -+ else -+ droppeddeps=yes -+ $ECHO -+ $ECHO "*** Warning: dynamic linker does not accept needed library $i." -+ $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 a test_compile did reveal that the linker did not use this one" -+ $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime." -+ fi - fi - else - droppeddeps=yes -- echo -- echo "*** Warning! Library $i is needed by this library but I was not able to" -- echo "*** make it link in! You will probably need to install it or some" -- echo "*** library that it depends on before this library will be fully" -- echo "*** functional. Installing it before continuing would be even better." -+ $ECHO -+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to" -+ $ECHO "*** make it link in! You will probably need to install it or some" -+ $ECHO "*** library that it depends on before this library will be fully" -+ $ECHO "*** functional. Installing it before continuing would be even better." - fi +- file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` +- outputname="$tmpdir/$file" +- # Replace the output file specification. +- relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` +- +- $show "$relink_command" +- if $run eval "$relink_command"; then : - else -+ ;; -+ *) - newdeplibs="$newdeplibs $i" +- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 +- ${rm}r "$tmpdir" +- continue - fi -+ ;; -+ esac - done - fi - ;; - file_magic*) -- set dummy $deplibs_check_method -- file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` -+ set dummy $deplibs_check_method; shift -+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do -- name="`expr $a_deplib : '-l\(.*\)'`" -- # 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` -- for potent_lib in $potential_libs; do -+ 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 "*) -+ newdeplibs="$newdeplibs $a_deplib" -+ a_deplib="" -+ ;; -+ esac -+ fi -+ if test -n "$a_deplib" ; 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` -+ for potent_lib in $potential_libs; do - # Follow soft links. -- 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 -- potliblink=`ls -ld $potlib | sed 's/.* -> //'` -+ 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";; - esac - done -- # It is ok to link against an archive when -- # building a shared library. -- if $AR -t $potlib > /dev/null 2>&1; then -- newdeplibs="$newdeplibs $a_deplib" -- a_deplib="" -- break 2 -- fi -- if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ -- | 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 - fi -- done -- done -+ done -+ done -+ fi - if test -n "$a_deplib" ; then - droppeddeps=yes -- echo -- echo "*** Warning: This library needs some functionality provided by $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 -+ $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)" -+ else -+ $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 -+ ;; -+ *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" +- 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%"` +- fi +- fi +- +- +- # remove .exe since cygwin /usr/bin/install will append another +- # one anyways +- 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$,,'` +- ;; +- 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 $? +- +- if test -n "$stripme" && test -n "$striplib"; then +- $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='~' +- 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' +- else +- exit 0 +- 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='~' +- 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 +- +- echo "----------------------------------------------------------------------" +- echo "Libraries have been installed in:" +- for libdir in $libdirs; do +- echo " $libdir" +- done +- echo +- echo "If you ever happen to want to link against installed libraries" +- echo "in a given directory, LIBDIR, you must either use libtool, and" +- echo "specify the full pathname of the library, or use the \`-LLIBDIR'" +- echo "flag during linking and do at least one of the following:" +- if test -n "$shlibpath_var"; then +- echo " - add LIBDIR to the \`$shlibpath_var' environment variable" +- echo " during execution" +- fi +- if test -n "$runpath_var"; then +- echo " - add LIBDIR to the \`$runpath_var' environment variable" +- echo " during linking" +- fi +- if test -n "$hardcode_libdir_flag_spec"; then +- libdir=LIBDIR +- eval flag=\"$hardcode_libdir_flag_spec\" +- +- echo " - use the \`$flag' linker flag" +- fi +- if test -n "$admincmds"; then +- echo " - have your system administrator run these commands:$admincmds" +- fi +- if test -f /etc/ld.so.conf; then +- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" +- fi +- echo +- echo "See any operating system documentation about shared libraries for" +- echo "more information, such as the ld(1) and ld.so(8) manual pages." +- echo "----------------------------------------------------------------------" +- exit 0 +- ;; +- +- # 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 +- 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 +- 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 : +- else +- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 +- $echo "$help" 1>&2 +- exit 1 +- 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 +- 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 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 +- +- # Restore saved enviroment variables +- if test "${save_LC_ALL+set}" = set; then +- LC_ALL="$save_LC_ALL"; export LC_ALL +- fi +- if test "${save_LANG+set}" = set; then +- LANG="$save_LANG"; export LANG +- fi ++{ test "$opt_mode" = link || test "$opt_mode" = relink; } && ++ func_mode_link ${1+"$@"} + +- # Now prepare to actually exec the command. +- exec_cmd='"$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 +- 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,49 +9435,47 @@ relink_command=\"$relink_command\"" + for arg + do + case $arg in +- -f) rm="$rm $arg"; rmforce=yes ;; +- -*) rm="$rm $arg" ;; +- *) files="$files $arg" ;; ++ -f) func_append RM " $arg"; rmforce=yes ;; ++ -*) func_append RM " $arg" ;; ++ *) func_append files " $arg" ;; + esac + done + +- if test -z "$rm"; then +- $echo "$modename: you must specify an RM program" 1>&2 +- $echo "$help" 1>&2 +- exit 1 +- fi ++ test -z "$RM" && \ ++ func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do +- 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 ++ odir="$objdir" + else +- objdir="$dir/$objdir" ++ odir="$dir/$objdir" + fi +- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` +- test $mode = uninstall && objdir="$dir" ++ func_basename "$file" ++ name="$func_basename_result" ++ test "$opt_mode" = uninstall && odir="$dir" + +- # Remember objdir for removal later, being careful to avoid duplicates +- if test $mode = clean; then ++ # Remember odir for removal later, being careful to avoid duplicates ++ if test "$opt_mode" = clean; then + case " $rmdirs " in +- *" $objdir "*) ;; +- *) rmdirs="$rmdirs $objdir" ;; ++ *" $odir "*) ;; ++ *) func_append rmdirs " $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. +- if (test -L "$file") >/dev/null 2>&1 \ +- || (test -h "$file") >/dev/null 2>&1 \ +- || 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 ++ exit_status=1 + continue + elif test "$rmforce" = yes; then +- continue ++ continue + fi + + rmfiles="$file" +@@ -5143,312 +9483,130 @@ relink_command=\"$relink_command\"" + 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 +- . $dir/$name ++ if func_lalib_p "$file"; then ++ func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do +- rmfiles="$rmfiles $objdir/$n" ++ func_append rmfiles " $odir/$n" + done +- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" +- test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ++ test -n "$old_library" && func_append rmfiles " $odir/$old_library" + +- if test $mode = uninstall; then ++ case "$opt_mode" in ++ clean) ++ case " $library_names " in ++ *" $dlname "*) ;; ++ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + 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\(.*\)'`" -- # 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` -- for potent_lib in $potential_libs; do -- if eval echo \"$potent_lib\" 2>/dev/null \ -- | sed 10q \ -- | egrep "$match_pattern_regex" > /dev/null; then -- newdeplibs="$newdeplibs $a_deplib" -- 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 "*) -+ newdeplibs="$newdeplibs $a_deplib" -+ a_deplib="" -+ ;; -+ esac -+ fi -+ if test -n "$a_deplib" ; 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` -+ for potent_lib in $potential_libs; do -+ potlib="$potent_lib" # see symlink-check above in file_magic test -+ 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 -+ fi -+ done - done ++ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${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='~' +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" +- if test $? != 0 && test "$rmforce" != yes; then +- exit_status=1 +- fi - done -+ fi - if test -n "$a_deplib" ; then - droppeddeps=yes -- echo -- echo "*** Warning: This library needs some functionality provided by $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 -+ $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)" -+ else -+ $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 -+ ;; -+ *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" -- fi -+ ;; -+ esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" -- if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -- -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'` -+ 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" | $Xsed -e "s,$i,,"` -+ 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='~' +- for cmd in $cmds; do +- IFS="$save_ifs" +- $show "$cmd" +- $run eval "$cmd" +- if test $? != 0 && test "$rmforce" != yes; then +- 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 ++ ;; ++ esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. +- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then ++ if func_lalib_p "$file"; then + +- # Read the .lo file +- . $dir/$name ++ # Read the .lo file ++ func_source $dir/$name + + # Add PIC object to the list of files to remove. +- if test -n "$pic_object" \ +- && test "$pic_object" != none; then +- rmfiles="$rmfiles $dir/$pic_object" +- fi ++ if test -n "$pic_object" && ++ test "$pic_object" != none; then ++ func_append rmfiles " $dir/$pic_object" ++ fi + + # Add non-PIC object to the list of files to remove. +- if test -n "$non_pic_object" \ +- && test "$non_pic_object" != none; then +- rmfiles="$rmfiles $dir/$non_pic_object" +- fi ++ if test -n "$non_pic_object" && ++ test "$non_pic_object" != none; then ++ func_append rmfiles " $dir/$non_pic_object" + fi -+ 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." - else -- 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." - droppeddeps=yes + fi + ;; + + *) +- # Do a test to see if this is a libtool program. +- if test $mode = clean && +- (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then +- relink_command= +- . $dir/$file ++ if test "$opt_mode" = clean ; then ++ noexename=$name ++ case $file in ++ *.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 ++ func_append rmfiles " $file" ++ ;; ++ esac ++ # Do a test to see if this is a libtool program. ++ 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 ++ func_append 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 +- rmfiles="$rmfiles $objdir/lt-$name" ++ # note $name still contains .exe if it was in $file originally ++ # as does the version of $file that was added into $rmfiles ++ func_append rmfiles " $odir/$name $odir/${name}S.${objext}" ++ if test "$fast_install" = yes && test -n "$relink_command"; then ++ func_append rmfiles " $odir/lt-$name" ++ fi ++ if test "X$noexename" != "X$name" ; then ++ func_append rmfiles " $odir/lt-${noexename}.c" ++ fi fi - ;; -@@ -2980,24 +6786,24 @@ + fi + ;; + esac +- $show "$rm $rmfiles" +- $run $rm $rmfiles || exit_status=1 ++ func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + 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 +- ;; +- esac ++{ test "$opt_mode" = uninstall || test "$opt_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 +- exit 1 +- fi +-fi # test -z "$show_help" ++test -z "$opt_mode" && { ++ help="$generic_help" ++ func_fatal_help "you must specify a MODE" ++} ++ ++test -z "$exec_cmd" && \ ++ func_fatal_help "invalid operation mode \`$opt_mode'" + + if test -n "$exec_cmd"; then +- eval exec $exec_cmd +- exit 1 ++ eval exec "$exec_cmd" ++ exit $EXIT_FAILURE + fi + +-# 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 +- ;; +- +-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 +- -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 +- -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 +- -version-info CURRENT[:REVISION[:AGE]] +- specify library version info [each variable defaults to 0] +- +-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 +- ;; +-esac +- +-echo +-$echo "Try \`$modename --help' for more information about other modes." ++exit $exit_status + +-exit 0 + + # The TAGs below are defined such that we never get into a situation + # in which we disable both kinds of libraries. Given conflicting +@@ -5461,16 +9619,18 @@ exit 0 + # 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 ++# ### BEGIN LIBTOOL TAG CONFIG: disable-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 ++# ### 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 ++# ### END LIBTOOL TAG CONFIG: disable-static + + # Local Variables: + # mode:shell-script + # sh-indentation:2 + # End: ++# vi:sw=2 ++ +--- info/texinfo.tex.orig 2002-10-26 09:14:15.000000000 -0600 ++++ info/texinfo.tex 2010-12-30 13:25:31.959226961 -0700 +@@ -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{2008-04-18.10} + % +-% 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, ++% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, ++% 2007, 2008 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 + % modify it under the terms of the GNU General Public License as +-% 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 +-% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +-% Boston, MA 02111-1307, 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 +-% what you give them. Help stamp out software-hoarding! ++% As a special exception, when this file is read by TeX when processing ++% a Texinfo source document, you may use the result without ++% restriction. (This has been our intent since Texinfo was invented.) + % + % Please try the latest version of texinfo.tex before submitting bug + % reports; you can get the latest version from: +-% ftp://ftp.gnu.org/gnu/texinfo.tex +-% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) +-% ftp://texinfo.org/tex/texinfo.tex +-% ftp://us.ctan.org/macros/texinfo/texinfo.tex +-% (and all CTAN mirrors, finger ctan@us.ctan.org for a list). +-% /home/gd/gnu/doc/texinfo.tex on the GNU machines. +-% The texinfo.tex in any given Texinfo distribution could well be out ++% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or ++% ftp://tug.org/tex/texinfo.tex ++% (and all CTAN mirrors, see http://www.ctan.org). ++% The texinfo.tex in any given distribution could well be out + % of date, so if that's what you're using, please check. +-% Texinfo has a small home page at http://texinfo.org/. + % + % 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 +45,17 @@ + % texindex foo.?? + % tex foo.texi + % tex foo.texi +-% dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps. +-% The extra runs of TeX get the cross-reference information correct. ++% dvips foo.dvi -o # or whatever; this makes foo.ps. ++% The extra TeX runs get the cross-reference information correct. + % Sometimes one run after texindex suffices, and sometimes you need more + % than two; texi2dvi does it as many times as necessary. + % +-% It is possible to adapt texinfo.tex for other languages. You can get +-% the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/. ++% It is possible to adapt texinfo.tex for other languages, to some ++% extent. You can get the existing language-specific files from the ++% full Texinfo distribution. ++% ++% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. ++ + + \message{Loading texinfo [version \texinfoversion]:} + +@@ -66,7 +65,14 @@ + \everyjob{\message{[Texinfo version \texinfoversion]}% + \catcode`+=\active \catcode`\_=\active} + +-% Save some parts of plain tex whose names we will redefine. ++ ++\chardef\other=12 ++ ++% We never want plain's \outer definition of \+ in Texinfo. ++% For @tex, we can use \tabalign. ++\let\+ = \relax ++ ++% Save some plain tex macros whose names we will redefine. + \let\ptexb=\b + \let\ptexbullet=\bullet + \let\ptexc=\c +@@ -76,23 +82,36 @@ + \let\ptexend=\end + \let\ptexequiv=\equiv + \let\ptexexclam=\! ++\let\ptexfootnote=\footnote ++\let\ptexgtr=> ++\let\ptexhat=^ + \let\ptexi=\i ++\let\ptexindent=\indent ++\let\ptexinsert=\insert + \let\ptexlbrace=\{ ++\let\ptexless=< ++\let\ptexnewwrite\newwrite ++\let\ptexnoindent=\noindent ++\let\ptexplus=+ + \let\ptexrbrace=\} ++\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 + + % If this character appears in an error message or help string, it + % starts a new line in the output. + \newlinechar = `^^J + ++% Use TeX 3.0's \inputlineno to get the line number, for better error ++% messages, but if we're using an old version of TeX, don't do anything. ++% ++\ifx\inputlineno\thisisundefined ++ \let\linenumber = \empty % Pre-3.0. ++\else ++ \def\linenumber{l.\the\inputlineno:\space} ++\fi ++ + % 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 +150,119 @@ + \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi + \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi + \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi +-\ifx\putwordDeftypevar\undefined\gdef\putwordDeftypevar{Variable}\fi + \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi +-\ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi ++ ++% Since the category of space is not known, we have to be careful. ++\chardef\spacecat = 10 ++\def\spaceisspace{\catcode`\ =\spacecat} ++ ++% sometimes characters are active, so we need control sequences. ++\chardef\colonChar = `\: ++\chardef\commaChar = `\, ++\chardef\dashChar = `\- ++\chardef\dotChar = `\. ++\chardef\exclamChar= `\! ++\chardef\lquoteChar= `\` ++\chardef\questChar = `\? ++\chardef\rquoteChar= `\' ++\chardef\semiChar = `\; ++\chardef\underChar = `\_ + + % Ignore a token. + % + \def\gobble#1{} + +-\hyphenation{ap-pen-dix} +-\hyphenation{mini-buf-fer mini-buf-fers} +-\hyphenation{eshell} +-\hyphenation{white-space} ++% The following is used inside several \edef's. ++\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} ++ ++% Hyphenation fixes. ++\hyphenation{ ++ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ++ ap-pen-dix bit-map bit-maps ++ data-base data-bases eshell fall-ing half-way long-est man-u-script ++ man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm ++ par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces ++ spell-ing spell-ings ++ stand-alone strong-est time-stamp time-stamps which-ever white-space ++ wide-spread wrap-around ++} + + % Margin to add to right of even pages, to left of odd pages. +-\newdimen \bindingoffset +-\newdimen \normaloffset ++\newdimen\bindingoffset ++\newdimen\normaloffset + \newdimen\pagewidth \newdimen\pageheight + ++% For a final copy, take out the rectangles ++% that mark overfull boxes (in case you have decided ++% that the text looks ok even though it passes the margin). ++% ++\def\finalout{\overfullrule=0pt} ++ ++% @| inserts a changebar to the left of the current line. It should ++% surround any changed text. This approach does *not* work if the ++% change spans more than two lines of output. To handle that, we would ++% have adopt a much more difficult approach (putting marks into the main ++% vertical list for the beginning and end of each change). ++% ++\def\|{% ++ % \vadjust can only be used in horizontal mode. ++ \leavevmode ++ % ++ % Append this vertical mode material after the current line in the output. ++ \vadjust{% ++ % We want to insert a rule with the height and depth of the current ++ % leading; that is exactly what \strutbox is supposed to record. ++ \vskip-\baselineskip ++ % ++ % \vadjust-items are inserted at the left edge of the type. So ++ % the \llap here moves out into the left-hand margin. ++ \llap{% ++ % ++ % For a thicker or thinner bar, change the `1pt'. ++ \vrule height\baselineskip width1pt ++ % ++ % This is the space between the bar and the text. ++ \hskip 12pt ++ }% ++ }% ++} ++ + % Sometimes it is convenient to have everything in the transcript file + % and nothing on the terminal. We don't just call \tracingall here, +-% since that produces some useless output on the terminal. ++% since that produces some useless output on the terminal. We also make ++% some effort to order the tracing commands to reduce output in the log ++% file; cf. trace.sty in LaTeX. + % + \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% +-\ifx\eTeXversion\undefined +-\def\loggingall{\tracingcommands2 \tracingstats2 +- \tracingpages1 \tracingoutput1 \tracinglostchars1 +- \tracingmacros2 \tracingparagraphs1 \tracingrestores1 +- \showboxbreadth\maxdimen\showboxdepth\maxdimen +-}% +-\else +-\def\loggingall{\tracingcommands3 \tracingstats2 +- \tracingpages1 \tracingoutput1 \tracinglostchars1 +- \tracingmacros2 \tracingparagraphs1 \tracingrestores1 +- \tracingscantokens1 \tracingassigns1 \tracingifs1 +- \tracinggroups1 \tracingnesting2 +- \showboxbreadth\maxdimen\showboxdepth\maxdimen ++\def\loggingall{% ++ \tracingstats2 ++ \tracingpages1 ++ \tracinglostchars2 % 2 gives us more in etex ++ \tracingparagraphs1 ++ \tracingoutput1 ++ \tracingmacros2 ++ \tracingrestores1 ++ \showboxbreadth\maxdimen \showboxdepth\maxdimen ++ \ifx\eTeXversion\undefined\else % etex gives us more logging ++ \tracingscantokens1 ++ \tracingifs1 ++ \tracinggroups1 ++ \tracingnesting2 ++ \tracingassigns1 ++ \fi ++ \tracingcommands3 % 3 gives us more in etex ++ \errorcontextlines16 + }% +-\fi ++ ++% add check for \lastpenalty to plain's definitions. If the last thing ++% we did was a \nobreak, we don't want to insert more space. ++% ++\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount ++ \removelastskip\penalty-50\smallskip\fi\fi} ++\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount ++ \removelastskip\penalty-100\medskip\fi\fi} ++\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount ++ \removelastskip\penalty-200\bigskip\fi\fi} + + % For @cropmarks command. + % Do @cropmarks to get crop marks. +@@ -184,6 +278,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 +339,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 +349,18 @@ + % take effect in \write's, yet the group defined by the \vbox ends + % before the \shipout runs. + % +- \escapechar = `\\ % use backslash in output files. + \indexdummies % don't expand commands in the output. + \normalturnoffactive % \ in index entries must not stay \, e.g., if +- % the page break happens to be in the middle of an example. ++ % the page break happens to be in the middle of an example. ++ % 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 ++ % {\code {{\tt \backslashcurfont }acronym} + \shipout\vbox{% ++ % Do this early so pdf references go to the beginning of the page. ++ \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi ++ % + \ifcropmarks \vbox to \outervsize\bgroup + \hsize = \outerhsize + \vskip-\topandbottommargin +@@ -237,14 +384,12 @@ + \pagebody{#1}% + \ifdim\ht\footlinebox > 0pt + % Only leave this space if the footline is nonempty. +- % (We lessened \vsize for it in \oddfootingxxx.) ++ % (We lessened \vsize for it in \oddfootingyyy.) + % The \baselineskip=24pt in plain's \makefootline has no effect. +- \vskip 2\baselineskip ++ \vskip 24pt + \unvbox\footlinebox + \fi + % +- \ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi +- % + \ifcropmarks + \egroup % end of \vbox\bgroup + \hfil\egroup % end of (centering) \line\bgroup +@@ -262,7 +407,7 @@ + \egroup % \vbox from first cropmarks clause + \fi + }% end of \shipout\vbox +- }% end of group with \turnoffactive ++ }% end of group with \indexdummies + \advancepageno + \ifnum\outputpenalty>-20000 \else\dosupereject\fi + } +@@ -275,7 +420,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 +440,161 @@ + % the input line (except we remove a trailing comment). #1 should be a + % macro which expects an ordinary undelimited TeX argument. + % +-\def\parsearg#1{% +- \let\next = #1% ++\def\parsearg{\parseargusing{}} ++\def\parseargusing#1#2{% ++ \def\argtorun{#2}% + \begingroup + \obeylines +- \futurelet\temp\parseargx +-} +- +-% If the next token is an obeyed space (from an @example environment or +-% the like), remove it and recurse. Otherwise, we're done. +-\def\parseargx{% +- % \obeyedspace is defined far below, after the definition of \sepspaces. +- \ifx\obeyedspace\temp +- \expandafter\parseargdiscardspace +- \else +- \expandafter\parseargline +- \fi ++ \spaceisspace ++ #1% ++ \parseargline\empty% Insert the \empty token, see \finishparsearg below. + } + +-% Remove a single space (as the delimiter token to the macro call). +-{\obeyspaces % +- \gdef\parseargdiscardspace {\futurelet\temp\parseargx}} +- + {\obeylines % + \gdef\parseargline#1^^M{% + \endgroup % End of the group started in \parsearg. +- % +- % First remove any @c comment, then any @comment. +- % Result of each macro is put in \toks0. +- \argremovec #1\c\relax % +- \expandafter\argremovecomment \the\toks0 \comment\relax % +- % +- % Call the caller's macro, saved as \next in \parsearg. +- \expandafter\next\expandafter{\the\toks0}% ++ \argremovecomment #1\comment\ArgTerm% + }% + } + +-% Since all \c{,omment} does is throw away the argument, we can let TeX +-% do that for us. The \relax here is matched by the \relax in the call +-% in \parseargline; it could be more or less anything, its purpose is +-% just to delimit the argument to the \c. +-\def\argremovec#1\c#2\relax{\toks0 = {#1}} +-\def\argremovecomment#1\comment#2\relax{\toks0 = {#1}} ++% First remove any @comment, then any @c comment. ++\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} ++\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} + +-% \argremovec{,omment} might leave us with trailing spaces, though; e.g., +-% @end itemize @c foo +-% 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 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. +-% Fortunately, Texinfo does not define any such commands. (If it ever +-% does, the catcode of the characters in questionwill have to be changed +-% here.) But this means we cannot call \removeactivespaces as part of +-% \argremovec{,omment}, since @c uses \parsearg, and thus the argument +-% that \parsearg gets might well have any character at all in it. ++% \argremovec might leave us with trailing space, e.g., ++% @end itemize @c foo ++% This space token undergoes the same procedure and is eventually removed ++% by \finishparsearg. + % +-\def\removeactivespaces#1{% +- \begingroup +- \ignoreactivespaces +- \edef\temp{#1}% +- \global\toks0 = \expandafter{\temp}% +- \endgroup ++\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} ++\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} ++\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% ++ \def\temp{#3}% ++ \ifx\temp\empty ++ % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: ++ \let\temp\finishparsearg ++ \else ++ \let\temp\argcheckspaces ++ \fi ++ % Put the space token in: ++ \temp#1 #3\ArgTerm + } + +-% Change the active space to expand to nothing. ++% If a _delimited_ argument is enclosed in braces, they get stripped; so ++% 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. ++% (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. + % +-\begingroup ++% But first, we have to remove the trailing space token. ++% ++\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} ++ ++% \parseargdef\foo{...} ++% is roughly equivalent to ++% \def\foo{\parsearg\Xfoo} ++% \def\Xfoo#1{...} ++% ++% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my ++% favourite TeX trick. --kasal, 16nov03 ++ ++\def\parseargdef#1{% ++ \expandafter \doparseargdef \csname\string#1\endcsname #1% ++} ++\def\doparseargdef#1#2{% ++ \def#2{\parsearg#1}% ++ \def#1##1% ++} ++ ++% Several utility definitions with active space: ++{ + \obeyspaces +- \gdef\ignoreactivespaces{\obeyspaces\let =\empty} +-\endgroup ++ \gdef\obeyedspace{ } ++ ++ % Make each space character in the input produce a normal interword ++ % space in the output. Don't allow a line break at this space, as this ++ % is used only in environments like @example, where each line of input ++ % should produce a line of output anyway. ++ % ++ \gdef\sepspaces{\obeyspaces\let =\tie} ++ ++ % If an index command is used in an @example environment, any spaces ++ % therein should become regular spaces in the raw index file, not the ++ % expansion of \tie (\leavevmode \penalty \@M \ ). ++ \gdef\unsepspaces{\let =\space} ++} + + + \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} + +-%% These are used to keep @begin/@end levels from running away +-%% Call \inENV within environments (after a \begingroup) +-\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi} +-\def\ENVcheck{% +-\ifENV\errmessage{Still within an environment; press RETURN to continue} +-\endgroup\fi} % This is not perfect, but it should reduce lossage ++% Define the framework for environments in texinfo.tex. It's used like this: ++% ++% \envdef\foo{...} ++% \def\Efoo{...} ++% ++% It's the responsibility of \envdef to insert \begingroup before the ++% actual body; @end closes the group after calling \Efoo. \envdef also ++% defines \thisenv, so the current environment is known; @end checks ++% whether the environment name matches. The \checkenv macro can also be ++% 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 environments; they don't open a group. (The ++% implementation of @end takes care not to call \endgroup in this ++% special case.) + +-% @begin foo is the same as @foo, for now. +-\newhelp\EMsimple{Press RETURN to continue.} + +-\outer\def\begin{\parsearg\beginxxx} ++% At run-time, environments start with this: ++\def\startenvironment#1{\begingroup\def\thisenv{#1}} ++% initialize ++\let\thisenv\empty + +-\def\beginxxx #1{% +-\expandafter\ifx\csname #1\endcsname\relax +-{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else +-\csname #1\endcsname\fi} ++% ... but they get defined via ``\envdef\foo{...}'': ++\long\def\envdef#1#2{\def#1{\startenvironment#1#2}} ++\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} + +-% @end foo executes the definition of \Efoo. +-% +-\def\end{\parsearg\endxxx} +-\def\endxxx #1{% +- \removeactivespaces{#1}% +- \edef\endthing{\the\toks0}% +- % +- \expandafter\ifx\csname E\endthing\endcsname\relax +- \expandafter\ifx\csname \endthing\endcsname\relax +- % There's no \foo, i.e., no ``environment'' foo. +- \errhelp = \EMsimple +- \errmessage{Undefined command `@end \endthing'}% +- \else +- \unmatchedenderror\endthing +- \fi ++% Check whether we're in the right environment: ++\def\checkenv#1{% ++ \def\temp{#1}% ++ \ifx\thisenv\temp + \else +- % Everything's ok; the right environment has been started. +- \csname E\endthing\endcsname ++ \badenverr + \fi + } + +-% There is an environment #1, but it hasn't been started. Give an error. +-% +-\def\unmatchedenderror#1{% ++% Environment mismatch, #1 expected: ++\def\badenverr{% + \errhelp = \EMsimple +- \errmessage{This `@end #1' doesn't have a matching `@#1'}% ++ \errmessage{This command can appear only \inenvironment\temp, ++ not \inenvironment\thisenv}% ++} ++\def\inenvironment#1{% ++ \ifx#1\empty ++ out of any environment% ++ \else ++ in environment \expandafter\string#1% ++ \fi + } + +-% Define the control sequence \E#1 to give an unmatched @end error. ++% @end foo executes the definition of \Efoo. ++% But first, it executes a specialized version of \checkenv + % +-\def\defineunmatchedend#1{% +- \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}% ++\parseargdef\end{% ++ \if 1\csname iscond.#1\endcsname ++ \else ++ % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 ++ \expandafter\checkenv\csname#1\endcsname ++ \csname E#1\endcsname ++ \endgroup ++ \fi + } + ++\newhelp\EMsimple{Press RETURN to continue.} + +-% Single-spacing is done by various environments (specifically, in +-% \nonfillstart and \quotations). +-\newskip\singlespaceskip \singlespaceskip = 12.5pt +-\def\singlespace{% +- % Why was this kern here? It messes up equalizing space above and below +- % environments. --karl, 6may93 +- %{\advance \baselineskip by -\singlespaceskip +- %\kern \baselineskip}% +- \setleading \singlespaceskip +-} + + %% Simple single-character @ commands + +@@ -452,16 +615,22 @@ + \let\{=\mylbrace + \let\}=\myrbrace + \begingroup +- % Definitions to produce actual \{ & \} command in an index. +- \catcode`\{ = 12 \catcode`\} = 12 ++ % Definitions to produce \{ and \} commands for indices, ++ % and @{ and @} for the aux/toc files. ++ \catcode`\{ = \other \catcode`\} = \other + \catcode`\[ = 1 \catcode`\] = 2 +- \catcode`\@ = 0 \catcode`\\ = 12 +- @gdef@lbracecmd[\{]% +- @gdef@rbracecmd[\}]% +-@endgroup ++ \catcode`\! = 0 \catcode`\\ = \other ++ !gdef!lbracecmd[\{]% ++ !gdef!rbracecmd[\}]% ++ !gdef!lbraceatcmd[@{]% ++ !gdef!rbraceatcmd[@}]% ++!endgroup ++ ++% @comma{} to avoid , parsing problems. ++\let\comma = , + + % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent +-% Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H. ++% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. + \let\, = \c + \let\dotaccent = \. + \def\ringaccent#1{{\accent23 #1}} +@@ -469,22 +638,43 @@ + \let\ubaraccent = \b + \let\udotaccent = \d + +-% Other special characters: @questiondown @exclamdown +-% Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss. ++% Other special characters: @questiondown @exclamdown @ordf @ordm ++% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. + \def\questiondown{?`} + \def\exclamdown{!`} ++\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} ++\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} + + % Dotless i and dotless j, used for accents. + \def\imacro{i} + \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 + } + ++% The \TeX{} logo, as in plain, but resetting the spacing so that a ++% period following counts as ending a sentence. (Idea found in latex.) ++% ++\edef\TeX{\TeX \spacefactor=1000 } ++ ++% @LaTeX{} logo. Not quite the same results as the definition in ++% latex.ltx, since we use a different font for the raised A; it's most ++% convenient for us to use an explicitly smaller font, rather than using ++% the \scriptstyle font (since we don't reset \scriptstyle and ++% \scriptscriptstyle). ++% ++\def\LaTeX{% ++ L\kern-.36em ++ {\setbox0=\hbox{T}% ++ \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% ++ \kern-.15em ++ \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 +693,32 @@ + % @* forces a line break. + \def\*{\hfil\break\hbox{}\ignorespaces} + ++% @/ allows a line break. ++\let\/=\allowbreak ++ + % @. is an end-of-sentence period. +-\def\.{.\spacefactor=3000 } ++\def\.{.\spacefactor=\endofsentencespacefactor\space} + + % @! is an end-of-sentence bang. +-\def\!{!\spacefactor=3000 } ++\def\!{!\spacefactor=\endofsentencespacefactor\space} + + % @? is an end-of-sentence query. +-\def\?{?\spacefactor=3000 } ++\def\?{?\spacefactor=\endofsentencespacefactor\space} ++ ++% @frenchspacing on|off says whether to put extra space after punctuation. ++% ++\def\onword{on} ++\def\offword{off} ++% ++\parseargdef\frenchspacing{% ++ \def\temp{#1}% ++ \ifx\temp\onword \plainfrenchspacing ++ \else\ifx\temp\offword \plainnonfrenchspacing ++ \else ++ \errhelp = \EMsimple ++ \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% ++ \fi\fi ++} + + % @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 +733,24 @@ + % therefore, no glue is inserted, and the space between the headline and + % the text is small, which looks bad. + % +-\def\group{\begingroup +- \ifnum\catcode13=\active \else ++% Another complication is that the group might be very large. This can ++% cause the glue on the previous page to be unduly stretched, because it ++% does not have much material. In this case, it's better to add an ++% explicit \vfill so that the extra space is at the bottom. The ++% threshold for doing this is if the group is more than \vfilllimit ++% percent of a page (\vfilllimit can be changed inside of @tex). ++% ++\newbox\groupbox ++\def\vfilllimit{0.7} ++% ++\envdef\group{% ++ \ifnum\catcode`\^^M=\active \else + \errhelp = \groupinvalidhelp + \errmessage{@group invalid in context where filling is enabled}% + \fi ++ \startsavinginserts + % +- % The \vtop we start below produces a box with normal height and large +- % depth; thus, TeX puts \baselineskip glue before it, and (when the +- % next line of text is done) \lineskip glue after it. (See p.82 of +- % the TeXbook.) Thus, space below is not quite equal to space +- % above. But it's pretty close. +- \def\Egroup{% +- \egroup % End the \vtop. +- \endgroup % End the \group. +- }% +- % +- \vtop\bgroup +- % We have to put a strut on the last line in case the @group is in +- % the midst of an example, rather than completely enclosing it. +- % Otherwise, the interline space between the last line of the group +- % and the first line afterwards is too small. But we can't put the +- % strut in \Egroup, since there it would be on a line by itself. +- % Hence this just inserts a strut at the beginning of each line. +- \everypar = {\strut}% +- % +- % Since we have a strut on every line, we don't need any of TeX's +- % normal interline spacing. +- \offinterlineskip +- % +- % OK, but now we have to do something about blank +- % lines in the input in @example-like environments, which normally +- % just turn into \lisppar, which will insert no space now that we've +- % turned off the interline space. Simplest is to make them be an +- % empty paragraph. +- \ifx\par\lisppar +- \edef\par{\leavevmode \par}% +- % +- % Reset ^^M's definition to new definition of \par. +- \obeylines +- \fi +- % ++ \setbox\groupbox = \vtop\bgroup + % 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 +760,32 @@ + \comment + } + % ++% The \vtop produces a box with normal height and large depth; thus, TeX puts ++% \baselineskip glue before it, and (when the next line of text is done) ++% \lineskip glue after it. Thus, space below is not quite equal to space ++% above. But it's pretty close. ++\def\Egroup{% ++ % To get correct interline space between the last line of the group ++ % and the first line afterwards, we have to propagate \prevdepth. ++ \endgraf % Not \par, as it may have been set to \lisppar. ++ \global\dimen1 = \prevdepth ++ \egroup % End the \vtop. ++ % \dimen0 is the vertical size of the group's box. ++ \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox ++ % \dimen2 is how much space is left on the page (more or less). ++ \dimen2 = \pageheight \advance\dimen2 by -\pagetotal ++ % if the group doesn't fit on the current page, and it's a big big ++ % group, force a page break. ++ \ifdim \dimen0 > \dimen2 ++ \ifdim \pagetotal < \vfilllimit\pageheight ++ \page ++ \fi ++ \fi ++ \box\groupbox ++ \prevdepth = \dimen1 ++ \checkinserts ++} ++% + % TeX puts in an \escapechar (i.e., `@') at the beginning of the help + % message, so this ends up printing `@group can only ...'. + % +@@ -587,10 +798,8 @@ where each line of input produces a line + + \newdimen\mil \mil=0.001in + +-\def\need{\parsearg\needx} +- + % Old definition--didn't work. +-%\def\needx #1{\par % ++%\parseargdef\need{\par % + %% This method tries to make TeX break the page naturally + %% if the depth of the box does not fit. + %{\baselineskip=0pt% +@@ -598,7 +807,7 @@ where each line of input produces a line + %\prevdepth=-1000pt + %}} + +-\def\needx#1{% ++\parseargdef\need{% + % Ensure vertical mode, so we don't make a big box in the middle of a + % paragraph. + \par +@@ -637,37 +846,11 @@ where each line of input produces a line + \fi + } + +-% @br forces paragraph break ++% @br forces paragraph break (and is undocumented). + + \let\br = \par + +-% @dots{} output an ellipsis using the current font. +-% We do .5em per period so that it has the same spacing in a typewriter +-% font as three actual period characters. +-% +-\def\dots{% +- \leavevmode +- \hbox to 1.5em{% +- \hskip 0pt plus 0.25fil minus 0.25fil +- .\hss.\hss.% +- \hskip 0pt plus 0.5fil minus 0.5fil +- }% +-} +- +-% @enddots{} is an end-of-sentence ellipsis. +-% +-\def\enddots{% +- \leavevmode +- \hbox to 2em{% +- \hskip 0pt plus 0.25fil minus 0.25fil +- .\hss.\hss.\hss.% +- \hskip 0pt plus 0.5fil minus 0.5fil +- }% +- \spacefactor=3000 +-} +- +- +-% @page forces the start of a new page ++% @page forces the start of a new page. + % + \def\page{\par\vfill\supereject} + +@@ -679,57 +862,131 @@ where each line of input produces a line + \newskip\exdentamount + + % This defn is used inside fill environments such as @defun. +-\def\exdent{\parsearg\exdentyyy} +-\def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}} ++\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} + + % This defn is used inside nofill environments such as @example. +-\def\nofillexdent{\parsearg\nofillexdentyyy} +-\def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount +-\leftline{\hskip\leftskip{\rm#1}}}} +- +-% @inmargin{TEXT} puts TEXT in the margin next to the current paragraph. ++\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount ++ \leftline{\hskip\leftskip{\rm#1}}}} + +-\def\inmargin#1{% +-\strut\vadjust{\nobreak\kern-\strutdepth +- \vtop to \strutdepth{\baselineskip\strutdepth\vss +- \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}} ++% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current ++% paragraph. For more general purposes, use the \margin insertion ++% class. WHICH is `l' or `r'. ++% + \newskip\inmarginspacing \inmarginspacing=1cm + \def\strutdepth{\dp\strutbox} ++% ++\def\doinmargin#1#2{\strut\vadjust{% ++ \nobreak ++ \kern-\strutdepth ++ \vtop to \strutdepth{% ++ \baselineskip=\strutdepth ++ \vss ++ % if you have multiple lines of stuff to put here, you'll need to ++ % make the vbox yourself of the appropriate size. ++ \ifx#1l% ++ \llap{\ignorespaces #2\hskip\inmarginspacing}% ++ \else ++ \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% ++ \fi ++ \null ++ }% ++}} ++\def\inleftmargin{\doinmargin l} ++\def\inrightmargin{\doinmargin r} ++% ++% @inmargin{TEXT [, RIGHT-TEXT]} ++% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; ++% else use TEXT for both). ++% ++\def\inmargin#1{\parseinmargin #1,,\finish} ++\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. ++ \setbox0 = \hbox{\ignorespaces #2}% ++ \ifdim\wd0 > 0pt ++ \def\lefttext{#1}% have both texts ++ \def\righttext{#2}% ++ \else ++ \def\lefttext{#1}% have only one text ++ \def\righttext{#1}% ++ \fi ++ % ++ \ifodd\pageno ++ \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin ++ \else ++ \def\temp{\inleftmargin\lefttext}% ++ \fi ++ \temp ++} + +-%\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 +- \catcode`~=12 +- \catcode`^=12 +- \catcode`_=12 +- \catcode`|=12 +- \catcode`<=12 +- \catcode`>=12 +- \catcode`+=12 +- \parsearg\includezzz} +-% 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{% ++ \pushthisfilestack + \def\thisfile{#1}% +- \input\thisfile +-\endgroup} ++ {% ++ \makevalueexpandable % we want to expand any @value in FILE. ++ \turnoffactive % and allow special characters in the expansion ++ \edef\temp{\noexpand\input #1 }% ++ % ++ % This trickery is to read FILE outside of a group, in case it makes ++ % definitions, etc. ++ \expandafter ++ }\temp ++ \popthisfilestack ++} ++\def\filenamecatcodes{% ++ \catcode`\\=\other ++ \catcode`~=\other ++ \catcode`^=\other ++ \catcode`_=\other ++ \catcode`|=\other ++ \catcode`<=\other ++ \catcode`>=\other ++ \catcode`+=\other ++ \catcode`-=\other ++} + +-\def\thisfile{} ++\def\pushthisfilestack{% ++ \expandafter\pushthisfilestackX\popthisfilestack\StackTerm ++} ++\def\pushthisfilestackX{% ++ \expandafter\pushthisfilestackY\thisfile\StackTerm ++} ++\def\pushthisfilestackY #1\StackTerm #2\StackTerm {% ++ \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% ++} + +-% @center line outputs that line, centered ++\def\popthisfilestack{\errthisfilestackempty} ++\def\errthisfilestackempty{\errmessage{Internal error: ++ the stack of filenames is empty.}} + +-\def\center{\parsearg\centerzzz} +-\def\centerzzz #1{{\advance\hsize by -\leftskip +-\advance\hsize by -\rightskip +-\centerline{#1}}} ++\def\thisfile{} ++ ++% @center line ++% outputs that line, centered. ++% ++\parseargdef\center{% ++ \ifhmode ++ \let\next\centerH ++ \else ++ \let\next\centerV ++ \fi ++ \next{\hfil \ignorespaces#1\unskip \hfil}% ++} ++\def\centerH#1{% ++ {% ++ \hfil\break ++ \advance\hsize by -\leftskip ++ \advance\hsize by -\rightskip ++ \line{#1}% ++ \break ++ }% ++} ++\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} + + % @sp n outputs n lines of vertical space + +-\def\sp{\parsearg\spxxx} +-\def\spxxx #1{\vskip #1\baselineskip} ++\parseargdef\sp{\vskip #1\baselineskip} + + % @comment ...line which is ignored... + % @c is the same as @comment +@@ -744,13 +1001,13 @@ where each line of input produces a line + + % @paragraphindent NCHARS + % We'll use ems for NCHARS, close enough. +-% We cannot implement @paragraphindent asis, though. +-% ++% NCHARS can also be the word `asis' or `none'. ++% We cannot feasibly implement @paragraphindent asis, though. ++% + \def\asisword{asis} % no translation, these are keywords + \def\noneword{none} + % +-\def\paragraphindent{\parsearg\doparagraphindent} +-\def\doparagraphindent#1{% ++\parseargdef\paragraphindent{% + \def\temp{#1}% + \ifx\temp\asisword + \else +@@ -767,8 +1024,7 @@ where each line of input produces a line + % 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. +-\def\exampleindent{\parsearg\doexampleindent} +-\def\doexampleindent#1{% ++\parseargdef\exampleindent{% + \def\temp{#1}% + \ifx\temp\asisword + \else +@@ -780,26 +1036,159 @@ where each line of input produces a line + \fi + } + ++% @firstparagraphindent WORD ++% If WORD is `none', then suppress indentation of the first paragraph ++% after a section heading. If WORD is `insert', then do indent at such ++% paragraphs. ++% ++% The paragraph indentation is suppressed or not by calling ++% \suppressfirstparagraphindent, which the sectioning commands do. ++% We switch the definition of this back and forth according to WORD. ++% By default, we suppress indentation. ++% ++\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} ++\def\insertword{insert} ++% ++\parseargdef\firstparagraphindent{% ++ \def\temp{#1}% ++ \ifx\temp\noneword ++ \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent ++ \else\ifx\temp\insertword ++ \let\suppressfirstparagraphindent = \relax ++ \else ++ \errhelp = \EMsimple ++ \errmessage{Unknown @firstparagraphindent option `\temp'}% ++ \fi\fi ++} ++ ++% Here is how we actually suppress indentation. Redefine \everypar to ++% \kern backwards by \parindent, and then reset itself to empty. ++% ++% We also make \indent itself not actually do anything until the next ++% paragraph. ++% ++\gdef\dosuppressfirstparagraphindent{% ++ \gdef\indent{% ++ \restorefirstparagraphindent ++ \indent ++ }% ++ \gdef\noindent{% ++ \restorefirstparagraphindent ++ \noindent ++ }% ++ \global\everypar = {% ++ \kern -\parindent ++ \restorefirstparagraphindent ++ }% ++} ++ ++\gdef\restorefirstparagraphindent{% ++ \global \let \indent = \ptexindent ++ \global \let \noindent = \ptexnoindent ++ \global \everypar = {}% ++} ++ ++ + % @asis just yields its argument. Used with @table, for example. + % + \def\asis#1{#1} + +-% @math means output in math mode. +-% We don't use $'s directly in the definition of \math because control +-% sequences like \math are expanded when the toc file is written. Then, +-% we read the toc file back, the $'s will be normal characters (as they +-% should be, according to the definition of Texinfo). So we must use a +-% control sequence to switch into and out of math mode. ++% @math outputs its argument in math mode. + % +-% This isn't quite enough for @math to work properly in indices, but it +-% seems unlikely it will ever be needed there. ++% One complication: _ usually means subscripts, but it could also mean ++% an actual _ character, as in @math{@var{some_variable} + 1}. So make ++% _ active, and distinguish by seeing if the current family is \slfam, ++% which is what @var uses. ++{ ++ \catcode`\_ = \active ++ \gdef\mathunderscore{% ++ \catcode`\_=\active ++ \def_{\ifnum\fam=\slfam \_\else\sb\fi}% ++ } ++} ++% Another complication: we want \\ (and @\) to output a \ character. ++% FYI, plain.tex uses \\ as a temporary control sequence (why?), but ++% this is not advertised and we don't care. Texinfo does not ++% otherwise define @\. + % +-\let\implicitmath = $ +-\def\math#1{\implicitmath #1\implicitmath} ++% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. ++\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} ++% ++\def\math{% ++ \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). ++% ++{ ++ \catcode`^ = \active ++ \catcode`< = \active ++ \catcode`> = \active ++ \catcode`+ = \active ++ \gdef\mathactive{% ++ \let^ = \ptexhat ++ \let< = \ptexless ++ \let> = \ptexgtr ++ \let+ = \ptexplus ++ } ++} ++ ++% Some math mode symbols. ++\def\bullet{$\ptexbullet$} ++\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 ++% typewriter fonts as three actual period characters; on the other hand, ++% in other typewriter fonts three periods are wider than 1.5em. So do ++% whichever is larger. ++% ++\def\dots{% ++ \leavevmode ++ \setbox0=\hbox{...}% get width of three periods ++ \ifdim\wd0 > 1.5em ++ \dimen0 = \wd0 ++ \else ++ \dimen0 = 1.5em ++ \fi ++ \hbox to \dimen0{% ++ \hskip 0pt plus.25fil ++ .\hskip 0pt plus1fil ++ .\hskip 0pt plus1fil ++ .\hskip 0pt plus.5fil ++ }% ++} ++ ++% @enddots{} is an end-of-sentence ellipsis. ++% ++\def\enddots{% ++ \dots ++ \spacefactor=\endofsentencespacefactor ++} ++ ++% @comma{} is so commas can be inserted into text without messing up ++% Texinfo's parsing. ++% ++\let\comma = , + + % @refill is a no-op. + \let\refill=\relax +@@ -815,20 +1204,20 @@ where each line of input produces a line + % 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{% ++ \fixbackslash % Turn off hack to swallow `\input texinfo'. + \iflinks +- \readauxfile ++ \tryauxfile ++ % Open the new aux file. TeX will close it automatically at exit. ++ \immediate\openout\auxfile=\jobname.aux + \fi % \openindices needs to do some work in any case. + \openindices +- \fixbackslash % Turn off hack to swallow `\input texinfo'. +- \global\let\setfilename=\comment % Ignore extra @setfilename cmds. ++ \let\setfilename=\comment % Ignore extra @setfilename cmds. + % + % If texinfo.cnf is present on the system, read it. + % Useful for site-wide @afourpaper, etc. +- % Just to be on the safe side, close the input stream before the \input. + \openin 1 texinfo.cnf +- \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi +- \closein1 +- \temp ++ \ifeof 1 \else \input texinfo.cnf \fi ++ \closein 1 + % + \comment % Ignore the actual filename. + } +@@ -864,111 +1253,294 @@ where each line of input produces a line + \newif\ifpdf + \newif\ifpdfmakepagedest + ++% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 ++% can be set). So we test for \relax and 0 as well as \undefined, ++% borrowed from ifpdf.sty. + \ifx\pdfoutput\undefined +- \pdffalse +- \let\pdfmkdest = \gobble +- \let\pdfurl = \gobble +- \let\endlink = \relax +- \let\linkcolor = \relax +- \let\pdfmakeoutlines = \relax + \else +- \pdftrue +- \pdfoutput = 1 +- \input pdfcolor ++ \ifx\pdfoutput\relax ++ \else ++ \ifcase\pdfoutput ++ \else ++ \pdftrue ++ \fi ++ \fi ++\fi ++ ++% PDF uses PostScript string constants for the names of xref targets, ++% for display in the outlines, and in other places. Thus, we have to ++% double any backslashes. Otherwise, a name like "\node" will be ++% interpreted as a newline (\n), followed by o, d, e. Not good. ++% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html ++% (and related messages, the final outcome is that it is up to the TeX ++% user to double the backslashes and otherwise make the string valid, so ++% that's what we do). ++ ++% double active backslashes. ++% ++{\catcode`\@=0 \catcode`\\=\active ++ @gdef@activebackslashdouble{% ++ @catcode`@\=@active ++ @let\=@doublebackslash} ++} ++ ++% To handle parens, we must adopt a different approach, since parens are ++% not active characters. hyperref.dtx (which has the same problem as ++% 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% ++ \ifx\\##2\\% ++ \else ++ #2% ++ \HyReturnAfterFi{% ++ \HyPsdReplace##2\END ++ }% ++ \fi ++ }% ++ \xdef#3{\expandafter\HyPsdReplace#3#1\END}% ++} ++\long\def\HyReturnAfterFi#1\fi{\fi#1} ++ ++% #1 is a control sequence in which to do the replacements. ++\def\backslashparens#1{% ++ \xdef#1{#1}% redefine it as its expansion; the definition is simply ++ % \lastnode when called from \setref -> \pdfmkdest. ++ \HyPsdSubst{(}{\realbackslash(}{#1}% ++ \HyPsdSubst{)}{\realbackslash)}{#1}% ++} ++ ++\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images ++with PDF output, and none of those formats could be found. (.eps cannot ++be supported due to the design of the PDF format; use regular TeX (DVI ++output) for that.)} ++ ++\ifpdf ++ % ++ % Color manipulation macros based on pdfcolor.tex. ++ \def\cmykDarkRed{0.28 1 1 0.35} ++ \def\cmykBlack{0 0 0 1} ++ % ++ \def\pdfsetcolor#1{\pdfliteral{#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). + \def\dopdfimage#1#2#3{% +- \def\imagewidth{#2}% +- \def\imageheight{#3}% ++ \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% ++ \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% ++ % ++ % pdftex (and the PDF format) support .png, .jpg, .pdf (among ++ % others). Let's try in that order. ++ \let\pdfimgext=\empty ++ \begingroup ++ \openin 1 #1.png \ifeof 1 ++ \openin 1 #1.jpg \ifeof 1 ++ \openin 1 #1.jpeg \ifeof 1 ++ \openin 1 #1.JPG \ifeof 1 ++ \openin 1 #1.pdf \ifeof 1 ++ \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}% ++ \fi ++ \else \gdef\pdfimgext{jpeg}% ++ \fi ++ \else \gdef\pdfimgext{jpg}% ++ \fi ++ \else \gdef\pdfimgext{png}% ++ \fi ++ \closein 1 ++ \endgroup ++ % ++ % 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 ++ \immediate\pdfimage + \else +- \pdfximage ++ \immediate\pdfximage + \fi +- \ifx\empty\imagewidth\else width \imagewidth \fi +- \ifx\empty\imageheight\else height \imageheight \fi +- {#1.pdf}% ++ \ifdim \wd0 >0pt width \imagewidth \fi ++ \ifdim \wd2 >0pt height \imageheight \fi ++ \ifnum\pdftexversion<13 ++ #1.\pdfimgext ++ \else ++ {#1.\pdfimgext}% ++ \fi + \ifnum\pdftexversion < 14 \else + \pdfrefximage \pdflastximage + \fi} +- \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 ++ % such as \, aren't expanded when present in a section title. ++ \indexnofonts ++ \turnoffactive ++ \activebackslashdouble ++ \makevalueexpandable ++ \def\pdfdestname{#1}% ++ \backslashparens\pdfdestname ++ \safewhatsit{\pdfdest name{\pdfdestname} xyz}% ++ }} ++ % ++ % used to mark target names; must be expandable. ++ \def\pdfmkpgn#1{#1} ++ % ++ % by default, use a color that is dark enough to print on paper as ++ % nearly black, but still distinguishable for online viewing. ++ \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 + \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% + \else \csname#1\endcsname \fi} + \def\advancenumber#1{\tempnum=\expnumber{#1}\relax +- \advance\tempnum by1 ++ \advance\tempnum by 1 + \expandafter\xdef\csname#1\endcsname{\the\tempnum}} +- \def\pdfmakeoutlines{{% +- \openin 1 \jobname.toc +- \ifeof 1\else\bgroup +- \closein 1 +- \indexnofonts +- \def\tt{} +- % thanh's hack / proper braces in bookmarks +- \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace +- \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace +- % +- \def\chapentry ##1##2##3{} +- \def\unnumbchapentry ##1##2{} +- \def\secentry ##1##2##3##4{\advancenumber{chap##2}} +- \def\unnumbsecentry ##1##2{} +- \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}} +- \def\unnumbsubsecentry ##1##2{} +- \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}} +- \def\unnumbsubsubsecentry ##1##2{} +- \input \jobname.toc +- \def\chapentry ##1##2##3{% +- \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}} +- \def\unnumbchapentry ##1##2{% +- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} +- \def\secentry ##1##2##3##4{% +- \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}} +- \def\unnumbsecentry ##1##2{% +- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} +- \def\subsecentry ##1##2##3##4##5{% +- \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}} +- \def\unnumbsubsecentry ##1##2{% +- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} +- \def\subsubsecentry ##1##2##3##4##5##6{% +- \pdfoutline goto name{\pdfmkpgn{##6}}{##1}} +- \def\unnumbsubsubsecentry ##1##2{% +- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} +- \input \jobname.toc +- \egroup\fi +- }} +- \def\makelinks #1,{% +- \def\params{#1}\def\E{END}% +- \ifx\params\E +- \let\nextmakelinks=\relax ++ % ++ % #1 is the section text, which is what will be displayed in the ++ % outline by the pdf viewer. #2 is the pdf expression for the number ++ % of subentries (or empty, for subsubsections). #3 is the node text, ++ % which might be empty if this toc entry had no corresponding node. ++ % #4 is the page number ++ % ++ \def\dopdfoutline#1#2#3#4{% ++ % Generate a link to the node text if that exists; else, use the ++ % page number. We could generate a destination for the section ++ % text in the case where a section has no node, but it doesn't ++ % seem worth the trouble, since most documents are normally structured. ++ \def\pdfoutlinedest{#3}% ++ \ifx\pdfoutlinedest\empty ++ \def\pdfoutlinedest{#4}% + \else +- \let\nextmakelinks=\makelinks +- \ifnum\lnkcount>0,\fi +- \picknum{#1}% +- \startlink attr{/Border [0 0 0]} +- goto name{\pdfmkpgn{\the\pgn}}% +- \linkcolor #1% +- \advance\lnkcount by 1% +- \endlink ++ % Doubled backslashes in the name. ++ {\activebackslashdouble \xdef\pdfoutlinedest{#3}% ++ \backslashparens\pdfoutlinedest}% + \fi +- \nextmakelinks ++ % ++ % Also double the backslashes in the display string. ++ {\activebackslashdouble \xdef\pdfoutlinetext{#1}% ++ \backslashparens\pdfoutlinetext}% ++ % ++ \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% + } +- \def\picknum#1{\expandafter\pn#1} +- \def\pn#1{% +- \def\p{#1}% +- \ifx\p\lbrace +- \let\nextpn=\ppn +- \else +- \let\nextpn=\ppnn +- \def\first{#1} +- \fi +- \nextpn ++ % ++ \def\pdfmakeoutlines{% ++ \begingroup ++ % Thanh's hack / proper braces in bookmarks ++ \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace ++ \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace ++ % ++ % Read toc silently, to get counts of subentries for \pdfoutline. ++ \def\numchapentry##1##2##3##4{% ++ \def\thischapnum{##2}% ++ \def\thissecnum{0}% ++ \def\thissubsecnum{0}% ++ }% ++ \def\numsecentry##1##2##3##4{% ++ \advancenumber{chap\thischapnum}% ++ \def\thissecnum{##2}% ++ \def\thissubsecnum{0}% ++ }% ++ \def\numsubsecentry##1##2##3##4{% ++ \advancenumber{sec\thissecnum}% ++ \def\thissubsecnum{##2}% ++ }% ++ \def\numsubsubsecentry##1##2##3##4{% ++ \advancenumber{subsec\thissubsecnum}% ++ }% ++ \def\thischapnum{0}% ++ \def\thissecnum{0}% ++ \def\thissubsecnum{0}% ++ % ++ % use \def rather than \let here because we redefine \chapentry et ++ % al. a second time, below. ++ \def\appentry{\numchapentry}% ++ \def\appsecentry{\numsecentry}% ++ \def\appsubsecentry{\numsubsecentry}% ++ \def\appsubsubsecentry{\numsubsubsecentry}% ++ \def\unnchapentry{\numchapentry}% ++ \def\unnsecentry{\numsecentry}% ++ \def\unnsubsecentry{\numsubsecentry}% ++ \def\unnsubsubsecentry{\numsubsubsecentry}% ++ \readdatafile{toc}% ++ % ++ % Read toc second time, this time actually producing the outlines. ++ % The `-' means take the \expnumber as the absolute number of ++ % subentries, which we calculated on our first read of the .toc above. ++ % ++ % We use the node names as the destinations. ++ \def\numchapentry##1##2##3##4{% ++ \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% ++ \def\numsecentry##1##2##3##4{% ++ \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% ++ \def\numsubsecentry##1##2##3##4{% ++ \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% ++ \def\numsubsubsecentry##1##2##3##4{% count is always zero ++ \dopdfoutline{##1}{}{##3}{##4}}% ++ % ++ % PDF outlines are displayed using system fonts, instead of ++ % document fonts. Therefore we cannot use special characters, ++ % since the encoding is unknown. For example, the eogonek from ++ % Latin 2 (0xea) gets translated to a | character. Info from ++ % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. ++ % ++ % xx to do this right, we have to translate 8-bit characters to ++ % their "best" equivalent, based on the @documentencoding. Right ++ % now, I guess we'll just let the pdf reader have its way. ++ \indexnofonts ++ \setupdatafile ++ \catcode`\\=\active \otherbackslash ++ \input \tocreadfilename ++ \endgroup + } +- \def\ppn#1{\pgn=#1\gobble} +- \def\ppnn{\pgn=\first} +- \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,} +- \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} ++ % + \def\skipspaces#1{\def\PP{#1}\def\D{|}% + \ifx\PP\D\let\nextsp\relax + \else\let\nextsp\skipspaces +@@ -983,24 +1555,32 @@ where each line of input produces a line + \else + \let \startlink \pdfstartlink + \fi ++ % make a live url in pdf output. + \def\pdfurl#1{% + \begingroup +- \normalturnoffactive\def\@{@}% +- \leavevmode\Red ++ % it seems we really need yet another set of dummies; have not ++ % 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\setcolor{\urlcolor}% + \startlink attr{/Border [0 0 0]}% + user{/Subtype /Link /A << /S /URI /URI (#1) >>}% +- % #1 + \endgroup} + \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} + \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} + \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} + \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} + \def\maketoks{% +- \expandafter\poptoks\the\toksA|ENDTOKS| ++ \expandafter\poptoks\the\toksA|ENDTOKS|\relax + \ifx\first0\adn0 + \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 + \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 +- \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 ++ \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 + \else + \ifnum0=\countA\else\makelink\fi + \ifx\first.\let\next=\done\else +@@ -1013,33 +1593,348 @@ where each line of input produces a line + \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}} +- \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 ++ \let\pdfmkdest = \gobble ++ \let\pdfurl = \gobble ++ \let\endlink = \relax ++ \let\setcolor = \gobble ++ \let\pdfsetcolor = \gobble ++ \let\pdfmakeoutlines = \relax ++\fi % \ifx\pdfoutput + + + \message{fonts,} +-% Font-change commands. ++ ++% Change the current font style to #1, remembering it in \curfontstyle. ++% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in ++% italics, not bold italics. ++% ++\def\setfontstyle#1{% ++ \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. ++ \csname ten#1\endcsname % change the current font ++} ++ ++% Select #1 fonts with the current style. ++% ++\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} ++ ++\def\rm{\fam=0 \setfontstyle{rm}} ++\def\it{\fam=\itfam \setfontstyle{it}} ++\def\sl{\fam=\slfam \setfontstyle{sl}} ++\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} ++\def\tt{\fam=\ttfam \setfontstyle{tt}} + + % 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. ++% So we set up a \sf. + \newfam\sffam +-\def\sf{\fam=\sffam \tensf} ++\def\sf{\fam=\sffam \setfontstyle{sf}} + \let\li = \sf % Sometimes we call it \li, not \sf. + +-% We don't need math for this one. +-\def\ttsl{\tenttsl} ++% We don't need math for this font style. ++\def\ttsl{\setfontstyle{ttsl}} ++ ++ ++% Default leading. ++\newdimen\textleading \textleading = 13.2pt ++ ++% Set the baselineskip to #1, and the lineskip and strut size ++% correspondingly. There is no deep meaning behind these magic numbers ++% used as factors; they just match (closely enough) what Knuth defined. ++% ++\def\lineskipfactor{.08333} ++\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{% ++ \dimen0 = #1\relax ++ \normalbaselineskip = \baselinefactor\dimen0 ++ \normallineskip = \lineskipfactor\normalbaselineskip ++ \normalbaselines ++ \setbox\strutbox =\hbox{% ++ \vrule width0pt height\strutheightpercent\baselineskip ++ depth \strutdepthpercent \baselineskip ++ }% ++} ++ ++% PDF CMaps. See also LaTeX's t1.cmap. ++% ++% 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 ++%%DocumentNeededResources: ProcSet (CIDInit) ++%%IncludeResource: ProcSet (CIDInit) ++%%BeginResource: CMap (TeX-OT1-0) ++%%Title: (TeX-OT1-0 TeX OT1 0) ++%%Version: 1.000 ++%%EndComments ++/CIDInit /ProcSet findresource begin ++12 dict begin ++begincmap ++/CIDSystemInfo ++<< /Registry (TeX) ++/Ordering (OT1) ++/Supplement 0 ++>> def ++/CMapName /TeX-OT1-0 def ++/CMapType 2 def ++1 begincodespacerange ++<00> <7F> ++endcodespacerange ++8 beginbfrange ++<00> <01> <0393> ++<09> <0A> <03A8> ++<23> <26> <0023> ++<28> <3B> <0028> ++<3F> <5B> <003F> ++<5D> <5E> <005D> ++<61> <7A> <0061> ++<7B> <7C> <2013> ++endbfrange ++40 beginbfchar ++<02> <0398> ++<03> <039B> ++<04> <039E> ++<05> <03A0> ++<06> <03A3> ++<07> <03D2> ++<08> <03A6> ++<0B> <00660066> ++<0C> <00660069> ++<0D> <0066006C> ++<0E> <006600660069> ++<0F> <00660066006C> ++<10> <0131> ++<11> <0237> ++<12> <0060> ++<13> <00B4> ++<14> <02C7> ++<15> <02D8> ++<16> <00AF> ++<17> <02DA> ++<18> <00B8> ++<19> <00DF> ++<1A> <00E6> ++<1B> <0153> ++<1C> <00F8> ++<1D> <00C6> ++<1E> <0152> ++<1F> <00D8> ++<21> <0021> ++<22> <201D> ++<27> <2019> ++<3C> <00A1> ++<3D> <003D> ++<3E> <00BF> ++<5C> <201C> ++<5F> <02D9> ++<60> <2018> ++<7D> <02DD> ++<7E> <007E> ++<7F> <00A8> ++endbfchar ++endcmap ++CMapName currentdict /CMap defineresource pop ++end ++end ++%%EndResource ++%%EOF ++ }\endgroup ++ \expandafter\edef\csname cmapOT1\endcsname#1{% ++ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% ++ }% ++% ++% \cmapOT1IT ++ \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 ++%%DocumentNeededResources: ProcSet (CIDInit) ++%%IncludeResource: ProcSet (CIDInit) ++%%BeginResource: CMap (TeX-OT1IT-0) ++%%Title: (TeX-OT1IT-0 TeX OT1IT 0) ++%%Version: 1.000 ++%%EndComments ++/CIDInit /ProcSet findresource begin ++12 dict begin ++begincmap ++/CIDSystemInfo ++<< /Registry (TeX) ++/Ordering (OT1IT) ++/Supplement 0 ++>> def ++/CMapName /TeX-OT1IT-0 def ++/CMapType 2 def ++1 begincodespacerange ++<00> <7F> ++endcodespacerange ++8 beginbfrange ++<00> <01> <0393> ++<09> <0A> <03A8> ++<25> <26> <0025> ++<28> <3B> <0028> ++<3F> <5B> <003F> ++<5D> <5E> <005D> ++<61> <7A> <0061> ++<7B> <7C> <2013> ++endbfrange ++42 beginbfchar ++<02> <0398> ++<03> <039B> ++<04> <039E> ++<05> <03A0> ++<06> <03A3> ++<07> <03D2> ++<08> <03A6> ++<0B> <00660066> ++<0C> <00660069> ++<0D> <0066006C> ++<0E> <006600660069> ++<0F> <00660066006C> ++<10> <0131> ++<11> <0237> ++<12> <0060> ++<13> <00B4> ++<14> <02C7> ++<15> <02D8> ++<16> <00AF> ++<17> <02DA> ++<18> <00B8> ++<19> <00DF> ++<1A> <00E6> ++<1B> <0153> ++<1C> <00F8> ++<1D> <00C6> ++<1E> <0152> ++<1F> <00D8> ++<21> <0021> ++<22> <201D> ++<23> <0023> ++<24> <00A3> ++<27> <2019> ++<3C> <00A1> ++<3D> <003D> ++<3E> <00BF> ++<5C> <201C> ++<5F> <02D9> ++<60> <2018> ++<7D> <02DD> ++<7E> <007E> ++<7F> <00A8> ++endbfchar ++endcmap ++CMapName currentdict /CMap defineresource pop ++end ++end ++%%EndResource ++%%EOF ++ }\endgroup ++ \expandafter\edef\csname cmapOT1IT\endcsname#1{% ++ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% ++ }% ++% ++% \cmapOT1TT ++ \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 ++%%DocumentNeededResources: ProcSet (CIDInit) ++%%IncludeResource: ProcSet (CIDInit) ++%%BeginResource: CMap (TeX-OT1TT-0) ++%%Title: (TeX-OT1TT-0 TeX OT1TT 0) ++%%Version: 1.000 ++%%EndComments ++/CIDInit /ProcSet findresource begin ++12 dict begin ++begincmap ++/CIDSystemInfo ++<< /Registry (TeX) ++/Ordering (OT1TT) ++/Supplement 0 ++>> def ++/CMapName /TeX-OT1TT-0 def ++/CMapType 2 def ++1 begincodespacerange ++<00> <7F> ++endcodespacerange ++5 beginbfrange ++<00> <01> <0393> ++<09> <0A> <03A8> ++<21> <26> <0021> ++<28> <5F> <0028> ++<61> <7E> <0061> ++endbfrange ++32 beginbfchar ++<02> <0398> ++<03> <039B> ++<04> <039E> ++<05> <03A0> ++<06> <03A3> ++<07> <03D2> ++<08> <03A6> ++<0B> <2191> ++<0C> <2193> ++<0D> <0027> ++<0E> <00A1> ++<0F> <00BF> ++<10> <0131> ++<11> <0237> ++<12> <0060> ++<13> <00B4> ++<14> <02C7> ++<15> <02D8> ++<16> <00AF> ++<17> <02DA> ++<18> <00B8> ++<19> <00DF> ++<1A> <00E6> ++<1B> <0153> ++<1C> <00F8> ++<1D> <00C6> ++<1E> <0152> ++<1F> <00D8> ++<20> <2423> ++<27> <2019> ++<60> <2018> ++<7F> <00A8> ++endbfchar ++endcmap ++CMapName currentdict /CMap defineresource pop ++end ++end ++%%EndResource ++%%EOF ++ }\endgroup ++ \expandafter\edef\csname cmapOT1TT\endcsname#1{% ++ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% ++ }% ++\fi\fi + +-% Use Computer Modern fonts at \magstephalf (11pt). +-\newcount\mainmagstep +-\mainmagstep=\magstephalf + + % Set the font macro #1 to the font named #2, adding on the + % specified font prefix (normally `cm'). +-% #3 is the font's design size, #4 is a scale factor +-\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} ++% #3 is the font's design size, #4 is a scale factor, #5 is the CMap ++% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass ++% empty to omit). ++\def\setfont#1#2#3#4#5{% ++ \font#1=\fontprefix#2#3 scaled #4 ++ \csname cmap#5\endcsname#1% ++} ++% 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 +1959,409 @@ where each line of input produces a line + \def\scshape{csc} + \def\scbshape{csc} + +-\ifx\bigger\relax +-\let\mainmagstep=\magstep1 +-\setfont\textrm\rmshape{12}{1000} +-\setfont\texttt\ttshape{12}{1000} +-\else +-\setfont\textrm\rmshape{10}{\mainmagstep} +-\setfont\texttt\ttshape{10}{\mainmagstep} +-\fi +-% Instead of cmb10, you many want to use cmbx10. +-% cmbx10 is a prettier font on its own, but cmb10 +-% looks better when embedded in a line with cmr10. +-\setfont\textbf\bfshape{10}{\mainmagstep} +-\setfont\textit\itshape{10}{\mainmagstep} +-\setfont\textsl\slshape{10}{\mainmagstep} +-\setfont\textsf\sfshape{10}{\mainmagstep} +-\setfont\textsc\scshape{10}{\mainmagstep} +-\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} ++\edef\mainmagstep{\magstephalf} ++\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} ++\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} ++\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} ++\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} ++\setfont\textsl\slshape{10}{\mainmagstep}{OT1} ++\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} ++\setfont\textsc\scshape{10}{\mainmagstep}{OT1} ++\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 +-\setfont\deftt\ttshape{10}{\magstep1} +-\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} ++% A few fonts for @defun names and args. ++\setfont\defbf\bfshape{10}{\magstep1}{OT1} ++\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} ++\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} ++\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} + + % Fonts for indices, footnotes, small examples (9pt). +-\setfont\smallrm\rmshape{9}{1000} +-\setfont\smalltt\ttshape{9}{1000} +-\setfont\smallbf\bfshape{10}{900} +-\setfont\smallit\itshape{9}{1000} +-\setfont\smallsl\slshape{9}{1000} +-\setfont\smallsf\sfshape{9}{1000} +-\setfont\smallsc\scshape{10}{900} +-\setfont\smallttsl\ttslshape{10}{900} ++\def\smallnominalsize{9pt} ++\setfont\smallrm\rmshape{9}{1000}{OT1} ++\setfont\smalltt\ttshape{9}{1000}{OT1TT} ++\setfont\smallbf\bfshape{10}{900}{OT1} ++\setfont\smallit\itshape{9}{1000}{OT1IT} ++\setfont\smallsl\slshape{9}{1000}{OT1} ++\setfont\smallsf\sfshape{9}{1000}{OT1} ++\setfont\smallsc\scshape{10}{900}{OT1} ++\setfont\smallttsl\ttslshape{10}{900}{OT1TT} + \font\smalli=cmmi9 + \font\smallsy=cmsy9 ++\def\smallecsize{0900} + +-% Fonts for title page: +-\setfont\titlerm\rmbshape{12}{\magstep3} +-\setfont\titleit\itbshape{10}{\magstep4} +-\setfont\titlesl\slbshape{10}{\magstep4} +-\setfont\titlett\ttbshape{12}{\magstep3} +-\setfont\titlettsl\ttslshape{10}{\magstep4} +-\setfont\titlesf\sfbshape{17}{\magstep1} ++% Fonts for small examples (8pt). ++\def\smallernominalsize{8pt} ++\setfont\smallerrm\rmshape{8}{1000}{OT1} ++\setfont\smallertt\ttshape{8}{1000}{OT1TT} ++\setfont\smallerbf\bfshape{10}{800}{OT1} ++\setfont\smallerit\itshape{8}{1000}{OT1IT} ++\setfont\smallersl\slshape{8}{1000}{OT1} ++\setfont\smallersf\sfshape{8}{1000}{OT1} ++\setfont\smallersc\scshape{10}{800}{OT1} ++\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} ++\font\smalleri=cmmi8 ++\font\smallersy=cmsy8 ++\def\smallerecsize{0800} ++ ++% Fonts for title page (20.4pt): ++\def\titlenominalsize{20pt} ++\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} ++\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} ++\setfont\titlesl\slbshape{10}{\magstep4}{OT1} ++\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} ++\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} ++\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} + \let\titlebf=\titlerm +-\setfont\titlesc\scbshape{10}{\magstep4} ++\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 (and unnumbered) fonts (17.28pt). +-\setfont\chaprm\rmbshape{12}{\magstep2} +-\setfont\chapit\itbshape{10}{\magstep3} +-\setfont\chapsl\slbshape{10}{\magstep3} +-\setfont\chaptt\ttbshape{12}{\magstep2} +-\setfont\chapttsl\ttslshape{10}{\magstep3} +-\setfont\chapsf\sfbshape{17}{1000} ++\def\chapnominalsize{17pt} ++\setfont\chaprm\rmbshape{12}{\magstep2}{OT1} ++\setfont\chapit\itbshape{10}{\magstep3}{OT1IT} ++\setfont\chapsl\slbshape{10}{\magstep3}{OT1} ++\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} ++\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} ++\setfont\chapsf\sfbshape{17}{1000}{OT1} + \let\chapbf=\chaprm +-\setfont\chapsc\scbshape{10}{\magstep3} ++\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} +-\setfont\secit\itbshape{10}{\magstep2} +-\setfont\secsl\slbshape{10}{\magstep2} +-\setfont\sectt\ttbshape{12}{\magstep1} +-\setfont\secttsl\ttslshape{10}{\magstep2} +-\setfont\secsf\sfbshape{12}{\magstep1} ++\def\secnominalsize{14pt} ++\setfont\secrm\rmbshape{12}{\magstep1}{OT1} ++\setfont\secit\itbshape{10}{\magstep2}{OT1IT} ++\setfont\secsl\slbshape{10}{\magstep2}{OT1} ++\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} ++\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} ++\setfont\secsf\sfbshape{12}{\magstep1}{OT1} + \let\secbf\secrm +-\setfont\secsc\scbshape{10}{\magstep2} ++\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} +-% \setfont\ssectt\ttshape{10}{\magstep1} +-% \setfont\ssecsf\sfshape{10}{\magstep1} +- +-%\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx. +-%\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than +-%\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1. +-%\setfont\ssectt\ttshape{10}{1315} +-%\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} +-\setfont\ssecsl\slbshape{10}{1315} +-\setfont\ssectt\ttbshape{12}{\magstephalf} +-\setfont\ssecttsl\ttslshape{10}{1315} +-\setfont\ssecsf\sfbshape{12}{\magstephalf} ++\def\ssecnominalsize{13pt} ++\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} ++\setfont\ssecit\itbshape{10}{1315}{OT1IT} ++\setfont\ssecsl\slbshape{10}{1315}{OT1} ++\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} ++\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} ++\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} + \let\ssecbf\ssecrm +-\setfont\ssecsc\scbshape{10}{\magstep1} ++\setfont\ssecsc\scbshape{10}{1315}{OT1} + \font\sseci=cmmi12 scaled \magstephalf + \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} ++\setfont\reducedrm\rmshape{10}{1000}{OT1} ++\setfont\reducedtt\ttshape{10}{1000}{OT1TT} ++\setfont\reducedbf\bfshape{10}{1000}{OT1} ++\setfont\reducedit\itshape{10}{1000}{OT1IT} ++\setfont\reducedsl\slshape{10}{1000}{OT1} ++\setfont\reducedsf\sfshape{10}{1000}{OT1} ++\setfont\reducedsc\scshape{10}{1000}{OT1} ++\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} ++\font\reducedi=cmmi10 ++\font\reducedsy=cmsy10 ++\def\reducedecsize{1000} ++ ++% reset the current fonts ++\textfonts ++\rm ++} % end of 11pt text font size definitions ++ ++ ++% Definitions to make the main text be 10pt Computer Modern, with ++% 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} ++\edef\mainmagstep{1000} ++\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} ++\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} ++\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} ++\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} ++\setfont\textsl\slshape{10}{\mainmagstep}{OT1} ++\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} ++\setfont\textsc\scshape{10}{\mainmagstep}{OT1} ++\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} ++\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} ++\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} ++\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} ++ ++% Fonts for indices, footnotes, small examples (9pt). ++\def\smallnominalsize{9pt} ++\setfont\smallrm\rmshape{9}{1000}{OT1} ++\setfont\smalltt\ttshape{9}{1000}{OT1TT} ++\setfont\smallbf\bfshape{10}{900}{OT1} ++\setfont\smallit\itshape{9}{1000}{OT1IT} ++\setfont\smallsl\slshape{9}{1000}{OT1} ++\setfont\smallsf\sfshape{9}{1000}{OT1} ++\setfont\smallsc\scshape{10}{900}{OT1} ++\setfont\smallttsl\ttslshape{10}{900}{OT1TT} ++\font\smalli=cmmi9 ++\font\smallsy=cmsy9 ++\def\smallecsize{0900} ++ ++% Fonts for small examples (8pt). ++\def\smallernominalsize{8pt} ++\setfont\smallerrm\rmshape{8}{1000}{OT1} ++\setfont\smallertt\ttshape{8}{1000}{OT1TT} ++\setfont\smallerbf\bfshape{10}{800}{OT1} ++\setfont\smallerit\itshape{8}{1000}{OT1IT} ++\setfont\smallersl\slshape{8}{1000}{OT1} ++\setfont\smallersf\sfshape{8}{1000}{OT1} ++\setfont\smallersc\scshape{10}{800}{OT1} ++\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} ++\font\smalleri=cmmi8 ++\font\smallersy=cmsy8 ++\def\smallerecsize{0800} ++ ++% Fonts for title page (20.4pt): ++\def\titlenominalsize{20pt} ++\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} ++\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} ++\setfont\titlesl\slbshape{10}{\magstep4}{OT1} ++\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} ++\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} ++\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} ++\let\titlebf=\titlerm ++\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} ++\setfont\chaprm\rmbshape{12}{\magstep1}{OT1} ++\setfont\chapit\itbshape{10}{\magstep2}{OT1IT} ++\setfont\chapsl\slbshape{10}{\magstep2}{OT1} ++\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} ++\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} ++\setfont\chapsf\sfbshape{12}{\magstep1}{OT1} ++\let\chapbf\chaprm ++\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} ++\setfont\secrm\rmbshape{12}{1000}{OT1} ++\setfont\secit\itbshape{10}{\magstep1}{OT1IT} ++\setfont\secsl\slbshape{10}{\magstep1}{OT1} ++\setfont\sectt\ttbshape{12}{1000}{OT1TT} ++\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} ++\setfont\secsf\sfbshape{12}{1000}{OT1} ++\let\secbf\secrm ++\setfont\secsc\scbshape{10}{\magstep1}{OT1} ++\font\seci=cmmi12 ++\font\secsy=cmsy10 scaled \magstep1 ++\def\sececsize{1200} ++ ++% Subsection fonts (10pt). ++\def\ssecnominalsize{10pt} ++\setfont\ssecrm\rmbshape{10}{1000}{OT1} ++\setfont\ssecit\itbshape{10}{1000}{OT1IT} ++\setfont\ssecsl\slbshape{10}{1000}{OT1} ++\setfont\ssectt\ttbshape{10}{1000}{OT1TT} ++\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} ++\setfont\ssecsf\sfbshape{10}{1000}{OT1} ++\let\ssecbf\ssecrm ++\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} ++\setfont\reducedrm\rmshape{9}{1000}{OT1} ++\setfont\reducedtt\ttshape{9}{1000}{OT1TT} ++\setfont\reducedbf\bfshape{10}{900}{OT1} ++\setfont\reducedit\itshape{9}{1000}{OT1IT} ++\setfont\reducedsl\slshape{9}{1000}{OT1} ++\setfont\reducedsf\sfshape{9}{1000}{OT1} ++\setfont\reducedsc\scshape{10}{900}{OT1} ++\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} ++\font\reducedi=cmmi9 ++\font\reducedsy=cmsy9 ++\def\reducedecsize{0900} ++ ++% reduce space between paragraphs ++\divide\parskip by 2 ++ ++% reset the current fonts ++\textfonts ++\rm ++} % end of 10pt text font size definitions ++ ++ ++% 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} ++% ++\parseargdef\fonttextsize{% ++ \def\textsizearg{#1}% ++ \wlog{doing @fonttextsize \textsizearg}% ++ % ++ % 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 ++ \else ++ \errhelp=\EMsimple ++ \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} ++ \fi\fi ++ \endgroup ++} ++ + + % In order for the font changes to affect most math symbols and letters, + % we have to define the \textfont of the standard families. Since +-% texinfo doesn't allow for producing subscripts and superscripts, we +-% don't bother to reset \scriptfont and \scriptscriptfont (which would +-% also require loading a lot more fonts). ++% texinfo doesn't allow for producing subscripts and superscripts except ++% in the main text, we don't bother to reset \scriptfont and ++% \scriptscriptfont (which would also require loading a lot more fonts). + % + \def\resetmathfonts{% +- \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy +- \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf +- \textfont\ttfam = \tentt \textfont\sffam = \tensf ++ \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy ++ \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf ++ \textfont\ttfam=\tentt \textfont\sffam=\tensf + } + +- + % The font-changing commands redefine the meanings of \tenSTYLE, instead +-% of just \STYLE. We do this so that font changes will continue to work +-% in math mode, where it is the current \fam that is relevant in most +-% cases, not the current font. Plain TeX does \def\bf{\fam=\bffam +-% \tenbf}, for example. By redefining \tenbf, we obviate the need to +-% redefine \bf itself. ++% of just \STYLE. We do this because \STYLE needs to also set the ++% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire ++% \tenSTYLE to set the current font. ++% ++% Each font-changing command also sets the names \lsize (one size lower) ++% and \lllsize (three sizes lower). These relative commands are used in ++% the LaTeX logo and acronyms. ++% ++% This all needs generalizing, badly. ++% + \def\textfonts{% + \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl + \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc +- \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl +- \resetmathfonts} ++ \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy ++ \let\tenttsl=\textttsl ++ \def\curfontsize{text}% ++ \def\lsize{reduced}\def\lllsize{smaller}% ++ \resetmathfonts \setleading{\textleading}} + \def\titlefonts{% + \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl + \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc + \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy + \let\tenttsl=\titlettsl ++ \def\curfontsize{title}% ++ \def\lsize{chap}\def\lllsize{subsec}% + \resetmathfonts \setleading{25pt}} + \def\titlefont#1{{\titlefonts\rm #1}} + \def\chapfonts{% + \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl + \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc +- \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl ++ \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy ++ \let\tenttsl=\chapttsl ++ \def\curfontsize{chap}% ++ \def\lsize{sec}\def\lllsize{text}% + \resetmathfonts \setleading{19pt}} + \def\secfonts{% + \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl + \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc +- \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl ++ \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy ++ \let\tenttsl=\secttsl ++ \def\curfontsize{sec}% ++ \def\lsize{subsec}\def\lllsize{reduced}% + \resetmathfonts \setleading{16pt}} + \def\subsecfonts{% + \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl + \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc +- \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl ++ \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy ++ \let\tenttsl=\ssecttsl ++ \def\curfontsize{ssec}% ++ \def\lsize{text}\def\lllsize{small}% + \resetmathfonts \setleading{15pt}} +-\let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf? ++\let\subsubsecfonts = \subsecfonts ++\def\reducedfonts{% ++ \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl ++ \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc ++ \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy ++ \let\tenttsl=\reducedttsl ++ \def\curfontsize{reduced}% ++ \def\lsize{small}\def\lllsize{smaller}% ++ \resetmathfonts \setleading{10.5pt}} + \def\smallfonts{% + \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl + \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc + \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy + \let\tenttsl=\smallttsl +- \resetmathfonts \setleading{11pt}} ++ \def\curfontsize{small}% ++ \def\lsize{smaller}\def\lllsize{smaller}% ++ \resetmathfonts \setleading{10.5pt}} ++\def\smallerfonts{% ++ \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl ++ \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc ++ \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy ++ \let\tenttsl=\smallerttsl ++ \def\curfontsize{smaller}% ++ \def\lsize{smaller}\def\lllsize{smaller}% ++ \resetmathfonts \setleading{9.5pt}} ++ ++% Set the fonts to use with the @small... environments. ++\let\smallexamplefonts = \smallfonts ++ ++% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample ++% can fit this many characters: ++% 8.5x11=86 smallbook=72 a4=90 a5=69 ++% If we use \scriptfonts (8pt), then we can fit this many characters: ++% 8.5x11=90+ smallbook=80 a4=90+ a5=77 ++% For me, subjectively, the few extra characters that fit aren't worth ++% the additional smallness of 8pt. So I'm making the default 9pt. ++% ++% 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 ++\definetextfontsizexi + + % Define these so they can be easily changed for other fonts. + \def\angleleft{$\langle$} +@@ -1232,28 +2371,42 @@ where each line of input produces a line + \newcount\fontdepth \fontdepth=0 + + % 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 + + % \smartitalic{ARG} outputs arg in italics, followed by an italic correction + % unless the following character is such as not to need one. +-\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} +-\def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx} +-\def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx} ++\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else ++ \ptexslash\fi\fi\fi} ++\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} ++\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} ++ ++% like \smartslanted except unconditionally uses \ttsl. ++% @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 ++% ttsl for book titles, do we? ++\def\cite#1{{\sl #1}\futurelet\next\smartitalicx} + + \let\i=\smartitalic ++\let\slanted=\smartslanted + \let\var=\smartslanted + \let\dfn=\smartslanted + \let\emph=\smartitalic +-\let\cite=\smartslanted + ++% @b, explicit bold. + \def\b#1{{\bf #1}} + \let\strong=\b + ++% @sansserif, explicit sans. ++\def\sansserif#1{{\sf #1}} ++ + % 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 +2414,30 @@ where each line of input produces a line + \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} + \def\restorehyphenation{\hyphenchar\font = `- } + ++% Set sfcode to normal for the chars that usually have another value. ++% Can't use plain's \frenchspacing because it uses the `\x notation, and ++% sometimes \x has an active definition that messes things up. ++% ++\catcode`@=11 ++ \def\plainfrenchspacing{% ++ \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m ++ \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m ++ \def\endofsentencespacefactor{1000}% for @. and friends ++ } ++ \def\plainnonfrenchspacing{% ++ \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 ++ \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 ++ \def\endofsentencespacefactor{3000}% for @. and friends ++ } ++\catcode`@=\other ++\def\endofsentencespacefactor{3000}% default ++ + \def\t#1{% +- {\tt \rawbackslash \frenchspacing #1}% ++ {\tt \rawbackslash \plainfrenchspacing #1}% + \null + } +-\let\ttfont=\t + \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 +2445,7 @@ where each line of input produces a line + \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} + \def\ctrl #1{{\tt \rawbackslash \hat}#1} +@@ -1300,13 +2471,13 @@ where each line of input produces a line + \nohyphenation + % + \rawbackslash +- \frenchspacing ++ \plainfrenchspacing + #1% + }% + \null + } + +-% We *must* turn on hyphenation at `-' and `_' in \code. ++% We *must* turn on hyphenation at `-' and `_' in @code. + % Otherwise, it is too hard to avoid overfull hboxes + % in the Emacs manual, the Library manual, etc. + +@@ -1316,26 +2487,61 @@ where each line of input produces a line + % and arrange explicitly to hyphenate at a dash. + % -- rms. + { +- \catcode`\-=\active +- \catcode`\_=\active ++ \catcode`\-=\active \catcode`\_=\active ++ \catcode`\'=\active \catcode`\`=\active + % + \global\def\code{\begingroup +- \catcode`\-=\active \let-\codedash +- \catcode`\_=\active \let_\codeunder ++ \catcode\rquoteChar=\active \catcode\lquoteChar=\active ++ \let'\codequoteright \let`\codequoteleft ++ % ++ \catcode\dashChar=\active \catcode\underChar=\active ++ \ifallowcodebreaks ++ \let-\codedash ++ \let_\codeunder ++ \else ++ \let-\realdash ++ \let_\realunder ++ \fi + \codex + } +- % +- % If we end up with any active - characters when handling the index, +- % just treat them as a normal -. +- \global\def\indexbreaks{\catcode`\-=\active \let-\realdash} + } + + \def\realdash{-} + \def\codedash{-\discretionary{}{}{}} +-\def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}} ++\def\codeunder{% ++ % this is all so @math{@code{var_name}+1} can work. In math mode, _ ++ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) ++ % will therefore expand the active definition of _, which is us ++ % (inside @code that is), therefore an endless loop. ++ \ifusingtt{\ifmmode ++ \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. ++ \else\normalunderscore \fi ++ \discretionary{}{}{}}% ++ {\_}% ++} + \def\codex #1{\tclose{#1}\endgroup} + +-%\let\exp=\tclose %Was temporary ++% An additional complication: the above will allow breaks after, e.g., ++% 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} ++\def\keywordfalse{false} ++ ++\parseargdef\allowcodebreaks{% ++ \def\txiarg{#1}% ++ \ifx\txiarg\keywordtrue ++ \allowcodebreakstrue ++ \else\ifx\txiarg\keywordfalse ++ \allowcodebreaksfalse ++ \else ++ \errhelp = \EMsimple ++ \errmessage{Unknown @allowcodebreaks option `\txiarg'}% ++ \fi\fi ++} + + % @kbd is like @code, except that if the argument is just one @key command, + % then @kbd has no effect. +@@ -1343,24 +2549,25 @@ where each line of input produces a line + % @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). +-\def\kbdinputstyle{\parsearg\kbdinputstylexxx} +-\def\kbdinputstylexxx#1{% +- \def\arg{#1}% +- \ifx\arg\worddistinct ++\parseargdef\kbdinputstyle{% ++ \def\txiarg{#1}% ++ \ifx\txiarg\worddistinct + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% +- \else\ifx\arg\wordexample ++ \else\ifx\txiarg\wordexample + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% +- \else\ifx\arg\wordcode ++ \else\ifx\txiarg\wordcode + \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% ++ \else ++ \errhelp = \EMsimple ++ \errmessage{Unknown @kbdinputstyle option `\txiarg'}% + \fi\fi\fi + } + \def\worddistinct{distinct} + \def\wordexample{example} + \def\wordcode{code} + +-% 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.' ++\kbdinputstyle distinct + + \def\xkey{\key} + \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% +@@ -1368,11 +2575,18 @@ where each line of input produces a line + \else{\tclose{\kbdfont\look}}\fi + \else{\tclose{\kbdfont\look}}\fi} + +-% For @url, @env, @command quotes seem unnecessary, so use \code. +-\let\url=\code ++% For @indicateurl, @env, @command quotes seem unnecessary, so use \code. ++\let\indicateurl=\code + \let\env=\code + \let\command=\code + ++% @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 +2615,13 @@ where each line of input produces a line + \endlink + \endgroup} + ++% @url synonym for @uref, since that's how everyone uses it. ++% ++\let\url=\uref ++ + % rms does not like angle brackets --karl, 17may97. + % So now @email is just like @uref, unless we are pdf. +-% ++% + %\def\email#1{\angleleft{\tt #1}\angleright} + \ifpdf + \def\email#1{\doemail#1,,\finish} +@@ -1442,12 +2660,140 @@ where each line of input produces a line + \def\sc#1{{\smallcaps#1}} % smallcaps font + \def\ii#1{{\it #1}} % italic font + +-% @acronym downcases the argument and prints in smallcaps. +-\def\acronym#1{{\smallcaps \lowercase{#1}}} ++% @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}% ++ \def\temp{#2}% ++ \ifx\temp\empty \else ++ \space ({\unsepspaces \ignorespaces \temp \unskip})% ++ \fi ++} + +-% @pounds{} is a sterling sign. ++% @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}% ++ \def\temp{#2}% ++ \ifx\temp\empty \else ++ \space ({\unsepspaces \ignorespaces \temp \unskip})% ++ \fi ++} ++ ++% @pounds{} is a sterling sign, which Knuth put in the CM italic font. ++% + \def\pounds{{\it\$}} + ++% @euro{} comes from a separate font, depending on the current style. ++% We use the free feym* fonts from the eurosym package by Henrik ++% 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 ++ % bold: ++ \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize ++ \else ++ % regular: ++ \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize ++ \fi ++ \thiseurofont ++} ++ ++% Hacks for glyphs from the EC fonts similar to \euro. We don't ++% use \let for the aliases, because sometimes we redefine the original ++% macro, and the alias should reflect the redefinition. ++\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}} ++% ++\def\ecfont{% ++ % We can't distinguish serif/sanserif 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. ++% ++\def\registeredsymbol{% ++ $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% ++ \hfil\crcr\Orb}}% ++ }$% ++} ++ ++% @textdegree - the normal degrees sign. ++% ++\def\textdegree{$^\circ$} ++ ++% 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 +2812,103 @@ where each line of input produces a line + \newif\ifsetshortcontentsaftertitlepage + \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue + +-\def\shorttitlepage{\parsearg\shorttitlepagezzz} +-\def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% ++\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% + \endgroup\page\hbox{}\page} + +-\def\titlepage{\begingroup \parindent=0pt \textfonts +- \let\subtitlerm=\tenrm +- \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% +- % +- \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}% +- % +- % Leave some space at the very top of the page. +- \vglue\titlepagetopglue +- % +- % Now you can print the title using @title. +- \def\title{\parsearg\titlezzz}% +- \def\titlezzz##1{\leftline{\titlefonts\rm ##1} +- % print a rule at the page bottom also. +- \finishedtitlepagefalse +- \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% +- % No rule at page bottom unless we print one at the top with @title. +- \finishedtitlepagetrue +- % +- % Now you can put text using @subtitle. +- \def\subtitle{\parsearg\subtitlezzz}% +- \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}% +- % +- % @author should come last, but may come many times. +- \def\author{\parsearg\authorzzz}% +- \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi +- {\authorfont \leftline{##1}}}% +- % +- % Most title ``pages'' are actually two pages long, with space +- % at the top of the second. We don't want the ragged left on the second. +- \let\oldpage = \page +- \def\page{% ++\envdef\titlepage{% ++ % Open one extra group, as we want to close it in the middle of \Etitlepage. ++ \begingroup ++ \parindent=0pt \textfonts ++ % Leave some space at the very top of the page. ++ \vglue\titlepagetopglue ++ % No rule at page bottom unless we print one at the top with @title. ++ \finishedtitlepagetrue ++ % ++ % Most title ``pages'' are actually two pages long, with space ++ % at the top of the second. We don't want the ragged left on the second. ++ \let\oldpage = \page ++ \def\page{% + \iffinishedtitlepage\else +- \finishtitlepage ++ \finishtitlepage + \fi +- \oldpage + \let\page = \oldpage +- \hbox{}}% +-% \def\page{\oldpage \hbox{}} ++ \page ++ \null ++ }% + } + + \def\Etitlepage{% +- \iffinishedtitlepage\else +- \finishtitlepage +- \fi +- % It is important to do the page break before ending the group, +- % because the headline and footline are only empty inside the group. +- % If we use the new definition of \page, we always get a blank page +- % after the title page, which we certainly don't want. +- \oldpage +- \endgroup +- % +- % If they want short, they certainly want long too. +- \ifsetshortcontentsaftertitlepage +- \shortcontents +- \contents +- \global\let\shortcontents = \relax +- \global\let\contents = \relax +- \fi +- % +- \ifsetcontentsaftertitlepage +- \contents +- \global\let\contents = \relax +- \global\let\shortcontents = \relax +- \fi +- % +- \ifpdf \pdfmakepagedesttrue \fi +- % +- \HEADINGSon ++ \iffinishedtitlepage\else ++ \finishtitlepage ++ \fi ++ % It is important to do the page break before ending the group, ++ % because the headline and footline are only empty inside the group. ++ % If we use the new definition of \page, we always get a blank page ++ % after the title page, which we certainly don't want. ++ \oldpage ++ \endgroup ++ % ++ % Need this before the \...aftertitlepage checks so that if they are ++ % in effect the toc pages will come out with page numbers. ++ \HEADINGSon ++ % ++ % If they want short, they certainly want long too. ++ \ifsetshortcontentsaftertitlepage ++ \shortcontents ++ \contents ++ \global\let\shortcontents = \relax ++ \global\let\contents = \relax ++ \fi ++ % ++ \ifsetcontentsaftertitlepage ++ \contents ++ \global\let\contents = \relax ++ \global\let\shortcontents = \relax ++ \fi + } + + \def\finishtitlepage{% +- \vskip4pt \hrule height 2pt width \hsize +- \vskip\titlepagebottomglue +- \finishedtitlepagetrue ++ \vskip4pt \hrule height 2pt width \hsize ++ \vskip\titlepagebottomglue ++ \finishedtitlepagetrue + } + ++%%% Macros to be used within @titlepage: ++ ++\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} ++ % 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. ++% ++\parseargdef\author{% ++ \def\temp{\quotation}% ++ \ifx\thisenv\temp ++ \def\quotationauthor{#1}% printed in \Equotation. ++ \else ++ \checkenv\titlepage ++ \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi ++ {\authorfont \leftline{#1}}% ++ \fi ++} ++ ++ + %%% Set up page headings and footings. + + \let\thispage=\folio +@@ -1555,7 +2918,7 @@ where each line of input produces a line + \newtoks\evenfootline % footline on even pages + \newtoks\oddfootline % footline on odd pages + +-% Now make Tex use those variables ++% Now make TeX use those variables + \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline + \else \the\evenheadline \fi}} + \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline +@@ -1569,43 +2932,64 @@ where each line of input produces a line + % @evenfooting @thisfile|| + % @oddfooting ||@thisfile + +-\def\evenheading{\parsearg\evenheadingxxx} +-\def\oddheading{\parsearg\oddheadingxxx} +-\def\everyheading{\parsearg\everyheadingxxx} + +-\def\evenfooting{\parsearg\evenfootingxxx} +-\def\oddfooting{\parsearg\oddfootingxxx} +-\def\everyfooting{\parsearg\everyfootingxxx} +- +-{\catcode`\@=0 % +- +-\gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish} +-\gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{% ++\def\evenheading{\parsearg\evenheadingxxx} ++\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} ++\def\evenheadingyyy #1\|#2\|#3\|#4\finish{% + \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +-\gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish} +-\gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% ++\def\oddheading{\parsearg\oddheadingxxx} ++\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} ++\def\oddheadingyyy #1\|#2\|#3\|#4\finish{% + \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +-\gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}% ++\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% + +-\gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} +-\gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% ++\def\evenfooting{\parsearg\evenfootingxxx} ++\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} ++\def\evenfootingyyy #1\|#2\|#3\|#4\finish{% + \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +-\gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} +-\gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% ++\def\oddfooting{\parsearg\oddfootingxxx} ++\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} ++\def\oddfootingyyy #1\|#2\|#3\|#4\finish{% + \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% + % + % Leave some space for the footline. Hopefully ok to assume + % @evenfooting will not be used by itself. +- \global\advance\pageheight by -\baselineskip +- \global\advance\vsize by -\baselineskip ++ \global\advance\pageheight by -12pt ++ \global\advance\vsize by -12pt + } + +-\gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}} ++\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 +3003,7 @@ where each line of input produces a line + + \def\headings #1 {\csname HEADINGS#1\endcsname} + +-\def\HEADINGSoff{ ++\def\HEADINGSoff{% + \global\evenheadline={\hfil} \global\evenfootline={\hfil} + \global\oddheadline={\hfil} \global\oddfootline={\hfil}} + \HEADINGSoff +@@ -1628,7 +3012,7 @@ where each line of input produces a line + % 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. +-\def\HEADINGSdouble{ ++\def\HEADINGSdouble{% + \global\pageno=1 + \global\evenfootline={\hfil} + \global\oddfootline={\hfil} +@@ -1640,7 +3024,7 @@ where each line of input produces a line + + % For single-sided printing, chapter title goes across top left of page, + % page number on top right. +-\def\HEADINGSsingle{ ++\def\HEADINGSsingle{% + \global\pageno=1 + \global\evenfootline={\hfil} + \global\oddfootline={\hfil} +@@ -1670,7 +3054,10 @@ where each line of input produces a line + } + + % Subroutines used in generating headings +-% Produces Day Month Year style of output. ++% This produces Day Month Year style of output. ++% Only define if not already defined, in case a txi-??.tex file has set ++% up a different format (e.g., txi-cs.tex does this). ++\ifx\today\undefined + \def\today{% + \number\day\space + \ifcase\month +@@ -1679,16 +3066,16 @@ where each line of input produces a line + \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec + \fi + \space\number\year} ++\fi + + % @settitle line... specifies the title of the document, for headings. + % It generates no output of its own. + \def\thistitle{\putwordNoTitle} +-\def\settitle{\parsearg\settitlezzz} +-\def\settitlezzz #1{\gdef\thistitle{#1}} ++\def\settitle{\parsearg{\gdef\thistitle}} + + + \message{tables,} +-% Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x). ++% Tables -- @table, @ftable, @vtable, @item(x). + + % default indentation of table text + \newdimen\tableindent \tableindent=.8in +@@ -1700,7 +3087,7 @@ where each line of input produces a line + % used internally for \itemindent minus \itemmargin + \newdimen\itemmax + +-% Note @table, @vtable, and @vtable define @item, @itemx, etc., with ++% Note @table, @ftable, and @vtable define @item, @itemx, etc., with + % these defs. + % They also define \itemindex + % to index the item name in whatever manner is desired (perhaps none). +@@ -1712,22 +3099,10 @@ where each line of input produces a line + \def\internalBitem{\smallbreak \parsearg\itemzzz} + \def\internalBitemx{\itemxpar \parsearg\itemzzz} + +-\def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz} +-\def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz} +- +-\def\internalBkitem{\smallbreak \parsearg\kitemzzz} +-\def\internalBkitemx{\itemxpar \parsearg\kitemzzz} +- +-\def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}% +- \itemzzz {#1}} +- +-\def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}% +- \itemzzz {#1}} +- + \def\itemzzz #1{\begingroup % + \advance\hsize by -\rightskip + \advance\hsize by -\tableindent +- \setbox0=\hbox{\itemfont{#1}}% ++ \setbox0=\hbox{\itemindicate{#1}}% + \itemindex{#1}% + \nobreak % This prevents a break before @itemx. + % +@@ -1751,10 +3126,14 @@ where each line of input produces a line + % \parskip glue -- logically it's part of the @item we just started. + \nobreak \vskip-\parskip + % +- % Stop a page break at the \parskip glue coming up. Unfortunately +- % we can't prevent a possible page break at the following +- % \baselineskip glue. +- \nobreak ++ % Stop a page break at the \parskip glue coming up. However, if ++ % what follows is an environment such as @example, there will be no ++ % \parskip glue; then the negative vskip we just inserted would ++ % 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 +3152,106 @@ where each line of input produces a line + \fi + } + +-\def\item{\errmessage{@item while not in a table}} +-\def\itemx{\errmessage{@itemx while not in a table}} +-\def\kitem{\errmessage{@kitem while not in a table}} +-\def\kitemx{\errmessage{@kitemx while not in a table}} +-\def\xitem{\errmessage{@xitem while not in a table}} +-\def\xitemx{\errmessage{@xitemx while not in a table}} +- +-% Contains a kludge to get @end[description] to work. +-\def\description{\tablez{\dontindex}{1}{}{}{}{}} ++\def\item{\errmessage{@item while not in a list environment}} ++\def\itemx{\errmessage{@itemx while not in a list environment}} + + % @table, @ftable, @vtable. +-\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex} +-{\obeylines\obeyspaces% +-\gdef\tablex #1^^M{% +-\tabley\dontindex#1 \endtabley}} +- +-\def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex} +-{\obeylines\obeyspaces% +-\gdef\ftablex #1^^M{% +-\tabley\fnitemindex#1 \endtabley +-\def\Eftable{\endgraf\afterenvbreak\endgroup}% +-\let\Etable=\relax}} +- +-\def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex} +-{\obeylines\obeyspaces% +-\gdef\vtablex #1^^M{% +-\tabley\vritemindex#1 \endtabley +-\def\Evtable{\endgraf\afterenvbreak\endgroup}% +-\let\Etable=\relax}} +- +-\def\dontindex #1{} +-\def\fnitemindex #1{\doind {fn}{\code{#1}}}% +-\def\vritemindex #1{\doind {vr}{\code{#1}}}% +- +-{\obeyspaces % +-\gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup% +-\tablez{#1}{#2}{#3}{#4}{#5}{#6}}} +- +-\def\tablez #1#2#3#4#5#6{% +-\aboveenvbreak % +-\begingroup % +-\def\Edescription{\Etable}% Necessary kludge. +-\let\itemindex=#1% +-\ifnum 0#3>0 \advance \leftskip by #3\mil \fi % +-\ifnum 0#4>0 \tableindent=#4\mil \fi % +-\ifnum 0#5>0 \advance \rightskip by #5\mil \fi % +-\def\itemfont{#2}% +-\itemmax=\tableindent % +-\advance \itemmax by -\itemmargin % +-\advance \leftskip by \tableindent % +-\exdentamount=\tableindent +-\parindent = 0pt +-\parskip = \smallskipamount +-\ifdim \parskip=0pt \parskip=2pt \fi% +-\def\Etable{\endgraf\afterenvbreak\endgroup}% +-\let\item = \internalBitem % +-\let\itemx = \internalBitemx % +-\let\kitem = \internalBkitem % +-\let\kitemx = \internalBkitemx % +-\let\xitem = \internalBxitem % +-\let\xitemx = \internalBxitemx % ++\envdef\table{% ++ \let\itemindex\gobble ++ \tablecheck{table}% ++} ++\envdef\ftable{% ++ \def\itemindex ##1{\doind {fn}{\code{##1}}}% ++ \tablecheck{ftable}% ++} ++\envdef\vtable{% ++ \def\itemindex ##1{\doind {vr}{\code{##1}}}% ++ \tablecheck{vtable}% ++} ++\def\tablecheck#1{% ++ \ifnum \the\catcode`\^^M=\active ++ \endgroup ++ \errmessage{This command won't work in this context; perhaps the problem is ++ that we are \inenvironment\thisenv}% ++ \def\next{\doignore{#1}}% ++ \else ++ \let\next\tablex ++ \fi ++ \next ++} ++\def\tablex#1{% ++ \def\itemindicate{#1}% ++ \parsearg\tabley + } ++\def\tabley#1{% ++ {% ++ \makevalueexpandable ++ \edef\temp{\noexpand\tablez #1\space\space\space}% ++ \expandafter ++ }\temp \endtablez ++} ++\def\tablez #1 #2 #3 #4\endtablez{% ++ \aboveenvbreak ++ \ifnum 0#1>0 \advance \leftskip by #1\mil \fi ++ \ifnum 0#2>0 \tableindent=#2\mil \fi ++ \ifnum 0#3>0 \advance \rightskip by #3\mil \fi ++ \itemmax=\tableindent ++ \advance \itemmax by -\itemmargin ++ \advance \leftskip by \tableindent ++ \exdentamount=\tableindent ++ \parindent = 0pt ++ \parskip = \smallskipamount ++ \ifdim \parskip=0pt \parskip=2pt \fi ++ \let\item = \internalBitem ++ \let\itemx = \internalBitemx ++} ++\def\Etable{\endgraf\afterenvbreak} ++\let\Eftable\Etable ++\let\Evtable\Etable ++\let\Eitemize\Etable ++\let\Eenumerate\Etable + + % This is the counter used by @enumerate, which is really @itemize + + \newcount \itemno + +-\def\itemize{\parsearg\itemizezzz} ++\envdef\itemize{\parsearg\doitemize} + +-\def\itemizezzz #1{% +- \begingroup % ended by the @end itemize +- \itemizey {#1}{\Eitemize} ++\def\doitemize#1{% ++ \aboveenvbreak ++ \itemmax=\itemindent ++ \advance\itemmax by -\itemmargin ++ \advance\leftskip by \itemindent ++ \exdentamount=\itemindent ++ \parindent=0pt ++ \parskip=\smallskipamount ++ \ifdim\parskip=0pt \parskip=2pt \fi ++ \def\itemcontents{#1}% ++ % @itemize with no arg is equivalent to @itemize @bullet. ++ \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi ++ \let\item=\itemizeitem + } + +-\def\itemizey #1#2{% +-\aboveenvbreak % +-\itemmax=\itemindent % +-\advance \itemmax by -\itemmargin % +-\advance \leftskip by \itemindent % +-\exdentamount=\itemindent +-\parindent = 0pt % +-\parskip = \smallskipamount % +-\ifdim \parskip=0pt \parskip=2pt \fi% +-\def#2{\endgraf\afterenvbreak\endgroup}% +-\def\itemcontents{#1}% +-\let\item=\itemizeitem} +- +-% Set sfcode to normal for the chars that usually have another value. +-% These are `.?!:;,' +-\def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000 +- \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 } ++% Definition of @item while inside @itemize and @enumerate. ++% ++\def\itemizeitem{% ++ \advance\itemno by 1 % for enumerations ++ {\let\par=\endgraf \smallbreak}% reasonable place to break ++ {% ++ % If the document has an @itemize directly after a section title, a ++ % \nobreak will be last on the list, and \sectionheading will have ++ % done a \vskip-\parskip. In that case, we don't want to zero ++ % parskip, or the item text will crash with the heading. On the ++ % other hand, when there is normal text preceding the item (as there ++ % usually is), we do want to zero parskip, or there would be too much ++ % space. In that case, we won't have a \nobreak before. At least ++ % that's the theory. ++ \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 +3262,8 @@ where each line of input produces a line + % or number, to specify the first label in the enumerated list. No + % argument is the same as `1'. + % +-\def\enumerate{\parsearg\enumeratezzz} +-\def\enumeratezzz #1{\enumeratey #1 \endenumeratey} ++\envparseargdef\enumerate{\enumeratey #1 \endenumeratey} + \def\enumeratey #1 #2\endenumeratey{% +- \begingroup % ended by the @end enumerate +- % + % If we were given no argument, pretend we were given `1'. + \def\thearg{#1}% + \ifx\thearg\empty \def\thearg{1}\fi +@@ -1949,13 +3334,13 @@ where each line of input produces a line + }% + } + +-% Call itemizey, adding a period to the first argument and supplying the ++% Call \doitemize, adding a period to the first argument and supplying the + % common last two arguments. Also subtract one from the initial value in + % \itemno, since @item increments \itemno. + % + \def\startenumeration#1{% + \advance\itemno by -1 +- \itemizey{#1.}\Eenumerate\flushcr ++ \doitemize{#1.}\flushcr + } + + % @alphaenumerate and @capsenumerate are abbreviations for giving an arg +@@ -1966,16 +3351,6 @@ where each line of input produces a line + \def\Ealphaenumerate{\Eenumerate} + \def\Ecapsenumerate{\Eenumerate} + +-% Definition of @item while inside @itemize. +- +-\def\itemizeitem{% +-\advance\itemno by 1 +-{\let\par=\endgraf \smallbreak}% +-\ifhmode \errmessage{In hmode at itemizeitem}\fi +-{\parskip=0in \hskip 0pt +-\hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% +-\vadjust{\penalty 1200}}% +-\flushcr} + + % @multitable macros + % Amy Hendrickson, 8/18/94, 3/6/96 +@@ -2002,24 +3377,14 @@ where each line of input produces a line + % @multitable {Column 1 template} {Column 2 template} {Column 3 template} + % @item ... + % using the widest term desired in each column. +-% +-% For those who want to use more than one line's worth of words in +-% the preamble, break the line within one argument and it +-% will parse correctly, i.e., +-% +-% @multitable {Column 1 template} {Column 2 template} {Column 3 +-% template} +-% Not: +-% @multitable {Column 1 template} {Column 2 template} +-% {Column 3 template} + + % Each new table line starts with @item, each subsequent new column + % starts with @tab. Empty columns may be produced by supplying @tab's + % with nothing between them for as many times as empty columns are needed, + % ie, @tab@tab@tab will produce two empty columns. + +-% @item, @tab, @multitable or @end multitable do not need to be on their +-% own lines, but it will not hurt if they are. ++% @item, @tab do not need to be on their own lines, but it will not hurt ++% if they are. + + % Sample multitable: + +@@ -2063,13 +3428,12 @@ where each line of input produces a line + \def\xcolumnfractions{\columnfractions} + \newif\ifsetpercent + +-% #1 is the part of the @columnfraction before the decimal point, which +-% is presumably either 0 or the empty string (but we don't check, we +-% just throw it away). #2 is the decimal part, which we use as the +-% percent of \hsize for this column. +-\def\pickupwholefraction#1.#2 {% ++% #1 is the @columnfraction, usually a decimal number like .5, but might ++% be just 1. We just use it, whatever it is. ++% ++\def\pickupwholefraction#1 {% + \global\advance\colcount by 1 +- \expandafter\xdef\csname col\the\colcount\endcsname{.#2\hsize}% ++ \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% + \setuptable + } + +@@ -2086,8 +3450,8 @@ where each line of input produces a line + \let\go\pickupwholefraction + \else + \global\advance\colcount by 1 +- \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator; +- % typically that is always in the input, anyway. ++ \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a ++ % separator; typically that is always in the input, anyway. + \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% + \fi + \fi +@@ -2102,18 +3466,33 @@ where each line of input produces a line + \go + } + +-% This used to have \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. +-% --karl, nathan@acm.org, 20apr99. +-\def\tab{&} ++% multitable-only commands. ++% ++% @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}% ++% ++% 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. ++% --karl, nathan@acm.org, 20apr99. ++\def\tab{\checkenv\multitable &\the\everytab}% + + % @multitable ... @end multitable definitions: + % +-\def\multitable{\parsearg\dotable} +-\def\dotable#1{\bgroup ++\newtoks\everytab % insert after every tab. ++% ++\envdef\multitable{% + \vskip\parskip +- \let\item\crcr ++ \startsavinginserts ++ % ++ % @item within a multitable starts a normal row. ++ % We use \def instead of \let so that if one of the multitable entries ++ % contains an @itemize, we don't choke on the \item (seen as \crcr aka ++ % \endtemplate) expanding \doitemize. ++ \def\item{\crcr}% ++ % + \tolerance=9500 + \hbadness=9500 + \setmultitablespacing +@@ -2121,81 +3500,93 @@ where each line of input produces a line + \parindent=\multitableparindent + \overfullrule=0pt + \global\colcount=0 +- \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}% + % ++ \everycr = {% ++ \noalign{% ++ \global\everytab={}% ++ \global\colcount=0 % Reset the column counter. ++ % Check for saved footnotes, etc. ++ \checkinserts ++ % Keeps underfull box messages off when table breaks over pages. ++ %\filbreak ++ % Maybe so, but it also creates really weird page breaks when the ++ % table breaks over pages. Wouldn't \vfil be better? Wait until the ++ % problem manifests itself, so it can be fixed for real --karl. ++ }% ++ }% ++ % ++ \parsearg\domultitable ++} ++\def\domultitable#1{% + % To parse everything between @multitable and @item: + \setuptable#1 \endsetuptable + % +- % \everycr will reset column counter, \colcount, at the end of +- % each line. Every column entry will cause \colcount to advance by one. +- % The table preamble +- % looks at the current \colcount to find the correct column width. +- \everycr{\noalign{% +- % +- % \filbreak%% keeps underfull box messages off when table breaks over pages. +- % Maybe so, but it also creates really weird page breaks when the table +- % breaks over pages. Wouldn't \vfil be better? Wait until the problem +- % manifests itself, so it can be fixed for real --karl. +- \global\colcount=0\relax}}% +- % + % This preamble sets up a generic column definition, which will + % be used as many times as user calls for columns. + % \vtop will set a single line and will also let text wrap and + % continue for many paragraphs if desired. +- \halign\bgroup&\global\advance\colcount by 1\relax +- \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname +- % +- % In order to keep entries from bumping into each other +- % we will add a \leftskip of \multitablecolspace to all columns after +- % the first one. +- % +- % If a template has been used, we will add \multitablecolspace +- % to the width of each template entry. +- % +- % If the user has set preamble in terms of percent of \hsize we will +- % use that dimension as the width of the column, and the \leftskip +- % will keep entries from bumping into each other. Table will start at +- % left margin and final column will justify at right margin. +- % +- % Make sure we don't inherit \rightskip from the outer environment. +- \rightskip=0pt +- \ifnum\colcount=1 +- % The first column will be indented with the surrounding text. +- \advance\hsize by\leftskip +- \else +- \ifsetpercent \else +- % If user has not set preamble in terms of percent of \hsize +- % we will advance \hsize by \multitablecolspace. +- \advance\hsize by \multitablecolspace +- \fi +- % In either case we will make \leftskip=\multitablecolspace: +- \leftskip=\multitablecolspace +- \fi +- % Ignoring space at the beginning and end avoids an occasional spurious +- % blank line, when TeX decides to break the line at the space before the +- % box from the multistrut, so the strut ends up on a line by itself. +- % For example: +- % @multitable @columnfractions .11 .89 +- % @item @code{#} +- % @tab Legal holiday which is valid in major parts of the whole country. +- % Is automatically provided with highlighting sequences respectively marking +- % characters. +- \noindent\ignorespaces##\unskip\multistrut}\cr ++ \halign\bgroup &% ++ \global\advance\colcount by 1 ++ \multistrut ++ \vtop{% ++ % Use the current \colcount to find the correct column width: ++ \hsize=\expandafter\csname col\the\colcount\endcsname ++ % ++ % In order to keep entries from bumping into each other ++ % we will add a \leftskip of \multitablecolspace to all columns after ++ % the first one. ++ % ++ % If a template has been used, we will add \multitablecolspace ++ % to the width of each template entry. ++ % ++ % If the user has set preamble in terms of percent of \hsize we will ++ % use that dimension as the width of the column, and the \leftskip ++ % will keep entries from bumping into each other. Table will start at ++ % left margin and final column will justify at right margin. ++ % ++ % Make sure we don't inherit \rightskip from the outer environment. ++ \rightskip=0pt ++ \ifnum\colcount=1 ++ % The first column will be indented with the surrounding text. ++ \advance\hsize by\leftskip ++ \else ++ \ifsetpercent \else ++ % If user has not set preamble in terms of percent of \hsize ++ % we will advance \hsize by \multitablecolspace. ++ \advance\hsize by \multitablecolspace ++ \fi ++ % In either case we will make \leftskip=\multitablecolspace: ++ \leftskip=\multitablecolspace ++ \fi ++ % Ignoring space at the beginning and end avoids an occasional spurious ++ % blank line, when TeX decides to break the line at the space before the ++ % box from the multistrut, so the strut ends up on a line by itself. ++ % For example: ++ % @multitable @columnfractions .11 .89 ++ % @item @code{#} ++ % @tab Legal holiday which is valid in major parts of the whole country. ++ % Is automatically provided with highlighting sequences respectively ++ % marking characters. ++ \noindent\ignorespaces##\unskip\multistrut ++ }\cr ++} ++\def\Emultitable{% ++ \crcr ++ \egroup % end the \halign ++ \global\setpercentfalse + } + +-\def\setmultitablespacing{% test to see if user has set \multitablelinespace. +-% If so, do nothing. If not, give it an appropriate dimension based on +-% current baselineskip. ++\def\setmultitablespacing{% ++ \def\multistrut{\strut}% just use the standard line spacing ++ % ++ % Compute \multitablelinespace (if not defined by user) for use in ++ % \multitableparskip calculation. We used define \multistrut based on ++ % this, but (ironically) that caused the spacing to be off. ++ % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. + \ifdim\multitablelinespace=0pt + \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip + \global\advance\multitablelinespace by-\ht0 +-%% strut to put in table in case some entry doesn't have descenders, +-%% to keep lines equally spaced +-\let\multistrut = \strut +-\else +-%% FIXME: what is \box0 supposed to be? +-\gdef\multistrut{\vrule height\multitablelinespace depth\dp0 +-width0pt\relax} \fi ++\fi + %% 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 +3603,178 @@ width0pt\relax} \fi + + + \message{conditionals,} +-% Prevent errors for section commands. +-% Used in @ignore and in failing conditionals. +-\def\ignoresections{% +- \let\chapter=\relax +- \let\unnumbered=\relax +- \let\top=\relax +- \let\unnumberedsec=\relax +- \let\unnumberedsection=\relax +- \let\unnumberedsubsec=\relax +- \let\unnumberedsubsection=\relax +- \let\unnumberedsubsubsec=\relax +- \let\unnumberedsubsubsection=\relax +- \let\section=\relax +- \let\subsec=\relax +- \let\subsubsec=\relax +- \let\subsection=\relax +- \let\subsubsection=\relax +- \let\appendix=\relax +- \let\appendixsec=\relax +- \let\appendixsection=\relax +- \let\appendixsubsec=\relax +- \let\appendixsubsection=\relax +- \let\appendixsubsubsec=\relax +- \let\appendixsubsubsection=\relax +- \let\contents=\relax +- \let\smallbook=\relax +- \let\titlepage=\relax +-} + +-% Used in nested conditionals, where we have to parse the Texinfo source +-% and so want to turn off most commands, in case they are used +-% incorrectly. ++% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, ++% @ifnotxml always succeed. They currently do nothing; we don't ++% attempt to check whether the conditionals are properly nested. But we ++% have to remember that they are conditionals, so that @end doesn't ++% attempt to close an environment group. + % +-\def\ignoremorecommands{% +- \let\defcodeindex = \relax +- \let\defcv = \relax +- \let\deffn = \relax +- \let\deffnx = \relax +- \let\defindex = \relax +- \let\defivar = \relax +- \let\defmac = \relax +- \let\defmethod = \relax +- \let\defop = \relax +- \let\defopt = \relax +- \let\defspec = \relax +- \let\deftp = \relax +- \let\deftypefn = \relax +- \let\deftypefun = \relax +- \let\deftypeivar = \relax +- \let\deftypeop = \relax +- \let\deftypevar = \relax +- \let\deftypevr = \relax +- \let\defun = \relax +- \let\defvar = \relax +- \let\defvr = \relax +- \let\ref = \relax +- \let\xref = \relax +- \let\printindex = \relax +- \let\pxref = \relax +- \let\settitle = \relax +- \let\setchapternewpage = \relax +- \let\setchapterstyle = \relax +- \let\everyheading = \relax +- \let\evenheading = \relax +- \let\oddheading = \relax +- \let\everyfooting = \relax +- \let\evenfooting = \relax +- \let\oddfooting = \relax +- \let\headings = \relax +- \let\include = \relax +- \let\lowersections = \relax +- \let\down = \relax +- \let\raisesections = \relax +- \let\up = \relax +- \let\set = \relax +- \let\clear = \relax +- \let\item = \relax ++\def\makecond#1{% ++ \expandafter\let\csname #1\endcsname = \relax ++ \expandafter\let\csname iscond.#1\endcsname = 1 + } ++\makecond{iftex} ++\makecond{ifnotdocbook} ++\makecond{ifnothtml} ++\makecond{ifnotinfo} ++\makecond{ifnotplaintext} ++\makecond{ifnotxml} + +-% Ignore @ignore ... @end ignore. +-% +-\def\ignore{\doignore{ignore}} +- +-% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text. ++% Ignore @ignore, @ifhtml, @ifinfo, and the like. + % +-\def\ifinfo{\doignore{ifinfo}} ++\def\direntry{\doignore{direntry}} ++\def\documentdescription{\doignore{documentdescription}} ++\def\docbook{\doignore{docbook}} ++\def\html{\doignore{html}} ++\def\ifdocbook{\doignore{ifdocbook}} + \def\ifhtml{\doignore{ifhtml}} ++\def\ifinfo{\doignore{ifinfo}} + \def\ifnottex{\doignore{ifnottex}} +-\def\html{\doignore{html}} ++\def\ifplaintext{\doignore{ifplaintext}} ++\def\ifxml{\doignore{ifxml}} ++\def\ignore{\doignore{ignore}} + \def\menu{\doignore{menu}} +-\def\direntry{\doignore{direntry}} +- +-% @dircategory CATEGORY -- specify a category of the dir file +-% which this file should belong to. Ignore this in TeX. +-\let\dircategory = \comment ++\def\xml{\doignore{xml}} + +-% Ignore text until a line `@end #1'. ++% Ignore text until a line `@end #1', keeping track of nested conditionals. + % ++% A count to remember the depth of nesting. ++\newcount\doignorecount ++ + \def\doignore#1{\begingroup +- % Don't complain about control sequences we have declared \outer. +- \ignoresections +- % +- % Define a command to swallow text until we reach `@end #1'. +- % This @ is a catcode 12 token (that is the normal catcode of @ in +- % this texinfo.tex file). We change the catcode of @ below to match. +- \long\def\doignoretext##1@end #1{\enddoignore}% ++ % Scan in ``verbatim'' mode: ++ \obeylines ++ \catcode`\@ = \other ++ \catcode`\{ = \other ++ \catcode`\} = \other + % + % Make sure that spaces turn into tokens that match what \doignoretext wants. +- \catcode32 = 10 +- % +- % Ignore braces, too, so mismatched braces don't cause trouble. +- \catcode`\{ = 9 +- \catcode`\} = 9 +- % +- % We must not have @c interpreted as a control sequence. +- \catcode`\@ = 12 ++ \spaceisspace + % +- % Make the letter c a comment character so that the rest of the line +- % will be ignored. This way, the document can have (for example) +- % @c @end ifinfo +- % and the @end ifinfo will be properly ignored. +- % (We've just changed @ to catcode 12.) +- \catcode`\c = 14 ++ % Count number of #1's that we've seen. ++ \doignorecount = 0 + % +- % And now expand that command. +- \doignoretext +-} +- +-% What we do to finish off ignored text. +-% +-\def\enddoignore{\endgroup\ignorespaces}% +- +-\newif\ifwarnedobs\warnedobsfalse +-\def\obstexwarn{% +- \ifwarnedobs\relax\else +- % We need to warn folks that they may have trouble with TeX 3.0. +- % This uses \immediate\write16 rather than \message to get newlines. +- \immediate\write16{} +- \immediate\write16{WARNING: for users of Unix TeX 3.0!} +- \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).} +- \immediate\write16{If you are running another version of TeX, relax.} +- \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} +- \immediate\write16{ Then upgrade your TeX installation if you can.} +- \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)} +- \immediate\write16{If you are stuck with version 3.0, run the} +- \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} +- \immediate\write16{ to use a workaround.} +- \immediate\write16{} +- \global\warnedobstrue +- \fi ++ % Swallow text until we reach the matching `@end #1'. ++ \dodoignore{#1}% + } + +-% **In TeX 3.0, setting text in \nullfont hangs tex. For a +-% workaround (which requires the file ``dummy.tfm'' to be installed), +-% uncomment the following line: +-%%%%%\font\nullfont=dummy\let\obstexwarn=\relax +- +-% Ignore text, except that we keep track of conditional commands for +-% purposes of nesting, up to an `@end #1' command. +-% +-\def\nestedignore#1{% +- \obstexwarn +- % We must actually expand the ignored text to look for the @end +- % command, so that nested ignore constructs work. Thus, we put the +- % text into a \vbox and then do nothing with the result. To minimize +- % the change of memory overflow, we follow the approach outlined on +- % page 401 of the TeXbook: make the current font be a dummy font. ++{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. ++ \obeylines % + % +- \setbox0 = \vbox\bgroup +- % Don't complain about control sequences we have declared \outer. +- \ignoresections +- % +- % Define `@end #1' to end the box, which will in turn undefine the +- % @end command again. +- \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}% +- % +- % We are going to be parsing Texinfo commands. Most cause no +- % trouble when they are used incorrectly, but some commands do +- % complicated argument parsing or otherwise get confused, so we +- % undefine them. +- % +- % We can't do anything about stray @-signs, unfortunately; +- % they'll produce `undefined control sequence' errors. +- \ignoremorecommands +- % +- % Set the current font to be \nullfont, a TeX primitive, and define +- % all the font commands to also use \nullfont. We don't use +- % dummy.tfm, as suggested in the TeXbook, because not all sites +- % might have that installed. Therefore, math mode will still +- % produce output, but that should be an extremely small amount of +- % stuff compared to the main input. +- % +- \nullfont +- \let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont +- \let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont +- \let\tensf=\nullfont +- % Similarly for index fonts (mostly for their use in smallexample). +- \let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont +- \let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont +- \let\smallsf=\nullfont +- % +- % Don't complain when characters are missing from the fonts. +- \tracinglostchars = 0 +- % +- % Don't bother to do space factor calculations. +- \frenchspacing ++ \gdef\dodoignore#1{% ++ % #1 contains the command name as a string, e.g., `ifinfo'. + % +- % Don't report underfull hboxes. +- \hbadness = 10000 ++ % Define a command to find the next `@end #1'. ++ \long\def\doignoretext##1^^M@end #1{% ++ \doignoretextyyy##1^^M@#1\_STOP_}% + % +- % Do minimal line-breaking. +- \pretolerance = 10000 ++ % And this command to find another #1 command, at the beginning of a ++ % line. (Otherwise, we would consider a line `@c @ifset', for ++ % example, to count as an @ifset for nesting.) ++ \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% + % +- % Do not execute instructions in @tex +- \def\tex{\doignore{tex}}% +- % Do not execute macro definitions. +- % `c' is a comment character, so the word `macro' will get cut off. +- \def\macro{\doignore{ma}}% ++ % And now expand that command. ++ \doignoretext ^^M% ++ }% ++} ++ ++\def\doignoreyyy#1{% ++ \def\temp{#1}% ++ \ifx\temp\empty % Nothing found. ++ \let\next\doignoretextzzz ++ \else % Found a nested condition, ... ++ \advance\doignorecount by 1 ++ \let\next\doignoretextyyy % ..., look for another. ++ % If we're here, #1 ends with ^^M\ifinfo (for example). ++ \fi ++ \next #1% the token \_STOP_ is present just after this macro. ++} ++ ++% We have to swallow the remaining "\_STOP_". ++% ++\def\doignoretextzzz#1{% ++ \ifnum\doignorecount = 0 % We have just found the outermost @end. ++ \let\next\enddoignore ++ \else % Still inside a nested condition. ++ \advance\doignorecount by -1 ++ \let\next\doignoretext % Look for the next @end. ++ \fi ++ \next + } + ++% Finish off ignored text. ++{ \obeylines% ++ % Ignore anything after the last `@end #1'; this matters in verbatim ++ % 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. + % + % Since we want to separate VAR from REST-OF-LINE (which might be + % empty), we can't just use \parsearg; we have to insert a space of our + % own to delimit the rest of the line, and then take it out again if we +-% didn't need it. Make sure the catcode of space is correct to avoid +-% losing inside @example, for instance. ++% didn't need it. ++% We rely on the fact that \parsearg sets \catcode`\ =10. + % +-\def\set{\begingroup\catcode` =10 +- \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. +- \parsearg\setxxx} +-\def\setxxx#1{\setyyy#1 \endsetyyy} ++\parseargdef\set{\setyyy#1 \endsetyyy} + \def\setyyy#1 #2\endsetyyy{% +- \def\temp{#2}% +- \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty +- \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. +- \fi +- \endgroup ++ {% ++ \makevalueexpandable ++ \def\temp{#2}% ++ \edef\next{\gdef\makecsname{SET#1}}% ++ \ifx\temp\empty ++ \next{}% ++ \else ++ \setzzz#2\endsetzzz ++ \fi ++ }% + } +-% Can't use \xdef to pre-expand #2 and save some time, since \temp or +-% \next or other control sequences that we've defined might get us into +-% an infinite loop. Consider `@set foo @cite{bar}'. +-\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}} ++% Remove the trailing space \setxxx inserted. ++\def\setzzz#1 \endsetzzz{\next{#1}} + + % @clear VAR clears (i.e., unsets) the variable VAR. + % +-\def\clear{\parsearg\clearxxx} +-\def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax} ++\parseargdef\clear{% ++ {% ++ \makevalueexpandable ++ \global\expandafter\let\csname SET#1\endcsname=\relax ++ }% ++} + + % @value{foo} gets the text saved in variable foo. ++\def\value{\begingroup\makevalueexpandable\valuexxx} ++\def\valuexxx#1{\expandablevalue{#1}\endgroup} + { +- \catcode`\_ = \active ++ \catcode`\- = \active \catcode`\_ = \active + % +- % We might end up with active _ or - characters in the argument if +- % we're called from @code, as @code{@value{foo-bar_}}. So \let any +- % such active characters to their normal equivalents. +- \gdef\value{\begingroup +- \catcode`\-=12 \catcode`\_=12 +- \indexbreaks \let_\normalunderscore +- \valuexxx} ++ \gdef\makevalueexpandable{% ++ \let\value = \expandablevalue ++ % We don't want these characters active, ... ++ \catcode`\-=\other \catcode`\_=\other ++ % ..., but we might end up with active ones in the argument if ++ % we're called from @code, as @code{@value{foo-bar_}}, though. ++ % So \let them to their normal equivalents. ++ \let-\realdash \let_\normalunderscore ++ } + } +-\def\valuexxx#1{\expandablevalue{#1}\endgroup} + + % We have this subroutine so that we can handle at least some @value's +-% properly in indexes (we \let\value to this in \indexdummies). Ones +-% whose names contain - or _ still won't work, but we can't do anything +-% about that. The command has to be fully expandable, since the result +-% winds up in the index file. This means that if the variable's value +-% contains other Texinfo commands, it's almost certain it will fail +-% (although perhaps we could fix that with sufficient work to do a +-% one-level expansion on the result, instead of complete). ++% properly in indexes (we call \makevalueexpandable in \indexdummies). ++% The command has to be fully expandable (if the variable is set), since ++% the result winds up in the index file. This means that if the ++% variable's value contains other Texinfo commands, it's almost certain ++% it will fail (although perhaps we could fix that with sufficient work ++% to do a one-level expansion on the result, instead of complete). + % + \def\expandablevalue#1{% + \expandafter\ifx\csname SET#1\endcsname\relax + {[No value for ``#1'']}% ++ \message{Variable `#1', used in @value, is not set.}% + \else + \csname SET#1\endcsname + \fi +@@ -2496,66 +3783,36 @@ width0pt\relax} \fi + % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined + % with @set. + % +-\def\ifset{\parsearg\ifsetxxx} +-\def\ifsetxxx #1{% +- \expandafter\ifx\csname SET#1\endcsname\relax +- \expandafter\ifsetfail +- \else +- \expandafter\ifsetsucceed +- \fi ++% To get special treatment of `@end ifset,' call \makeond and the redefine. ++% ++\makecond{ifset} ++\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} ++\def\doifset#1#2{% ++ {% ++ \makevalueexpandable ++ \let\next=\empty ++ \expandafter\ifx\csname SET#2\endcsname\relax ++ #1% If not set, redefine \next. ++ \fi ++ \expandafter ++ }\next + } +-\def\ifsetsucceed{\conditionalsucceed{ifset}} +-\def\ifsetfail{\nestedignore{ifset}} +-\defineunmatchedend{ifset} ++\def\ifsetfail{\doignore{ifset}} + + % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been + % defined with @set, or has been undefined with @clear. + % +-\def\ifclear{\parsearg\ifclearxxx} +-\def\ifclearxxx #1{% +- \expandafter\ifx\csname SET#1\endcsname\relax +- \expandafter\ifclearsucceed +- \else +- \expandafter\ifclearfail +- \fi +-} +-\def\ifclearsucceed{\conditionalsucceed{ifclear}} +-\def\ifclearfail{\nestedignore{ifclear}} +-\defineunmatchedend{ifclear} +- +-% @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text +-% following, through the first @end iftex (etc.). Make `@end iftex' +-% (etc.) valid only after an @iftex. +-% +-\def\iftex{\conditionalsucceed{iftex}} +-\def\ifnothtml{\conditionalsucceed{ifnothtml}} +-\def\ifnotinfo{\conditionalsucceed{ifnotinfo}} +-\defineunmatchedend{iftex} +-\defineunmatchedend{ifnothtml} +-\defineunmatchedend{ifnotinfo} +- +-% We can't just want to start a group at @iftex (for example) and end it +-% at @end iftex, since then @set commands inside the conditional have no +-% effect (they'd get reverted at the end of the group). So we must +-% define \Eiftex to redefine itself to be its previous value. (We can't +-% just define it to fail again with an ``unmatched end'' error, since +-% the @ifset might be nested.) ++% The `\else' inside the `\doifset' parameter is a trick to reuse the ++% above code: if the variable is not set, do nothing, if it is set, ++% then redefine \next to \ifclearfail. + % +-\def\conditionalsucceed#1{% +- \edef\temp{% +- % Remember the current value of \E#1. +- \let\nece{prevE#1} = \nece{E#1}% +- % +- % At the `@end #1', redefine \E#1 to be its previous value. +- \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}% +- }% +- \temp +-} ++\makecond{ifclear} ++\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} ++\def\ifclearfail{\doignore{ifclear}} + +-% We need to expand lots of \csname's, but we don't want to expand the +-% control sequences after we've constructed them. +-% +-\def\nece#1{\expandafter\noexpand\csname#1\endcsname} ++% @dircategory CATEGORY -- specify a category of the dir file ++% which this file should belong to. Ignore this in TeX. ++\let\dircategory=\comment + + % @defininfoenclose. + \let\definfoenclose=\comment +@@ -2565,9 +3822,8 @@ width0pt\relax} \fi + % Index generation facilities + + % Define \newwrite to be identical to plain tex's \newwrite +-% except not \outer, so it can be used within \newindex. +-{\catcode`\@=11 +-\gdef\newwrite{\alloc@7\write\chardef\sixt@@n}} ++% except not \outer, so it can be used within macros and \if's. ++\edef\newwrite{\makecsname{ptexnewwrite}} + + % \newindex {foo} defines an index named foo. + % It automatically defines \fooindex such that +@@ -2587,42 +3843,48 @@ width0pt\relax} \fi + } + + % @defindex foo == \newindex{foo} +- ++% + \def\defindex{\parsearg\newindex} + + % Define @defcodeindex, like @defindex except put all entries in @code. +- ++% ++\def\defcodeindex{\parsearg\newcodeindex} ++% + \def\newcodeindex#1{% + \iflinks + \expandafter\newwrite \csname#1indfile\endcsname + \openout \csname#1indfile\endcsname \jobname.#1 + \fi + \expandafter\xdef\csname#1index\endcsname{% +- \noexpand\docodeindex{#1}} ++ \noexpand\docodeindex{#1}}% + } + +-\def\defcodeindex{\parsearg\newcodeindex} + + % @synindex foo bar makes index foo feed into index bar. + % Do this instead of @defindex foo if you don't want it as a separate index. +-% The \closeout helps reduce unnecessary open files; the limit on the +-% Acorn RISC OS is a mere 16 files. +-\def\synindex#1 #2 {% +- \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname +- \expandafter\closeout\csname#1indfile\endcsname +- \expandafter\let\csname#1indfile\endcsname=\synindexfoo +- \expandafter\xdef\csname#1index\endcsname{% define \xxxindex +- \noexpand\doindex{#2}}% +-} +- ++% + % @syncodeindex foo bar similar, but put all entries made for index foo + % inside @code. +-\def\syncodeindex#1 #2 {% +- \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname +- \expandafter\closeout\csname#1indfile\endcsname +- \expandafter\let\csname#1indfile\endcsname=\synindexfoo +- \expandafter\xdef\csname#1index\endcsname{% define \xxxindex +- \noexpand\docodeindex{#2}}% ++% ++\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} ++\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} ++ ++% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), ++% #3 the target index (bar). ++\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 ++ % 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 ++ \fi ++ % redefine \fooindfile: ++ \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname ++ \expandafter\let\csname#2indfile\endcsname=\temp ++ % redefine \fooindex: ++ \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% + } + + % Define \doindex, the driver for all \fooindex macros. +@@ -2642,265 +3904,445 @@ width0pt\relax} \fi + \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} + \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} + +-\def\indexdummies{% +-\def\ { }% +-% Take care of the plain tex accent commands. +-\def\"{\realbackslash "}% +-\def\`{\realbackslash `}% +-\def\'{\realbackslash '}% +-\def\^{\realbackslash ^}% +-\def\~{\realbackslash ~}% +-\def\={\realbackslash =}% +-\def\b{\realbackslash b}% +-\def\c{\realbackslash c}% +-\def\d{\realbackslash d}% +-\def\u{\realbackslash u}% +-\def\v{\realbackslash v}% +-\def\H{\realbackslash H}% +-% Take care of the plain tex special European modified letters. +-\def\oe{\realbackslash oe}% +-\def\ae{\realbackslash ae}% +-\def\aa{\realbackslash aa}% +-\def\OE{\realbackslash OE}% +-\def\AE{\realbackslash AE}% +-\def\AA{\realbackslash AA}% +-\def\o{\realbackslash o}% +-\def\O{\realbackslash O}% +-\def\l{\realbackslash l}% +-\def\L{\realbackslash L}% +-\def\ss{\realbackslash ss}% +-% Take care of texinfo commands likely to appear in an index entry. +-% (Must be a way to avoid doing expansion at all, and thus not have to +-% laboriously list every single command here.) +-\def\@{@}% will be @@ when we switch to @ as escape char. +-% Need these in case \tex is in effect and \{ is a \delimiter again. +-% But can't use \lbracecmd and \rbracecmd because texindex assumes +-% braces and backslashes are used only as delimiters. +-\let\{ = \mylbrace +-\let\} = \myrbrace +-\def\_{{\realbackslash _}}% +-\def\w{\realbackslash w }% +-\def\bf{\realbackslash bf }% +-%\def\rm{\realbackslash rm }% +-\def\sl{\realbackslash sl }% +-\def\sf{\realbackslash sf}% +-\def\tt{\realbackslash tt}% +-\def\gtr{\realbackslash gtr}% +-\def\less{\realbackslash less}% +-\def\hat{\realbackslash hat}% +-\def\TeX{\realbackslash TeX}% +-\def\dots{\realbackslash dots }% +-\def\result{\realbackslash result}% +-\def\equiv{\realbackslash equiv}% +-\def\expansion{\realbackslash expansion}% +-\def\print{\realbackslash print}% +-\def\error{\realbackslash error}% +-\def\point{\realbackslash point}% +-\def\copyright{\realbackslash copyright}% +-\def\tclose##1{\realbackslash tclose {##1}}% +-\def\code##1{\realbackslash code {##1}}% +-\def\uref##1{\realbackslash uref {##1}}% +-\def\url##1{\realbackslash url {##1}}% +-\def\env##1{\realbackslash env {##1}}% +-\def\command##1{\realbackslash command {##1}}% +-\def\option##1{\realbackslash option {##1}}% +-\def\dotless##1{\realbackslash dotless {##1}}% +-\def\samp##1{\realbackslash samp {##1}}% +-\def\,##1{\realbackslash ,{##1}}% +-\def\t##1{\realbackslash t {##1}}% +-\def\r##1{\realbackslash r {##1}}% +-\def\i##1{\realbackslash i {##1}}% +-\def\b##1{\realbackslash b {##1}}% +-\def\sc##1{\realbackslash sc {##1}}% +-\def\cite##1{\realbackslash cite {##1}}% +-\def\key##1{\realbackslash key {##1}}% +-\def\file##1{\realbackslash file {##1}}% +-\def\var##1{\realbackslash var {##1}}% +-\def\kbd##1{\realbackslash kbd {##1}}% +-\def\dfn##1{\realbackslash dfn {##1}}% +-\def\emph##1{\realbackslash emph {##1}}% +-\def\acronym##1{\realbackslash acronym {##1}}% ++% Take care of Texinfo commands that can appear in an index entry. ++% Since there are some commands we want to expand, and others we don't, ++% we have to laboriously prevent expansion for those that we don't. + % +-% Handle some cases of @value -- where the variable name does not +-% contain - or _, and the value does not contain any +-% (non-fully-expandable) commands. +-\let\value = \expandablevalue ++\def\indexdummies{% ++ \escapechar = `\\ % use backslash in output files. ++ \def\@{@}% change to @@ when we switch to @ as escape char in index files. ++ \def\ {\realbackslash\space }% ++ % ++ % Need these in case \tex is in effect and \{ is a \delimiter again. ++ % But can't use \lbracecmd and \rbracecmd because texindex assumes ++ % braces and backslashes are used only as delimiters. ++ \let\{ = \mylbrace ++ \let\} = \myrbrace ++ % ++ % I don't entirely understand this, but when an index entry is ++ % generated from a macro call, the \endinput which \scanmacro inserts ++ % causes processing to be prematurely terminated. This is, ++ % apparently, because \indexsorttmp is fully expanded, and \endinput ++ % is an expandable command. The redefinition below makes \endinput ++ % disappear altogether for that purpose -- although logging shows that ++ % 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} ++ % @findex xyz ++ % @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 ++ % ++ % Do the redefinitions. ++ \commondummies ++} ++ ++% For the aux and toc files, @ is the escape character. So we want to ++% redefine everything using @ as the escape character (instead of ++% \realbackslash, still used for index files). When everything uses @, ++% this will be simpler. + % +-\unsepspaces +-% Turn off macro expansion +-\turnoffmacros ++\def\atdummies{% ++ \def\@{@@}% ++ \def\ {@ }% ++ \let\{ = \lbraceatcmd ++ \let\} = \rbraceatcmd ++ % ++ % Do the redefinitions. ++ \commondummies ++ \otherbackslash + } + +-% If an index command is used in an @example environment, any spaces +-% therein should become regular spaces in the raw index file, not the +-% expansion of \tie (\\leavevmode \penalty \@M \ ). +-{\obeyspaces +- \gdef\unsepspaces{\obeyspaces\let =\space}} ++% Called from \indexdummies and \atdummies. ++% ++\def\commondummies{% ++ % ++ % \definedummyword defines \#1 as \string\#1\space, thus effectively ++ % preventing its expansion. This is used only for control% words, ++ % not control letters, because the \space would be incorrect for ++ % control characters, but is needed to separate the control word ++ % from whatever follows. ++ % ++ % For control letters, we have \definedummyletter, which omits the ++ % space. ++ % ++ % These can be used both for control words that take an argument and ++ % those that do not. If it is followed by {arg} in the input, then ++ % that will dutifully get written to the index (or wherever). ++ % ++ \def\definedummyword ##1{\def##1{\string##1\space}}% ++ \def\definedummyletter##1{\def##1{\string##1}}% ++ \let\definedummyaccent\definedummyletter ++ % ++ \commondummiesnofonts ++ % ++ \definedummyletter\_% ++ % ++ % Non-English letters. ++ \definedummyword\AA ++ \definedummyword\AE ++ \definedummyword\L ++ \definedummyword\OE ++ \definedummyword\O ++ \definedummyword\aa ++ \definedummyword\ae ++ \definedummyword\l ++ \definedummyword\oe ++ \definedummyword\o ++ \definedummyword\ss ++ \definedummyword\exclamdown ++ \definedummyword\questiondown ++ \definedummyword\ordf ++ \definedummyword\ordm ++ % ++ % Although these internal commands shouldn't show up, sometimes they do. ++ \definedummyword\bf ++ \definedummyword\gtr ++ \definedummyword\hat ++ \definedummyword\less ++ \definedummyword\sf ++ \definedummyword\sl ++ \definedummyword\tclose ++ \definedummyword\tt ++ % ++ \definedummyword\LaTeX ++ \definedummyword\TeX ++ % ++ % Assorted special characters. ++ \definedummyword\bullet ++ \definedummyword\comma ++ \definedummyword\copyright ++ \definedummyword\registeredsymbol ++ \definedummyword\dots ++ \definedummyword\enddots ++ \definedummyword\equiv ++ \definedummyword\error ++ \definedummyword\euro ++ \definedummyword\guillemetleft ++ \definedummyword\guillemetright ++ \definedummyword\guilsinglleft ++ \definedummyword\guilsinglright ++ \definedummyword\expansion ++ \definedummyword\minus ++ \definedummyword\pounds ++ \definedummyword\point ++ \definedummyword\print ++ \definedummyword\quotedblbase ++ \definedummyword\quotedblleft ++ \definedummyword\quotedblright ++ \definedummyword\quoteleft ++ \definedummyword\quoteright ++ \definedummyword\quotesinglbase ++ \definedummyword\result ++ \definedummyword\textdegree ++ % ++ % We want to disable all macros so that they are not expanded by \write. ++ \macrolist ++ % ++ \normalturnoffactive ++ % ++ % Handle some cases of @value -- where it does not contain any ++ % (non-fully-expandable) commands. ++ \makevalueexpandable ++} + +-% \indexnofonts no-ops all font-change commands. +-% This is used when outputting the strings to sort the index by. +-\def\indexdummyfont#1{#1} +-\def\indexdummytex{TeX} +-\def\indexdummydots{...} ++% \commondummiesnofonts: common to \commondummies and \indexnofonts. ++% ++\def\commondummiesnofonts{% ++ % Control letters and accents. ++ \definedummyletter\!% ++ \definedummyaccent\"% ++ \definedummyaccent\'% ++ \definedummyletter\*% ++ \definedummyaccent\,% ++ \definedummyletter\.% ++ \definedummyletter\/% ++ \definedummyletter\:% ++ \definedummyaccent\=% ++ \definedummyletter\?% ++ \definedummyaccent\^% ++ \definedummyaccent\`% ++ \definedummyaccent\~% ++ \definedummyword\u ++ \definedummyword\v ++ \definedummyword\H ++ \definedummyword\dotaccent ++ \definedummyword\ringaccent ++ \definedummyword\tieaccent ++ \definedummyword\ubaraccent ++ \definedummyword\udotaccent ++ \definedummyword\dotless ++ % ++ % Texinfo font commands. ++ \definedummyword\b ++ \definedummyword\i ++ \definedummyword\r ++ \definedummyword\sc ++ \definedummyword\t ++ % ++ % Commands that take arguments. ++ \definedummyword\acronym ++ \definedummyword\cite ++ \definedummyword\code ++ \definedummyword\command ++ \definedummyword\dfn ++ \definedummyword\emph ++ \definedummyword\env ++ \definedummyword\file ++ \definedummyword\kbd ++ \definedummyword\key ++ \definedummyword\math ++ \definedummyword\option ++ \definedummyword\pxref ++ \definedummyword\ref ++ \definedummyword\samp ++ \definedummyword\strong ++ \definedummyword\tie ++ \definedummyword\uref ++ \definedummyword\url ++ \definedummyword\var ++ \definedummyword\verb ++ \definedummyword\w ++ \definedummyword\xref ++} + ++% \indexnofonts is used when outputting the strings to sort the index ++% by, and when constructing control sequence names. It eliminates all ++% control sequences and just writes whatever the best ASCII sort string ++% would be for a given command (usually its argument). ++% + \def\indexnofonts{% +-% Just ignore accents. +-\let\,=\indexdummyfont +-\let\"=\indexdummyfont +-\let\`=\indexdummyfont +-\let\'=\indexdummyfont +-\let\^=\indexdummyfont +-\let\~=\indexdummyfont +-\let\==\indexdummyfont +-\let\b=\indexdummyfont +-\let\c=\indexdummyfont +-\let\d=\indexdummyfont +-\let\u=\indexdummyfont +-\let\v=\indexdummyfont +-\let\H=\indexdummyfont +-\let\dotless=\indexdummyfont +-% Take care of the plain tex special European modified letters. +-\def\oe{oe}% +-\def\ae{ae}% +-\def\aa{aa}% +-\def\OE{OE}% +-\def\AE{AE}% +-\def\AA{AA}% +-\def\o{o}% +-\def\O{O}% +-\def\l{l}% +-\def\L{L}% +-\def\ss{ss}% +-\let\w=\indexdummyfont +-\let\t=\indexdummyfont +-\let\r=\indexdummyfont +-\let\i=\indexdummyfont +-\let\b=\indexdummyfont +-\let\emph=\indexdummyfont +-\let\strong=\indexdummyfont +-\let\cite=\indexdummyfont +-\let\sc=\indexdummyfont +-%Don't no-op \tt, since it isn't a user-level command +-% and is used in the definitions of the active chars like <, >, |... +-%\let\tt=\indexdummyfont +-\let\tclose=\indexdummyfont +-\let\code=\indexdummyfont +-\let\url=\indexdummyfont +-\let\uref=\indexdummyfont +-\let\env=\indexdummyfont +-\let\acronym=\indexdummyfont +-\let\command=\indexdummyfont +-\let\option=\indexdummyfont +-\let\file=\indexdummyfont +-\let\samp=\indexdummyfont +-\let\kbd=\indexdummyfont +-\let\key=\indexdummyfont +-\let\var=\indexdummyfont +-\let\TeX=\indexdummytex +-\let\dots=\indexdummydots +-\def\@{@}% ++ % Accent commands should become @asis. ++ \def\definedummyaccent##1{\let##1\asis}% ++ % We can just ignore other control letters. ++ \def\definedummyletter##1{\let##1\empty}% ++ % Hopefully, all control words can become @asis. ++ \let\definedummyword\definedummyaccent ++ % ++ \commondummiesnofonts ++ % ++ % Don't no-op \tt, since it isn't a user-level command ++ % and is used in the definitions of the active chars like <, >, |, etc. ++ % Likewise with the other plain tex font commands. ++ %\let\tt=\asis ++ % ++ \def\ { }% ++ \def\@{@}% ++ % how to handle braces? ++ \def\_{\normalunderscore}% ++ % ++ % Non-English letters. ++ \def\AA{AA}% ++ \def\AE{AE}% ++ \def\L{L}% ++ \def\OE{OE}% ++ \def\O{O}% ++ \def\aa{aa}% ++ \def\ae{ae}% ++ \def\l{l}% ++ \def\oe{oe}% ++ \def\o{o}% ++ \def\ss{ss}% ++ \def\exclamdown{!}% ++ \def\questiondown{?}% ++ \def\ordf{a}% ++ \def\ordm{o}% ++ % ++ \def\LaTeX{LaTeX}% ++ \def\TeX{TeX}% ++ % ++ % Assorted special characters. ++ % (The following {} will end up in the sort string, but that's ok.) ++ \def\bullet{bullet}% ++ \def\comma{,}% ++ \def\copyright{copyright}% ++ \def\registeredsymbol{R}% ++ \def\dots{...}% ++ \def\enddots{...}% ++ \def\equiv{==}% ++ \def\error{error}% ++ \def\euro{euro}% ++ \def\guillemetleft{<<}% ++ \def\guillemetright{>>}% ++ \def\guilsinglleft{<}% ++ \def\guilsinglright{>}% ++ \def\expansion{==>}% ++ \def\minus{-}% ++ \def\pounds{pounds}% ++ \def\point{.}% ++ \def\print{-|}% ++ \def\quotedblbase{"}% ++ \def\quotedblleft{"}% ++ \def\quotedblright{"}% ++ \def\quoteleft{`}% ++ \def\quoteright{'}% ++ \def\quotesinglbase{,}% ++ \def\result{=>}% ++ \def\textdegree{degrees}% ++ % ++ % 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 + } + +-% To define \realbackslash, we must make \ not be an escape. +-% We must first make another character (@) an escape +-% so we do not become unable to do a definition. +- +-{\catcode`\@=0 \catcode`\\=\other +- @gdef@realbackslash{\}} +- + \let\indexbackslash=0 %overridden during \printindex. + \let\SETmarginindex=\relax % put index entries in margin (undocumented)? + +-% For \ifx comparisons. +-\def\emptymacro{\empty} +- + % Most index entries go through here, but \dosubind is the general case. +-% +-\def\doind#1#2{\dosubind{#1}{#2}\empty} ++% #1 is the index name, #2 is the entry text. ++\def\doind#1#2{\dosubind{#1}{#2}{}} + + % Workhorse for all \fooindexes. + % #1 is name of index, #2 is stuff to put there, #3 is subentry -- +-% \empty if called from \doind, as we usually are. The main exception +-% is with defuns, which call us directly. ++% empty if called from \doind, as we usually are (the main exception ++% is with most defuns, which call us directly). + % + \def\dosubind#1#2#3{% ++ \iflinks ++ {% ++ % Store the main index entry text (including the third arg). ++ \toks0 = {#2}% ++ % If third arg is present, precede it with a space. ++ \def\thirdarg{#3}% ++ \ifx\thirdarg\empty \else ++ \toks0 = \expandafter{\the\toks0 \space #3}% ++ \fi ++ % ++ \edef\writeto{\csname#1indfile\endcsname}% ++ % ++ \safewhatsit\dosubindwrite ++ }% ++ \fi ++} ++ ++% Write the entry in \toks0 to the index file: ++% ++\def\dosubindwrite{% + % Put the index entry in the margin if desired. + \ifx\SETmarginindex\relax\else +- \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}% ++ \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% + \fi +- {% +- \count255=\lastpenalty +- {% +- \indexdummies % Must do this here, since \bf, etc expand at this stage +- \escapechar=`\\ +- {% +- \let\folio = 0% We will expand all macros now EXCEPT \folio. +- \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now +- % so it will be output as is; and it will print as backslash. +- % +- \def\thirdarg{#3}% +- % +- % If third arg is present, precede it with space in sort key. +- \ifx\thirdarg\emptymacro +- \let\subentry = \empty +- \else +- \def\subentry{ #3}% +- \fi +- % +- % First process the index entry with all font commands turned +- % off to get the string to sort by. +- {\indexnofonts \xdef\indexsorttmp{#2\subentry}}% +- % +- % Now the real index entry with the fonts. +- \toks0 = {#2}% +- % +- % If third (subentry) arg is present, add it to the index +- % string. And include a space. +- \ifx\thirdarg\emptymacro \else +- \toks0 = \expandafter{\the\toks0 \space #3}% +- \fi +- % +- % Set up the complete index entry, with both the sort key +- % and the original text, including any font commands. We write +- % three arguments to \entry to the .?? file, texindex reduces to +- % two when writing the .??s sorted result. +- \edef\temp{% +- \write\csname#1indfile\endcsname{% +- \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}% +- }% +- % +- % If a skip is the last thing on the list now, preserve it +- % by backing up by \lastskip, doing the \write, then inserting +- % the skip again. Otherwise, the whatsit generated by the +- % \write will make \lastskip zero. The result is that sequences +- % like this: +- % @end defun +- % @tindex whatever +- % @defun ... +- % will have extra space inserted, because the \medbreak in the +- % start of the @defun won't see the skip inserted by the @end of +- % the previous defun. +- % +- % But don't do any of this if we're not in vertical mode. We +- % don't want to do a \vskip and prematurely end a paragraph. +- % +- % Avoid page breaks due to these extra skips, too. +- % +- \iflinks +- \ifvmode +- \skip0 = \lastskip +- \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi +- \fi +- % +- \temp % do the write +- % +- % +- \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi +- \fi +- }% +- }% +- \penalty\count255 ++ % ++ % Remember, we are within a group. ++ \indexdummies % Must do this here, since \bf, etc expand at this stage ++ \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now ++ % so it will be output as is; and it will print as backslash. ++ % ++ % Process the index entry with all font commands turned off, to ++ % get the string to sort by. ++ {\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 ++ % three arguments to \entry to the .?? file (four in the ++ % subentry case), texindex reduces to two when writing the .??s ++ % sorted result. ++ \edef\temp{% ++ \write\writeto{% ++ \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% ++ }% ++ \temp ++} ++ ++% Take care of unwanted page breaks/skips around a whatsit: ++% ++% If a skip is the last thing on the list now, preserve it ++% by backing up by \lastskip, doing the \write, then inserting ++% the skip again. Otherwise, the whatsit generated by the ++% \write or \pdfdest will make \lastskip zero. The result is that ++% sequences like this: ++% @end defun ++% @tindex whatever ++% @defun ... ++% will have extra space inserted, because the \medbreak in the ++% start of the @defun won't see the skip inserted by the @end of ++% the previous defun. ++% ++% But don't do any of this if we're not in vertical mode. We ++% don't want to do a \vskip and prematurely end a paragraph. ++% ++% Avoid page breaks due to these extra skips, too. ++% ++% But wait, there is a catch there: ++% We'll have to check whether \lastskip is zero skip. \ifdim is not ++% sufficient for this purpose, as it ignores stretch and shrink parts ++% of the skip. The only way seems to be to check the textual ++% representation of the skip. ++% ++% The following is almost like \def\zeroskipmacro{0.0pt} except that ++% the ``p'' and ``t'' characters have catcode \other, not 11 (letter). ++% ++\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} ++% ++\newskip\whatsitskip ++\newcount\whatsitpenalty ++% ++% ..., ready, GO: ++% ++\def\safewhatsit#1{% ++\ifhmode ++ #1% ++\else ++ % \lastskip and \lastpenalty cannot both be nonzero simultaneously. ++ \whatsitskip = \lastskip ++ \edef\lastskipmacro{\the\lastskip}% ++ \whatsitpenalty = \lastpenalty ++ % ++ % If \lastskip is nonzero, that means the last item was a ++ % skip. And since a skip is discardable, that means this ++ % -\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 ++ \else ++ \vskip-\whatsitskip ++ \fi ++ % ++ #1% ++ % ++ \ifx\lastskipmacro\zeroskipmacro ++ % If \lastskip was zero, perhaps the last item was a penalty, and ++ % perhaps it was >=10000, e.g., a \nobreak. In that case, we want ++ % 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. ++ % would allow a break between the index-whatever whatsit ++ % and the "Description." paragraph. ++ \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi ++ \else ++ % On the other hand, if we had a nonzero \lastskip, ++ % this make-up glue would be preceded by a non-discardable item ++ % (the whatsit from the \write), so we must insert a \nobreak. ++ \nobreak\vskip\whatsitskip ++ \fi ++\fi + } - 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 + % The index entry written in the file actually looks like +@@ -2938,13 +4380,13 @@ width0pt\relax} \fi + % @printindex causes a particular index (the ??s file) to get printed. + % It does not print any chapter heading (usually an @unnumbered). + % +-\def\printindex{\parsearg\doprintindex} +-\def\doprintindex#1{\begingroup ++\parseargdef\printindex{\begingroup + \dobreak \chapheadingskip{10000}% + % + \smallfonts \rm + \tolerance = 9500 +- \indexbreaks ++ \plainfrenchspacing ++ \everypar = {}% don't want the \kern\-parindent from indentation suppression. + % + % See if the index file exists and is nonempty. + % Change catcode of @ here so that if the index file contains +@@ -2971,7 +4413,7 @@ width0pt\relax} \fi + % 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. +- \def\indexbackslash{\rawbackslashxx}% ++ \def\indexbackslash{\backslashcurfont}% + \catcode`\\ = 0 + \escapechar = `\\ + \begindoublecolumns +@@ -2993,7 +4435,10 @@ width0pt\relax} \fi + \removelastskip + % + % We like breaks before the index initials, so insert a bonus. +- \penalty -300 ++ \nobreak ++ \vskip 0pt plus 3\baselineskip ++ \penalty 0 ++ \vskip 0pt plus -3\baselineskip + % + % 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 +4448,117 @@ width0pt\relax} \fi + % No shrink because it confuses \balancecolumns. + \vskip 1.67\baselineskip plus .5\baselineskip + \leftline{\secbf #1}% +- \vskip .33\baselineskip plus .1\baselineskip +- % + % Do our best not to break after the initial. + \nobreak ++ \vskip .33\baselineskip plus .1\baselineskip + }} - if test "$droppeddeps" = yes; then - if test "$module" = yes; then -- 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." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" -@@ -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." +-% This typesets a paragraph consisting of #1, dot leaders, and then #2 +-% flush to the right margin. It is used for index and table of contents +-% entries. The paragraph is indented by \leftskip. ++% \entry typesets a paragraph consisting of the text (#1), dot leaders, and ++% then page number (#2) flushed to the right margin. It is used for index ++% and table of contents entries. The paragraph is indented by \leftskip. + % +-\def\entry#1#2{\begingroup +- % +- % Start a new paragraph if necessary, so our assignments below can't +- % affect previous text. +- \par +- % +- % Do not fill out the last line with white space. +- \parfillskip = 0in +- % +- % No extra space above this paragraph. +- \parskip = 0in +- % +- % Do not prefer a separate line ending with a hyphen to fewer lines. +- \finalhyphendemerits = 0 +- % +- % \hangindent is only relevant when the entry text and page number +- % don't both fit on one line. In that case, bob suggests starting the +- % dots pretty far over on the line. Unfortunately, a large +- % indentation looks wrong when the entry text itself is broken across +- % lines. So we use a small indentation and put up with long leaders. +- % +- % \hangafter is reset to 1 (which is the value we want) at the start +- % of each paragraph, so we need not do anything with that. +- \hangindent = 2em +- % +- % When the entry text needs to be broken, just fill out the first line +- % with blank space. +- \rightskip = 0pt plus1fil +- % +- % A bit of stretch before each entry for the benefit of balancing columns. +- \vskip 0pt plus1pt +- % +- % Start a ``paragraph'' for the index entry so the line breaking +- % parameters we've set above will have an effect. +- \noindent +- % +- % Insert the text of the index entry. TeX will do line-breaking on it. +- #1% +- % The following is kludged to not output a line of dots in the index if +- % there are no page numbers. The next person who breaks this will be +- % cursed by a Unix daemon. +- \def\tempa{{\rm }}% +- \def\tempb{#2}% +- \edef\tempc{\tempa}% +- \edef\tempd{\tempb}% +- \ifx\tempc\tempd\ \else% ++% A straightforward implementation would start like this: ++% \def\entry#1#2{... ++% 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. ++% ++% The right solution is to prevent \entry from swallowing the whole text. ++% --kasal, 21nov03 ++\def\entry{% ++ \begingroup + % +- % If we must, put the page number on a line of its own, and fill out +- % this line with blank space. (The \hfil is overwhelmed with the +- % fill leaders glue in \indexdotfill if the page number does fit.) +- \hfil\penalty50 +- \null\nobreak\indexdotfill % Have leaders before the page number. ++ % Start a new paragraph if necessary, so our assignments below can't ++ % affect previous text. ++ \par + % +- % The `\ ' here is removed by the implicit \unskip that TeX does as +- % part of (the primitive) \par. Without it, a spurious underfull +- % \hbox ensues. +- \ifpdf +- \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. ++ % Do not fill out the last line with white space. ++ \parfillskip = 0in ++ % ++ % No extra space above this paragraph. ++ \parskip = 0in ++ % ++ % Do not prefer a separate line ending with a hyphen to fewer lines. ++ \finalhyphendemerits = 0 ++ % ++ % \hangindent is only relevant when the entry text and page number ++ % don't both fit on one line. In that case, bob suggests starting the ++ % dots pretty far over on the line. Unfortunately, a large ++ % indentation looks wrong when the entry text itself is broken across ++ % lines. So we use a small indentation and put up with long leaders. ++ % ++ % \hangafter is reset to 1 (which is the value we want) at the start ++ % of each paragraph, so we need not do anything with that. ++ \hangindent = 2em ++ % ++ % When the entry text needs to be broken, just fill out the first line ++ % with blank space. ++ \rightskip = 0pt plus1fil ++ % ++ % A bit of stretch before each entry for the benefit of balancing ++ % columns. ++ \vskip 0pt plus1pt ++ % ++ % Swallow the left brace of the text (first parameter): ++ \afterassignment\doentry ++ \let\temp = ++} ++\def\doentry{% ++ \bgroup % Instead of the swallowed brace. ++ \noindent ++ \aftergroup\finishentry ++ % And now comes the text of the entry. ++} ++\def\finishentry#1{% ++ % #1 is the page number. ++ % ++ % The following is kludged to not output a line of dots in the index if ++ % there are no page numbers. The next person who breaks this will be ++ % cursed by a Unix daemon. ++ \setbox\boxA = \hbox{#1}% ++ \ifdim\wd\boxA = 0pt ++ \ % + \else +- \ #2% The page number ends the paragraph. ++ % ++ % If we must, put the page number on a line of its own, and fill out ++ % this line with blank space. (The \hfil is overwhelmed with the ++ % fill leaders glue in \indexdotfill if the page number does fit.) ++ \hfil\penalty50 ++ \null\nobreak\indexdotfill % Have leaders before the page number. ++ % ++ % The `\ ' here is removed by the implicit \unskip that TeX does as ++ % part of (the primitive) \par. Without it, a spurious underfull ++ % \hbox ensues. ++ \ifpdf ++ \pdfgettoks#1.% ++ \ \the\toksA ++ \else ++ \ #1% ++ \fi + \fi +- \fi% +- \par +-\endgroup} ++ \par ++ \endgroup ++} -- 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." -+ 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." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module -@@ -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 -+ new_libs= -+ for path in $notinst_path; do -+ case " $new_libs " in -+ *" -L$path/$objdir "*) ;; -+ *) -+ case " $deplibs " in -+ *" -L$path/$objdir "*) -+ new_libs="$new_libs -L$path/$objdir" ;; -+ esac -+ ;; -+ esac -+ done -+ for deplib in $deplibs; do -+ case $deplib in -+ -L*) -+ case " $new_libs " in -+ *" $deplib "*) ;; -+ *) new_libs="$new_libs $deplib" ;; -+ esac -+ ;; -+ *) new_libs="$new_libs $deplib" ;; -+ esac -+ done -+ deplibs="$new_libs" +-% Like \dotfill except takes at least 1 em. ++% Like plain.tex's \dotfill, except uses up at least 1 em. + \def\indexdotfill{\cleaders +- \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} ++ \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} - # All the library-specific variables (install_libdir is set above). - library_names= -@@ -3038,7 +6879,7 @@ + \def\primary #1{\line{#1\hfil}} - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then -- if test $hardcode_into_libs = yes; then -+ if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= -@@ -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 -+ 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,109 +6939,143 @@ - fi + \newskip\secondaryindent \secondaryindent=0.5cm +- +-\def\secondary #1#2{ +-{\parfillskip=0in \parskip=0in +-\hangindent =1in \hangafter=1 +-\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par ++\def\secondary#1#2{{% ++ \parfillskip=0in ++ \parskip=0in ++ \hangindent=1in ++ \hangafter=1 ++ \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill ++ \ifpdf ++ \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. ++ \else ++ #2 ++ \fi ++ \par + }} - # 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" -- shift; shift -+ shift -+ realname="$1" -+ shift + % Define two-column mode, which we use to typeset indexes. +@@ -3149,7 +4618,6 @@ width0pt\relax} \fi + % + % Double the \vsize as well. (We don't need a separate register here, + % since nobody clobbers \vsize.) +- \advance\vsize by -\ht\partialpage + \vsize = 2\vsize + } - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi -- test -z "$dlname" && dlname=$soname -+ if test -z "$dlname"; then -+ dlname=$soname -+ fi +@@ -3163,6 +4631,7 @@ width0pt\relax} \fi + % previous page. + \dimen@ = \vsize + \divide\dimen@ by 2 ++ \advance\dimen@ by -\ht\partialpage + % + % box0 will be the left-hand column, box2 the right. + \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ +@@ -3170,16 +4639,47 @@ width0pt\relax} \fi + \unvbox255 + \penalty\outputpenalty + } ++% ++% Re-output the contents of the output page -- any previous material, ++% followed by the two boxes we just split, in box0 and box2. + \def\pagesofar{% +- % Re-output the contents of the output page -- any previous material, +- % followed by the two boxes we just split, in box0 and box2. + \unvbox\partialpage + % + \hsize = \doublecolumnhsize + \wd0=\hsize \wd2=\hsize + \hbox to\pagewidth{\box0\hfil\box2}% + } ++% ++% All done with double columns. + \def\enddoublecolumns{% ++ % The following penalty ensures that the page builder is exercised ++ % _before_ we change the output routine. This is necessary in the ++ % following situation: ++ % ++ % The last section of the index consists only of a single entry. ++ % Before this section, \pagetotal is less than \pagegoal, so no ++ % break occurs before the last section starts. However, the last ++ % section, consisting of \initial and the single \entry, does not ++ % fit on the page and has to be broken off. Without the following ++ % penalty the page builder will not be exercised until \eject ++ % below, and by that time we'll already have changed the output ++ % routine to the \balancecolumns version, so the next-to-last ++ % double-column page will be processed with \balancecolumns, which ++ % is wrong: The two columns will go to the main vertical list, with ++ % the broken-off section in the recent contributions. As soon as ++ % the output routine finishes, TeX starts reconsidering the page ++ % break. The two columns and the broken-off section both fit on the ++ % page, because the two columns now take up only half of the page ++ % goal. When TeX sees \eject from below which follows the final ++ % section, it invokes the new output routine that we've set after ++ % \balancecolumns below; \onepageout will try to fit the two columns ++ % and the final section into the vbox of \pageheight (see ++ % \pagebody), causing an overfull box. ++ % ++ % Note that glue won't work here, because glue does not exercise the ++ % page builder, unlike penalties (see The TeXbook, pp. 280-281). ++ \penalty0 ++ % + \output = {% + % Split the last of the double-column material. Leave it on the + % current page, no automatic page break. +@@ -3203,8 +4703,9 @@ width0pt\relax} \fi + % \endgroup where \vsize got restored). + \pagegoal = \vsize + } ++% ++% Called at the end of the double column material. + \def\balancecolumns{% +- % Called at the end of the double column material. + \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. + \dimen@ = \ht0 + \advance\dimen@ by \topskip +@@ -3234,6 +4735,12 @@ width0pt\relax} \fi + \message{sectioning,} + % Chapters, sections, etc. - lib="$output_objdir/$realname" -+ linknames= - for link - do - linknames="$linknames $link" - done ++% \unnumberedno is an oxymoron, of course. But we count the unnumbered ++% sections so that we can refer to them unambiguously in the pdf ++% outlines by their "section number". We avoid collisions with chapter ++% numbers by starting them at 10000. (If a document ever has 10000 ++% chapters, we're in trouble anyway, I'm sure.) ++\newcount\unnumberedno \unnumberedno = 10000 + \newcount\chapno + \newcount\secno \secno=0 + \newcount\subsecno \subsecno=0 +@@ -3241,9 +4748,12 @@ width0pt\relax} \fi --# # Ensure that we have .o objects for linkers which dislike .lo --# # (e.g. aix) in case we are running --disable-static --# for obj in $libobjs; do --# xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` --# if test "X$xdir" = "X$obj"; then --# xdir="." --# else --# xdir="$xdir" --# fi --# baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` --# oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` --# if test ! -f $xdir/$oldobj && test "$baseobj" != "$oldobj"; then --# $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" --# $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? --# fi --# 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 "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 + % This counter is funny since it counts through charcodes of letters A, B, ... + \newcount\appendixno \appendixno = `\@ ++% + % \def\appendixletter{\char\the\appendixno} +-% We do the following for the sake of pdftex, which needs the actual ++% We do the following ugly conditional instead of the above simple ++% construct for the sake of pdftex, which needs the actual + % letter in the expansion, not just typeset. ++% + \def\appendixletter{% + \ifnum\appendixno=`A A% + \else\ifnum\appendixno=`B B% +@@ -3279,13 +4789,18 @@ width0pt\relax} \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\fi} - # 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 -- 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 - IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || exit $? -+ eval cmd=\"$cmd\" -+ 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. -+ 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 -- $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"' -+ 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 - 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{} - 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 + \newcount\absseclevel % used to calculate proper heading level +-\newcount\secbase\secbase=0 % @raise/lowersections modify this count ++\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count -+ 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 -+ 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" -- $run ${rm}r "$gentop" -- $show "$mkdir $gentop" -- $run $mkdir "$gentop" -- status=$? -- if test $status -ne 0 && test ! -d "$gentop"; then -- exit $status -- fi - generated="$generated $gentop" + % @raisesections: treat @section as chapter, @subsection as section, etc. + \def\raisesections{\global\advance\secbase by -1} +@@ -3295,287 +4810,246 @@ width0pt\relax} \fi + \def\lowersections{\global\advance\secbase by 1} + \let\down=\lowersections % original BFox name -- for xlib in $convenience; do -- # Extract the objects. -- case $xlib in -- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; -- *) xabs=`pwd`"/$xlib" ;; -- esac -- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` -- xdir="$gentop/$xlib" +-% Choose a numbered-heading macro +-% #1 is heading level if unmodified by @raisesections or @lowersections +-% #2 is text for heading +-\def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 +-\ifcase\absseclevel +- \chapterzzz{#2} +-\or +- \seczzz{#2} +-\or +- \numberedsubseczzz{#2} +-\or +- \numberedsubsubseczzz{#2} +-\else +- \ifnum \absseclevel<0 +- \chapterzzz{#2} ++% we only have subsub. ++\chardef\maxseclevel = 3 ++% ++% A numbered section within an unnumbered changes to unnumbered too. ++% To achive this, remember the "biggest" unnum. sec. we are currently in: ++\chardef\unmlevel = \maxseclevel ++% ++% Trace whether the current chapter is an appendix or not: ++% \chapheadtype is "N" or "A", unnumbered chapters are ignored. ++\def\chapheadtype{N} ++ ++% Choose a heading macro ++% #1 is heading type ++% #2 is heading level ++% #3 is text for heading ++\def\genhead#1#2#3{% ++ % Compute the abs. sec. level: ++ \absseclevel=#2 ++ \advance\absseclevel by \secbase ++ % Make sure \absseclevel doesn't fall outside the range: ++ \ifnum \absseclevel < 0 ++ \absseclevel = 0 + \else +- \numberedsubsubseczzz{#2} ++ \ifnum \absseclevel > 3 ++ \absseclevel = 3 ++ \fi + \fi +-\fi +-} - -- $show "${rm}r $xdir" -- $run ${rm}r "$xdir" -- $show "$mkdir $xdir" -- $run $mkdir "$xdir" -- status=$? -- if test $status -ne 0 && test ! -d "$xdir"; then -- exit $status -- fi -- $show "(cd $xdir && $AR x $xabs)" -- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? +-% like \numhead, but chooses appendix heading levels +-\def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 +-\ifcase\absseclevel +- \appendixzzz{#2} +-\or +- \appendixsectionzzz{#2} +-\or +- \appendixsubseczzz{#2} +-\or +- \appendixsubsubseczzz{#2} +-\else +- \ifnum \absseclevel<0 +- \appendixzzz{#2} ++ % The heading type: ++ \def\headtype{#1}% ++ \if \headtype U% ++ \ifnum \absseclevel < \unmlevel ++ \chardef\unmlevel = \absseclevel ++ \fi + \else +- \appendixsubsubseczzz{#2} ++ % Check for appendix sections: ++ \ifnum \absseclevel = 0 ++ \edef\chapheadtype{\headtype}% ++ \else ++ \if \headtype A\if \chapheadtype N% ++ \errmessage{@appendix... within a non-appendix chapter}% ++ \fi\fi ++ \fi ++ % Check for numbered within unnumbered: ++ \ifnum \absseclevel > \unmlevel ++ \def\headtype{U}% ++ \else ++ \chardef\unmlevel = 3 ++ \fi + \fi +-\fi +-} - -- libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` -- done -+ func_extract_archives $gentop $convenience -+ libobjs="$libobjs $func_extract_archives_result" -+ test "X$libobjs" = "X " && libobjs= - fi - fi +-% like \numhead, but chooses numberless heading levels +-\def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 +-\ifcase\absseclevel +- \unnumberedzzz{#2} +-\or +- \unnumberedseczzz{#2} +-\or +- \unnumberedsubseczzz{#2} +-\or +- \unnumberedsubsubseczzz{#2} +-\else +- \ifnum \absseclevel<0 +- \unnumberedzzz{#2} ++ % Now print the heading: ++ \if \headtype U% ++ \ifcase\absseclevel ++ \unnumberedzzz{#3}% ++ \or \unnumberedseczzz{#3}% ++ \or \unnumberedsubseczzz{#3}% ++ \or \unnumberedsubsubseczzz{#3}% ++ \fi + \else +- \unnumberedsubsubseczzz{#2} ++ \if \headtype A% ++ \ifcase\absseclevel ++ \appendixzzz{#3}% ++ \or \appendixsectionzzz{#3}% ++ \or \appendixsubseczzz{#3}% ++ \or \appendixsubsubseczzz{#3}% ++ \fi ++ \else ++ \ifcase\absseclevel ++ \chapterzzz{#3}% ++ \or \seczzz{#3}% ++ \or \numberedsubseczzz{#3}% ++ \or \numberedsubsubseczzz{#3}% ++ \fi ++ \fi + \fi +-\fi ++ \suppressfirstparagraphindent + } -@@ -3207,21 +7086,37 @@ +-% @chapter, @appendix, @unnumbered. +-\def\thischaptername{No Chapter Title} +-\outer\def\chapter{\parsearg\chapteryyy} +-\def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz +-\def\chapterzzz #1{% +-\secno=0 \subsecno=0 \subsubsecno=0 +-\global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% +-\chapmacro {#1}{\the\chapno}% +-\gdef\thissection{#1}% +-\gdef\thischaptername{#1}% +-% We don't substitute the actual chapter name into \thischapter +-% because we don't want its macros evaluated now. +-\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% +-\toks0 = {#1}% +-\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% +- {\the\chapno}}}% +-\temp +-\donoderef +-\global\let\section = \numberedsec +-\global\let\subsection = \numberedsubsec +-\global\let\subsubsection = \numberedsubsubsec ++% an interface: ++\def\numhead{\genhead N} ++\def\apphead{\genhead A} ++\def\unnmhead{\genhead U} ++ ++% @chapter, @appendix, @unnumbered. Increment top-level counter, reset ++% all lower-level sectioning counters to zero. ++% ++% Also set \chaplevelprefix, which we prepend to @float sequence numbers ++% (e.g., figures), q.v. By default (before any chapter), that is empty. ++\let\chaplevelprefix = \empty ++% ++\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz ++\def\chapterzzz#1{% ++ % section resetting is \global in case the chapter is in a group, such ++ % as an @include file. ++ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 ++ \global\advance\chapno by 1 ++ % ++ % Used for \float. ++ \gdef\chaplevelprefix{\the\chapno.}% ++ \resetallfloatnos ++ % ++ \message{\putwordChapter\space \the\chapno}% ++ % ++ % Write the actual heading. ++ \chapmacro{#1}{Ynumbered}{\the\chapno}% ++ % ++ % So @section and the like are numbered underneath this chapter. ++ \global\let\section = \numberedsec ++ \global\let\subsection = \numberedsubsec ++ \global\let\subsubsection = \numberedsubsubsec + } - # 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 +-\outer\def\appendix{\parsearg\appendixyyy} +-\def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz +-\def\appendixzzz #1{% +-\secno=0 \subsecno=0 \subsubsecno=0 +-\global\advance \appendixno by 1 +-\message{\putwordAppendix\space \appendixletter}% +-\chapmacro {#1}{\putwordAppendix{} \appendixletter}% +-\gdef\thissection{#1}% +-\gdef\thischaptername{#1}% +-\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% +-\toks0 = {#1}% +-\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% +- {\putwordAppendix{} \appendixletter}}}% +-\temp +-\appendixnoderef +-\global\let\section = \appendixsec +-\global\let\subsection = \appendixsubsec +-\global\let\subsubsection = \appendixsubsubsec ++\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 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}% ++ % ++ \chapmacro{#1}{Yappendix}{\appendixletter}% ++ % ++ \global\let\section = \appendixsec ++ \global\let\subsection = \appendixsubsec ++ \global\let\subsubsection = \appendixsubsubsec ++} ++ ++\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz ++\def\unnumberedzzz#1{% ++ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 ++ \global\advance\unnumberedno by 1 ++ % ++ % Since an unnumbered has no number, no prefix for figures. ++ \global\let\chaplevelprefix = \empty ++ \resetallfloatnos ++ % ++ % This used to be simply \message{#1}, but TeX fully expands the ++ % argument to \message. Therefore, if #1 contained @-commands, TeX ++ % expanded them. For example, in `@unnumbered The @cite{Book}', TeX ++ % expanded @cite (which turns out to cause errors because \cite is meant ++ % to be executed, not expanded). ++ % ++ % Anyway, we don't want the fully-expanded definition of @cite to appear ++ % as a result of the \message, we just want `@cite' itself. We use ++ % \the to achieve this: TeX expands \the only once, ++ % simply yielding the contents of . (We also do this for ++ % the toc entries.) ++ \toks0 = {#1}% ++ \message{(\the\toks0)}% ++ % ++ \chapmacro{#1}{Ynothing}{\the\unnumberedno}% ++ % ++ \global\let\section = \unnumberedsec ++ \global\let\subsection = \unnumberedsubsec ++ \global\let\subsubsection = \unnumberedsubsubsec + } + + % @centerchap is like @unnumbered, but the heading is centered. +-\outer\def\centerchap{\parsearg\centerchapyyy} +-\def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}} ++\outer\parseargdef\centerchap{% ++ % Well, we could do the following in a group, but that would break ++ % an assumption that \chapmacro is called at the outermost level. ++ % Thus we are safer this way: --kasal, 24feb04 ++ \let\centerparametersmaybe = \centerparameters ++ \unnmhead0{#1}% ++ \let\centerparametersmaybe = \relax ++} - # 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\" -+ cmds=$module_expsym_cmds -+ else -+ eval test_cmds=\"$module_cmds\" -+ cmds=$module_cmds -+ fi - else -- eval 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:" && -+ 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 -+ # or, if using GNU ld and skipped_export is not :, use a linker -+ # script. + % @top is like @unnumbered. +-\outer\def\top{\parsearg\unnumberedyyy} +- +-\outer\def\unnumbered{\parsearg\unnumberedyyy} +-\def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz +-\def\unnumberedzzz #1{% +-\secno=0 \subsecno=0 \subsubsecno=0 +-% +-% This used to be simply \message{#1}, but TeX fully expands the +-% argument to \message. Therefore, if #1 contained @-commands, TeX +-% expanded them. For example, in `@unnumbered The @cite{Book}', TeX +-% expanded @cite (which turns out to cause errors because \cite is meant +-% to be executed, not expanded). +-% +-% Anyway, we don't want the fully-expanded definition of @cite to appear +-% as a result of the \message, we just want `@cite' itself. We use +-% \the to achieve this: TeX expands \the only once, +-% simply yielding the contents of . (We also do this for +-% the toc entries.) +-\toks0 = {#1}\message{(\the\toks0)}% +-% +-\unnumbchapmacro {#1}% +-\gdef\thischapter{#1}\gdef\thissection{#1}% +-\toks0 = {#1}% +-\edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}}}% +-\temp +-\unnumbnoderef +-\global\let\section = \unnumberedsec +-\global\let\subsection = \unnumberedsubsec +-\global\let\subsubsection = \unnumberedsubsubsec +-} ++\let\top\unnumbered - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we -@@ -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"` + % Sections. +-\outer\def\numberedsec{\parsearg\secyyy} +-\def\secyyy #1{\numhead1{#1}} % normally calls seczzz +-\def\seczzz #1{% +-\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % +-\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% +-\toks0 = {#1}% +-\edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% +- {\the\chapno}{\the\secno}}}% +-\temp +-\donoderef +-\nobreak ++\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz ++\def\seczzz#1{% ++ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 ++ \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% + } - # Clear the reloadable object creation command queue and - # initialize k to one. -- test_cmds= -- concat_cmds= -- objlist= -- delfiles= -- last_robj= -- k=1 -- output=$output_objdir/$save_output-${k}.$objext -- # Loop over the list of objects to be linked. -- for obj in $save_libobjs -- do -- eval test_cmds=\"$reload_cmds $objlist $last_robj\" -- if test "X$objlist" = X || -- { len=`expr "X$test_cmds" : ".*"` && -- 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. -- 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/$save_output-${k}.$objext -- k=`expr $k + 1` -- output=$output_objdir/$save_output-${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~ -- eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" -+ test_cmds= -+ concat_cmds= -+ objlist= -+ last_robj= -+ k=1 +-\outer\def\appendixsection{\parsearg\appendixsecyyy} +-\outer\def\appendixsec{\parsearg\appendixsecyyy} +-\def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz +-\def\appendixsectionzzz #1{% +-\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % +-\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% +-\toks0 = {#1}% +-\edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% +- {\appendixletter}{\the\secno}}}% +-\temp +-\appendixnoderef +-\nobreak ++\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz ++\def\appendixsectionzzz#1{% ++ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 ++ \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% + } ++\let\appendixsec\appendixsection -- # Set up a command to remove the reloadale object files -- # 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 -+ 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 +-\outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} +-\def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz +-\def\unnumberedseczzz #1{% +-\plainsecheading {#1}\gdef\thissection{#1}% +-\toks0 = {#1}% +-\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}% +-\temp +-\unnumbnoderef +-\nobreak ++\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz ++\def\unnumberedseczzz#1{% ++ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 ++ \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% + } -- $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" + % Subsections. +-\outer\def\numberedsubsec{\parsearg\numberedsubsecyyy} +-\def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz +-\def\numberedsubseczzz #1{% +-\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % +-\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% +-\toks0 = {#1}% +-\edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% +- {\the\chapno}{\the\secno}{\the\subsecno}}}% +-\temp +-\donoderef +-\nobreak ++\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz ++\def\numberedsubseczzz#1{% ++ \global\subsubsecno=0 \global\advance\subsecno by 1 ++ \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% + } -- # Loop through the commands generated above and execute them. -- IFS="${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 +-\outer\def\appendixsubsec{\parsearg\appendixsubsecyyy} +-\def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz +-\def\appendixsubseczzz #1{% +-\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % +-\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% +-\toks0 = {#1}% +-\edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% +- {\appendixletter}{\the\secno}{\the\subsecno}}}% +-\temp +-\appendixnoderef +-\nobreak ++\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz ++\def\appendixsubseczzz#1{% ++ \global\subsubsecno=0 \global\advance\subsecno by 1 ++ \sectionheading{#1}{subsec}{Yappendix}% ++ {\appendixletter.\the\secno.\the\subsecno}% + } -- 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 -+ output=$save_output +-\outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} +-\def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz +-\def\unnumberedsubseczzz #1{% +-\plainsubsecheading {#1}\gdef\thissection{#1}% +-\toks0 = {#1}% +-\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry% +- {\the\toks0}}}% +-\temp +-\unnumbnoderef +-\nobreak ++\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz ++\def\unnumberedsubseczzz#1{% ++ \global\subsubsecno=0 \global\advance\subsecno by 1 ++ \sectionheading{#1}{subsec}{Ynothing}% ++ {\the\unnumberedno.\the\secno.\the\subsecno}% + } - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" -+ test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. + % Subsubsections. +-\outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy} +-\def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz +-\def\numberedsubsubseczzz #1{% +-\gdef\thissection{#1}\global\advance \subsubsecno by 1 % +-\subsubsecheading {#1} +- {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% +-\toks0 = {#1}% +-\edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% +- {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% +-\temp +-\donoderef +-\nobreak ++\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz ++\def\numberedsubsubseczzz#1{% ++ \global\advance\subsubsecno by 1 ++ \sectionheading{#1}{subsubsec}{Ynumbered}% ++ {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% + } - # Do each of the archive commands. -- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then -- eval cmds=\"$archive_expsym_cmds\" -- else -- eval cmds=\"$archive_cmds\" -- fi -+ if test "$module" = yes && test -n "$module_cmds" ; then -+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then -+ cmds=$module_expsym_cmds -+ else -+ cmds=$module_cmds -+ fi -+ else -+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then -+ cmds=$archive_expsym_cmds -+ else -+ cmds=$archive_cmds -+ fi -+ fi -+ fi +-\outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy} +-\def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz +-\def\appendixsubsubseczzz #1{% +-\gdef\thissection{#1}\global\advance \subsubsecno by 1 % +-\subsubsecheading {#1} +- {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% +-\toks0 = {#1}% +-\edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% +- {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% +-\temp +-\appendixnoderef +-\nobreak ++\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz ++\def\appendixsubsubseczzz#1{% ++ \global\advance\subsubsecno by 1 ++ \sectionheading{#1}{subsubsec}{Yappendix}% ++ {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% + } -- # 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='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || exit $? -- done -- IFS="$save_ifs" -+ 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\" -+ $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" +-\outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} +-\def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz +-\def\unnumberedsubsubseczzz #1{% +-\plainsubsubsecheading {#1}\gdef\thissection{#1}% +-\toks0 = {#1}% +-\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry% +- {\the\toks0}}}% +-\temp +-\unnumbnoderef +-\nobreak ++\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz ++\def\unnumberedsubsubseczzz#1{% ++ \global\advance\subsubsecno by 1 ++ \sectionheading{#1}{subsubsec}{Ynothing}% ++ {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% + } + +-% These are variants which are not "outer", so they can appear in @ifinfo. +-% Actually, they should now be obsolete; ordinary section commands should work. +-\def\infotop{\parsearg\unnumberedzzz} +-\def\infounnumbered{\parsearg\unnumberedzzz} +-\def\infounnumberedsec{\parsearg\unnumberedseczzz} +-\def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz} +-\def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz} +- +-\def\infoappendix{\parsearg\appendixzzz} +-\def\infoappendixsec{\parsearg\appendixseczzz} +-\def\infoappendixsubsec{\parsearg\appendixsubseczzz} +-\def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz} +- +-\def\infochapter{\parsearg\chapterzzz} +-\def\infosection{\parsearg\sectionzzz} +-\def\infosubsection{\parsearg\subsectionzzz} +-\def\infosubsubsection{\parsearg\subsubsectionzzz} +- + % These macros control what the section commands do, according + % to what kind of chapter we are in (ordinary, appendix, or unnumbered). + % Define them by default for a numbered chapter. +-\global\let\section = \numberedsec +-\global\let\subsection = \numberedsubsec +-\global\let\subsubsection = \numberedsubsubsec ++\let\section = \numberedsec ++\let\subsection = \numberedsubsec ++\let\subsubsection = \numberedsubsubsec - # 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 $? -- 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 -+ func_show_eval '${RM}r "$gentop"' -+ fi -+ fi -+ -+ exit $EXIT_SUCCESS - fi + % Define @majorheading, @heading and @subheading - # Create links to the real library. - 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 +@@ -3588,23 +5062,27 @@ width0pt\relax} \fi + % if justification is not attempted. Hence \raggedright. -@@ -3349,38 +7381,35 @@ - ;; - obj) -- if test -n "$deplibs"; then -- $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 -- fi +-\def\majorheading{\parsearg\majorheadingzzz} +-\def\majorheadingzzz #1{% +-{\advance\chapheadingskip by 10pt \chapbreak }% +-{\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 +- \parindent=0pt\raggedright +- \rm #1\hfill}}\bigskip \par\penalty 200} ++\def\chapheading{\chapbreak \parsearg\chapheadingzzz} ++\def\chapheadingzzz#1{% ++ {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 ++ \parindent=0pt\raggedright ++ \rm #1\hfill}}% ++ \bigskip \par\penalty 200\relax ++ \suppressfirstparagraphindent ++} + + % @heading, @subheading, @subsubheading. +-\def\heading{\parsearg\plainsecheading} +-\def\subheading{\parsearg\plainsubsecheading} +-\def\subsubheading{\parsearg\plainsubsubsecheading} ++\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} ++ \suppressfirstparagraphindent} ++\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} ++ \suppressfirstparagraphindent} ++\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} ++ \suppressfirstparagraphindent} + + % These macros generate a chapter, section, etc. heading only + % (including whitespace, linebreaking, etc. around it), +@@ -3613,8 +5091,6 @@ width0pt\relax} \fi + %%% Args are the skip and penalty (usually negative) + \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} + +-\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} - - 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 + %%% Define plain chapter starts, and page on/off switching for it + % Parameter controlling skip before chapter headings (if needed) -- if test -n "$rpath"; then -- $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 -- fi -+ case " $deplibs" in -+ *\ -l* | *\ -L*) -+ func_warning "\`-l' and \`-L' are ignored for objects" ;; -+ esac +@@ -3622,7 +5098,20 @@ width0pt\relax} \fi -- 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" + \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 ++} -- 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" + \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} -- 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" +@@ -3637,7 +5126,7 @@ width0pt\relax} \fi + \global\let\pagealignmacro=\chappager + \global\def\HEADINGSon{\HEADINGSsingle}} - case $output in - *.lo) -- if test -n "$objs$old_deplibs"; then -- $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 -- exit 1 -- 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 +-\def\CHAPPAGodd{ ++\def\CHAPPAGodd{% + \global\let\contentsalignmacro = \chapoddpage + \global\let\pchapsepmacro=\chapoddpage + \global\let\pagealignmacro=\chapoddpage +@@ -3645,107 +5134,275 @@ width0pt\relax} \fi - # Delete the old objects. -- $run $rm $obj $libobj -+ $opt_dry_run || $RM $obj $libobj + \CHAPPAGon + +-\def\CHAPFplain{ +-\global\let\chapmacro=\chfplain +-\global\let\unnumbchapmacro=\unnchfplain +-\global\let\centerchapmacro=\centerchfplain} +- +-% Plain chapter opening. +-% #1 is the text, #2 the chapter number or empty if unnumbered. +-\def\chfplain#1#2{% ++% Chapter opening. ++% ++% #1 is the text, #2 is the section type (Ynumbered, Ynothing, ++% Yappendix, Yomitfromtoc), #3 the chapter number. ++% ++% To test against our argument. ++\def\Ynothingkeyword{Ynothing} ++\def\Yomitfromtockeyword{Yomitfromtoc} ++\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}% ++ \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum: ++ \noexpand\thischaptername}% ++ }% ++ \else ++ \toks0={#1}% ++ \xdef\lastchapterdefs{% ++ \gdef\noexpand\thischaptername{\the\toks0}% ++ \gdef\noexpand\thischapternum{\the\chapno}% ++ \gdef\noexpand\thischapter{\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 +- \def\chapnum{#2}% +- \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}% ++ % ++ % 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\lastsection{#1}% ++ % ++ % Only insert the separating space if we have a chapter/appendix ++ % number, and don't print the unnumbered ``number''. ++ \ifx\temptype\Ynothingkeyword ++ \setbox0 = \hbox{}% ++ \def\toctype{unnchap}% ++ \else\ifx\temptype\Yomitfromtockeyword ++ \setbox0 = \hbox{}% contents like unnumbered, but no toc entry ++ \def\toctype{omit}% ++ \else\ifx\temptype\Yappendixkeyword ++ \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% ++ \def\toctype{app}% ++ \else ++ \setbox0 = \hbox{#3\enspace}% ++ \def\toctype{numchap}% ++ \fi\fi\fi ++ % ++ % Write the toc entry for this chapter. Must come before the ++ % \donoderef, because we include the current node name in the toc ++ % entry, and \donoderef resets it to empty. ++ \writetocentry{\toctype}{#1}{#3}% ++ % ++ % For pdftex, we have to write out the node definition (aka, make ++ % the pdfdest) after any page break, but before the actual text has ++ % been typeset. If the destination for the pdf outline is after the ++ % text, then jumping from the outline may wind up with the text not ++ % being visible, for instance under high magnification. ++ \donoderef{#2}% ++ % ++ % Typeset the actual heading. ++ \nobreak % Avoid page breaks at the interline glue. + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright +- \hangindent = \wd0 \centerparametersmaybe ++ \hangindent=\wd0 \centerparametersmaybe + \unhbox0 #1\par}% + }% + \nobreak\bigskip % no page break after a chapter title + \nobreak + } - # 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 -- # -Wl from whole_archive_flag_spec -+ # -Wl from whole_archive_flag_spec and hope we can get by with -+ # turning comma into space.. - wl= +-% Plain opening for unnumbered. +-\def\unnchfplain#1{\chfplain{#1}{}} +- + % @centerchap -- centered and unnumbered. + \let\centerparametersmaybe = \relax +-\def\centerchfplain#1{{% +- \def\centerparametersmaybe{% +- \advance\rightskip by 3\rightskip +- \leftskip = \rightskip +- \parfillskip = 0pt +- }% +- \chfplain{#1}{}% +-}} ++\def\centerparameters{% ++ \advance\rightskip by 3\rightskip ++ \leftskip = \rightskip ++ \parfillskip = 0pt ++} - if test -n "$convenience"; then - 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'` - else - gentop="$output_objdir/${obj}x" -- $show "${rm}r $gentop" -- $run ${rm}r "$gentop" -- $show "$mkdir $gentop" -- $run $mkdir "$gentop" -- status=$? -- if test $status -ne 0 && test ! -d "$gentop"; then -- exit $status -- fi - generated="$generated $gentop" +-\CHAPFplain % The default -- for xlib in $convenience; do -- # Extract the objects. -- case $xlib in -- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; -- *) xabs=`pwd`"/$xlib" ;; -- esac -- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` -- xdir="$gentop/$xlib" ++% I don't think this chapter style is supported any more, so I'm not ++% updating it with the new noderef stuff. We'll see. --karl, 11aug03. ++% ++\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} ++% + \def\unnchfopen #1{% + \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt\raggedright + \rm #1\hfill}}\bigskip \par\nobreak + } - -- $show "${rm}r $xdir" -- $run ${rm}r "$xdir" -- $show "$mkdir $xdir" -- $run $mkdir "$xdir" -- status=$? -- if test $status -ne 0 && test ! -d "$xdir"; then -- exit $status -- fi -- $show "(cd $xdir && $AR x $xabs)" -- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? + \def\chfopen #1#2{\chapoddpage {\chapfonts + \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% + \par\penalty 5000 % + } - -- reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` -- done -+ func_extract_archives $gentop $convenience -+ reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # 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='~' -- 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 -+ exit $EXIT_SUCCESS - fi + \def\centerchfopen #1{% + \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt + \hfill {\rm #1}\hfill}}\bigskip \par\nobreak + } +- +-\def\CHAPFopen{ +-\global\let\chapmacro=\chfopen +-\global\let\unnumbchapmacro=\unnchfopen +-\global\let\centerchapmacro=\centerchfopen} ++\def\CHAPFopen{% ++ \global\let\chapmacro=\chfopen ++ \global\let\centerchapmacro=\centerchfopen} - if test "$build_libtool_libs" != yes; then - 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 $? -- exit 0 -+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? -+ exit $EXIT_SUCCESS - fi +-% Section titles. ++% Section titles. These macros combine the section number parts and ++% call the generic \sectionheading to do the printing. ++% + \newskip\secheadingskip +-\def\secheadingbreak{\dobreak \secheadingskip {-1000}} +-\def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}} +-\def\plainsecheading#1{\sectionheading{sec}{}{#1}} ++\def\secheadingbreak{\dobreak \secheadingskip{-1000}} - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" -- eval cmds=\"$reload_cmds\" -- IFS="${IFS= }"; save_ifs="$IFS"; 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 --# $run $rm $libobj --# xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` --# if test "X$xdir" = "X$libobj"; then --# xdir="." --# else --# xdir="$xdir" --# fi --# baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` --# 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 + % Subsection titles. +-\newskip \subsecheadingskip +-\def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}} +-\def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}} +-\def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}} ++\newskip\subsecheadingskip ++\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} - if test -n "$gentop"; then -- $show "${rm}r $gentop" -- $run ${rm}r $gentop -+ func_show_eval '${RM}r "$gentop"' - fi + % Subsubsection titles. +-\let\subsubsecheadingskip = \subsecheadingskip +-\let\subsubsecheadingbreak = \subsecheadingbreak +-\def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}} +-\def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}} ++\def\subsubsecheadingskip{\subsecheadingskip} ++\def\subsubsecheadingbreak{\subsecheadingbreak} -- exit 0 -+ exit $EXIT_SUCCESS - ;; - prog) - case $host in -- *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; -+ *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" +-% Print any size section title. ++% Print any size, any type, section title. + % +-% #1 is the section type (sec/subsec/subsubsec), #2 is the section +-% number (maybe empty), #3 the text. +-\def\sectionheading#1#2#3{% +- {% +- \expandafter\advance\csname #1headingskip\endcsname by \parskip +- \csname #1headingbreak\endcsname +- }% ++% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is ++% 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 + % +- % Only insert the separating space if we have a section number. +- \def\secnum{#2}% +- \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}% ++ \def\sectionlevel{#2}% ++ \def\temptype{#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}% ++ \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: ++ \noexpand\thissectionname}% ++ }% ++ \fi ++ \else ++ \ifx\sectionlevel\seckeyword ++ \toks0={#1}% ++ \xdef\lastsectiondefs{% ++ \gdef\noexpand\thissectionname{\the\toks0}% ++ \gdef\noexpand\thissectionnum{#4}% ++ \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: ++ \noexpand\thissectionname}% ++ }% ++ \fi ++ \fi\fi\fi ++ % ++ % 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\lastsection{#1}% ++ \else\ifx\temptype\Yomitfromtockeyword ++ % for @headings -- no section number, don't include in toc, ++ % 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\lastsection{#1}% ++ \else ++ \setbox0 = \hbox{#4\enspace}% ++ \def\toctype{num}% ++ \gdef\lastsection{#1}% ++ \fi\fi\fi ++ % ++ % Write the toc entry (before \donoderef). See comments in \chapmacro. ++ \writetocentry{\toctype\sectionlevel}{#1}{#4}% ++ % ++ % Write the node reference (= pdf destination for pdftex). ++ % Again, see comments in \chapmacro. ++ \donoderef{#3}% ++ % ++ % Interline glue will be inserted when the vbox is completed. ++ % That glue will be a valid breakpoint for the page, since it'll be ++ % preceded by a whatsit (usually from the \donoderef, or from the ++ % \writetocentry if there was no node). We don't want to allow that ++ % break, since then the whatsits could end up on page n while the ++ % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. ++ \nobreak + % ++ % Output the actual section heading. + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright +- \hangindent = \wd0 % zero if no section number +- \unhbox0 #3}% ++ \hangindent=\wd0 % zero if no section number ++ \unhbox0 #1}% + }% +- \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak ++ % Add extra space after the heading -- half of whatever came above it. ++ % Don't allow stretch, though. ++ \kern .5 \csname #2headingskip\endcsname ++ % ++ % Do not let the kern be a potential breakpoint, as it would be if it ++ % was followed by glue. ++ \nobreak ++ % ++ % We'll almost certainly start a paragraph next, so don't let that ++ % 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 + } -- 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." +@@ -3754,161 +5411,224 @@ width0pt\relax} \fi + \newwrite\tocfile - 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 + % Write an entry to the toc file, opening it if necessary. +-% Called from @chapter, etc. We supply {\folio} at the end of the +-% argument, which will end up as the last argument to the \...entry macro. ++% Called from @chapter, etc. + % +-% We open the .toc file here instead of at @setfilename or any other +-% given time so that @contents can be put in the document anywhere. ++% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} ++% We append the current node name (if any) and page number as additional ++% arguments for the \{chap,sec,...}entry macros which will eventually ++% read this. The node name is used in the pdf outlines as the ++% destination to jump to. ++% ++% We open the .toc file for writing here instead of at @setfilename (or ++% any other fixed time) so that @contents can be anywhere in the document. ++% But if #1 is `omit', then we don't do anything. This is used for the ++% table of contents chapter openings themselves. + % + \newif\iftocfileopened +-\def\writetocentry#1{% +- \iftocfileopened\else +- \immediate\openout\tocfile = \jobname.toc +- \global\tocfileopenedtrue ++\def\omitkeyword{omit}% ++% ++\def\writetocentry#1#2#3{% ++ \edef\writetoctype{#1}% ++ \ifx\writetoctype\omitkeyword \else ++ \iftocfileopened\else ++ \immediate\openout\tocfile = \jobname.toc ++ \global\tocfileopenedtrue ++ \fi ++ % ++ \iflinks ++ {\atdummies ++ \edef\temp{% ++ \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% ++ \temp ++ }% ++ \fi + \fi +- \iflinks \write\tocfile{#1{\folio}}\fi ++ % ++ % Tell \shipout to create a pdf destination on each page, if we're ++ % writing pdf. These are used in the table of contents. We can't ++ % just write one on every page because the title pages are numbered ++ % 1 and 2 (the page numbers aren't printed), and so are the first ++ % two pages of the document. Thus, we'd have two destinations named ++ % `1', and two named `2'. ++ \ifpdf \global\pdfmakepagedesttrue \fi ++} + -+ 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 -+ new_libs= -+ for path in $notinst_path; do -+ case " $new_libs " in -+ *" -L$path/$objdir "*) ;; -+ *) -+ case " $compile_deplibs " in -+ *" -L$path/$objdir "*) -+ new_libs="$new_libs -L$path/$objdir" ;; -+ esac -+ ;; -+ esac -+ done -+ for deplib in $compile_deplibs; do -+ case $deplib in -+ -L*) -+ case " $new_libs " in -+ *" $deplib "*) ;; -+ *) new_libs="$new_libs $deplib" ;; -+ esac -+ ;; -+ *) new_libs="$new_libs $deplib" ;; -+ esac -+ done -+ compile_deplibs="$new_libs" ++% 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 ++ \catcode`\<=\active ++ \catcode`\>=\active ++ \catcode`\\=\active ++ \catcode`\^=\active ++ \catcode`\_=\active ++ \catcode`\|=\active ++ \catcode`\~=\active ++} + + - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - -@@ -3583,11 +7600,18 @@ - esac - fi - case $host in -- *-*-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,227 +7659,51 @@ - fi - finalize_rpath="$rpath" ++% Read the toc file, which is essentially Texinfo input. ++\def\readtocfile{% ++ \setupdatafile ++ \activecatcodes ++ \input \tocreadfilename + } -- 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 + \newskip\contentsrightmargin \contentsrightmargin=1in + \newcount\savepageno + \newcount\lastnegativepageno \lastnegativepageno = -1 -- 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" -- 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 '$mv "$nlist"T "$nlist"' -- fi -- -- if test -n "$export_symbols_regex"; then -- $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 -- export_symbols="$output_objdir/$output.exp" -- $run $rm $export_symbols -- $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' -- 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 '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"' -- $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 -- $mv "$nlist"T "$nlist" -- fi -- -- # Try sorting and uniquifying the output. -- if grep -v "^: " < "$nlist" | sort +2 | 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/$dlsyms"' -- else -- echo '/* NONE */' >> "$output_objdir/$dlsyms" -- 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_preloaded_symbols[] = --{\ --" -- -- sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ -- -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ -- < "$nlist" >> "$output_objdir/$dlsyms" -- -- $echo >> "$output_objdir/$dlsyms" "\ -- {0, (lt_ptr_t) 0} --}; -- --/* 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 $? -- -- # 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}%"` -- ;; -- *) -- $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 -- exit 1 -- ;; -- 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" +-% Finish up the main text and prepare to read what we've written +-% to \tocfile. ++% Prepare to read what we've written to \tocfile. + % + \def\startcontents#1{% +- % If @setchapternewpage on, and @headings double, the contents should +- % start on an odd page, unlike chapters. Thus, we maintain +- % \contentsalignmacro in parallel with \pagealignmacro. +- % From: Torbjorn Granlund +- \contentsalignmacro +- \immediate\closeout\tocfile +- % +- % Don't need to put `Contents' or `Short Contents' in the headline. +- % It is abundantly clear what they are. +- \unnumbchapmacro{#1}\def\thischapter{}% +- \savepageno = \pageno +- \begingroup % Set up to handle contents files properly. +- \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 +- % We can't do this, because then an actual ^ in a section +- % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. +- %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi +- \raggedbottom % Worry more about breakpoints than the bottom. +- \advance\hsize by -\contentsrightmargin % Don't use the full line length. +- % +- % Roman numerals for page numbers. +- \ifnum \pageno>0 \pageno = \lastnegativepageno \fi ++ % If @setchapternewpage on, and @headings double, the contents should ++ % start on an odd page, unlike chapters. Thus, we maintain ++ % \contentsalignmacro in parallel with \pagealignmacro. ++ % From: Torbjorn Granlund ++ \contentsalignmacro ++ \immediate\closeout\tocfile ++ % ++ % Don't need to put `Contents' or `Short Contents' in the headline. ++ % It is abundantly clear what they are. ++ \chapmacro{#1}{Yomitfromtoc}{}% ++ % ++ \savepageno = \pageno ++ \begingroup % Set up to handle contents files properly. ++ \raggedbottom % Worry more about breakpoints than the bottom. ++ \advance\hsize by -\contentsrightmargin % Don't use the full line length. ++ % ++ % Roman numerals for page numbers. ++ \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi + } -- # Nullify the symbol file. -- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` -- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` -+ # template prelinking step -+ if test -n "$prelink_cmds"; then -+ func_execute_cmds "$prelink_cmds" 'exit $?' - fi ++% redefined for the two-volume lispref. We always output on ++% \jobname.toc even if this is redefined. ++% ++\def\tocreadfilename{\jobname.toc} + + % Normal (long) toc. ++% + \def\contents{% +- \startcontents{\putwordTOC}% +- \openin 1 \jobname.toc +- \ifeof 1 \else +- \closein 1 +- \input \jobname.toc +- \fi +- \vfill \eject +- \contentsalignmacro % in case @setchapternewpage odd is in effect +- \pdfmakeoutlines +- \endgroup +- \lastnegativepageno = \pageno +- \pageno = \savepageno ++ \startcontents{\putwordTOC}% ++ \openin 1 \tocreadfilename\space ++ \ifeof 1 \else ++ \readtocfile ++ \fi ++ \vfill \eject ++ \contentsalignmacro % in case @setchapternewpage odd is in effect ++ \ifeof 1 \else ++ \pdfmakeoutlines ++ \fi ++ \closein 1 ++ \endgroup ++ \lastnegativepageno = \pageno ++ \global\pageno = \savepageno + } -- 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" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" + % And just the chapters. + \def\summarycontents{% +- \startcontents{\putwordShortTOC}% +- % +- \let\chapentry = \shortchapentry +- \let\unnumbchapentry = \shortunnumberedentry +- % We want a true roman here for the page numbers. +- \secfonts +- \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl +- \rm +- \hyphenpenalty = 10000 +- \advance\baselineskip by 1pt % Open it up a little. +- \def\secentry ##1##2##3##4{} +- \def\unnumbsecentry ##1##2{} +- \def\subsecentry ##1##2##3##4##5{} +- \def\unnumbsubsecentry ##1##2{} +- \def\subsubsecentry ##1##2##3##4##5##6{} +- \def\unnumbsubsubsecentry ##1##2{} +- \openin 1 \jobname.toc +- \ifeof 1 \else +- \closein 1 +- \input \jobname.toc +- \fi +- \vfill \eject +- \contentsalignmacro % in case @setchapternewpage odd is in effect +- \endgroup +- \lastnegativepageno = \pageno +- \pageno = \savepageno ++ \startcontents{\putwordShortTOC}% ++ % ++ \let\numchapentry = \shortchapentry ++ \let\appentry = \shortchapentry ++ \let\unnchapentry = \shortunnchapentry ++ % We want a true roman here for the page numbers. ++ \secfonts ++ \let\rm=\shortcontrm \let\bf=\shortcontbf ++ \let\sl=\shortcontsl \let\tt=\shortconttt ++ \rm ++ \hyphenpenalty = 10000 ++ \advance\baselineskip by 1pt % Open it up a little. ++ \def\numsecentry##1##2##3##4{} ++ \let\appsecentry = \numsecentry ++ \let\unnsecentry = \numsecentry ++ \let\numsubsecentry = \numsecentry ++ \let\appsubsecentry = \numsecentry ++ \let\unnsubsecentry = \numsecentry ++ \let\numsubsubsecentry = \numsecentry ++ \let\appsubsubsecentry = \numsecentry ++ \let\unnsubsubsecentry = \numsecentry ++ \openin 1 \tocreadfilename\space ++ \ifeof 1 \else ++ \readtocfile ++ \fi ++ \closein 1 ++ \vfill \eject ++ \contentsalignmacro % in case @setchapternewpage odd is in effect ++ \endgroup ++ \lastnegativepageno = \pageno ++ \global\pageno = \savepageno + } + \let\shortcontents = \summarycontents - # We have no uninstalled library dependencies, so finalize right now. -- $show "$link_command" -- $run eval "$link_command" -- status=$? -+ exit_status=0 -+ func_show_eval "$link_command" 'exit_status=$?' +-\ifpdf +- \pdfcatalog{/PageMode /UseOutlines}% +-\fi ++% Typeset the label for a chapter or appendix for the short contents. ++% The arg is, e.g., `A' for an appendix, or `3' for a chapter. ++% ++\def\shortchaplabel#1{% ++ % This space should be enough, since a single number is .5em, and the ++ % widest letter (M) is 1em, at least in the Computer Modern fonts. ++ % But use \hss just in case. ++ % (This space doesn't include the extra space that gets added after ++ % the label; that gets put in by \shortchapentry above.) ++ % ++ % We'd like to right-justify chapter numbers, but that looks strange ++ % with appendix letters. And right-justifying numbers and ++ % left-justifying letters looks strange when there is less than 10 ++ % chapters. Have to read the whole toc once to know how many chapters ++ % there are before deciding ... ++ \hbox to 1em{#1\hss}% ++} - # Delete the generated files. -- 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 + % These macros generate individual entries in the table of contents. + % The first argument is the chapter or section name. + % The last argument is the page number. + % The arguments in between are the chapter number, section number, ... -- exit $status -- fi +-% Chapter-level things, for both the long and short contents. +-\def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} - -- 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 +-% See comments in \dochapentry re vbox and related settings +-\def\shortchapentry#1#2#3{% +- \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}% ++% Chapters, in the main contents. ++\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} ++% ++% Chapters, in the short toc. ++% See comments in \dochapentry re vbox and related settings. ++\def\shortchapentry#1#2#3#4{% ++ \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% + } - 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 $? -- exit 0 -+ func_show_eval "$link_command" 'exit $?' -+ exit $EXIT_SUCCESS - fi +-% Typeset the label for a chapter or appendix for the short contents. +-% The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter. +-% We could simplify the code here by writing out an \appendixentry +-% command in the toc file for appendices, instead of using \chapentry +-% for both, but it doesn't seem worth it. ++% Appendices, in the main contents. ++% Need the word Appendix, and a fixed-size box. + % +-\newdimen\shortappendixwidth ++\def\appendixbox#1{% ++ % We use M since it's probably the widest letter. ++ \setbox0 = \hbox{\putwordAppendix{} M}% ++ \hbox to \wd0{\putwordAppendix{} #1\hss}} + % +-\def\shortchaplabel#1{% +- % Compute width of word "Appendix", may change with language. +- \setbox0 = \hbox{\shortcontrm \putwordAppendix}% +- \shortappendixwidth = \wd0 +- % +- % We typeset #1 in a box of constant width, regardless of the text of +- % #1, so the chapter titles will come out aligned. +- \setbox0 = \hbox{#1}% +- \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi +- % +- % This space should be plenty, since a single number is .5em, and the +- % widest letter (M) is 1em, at least in the Computer Modern fonts. +- % (This space doesn't include the extra space that gets added after +- % the label; that gets put in by \shortchapentry above.) +- \advance\dimen0 by 1.1em +- \hbox to \dimen0{#1\hfil}% +-} ++\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} - if test "$hardcode_action" = relink; then -@@ -3904,13 +7751,13 @@ - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" +-\def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} +-\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}} ++% Unnumbered chapters. ++\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} ++\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} -- $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" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= -@@ -3922,246 +7769,104 @@ - fi + % Sections. +-\def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}} +-\def\unnumbsecentry#1#2{\dosecentry{#1}{#2}} ++\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} ++\let\appsecentry=\numsecentry ++\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} - # 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'` + % Subsections. +-\def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}} +-\def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}} ++\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} ++\let\appsubsecentry=\numsubsecentry ++\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} - # 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 + % And subsubsections. +-\def\subsubsecentry#1#2#3#4#5#6{% +- \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} +-\def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}} ++\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} ++\let\appsubsubsecentry=\numsubsubsecentry ++\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} + + % This parameter controls the indentation of the various levels. +-\newdimen\tocindent \tocindent = 3pc ++% Same as \defaultparindent. ++\newdimen\tocindent \tocindent = 15pt + + % Now for the actual typesetting. In all these, #1 is the text and #2 is the + % page number. +@@ -3939,17 +5659,8 @@ width0pt\relax} \fi + \tocentry{#1}{\dopageno\bgroup#2\egroup}% + \endgroup} + +-% Final typesetting of a toc entry; we use the same \entry macro as for +-% the index entries, but we want to suppress hyphenation here. (We +-% can't do that in the \entry macro, since index entries might consist +-% of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) +-\def\tocentry#1#2{\begingroup +- \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks +- % Do not use \turnoffactive in these arguments. Since the toc is +- % typeset in cmr, so characters such as _ would come out wrong; we +- % have to do the usual translation tricks. +- \entry{#1}{#2}% +-\endgroup} ++% We use the same \entry macro as for the index entries. ++\let\tocentry = \entry -- $show "$link_command" -- $run eval "$link_command" || exit $? -+ func_show_eval "$link_command" 'exit $?' + % Space between chapter (or whatever) number and the title. + \def\labelspace{\hskip1em \relax} +@@ -3959,72 +5670,62 @@ width0pt\relax} \fi - # Now create the wrapper script. -- $show "creating $output" -+ func_verbose "creating $output" + \def\chapentryfonts{\secfonts \rm} + \def\secentryfonts{\textfonts} +-\let\subsecentryfonts = \textfonts +-\let\subsubsecentryfonts = \textfonts ++\def\subsecentryfonts{\textfonts} ++\def\subsubsecentryfonts{\textfonts} - # 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" | $Xsed -e "$sed_quote_subst"` - fi -- # 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";; -+ # 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"` - else -- qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` -+ qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` - fi + \message{environments,} + % @foo ... @end foo. -- # 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) 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 -+ func_stripname '' '.exe' "$outputname" -+ outputname=$func_stripname_result ;; - *) exeext= ;; - esac -- $rm $output -- trap "$rm $output; exit 1" 1 2 15 -- -- $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//' --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 -- --relink_command=\"$relink_command > /dev/null 2>&1\" -- --# 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'\` -- 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 -- -- # Try to get the absolute directory name. -- absdir=\`cd \"\$thisdir\" && pwd\` -- test -n \"\$absdir\" && thisdir=\"\$absdir\" --" -- -- if test "$fast_install" = yes; then -- echo >> $output "\ -- 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 >> $output "\ -- -- # 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 >> $output "\ -- program='$outputname' -- progdir=\"\$thisdir/$objdir\" --" -- fi -- -- echo >> $output "\ +-% 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 +-\newbox\equivbox \newbox\errorbox - -- if test -f \"\$progdir/\$program\"; then" +-%{\tentt +-%\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil} +-%\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil} +-%\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil} +-%\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil} +-% Adapted from the manmac format (p.420 of TeXbook) +-%\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex +-% depth .1ex\hfil} +-%} - -- # 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\" + % @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\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} +-\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} ++\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\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\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 \tensf error\kern-1.5pt} - -- # 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/::*\$//'\` +-\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. +- \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} - -- 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 +-% The @error{} command. ++% + \def\error{\leavevmode\lower.7ex\copy\errorbox} -- # 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 + % @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. -- $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*) -- $echo >> $output "\ -- exec \$progdir/\$program \${1+\"\$@\"} --" -- ;; -+ # 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 -+ } +-\def\tex{\begingroup ++\envdef\tex{% + \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 + \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 +- \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie ++ \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie + \catcode `\%=14 +- \catcode 43=12 % plus +- \catcode`\"=12 +- \catcode`\==12 +- \catcode`\|=12 +- \catcode`\<=12 +- \catcode`\>=12 ++ \catcode `\+=\other ++ \catcode `\"=\other ++ \catcode `\|=\other ++ \catcode `\<=\other ++ \catcode `\>=\other + \escapechar=`\\ + % + \let\b=\ptexb +@@ -4036,20 +5737,26 @@ width0pt\relax} \fi + \let\equiv=\ptexequiv + \let\!=\ptexexclam + \let\i=\ptexi ++ \let\indent=\ptexindent ++ \let\noindent=\ptexnoindent + \let\{=\ptexlbrace + \let\+=\tabalign + \let\}=\ptexrbrace ++ \let\/=\ptexslash + \let\*=\ptexstar + \let\t=\ptext ++ \expandafter \let\csname top\endcsname=\ptextop % outer ++ \let\frenchspacing=\plainfrenchspacing + % + \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% + \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% + \def\@{@}% +-\let\Etex=\endgroup} ++} ++% There is no need to define \Etex. -- # Backslashes separate directories on plain windows -- *-*-mingw | *-*-os2*) -- $echo >> $output "\ -- 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 +-% Define @lisp ... @endlisp. +-% @lisp does a \begingroup so it can rebind things, +-% including the definition of @endlisp (which normally is erroneous). ++% Define @lisp ... @end lisp. ++% @lisp environment forms a group so it can rebind things, ++% including the definition of @end lisp (which normally is erroneous). -- *) -- $echo >> $output "\ -- # Export the path to the program. -- PATH=\"\$progdir:\$PATH\" -- export PATH + % Amount to narrow the margins by for @lisp. + \newskip\lispnarrowing \lispnarrowing=0.4in +@@ -4059,34 +5766,34 @@ width0pt\relax} \fi + % have any width. + \def\lisppar{\null\endgraf} + +-% Make each space character in the input produce a normal interword +-% space in the output. Don't allow a line break at this space, as this +-% is used only in environments like @example, where each line of input +-% should produce a line of output anyway. +-% +-{\obeyspaces % +-\gdef\sepspaces{\obeyspaces\let =\tie}} - -- exec \$program \${1+\"\$@\"} --" -+ func_emit_wrapper no > $output -+ chmod +x $output - ;; - esac -- $echo >> $output "\ -- \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" -- 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\ --" -- chmod +x $output -- fi -- exit 0 -+ } -+ exit $EXIT_SUCCESS - ;; - esac +-% Define \obeyedspace to be our active space, whatever it is. This is +-% for use in \parsearg. +-{\sepspaces% +-\global\let\obeyedspace= } +- + % This space is always present above and below environments. + \newskip\envskipamount \envskipamount = 0pt -@@ -4169,7 +7874,7 @@ - for oldlib in $oldlibs; do + % Make spacing and below environment symmetrical. We use \parskip here + % to help in doing that, since in @example-like environments \parskip + % is reset to zero; thus the \afterenvbreak inserts no space -- but the +-% start of the next paragraph will insert \parskip ++% start of the next paragraph will insert \parskip. + % +-\def\aboveenvbreak{{\advance\envskipamount by \parskip +-\endgraf \ifdim\lastskip<\envskipamount +-\removelastskip \penalty-50 \vskip\envskipamount \fi}} ++\def\aboveenvbreak{{% ++ % =10000 instead of <10000 because of a special case in \itemzzz and ++ % \sectionheading, q.v. ++ \ifnum \lastpenalty=10000 \else ++ \advance\envskipamount by \parskip ++ \endgraf ++ \ifdim\lastskip<\envskipamount ++ \removelastskip ++ % it's not a good place to break if the last penalty was \nobreak ++ % or better ... ++ \ifnum\lastpenalty<10000 \penalty-50 \fi ++ \vskip\envskipamount ++ \fi ++ \fi ++}} - 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 + \let\afterenvbreak = \aboveenvbreak - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" -- $show "${rm}r $gentop" -- $run ${rm}r "$gentop" -- $show "$mkdir $gentop" -- $run $mkdir "$gentop" -- status=$? -- if test $status -ne 0 && test ! -d "$gentop"; then -- exit $status -- fi - generated="$generated $gentop" +-% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. ++% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will ++% also clear it, so that its embedded environments do the narrowing again. + \let\nonarrowing=\relax -- # Add in members from convenience archives. -- for xlib in $addlibs; do -- # Extract the objects. -- case $xlib in -- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; -- *) xabs=`pwd`"/$xlib" ;; -- esac -- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` -- xdir="$gentop/$xlib" -- -- $show "${rm}r $xdir" -- $run ${rm}r "$xdir" -- $show "$mkdir $xdir" -- $run $mkdir "$xdir" -- status=$? -- if test $status -ne 0 && test ! -d "$xdir"; then -- exit $status -- fi -- $show "(cd $xdir && $AR x $xabs)" -- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? -- -- oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print | $NL2SP` -- done -+ func_extract_archives $gentop $addlibs -+ oldobjs="$oldobjs $func_extract_archives_result" - fi + % @cartouche ... @end cartouche: draw rectangle w/rounded corners around +@@ -4110,738 +5817,733 @@ width0pt\relax} \fi + % + \newskip\lskip\newskip\rskip + +-\long\def\cartouche{% +-\begingroup +- \lskip=\leftskip \rskip=\rightskip +- \leftskip=0pt\rightskip=0pt %we want these *outside*. +- \cartinner=\hsize \advance\cartinner by-\lskip +- \advance\cartinner by-\rskip +- \cartouter=\hsize +- \advance\cartouter by 18.4pt % allow for 3pt kerns on either +-% side, and for 6pt waste from +-% each corner char, and rule thickness +- \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip +- % Flag to tell @lisp, etc., not to narrow margin. +- \let\nonarrowing=\comment +- \vbox\bgroup +- \baselineskip=0pt\parskip=0pt\lineskip=0pt +- \carttop +- \hbox\bgroup +- \hskip\lskip +- \vrule\kern3pt +- \vbox\bgroup +- \hsize=\cartinner +- \kern3pt +- \begingroup +- \baselineskip=\normbskip +- \lineskip=\normlskip +- \parskip=\normpskip +- \vskip -\parskip ++\envdef\cartouche{% ++ \ifhmode\par\fi % can't be in the midst of a paragraph. ++ \startsavinginserts ++ \lskip=\leftskip \rskip=\rightskip ++ \leftskip=0pt\rightskip=0pt % we want these *outside*. ++ \cartinner=\hsize \advance\cartinner by-\lskip ++ \advance\cartinner by-\rskip ++ \cartouter=\hsize ++ \advance\cartouter by 18.4pt % allow for 3pt kerns on either ++ % side, and for 6pt waste from ++ % each corner char, and rule thickness ++ \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip ++ % Flag to tell @lisp, etc., not to narrow margin. ++ \let\nonarrowing = t% ++ \vbox\bgroup ++ \baselineskip=0pt\parskip=0pt\lineskip=0pt ++ \carttop ++ \hbox\bgroup ++ \hskip\lskip ++ \vrule\kern3pt ++ \vbox\bgroup ++ \kern3pt ++ \hsize=\cartinner ++ \baselineskip=\normbskip ++ \lineskip=\normlskip ++ \parskip=\normpskip ++ \vskip -\parskip ++ \comment % For explanation, see the end of \def\group. ++} + \def\Ecartouche{% +- \endgroup +- \kern3pt +- \egroup +- \kern3pt\vrule +- \hskip\rskip +- \egroup +- \cartbot +- \egroup +-\endgroup +-}} ++ \ifhmode\par\fi ++ \kern3pt ++ \egroup ++ \kern3pt\vrule ++ \hskip\rskip ++ \egroup ++ \cartbot ++ \egroup ++ \checkinserts ++} - # 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 - 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 --# # static libs even though --disable-static was passed! --# for oldobj in $oldobjs; do --# if test ! -f $oldobj; then --# xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` --# if test "X$xdir" = "X$oldobj"; then --# xdir="." --# else --# xdir="$xdir" --# fi --# baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` --# obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` --# $show "(cd $xdir && ${LN_S} $obj $baseobj)" --# $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" + % This macro is called at the beginning of all the @example variants, + % inside a group. + \def\nonfillstart{% + \aboveenvbreak +- \inENV % This group ends at the end of the body + \hfuzz = 12pt % Don't be fussy + \sepspaces % Make spaces be word-separators rather than space tokens. +- \singlespace + \let\par = \lisppar % don't ignore blank lines + \obeylines % each line of input is a line of output + \parskip = 0pt + \parindent = 0pt + \emergencystretch = 0pt % don't try to avoid overfull boxes +- % @cartouche defines \nonarrowing to inhibit narrowing +- % at next level down. + \ifx\nonarrowing\relax + \advance \leftskip by \lispnarrowing + \exdentamount=\lispnarrowing +- \let\exdent=\nofillexdent +- \let\nonarrowing=\relax ++ \else ++ \let\nonarrowing = \relax + \fi ++ \let\exdent=\nofillexdent + } -- 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 -+ # static archive out of a convenience library, or when linking -+ # the entirety of a libtool archive into another (currently -+ # not supported by libtool). -+ if (for obj in $oldobjs -+ do -+ 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..." -+ gentop="$output_objdir/${outputname}x" -+ generated="$generated $gentop" -+ func_mkdir_p "$gentop" -+ save_oldobjs=$oldobjs -+ oldobjs= -+ counter=1 -+ for obj in $save_oldobjs -+ do -+ func_basename "$obj" -+ objbase="$func_basename_result" -+ case " $oldobjs " in -+ " ") oldobjs=$obj ;; -+ *[\ /]"$objbase "*) -+ while :; do -+ # Make sure we don't pick an alternate name that also -+ # overlaps. -+ newobj=lt$counter-$objbase -+ func_arith $counter + 1 -+ counter=$func_arith_result -+ case " $oldobjs " in -+ *[\ /]"$newobj "*) ;; -+ *) if test ! -f "$gentop/$newobj"; then break; fi ;; -+ esac -+ done -+ 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\" -+ -+ 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 -+ func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: -- objlist= -- concat_cmds= -- save_oldobjs=$oldobjs -- for obj in $save_oldobjs -- do -- oldobjs="$objlist $obj" -- objlist="$objlist $obj" -- eval test_cmds=\"$old_archive_cmds\" -- if len=`expr "X$test_cmds" : ".*"` && -- test $len -le $max_cmd_len; then -- : -- else -- # the above command should be used before it gets too long -- oldobjs=$objlist -+ 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 -+ 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 -+ fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ -- eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" -- objlist= -- fi -- done -+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" -+ objlist= -+ len=$len0 -+ fi -+ done - RANLIB=$save_RANLIB -- oldobjs=$objlist -- eval cmds=\"\$concat_cmds~$old_archive_cmds\" -- fi -+ oldobjs=$objlist -+ if test "X$oldobjs" = "X" ; then -+ eval cmds=\"\$concat_cmds\" -+ else -+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\" -+ fi -+ fi - fi -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || exit $? -- done -- IFS="$save_ifs" -+ func_execute_cmds "$cmds" 'exit $?' - done +-% Define the \E... control sequence only if we are inside the particular +-% environment, so the error checking in \end will work. +-% +-% To end an @example-like environment, we first end the paragraph (via +-% \afterenvbreak's vertical glue), and then the group. That way we keep +-% 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. ++% 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: ++% @example, @display, @format, @lisp + % +-\def\nonfillfinish{\afterenvbreak\endgroup} ++\def\smallword{small} ++\def\nosmallword{nosmall} ++\let\SETdispenvsize\relax ++\def\setnormaldispenv{% ++ \ifx\SETdispenvsize\smallword ++ % end paragraph for sake of leading, in case document has no blank ++ % line. This is redundant with what happens in \aboveenvbreak, but ++ % we need to do it before changing the fonts, and it's inconvenient ++ % to change the fonts afterward. ++ \ifnum \lastpenalty=10000 \else \endgraf \fi ++ \smallexamplefonts \rm ++ \fi ++} ++\def\setsmalldispenv{% ++ \ifx\SETdispenvsize\nosmallword ++ \else ++ \ifnum \lastpenalty=10000 \else \endgraf \fi ++ \smallexamplefonts \rm ++ \fi ++} -- if test -n "$generated"; then -- $show "${rm}r$generated" -- $run ${rm}r$generated -- fi -+ test -n "$generated" && \ -+ func_show_eval "${RM}r$generated" +-% @lisp: indented, narrowed, typewriter font. +-\def\lisp{\begingroup +- \nonfillstart +- \let\Elisp = \nonfillfinish +- \tt +- \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. +- \gobble % eat return ++% We often define two environments, @foo and @smallfoo. ++% Let's do it by one command: ++\def\makedispenv #1#2{ ++ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} ++ \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} ++ \expandafter\let\csname E#1\endcsname \afterenvbreak ++ \expandafter\let\csname Esmall#1\endcsname \afterenvbreak + } - # 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" +-% @example: Same as @lisp. +-\def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} ++% Define two synonyms: ++\def\maketwodispenvs #1#2#3{ ++ \makedispenv{#1}{#3} ++ \makedispenv{#2}{#3} ++} - # 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. -- tagopts= -- for tag in $taglist; do -- tagopts="$tagopts --tag $tag" -- done -- 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" | $Xsed -e "$sed_quote_subst"` -+ if test "$hardcode_automatic" = yes ; then -+ relink_command= -+ fi +-% @small... is usually equivalent to the non-small (@smallbook +-% redefines). We must call \example (or whatever) last in the +-% definition, since it reads the return following the @example (or +-% whatever) command. +-% +-% This actually allows (for example) @end display inside an +-% @smalldisplay. Too bad, but makeinfo will catch the error anyway. ++% @lisp: indented, narrowed, typewriter font; @example: same as @lisp. + % +-\def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display} +-\def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp} +-\def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format} +-\def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp} +- +-% Real @smallexample and @smalllisp (when @smallbook): use smaller fonts. ++% @smallexample and @smalllisp: use smaller fonts. + % Originally contributed by Pavel@xerox. +-\def\smalllispx{\begingroup +- \def\Esmalllisp{\nonfillfinish\endgroup}% +- \def\Esmallexample{\nonfillfinish\endgroup}% +- \smallfonts +- \lisp +-} +- +-% @display: same as @lisp except keep current font. + % +-\def\display{\begingroup ++\maketwodispenvs {lisp}{example}{% + \nonfillstart +- \let\Edisplay = \nonfillfinish +- \gobble ++ \tt\quoteexpand ++ \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. ++ \gobble % eat return + } +- +-% @smalldisplay (when @smallbook): @display plus smaller fonts. ++% @display/@smalldisplay: same as @lisp except keep current font. + % +-\def\smalldisplayx{\begingroup +- \def\Esmalldisplay{\nonfillfinish\endgroup}% +- \smallfonts \rm +- \display ++\makedispenv {display}{% ++ \nonfillstart ++ \gobble + } - # Only create the output if not a dry run. -- 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%^.*/%%'` -- 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 -+ 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" - ;; - *) 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%^.*/%%'` -- 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 -- exit 1 -- 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 - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do -- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` -- 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 -- exit 1 -- 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 -+ case $lib in -+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; -+ *) abs=`pwd`"/$lib" ;; -+ esac -+ newdlfiles="$newdlfiles $abs" -+ done -+ dlfiles="$newdlfiles" -+ newdlprefiles= -+ for lib in $dlprefiles; do -+ case $lib in -+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; -+ *) abs=`pwd`"/$lib" ;; -+ esac -+ newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi -- $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 | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac -- $echo > $output "\ -+ $ECHO > $output "\ - # $outputname - a libtool library file --# 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' +-% @format: same as @display except don't narrow margins. ++% @format/@smallformat: same as @display except don't narrow margins. + % +-\def\format{\begingroup +- \let\nonarrowing = t ++\makedispenv{format}{% ++ \let\nonarrowing = t% + \nonfillstart +- \let\Eformat = \nonfillfinish + \gobble + } -+# 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' +-% @smallformat (when @smallbook): @format plus smaller fonts. +-% +-\def\smallformatx{\begingroup +- \def\Esmallformat{\nonfillfinish\endgroup}% +- \smallfonts \rm +- \format ++% @flushleft: same as @format, but doesn't obey \SETdispenvsize. ++\envdef\flushleft{% ++ \let\nonarrowing = t% ++ \nonfillstart ++ \gobble + } +- +-% @flushleft (same as @format). +-% +-\def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format} ++\let\Eflushleft = \afterenvbreak -+# Names of additional weak libraries provided by this library -+weak_library_names='$weak_libs' + % @flushright. + % +-\def\flushright{\begingroup +- \let\nonarrowing = t ++\envdef\flushright{% ++ \let\nonarrowing = t% + \nonfillstart +- \let\Eflushright = \nonfillfinish + \advance\leftskip by 0pt plus 1fill + \gobble + } ++\let\Eflushright = \afterenvbreak + - # Version information for $libname. - current=$current - age=$age -@@ -4396,692 +8158,39 @@ - # Is this an already installed library? - installed=$installed -+# Should we warn about portability when linking against -modules? -+shouldnotlink=$module -+ - # Files to dlopen/dlpreopen - dlopen='$dlfiles' - dlpreopen='$dlprefiles' + % @quotation does normal linebreaking (hence we can't use \nonfillstart) +-% and narrows the margins. ++% and narrows the margins. We keep \parskip nonzero in general, since ++% we're doing normal filling. So, when using \aboveenvbreak and ++% \afterenvbreak, temporarily make \parskip 0. + % +-\def\quotation{% +- \begingroup\inENV %This group ends at the end of the @quotation body ++\envdef\quotation{% + {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip +- \singlespace + \parindent=0pt +- % We have retained a nonzero parskip for the environment, since we're +- % doing normal filling. So to avoid extra space below the environment... +- \def\Equotation{\parskip = 0pt \nonfillfinish}% + % + % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \ifx\nonarrowing\relax + \advance\leftskip by \lispnarrowing + \advance\rightskip by \lispnarrowing + \exdentamount = \lispnarrowing ++ \else + \let\nonarrowing = \relax + \fi ++ \parsearg\quotationlabel + } - # 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 "\ - relink_command=\"$relink_command\"" - fi - done -- fi -+ } ++% 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}% ++} - # 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 -- # Aesthetically quote it. -- arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` -- case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -- arg="\"$arg\"" -- ;; -- esac -- install_prog="$arg " -- arg="$1" -- shift -- else -- install_prog= -- 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 -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -- 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" -- continue -- fi -- -- case $arg in -- -d) isdir=yes ;; -- -f) prev="-f" ;; -- -g) prev="-g" ;; -- -m) prev="-m" ;; -- -o) prev="-o" ;; -- -s) -- stripme=" -s" -- continue -- ;; -- -*) ;; +-\message{defuns,} +-% @defun etc. - -- *) -- # If the previous option needed an argument, then skip it. -- if test -n "$prev"; then -- prev= -- else -- dest="$arg" -- continue -- fi -- ;; -- esac +-% Allow user to change definition object font (\df) internally +-\def\setdeffont #1 {\csname DEF#1\endcsname} - -- # Aesthetically quote the argument. -- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -- case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -- arg="\"$arg\"" -- ;; -- esac -- install_prog="$install_prog $arg" -- done +-\newskip\defbodyindent \defbodyindent=.4in +-\newskip\defargsindent \defargsindent=50pt +-\newskip\deftypemargin \deftypemargin=12pt +-\newskip\deflastargmargin \deflastargmargin=18pt - -- if test -z "$install_prog"; then -- $echo "$modename: you must specify an install program" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi +-\newcount\parencount +-% define \functionparens, which makes ( and ) and & do special things. +-% \functionparens affects the group it is contained in. +-\def\activeparens{% +-\catcode`\(=\active \catcode`\)=\active \catcode`\&=\active +-\catcode`\[=\active \catcode`\]=\active} - -- if test -n "$prev"; then -- $echo "$modename: the \`$prev' option requires an argument" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi +-% Make control sequences which act like normal parenthesis chars. +-\let\lparen = ( \let\rparen = ) - -- 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 -- fi +-{\activeparens % Now, smart parens don't turn on until &foo (see \amprm) - -- # Strip any trailing slash from the destination. -- dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` +-% 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. +-\global\let(=\lparen \global\let)=\rparen +-\global\let[=\lbrack \global\let]=\rbrack ++% If we're given an argument, typeset it in bold with a colon after. ++\def\quotationlabel#1{% ++ \def\temp{#1}% ++ \ifx\temp\empty \else ++ {\bf #1: }% ++ \fi ++} + +-\gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 } +-\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} +-% This is used to turn on special parens +-% but make & act ordinary (given that it's active). +-\gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr} + +-% Definitions of (, ) and & used in args for functions. +-% This is the definition of ( outside of all parentheses. +-\gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested +- \global\advance\parencount by 1 ++% LaTeX-like @verbatim...@end verbatim and @verb{...} ++% If we want to allow any as delimiter, ++% we need the curly braces so that makeinfo sees the @verb command, eg: ++% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org ++% ++% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. ++% ++% [Knuth] p.344; only we need to do the other characters Texinfo sets ++% active too. Otherwise, they get lost as the first character on a ++% verbatim line. ++\def\dospecials{% ++ \do\ \do\\\do\{\do\}\do\$\do\&% ++ \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% ++ \do\<\do\>\do\|\do\@\do+\do\"% + } + % +-% This is the definition of ( when already inside a level of parens. +-\gdef\opnested{\char`\(\global\advance\parencount by 1 } ++% [Knuth] p. 380 ++\def\uncatcodespecials{% ++ \def\do##1{\catcode`##1=\other}\dospecials} + % +-\gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. +- % also in that case restore the outer-level definition of (. +- \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi +- \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 + % +-\gdef\normalparens{\boldbrax\let&=\ampnr} +-} % End of definition inside \activeparens +-%% These parens (in \boldbrax) actually are a little bolder than the +-%% contained text. This is especially needed for [ and ] +-\def\opnr{{\sf\char`\(}\global\advance\parencount by 1 } +-\def\clnr{{\sf\char`\)}\global\advance\parencount by -1 } +-\let\ampnr = \& +-\def\lbrb{{\bf\char`\[}} +-\def\rbrb{{\bf\char`\]}} - -- # 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%^.*/%%'` +-% Active &'s sneak into the index arguments, so make sure it's defined. +-{ +- \catcode`& = 13 +- \global\let& = \ampnr ++% Setup for the @verb command. ++% ++% Eight spaces for a tab ++\begingroup ++ \catcode`\^^I=\active ++ \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} ++\endgroup ++% ++\def\setupverb{% ++ \tt % easiest (and conventionally used) font for verbatim ++ \def\par{\leavevmode\endgraf}% ++ \catcode`\`=\active ++ \tabeightspaces ++ % Respect line breaks, ++ % print special symbols as themselves, and ++ % make each space count ++ % must do in this order: ++ \obeylines \uncatcodespecials \sepspaces + } + +-% First, defname, which formats the header line itself. +-% #1 should be the function name. +-% #2 should be the type of definition, such as "Function". ++% Setup for the @verbatim environment ++% ++% Real tab expansion ++\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount ++% ++\def\starttabbox{\setbox0=\hbox\bgroup} + +-\def\defname #1#2{% +-% Get the values of \leftskip and \rightskip as they were +-% outside the @def... +-\dimen2=\leftskip +-\advance\dimen2 by -\defbodyindent +-\noindent +-\setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}% +-\dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line +-\dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations +-\parshape 2 0in \dimen0 \defargsindent \dimen1 +-% Now output arg 2 ("Function" or some such) +-% ending at \deftypemargin from the right margin, +-% but stuck inside a box of width 0 so it does not interfere with linebreaking +-{% Adjust \hsize to exclude the ambient margins, +-% so that \rightline will obey them. +-\advance \hsize by -\dimen2 +-\rlap{\rightline{{\rm #2}\hskip -1.25pc }}}% +-% Make all lines underfull and no complaints: +-\tolerance=10000 \hbadness=10000 +-\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. - -- # Not a directory, so check to see that there is only one file specified. -- set dummy $files -- if test $# -gt 2; then -- $echo "$modename: \`$dest' is not a directory" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- 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 -- ;; -- esac -- done -+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac -+ exit $EXIT_SUCCESS +-\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% ++ \nonfillstart ++ % Easiest (and conventionally used) font for verbatim ++ \tt ++ \def\par{\leavevmode\egroup\box0\endgraf}% ++ \catcode`\`=\active ++ \tabexpand ++ \quoteexpand ++ % 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. ++% 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 {} ++\begingroup ++ \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other ++ \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] ++\endgroup ++% ++\def\verb{\begingroup\setupverb\doverb} ++% ++% ++% Do the @verbatim magic: define the macro \doverbatim so that ++% the (first) argument ends when '@end verbatim' is reached, ie: ++% ++% \def\doverbatim#1@end verbatim{#1} ++% ++% For Texinfo it's a lot easier than for LaTeX, ++% because texinfo's \verbatim doesn't stop at '\end{verbatim}': ++% we need not redefine '\', '{' and '}'. ++% ++% Inspired by LaTeX's verbatim command set [latex.ltx] ++% ++\begingroup ++ \catcode`\ =\active ++ \obeylines % ++ % ignore everything up to the first ^^M, that's the newline at the end ++ % of the @verbatim input line itself. Otherwise we get an extra blank ++ % line in the output. ++ \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% ++ % We really want {...\end verbatim} in the body of the macro, but ++ % without the active space; thus we have to use \xdef and \gobble. ++\endgroup ++% ++\envdef\verbatim{% ++ \setupverbatim\doverbatim ++} ++\let\Everbatim = \afterenvbreak + +-% 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\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV +- \medbreak +- \def#1{\endgraf\endgroup\medbreak}% +- \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}% +- \parindent=0in +- \advance\leftskip by \defbodyindent +- \exdentamount=\defbodyindent +- \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}} ++\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} ++% ++\def\doverbatiminclude#1{% ++ {% ++ \makevalueexpandable ++ \setupverbatim ++ \input #1 ++ \afterenvbreak ++ }% +} -- # 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 : -- else -- $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- 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 -- 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 -- # 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)" -- fi -- done -- fi -- -- # Do each command in the postinstall commands. -- lib="$destdir/$realname" -- eval cmds=\"$postinstall_cmds\" -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || exit $? -- 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 -- ;; -- 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 -- ;; -- -- *) -- # 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 -- notinst_deplibs= -- relink_command= -- -- # If there is no directory component, then add one. -- case $file in -- */* | *\\*) . $file ;; -- *) . ./$file ;; -- esac +-% Used for @deftypeop. The change from \deftypemethparsebody is an +-% extra argument at the beginning which is the `category', instead of it +-% being the hardwired string `Method' or `Instance Variable'. We have +-% to account for this both in the \...x definition and in parsing the +-% input at hand. Thus also need a control sequence (passed as #5) for +-% the \E... definition to assign the category name to. +-% +-\def\deftypeopparsebody#1#2#3#4#5 #6 {\begingroup\inENV +- \medbreak +- \def#1{\endgraf\endgroup\medbreak}% +- \def#2##1 ##2 ##3 {% +- \def#4{##1}% +- \begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}% +- \parindent=0in +- \advance\leftskip by \defbodyindent +- \exdentamount=\defbodyindent +- \begingroup\obeylines\activeparens\spacesplit{#3{#5}{#6}}} ++% @copying ... @end copying. ++% Save the text away for @insertcopying later. ++% ++% We save the uninterpreted tokens, rather than creating a box. ++% Saving the text in a box would be much easier, but then all the ++% typesetting commands (@smallbook, font changes, etc.) have to be done ++% beforehand -- and a) we want @copying to be done first in the source ++% file; b) letting users define the frontmatter in as flexible order as ++% possible is very desirable. ++% ++\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} ++\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} ++% ++\def\insertcopying{% ++ \begingroup ++ \parindent = 0pt % paragraph indentation looks wrong on title page ++ \scanexp\copyingtext ++ \endgroup ++} + +-\def\defopparsebody #1#2#3#4#5 {\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 ##2 {\def#4{##1}% +-\begingroup\obeylines\activeparens\spacesplit{#3{##2}}}% +-\parindent=0in +-\advance\leftskip by \defbodyindent +-\exdentamount=\defbodyindent +-\begingroup\obeylines\activeparens\spacesplit{#3{#5}}} + +-% These parsing functions are similar to the preceding ones +-% except that they do not make parens into active characters. +-% These are used for "variables" since they have no arguments. ++\message{defuns,} ++% @defun etc. + +-\def\defvarparsebody #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\spacesplit#3}% +-\parindent=0in +-\advance\leftskip by \defbodyindent +-\exdentamount=\defbodyindent +-\begingroup % +-\catcode 61=\active % +-\obeylines\spacesplit#3} ++\newskip\defbodyindent \defbodyindent=.4in ++\newskip\defargsindent \defargsindent=50pt ++\newskip\deflastargmargin \deflastargmargin=18pt ++\newcount\defunpenalty + +-% This is used for \def{tp,vr}parsebody. It could probably be used for +-% some of the others, too, with some judicious conditionals. +-% +-\def\parsebodycommon#1#2#3{% +- \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\spacesplit{#3{##1}}}% ++% Start the processing of @deffn: ++\def\startdefun{% ++ \ifnum\lastpenalty<10000 ++ \medbreak ++ \defunpenalty=10003 % Will keep this @deffn together with the ++ % following @def command, see below. ++ \else ++ % If there are two @def commands in a row, we'll have a \nobreak, ++ % which is there to keep the function description together with its ++ % header. But if there's nothing but headers, we need to allow a ++ % break somewhere. Check specifically for penalty 10002, inserted ++ % by \printdefunline, instead of 10000, since the sectioning ++ % commands also insert a nobreak penalty, and we don't want to allow ++ % a break between a section heading and a defun. ++ % ++ % As a minor refinement, we avoid "club" headers by signalling ++ % with penalty of 10003 after the very first @deffn in the ++ % sequence (see above), and penalty of 10002 after any following ++ % @def command. ++ \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi ++ % ++ % Similarly, after a section heading, do not allow a break. ++ % But do insert the glue. ++ \medskip % preceded by discardable penalty, so not a breakpoint ++ \fi ++ % + \parindent=0in + \advance\leftskip by \defbodyindent + \exdentamount=\defbodyindent +- \begingroup\obeylines + } + +-\def\defvrparsebody#1#2#3#4 {% +- \parsebodycommon{#1}{#2}{#3}% +- \spacesplit{#3{#4}}% ++\def\dodefunx#1{% ++ % First, check whether we are in the right environment: ++ \checkenv#1% ++ % ++ % As above, allow line break if we have multiple x headers in a row. ++ % It's not a great place, though. ++ \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi ++ % ++ % And now, it's time to reuse the body of the original defun: ++ \expandafter\gobbledefun#1% + } ++\def\gobbledefun#1\startdefun{} + +-% This loses on `@deftp {Data Type} {struct termios}' -- it thinks the +-% type is just `struct', because we lose the braces in `{struct +-% termios}' when \spacesplit reads its undelimited argument. Sigh. +-% \let\deftpparsebody=\defvrparsebody +-% +-% So, to get around this, we put \empty in with the type name. That +-% way, TeX won't find exactly `{...}' as an undelimited argument, and +-% won't strip off the braces. ++% \printdefunline \deffnheader{text} + % +-\def\deftpparsebody #1#2#3#4 {% +- \parsebodycommon{#1}{#2}{#3}% +- \spacesplit{\parsetpheaderline{#3{#4}}}\empty ++\def\printdefunline#1#2{% ++ \begingroup ++ % call \deffnheader: ++ #1#2 \endheader ++ % common ending: ++ \interlinepenalty = 10000 ++ \advance\rightskip by 0pt plus 1fil ++ \endgraf ++ \nobreak\vskip -\parskip ++ \penalty\defunpenalty % signal to \startdefun and \dodefunx ++ % Some of the @defun-type tags do not enable magic parentheses, ++ % rendering the following check redundant. But we don't optimize. ++ \checkparencounts ++ \endgroup + } + +-% Fine, but then we have to eventually remove the \empty *and* the +-% braces (if any). That's what this does. +-% +-\def\removeemptybraces\empty#1\relax{#1} ++\def\Edefun{\endgraf\medbreak} + +-% After \spacesplit has done its work, this is called -- #1 is the final +-% 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 remaining is to define \deffnheader. + % +-\def\parsetpheaderline#1#2#3{% +- #1{\removeemptybraces#2\relax}{#3}% +-}% - -- # 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 -- fi +-\def\defopvarparsebody #1#2#3#4#5 {\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 ##2 {\def#4{##1}% +-\begingroup\obeylines\spacesplit{#3{##2}}}% +-\parindent=0in +-\advance\leftskip by \defbodyindent +-\exdentamount=\defbodyindent +-\begingroup\obeylines\spacesplit{#3{#5}}} ++\def\makedefun#1{% ++ \expandafter\let\csname E#1\endcsname = \Edefun ++ \edef\temp{\noexpand\domakedefun ++ \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% ++ \temp ++} + +-% Split up #2 at the first space token. +-% call #1 with two arguments: +-% the first is all of #2 before the space token, +-% the second is all of #2 after that space token. +-% If #2 contains no space token, all of it is passed as the first arg +-% and the second is passed as empty. ++% \domakedefun \deffn \deffnx \deffnheader ++% ++% Define \deffn and \deffnx, without parameters. ++% \deffnheader has to be defined explicitly. ++% ++\def\domakedefun#1#2#3{% ++ \envdef#1{% ++ \startdefun ++ \parseargusing\activeparens{\printdefunline#3}% ++ }% ++ \def#2{\dodefunx#1}% ++ \def#3% ++} + +-{\obeylines +-\gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}% +-\long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{% +-\ifx\relax #3% +-#1{#2}{}\else #1{#2}{#3#4}\fi}} ++%%% Untyped functions: + +-% So much for the things common to all kinds of definitions. ++% @deffn category name args ++\makedefun{deffn}{\deffngeneral{}} + +-% Define @defun. ++% @deffn category class name args ++\makedefun{defop}#1 {\defopon{#1\ \putwordon}} + +-% First, define the processing that is wanted for arguments of \defun +-% Use this to expand the args and terminate the paragraph they make up ++% \defopon {category on}class name args ++\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } + +-\def\defunargs#1{\functionparens \sl +-% Expand, preventing hyphenation at `-' chars. +-% Note that groups don't affect changes in \hyphenchar. +-% Set the font temporarily and use \font in case \setfont made \tensl a macro. +-{\tensl\hyphenchar\font=0}% +-#1% +-{\tensl\hyphenchar\font=45}% +-\ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% +-\interlinepenalty=10000 +-\advance\rightskip by 0pt plus 1fil +-\endgraf\nobreak\vskip -\parskip\nobreak ++% \deffngeneral {subind}category name args ++% ++\def\deffngeneral#1#2 #3 #4\endheader{% ++ % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. ++ \dosubind{fn}{\code{#3}}{#1}% ++ \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% + } + +-\def\deftypefunargs #1{% +-% Expand, preventing hyphenation at `-' chars. +-% Note that groups don't affect changes in \hyphenchar. +-% Use \boldbraxnoamp, not \functionparens, so that & is not special. +-\boldbraxnoamp +-\tclose{#1}% avoid \code because of side effects on active chars +-\interlinepenalty=10000 +-\advance\rightskip by 0pt plus 1fil +-\endgraf\nobreak\vskip -\parskip\nobreak +-} ++%%% Typed functions: + +-% Do complete processing of one @defun or @defunx line already parsed. ++% @deftypefn category type name args ++\makedefun{deftypefn}{\deftypefngeneral{}} + +-% @deffn Command forward-char nchars ++% @deftypeop category class type name args ++\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} + +-\def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader} ++% \deftypeopon {category on}class type name args ++\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } + +-\def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% +-\begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % +-\catcode 61=\other % Turn off change made in \defparsebody ++% \deftypefngeneral {subind}category type name args ++% ++\def\deftypefngeneral#1#2 #3 #4 #5\endheader{% ++ \dosubind{fn}{\code{#4}}{#1}% ++ \defname{#2}{#3}{#4}\defunargs{#5\unskip}% + } + +-% @defun == @deffn Function - -- 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 +-\def\defun{\defparsebody\Edefun\defunx\defunheader} ++%%% Typed variables: + +-\def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index +-\begingroup\defname {#1}{\putwordDeffunc}% +-\defunargs {#2}\endgroup % +-\catcode 61=\other % Turn off change made in \defparsebody +-} ++% @deftypevr category type var args ++\makedefun{deftypevr}{\deftypecvgeneral{}} + +-% @deftypefun int foobar (int @var{foo}, float @var{bar}) ++% @deftypecv category class type var args ++\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} + +-\def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader} ++% \deftypecvof {category of}class type var args ++\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } + +-% #1 is the data type. #2 is the name and args. +-\def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax} +-% #1 is the data type, #2 the name, #3 the args. +-\def\deftypefunheaderx #1#2 #3\relax{% +-\doind {fn}{\code{#2}}% Make entry in function index +-\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypefun}% +-\deftypefunargs {#3}\endgroup % +-\catcode 61=\other % Turn off change made in \defparsebody ++% \deftypecvgeneral {subind}category type var args ++% ++\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% ++ \dosubind{vr}{\code{#4}}{#1}% ++ \defname{#2}{#3}{#4}\defunargs{#5\unskip}% + } + +-% @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar}) - -- relink_command= -- # If there is no directory component, then add one. -- case $file in -- */* | *\\*) . $file ;; -- *) . ./$file ;; -- esac +-\def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader} - -- 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-$$" -- if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : -- else -- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 -- continue -- fi -- file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` -- outputname="$tmpdir/$file" -- # Replace the output file specification. -- relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` +-% \defheaderxcond#1\relax$$$ +-% puts #1 in @code, followed by a space, but does nothing if #1 is null. +-\def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi} ++%%% Untyped variables: + +-% #1 is the classification. #2 is the data type. #3 is the name and args. +-\def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax} +-% #1 is the classification, #2 the data type, #3 the name, #4 the args. +-\def\deftypefnheaderx #1#2#3 #4\relax{% +-\doind {fn}{\code{#3}}% Make entry in function index +-\begingroup +-\normalparens % notably, turn off `&' magic, which prevents +-% at least some C++ text from working +-\defname {\defheaderxcond#2\relax$$$#3}{#1}% +-\deftypefunargs {#4}\endgroup % +-\catcode 61=\other % Turn off change made in \defparsebody +-} ++% @defvr category var args ++\makedefun{defvr}#1 {\deftypevrheader{#1} {} } + +-% @defmac == @deffn Macro ++% @defcv category class var args ++\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} + +-\def\defmac{\defparsebody\Edefmac\defmacx\defmacheader} ++% \defcvof {category of}class var args ++\def\defcvof#1#2 {\deftypecvof{#1}#2 {} } + +-\def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index +-\begingroup\defname {#1}{\putwordDefmac}% +-\defunargs {#2}\endgroup % +-\catcode 61=\other % Turn off change made in \defparsebody ++%%% Type: ++% @deftp category name args ++\makedefun{deftp}#1 #2 #3\endheader{% ++ \doind{tp}{\code{#2}}% ++ \defname{#1}{}{#2}\defunargs{#3\unskip}% + } + +-% @defspec == @deffn Special Form +- +-\def\defspec{\defparsebody\Edefspec\defspecx\defspecheader} +- +-\def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index +-\begingroup\defname {#1}{\putwordDefspec}% +-\defunargs {#2}\endgroup % +-\catcode 61=\other % Turn off change made in \defparsebody +-} ++% Remaining @defun-like shortcuts: ++\makedefun{defun}{\deffnheader{\putwordDeffunc} } ++\makedefun{defmac}{\deffnheader{\putwordDefmac} } ++\makedefun{defspec}{\deffnheader{\putwordDefspec} } ++\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } ++\makedefun{defvar}{\defvrheader{\putwordDefvar} } ++\makedefun{defopt}{\defvrheader{\putwordDefopt} } ++\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } ++\makedefun{defmethod}{\defopon\putwordMethodon} ++\makedefun{deftypemethod}{\deftypeopon\putwordMethodon} ++\makedefun{defivar}{\defcvof\putwordInstanceVariableof} ++\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} + +-% @defop CATEGORY CLASS OPERATION ARG... ++% \defname, which formats the name of the @def (not the args). ++% #1 is the category, such as "Function". ++% #2 is the return type, if any. ++% #3 is the function name. + % +-\def\defop #1 {\def\defoptype{#1}% +-\defopparsebody\Edefop\defopx\defopheader\defoptype} ++% We are followed by (but not passed) the arguments, if any. + % +-\def\defopheader#1#2#3{% +-\dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index +-\begingroup\defname {#2}{\defoptype\ \putwordon\ #1}% +-\defunargs {#3}\endgroup % ++\def\defname#1#2#3{% ++ % Get the values of \leftskip and \rightskip as they were outside the @def... ++ \advance\leftskip by -\defbodyindent ++ % ++ % How we'll format the type name. Putting it in brackets helps ++ % distinguish it from the body text that may end up on the next line ++ % just below it. ++ \def\temp{#1}% ++ \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} ++ % ++ % Figure out line sizes for the paragraph shape. ++ % The first line needs space for \box0; but if \rightskip is nonzero, ++ % we need only space for the part of \box0 which exceeds it: ++ \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip ++ % The continuations: ++ \dimen2=\hsize \advance\dimen2 by -\defargsindent ++ % (plain.tex says that \dimen1 should be used only as global.) ++ \parshape 2 0in \dimen0 \defargsindent \dimen2 ++ % ++ % Put the type name to the right margin. ++ \noindent ++ \hbox to 0pt{% ++ \hfil\box0 \kern-\hsize ++ % \hsize has to be shortened this way: ++ \kern\leftskip ++ % Intentionally do not respect \rightskip, since we need the space. ++ }% ++ % ++ % Allow all lines to be underfull without complaint: ++ \tolerance=10000 \hbadness=10000 ++ \exdentamount=\defbodyindent ++ {% ++ % defun fonts. We use typewriter by default (used to be bold) because: ++ % . we're printing identifiers, they should be in tt in principle. ++ % . in languages with many accents, such as Czech or French, it's ++ % common to leave accents off identifiers. The result looks ok in ++ % tt, but exceedingly strange in rm. ++ % . we don't want -- and --- to be treated as ligatures. ++ % . this still does not fix the ?` and !` ligatures, but so far no ++ % one has made identifiers using them :). ++ \df \tt ++ \def\temp{#2}% return value type ++ \ifx\temp\empty\else \tclose{\temp} \fi ++ #3% output function name ++ }% ++ {\rm\enskip}% hskip 0.5 em of \tenrm ++ % ++ \boldbrax ++ % arguments will be output next, if any. + } + +-% @deftypeop CATEGORY CLASS TYPE OPERATION ARG... +-% +-\def\deftypeop #1 {\def\deftypeopcategory{#1}% +- \deftypeopparsebody\Edeftypeop\deftypeopx\deftypeopheader +- \deftypeopcategory} ++% Print arguments in slanted roman (not ttsl), inconsistently with using ++% tt for the name. This is because literal text is sometimes needed in ++% the argument list (groff manual), and ttsl and tt are not very ++% distinguishable. Prevent hyphenation at `-' chars. + % +-% #1 is the class name, #2 the data type, #3 the operation name, #4 the args. +-\def\deftypeopheader#1#2#3#4{% +- \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index +- \begingroup +- \defname{\defheaderxcond#2\relax$$$#3} +- {\deftypeopcategory\ \putwordon\ \code{#1}}% +- \deftypefunargs{#4}% +- \endgroup ++\def\defunargs#1{% ++ % use sl by default (not ttsl), ++ % tt for the names. ++ \df \sl \hyphenchar\font=0 ++ % ++ % 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 ++ #1% ++ \sl\hyphenchar\font=45 + } + +-% @deftypemethod CLASS TYPE METHOD ARG... +-% +-\def\deftypemethod{% +- \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} ++% We want ()&[] to print specially on the defun line. + % +-% #1 is the class name, #2 the data type, #3 the method name, #4 the args. +-\def\deftypemethodheader#1#2#3#4{% +- \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index +- \begingroup +- \defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}% +- \deftypefunargs{#4}% +- \endgroup ++\def\activeparens{% ++ \catcode`\(=\active \catcode`\)=\active ++ \catcode`\[=\active \catcode`\]=\active ++ \catcode`\&=\active + } + +-% @deftypeivar CLASS TYPE VARNAME +-% +-\def\deftypeivar{% +- \deftypemethparsebody\Edeftypeivar\deftypeivarx\deftypeivarheader} +-% +-% #1 is the class name, #2 the data type, #3 the variable name. +-\def\deftypeivarheader#1#2#3{% +- \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index +- \begingroup +- \defname{#3}{\putwordInstanceVariableof\ \code{#1}}% +- \defvarargs{#3}% +- \endgroup +-} ++% Make control sequences which act like normal parenthesis chars. ++\let\lparen = ( \let\rparen = ) + +-% @defmethod == @defop Method +-% +-\def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} +-% +-% #1 is the class name, #2 the method name, #3 the args. +-\def\defmethodheader#1#2#3{% +- \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index +- \begingroup +- \defname{#2}{\putwordMethodon\ \code{#1}}% +- \defunargs{#3}% +- \endgroup ++% 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. ++{ ++ \activeparens ++ \global\let(=\lparen \global\let)=\rparen ++ \global\let[=\lbrack \global\let]=\rbrack ++ \global\let& = \& ++ ++ \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} ++ \gdef\magicamp{\let&=\amprm} + } + +-% @defcv {Class Option} foo-class foo-flag ++\newcount\parencount + +-\def\defcv #1 {\def\defcvtype{#1}% +-\defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype} ++% If we encounter &foo, then turn on ()-hacking afterwards ++\newif\ifampseen ++\def\amprm#1 {\ampseentrue{\bf\ }} + +-\def\defcvarheader #1#2#3{% +-\dosubind {vr}{\code{#2}}{\putwordof\ #1}% Make entry in var index +-\begingroup\defname {#2}{\defcvtype\ \putwordof\ #1}% +-\defvarargs {#3}\endgroup % ++\def\parenfont{% ++ \ifampseen ++ % At the first level, print parens in roman, ++ % otherwise use the default font. ++ \ifnum \parencount=1 \rm \fi ++ \else ++ % The \sf parens (in \boldbrax) actually are a little bolder than ++ % the contained text. This is especially needed for [ and ] . ++ \sf ++ \fi + } - -- $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%"` -- fi -- fi +-% @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME +-% +-\def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader} +-% +-\def\defivarheader#1#2#3{% +- \dosubind {vr}{\code{#2}}{\putwordof\ #1}% entry in var index +- \begingroup +- \defname{#2}{\putwordInstanceVariableof\ #1}% +- \defvarargs{#3}% +- \endgroup ++\def\infirstlevel#1{% ++ \ifampseen ++ \ifnum\parencount=1 ++ #1% ++ \fi ++ \fi + } ++\def\bfafterword#1 {#1 \bf} + +-% @defvar +-% First, define the processing that is wanted for arguments of @defvar. +-% This is actually simple: just print them in roman. +-% This must expand the args and terminate the paragraph they make up +-\def\defvarargs #1{\normalparens #1% +-\interlinepenalty=10000 +-\endgraf\nobreak\vskip -\parskip\nobreak} - +-% @defvr Counter foo-count - -- # remove .exe since cygwin /usr/bin/install will append another -- # one anyways -- 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$,,'` -- ;; -- esac -- ;; -- esac +-\def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader} - -- $show "$install_prog$stripme $file $destfile" -- $run eval "$install_prog\$stripme \$file \$destfile" || exit $? -- test -n "$outputname" && ${rm}r "$tmpdir" -- ;; -- esac -- done +-\def\defvrheader #1#2#3{\doind {vr}{\code{#2}}% +-\begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup} - -- for file in $staticlibs; do -- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` +-% @defvar == @defvr Variable - -- # Set up the ranlib parameters. -- oldlib="$destdir/$name" +-\def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader} - -- $show "$install_prog $file $oldlib" -- $run eval "$install_prog \$file \$oldlib" || exit $? +-\def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index +-\begingroup\defname {#1}{\putwordDefvar}% +-\defvarargs {#2}\endgroup % ++\def\opnr{% ++ \global\advance\parencount by 1 ++ {\parenfont(}% ++ \infirstlevel \bfafterword + } - -- if test -n "$stripme" && test -n "$striplib"; then -- $show "$old_striplib $oldlib" -- $run eval "$old_striplib $oldlib" || exit $? -- fi +-% @defopt == @defvr {User Option} - -- # Do each command in the postinstall commands. -- eval cmds=\"$old_postinstall_cmds\" -- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" || exit $? -- done -- IFS="$save_ifs" -- done +-\def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader} - -- if test -n "$future_libdirs"; then -- $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 -- fi +-\def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index +-\begingroup\defname {#1}{\putwordDefopt}% +-\defvarargs {#2}\endgroup % ++\def\clnr{% ++ {\parenfont)}% ++ \infirstlevel \sl ++ \global\advance\parencount by -1 + } + +-% @deftypevar int foobar - -- 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' -- else -- exit 0 -- fi -- ;; +-\def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader} - -- # libtool finish mode -- finish) -- modename="$modename: finish" -- libdirs="$nonopt" -- admincmds= +-% #1 is the data type. #2 is the name, perhaps followed by text that +-% is actually part of the data type, which should not be put into the index. +-\def\deftypevarheader #1#2{% +-\dovarind#2 \relax% Make entry in variables index +-\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}% +-\interlinepenalty=10000 +-\endgraf\nobreak\vskip -\parskip\nobreak +-\endgroup} +-\def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} - -- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then -- for dir -- do -- libdirs="$libdirs $dir" -- done +-% @deftypevr {Global Flag} int enable - -- 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='~' -- 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 +-\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader} - -- # Exit here if they wanted silent mode. -- test "$show" = ":" && exit 0 +-\def\deftypevrheader #1#2#3{\dovarind#3 \relax% +-\begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1} +-\interlinepenalty=10000 +-\endgraf\nobreak\vskip -\parskip\nobreak +-\endgroup} - -- echo "----------------------------------------------------------------------" -- echo "Libraries have been installed in:" -- for libdir in $libdirs; do -- echo " $libdir" -- done -- echo -- echo "If you ever happen to want to link against installed libraries" -- echo "in a given directory, LIBDIR, you must either use libtool, and" -- echo "specify the full pathname of the library, or use the \`-LLIBDIR'" -- echo "flag during linking and do at least one of the following:" -- if test -n "$shlibpath_var"; then -- echo " - add LIBDIR to the \`$shlibpath_var' environment variable" -- echo " during execution" -- fi -- if test -n "$runpath_var"; then -- echo " - add LIBDIR to the \`$runpath_var' environment variable" -- echo " during linking" -- fi -- if test -n "$hardcode_libdir_flag_spec"; then -- libdir=LIBDIR -- eval flag=\"$hardcode_libdir_flag_spec\" +-% Now define @deftp +-% Args are printed in bold, a slight difference from @defvar. - -- echo " - use the \`$flag' linker flag" -- fi -- if test -n "$admincmds"; then -- echo " - have your system administrator run these commands:$admincmds" -- fi -- if test -f /etc/ld.so.conf; then -- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" -- fi -- echo -- echo "See any operating system documentation about shared libraries for" -- echo "more information, such as the ld(1) and ld.so(8) manual pages." -- echo "----------------------------------------------------------------------" -- exit 0 -- ;; +-\def\deftpargs #1{\bf \defvarargs{#1}} - -- # libtool execute mode -- execute) -- modename="$modename: execute" +-% @deftp Class window height width ... - -- # 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 -- fi +-\def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader} - -- # 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 -- fi +-\def\deftpheader #1#2#3{\doind {tp}{\code{#2}}% +-\begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup} ++\newcount\brackcount ++\def\lbrb{% ++ \global\advance\brackcount by 1 ++ {\bf[}% ++} ++\def\rbrb{% ++ {\bf]}% ++ \global\advance\brackcount by -1 ++} + +-% These definitions are used if you use @defunx (etc.) +-% anywhere other than immediately after a @defun or @defunx. +-% +-\def\defcvx#1 {\errmessage{@defcvx in invalid context}} +-\def\deffnx#1 {\errmessage{@deffnx in invalid context}} +-\def\defivarx#1 {\errmessage{@defivarx in invalid context}} +-\def\defmacx#1 {\errmessage{@defmacx in invalid context}} +-\def\defmethodx#1 {\errmessage{@defmethodx in invalid context}} +-\def\defoptx #1 {\errmessage{@defoptx in invalid context}} +-\def\defopx#1 {\errmessage{@defopx in invalid context}} +-\def\defspecx#1 {\errmessage{@defspecx in invalid context}} +-\def\deftpx#1 {\errmessage{@deftpx in invalid context}} +-\def\deftypefnx#1 {\errmessage{@deftypefnx in invalid context}} +-\def\deftypefunx#1 {\errmessage{@deftypefunx in invalid context}} +-\def\deftypeivarx#1 {\errmessage{@deftypeivarx in invalid context}} +-\def\deftypemethodx#1 {\errmessage{@deftypemethodx in invalid context}} +-\def\deftypeopx#1 {\errmessage{@deftypeopx in invalid context}} +-\def\deftypevarx#1 {\errmessage{@deftypevarx in invalid context}} +-\def\deftypevrx#1 {\errmessage{@deftypevrx in invalid context}} +-\def\defunx#1 {\errmessage{@defunx in invalid context}} +-\def\defvarx#1 {\errmessage{@defvarx in invalid context}} +-\def\defvrx#1 {\errmessage{@defvrx in invalid context}} ++\def\checkparencounts{% ++ \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{% ++ \message{Warning: unbalanced parentheses in @def...}% ++ \global\parencount=0 ++} ++\def\badbrackcount{% ++ \message{Warning: unbalanced square brackets in @def...}% ++ \global\brackcount=0 ++} + + + \message{macros,} +@@ -4850,42 +6552,68 @@ width0pt\relax} \fi + % 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 +- \newwrite\macscribble +- \def\scanmacro#1{% +- \begingroup \newlinechar`\^^M +- % Undo catcode changes of \startcontents and \doprintindex +- \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ +- % Append \endinput to make sure that TeX does not see the ending newline. +- \toks0={#1\endinput}% +- \immediate\openout\macscribble=\jobname.tmp +- \immediate\write\macscribble{\the\toks0}% +- \immediate\closeout\macscribble +- \let\xeatspaces\eatspaces +- \input \jobname.tmp +- \endgroup +-} +-\else +-\def\scanmacro#1{% +-\begingroup \newlinechar`\^^M +-% Undo catcode changes of \startcontents and \doprintindex +-\catcode`\@=0 \catcode`\\=12 \escapechar=`\@ +-\let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} ++ \newwrite\macscribble ++ \def\scantokens#1{% ++ \toks0={#1}% ++ \immediate\openout\macscribble=\jobname.tmp ++ \immediate\write\macscribble{\the\toks0}% ++ \immediate\closeout\macscribble ++ \input \jobname.tmp ++ } + \fi + ++\def\scanmacro#1{% ++ \begingroup ++ \newlinechar`\^^M ++ \let\xeatspaces\eatspaces ++ % Undo catcode changes of \startcontents and \doprintindex ++ % When called from @insertcopying or (short)caption, we need active ++ % backslash to get it printed correctly. Previously, we had ++ % \catcode`\\=\other instead. We'll see whether a problem appears ++ % with macro expansion. --kasal, 19aug04 ++ \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ ++ % ... and \example ++ \spaceisspace ++ % ++ % Append \endinput to make sure that TeX does not see the ending newline. ++ % I've verified that it is necessary both for e-TeX and for ordinary TeX ++ % --kasal, 29nov03 ++ \scantokens{#1\endinput}% ++ \endgroup ++} ++ ++\def\scanexp#1{% ++ \edef\temp{\noexpand\scanmacro{#1}}% ++ \temp ++} ++ + \newcount\paramno % Count of parameters + \newtoks\macname % Macro name + \newif\ifrecursive % Is it recursive? +-\def\macrolist{} % List of all defined macros in the form +- % \do\macro1\do\macro2... ++ ++% List of all defined macros in the form ++% \definedummyword\macro1\definedummyword\macro2... ++% Currently is also contains all @aliases; the list can be split ++% if there is a need. ++\def\macrolist{} ++ ++% Add the macro to \macrolist ++\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} ++\def\addtomacrolistxxx#1{% ++ \toks0 = \expandafter{\macrolist\definedummyword#1}% ++ \xdef\macrolist{\the\toks0}% ++} + + % Utility routines. +-% Thisdoes \let #1 = #2, except with \csnames. ++% 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 +-\expandafter\expandafter +-\csname#1\endcsname +-\csname#2\endcsname} ++ \expandafter\let ++ \csname#1\expandafter\endcsname ++ \csname#2\endcsname ++} + + % Trim leading and trailing spaces off a string. + % Concepts from aro-bend problem 15 (see CTAN). +@@ -4898,7 +6626,7 @@ width0pt\relax} \fi + } + + % Trim a single trailing ^^M off a string. +-{\catcode`\^^M=12\catcode`\Q=3% ++{\catcode`\^^M=\other \catcode`\Q=3% + \gdef\eatcr #1{\eatcra #1Q^^MQ}% + \gdef\eatcra#1^^MQ{\eatcrb#1Q}% + \gdef\eatcrb#1Q#2Q{#1}% +@@ -4908,34 +6636,45 @@ width0pt\relax} \fi + % 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. + ++\def\scanctxt{% ++ \catcode`\"=\other ++ \catcode`\+=\other ++ \catcode`\<=\other ++ \catcode`\>=\other ++ \catcode`\@=\other ++ \catcode`\^=\other ++ \catcode`\_=\other ++ \catcode`\|=\other ++ \catcode`\~=\other ++ \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi ++} ++ ++\def\scanargctxt{% ++ \scanctxt ++ \catcode`\\=\other ++ \catcode`\^^M=\other ++} ++ + \def\macrobodyctxt{% +- \catcode`\~=12 +- \catcode`\^=12 +- \catcode`\_=12 +- \catcode`\|=12 +- \catcode`\<=12 +- \catcode`\>=12 +- \catcode`\+=12 +- \catcode`\{=12 +- \catcode`\}=12 +- \catcode`\@=12 +- \catcode`\^^M=12 +- \usembodybackslash} ++ \scanctxt ++ \catcode`\{=\other ++ \catcode`\}=\other ++ \catcode`\^^M=\other ++ \usembodybackslash ++} + + \def\macroargctxt{% +- \catcode`\~=12 +- \catcode`\^=12 +- \catcode`\_=12 +- \catcode`\|=12 +- \catcode`\<=12 +- \catcode`\>=12 +- \catcode`\+=12 +- \catcode`\@=12 +- \catcode`\\=12} ++ \scanctxt ++ \catcode`\\=\other ++} + + % \mbodybackslash is the definition of \ in @macro bodies. + % It maps \foo\ => \csname macarg.foo\endcsname => #N +@@ -4963,45 +6702,42 @@ width0pt\relax} \fi + \message{Warning: redefining \the\macname}% + \else + \expandafter\ifx\csname \the\macname\endcsname \relax +- \else \errmessage{The name \the\macname\space is reserved}\fi ++ \else \errmessage{Macro name \the\macname\space already defined}\fi + \global\cslet{macsave.\the\macname}{\the\macname}% + \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% +- % Add the macroname to \macrolist +- \toks0 = \expandafter{\macrolist\do}% +- \xdef\macrolist{\the\toks0 +- \expandafter\noexpand\csname\the\macname\endcsname}% ++ \addtomacrolist{\the\macname}% + \fi + \begingroup \macrobodyctxt + \ifrecursive \expandafter\parsermacbody + \else \expandafter\parsemacbody + \fi} + +-\def\unmacro{\parsearg\unmacroxxx} +-\def\unmacroxxx#1{% ++\parseargdef\unmacro{% + \if1\csname ismacro.#1\endcsname + \global\cslet{#1}{macsave.#1}% + \global\expandafter\let \csname ismacro.#1\endcsname=0% +- % Remove the macro name from \macrolist ++ % Remove the macro name from \macrolist: + \begingroup +- \edef\tempa{\expandafter\noexpand\csname#1\endcsname}% +- \def\do##1{% +- \def\tempb{##1}% +- \ifx\tempa\tempb +- % remove this +- \else +- \toks0 = \expandafter{\newmacrolist\do}% +- \edef\newmacrolist{\the\toks0\expandafter\noexpand\tempa}% +- \fi}% +- \def\newmacrolist{}% +- % Execute macro list to define \newmacrolist +- \macrolist +- \global\let\macrolist\newmacrolist ++ \expandafter\let\csname#1\endcsname \relax ++ \let\definedummyword\unmacrodo ++ \xdef\macrolist{\macrolist}% + \endgroup + \else + \errmessage{Macro #1 not defined}% + \fi + } + ++% Called by \do from \dounmacro on each macro. The idea is to omit any ++% macro definitions that have been changed to \relax. ++% ++\def\unmacrodo#1{% ++ \ifx #1\relax ++ % remove this ++ \else ++ \noexpand\definedummyword \noexpand#1% ++ \fi ++} ++ + % 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 +6847,31 @@ width0pt\relax} \fi + % {. 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) +-\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx} ++\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} + \def\braceorlinexxx{% + \ifx\nchar\bgroup\else + \expandafter\parsearg +- \fi \next} - -- 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 : -- else -- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi +-% We mant to disable all macros during \shipout so that they are not +-% expanded by \write. +-\def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}% +- \edef\next{\macrolist}\expandafter\endgroup\next} ++ \fi \macnamexxx} + + + % @alias. + % We need some trickery to remove the optional spaces around the equal + % sign. Just make them active and then expand them all to nothing. +-\def\alias{\begingroup\obeyspaces\parsearg\aliasxxx} ++\def\alias{\parseargusing\obeyspaces\aliasxxx} + \def\aliasxxx #1{\aliasyyy#1\relax} +-\def\aliasyyy #1=#2\relax{\ignoreactivespaces +-\edef\next{\global\let\expandafter\noexpand\csname#1\endcsname=% +- \expandafter\noexpand\csname#2\endcsname}% +-\expandafter\endgroup\next} ++\def\aliasyyy #1=#2\relax{% ++ {% ++ \expandafter\let\obeyedspace=\empty ++ \addtomacrolist{#1}% ++ \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% ++ }% ++ \next ++} + + + \message{cross references,} +-% @xref etc. + + \newwrite\auxfile - -- # Read the libtool library. -- dlname= -- library_names= + \newif\ifhavexrefs % True if xref values are known. + \newif\ifwarnedxrefs % True if we warned once that they aren't known. + +@@ -5147,56 +6880,68 @@ width0pt\relax} \fi + \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, + node \samp{\ignorespaces#1{}}} + +-% @node's job is to define \lastnode. +-\def\node{\ENVcheck\parsearg\nodezzz} +-\def\nodezzz#1{\nodexxx [#1,]} +-\def\nodexxx[#1,#2]{\gdef\lastnode{#1}} ++% @node's only job in TeX is to define \lastnode, which is used in ++% cross-references. The @node line might or might not have commas, and ++% might or might not have spaces before the first comma, like: ++% @node foo , bar , ... ++% We don't want such trailing spaces in the node name. ++% ++\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} ++% ++% also remove a trailing comma, in case of something like this: ++% @node Help-Cross, , , Cross-refs ++\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} ++\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} ++ + \let\nwnode=\node +-\let\lastnode=\relax ++\let\lastnode=\empty + +-% The sectioning commands (@chapter, etc.) call these. +-\def\donoderef{% +- \ifx\lastnode\relax\else +- \expandafter\expandafter\expandafter\setref{\lastnode}% +- {Ysectionnumberandtype}% +- \global\let\lastnode=\relax +- \fi +-} +-\def\unnumbnoderef{% +- \ifx\lastnode\relax\else +- \expandafter\expandafter\expandafter\setref{\lastnode}{Ynothing}% +- \global\let\lastnode=\relax +- \fi +-} +-\def\appendixnoderef{% +- \ifx\lastnode\relax\else +- \expandafter\expandafter\expandafter\setref{\lastnode}% +- {Yappendixletterandtype}% +- \global\let\lastnode=\relax ++% Write a cross-reference definition for the current node. #1 is the ++% type (Ynumbered, Yappendix, Ynothing). ++% ++\def\donoderef#1{% ++ \ifx\lastnode\empty\else ++ \setref{\lastnode}{#1}% ++ \global\let\lastnode=\empty + \fi + } + - -- # If there is no directory component, then add one. -- case $file in -- */* | *\\*) . $file ;; -- *) . ./$file ;; -- esac + % @anchor{NAME} -- define xref target at arbitrary point. + % + \newcount\savesfregister +-\gdef\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} +-\gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} +-\gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} ++% ++\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} ++\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} ++\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} + +-% \setref{NAME}{SNT} defines a cross-reference point NAME, namely +-% NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have +-% to set \indexdummies so commands such as @code in a section title +-% aren't expanded. It would be nicer not to expand the titles in the +-% 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 \lastsection, ++% or the anchor name. ++% 2) NAME-snt - section number and type, passed as the SNT arg, or ++% empty for anchors. ++% 3) NAME-pg - the page number. + % +-\def\setref#1#2{{% +- \indexdummies ++% This is called from \donoderef, \anchor, and \dofloat. In the case of ++% floats, there is an additional part, which is not written here: ++% 4) NAME-lof - the text as it should appear in a @listoffloats. ++% ++\def\setref#1#2{% + \pdfmkdest{#1}% +- \dosetq{#1-title}{Ytitle}% +- \dosetq{#1-pg}{Ypagenumber}% +- \dosetq{#1-snt}{#2}% +-}} ++ \iflinks ++ {% ++ \atdummies % preserve commands, but don't expand them ++ \edef\writexrdef##1##2{% ++ \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ++ ##1}{##2}}% these are parameters of \writexrdef ++ }% ++ \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 ++ }% ++ \fi ++} + + % @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 +6954,162 @@ width0pt\relax} \fi + \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup + \unsepspaces + \def\printedmanual{\ignorespaces #5}% +- \def\printednodename{\ignorespaces #3}% +- \setbox1=\hbox{\printedmanual}% +- \setbox0=\hbox{\printednodename}% ++ \def\printedrefname{\ignorespaces #3}% ++ \setbox1=\hbox{\printedmanual\unskip}% ++ \setbox0=\hbox{\printedrefname\unskip}% + \ifdim \wd0 = 0pt + % No printed node name was explicitly given. + \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax + % Use the node name inside the square brackets. +- \def\printednodename{\ignorespaces #1}% ++ \def\printedrefname{\ignorespaces #1}% + \else + % Use the actual chapter/section title appear inside + % the square brackets. Use the real section title if we have it. + \ifdim \wd1 > 0pt + % It is in another manual, so we don't have it. +- \def\printednodename{\ignorespaces #1}% ++ \def\printedrefname{\ignorespaces #1}% + \else + \ifhavexrefs + % We know the real title if we have the xref values. +- \def\printednodename{\refx{#1-title}{}}% ++ \def\printedrefname{\refx{#1-title}{}}% + \else + % Otherwise just copy the Info node name. +- \def\printednodename{\ignorespaces #1}% ++ \def\printedrefname{\ignorespaces #1}% + \fi% + \fi + \fi + \fi + % +- % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not +- % insert empty discretionaries after hyphens, which means that it will +- % not find a line break at a hyphen in a node names. Since some manuals +- % are best written with fairly long node names, containing hyphens, this +- % 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. ++ % Make link in pdf output. + \ifpdf +- \leavevmode +- \getfilename{#4}% +- \ifnum\filenamelength>0 +- \startlink attr{/Border [0 0 0]}% +- goto file{\the\filename.pdf} name{#1@}% +- \else +- \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 ++ goto file{\the\filename.pdf} name{\pdfxrefdest}% ++ \else ++ goto name{\pdfmkpgn{\pdfxrefdest}}% ++ \fi ++ }% ++ \setcolor{\linkcolor}% + \fi + % +- \ifdim \wd1 > 0pt +- \putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}% ++ % Float references are printed completely differently: "Figure 1.2" ++ % instead of "[somenode], p.3". We distinguish them by the ++ % LABEL-title being set to a magic string. ++ {% ++ % Have to otherify everything special to allow the \csname to ++ % include an _ in the xref name, etc. ++ \indexnofonts ++ \turnoffactive ++ \expandafter\global\expandafter\let\expandafter\Xthisreftitle ++ \csname XR#1-title\endcsname ++ }% ++ \iffloat\Xthisreftitle ++ % If the user specified the print name (third arg) to the ref, ++ % print it instead of our usual "Figure 1.2". ++ \ifdim\wd0 = 0pt ++ \refx{#1-snt}{}% ++ \else ++ \printedrefname ++ \fi ++ % ++ % if the user also gave the printed manual name (fifth arg), append ++ % "in MANUALNAME". ++ \ifdim \wd1 > 0pt ++ \space \putwordin{} \cite{\printedmanual}% ++ \fi + \else +- % _ (for example) has to be the character _ for the purposes of the +- % control sequence corresponding to the node, but it has to expand +- % into the usual \leavevmode...\vrule stuff for purposes of +- % printing. So we \turnoffactive for the \refx-snt, back on for the +- % printing, back off for the \refx-pg. +- {\normalturnoffactive +- % Only output a following space if the -snt ref is nonempty; for +- % @unnumbered and @anchor, it won't be. +- \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% +- \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi +- }% +- % [mynode], +- [\printednodename],\space +- % page 3 +- \turnoffactive \putwordpage\tie\refx{#1-pg}{}% ++ % node/anchor (non-float) references. ++ % ++ % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not ++ % insert empty discretionaries after hyphens, which means that it will ++ % not find a line break at a hyphen in a node names. Since some manuals ++ % are best written with fairly long node names, containing hyphens, this ++ % 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}% ++ \else ++ % _ (for example) has to be the character _ for the purposes of the ++ % control sequence corresponding to the node, but it has to expand ++ % into the usual \leavevmode...\vrule stuff for purposes of ++ % printing. So we \turnoffactive for the \refx-snt, back on for the ++ % printing, back off for the \refx-pg. ++ {\turnoffactive ++ % Only output a following space if the -snt ref is nonempty; for ++ % @unnumbered and @anchor, it won't be. ++ \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% ++ \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi ++ }% ++ % output the `[mynode]' via a macro so it can be overridden. ++ \xrefprintnodename\printedrefname ++ % ++ % But we always want a comma and a space: ++ ,\space ++ % ++ % output the `page 3'. ++ \turnoffactive \putwordpage\tie\refx{#1-pg}{}% ++ \fi + \fi + \endlink + \endgroup} + +-% \dosetq is the interface for calls from other macros - -- # 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 +-% Use \normalturnoffactive so that punctuation chars such as underscore +-% and backslash work in node names. (\turnoffactive doesn't do \.) +-\def\dosetq#1#2{% +- {\let\folio=0% +- \normalturnoffactive +- \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}% +- \iflinks +- \next +- \fi +- }% +-} - -- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` -- test "X$dir" = "X$file" && dir=. +-% \internalsetq {foo}{page} expands into +-% CHARACTERS 'xrdef {foo}{...expansion of \Ypage...} +-% When the aux file is read, ' is the escape character - -- 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 -- fi -- ;; +-\def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}} - -- *.lo) -- # Just add the directory containing the .lo file. -- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` -- test "X$dir" = "X$file" && dir=. -- ;; +-% Things to be expanded by \internalsetq - -- *) -- $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 -- continue -- ;; -- esac +-\def\Ypagenumber{\folio} - -- # Get the absolute pathname. -- absdir=`cd "$dir" && pwd` -- test -n "$absdir" && dir="$absdir" +-\def\Ytitle{\thissection} - -- # 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 +-\def\Ynothing{} - -- # This variable tells wrapper scripts just to set shlibpath_var -- # rather than running their programs. -- libtool_execute_magic="$magic" +-\def\Ysectionnumberandtype{% +-\ifnum\secno=0 \putwordChapter\xreftie\the\chapno % +-\else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno % +-\else \ifnum \subsubsecno=0 % +-\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno % +-\else % +-\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno % +-\fi \fi \fi } - -- # 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 there is no directory component, then add one. -- case $file in -- */* | *\\*) . $file ;; -- *) . ./$file ;; -- esac +-\def\Yappendixletterandtype{% +-\ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}% +-\else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno % +-\else \ifnum \subsubsecno=0 % +-\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno % +-\else % +-\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno % +-\fi \fi \fi } - -- # 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 +-\gdef\xreftie{'tie} ++% This macro is called from \xrefX for the `[nodename]' part of xref ++% output. It's a separate macro only so it can be changed more easily, ++% since square brackets don't work well in some documents. Particularly ++% one that Bob is working on :). ++% ++\def\xrefprintnodename#1{[#1]} + +-% Use TeX 3.0's \inputlineno to get the line number, for better error +-% messages, but if we're using an old version of TeX, don't do anything. ++% Things referred to by \setref. + % +-\ifx\inputlineno\thisisundefined +- \let\linenumber = \empty % Non-3.0. +-\else +- \def\linenumber{\the\inputlineno:\space} +-\fi ++\def\Ynothing{} ++\def\Yomitfromtoc{} ++\def\Ynumbered{% ++ \ifnum\secno=0 ++ \putwordChapter@tie \the\chapno ++ \else \ifnum\subsecno=0 ++ \putwordSection@tie \the\chapno.\the\secno ++ \else \ifnum\subsubsecno=0 ++ \putwordSection@tie \the\chapno.\the\secno.\the\subsecno ++ \else ++ \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno ++ \fi\fi\fi ++} ++\def\Yappendix{% ++ \ifnum\secno=0 ++ \putwordAppendix@tie @char\the\appendixno{}% ++ \else \ifnum\subsecno=0 ++ \putwordSection@tie @char\the\appendixno.\the\secno ++ \else \ifnum\subsubsecno=0 ++ \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno ++ \else ++ \putwordSection@tie ++ @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno ++ \fi\fi\fi ++} + + % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. + % If its value is nonempty, SUFFIX is output afterward. - -- 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+"$@"} ++% + \def\refx#1#2{% +- \expandafter\ifx\csname X#1\endcsname\relax ++ {% ++ \indexnofonts ++ \otherbackslash ++ \expandafter\global\expandafter\let\expandafter\thisrefX ++ \csname XR#1\endcsname ++ }% ++ \ifx\thisrefX\relax + % If not defined, say something at least. + \angleleft un\-de\-fined\angleright + \iflinks +@@ -5352,22 +7124,59 @@ width0pt\relax} \fi + \fi + \else + % It's defined, so just use it. +- \csname X#1\endcsname ++ \thisrefX + \fi + #2% Output the suffix in any case. + } + +-% This is the macro invoked by entries in the aux file. ++% This is the macro invoked by entries in the aux file. Usually it's ++% just a \def (we prepend XR to the control sequence name to avoid ++% collisions). But if this is a float type, we have more work to do. + % +-\def\xrdef#1{\begingroup +- % Reenable \ as an escape while reading the second argument. +- \catcode`\\ = 0 +- \afterassignment\endgroup +- \expandafter\gdef\csname X#1\endcsname ++\def\xrdef#1#2{% ++ {% The node name might contain 8-bit characters, which in our current ++ % implementation are changed to commands like @'e. Don't let these ++ % mess up the control sequence name. ++ \indexnofonts ++ \turnoffactive ++ \xdef\safexrefname{#1}% ++ }% ++ % ++ \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref ++ % ++ % Was that xref control sequence that we just defined for a float? ++ \expandafter\iffloat\csname XR\safexrefname\endcsname ++ % it was a float, and we have the (safe) float type in \iffloattype. ++ \expandafter\let\expandafter\floatlist ++ \csname floatlist\iffloattype\endcsname ++ % ++ % Is this the first time we've seen this float type? ++ \expandafter\ifx\floatlist\relax ++ \toks0 = {\do}% yes, so just \do ++ \else ++ % had it before, so preserve previous elements in list. ++ \toks0 = \expandafter{\floatlist\do}% ++ \fi ++ % ++ % Remember this xref in the control sequence \floatlistFLOATTYPE, ++ % for later use in \listoffloats. ++ \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 ++ {\safexrefname}}% ++ \fi + } -- # Restore saved enviroment variables -- if test "${save_LC_ALL+set}" = set; then -- LC_ALL="$save_LC_ALL"; export LC_ALL -- fi -- if test "${save_LANG+set}" = set; then -- LANG="$save_LANG"; export LANG -- fi + % Read the last existing aux file, if any. No error if none exists. +-\def\readauxfile{\begingroup ++% ++\def\tryauxfile{% ++ \openin 1 \jobname.aux ++ \ifeof 1 \else ++ \readdatafile{aux}% ++ \global\havexrefstrue ++ \fi ++ \closein 1 ++} ++ ++\def\setupdatafile{% + \catcode`\^^@=\other + \catcode`\^^A=\other + \catcode`\^^B=\other +@@ -5395,9 +7204,7 @@ width0pt\relax} \fi + \catcode`\^^]=\other + \catcode`\^^^=\other + \catcode`\^^_=\other +- \catcode`\@=\other +- \catcode`\^=\other +- % It was suggested to define this as 7, which would allow ^^e4 etc. ++ % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. + % 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 +7217,9 @@ width0pt\relax} \fi + % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter + % and then to call \auxhat in \setq. + % ++ \catcode`\^=\other ++ % ++ % Special characters. Should be turned off anyway, but... + \catcode`\~=\other + \catcode`\[=\other + \catcode`\]=\other +@@ -5421,41 +7231,43 @@ width0pt\relax} \fi + \catcode`\$=\other + \catcode`\#=\other + \catcode`\&=\other ++ \catcode`\%=\other + \catcode`+=\other % avoid \+ for paranoia even though we've turned it off +- % Make the characters 128-255 be printing characters ++ % ++ % This is to support \ in node names and titles, since the \ ++ % characters end up in a \csname. It's easier than ++ % leaving it active and making its active definition an actual \ ++ % character. What I don't understand is why it works in the *value* ++ % of the xrdef. Seems like it should be a catcode12 \, and that ++ % should not typeset properly. But it works, so I'm moving on for ++ % now. --karl, 15jan04. ++ \catcode`\\=\other ++ % ++ % Make the characters 128-255 be printing characters. + {% +- \count 1=128 ++ \count1=128 + \def\loop{% +- \catcode\count 1=\other +- \advance\count 1 by 1 +- \ifnum \count 1<256 \loop \fi ++ \catcode\count1=\other ++ \advance\count1 by 1 ++ \ifnum \count1<256 \loop \fi + }% + }% +- % The aux file uses ' as the escape (for now). +- % Turn off \ as an escape so we do not lose on +- % entries which were dumped with control sequences in their names. +- % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ +- % Reference to such entries still does not work the way one would wish, +- % but at least they do not bomb out when the aux file is read in. ++ % ++ % @ is our escape character in .aux files, and we need braces. + \catcode`\{=1 + \catcode`\}=2 +- \catcode`\%=\other +- \catcode`\'=0 +- \catcode`\\=\other +- % +- \openin 1 \jobname.aux +- \ifeof 1 \else +- \closein 1 +- \input \jobname.aux +- \global\havexrefstrue +- \global\warnedobstrue +- \fi +- % Open the new aux file. TeX will close it automatically at exit. +- \openout\auxfile=\jobname.aux ++ \catcode`\@=0 ++} ++ ++\def\readdatafile#1{% ++\begingroup ++ \setupdatafile ++ \input\jobname.#1 + \endgroup} -- # Now prepare to actually exec the command. -- exec_cmd='"$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 -- 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 -- if test -z "$rm"; then -- $echo "$modename: you must specify an RM program" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- fi -+ test -z "$RM" && \ -+ func_fatal_help "you must specify an RM program" +-% Footnotes. ++\message{insertions,} ++% including footnotes. - rmdirs= + \newcount \footnoteno -+ origobjdir="$objdir" - for file in $files; do -- 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%^.*/%%'` -- test $mode = uninstall && objdir="$dir" -+ func_basename "$file" -+ name="$func_basename_result" -+ test "$mode" = uninstall && objdir="$dir" +@@ -5469,37 +7281,39 @@ width0pt\relax} \fi + % @footnotestyle is meaningful for info output only. + \let\footnotestyle=\comment + +-\let\ptexfootnote=\footnote +- + {\catcode `\@=11 + % + % Auto-number footnotes. Otherwise like plain. + \gdef\footnote{% ++ \let\indent=\ptexindent ++ \let\noindent=\ptexnoindent + \global\advance\footnoteno by \@ne + \edef\thisfootno{$^{\the\footnoteno}$}% + % + % In case the footnote comes at the end of a sentence, preserve the + % extra spacing after we do the footnote number. + \let\@sf\empty +- \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi ++ \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi + % + % Remove inadvertent blank space before typesetting the footnote number. + \unskip + \thisfootno\@sf +- \footnotezzz ++ \dofootnote + }% + + % Don't bother with the trickery in plain.tex to not require the + % footnote text as a parameter. Our footnotes don't need to be so general. + % +-% Oh yes, they do; otherwise, @ifset and anything else that uses +-% \parseargline fail inside footnotes because the tokens are fixed when ++% Oh yes, they do; otherwise, @ifset (and anything else that uses ++% \parseargline) fails inside footnotes because the tokens are fixed when + % the footnote is read. --karl, 16nov96. + % +-\long\gdef\footnotezzz{\insert\footins\bgroup ++\gdef\dofootnote{% ++ \insert\footins\bgroup + % We want to typeset this text as a normal paragraph, even if the + % footnote reference occurs in (for example) a display environment. + % So reset some parameters. ++ \hsize=\pagewidth + \interlinepenalty\interfootnotelinepenalty + \splittopskip\ht\strutbox % top baseline for broken footnotes + \splitmaxdepth\dp\strutbox +@@ -5512,8 +7326,15 @@ width0pt\relax} \fi + % + \smallfonts \rm + % +- % Hang the footnote text off the number. +- \hang ++ % Because we use hanging indentation in footnotes, a @noindent appears ++ % to exdent this text, so make it be a no-op. makeinfo does not use ++ % hanging indentation so @noindent can still be needed within footnote ++ % text after an @example or the like (not that this is good style). ++ \let\noindent = \relax ++ % ++ % Hang the footnote text off the number. Use \everypar in case the ++ % footnote extends for more than one paragraph. ++ \everypar = {\hang}% + \textindent{\thisfootno}% + % + % Don't crash into the line above the footnote text. Since this +@@ -5522,66 +7343,68 @@ width0pt\relax} \fi + \footstrut + \futurelet\next\fo@t + } +-\def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t +- \else\let\next\f@t\fi \next} +-\def\f@@t{\bgroup\aftergroup\@foot\let\next} +-\def\f@t#1{#1\@foot} +-\def\@foot{\strut\par\egroup} +- + }%end \catcode `\@=11 - # Remember objdir for removal later, being careful to avoid duplicates -- if test $mode = clean; then -+ if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; -@@ -5127,15 +8235,15 @@ - fi +-% Set the baselineskip to #1, and the lineskip and strut size +-% correspondingly. There is no deep meaning behind these magic numbers +-% used as factors; they just match (closely enough) what Knuth defined. +-% +-\def\lineskipfactor{.08333} +-\def\strutheightpercent{.70833} +-\def\strutdepthpercent {.29167} ++% 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. ++% 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. ++ ++% Replace the \insert primitive by a cheating macro. ++% Deeper inside, just make sure that the saved insertions are not spilled ++% out prematurely. + % +-\def\setleading#1{% +- \normalbaselineskip = #1\relax +- \normallineskip = \lineskipfactor\normalbaselineskip +- \normalbaselines +- \setbox\strutbox =\hbox{% +- \vrule width0pt height\strutheightpercent\baselineskip +- depth \strutdepthpercent \baselineskip +- }% ++\def\startsavinginserts{% ++ \ifx \insert\ptexinsert ++ \let\insert\saveinsert ++ \else ++ \let\checkinserts\relax ++ \fi + } - # Don't error if the file doesn't exist and rm -f was used. -- if (test -L "$file") >/dev/null 2>&1 \ -- || (test -h "$file") >/dev/null 2>&1 \ -- || 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 -+ exit_status=1 - continue - elif test "$rmforce" = yes; then -- continue -+ continue - fi +-% @| inserts a changebar to the left of the current line. It should +-% surround any changed text. This approach does *not* work if the +-% change spans more than two lines of output. To handle that, we would +-% have adopt a much more difficult approach (putting marks into the main +-% vertical list for the beginning and end of each change). ++% This \insert replacement works for both \insert\footins{foo} and ++% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. + % +-\def\|{% +- % \vadjust can only be used in horizontal mode. +- \leavevmode +- % +- % Append this vertical mode material after the current line in the output. +- \vadjust{% +- % We want to insert a rule with the height and depth of the current +- % leading; that is exactly what \strutbox is supposed to record. +- \vskip-\baselineskip +- % +- % \vadjust-items are inserted at the left edge of the type. So +- % the \llap here moves out into the left-hand margin. +- \llap{% +- % +- % For a thicker or thinner bar, change the `1pt'. +- \vrule height\baselineskip width1pt +- % +- % This is the space between the bar and the text. +- \hskip 12pt +- }% +- }% ++\def\saveinsert#1{% ++ \edef\next{\noexpand\savetobox \makeSAVEname#1}% ++ \afterassignment\next ++ % swallow the left brace ++ \let\temp = + } ++\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} ++\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} ++ ++\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} ++ ++\def\placesaveins#1{% ++ \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname ++ {\box#1}% ++} ++ ++% eat @SAVE -- beware, all of them have catcode \other: ++{ ++ \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) ++ \gdef\gobblesave @SAVE{} ++} ++ ++% initialization: ++\def\newsaveins #1{% ++ \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% ++ \next ++} ++\def\newsaveinsX #1{% ++ \csname newbox\endcsname #1% ++ \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts ++ \checksaveins #1}% ++} ++ ++% initialize: ++\let\checkinserts\empty ++\newsaveins\footins ++\newsaveins\margin - rmfiles="$file" -@@ -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 -- . $dir/$name -+ if func_lalib_p "$file"; then -+ func_source $dir/$name +-% For a final copy, take out the rectangles +-% that mark overfull boxes (in case you have decided +-% that the text looks ok even though it passes the margin). +-% +-\def\finalout{\overfullrule=0pt} - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" -- test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + % @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 +7414,12 @@ width0pt\relax} \fi + % undone and the next image would fail. + \openin 1 = epsf.tex + \ifeof 1 \else +- \closein 1 +- % Do not bother showing banner with post-v2.7 epsf.tex (available in +- % doc/epsf.tex until it shows up on ctan). ++ % Do not bother showing banner with epsf.tex v2.7k (available in ++ % doc/epsf.tex and on ctan). + \def\epsfannounce{\toks0 = }% + \input epsf.tex + \fi ++\closein 1 + % + % We will only complain once about lack of epsf.tex. + \newif\ifwarnednoepsf +@@ -5612,77 +7435,1180 @@ width0pt\relax} \fi + \global\warnednoepsftrue + \fi + \else +- \imagexxx #1,,,\finish ++ \imagexxx #1,,,,,\finish + \fi + } + % + % Arguments to @image: + % #1 is (mandatory) image filename; we tack on .eps extension. + % #2 is (optional) width, #3 is (optional) height. +-% #4 is just the usual extra ignored arg for parsing this stuff. +-\def\imagexxx#1,#2,#3,#4\finish{% ++% #4 is (ignored optional) html alt text. ++% #5 is (ignored optional) extension. ++% #6 is just the usual extra ignored arg for parsing this stuff. ++\newif\ifimagevmode ++\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup ++ \catcode`\^^M = 5 % in case we're inside an example ++ \normalturnoffactive % allow _ et al. in names ++ % If the image is by itself, center it. ++ \ifvmode ++ \imagevmodetrue ++ \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 ++ \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}}% ++ \dopdfimage{#1}{#2}{#3}% + \else + % \epsfbox itself resets \epsf?size at each figure. + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi + \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi +- \begingroup +- \catcode`\^^M = 5 % in case we're inside an example +- % If the image is by itself, center it. +- \ifvmode +- \nobreak\bigskip +- % 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 +- \centerline{\epsfbox{#1.eps}}% +- \bigbreak +- \else +- % In the middle of a paragraph, no extra space. +- \epsfbox{#1.eps}% ++ \epsfbox{#1.eps}% ++ \fi ++ % ++ \ifimagevmode \medskip \fi % space after the standalone image ++\endgroup} ++ ++ ++% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, ++% etc. We don't actually implement floating yet, we always include the ++% float "here". But it seemed the best name for the future. ++% ++\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} ++ ++% There may be a space before second and/or third parameter; delete it. ++\def\eatcommaspace#1, {#1,} ++ ++% #1 is the optional FLOATTYPE, the text label for this float, typically ++% "Figure", "Table", "Example", etc. Can't contain commas. If omitted, ++% this float will not be numbered and cannot be referred to. ++% ++% #2 is the optional xref label. Also must be present for the float to ++% be referable. ++% ++% #3 is the optional positioning argument; for now, it is ignored. It ++% will somehow specify the positions allowed to float to (here, top, bottom). ++% ++% We keep a separate counter for each FLOATTYPE, which we reset at each ++% chapter-level command. ++\let\resetallfloatnos=\empty ++% ++\def\dofloat#1,#2,#3,#4\finish{% ++ \let\thiscaption=\empty ++ \let\thisshortcaption=\empty ++ % ++ % don't lose footnotes inside @float. ++ % ++ % BEWARE: when the floats start float, we have to issue warning whenever an ++ % insert appears inside a float which could possibly float. --kasal, 26may04 ++ % ++ \startsavinginserts ++ % ++ % We can't be used inside a paragraph. ++ \par ++ % ++ \vtop\bgroup ++ \def\floattype{#1}% ++ \def\floatlabel{#2}% ++ \def\floatloc{#3}% we do nothing with this yet. ++ % ++ \ifx\floattype\empty ++ \let\safefloattype=\empty ++ \else ++ {% ++ % the floattype might have accents or other special characters, ++ % but we need to use it in a control sequence name. ++ \indexnofonts ++ \turnoffactive ++ \xdef\safefloattype{\floattype}% ++ }% ++ \fi ++ % ++ % If label is given but no type, we handle that as the empty type. ++ \ifx\floatlabel\empty \else ++ % We want each FLOATTYPE to be numbered separately (Figure 1, ++ % Table 1, Figure 2, ...). (And if no label, no number.) ++ % ++ \expandafter\getfloatno\csname\safefloattype floatno\endcsname ++ \global\advance\floatno by 1 ++ % ++ {% ++ % 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\lastsection{\floatmagic=\safefloattype}% ++ \setref{\floatlabel}{Yfloat}% ++ }% ++ \fi ++ % ++ % start with \parskip glue, I guess. ++ \vskip\parskip ++ % ++ % Don't suppress indentation if a float happens to start a section. ++ \restorefirstparagraphindent ++} ++ ++% we have these possibilities: ++% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap ++% @float Foo,lbl & no caption: Foo 1.1 ++% @float Foo & @caption{Cap}: Foo: Cap ++% @float Foo & no caption: Foo ++% @float ,lbl & Caption{Cap}: 1.1: Cap ++% @float ,lbl & no caption: 1.1 ++% @float & @caption{Cap}: Cap ++% @float & no caption: ++% ++\def\Efloat{% ++ \let\floatident = \empty ++ % ++ % In all cases, if we have a float type, it comes first. ++ \ifx\floattype\empty \else \def\floatident{\floattype}\fi ++ % ++ % If we have an xref label, the number comes next. ++ \ifx\floatlabel\empty \else ++ \ifx\floattype\empty \else % if also had float type, need tie first. ++ \appendtomacro\floatident{\tie}% + \fi ++ % the number. ++ \appendtomacro\floatident{\chaplevelprefix\the\floatno}% ++ \fi ++ % ++ % Start the printed caption with what we've constructed in ++ % \floatident, but keep it separate; we need \floatident again. ++ \let\captionline = \floatident ++ % ++ \ifx\thiscaption\empty \else ++ \ifx\floatident\empty \else ++ \appendtomacro\captionline{: }% had ident, so need a colon between ++ \fi ++ % ++ % caption text. ++ \appendtomacro\captionline{\scanexp\thiscaption}% ++ \fi ++ % ++ % If we have anything to print, print it, with space before. ++ % Eventually this needs to become an \insert. ++ \ifx\captionline\empty \else ++ \vskip.5\parskip ++ \captionline ++ % ++ % Space below caption. ++ \vskip\parskip ++ \fi ++ % ++ % If have an xref label, write the list of floats info. Do this ++ % after the caption, to avoid chance of it being a breakpoint. ++ \ifx\floatlabel\empty \else ++ % Write the text that goes in the lof to the aux file as ++ % \floatlabel-lof. Besides \floatident, we include the short ++ % caption if specified, else the full caption if specified, else nothing. ++ {% ++ \atdummies ++ % ++ % since we read the caption text in the macro world, where ^^M ++ % is turned into a normal character, we have to scan it back, so ++ % we don't write the literal three characters "^^M" into the aux file. ++ \scanexp{% ++ \xdef\noexpand\gtemp{% ++ \ifx\thisshortcaption\empty ++ \thiscaption ++ \else ++ \thisshortcaption ++ \fi ++ }% ++ }% ++ \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident ++ \ifx\gtemp\empty \else : \gtemp \fi}}% ++ }% ++ \fi ++ \egroup % end of \vtop ++ % ++ % place the captured inserts ++ % ++ % BEWARE: when the floats start floating, we have to issue warning ++ % whenever an insert appears inside a float which could possibly ++ % float. --kasal, 26may04 ++ % ++ \checkinserts ++} ++ ++% Append the tokens #2 to the definition of macro #1, not expanding either. ++% ++\def\appendtomacro#1#2{% ++ \expandafter\def\expandafter#1\expandafter{#1#2}% ++} ++ ++% @caption, @shortcaption ++% ++\def\caption{\docaption\thiscaption} ++\def\shortcaption{\docaption\thisshortcaption} ++\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} ++\def\defcaption#1#2{\egroup \def#1{#2}} ++ ++% The parameter is the control sequence identifying the counter we are ++% going to use. Create it if it doesn't exist and assign it to \floatno. ++\def\getfloatno#1{% ++ \ifx#1\relax ++ % Haven't seen this figure type before. ++ \csname newcount\endcsname #1% ++ % ++ % Remember to reset this floatno at the next chap. ++ \expandafter\gdef\expandafter\resetallfloatnos ++ \expandafter{\resetallfloatnos #1=0 }% ++ \fi ++ \let\floatno#1% ++} ++ ++% \setref calls this to get the XREFLABEL-snt value. We want an @xref ++% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we ++% first read the @float command. ++% ++\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% ++ ++% Magic string used for the XREFLABEL-title value, so \xrefX can ++% distinguish floats from other xref types. ++\def\floatmagic{!!float!!} ++ ++% #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 ++% \lastsection value which we \setref above. ++% ++\def\iffloat#1{\expandafter\doiffloat#1==\finish} ++% ++% #1 is (maybe) the \floatmagic string. If so, #2 will be the ++% (safe) float type for this float. We set \iffloattype to #2. ++% ++\def\doiffloat#1=#2=#3\finish{% ++ \def\temp{#1}% ++ \def\iffloattype{#2}% ++ \ifx\temp\floatmagic ++} ++ ++% @listoffloats FLOATTYPE - print a list of floats like a table of contents. ++% ++\parseargdef\listoffloats{% ++ \def\floattype{#1}% floattype ++ {% ++ % the floattype might have accents or other special characters, ++ % but we need to use it in a control sequence name. ++ \indexnofonts ++ \turnoffactive ++ \xdef\safefloattype{\floattype}% ++ }% ++ % ++ % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. ++ \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax ++ \ifhavexrefs ++ % if the user said @listoffloats foo but never @float foo. ++ \message{\linenumber No `\safefloattype' floats to list.}% ++ \fi ++ \else ++ \begingroup ++ \leftskip=\tocindent % indent these entries like a toc ++ \let\do=\listoffloatsdo ++ \csname floatlist\safefloattype\endcsname + \endgroup + \fi + } -- if test $mode = uninstall; then -+ case "$mode" in -+ clean) -+ case " $library_names " in -+ # " " in the beginning catches empty $dlname -+ *" $dlname "*) ;; -+ *) rmfiles="$rmfiles $objdir/$dlname" ;; -+ esac -+ 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='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" -- if test $? != 0 && test "$rmforce" != yes; then -- exit_status=1 -- fi -- done -- IFS="$save_ifs" -+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi ++% This is called on each entry in a list of floats. We're passed the ++% xref label, in the form LABEL-title, which is how we save it in the ++% aux file. We strip off the -title and look up \XRLABEL-lof, which ++% has the text we're supposed to typeset here. ++% ++% Figures without xref labels will not be included in the list (since ++% they won't appear in the aux file). ++% ++\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} ++\def\listoffloatsdoentry#1-title\finish{{% ++ % Can't fully expand XR#1-lof because it can contain anything. Just ++ % pass the control sequence. On the other hand, XR#1-pg is just the ++ % page number, and we want to fully expand that so we can get a link ++ % in pdf output. ++ \toksA = \expandafter{\csname XR#1-lof\endcsname}% ++ % ++ % use the same \entry macro we use to generate the TOC and index. ++ \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% ++ \writeentry ++}} ++ - 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='~' -- for cmd in $cmds; do -- IFS="$save_ifs" -- $show "$cmd" -- $run eval "$cmd" -- if test $? != 0 && test "$rmforce" != yes; then -- 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 -+ ;; -+ esac - fi - ;; + \message{localization,} +-% and i18n. - *.lo) - # Possibly a libtool object, so verify it. -- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -+ if func_lalib_p "$file"; then + % @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. + % +-\def\documentlanguage{\parsearg\dodocumentlanguage} +-\def\dodocumentlanguage#1{% ++{ ++ \catcode`\_ = \active ++ \globaldefs=1 ++\parseargdef\documentlanguage{\begingroup ++ \let_=\normalunderscore % normal _ character for filenames + \tex % read txi-??.tex file in plain TeX. +- % Read the file if it exists. ++ % Read the file by the name they passed if it exists. ++ \openin 1 txi-#1.tex ++ \ifeof 1 ++ \documentlanguagetrywithoutunderscore{#1_\finish}% ++ \else ++ \input txi-#1.tex ++ \fi ++ \closein 1 ++ \endgroup ++\endgroup} ++} ++% ++% If they passed de_DE, and txi-de_DE.tex doesn't exist, ++% try txi-de.tex. ++% ++\def\documentlanguagetrywithoutunderscore#1_#2\finish{% + \openin 1 txi-#1.tex +- \ifeof1 ++ \ifeof 1 + \errhelp = \nolanghelp + \errmessage{Cannot read language file txi-#1.tex}% +- \let\temp = \relax + \else +- \def\temp{\input txi-#1.tex }% ++ \input txi-#1.tex + \fi +- \temp +- \endgroup ++ \closein 1 + } ++% + \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.} -- # Read the .lo file -- . $dir/$name -+ # Read the .lo file -+ func_source $dir/$name ++% 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\relax ++ \advance\count255 by 1 ++ \repeat ++} - # 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 - rmfiles="$rmfiles $dir/$pic_object" -- fi -+ fi +-% @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. ++% ++\parseargdef\documentencoding{% ++ % Encoding being declared for the document. ++ \def\declaredencoding{\csname #1.enc\endcsname}% ++ % ++ % Supported encodings: names converted to tokens in order to be able ++ % to compare them with \ifx. ++ \def\ascii{\csname US-ASCII.enc\endcsname}% ++ \def\latnine{\csname ISO-8859-15.enc\endcsname}% ++ \def\latone{\csname ISO-8859-1.enc\endcsname}% ++ \def\lattwo{\csname ISO-8859-2.enc\endcsname}% ++ \def\utfeight{\csname UTF-8.enc\endcsname}% ++ % ++ \ifx \declaredencoding \ascii ++ \asciichardefs ++ % ++ \else \ifx \declaredencoding \lattwo ++ \setnonasciicharscatcode\active ++ \lattwochardefs ++ % ++ \else \ifx \declaredencoding \latone ++ \setnonasciicharscatcode\active ++ \latonechardefs ++ % ++ \else \ifx \declaredencoding \latnine ++ \setnonasciicharscatcode\active ++ \latninechardefs ++ % ++ \else \ifx \declaredencoding \utfeight ++ \setnonasciicharscatcode\active ++ \utfeightchardefs ++ % ++ \else ++ \message{Unknown document encoding #1, ignoring.}% ++ % ++ \fi % utfeight ++ \fi % latnine ++ \fi % latone ++ \fi % lattwo ++ \fi % ascii ++} - # 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 - rmfiles="$rmfiles $dir/$non_pic_object" -- fi -+ fi - fi - ;; ++% 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.}} - *) -- # Do a test to see if this is a libtool program. -- if test $mode = clean && -- (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then -- relink_command= -- . $dir/$file -+ if test "$mode" = clean ; then -+ noexename=$name -+ case $file in -+ *.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 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 +-% Page size parameters. ++% Take account of \c (plain) vs. \, (Texinfo) difference. ++\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} ++ ++% 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. ++\setnonasciicharscatcode\active + % ++% Latin1 (ISO-8859-1) character definitions. ++\def\latonechardefs{% ++ \gdef^^a0{~} ++ \gdef^^a1{\exclamdown} ++ \gdef^^a2{\missingcharmsg{CENT SIGN}} ++ \gdef^^a3{{\pounds}} ++ \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} ++ \gdef^^a5{\missingcharmsg{YEN SIGN}} ++ \gdef^^a6{\missingcharmsg{BROKEN BAR}} ++ \gdef^^a7{\S} ++ \gdef^^a8{\"{}} ++ \gdef^^a9{\copyright} ++ \gdef^^aa{\ordf} ++ \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} ++ \gdef^^ac{$\lnot$} ++ \gdef^^ad{\-} ++ \gdef^^ae{\registeredsymbol} ++ \gdef^^af{\={}} ++ % ++ \gdef^^b0{\textdegree} ++ \gdef^^b1{$\pm$} ++ \gdef^^b2{$^2$} ++ \gdef^^b3{$^3$} ++ \gdef^^b4{\'{}} ++ \gdef^^b5{$\mu$} ++ \gdef^^b6{\P} ++ % ++ \gdef^^b7{$^.$} ++ \gdef^^b8{\cedilla\ } ++ \gdef^^b9{$^1$} ++ \gdef^^ba{\ordm} ++ % ++ \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}} ++ \gdef^^bc{$1\over4$} ++ \gdef^^bd{$1\over2$} ++ \gdef^^be{$3\over4$} ++ \gdef^^bf{\questiondown} ++ % ++ \gdef^^c0{\`A} ++ \gdef^^c1{\'A} ++ \gdef^^c2{\^A} ++ \gdef^^c3{\~A} ++ \gdef^^c4{\"A} ++ \gdef^^c5{\ringaccent A} ++ \gdef^^c6{\AE} ++ \gdef^^c7{\cedilla C} ++ \gdef^^c8{\`E} ++ \gdef^^c9{\'E} ++ \gdef^^ca{\^E} ++ \gdef^^cb{\"E} ++ \gdef^^cc{\`I} ++ \gdef^^cd{\'I} ++ \gdef^^ce{\^I} ++ \gdef^^cf{\"I} ++ % ++ \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}} ++ \gdef^^d1{\~N} ++ \gdef^^d2{\`O} ++ \gdef^^d3{\'O} ++ \gdef^^d4{\^O} ++ \gdef^^d5{\~O} ++ \gdef^^d6{\"O} ++ \gdef^^d7{$\times$} ++ \gdef^^d8{\O} ++ \gdef^^d9{\`U} ++ \gdef^^da{\'U} ++ \gdef^^db{\^U} ++ \gdef^^dc{\"U} ++ \gdef^^dd{\'Y} ++ \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}} ++ \gdef^^df{\ss} ++ % ++ \gdef^^e0{\`a} ++ \gdef^^e1{\'a} ++ \gdef^^e2{\^a} ++ \gdef^^e3{\~a} ++ \gdef^^e4{\"a} ++ \gdef^^e5{\ringaccent a} ++ \gdef^^e6{\ae} ++ \gdef^^e7{\cedilla c} ++ \gdef^^e8{\`e} ++ \gdef^^e9{\'e} ++ \gdef^^ea{\^e} ++ \gdef^^eb{\"e} ++ \gdef^^ec{\`{\dotless i}} ++ \gdef^^ed{\'{\dotless i}} ++ \gdef^^ee{\^{\dotless i}} ++ \gdef^^ef{\"{\dotless i}} ++ % ++ \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}} ++ \gdef^^f1{\~n} ++ \gdef^^f2{\`o} ++ \gdef^^f3{\'o} ++ \gdef^^f4{\^o} ++ \gdef^^f5{\~o} ++ \gdef^^f6{\"o} ++ \gdef^^f7{$\div$} ++ \gdef^^f8{\o} ++ \gdef^^f9{\`u} ++ \gdef^^fa{\'u} ++ \gdef^^fb{\^u} ++ \gdef^^fc{\"u} ++ \gdef^^fd{\'y} ++ \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}} ++ \gdef^^ff{\"y} ++} ++ ++% Latin9 (ISO-8859-15) encoding character definitions. ++\def\latninechardefs{% ++ % Encoding is almost identical to Latin1. ++ \latonechardefs ++ % ++ \gdef^^a4{\euro} ++ \gdef^^a6{\v S} ++ \gdef^^a8{\v s} ++ \gdef^^b4{\v Z} ++ \gdef^^b8{\v z} ++ \gdef^^bc{\OE} ++ \gdef^^bd{\oe} ++ \gdef^^be{\"Y} ++} ++ ++% Latin2 (ISO-8859-2) character definitions. ++\def\lattwochardefs{% ++ \gdef^^a0{~} ++ \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}} ++ \gdef^^a2{\u{}} ++ \gdef^^a3{\L} ++ \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} ++ \gdef^^a5{\v L} ++ \gdef^^a6{\'S} ++ \gdef^^a7{\S} ++ \gdef^^a8{\"{}} ++ \gdef^^a9{\v S} ++ \gdef^^aa{\cedilla S} ++ \gdef^^ab{\v T} ++ \gdef^^ac{\'Z} ++ \gdef^^ad{\-} ++ \gdef^^ae{\v Z} ++ \gdef^^af{\dotaccent Z} ++ % ++ \gdef^^b0{\textdegree} ++ \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}} ++ \gdef^^b2{\missingcharmsg{OGONEK}} ++ \gdef^^b3{\l} ++ \gdef^^b4{\'{}} ++ \gdef^^b5{\v l} ++ \gdef^^b6{\'s} ++ \gdef^^b7{\v{}} ++ \gdef^^b8{\cedilla\ } ++ \gdef^^b9{\v s} ++ \gdef^^ba{\cedilla s} ++ \gdef^^bb{\v t} ++ \gdef^^bc{\'z} ++ \gdef^^bd{\H{}} ++ \gdef^^be{\v z} ++ \gdef^^bf{\dotaccent z} ++ % ++ \gdef^^c0{\'R} ++ \gdef^^c1{\'A} ++ \gdef^^c2{\^A} ++ \gdef^^c3{\u A} ++ \gdef^^c4{\"A} ++ \gdef^^c5{\'L} ++ \gdef^^c6{\'C} ++ \gdef^^c7{\cedilla C} ++ \gdef^^c8{\v C} ++ \gdef^^c9{\'E} ++ \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}} ++ \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^^d1{\'N} ++ \gdef^^d2{\v N} ++ \gdef^^d3{\'O} ++ \gdef^^d4{\^O} ++ \gdef^^d5{\H O} ++ \gdef^^d6{\"O} ++ \gdef^^d7{$\times$} ++ \gdef^^d8{\v R} ++ \gdef^^d9{\ringaccent U} ++ \gdef^^da{\'U} ++ \gdef^^db{\H U} ++ \gdef^^dc{\"U} ++ \gdef^^dd{\'Y} ++ \gdef^^de{\cedilla T} ++ \gdef^^df{\ss} ++ % ++ \gdef^^e0{\'r} ++ \gdef^^e1{\'a} ++ \gdef^^e2{\^a} ++ \gdef^^e3{\u a} ++ \gdef^^e4{\"a} ++ \gdef^^e5{\'l} ++ \gdef^^e6{\'c} ++ \gdef^^e7{\cedilla c} ++ \gdef^^e8{\v c} ++ \gdef^^e9{\'e} ++ \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}} ++ \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^^f1{\'n} ++ \gdef^^f2{\v n} ++ \gdef^^f3{\'o} ++ \gdef^^f4{\^o} ++ \gdef^^f5{\H o} ++ \gdef^^f6{\"o} ++ \gdef^^f7{$\div$} ++ \gdef^^f8{\v r} ++ \gdef^^f9{\ringaccent u} ++ \gdef^^fa{\'u} ++ \gdef^^fb{\H u} ++ \gdef^^fc{\"u} ++ \gdef^^fd{\'y} ++ \gdef^^fe{\cedilla t} ++ \gdef^^ff{\dotaccent{}} ++} ++ ++% 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 ++ ++\gdef\UTFviiiTwoOctets#1#2{\expandafter ++ \UTFviiiDefined\csname u8:#1\string #2\endcsname} ++% ++\gdef\UTFviiiThreeOctets#1#2#3{\expandafter ++ \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} ++% ++\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter ++ \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} ++ ++\gdef\UTFviiiDefined#1{% ++ \ifx #1\relax ++ \message{\linenumber Unicode char \string #1 not defined for Texinfo}% ++ \else ++ \expandafter #1% ++ \fi ++} ++ ++\begingroup ++ \catcode`\~13 ++ \catcode`\"12 ++ ++ \def\UTFviiiLoop{% ++ \global\catcode\countUTFx\active ++ \uccode`\~\countUTFx ++ \uppercase\expandafter{\UTFviiiTmp}% ++ \advance\countUTFx by 1 ++ \ifnum\countUTFx < \countUTFy ++ \expandafter\UTFviiiLoop ++ \fi} ++ ++ \countUTFx = "C2 ++ \countUTFy = "E0 ++ \def\UTFviiiTmp{% ++ \xdef~{\noexpand\UTFviiiTwoOctets\string~}} ++ \UTFviiiLoop ++ ++ \countUTFx = "E0 ++ \countUTFy = "F0 ++ \def\UTFviiiTmp{% ++ \xdef~{\noexpand\UTFviiiThreeOctets\string~}} ++ \UTFviiiLoop ++ ++ \countUTFx = "F0 ++ \countUTFy = "F4 ++ \def\UTFviiiTmp{% ++ \xdef~{\noexpand\UTFviiiFourOctets\string~}} ++ \UTFviiiLoop ++\endgroup ++ ++\begingroup ++ \catcode`\"=12 ++ \catcode`\<=12 ++ \catcode`\.=12 ++ \catcode`\,=12 ++ \catcode`\;=12 ++ \catcode`\!=12 ++ \catcode`\~=13 ++ ++ \gdef\DeclareUnicodeCharacter#1#2{% ++ \countUTFz = "#1\relax ++ \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% ++ \begingroup ++ \parseXMLCharref ++ \def\UTFviiiTwoOctets##1##2{% ++ \csname u8:##1\string ##2\endcsname}% ++ \def\UTFviiiThreeOctets##1##2##3{% ++ \csname u8:##1\string ##2\string ##3\endcsname}% ++ \def\UTFviiiFourOctets##1##2##3##4{% ++ \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% ++ \expandafter\expandafter\expandafter\expandafter ++ \expandafter\expandafter\expandafter ++ \gdef\UTFviiiTmp{#2}% ++ \endgroup} ++ ++ \gdef\parseXMLCharref{% ++ \ifnum\countUTFz < "A0\relax ++ \errhelp = \EMsimple ++ \errmessage{Cannot define Unicode char value < 00A0}% ++ \else\ifnum\countUTFz < "800\relax ++ \parseUTFviiiA,% ++ \parseUTFviiiB C\UTFviiiTwoOctets.,% ++ \else\ifnum\countUTFz < "10000\relax ++ \parseUTFviiiA;% ++ \parseUTFviiiA,% ++ \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% ++ \else ++ \parseUTFviiiA;% ++ \parseUTFviiiA,% ++ \parseUTFviiiA!% ++ \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% ++ \fi\fi\fi ++ } ++ ++ \gdef\parseUTFviiiA#1{% ++ \countUTFx = \countUTFz ++ \divide\countUTFz by 64 ++ \countUTFy = \countUTFz ++ \multiply\countUTFz by 64 ++ \advance\countUTFx by -\countUTFz ++ \advance\countUTFx by 128 ++ \uccode `#1\countUTFx ++ \countUTFz = \countUTFy} ++ ++ \gdef\parseUTFviiiB#1#2#3#4{% ++ \advance\countUTFz by "#10\relax ++ \uccode `#3\countUTFz ++ \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} ++\endgroup ++ ++\def\utfeightchardefs{% ++ \DeclareUnicodeCharacter{00A0}{\tie} ++ \DeclareUnicodeCharacter{00A1}{\exclamdown} ++ \DeclareUnicodeCharacter{00A3}{\pounds} ++ \DeclareUnicodeCharacter{00A8}{\"{ }} ++ \DeclareUnicodeCharacter{00A9}{\copyright} ++ \DeclareUnicodeCharacter{00AA}{\ordf} ++ \DeclareUnicodeCharacter{00AB}{\guillemetleft} ++ \DeclareUnicodeCharacter{00AD}{\-} ++ \DeclareUnicodeCharacter{00AE}{\registeredsymbol} ++ \DeclareUnicodeCharacter{00AF}{\={ }} ++ ++ \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} ++ \DeclareUnicodeCharacter{00B4}{\'{ }} ++ \DeclareUnicodeCharacter{00B8}{\cedilla{ }} ++ \DeclareUnicodeCharacter{00BA}{\ordm} ++ \DeclareUnicodeCharacter{00BB}{\guillemetright} ++ \DeclareUnicodeCharacter{00BF}{\questiondown} ++ ++ \DeclareUnicodeCharacter{00C0}{\`A} ++ \DeclareUnicodeCharacter{00C1}{\'A} ++ \DeclareUnicodeCharacter{00C2}{\^A} ++ \DeclareUnicodeCharacter{00C3}{\~A} ++ \DeclareUnicodeCharacter{00C4}{\"A} ++ \DeclareUnicodeCharacter{00C5}{\AA} ++ \DeclareUnicodeCharacter{00C6}{\AE} ++ \DeclareUnicodeCharacter{00C7}{\cedilla{C}} ++ \DeclareUnicodeCharacter{00C8}{\`E} ++ \DeclareUnicodeCharacter{00C9}{\'E} ++ \DeclareUnicodeCharacter{00CA}{\^E} ++ \DeclareUnicodeCharacter{00CB}{\"E} ++ \DeclareUnicodeCharacter{00CC}{\`I} ++ \DeclareUnicodeCharacter{00CD}{\'I} ++ \DeclareUnicodeCharacter{00CE}{\^I} ++ \DeclareUnicodeCharacter{00CF}{\"I} ++ ++ \DeclareUnicodeCharacter{00D1}{\~N} ++ \DeclareUnicodeCharacter{00D2}{\`O} ++ \DeclareUnicodeCharacter{00D3}{\'O} ++ \DeclareUnicodeCharacter{00D4}{\^O} ++ \DeclareUnicodeCharacter{00D5}{\~O} ++ \DeclareUnicodeCharacter{00D6}{\"O} ++ \DeclareUnicodeCharacter{00D8}{\O} ++ \DeclareUnicodeCharacter{00D9}{\`U} ++ \DeclareUnicodeCharacter{00DA}{\'U} ++ \DeclareUnicodeCharacter{00DB}{\^U} ++ \DeclareUnicodeCharacter{00DC}{\"U} ++ \DeclareUnicodeCharacter{00DD}{\'Y} ++ \DeclareUnicodeCharacter{00DF}{\ss} ++ ++ \DeclareUnicodeCharacter{00E0}{\`a} ++ \DeclareUnicodeCharacter{00E1}{\'a} ++ \DeclareUnicodeCharacter{00E2}{\^a} ++ \DeclareUnicodeCharacter{00E3}{\~a} ++ \DeclareUnicodeCharacter{00E4}{\"a} ++ \DeclareUnicodeCharacter{00E5}{\aa} ++ \DeclareUnicodeCharacter{00E6}{\ae} ++ \DeclareUnicodeCharacter{00E7}{\cedilla{c}} ++ \DeclareUnicodeCharacter{00E8}{\`e} ++ \DeclareUnicodeCharacter{00E9}{\'e} ++ \DeclareUnicodeCharacter{00EA}{\^e} ++ \DeclareUnicodeCharacter{00EB}{\"e} ++ \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} ++ \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} ++ \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} ++ \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} ++ ++ \DeclareUnicodeCharacter{00F1}{\~n} ++ \DeclareUnicodeCharacter{00F2}{\`o} ++ \DeclareUnicodeCharacter{00F3}{\'o} ++ \DeclareUnicodeCharacter{00F4}{\^o} ++ \DeclareUnicodeCharacter{00F5}{\~o} ++ \DeclareUnicodeCharacter{00F6}{\"o} ++ \DeclareUnicodeCharacter{00F8}{\o} ++ \DeclareUnicodeCharacter{00F9}{\`u} ++ \DeclareUnicodeCharacter{00FA}{\'u} ++ \DeclareUnicodeCharacter{00FB}{\^u} ++ \DeclareUnicodeCharacter{00FC}{\"u} ++ \DeclareUnicodeCharacter{00FD}{\'y} ++ \DeclareUnicodeCharacter{00FF}{\"y} ++ ++ \DeclareUnicodeCharacter{0100}{\=A} ++ \DeclareUnicodeCharacter{0101}{\=a} ++ \DeclareUnicodeCharacter{0102}{\u{A}} ++ \DeclareUnicodeCharacter{0103}{\u{a}} ++ \DeclareUnicodeCharacter{0106}{\'C} ++ \DeclareUnicodeCharacter{0107}{\'c} ++ \DeclareUnicodeCharacter{0108}{\^C} ++ \DeclareUnicodeCharacter{0109}{\^c} ++ \DeclareUnicodeCharacter{010A}{\dotaccent{C}} ++ \DeclareUnicodeCharacter{010B}{\dotaccent{c}} ++ \DeclareUnicodeCharacter{010C}{\v{C}} ++ \DeclareUnicodeCharacter{010D}{\v{c}} ++ \DeclareUnicodeCharacter{010E}{\v{D}} ++ ++ \DeclareUnicodeCharacter{0112}{\=E} ++ \DeclareUnicodeCharacter{0113}{\=e} ++ \DeclareUnicodeCharacter{0114}{\u{E}} ++ \DeclareUnicodeCharacter{0115}{\u{e}} ++ \DeclareUnicodeCharacter{0116}{\dotaccent{E}} ++ \DeclareUnicodeCharacter{0117}{\dotaccent{e}} ++ \DeclareUnicodeCharacter{011A}{\v{E}} ++ \DeclareUnicodeCharacter{011B}{\v{e}} ++ \DeclareUnicodeCharacter{011C}{\^G} ++ \DeclareUnicodeCharacter{011D}{\^g} ++ \DeclareUnicodeCharacter{011E}{\u{G}} ++ \DeclareUnicodeCharacter{011F}{\u{g}} ++ ++ \DeclareUnicodeCharacter{0120}{\dotaccent{G}} ++ \DeclareUnicodeCharacter{0121}{\dotaccent{g}} ++ \DeclareUnicodeCharacter{0124}{\^H} ++ \DeclareUnicodeCharacter{0125}{\^h} ++ \DeclareUnicodeCharacter{0128}{\~I} ++ \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} ++ \DeclareUnicodeCharacter{012A}{\=I} ++ \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} ++ \DeclareUnicodeCharacter{012C}{\u{I}} ++ \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} ++ ++ \DeclareUnicodeCharacter{0130}{\dotaccent{I}} ++ \DeclareUnicodeCharacter{0131}{\dotless{i}} ++ \DeclareUnicodeCharacter{0132}{IJ} ++ \DeclareUnicodeCharacter{0133}{ij} ++ \DeclareUnicodeCharacter{0134}{\^J} ++ \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} ++ \DeclareUnicodeCharacter{0139}{\'L} ++ \DeclareUnicodeCharacter{013A}{\'l} ++ ++ \DeclareUnicodeCharacter{0141}{\L} ++ \DeclareUnicodeCharacter{0142}{\l} ++ \DeclareUnicodeCharacter{0143}{\'N} ++ \DeclareUnicodeCharacter{0144}{\'n} ++ \DeclareUnicodeCharacter{0147}{\v{N}} ++ \DeclareUnicodeCharacter{0148}{\v{n}} ++ \DeclareUnicodeCharacter{014C}{\=O} ++ \DeclareUnicodeCharacter{014D}{\=o} ++ \DeclareUnicodeCharacter{014E}{\u{O}} ++ \DeclareUnicodeCharacter{014F}{\u{o}} ++ ++ \DeclareUnicodeCharacter{0150}{\H{O}} ++ \DeclareUnicodeCharacter{0151}{\H{o}} ++ \DeclareUnicodeCharacter{0152}{\OE} ++ \DeclareUnicodeCharacter{0153}{\oe} ++ \DeclareUnicodeCharacter{0154}{\'R} ++ \DeclareUnicodeCharacter{0155}{\'r} ++ \DeclareUnicodeCharacter{0158}{\v{R}} ++ \DeclareUnicodeCharacter{0159}{\v{r}} ++ \DeclareUnicodeCharacter{015A}{\'S} ++ \DeclareUnicodeCharacter{015B}{\'s} ++ \DeclareUnicodeCharacter{015C}{\^S} ++ \DeclareUnicodeCharacter{015D}{\^s} ++ \DeclareUnicodeCharacter{015E}{\cedilla{S}} ++ \DeclareUnicodeCharacter{015F}{\cedilla{s}} ++ ++ \DeclareUnicodeCharacter{0160}{\v{S}} ++ \DeclareUnicodeCharacter{0161}{\v{s}} ++ \DeclareUnicodeCharacter{0162}{\cedilla{t}} ++ \DeclareUnicodeCharacter{0163}{\cedilla{T}} ++ \DeclareUnicodeCharacter{0164}{\v{T}} ++ ++ \DeclareUnicodeCharacter{0168}{\~U} ++ \DeclareUnicodeCharacter{0169}{\~u} ++ \DeclareUnicodeCharacter{016A}{\=U} ++ \DeclareUnicodeCharacter{016B}{\=u} ++ \DeclareUnicodeCharacter{016C}{\u{U}} ++ \DeclareUnicodeCharacter{016D}{\u{u}} ++ \DeclareUnicodeCharacter{016E}{\ringaccent{U}} ++ \DeclareUnicodeCharacter{016F}{\ringaccent{u}} ++ ++ \DeclareUnicodeCharacter{0170}{\H{U}} ++ \DeclareUnicodeCharacter{0171}{\H{u}} ++ \DeclareUnicodeCharacter{0174}{\^W} ++ \DeclareUnicodeCharacter{0175}{\^w} ++ \DeclareUnicodeCharacter{0176}{\^Y} ++ \DeclareUnicodeCharacter{0177}{\^y} ++ \DeclareUnicodeCharacter{0178}{\"Y} ++ \DeclareUnicodeCharacter{0179}{\'Z} ++ \DeclareUnicodeCharacter{017A}{\'z} ++ \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} ++ \DeclareUnicodeCharacter{017C}{\dotaccent{z}} ++ \DeclareUnicodeCharacter{017D}{\v{Z}} ++ \DeclareUnicodeCharacter{017E}{\v{z}} ++ ++ \DeclareUnicodeCharacter{01C4}{D\v{Z}} ++ \DeclareUnicodeCharacter{01C5}{D\v{z}} ++ \DeclareUnicodeCharacter{01C6}{d\v{z}} ++ \DeclareUnicodeCharacter{01C7}{LJ} ++ \DeclareUnicodeCharacter{01C8}{Lj} ++ \DeclareUnicodeCharacter{01C9}{lj} ++ \DeclareUnicodeCharacter{01CA}{NJ} ++ \DeclareUnicodeCharacter{01CB}{Nj} ++ \DeclareUnicodeCharacter{01CC}{nj} ++ \DeclareUnicodeCharacter{01CD}{\v{A}} ++ \DeclareUnicodeCharacter{01CE}{\v{a}} ++ \DeclareUnicodeCharacter{01CF}{\v{I}} ++ ++ \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} ++ \DeclareUnicodeCharacter{01D1}{\v{O}} ++ \DeclareUnicodeCharacter{01D2}{\v{o}} ++ \DeclareUnicodeCharacter{01D3}{\v{U}} ++ \DeclareUnicodeCharacter{01D4}{\v{u}} ++ ++ \DeclareUnicodeCharacter{01E2}{\={\AE}} ++ \DeclareUnicodeCharacter{01E3}{\={\ae}} ++ \DeclareUnicodeCharacter{01E6}{\v{G}} ++ \DeclareUnicodeCharacter{01E7}{\v{g}} ++ \DeclareUnicodeCharacter{01E8}{\v{K}} ++ \DeclareUnicodeCharacter{01E9}{\v{k}} ++ ++ \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} ++ \DeclareUnicodeCharacter{01F1}{DZ} ++ \DeclareUnicodeCharacter{01F2}{Dz} ++ \DeclareUnicodeCharacter{01F3}{dz} ++ \DeclareUnicodeCharacter{01F4}{\'G} ++ \DeclareUnicodeCharacter{01F5}{\'g} ++ \DeclareUnicodeCharacter{01F8}{\`N} ++ \DeclareUnicodeCharacter{01F9}{\`n} ++ \DeclareUnicodeCharacter{01FC}{\'{\AE}} ++ \DeclareUnicodeCharacter{01FD}{\'{\ae}} ++ \DeclareUnicodeCharacter{01FE}{\'{\O}} ++ \DeclareUnicodeCharacter{01FF}{\'{\o}} ++ ++ \DeclareUnicodeCharacter{021E}{\v{H}} ++ \DeclareUnicodeCharacter{021F}{\v{h}} ++ ++ \DeclareUnicodeCharacter{0226}{\dotaccent{A}} ++ \DeclareUnicodeCharacter{0227}{\dotaccent{a}} ++ \DeclareUnicodeCharacter{0228}{\cedilla{E}} ++ \DeclareUnicodeCharacter{0229}{\cedilla{e}} ++ \DeclareUnicodeCharacter{022E}{\dotaccent{O}} ++ \DeclareUnicodeCharacter{022F}{\dotaccent{o}} ++ ++ \DeclareUnicodeCharacter{0232}{\=Y} ++ \DeclareUnicodeCharacter{0233}{\=y} ++ \DeclareUnicodeCharacter{0237}{\dotless{j}} ++ ++ \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} ++ \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} ++ \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} ++ \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} ++ \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} ++ \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} ++ \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} ++ \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} ++ \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} ++ \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} ++ \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} ++ \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} ++ ++ \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} ++ \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} ++ ++ \DeclareUnicodeCharacter{1E20}{\=G} ++ \DeclareUnicodeCharacter{1E21}{\=g} ++ \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} ++ \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} ++ \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} ++ \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} ++ \DeclareUnicodeCharacter{1E26}{\"H} ++ \DeclareUnicodeCharacter{1E27}{\"h} ++ ++ \DeclareUnicodeCharacter{1E30}{\'K} ++ \DeclareUnicodeCharacter{1E31}{\'k} ++ \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} ++ \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} ++ \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} ++ \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} ++ \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} ++ \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} ++ \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} ++ \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} ++ \DeclareUnicodeCharacter{1E3E}{\'M} ++ \DeclareUnicodeCharacter{1E3F}{\'m} ++ ++ \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} ++ \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} ++ \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} ++ \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} ++ \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} ++ \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} ++ \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} ++ \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} ++ \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} ++ \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} ++ ++ \DeclareUnicodeCharacter{1E54}{\'P} ++ \DeclareUnicodeCharacter{1E55}{\'p} ++ \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} ++ \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} ++ \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} ++ \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} ++ \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} ++ \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} ++ \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} ++ \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} ++ ++ \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} ++ \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} ++ \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} ++ \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} ++ \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} ++ \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} ++ \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} ++ \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} ++ \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} ++ \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} ++ ++ \DeclareUnicodeCharacter{1E7C}{\~V} ++ \DeclareUnicodeCharacter{1E7D}{\~v} ++ \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} ++ \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} ++ ++ \DeclareUnicodeCharacter{1E80}{\`W} ++ \DeclareUnicodeCharacter{1E81}{\`w} ++ \DeclareUnicodeCharacter{1E82}{\'W} ++ \DeclareUnicodeCharacter{1E83}{\'w} ++ \DeclareUnicodeCharacter{1E84}{\"W} ++ \DeclareUnicodeCharacter{1E85}{\"w} ++ \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} ++ \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} ++ \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} ++ \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} ++ \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} ++ \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} ++ \DeclareUnicodeCharacter{1E8C}{\"X} ++ \DeclareUnicodeCharacter{1E8D}{\"x} ++ \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} ++ \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} ++ ++ \DeclareUnicodeCharacter{1E90}{\^Z} ++ \DeclareUnicodeCharacter{1E91}{\^z} ++ \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} ++ \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} ++ \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} ++ \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} ++ \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} ++ \DeclareUnicodeCharacter{1E97}{\"t} ++ \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} ++ \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} ++ ++ \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} ++ \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} ++ ++ \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} ++ \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} ++ \DeclareUnicodeCharacter{1EBC}{\~E} ++ \DeclareUnicodeCharacter{1EBD}{\~e} ++ ++ \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} ++ \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} ++ \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} ++ \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} ++ ++ \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} ++ \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} ++ ++ \DeclareUnicodeCharacter{1EF2}{\`Y} ++ \DeclareUnicodeCharacter{1EF3}{\`y} ++ \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} ++ ++ \DeclareUnicodeCharacter{1EF8}{\~Y} ++ \DeclareUnicodeCharacter{1EF9}{\~y} ++ ++ \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} ++ \DeclareUnicodeCharacter{21D2}{\result} ++ ++ \DeclareUnicodeCharacter{2212}{\minus} ++ \DeclareUnicodeCharacter{2217}{\point} ++ \DeclareUnicodeCharacter{2261}{\equiv} ++}% end of \utfeightchardefs ++ ++ ++% US-ASCII character definitions. ++\def\asciichardefs{% nothing need be done ++ \relax ++} ++ ++% Make non-ASCII characters printable again for compatibility with ++% existing Texinfo documents that may use them, even without declaring a ++% document encoding. ++% ++\setnonasciicharscatcode \other ++ ++ ++\message{formatting,} ++ + \newdimen\defaultparindent \defaultparindent = 15pt -- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" -- if test "$fast_install" = yes && test -n "$relink_command"; then -- rmfiles="$rmfiles $objdir/lt-$name" -+ # note $name still contains .exe if it was in $file originally -+ # as does the version of $file that was added into $rmfiles -+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" -+ if test "$fast_install" = yes && test -n "$relink_command"; then -+ rmfiles="$rmfiles $objdir/lt-$name" -+ fi -+ if test "X$noexename" != "X$name" ; then -+ rmfiles="$rmfiles $objdir/lt-${noexename}.c" -+ fi - fi - fi - ;; - esac -- $show "$rm $rmfiles" -- $run $rm $rmfiles || exit_status=1 -+ func_show_eval "$RM $rmfiles" 'exit_status=1' - done -+ objdir="$origobjdir" + \chapheadingskip = 15pt plus 4pt minus 2pt +@@ -5695,7 +8621,7 @@ should work if nowhere else does.} + % Don't be so finicky about underfull hboxes, either. + \hbadness = 2000 - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - 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 +-% Following George Bush, just get rid of widows and orphans. ++% Following George Bush, get rid of widows and orphans. + \widowpenalty=10000 + \clubpenalty=10000 - exit $exit_status -- ;; -+} +@@ -5713,11 +8639,14 @@ should work if nowhere else does.} + \fi + } -- "") -- $echo "$modename: you must specify a MODE" 1>&2 -- $echo "$generic_help" 1>&2 -- exit 1 -- ;; -- esac -+{ test "$mode" = uninstall || test "$mode" = clean; } && -+ func_mode_uninstall ${1+"$@"} +-% Parameters in order: 1) textheight; 2) textwidth; 3) voffset; +-% 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can +-% set \parskip and call \setleading for \baselineskip. ++% Parameters in order: 1) textheight; 2) textwidth; ++% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; ++% 7) physical page height; 8) physical page width. + % +-\def\internalpagesizes#1#2#3#4#5#6{% ++% We also call \setleading{\textleading}, so the caller should define ++% \textleading. The caller should also set \parskip. ++% ++\def\internalpagesizes#1#2#3#4#5#6#7#8{% + \voffset = #3\relax + \topskip = #6\relax + \splittopskip = \topskip +@@ -5736,6 +8665,17 @@ should work if nowhere else does.} + \normaloffset = #4\relax + \bindingoffset = #5\relax + % ++ \ifpdf ++ \pdfpageheight #7\relax ++ \pdfpagewidth #8\relax ++ % if we don't reset these, they will remain at "1 true in" of ++ % whatever layout pdftex was dumped with. ++ \pdfhorigin = 1 true in ++ \pdfvorigin = 1 true in ++ \fi ++ % ++ \setleading{\textleading} ++ % + \parindent = \defaultparindent + \setemergencystretch + } +@@ -5743,76 +8683,140 @@ should work if nowhere else does.} + % @letterpaper (the default). + \def\letterpaper{{\globaldefs = 1 + \parskip = 3pt plus 2pt minus 1pt +- \setleading{13.2pt}% ++ \textleading = 13.2pt + % + % If page is nothing but text, make it come out even. +- \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}% ++ \internalpagesizes{607.2pt}{6in}% that's 46 lines ++ {\voffset}{.25in}% ++ {\bindingoffset}{36pt}% ++ {11in}{8.5in}% + }} -- if test -z "$exec_cmd"; then -- $echo "$modename: invalid operation mode \`$mode'" 1>&2 -- $echo "$generic_help" 1>&2 -- exit 1 -- fi --fi # test -z "$show_help" -+test -z "$mode" && { -+ help="$generic_help" -+ func_fatal_help "you must specify a MODE" -+} +-% Use @smallbook to reset parameters for 7x9.5 (or so) format. ++% Use @smallbook to reset parameters for 7x9.25 trim size. + \def\smallbook{{\globaldefs = 1 + \parskip = 2pt plus 1pt +- \setleading{12pt}% ++ \textleading = 12pt + % +- \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}% ++ \internalpagesizes{7.5in}{5in}% ++ {-.2in}{0in}% ++ {\bindingoffset}{16pt}% ++ {9.25in}{7in}% + % + \lispnarrowing = 0.3in + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt +- \deftypemargin = 0pt + \defbodyindent = .5cm ++}} + -+test -z "$exec_cmd" && \ -+ func_fatal_help "invalid operation mode \`$mode'" ++% Use @smallerbook to reset parameters for 6x9 trim size. ++% (Just testing, parameters still in flux.) ++\def\smallerbook{{\globaldefs = 1 ++ \parskip = 1.5pt plus 1pt ++ \textleading = 12pt + % +- \let\smalldisplay = \smalldisplayx +- \let\smallexample = \smalllispx +- \let\smallformat = \smallformatx +- \let\smalllisp = \smalllispx ++ \internalpagesizes{7.4in}{4.8in}% ++ {-.2in}{-.4in}% ++ {0pt}{14pt}% ++ {9in}{6in}% ++ % ++ \lispnarrowing = 0.25in ++ \tolerance = 700 ++ \hfuzz = 1pt ++ \contentsrightmargin = 0pt ++ \defbodyindent = .4cm + }} - if test -n "$exec_cmd"; then -- eval exec $exec_cmd -- exit 1 -+ eval exec "$exec_cmd" -+ exit $EXIT_FAILURE - fi + % Use @afourpaper to print on European A4 paper. + \def\afourpaper{{\globaldefs = 1 +- \setleading{12pt}% + \parskip = 3pt plus 2pt minus 1pt ++ \textleading = 13.2pt + % +- \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}% ++ % Double-side printing via postscript on Laserjet 4050 ++ % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. ++ % To change the settings for a different printer or situation, adjust ++ % \normaloffset until the front-side and back-side texts align. Then ++ % do the same for \bindingoffset. You can set these for testing in ++ % your texinfo source file like this: ++ % @tex ++ % \global\normaloffset = -6mm ++ % \global\bindingoffset = 10mm ++ % @end tex ++ \internalpagesizes{673.2pt}{160mm}% that's 51 lines ++ {\voffset}{\hoffset}% ++ {\bindingoffset}{44pt}% ++ {297mm}{210mm}% + % + \tolerance = 700 + \hfuzz = 1pt ++ \contentsrightmargin = 0pt ++ \defbodyindent = 5mm + }} --# 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 -- ;; -- --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 -- -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 -- -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 -- -version-info CURRENT[:REVISION[:AGE]] -- specify library version info [each variable defaults to 0] -- --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." -- ;; +-% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin +-% 29mm, hence bottom margin 28mm, nominal side margin 3cm. +-\def\afourlatex{{\globaldefs = 1 +- \setleading{13.6pt}% ++% Use @afivepaper to print on European A5 paper. ++% From romildo@urano.iceb.ufop.br, 2 July 2000. ++% He also recommends making @example and @lisp be small. ++\def\afivepaper{{\globaldefs = 1 ++ \parskip = 2pt plus 1pt minus 0.1pt ++ \textleading = 12.5pt + % ++ \internalpagesizes{160mm}{120mm}% ++ {\voffset}{\hoffset}% ++ {\bindingoffset}{8pt}% ++ {210mm}{148mm}% ++ % ++ \lispnarrowing = 0.2in ++ \tolerance = 800 ++ \hfuzz = 1.2pt ++ \contentsrightmargin = 0pt ++ \defbodyindent = 2mm ++ \tableindent = 12mm ++}} ++ ++% A specific text layout, 24x15cm overall, intended for A4 paper. ++\def\afourlatex{{\globaldefs = 1 + \afourpaper +- \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}% ++ \internalpagesizes{237mm}{150mm}% ++ {\voffset}{4.6mm}% ++ {\bindingoffset}{7mm}% ++ {297mm}{210mm}% + % ++ % Must explicitly reset to 0 because we call \afourpaper. + \globaldefs = 0 + }} + +-% Use @afourwide to print on European A4 paper in wide format. +-\def\afourwide{% ++% Use @afourwide to print on A4 paper in landscape format. ++\def\afourwide{{\globaldefs = 1 + \afourpaper +- \internalpagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}% +- % ++ \internalpagesizes{241mm}{165mm}% ++ {\voffset}{-2.95mm}% ++ {\bindingoffset}{7mm}% ++ {297mm}{210mm}% + \globaldefs = 0 +-} ++}} + + % @pagesizes TEXTHEIGHT[,TEXTWIDTH] + % Perhaps we should allow setting the margins, \topskip, \parskip, + % and/or leading, also. Or perhaps we should compute them somehow. + % +-\def\pagesizes{\parsearg\pagesizesxxx} +-\def\pagesizesxxx#1{\pagesizesyyy #1,,\finish} ++\parseargdef\pagesizes{\pagesizesyyy #1,,\finish} + \def\pagesizesyyy#1,#2,#3\finish{{% + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi + \globaldefs = 1 + % + \parskip = 3pt plus 2pt minus 1pt +- \setleading{13.2pt}% ++ \setleading{\textleading}% + % +- \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}% ++ \dimen0 = #1\relax ++ \advance\dimen0 by \voffset ++ % ++ \dimen2 = \hsize ++ \advance\dimen2 by \normaloffset ++ % ++ \internalpagesizes{#1}{\hsize}% ++ {\voffset}{\normaloffset}% ++ {\bindingoffset}{44pt}% ++ {\dimen0}{\dimen2}% + }} + + % Set default to letter. +@@ -5840,10 +8844,10 @@ should work if nowhere else does.} + \def\normalless{<} + \def\normalgreater{>} + \def\normalplus{+} +-\def\normaldollar{$} ++\def\normaldollar{$}%$ font-lock fix + +-% This macro is used to make a character print one way in ttfont +-% where it can probably just be output, and another way in other fonts, ++% This macro is used to make a character print one way in \tt ++% (where it can probably be output as-is), and another way in other fonts, + % where something hairier probably needs to be done. + % + % #1 is what to print if we are indeed using \tt; #2 is what to print +@@ -5875,8 +8879,9 @@ should work if nowhere else does.} + + \catcode`\_=\active + \def_{\ifusingtt\normalunderscore\_} ++\let\realunder=_ + % Subroutine for the previous macro. +-\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}} ++\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } + + \catcode`\|=\active + \def|{{\tt\char124}} +@@ -5889,16 +8894,7 @@ should work if nowhere else does.} + \catcode`\+=\active + \def+{{\tt \char 43}} + \catcode`\$=\active +-\def${\ifusingit{{\sl\$}}\normaldollar} +-%\catcode 27=\active +-%\def^^[{$\diamondsuit$} - --*) -- $echo "$modename: invalid operation mode \`$mode'" 1>&2 -- $echo "$help" 1>&2 -- exit 1 -- ;; --esac +-% Set up an active definition for =, but don't enable it most of the time. +-{\catcode`\==\active +-\global\def={{\tt \char 61}}} - --echo --$echo "Try \`$modename --help' for more information about other modes." -+exit $exit_status +-\catcode`+=\active +-\catcode`\_=\active ++\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix --exit 0 + % If a .fmt file is being used, characters that might appear in a file + % name cannot be active until we have parsed the command line. +@@ -5906,46 +8902,53 @@ should work if nowhere else does.} + % \otherifyactive is called near the end of this file. + \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} - # The TAGs below are defined such that we never get into a situation - # in which we disable both kinds of libraries. Given conflicting -@@ -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. +-\catcode`\@=0 ++% Used sometimes to turn off (effectively) the active characters even after ++% parsing them. ++\def\turnoffactive{% ++ \normalturnoffactive ++ \otherbackslash ++} --### BEGIN LIBTOOL TAG CONFIG: disable-shared -+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared - build_libtool_libs=no - build_old_libs=yes --### END LIBTOOL TAG CONFIG: disable-shared -+# ### END LIBTOOL TAG CONFIG: disable-shared +-% \rawbackslashxx output one backslash character in current font +-\global\chardef\rawbackslashxx=`\\ +-%{\catcode`\\=\other +-%@gdef@rawbackslashxx{\}} ++\catcode`\@=0 --### BEGIN LIBTOOL TAG CONFIG: disable-static -+# ### 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 -+# ### END LIBTOOL TAG CONFIG: disable-static +-% \rawbackslash redefines \ as input to do \rawbackslashxx. +-{\catcode`\\=\active +-@gdef@rawbackslash{@let\=@rawbackslashxx }} ++% \backslashcurfont outputs one backslash character in current font, ++% as in \char`\\. ++\global\chardef\backslashcurfont=`\\ ++\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work - # Local Variables: - # mode:shell-script - # sh-indentation:2 - # End: -+# vi:sw=2 +-% \normalbackslash outputs one backslash in fixed width font. +-\def\normalbackslash{{\tt\rawbackslashxx}} ++% \realbackslash is an actual character `\' with catcode other, and ++% \doublebackslash is two of them (for the pdf outlines). ++{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} + +-% \catcode 17=0 % Define control-q ++% In texinfo, backslash is an active character; it prints the backslash ++% in fixed width font. + \catcode`\\=\active ++@def@normalbackslash{{@tt@backslashcurfont}} ++% On startup, @fixbackslash assigns: ++% @let \ = @normalbackslash + +-% Used sometimes to turn off (effectively) the active characters +-% even after parsing them. +-@def@turnoffactive{@let"=@normaldoublequote +-@let\=@realbackslash +-@let~=@normaltilde +-@let^=@normalcaret +-@let_=@normalunderscore +-@let|=@normalverticalbar +-@let<=@normalless +-@let>=@normalgreater +-@let+=@normalplus +-@let$=@normaldollar} ++% \rawbackslash defines an active \ to do \backslashcurfont. ++% \otherbackslash defines an active \ to be a literal `\' character with ++% catcode other. ++@gdef@rawbackslash{@let\=@backslashcurfont} ++@gdef@otherbackslash{@let\=@realbackslash} + +-@def@normalturnoffactive{@let"=@normaldoublequote +-@let\=@normalbackslash +-@let~=@normaltilde +-@let^=@normalcaret +-@let_=@normalunderscore +-@let|=@normalverticalbar +-@let<=@normalless +-@let>=@normalgreater +-@let+=@normalplus +-@let$=@normaldollar} ++% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of ++% the literal character `\'. ++% ++@def@normalturnoffactive{% ++ @let\=@normalbackslash ++ @let"=@normaldoublequote ++ @let~=@normaltilde ++ @let^=@normalcaret ++ @let_=@normalunderscore ++ @let|=@normalverticalbar ++ @let<=@normalless ++ @let>=@normalgreater ++ @let+=@normalplus ++ @let$=@normaldollar %$ font-lock fix ++ @unsepspaces ++} + + % Make _ and + \other characters, temporarily. + % This is canceled by @fixbackslash. +@@ -5959,9 +8962,9 @@ should work if nowhere else does.} + @global@let\ = @eatinput + + % On the other hand, perhaps the file did not have a `\input texinfo'. Then +-% the first `\{ in the file would cause an error. This macro tries to fix ++% the first `\' in the file would cause an error. This macro tries to fix + % that, assuming it is called before the first `\' could plausibly occur. +-% Also back turn on active characters that might appear in the input ++% Also turn back on active characters that might appear in the input + % file name, in case not using a pre-dumped format. + % + @gdef@fixbackslash{% +@@ -5973,15 +8976,11 @@ should work if nowhere else does.} + % Say @foo, not \foo, in error messages. + @escapechar = `@@ + +-% These look ok in all fonts, so just make them not special. ++% These look ok in all fonts, so just make them not special. + @catcode`@& = @other + @catcode`@# = @other + @catcode`@% = @other + +-@c Set initial fonts. +-@textfonts +-@rm +- + + @c Local variables: + @c eval: (add-hook 'write-file-hooks 'time-stamp) +@@ -5990,3 +8989,9 @@ should work if nowhere else does.} + @c time-stamp-format: "%:y-%02m-%02d.%02H" + @c time-stamp-end: "}" + @c End: ++ ++@c vim:sw=2: + ++@ignore ++ arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 ++@end ignore diff --git a/gcl-2.6.8-latex.patch b/gcl-2.6.8-latex.patch index c89c083..1528102 100644 --- a/gcl-2.6.8-latex.patch +++ b/gcl-2.6.8-latex.patch @@ -1,6 +1,5 @@ -diff -dur gcl-2.6.8.ORIG/xgcl-2/dwdoc.tex gcl-2.6.8/xgcl-2/dwdoc.tex ---- gcl-2.6.8.ORIG/xgcl-2/dwdoc.tex 2010-01-22 17:49:06.000000000 -0700 -+++ gcl-2.6.8/xgcl-2/dwdoc.tex 2010-03-23 09:44:50.066911736 -0600 +--- xgcl-2/dwdoc.tex.orig 2010-01-22 17:49:06.000000000 -0700 ++++ xgcl-2/dwdoc.tex 2010-12-29 11:36:19.808014216 -0700 @@ -1,19 +1,16 @@ % dwdoc.tex Gordon S. Novak Jr. % 08 Oct 92; 08 Oct 93; 16 Nov 94; 05 Jan 95; 25 Jan 06; 26 Jan 06; 08 Dec 08 @@ -24,7 +23,7 @@ diff -dur gcl-2.6.8.ORIG/xgcl-2/dwdoc.tex gcl-2.6.8/xgcl-2/dwdoc.tex \normalsize -@@ -42,508 +39,512 @@ +@@ -42,508 +39,512 @@ consists of several parts: \item Hiep Huu Nguyen has written (and adapted from X Consortium software) an interface between GCL and Xlib, the X library in C. Xlib functions can be called directly if desired, but most users will find @@ -790,7 +789,7 @@ diff -dur gcl-2.6.8.ORIG/xgcl-2/dwdoc.tex gcl-2.6.8/xgcl-2/dwdoc.tex \subsection{Color} -@@ -551,62 +552,62 @@ +@@ -551,62 +552,62 @@ undesired state. The color of the foreground (things that are drawn, such as lines or characters) is set by: @@ -876,7 +875,7 @@ diff -dur gcl-2.6.8.ORIG/xgcl-2/dwdoc.tex gcl-2.6.8/xgcl-2/dwdoc.tex Example: \begin{verbatim} (window-draw-box-xy myw 48 48 204 204) -@@ -616,130 +617,132 @@ +@@ -616,130 +617,132 @@ Example: \section{Mouse Interaction} @@ -1071,7 +1070,7 @@ diff -dur gcl-2.6.8.ORIG/xgcl-2/dwdoc.tex gcl-2.6.8/xgcl-2/dwdoc.tex then destroys the window containing the mouse cursor. This function should be used with care; it can destroy a non-user window, causing processes associated with the window to be destroyed. It is useful -@@ -750,7 +753,7 @@ +@@ -750,7 +753,7 @@ due to an error. \section{Examples} Several interactive programs using this software for their graphical @@ -1080,7 +1079,7 @@ diff -dur gcl-2.6.8.ORIG/xgcl-2/dwdoc.tex gcl-2.6.8/xgcl-2/dwdoc.tex under the heading Software Demos. -@@ -760,31 +763,31 @@ +@@ -760,31 +763,31 @@ This software allows a Lisp program to b a web page. There are two approaches, either using an X server on the computer of the person viewing the web page, or using WeirdX, a Java program that emulates an X server. Details can be found at: diff --git a/gcl-2.6.8-loginname.patch b/gcl-2.6.8-loginname.patch deleted file mode 100644 index 2e64fb8..0000000 --- a/gcl-2.6.8-loginname.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -dur gcl-2.6.8.ORIG/o/unixfsys.c gcl-2.6.8/o/unixfsys.c ---- gcl-2.6.8.ORIG/o/unixfsys.c 2010-03-23 09:51:48.291962248 -0600 -+++ gcl-2.6.8/o/unixfsys.c 2010-03-23 09:53:39.421996999 -0600 -@@ -214,7 +214,7 @@ - - #ifndef NO_PWD_H - if(namestring->st.st_self[0]=='~') -- {char name[20]; -+ {char name[LOGIN_NAME_MAX]; - int n; - char *q = namestring->st.st_self; - #ifndef __STDC__ -@@ -224,7 +224,6 @@ - - struct passwd *pwent; - int m=0; -- q=namestring->st.st_self; - for (n=1; n< namestring->st.st_fillp; n++) - if (q[n]=='/') break; - bcopy(q+1,name,n-1); diff --git a/gcl-2.6.8-man.patch b/gcl-2.6.8-man.patch new file mode 100644 index 0000000..a6ad0ec --- /dev/null +++ b/gcl-2.6.8-man.patch @@ -0,0 +1,21 @@ +--- man/man1/gcl.1.orig 2002-02-03 11:44:07.000000000 -0700 ++++ man/man1/gcl.1 2010-12-30 14:09:50.834355544 -0700 +@@ -149,8 +149,7 @@ + .B \-compile + .RB + Invoke the compiler on the filename following +-.BR \-compile +-. Other ++\fB\-compile\fR. Other + flags affect compilation. + + .TP +@@ -205,8 +204,6 @@ + + This GNU package should not be confused with the proprietary program + distributed by FRANZ, Inc. +-Nor should it be confused with the public domain \*(Fl or the proprietary +-\*(Li. + For anything other than program development, + use of the lisp compiler \fIglc\fP(1L) is strongly + recommended in preference to use of the interpreter, diff --git a/gcl-2.6.8-plt.patch b/gcl-2.6.8-plt.patch index 9684463..1eb05f8 100644 --- a/gcl-2.6.8-plt.patch +++ b/gcl-2.6.8-plt.patch @@ -1,7 +1,6 @@ -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 2009-12-11 09:10:05.000000000 -0700 -+++ gcl-2.6.8/o/plt.c 2010-03-23 10:57:32.741972442 -0600 -@@ -102,6 +102,12 @@ +--- o/plt.c.orig 2009-12-11 09:10:05.000000000 -0700 ++++ o/plt.c 2010-12-30 11:41:57.029624050 -0700 +@@ -102,6 +102,12 @@ arsearch(const void *v1,const void *v2) } @@ -14,7 +13,7 @@ diff -dur gcl-2.6.8.ORIG/o/plt.c gcl-2.6.8/o/plt.c int parse_plt() { -@@ -132,15 +138,24 @@ +@@ -132,15 +138,24 @@ parse_plt() { return 0; if (!(f=fopen(b1,"r"))) FEerror("Cannot open map file", 0); diff --git a/gcl-2.6.8-rename.patch b/gcl-2.6.8-rename.patch index 2dbee67..726c180 100644 --- a/gcl-2.6.8-rename.patch +++ b/gcl-2.6.8-rename.patch @@ -1,12 +1,12 @@ -diff -dur gcl-2.6.8.ORIG/o/unixfsys.c gcl-2.6.8/o/unixfsys.c ---- gcl-2.6.8.ORIG/o/unixfsys.c 2007-04-06 08:41:09.000000000 -0600 -+++ gcl-2.6.8/o/unixfsys.c 2008-12-29 17:34:10.000000000 -0700 -@@ -448,11 +448,17 @@ +--- o/unixfsys.c.orig 2010-09-22 13:03:11.000000000 -0600 ++++ o/unixfsys.c 2010-12-29 11:52:55.301247671 -0700 +@@ -412,11 +412,17 @@ FILE * backup_fopen(char *filename, char *option) { char backupfilename[MAXPATHLEN]; +- char command[MAXPATHLEN * 2]; +#ifndef HAVE_RENAME - char command[MAXPATHLEN * 2]; ++ char command[MAXPATHLEN * 2 + 4]; +#endif strcat(strcpy(backupfilename, filename), ".BAK"); @@ -14,17 +14,17 @@ diff -dur gcl-2.6.8.ORIG/o/unixfsys.c gcl-2.6.8/o/unixfsys.c + rename(filename, backupfilename); +#else sprintf(command, "mv %s %s", filename, backupfilename); - system(command); + msystem(command); +#endif return(fopen(filename, option)); } -@@ -477,6 +483,9 @@ +@@ -441,6 +447,9 @@ LFD(Lrename_file)(void) { char filename[MAXPATHLEN]; char newfilename[MAXPATHLEN]; +#ifndef HAVE_RENAME -+ char command[MAXPATHLEN * 2]; ++ char command[MAXPATHLEN * 2 + 4]; +#endif check_arg(2); diff --git a/gcl-2.6.8-selinux.patch b/gcl-2.6.8-selinux.patch index 6c3e24a..a72d31c 100644 --- a/gcl-2.6.8-selinux.patch +++ b/gcl-2.6.8-selinux.patch @@ -1,9 +1,9 @@ -diff -durN gcl-2.6.8.ORIG/clcs/makefile gcl-2.6.8/clcs/makefile ---- gcl-2.6.8.ORIG/clcs/makefile 2005-05-06 15:56:55.000000000 -0600 -+++ gcl-2.6.8/clcs/makefile 2009-10-20 16:00:21.608387999 -0600 -@@ -9,6 +9,9 @@ +diff -durpN gcl-2.6.8.ORIG/clcs/makefile gcl-2.6.8/clcs/makefile +--- gcl-2.6.8.ORIG/clcs/makefile 2010-08-04 15:44:22.000000000 -0600 ++++ gcl-2.6.8/clcs/makefile 2010-12-29 11:46:30.623141563 -0700 +@@ -9,6 +9,9 @@ all: $(addsuffix .c,$(FILES)) $(addsuffi - saved_clcs_gcl: ../unixport/saved_pcl_gcl + saved_clcs_gcl: ../unixport/saved_pcl_gcl$(EXE) echo '(load "package.lisp")(load "myload.lisp")(si::save-system "$@")' | $< $(/dev/null 2>&1 ; then if grep -i oncrpc makedefs >/dev/null 2>&1 ; then cp /mingw/bin/oncrpc.dll $(DESTDIR)$(INSTALL_LIB_DIR)/$(PORTDIR); fi ; fi cd $(DESTDIR)$(INSTALL_LIB_DIR)/$(PORTDIR) && \ mv $(FLISP)$(EXE) temp$(EXE) && \ @@ -34,18 +34,18 @@ diff -durN gcl-2.6.8.ORIG/makefile gcl-2.6.8/makefile echo '(reset-sys-paths "$(INSTALL_LIB_DIR)/")(si::save-system "$(FLISP)$(EXE)")' | ./temp$(EXE) && \ rm -f temp$(EXE) if [ -e "unixport/rsym$(EXE)" ] ; then cp unixport/rsym$(EXE) $(DESTDIR)$(INSTALL_LIB_DIR)/unixport/ ; fi -diff -durN gcl-2.6.8.ORIG/selinux/gcl.fc gcl-2.6.8/selinux/gcl.fc +diff -durpN gcl-2.6.8.ORIG/selinux/gcl.fc gcl-2.6.8/selinux/gcl.fc --- gcl-2.6.8.ORIG/selinux/gcl.fc 1969-12-31 17:00:00.000000000 -0700 -+++ gcl-2.6.8/selinux/gcl.fc 2009-10-20 16:00:52.173119081 -0600 ++++ gcl-2.6.8/selinux/gcl.fc 2010-12-29 11:46:30.625141327 -0700 @@ -0,0 +1,5 @@ +/usr/lib64/gcl-[^/]+/unixport/saved_.* -- gen_context(system_u:object_r:gcl_exec_t,s0) +/usr/lib/gcl-[^/]+/unixport/saved_.* -- gen_context(system_u:object_r:gcl_exec_t,s0) +/usr/lib/maxima/[^/]+/binary-gcl -- gen_context(system_u:object_r:gcl_exec_t,s0) +/usr/lib64/maxima/[^/]+/binary-gcl -- gen_context(system_u:object_r:gcl_exec_t,s0) + -diff -durN gcl-2.6.8.ORIG/selinux/gcl.if gcl-2.6.8/selinux/gcl.if +diff -durpN gcl-2.6.8.ORIG/selinux/gcl.if gcl-2.6.8/selinux/gcl.if --- gcl-2.6.8.ORIG/selinux/gcl.if 1969-12-31 17:00:00.000000000 -0700 -+++ gcl-2.6.8/selinux/gcl.if 2009-10-20 16:00:21.622010253 -0600 ++++ gcl-2.6.8/selinux/gcl.if 2010-12-29 11:46:30.626141206 -0700 @@ -0,0 +1,146 @@ + +## policy for gcl @@ -193,9 +193,9 @@ diff -durN gcl-2.6.8.ORIG/selinux/gcl.if gcl-2.6.8/selinux/gcl.if + gcl_manage_tmp($1) + +') -diff -durN gcl-2.6.8.ORIG/selinux/gcl.te gcl-2.6.8/selinux/gcl.te +diff -durpN gcl-2.6.8.ORIG/selinux/gcl.te gcl-2.6.8/selinux/gcl.te --- gcl-2.6.8.ORIG/selinux/gcl.te 1969-12-31 17:00:00.000000000 -0700 -+++ gcl-2.6.8/selinux/gcl.te 2009-10-20 15:52:31.702057692 -0600 ++++ gcl-2.6.8/selinux/gcl.te 2010-12-29 11:46:30.627141086 -0700 @@ -0,0 +1,45 @@ +policy_module(gcl,1.0.1) + @@ -242,22 +242,22 @@ diff -durN gcl-2.6.8.ORIG/selinux/gcl.te gcl-2.6.8/selinux/gcl.te + gcl_run(unconfined_t, unconfined_r, { unconfined_tty_device_t unconfined_devpts_t }) + allow gcl_t gcl_exec_t:file execmod; +') -diff -durN gcl-2.6.8.ORIG/unixport/makefile gcl-2.6.8/unixport/makefile ---- gcl-2.6.8.ORIG/unixport/makefile 2006-08-23 12:14:22.000000000 -0600 -+++ gcl-2.6.8/unixport/makefile 2009-10-20 16:00:21.622998021 -0600 -@@ -118,6 +118,9 @@ - cp init_$*.lsp foo +diff -durpN gcl-2.6.8.ORIG/unixport/makefile gcl-2.6.8/unixport/makefile +--- gcl-2.6.8.ORIG/unixport/makefile 2010-11-05 07:26:31.000000000 -0600 ++++ gcl-2.6.8/unixport/makefile 2010-12-29 11:46:30.628140965 -0700 +@@ -122,6 +122,9 @@ saved_%:raw_% $(RSYM) init_%.lsp raw_%_m echo " (in-package \"USER\")(system:save-system \"$@\")" >>foo + ar x lib$*.a $$(ar t lib$*.a |grep ^gcl_) $(PORTDIR)/raw_$*$(EXE) $(PORTDIR)/ -libdir $(GCLDIR)/ < foo + if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then \ + chcon -t gcl_exec_t $@; \ + fi $(RSYM): $(SPECIAL_RSYM) $(HDIR)/mdefs.h - $(CC) $(CFLAGS) -I$(HDIR) -I$(ODIR) -o $(RSYM) $(SPECIAL_RSYM) -@@ -157,6 +160,9 @@ - $(CC) -o raw_$*$(EXE) $(filter %.o,$^) \ - -L. $(EXTRA_LD_LIBS) $(LD_LIBS_PRE) -l$* $(LD_LIBS_POST) + $(CC) $(LD_FLAGS) $(CFLAGS) -I$(HDIR) -I$(ODIR) -o $(RSYM) $(SPECIAL_RSYM) +@@ -162,6 +165,9 @@ ifeq ($(GNU_LD),1) + else + $(CC) $(LD_FLAGS) -o raw_$*$(EXE) $(filter %.o,$^) -L. $(EXTRA_LD_LIBS) $(LD_LIBS_PRE) -l$* $(LD_LIBS_POST) endif + if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then \ + chcon -t gcl_exec_t raw_$*$(EXE); \ diff --git a/gcl-2.6.8-texinfo.patch b/gcl-2.6.8-texinfo.patch index a632b5d..8d70611 100644 --- a/gcl-2.6.8-texinfo.patch +++ b/gcl-2.6.8-texinfo.patch @@ -1,6 +1,5 @@ -diff -dur gcl-2.6.8.ORIG/info/gcl-si.texi gcl-2.6.8/info/gcl-si.texi ---- gcl-2.6.8.ORIG/info/gcl-si.texi 2005-04-30 22:12:37.000000000 -0600 -+++ gcl-2.6.8/info/gcl-si.texi 2008-12-29 21:09:53.000000000 -0700 +--- info/gcl-si.texi.orig 2005-04-30 22:12:37.000000000 -0600 ++++ info/gcl-si.texi 2010-12-29 11:38:22.142419284 -0700 @@ -10,6 +10,7 @@ @c @smallbook @@ -9,9 +8,8 @@ diff -dur gcl-2.6.8.ORIG/info/gcl-si.texi gcl-2.6.8/info/gcl-si.texi @synindex vr fn @c to update the menus do: -diff -dur gcl-2.6.8.ORIG/info/gcl-tk.texi gcl-2.6.8/info/gcl-tk.texi ---- gcl-2.6.8.ORIG/info/gcl-tk.texi 2002-02-19 12:21:19.000000000 -0700 -+++ gcl-2.6.8/info/gcl-tk.texi 2008-12-29 21:09:53.000000000 -0700 +--- info/gcl-tk.texi.orig 2002-02-19 12:21:19.000000000 -0700 ++++ info/gcl-tk.texi 2010-12-29 11:38:38.214501822 -0700 @@ -2,6 +2,7 @@ @c -*-texinfo-*- @c @smallbook diff --git a/gcl-2.6.8-unrandomize.patch b/gcl-2.6.8-unrandomize.patch index 295850d..9946aca 100644 --- a/gcl-2.6.8-unrandomize.patch +++ b/gcl-2.6.8-unrandomize.patch @@ -1,8 +1,7 @@ -diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure ---- gcl-2.6.8.ORIG/configure 2010-03-23 11:21:56.155975563 -0600 -+++ gcl-2.6.8/configure 2010-03-23 11:22:09.803019259 -0600 -@@ -8749,9 +8749,11 @@ - cat >>conftest.$ac_ext <<_ACEOF +--- configure.orig 2010-12-30 13:36:33.746292681 -0700 ++++ configure 2010-12-30 13:40:53.685309008 -0700 +@@ -6846,9 +6846,11 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #define CAN_UNRANDOMIZE_SBRK 1 @@ -10,16 +9,16 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure void gprof_cleanup() {} int main(int argc,char *argv[],char *envp[]) { - #include "h/unrandomize.h" -+ UNRANDOMIZE_SBRK; ++ UNRANDOMIZE_SBRK; return 0;} _ACEOF - rm -f conftest$ac_exeext -@@ -8816,12 +8818,11 @@ + if ac_fn_c_try_run "$LINENO"; then : +@@ -6880,12 +6882,11 @@ else /* end confdefs.h. */ #include + #include "h/unrandomize.h" - void gprof_cleanup() {} + void gprof_cleanup() {} int main(int argc,char * argv[],char * envp[]) { FILE *f; - #ifdef CAN_UNRANDOMIZE_SBRK @@ -29,7 +28,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure if (!(f=fopen("conftest1","w"))) return -1; fprintf(f,"%u",sbrk(0)); return 0;} -@@ -8878,12 +8879,11 @@ +@@ -6909,12 +6910,11 @@ else /* end confdefs.h. */ #include @@ -44,7 +43,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure if (!(f=fopen("conftest1","w"))) return -1; fprintf(f,"%u",sbrk(0)); return 0;} -@@ -9034,6 +9034,7 @@ +@@ -7001,6 +7001,7 @@ else #include #include @@ -52,7 +51,7 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure void gprof_cleanup() {} int -@@ -9042,9 +9043,7 @@ +@@ -7009,9 +7010,7 @@ main(int argc,char * argv[],char *envp[] char *b,*b1; FILE *fp; @@ -63,10 +62,9 @@ diff -dur gcl-2.6.8.ORIG/configure gcl-2.6.8/configure b = (void *) malloc(1000); fp = fopen("conftest1","w"); -diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in ---- gcl-2.6.8.ORIG/configure.in 2010-03-23 11:21:56.157974544 -0600 -+++ gcl-2.6.8/configure.in 2010-03-23 11:22:09.804016306 -0600 -@@ -1152,9 +1152,11 @@ +--- configure.in.orig 2010-12-30 13:36:33.744292599 -0700 ++++ configure.in 2010-12-30 13:39:30.429303332 -0700 +@@ -1135,9 +1135,11 @@ if test "$HAVE_SBRK" = "1" ; then AC_MSG_CHECKING([for personality(ADDR_NO_RANDOMIZE) support]) AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -75,16 +73,16 @@ diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in void gprof_cleanup() {} int main(int argc,char *argv[],char *envp[]) { - #include "h/unrandomize.h" -+ UNRANDOMIZE_SBRK; ++ UNRANDOMIZE_SBRK; return 0;}]])],CAN_UNRANDOMIZE_SBRK=1,CAN_UNRANDOMIZE_SBRK=0,CAN_UNRANDOMIZE_SBRK=0) if test "$CAN_UNRANDOMIZE_SBRK" != 0 ; then -@@ -1167,12 +1169,11 @@ +@@ -1150,12 +1152,11 @@ if test "$HAVE_SBRK" = "1" ; then AC_MSG_CHECKING([that sbrk is (now) non-random]) AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include + #include "h/unrandomize.h" - void gprof_cleanup() {} + void gprof_cleanup() {} int main(int argc,char * argv[],char * envp[]) { FILE *f; - #ifdef CAN_UNRANDOMIZE_SBRK @@ -94,7 +92,7 @@ diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in if (!(f=fopen("conftest1","w"))) return -1; fprintf(f,"%u",sbrk(0)); return 0;}]])],SBRK=`cat conftest1`,SBRK=0,SBRK=0) -@@ -1181,12 +1182,11 @@ +@@ -1164,12 +1165,11 @@ if test "$HAVE_SBRK" = "1" ; then fi AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include @@ -109,7 +107,7 @@ diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in if (!(f=fopen("conftest1","w"))) return -1; fprintf(f,"%u",sbrk(0)); return 0;}]])],SBRK1=`cat conftest1`,SBRK1=0,SBRK1=0) -@@ -1228,6 +1228,7 @@ +@@ -1211,6 +1211,7 @@ AC_MSG_CHECKING([finding DBEGIN]) AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include @@ -117,7 +115,7 @@ diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in void gprof_cleanup() {} int -@@ -1236,9 +1237,7 @@ +@@ -1219,9 +1220,7 @@ main(int argc,char * argv[],char *envp[] char *b,*b1; FILE *fp; @@ -128,9 +126,8 @@ diff -dur gcl-2.6.8.ORIG/configure.in gcl-2.6.8/configure.in b = (void *) malloc(1000); fp = fopen("conftest1","w"); -diff -dur gcl-2.6.8.ORIG/h/unrandomize.h gcl-2.6.8/h/unrandomize.h ---- gcl-2.6.8.ORIG/h/unrandomize.h 2010-01-12 07:19:15.000000000 -0700 -+++ gcl-2.6.8/h/unrandomize.h 2010-03-23 11:22:41.350120555 -0600 +--- h/unrandomize.h.orig 2010-01-12 07:19:15.000000000 -0700 ++++ h/unrandomize.h 2010-12-30 13:36:40.877294739 -0700 @@ -1,39 +1,45 @@ +#include +#include @@ -209,10 +206,9 @@ diff -dur gcl-2.6.8.ORIG/h/unrandomize.h gcl-2.6.8/h/unrandomize.h - } - } -} -diff -dur gcl-2.6.8.ORIG/o/main.c gcl-2.6.8/o/main.c ---- gcl-2.6.8.ORIG/o/main.c 2010-01-12 07:19:15.000000000 -0700 -+++ gcl-2.6.8/o/main.c 2010-03-23 11:22:09.805058642 -0600 -@@ -51,6 +51,7 @@ +--- o/main.c.orig 2010-11-02 15:56:45.000000000 -0600 ++++ o/main.c 2010-12-30 13:36:40.877294739 -0700 +@@ -51,6 +51,7 @@ void initialize_process(); #include #endif #include "page.h" @@ -220,7 +216,7 @@ diff -dur gcl-2.6.8.ORIG/o/main.c gcl-2.6.8/o/main.c bool saving_system ; -@@ -143,11 +144,7 @@ +@@ -146,11 +147,7 @@ main(int argc, char **argv, char **envp) #endif *argv=kcl_self; @@ -231,5 +227,5 @@ diff -dur gcl-2.6.8.ORIG/o/main.c gcl-2.6.8/o/main.c -#endif + UNRANDOMIZE_SBRK; - #if defined(DARWIN) - { + #ifdef LD_BIND_NOW + #include diff --git a/gcl.spec b/gcl.spec index 7336b98..71365c2 100644 --- a/gcl.spec +++ b/gcl.spec @@ -1,9 +1,9 @@ # -fstack-protector leads to segfaults because GCL uses its own conflicting -# stack protection scheme. -%global __global_cflags %(printf %%s '%__global_cflags' | sed 's/ -fstack-protector --param=ssp-buffer-size=4//') +# stack protection scheme. GCL code violates C99 aliasing rules. +%global __global_cflags %(printf %%s '%__global_cflags' | sed 's/-fstack-protector --param=ssp-buffer-size=4/-fno-strict-aliasing/') # Prerelease of 2.6.8 -%global alphatag 20100201cvs +%global alphatag 20101115cvs Name: gcl Version: 2.6.8 @@ -16,7 +16,7 @@ URL: http://www.gnu.org/software/gcl/ # The source for this package was pulled from upstream's CVS repository. Use # the following commands to generate the tarball: # cvs -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/gcl export \ -# -r Version_2_6_8pre -D 2010-02-02 -d gcl-2.6.8 gcl +# -r Version_2_6_8pre -D 2010-11-16 -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 @@ -49,41 +49,40 @@ Patch5: gcl-2.6.8-rename.patch # compilation problem due to the fact that, at high optimization levels, # getcwd() is an inline function. Patch6: gcl-2.6.8-getcwd.patch -# This patch was last sent upstream on 29 Dec 2008. It fixes a potential -# buffer overflow when accessing files whose names start with a tilde (i.e., -# user home directories). -Patch7: gcl-2.6.8-loginname.patch # This patch was last sent upstream on 29 Dec 2008. It updates the autoconf # and libtool files to newer versions. By itself, this patch accomplishes # little of interest. However, some of the later patches change configure.in. # Without this patch, autoconf appears to run successfully, but generates a # configure script that contains invalid shell script syntax. -Patch8: gcl-2.6.8-infrastructure.patch +Patch7: gcl-2.6.8-infrastructure.patch # This patch was last sent upstream on 29 Dec 2008. It simplifies the handling # of alloca() detection in the configure script. -Patch9: gcl-2.6.8-alloca.patch +Patch8: gcl-2.6.8-alloca.patch # This patch was last sent upstream on 29 Dec 2008. It rationalizes the # handling of system extensions. For example, on glibc-based systems, some # functionality is available only when _GNU_SOURCE is defined. -Patch10: gcl-2.6.8-extension.patch +Patch9: gcl-2.6.8-extension.patch # This patch was last sent upstream on 29 Dec 2008. It fixes a compilation # error on newer GCC systems due to an include inside a function. This affects # the "unrandomize" sbrk() functionality, hence the name of the patch. -Patch11: gcl-2.6.8-unrandomize.patch +Patch10: 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. -Patch12: gcl-2.6.8-debuginfo.patch +Patch11: 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. -Patch13: gcl-2.6.8-asm-signal-h.patch +Patch12: gcl-2.6.8-asm-signal-h.patch # This patch was last sent upstream on 13 Oct 2009. It fixes two bugs in the # reading of PLT information. -Patch14: gcl-2.6.8-plt.patch +Patch13: gcl-2.6.8-plt.patch # This patch was last sent upstream on 13 Oct 2009. It fixes several malformed # function prototypes involving an ellipsis. -Patch15: gcl-2.6.8-ellipsis.patch +Patch14: gcl-2.6.8-ellipsis.patch +# This patch was last sent upstream on 30 Dec 2010. It fixes some malformed +# man page constructions. +Patch15: gcl-2.6.8-man.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libSM-devel BuildRequires: libXext-devel @@ -167,25 +166,25 @@ gcl_exec_t. %prep %setup -q %setup -q -T -D -a 2 -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +%patch0 +%patch1 +%patch2 +%patch3 %patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 +%patch5 +%patch6 +%patch7 +%patch8 +%patch9 +%patch10 +%patch11 +%patch12 +%patch13 +%patch14 +%patch15 # 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 +sed -i -e 's/"-fomit-frame-pointer"/""/' -e 's/-O3/-O2/g' configure # Fix a path in the launch script sed -i -e 's|/usr/lib/tk|%{_datadir}/tk|' debian/gcl.sh @@ -194,14 +193,13 @@ sed -i -e 's|/usr/lib/tk|%{_datadir}/tk|' debian/gcl.sh # all here, then add back the ones that should exist find . -type f -perm /0111 | xargs chmod a-x chmod a+x add-defs add-defs1 config.guess config.sub configure install.sh -chmod a+x ltconfig bin/info bin/info1 gcl-tk/gcltksrv.in gcl-tk/ngcltksrv -chmod a+x mp/gcclab o/egrep-def utils/replace xbin/* +chmod a+x bin/info bin/info1 gcl-tk/gcltksrv.in gcl-tk/ngcltksrv mp/gcclab +chmod a+x o/egrep-def utils/replace xbin/* %build %configure --enable-readline --enable-ansi --enable-dynsysgmp --enable-xgcl \ - --enable-tclconfig=%{_libdir} --enable-tkconfig=%{_libdir} \ - --disable-statsysbfd --enable-dynsysbfd + --enable-tclconfig=%{_libdir} --enable-tkconfig=%{_libdir} # FIXME: %%{?_smp_mflags} breaks the build make @@ -337,10 +335,18 @@ fi %files selinux %defattr(-,root,root,-) +%doc COPYING* %{_datadir}/selinux/packages/gcl %changelog +* Thu Dec 30 2010 Jerry James - 2.6.8-0.7.20101115cvs +- Update to 20101115 CVS snapshot for more bug fixes +- Drop upstreamed loginname patch +- Add man page patch +- Add license file to -selinux package +- Don't force dynamic BFD so we can use custreloc instead + * Tue Mar 23 2010 Jerry James - 2.6.8-0.7.20100201cvs - Update to 20100201 CVS snapshot for multiple bug fixes including, I hope, bz 573534 diff --git a/sources b/sources index 374414f..ee7e73f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -b9aa6574e8da1134ea5cbd9d1da7354a gcl-2.6.8.tar.xz +53364fda05131d988954248f89524b50 gcl-2.6.8.tar.xz b965d4ea561a9c3e019c65be69fcfb1e gcl-2.6.8-info.tar.xz