Changeset 332

Show
Ignore:
Timestamp:
01/30/06 15:38:00 (6 years ago)
Author:
conrad
Message:

remove autogenerated files, add autogen.sh

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • beatfish/trunk/aclocal.m4

    r331 r332  
    1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6 
    2  
    3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. 
    4 dnl This file is free software; the Free Software Foundation 
    5 dnl gives unlimited permission to copy and/or distribute it, 
    6 dnl with or without modifications, as long as this notice is preserved. 
    7  
    8 dnl This program is distributed in the hope that it will be useful, 
    9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without 
    10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
    11 dnl PARTICULAR PURPOSE. 
    12  
    13 #serial 3 
    14  
    15 dnl From Jim Meyering 
    16  
    17 dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared -- 
    18 dnl usually in <utime.h>. 
    19 dnl Some systems have utime.h but don't declare the struct anywhere. 
    20  
    21 AC_DEFUN(jm_CHECK_TYPE_STRUCT_UTIMBUF, 
    22 
    23   AC_CHECK_HEADERS(utime.h) 
    24   AC_REQUIRE([AC_HEADER_TIME]) 
    25   AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf, 
    26     [AC_TRY_COMPILE( 
    27       [ 
    28 #ifdef TIME_WITH_SYS_TIME 
    29 # include <sys/time.h> 
    30 # include <time.h> 
    31 #else 
    32 # ifdef HAVE_SYS_TIME_H 
    33 #  include <sys/time.h> 
    34 # else 
    35 #  include <time.h> 
    36 # endif 
    37 #endif 
    38 #ifdef HAVE_UTIME_H 
    39 # include <utime.h> 
    40 #endif 
    41       ], 
    42       [static struct utimbuf x; x.actime = x.modtime;], 
    43       fu_cv_sys_struct_utimbuf=yes, 
    44       fu_cv_sys_struct_utimbuf=no) 
    45     ]) 
    46  
    47   if test $fu_cv_sys_struct_utimbuf = yes; then 
    48     AC_DEFINE_UNQUOTED(HAVE_STRUCT_UTIMBUF, 1, 
    49 [Define if struct utimbuf is declared -- usually in <utime.h>. 
    50    Some systems have utime.h but don't declare the struct anywhere. ]) 
    51   fi 
    52 ]) 
    53  
    54 # lib-prefix.m4 serial 3 (gettext-0.13) 
    55 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. 
    56 dnl This file is free software, distributed under the terms of the GNU 
    57 dnl General Public License.  As a special exception to the GNU General 
    58 dnl Public License, this file may be distributed as part of a program 
    59 dnl that contains a configuration script generated by Autoconf, under 
    60 dnl the same distribution terms as the rest of that program. 
    61  
    62 dnl From Bruno Haible. 
    63  
    64 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and 
    65 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't 
    66 dnl require excessive bracketing. 
    67 ifdef([AC_HELP_STRING], 
    68 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], 
    69 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) 
    70  
    71 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed 
    72 dnl to access previously installed libraries. The basic assumption is that 
    73 dnl a user will want packages to use other packages he previously installed 
    74 dnl with the same --prefix option. 
    75 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate 
    76 dnl libraries, but is otherwise very convenient. 
    77 AC_DEFUN([AC_LIB_PREFIX], 
    78 
    79   AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) 
    80   AC_REQUIRE([AC_PROG_CC]) 
    81   AC_REQUIRE([AC_CANONICAL_HOST]) 
    82   AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
    83   dnl By default, look in $includedir and $libdir. 
    84   use_additional=yes 
    85   AC_LIB_WITH_FINAL_PREFIX([ 
    86     eval additional_includedir=\"$includedir\" 
    87     eval additional_libdir=\"$libdir\" 
    88   ]) 
    89   AC_LIB_ARG_WITH([lib-prefix], 
    90 [  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib 
    91   --without-lib-prefix    don't search for libraries in includedir and libdir], 
    92 
    93     if test "X$withval" = "Xno"; then 
    94       use_additional=no 
    95     else 
    96       if test "X$withval" = "X"; then 
    97         AC_LIB_WITH_FINAL_PREFIX([ 
    98           eval additional_includedir=\"$includedir\" 
    99           eval additional_libdir=\"$libdir\" 
    100         ]) 
    101       else 
    102         additional_includedir="$withval/include" 
    103         additional_libdir="$withval/lib" 
    104       fi 
    105     fi 
    106 ]) 
    107   if test $use_additional = yes; then 
    108     dnl Potentially add $additional_includedir to $CPPFLAGS. 
    109     dnl But don't add it 
    110     dnl   1. if it's the standard /usr/include, 
    111     dnl   2. if it's already present in $CPPFLAGS, 
    112     dnl   3. if it's /usr/local/include and we are using GCC on Linux, 
    113     dnl   4. if it doesn't exist as a directory. 
    114     if test "X$additional_includedir" != "X/usr/include"; then 
    115       haveit= 
    116       for x in $CPPFLAGS; do 
    117         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    118         if test "X$x" = "X-I$additional_includedir"; then 
    119           haveit=yes 
    120           break 
    121         fi 
    122       done 
    123       if test -z "$haveit"; then 
    124         if test "X$additional_includedir" = "X/usr/local/include"; then 
    125           if test -n "$GCC"; then 
    126             case $host_os in 
    127               linux*) haveit=yes;; 
    128             esac 
    129           fi 
    130         fi 
    131         if test -z "$haveit"; then 
    132           if test -d "$additional_includedir"; then 
    133             dnl Really add $additional_includedir to $CPPFLAGS. 
    134             CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" 
    135           fi 
    136         fi 
    137       fi 
    138     fi 
    139     dnl Potentially add $additional_libdir to $LDFLAGS. 
    140     dnl But don't add it 
    141     dnl   1. if it's the standard /usr/lib, 
    142     dnl   2. if it's already present in $LDFLAGS, 
    143     dnl   3. if it's /usr/local/lib and we are using GCC on Linux, 
    144     dnl   4. if it doesn't exist as a directory. 
    145     if test "X$additional_libdir" != "X/usr/lib"; then 
    146       haveit= 
    147       for x in $LDFLAGS; do 
    148         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    149         if test "X$x" = "X-L$additional_libdir"; then 
    150           haveit=yes 
    151           break 
    152         fi 
    153       done 
    154       if test -z "$haveit"; then 
    155         if test "X$additional_libdir" = "X/usr/local/lib"; then 
    156           if test -n "$GCC"; then 
    157             case $host_os in 
    158               linux*) haveit=yes;; 
    159             esac 
    160           fi 
    161         fi 
    162         if test -z "$haveit"; then 
    163           if test -d "$additional_libdir"; then 
    164             dnl Really add $additional_libdir to $LDFLAGS. 
    165             LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" 
    166           fi 
    167         fi 
    168       fi 
    169     fi 
    170   fi 
    171 ]) 
    172  
    173 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, 
    174 dnl acl_final_exec_prefix, containing the values to which $prefix and 
    175 dnl $exec_prefix will expand at the end of the configure script. 
    176 AC_DEFUN([AC_LIB_PREPARE_PREFIX], 
    177 
    178   dnl Unfortunately, prefix and exec_prefix get only finally determined 
    179   dnl at the end of configure. 
    180   if test "X$prefix" = "XNONE"; then 
    181     acl_final_prefix="$ac_default_prefix" 
    182   else 
    183     acl_final_prefix="$prefix" 
    184   fi 
    185   if test "X$exec_prefix" = "XNONE"; then 
    186     acl_final_exec_prefix='${prefix}' 
    187   else 
    188     acl_final_exec_prefix="$exec_prefix" 
    189   fi 
    190   acl_save_prefix="$prefix" 
    191   prefix="$acl_final_prefix" 
    192   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" 
    193   prefix="$acl_save_prefix" 
    194 ]) 
    195  
    196 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the 
    197 dnl variables prefix and exec_prefix bound to the values they will have 
    198 dnl at the end of the configure script. 
    199 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], 
    200 
    201   acl_save_prefix="$prefix" 
    202   prefix="$acl_final_prefix" 
    203   acl_save_exec_prefix="$exec_prefix" 
    204   exec_prefix="$acl_final_exec_prefix" 
    205   $1 
    206   exec_prefix="$acl_save_exec_prefix" 
    207   prefix="$acl_save_prefix" 
    208 ]) 
    209  
    210 # lib-link.m4 serial 4 (gettext-0.12) 
    211 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. 
    212 dnl This file is free software, distributed under the terms of the GNU 
    213 dnl General Public License.  As a special exception to the GNU General 
    214 dnl Public License, this file may be distributed as part of a program 
    215 dnl that contains a configuration script generated by Autoconf, under 
    216 dnl the same distribution terms as the rest of that program. 
    217  
    218 dnl From Bruno Haible. 
    219  
    220 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and 
    221 dnl the libraries corresponding to explicit and implicit dependencies. 
    222 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and 
    223 dnl augments the CPPFLAGS variable. 
    224 AC_DEFUN([AC_LIB_LINKFLAGS], 
    225 
    226   AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
    227   AC_REQUIRE([AC_LIB_RPATH]) 
    228   define([Name],[translit([$1],[./-], [___])]) 
    229   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 
    230                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 
    231   AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ 
    232     AC_LIB_LINKFLAGS_BODY([$1], [$2]) 
    233     ac_cv_lib[]Name[]_libs="$LIB[]NAME" 
    234     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" 
    235     ac_cv_lib[]Name[]_cppflags="$INC[]NAME" 
    236   ]) 
    237   LIB[]NAME="$ac_cv_lib[]Name[]_libs" 
    238   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" 
    239   INC[]NAME="$ac_cv_lib[]Name[]_cppflags" 
    240   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 
    241   AC_SUBST([LIB]NAME) 
    242   AC_SUBST([LTLIB]NAME) 
    243   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the 
    244   dnl results of this search when this library appears as a dependency. 
    245   HAVE_LIB[]NAME=yes 
    246   undefine([Name]) 
    247   undefine([NAME]) 
    248 ]) 
    249  
    250 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) 
    251 dnl searches for libname and the libraries corresponding to explicit and 
    252 dnl implicit dependencies, together with the specified include files and 
    253 dnl the ability to compile and link the specified testcode. If found, it 
    254 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and 
    255 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and 
    256 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs 
    257 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. 
    258 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], 
    259 
    260   AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 
    261   AC_REQUIRE([AC_LIB_RPATH]) 
    262   define([Name],[translit([$1],[./-], [___])]) 
    263   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 
    264                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 
    265  
    266   dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME 
    267   dnl accordingly. 
    268   AC_LIB_LINKFLAGS_BODY([$1], [$2]) 
    269  
    270   dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, 
    271   dnl because if the user has installed lib[]Name and not disabled its use 
    272   dnl via --without-lib[]Name-prefix, he wants to use it. 
    273   ac_save_CPPFLAGS="$CPPFLAGS" 
    274   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 
    275  
    276   AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ 
    277     ac_save_LIBS="$LIBS" 
    278     LIBS="$LIBS $LIB[]NAME" 
    279     AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) 
    280     LIBS="$ac_save_LIBS" 
    281   ]) 
    282   if test "$ac_cv_lib[]Name" = yes; then 
    283     HAVE_LIB[]NAME=yes 
    284     AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) 
    285     AC_MSG_CHECKING([how to link with lib[]$1]) 
    286     AC_MSG_RESULT([$LIB[]NAME]) 
    287   else 
    288     HAVE_LIB[]NAME=no 
    289     dnl If $LIB[]NAME didn't lead to a usable library, we don't need 
    290     dnl $INC[]NAME either. 
    291     CPPFLAGS="$ac_save_CPPFLAGS" 
    292     LIB[]NAME= 
    293     LTLIB[]NAME= 
    294   fi 
    295   AC_SUBST([HAVE_LIB]NAME) 
    296   AC_SUBST([LIB]NAME) 
    297   AC_SUBST([LTLIB]NAME) 
    298   undefine([Name]) 
    299   undefine([NAME]) 
    300 ]) 
    301  
    302 dnl Determine the platform dependent parameters needed to use rpath: 
    303 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, 
    304 dnl hardcode_direct, hardcode_minus_L. 
    305 AC_DEFUN([AC_LIB_RPATH], 
    306 
    307   AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS 
    308   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld 
    309   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host 
    310   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir 
    311   AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ 
    312     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ 
    313     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh 
    314     . ./conftest.sh 
    315     rm -f ./conftest.sh 
    316     acl_cv_rpath=done 
    317   ]) 
    318   wl="$acl_cv_wl" 
    319   libext="$acl_cv_libext" 
    320   shlibext="$acl_cv_shlibext" 
    321   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" 
    322   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" 
    323   hardcode_direct="$acl_cv_hardcode_direct" 
    324   hardcode_minus_L="$acl_cv_hardcode_minus_L" 
    325   dnl Determine whether the user wants rpath handling at all. 
    326   AC_ARG_ENABLE(rpath, 
    327     [  --disable-rpath         do not hardcode runtime library paths], 
    328     :, enable_rpath=yes) 
    329 ]) 
    330  
    331 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and 
    332 dnl the libraries corresponding to explicit and implicit dependencies. 
    333 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. 
    334 AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 
    335 
    336   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 
    337                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 
    338   dnl By default, look in $includedir and $libdir. 
    339   use_additional=yes 
    340   AC_LIB_WITH_FINAL_PREFIX([ 
    341     eval additional_includedir=\"$includedir\" 
    342     eval additional_libdir=\"$libdir\" 
    343   ]) 
    344   AC_LIB_ARG_WITH([lib$1-prefix], 
    345 [  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib 
    346   --without-lib$1-prefix     don't search for lib$1 in includedir and libdir], 
    347 
    348     if test "X$withval" = "Xno"; then 
    349       use_additional=no 
    350     else 
    351       if test "X$withval" = "X"; then 
    352         AC_LIB_WITH_FINAL_PREFIX([ 
    353           eval additional_includedir=\"$includedir\" 
    354           eval additional_libdir=\"$libdir\" 
    355         ]) 
    356       else 
    357         additional_includedir="$withval/include" 
    358         additional_libdir="$withval/lib" 
    359       fi 
    360     fi 
    361 ]) 
    362   dnl Search the library and its dependencies in $additional_libdir and 
    363   dnl $LDFLAGS. Using breadth-first-seach. 
    364   LIB[]NAME= 
    365   LTLIB[]NAME= 
    366   INC[]NAME= 
    367   rpathdirs= 
    368   ltrpathdirs= 
    369   names_already_handled= 
    370   names_next_round='$1 $2' 
    371   while test -n "$names_next_round"; do 
    372     names_this_round="$names_next_round" 
    373     names_next_round= 
    374     for name in $names_this_round; do 
    375       already_handled= 
    376       for n in $names_already_handled; do 
    377         if test "$n" = "$name"; then 
    378           already_handled=yes 
    379           break 
    380         fi 
    381       done 
    382       if test -z "$already_handled"; then 
    383         names_already_handled="$names_already_handled $name" 
    384         dnl See if it was already located by an earlier AC_LIB_LINKFLAGS 
    385         dnl or AC_LIB_HAVE_LINKFLAGS call. 
    386         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` 
    387         eval value=\"\$HAVE_LIB$uppername\" 
    388         if test -n "$value"; then 
    389           if test "$value" = yes; then 
    390             eval value=\"\$LIB$uppername\" 
    391             test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" 
    392             eval value=\"\$LTLIB$uppername\" 
    393             test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" 
    394           else 
    395             dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined 
    396             dnl that this library doesn't exist. So just drop it. 
    397             : 
    398           fi 
    399         else 
    400           dnl Search the library lib$name in $additional_libdir and $LDFLAGS 
    401           dnl and the already constructed $LIBNAME/$LTLIBNAME. 
    402           found_dir= 
    403           found_la= 
    404           found_so= 
    405           found_a= 
    406           if test $use_additional = yes; then 
    407             if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then 
    408               found_dir="$additional_libdir" 
    409               found_so="$additional_libdir/lib$name.$shlibext" 
    410               if test -f "$additional_libdir/lib$name.la"; then 
    411                 found_la="$additional_libdir/lib$name.la" 
    412               fi 
    413             else 
    414               if test -f "$additional_libdir/lib$name.$libext"; then 
    415                 found_dir="$additional_libdir" 
    416                 found_a="$additional_libdir/lib$name.$libext" 
    417                 if test -f "$additional_libdir/lib$name.la"; then 
    418                   found_la="$additional_libdir/lib$name.la" 
    419                 fi 
    420               fi 
    421             fi 
    422           fi 
    423           if test "X$found_dir" = "X"; then 
    424             for x in $LDFLAGS $LTLIB[]NAME; do 
    425               AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    426               case "$x" in 
    427                 -L*) 
    428                   dir=`echo "X$x" | sed -e 's/^X-L//'` 
    429                   if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then 
    430                     found_dir="$dir" 
    431                     found_so="$dir/lib$name.$shlibext" 
    432                     if test -f "$dir/lib$name.la"; then 
    433                       found_la="$dir/lib$name.la" 
    434                     fi 
    435                   else 
    436                     if test -f "$dir/lib$name.$libext"; then 
    437                       found_dir="$dir" 
    438                       found_a="$dir/lib$name.$libext" 
    439                       if test -f "$dir/lib$name.la"; then 
    440                         found_la="$dir/lib$name.la" 
    441                       fi 
    442                     fi 
    443                   fi 
    444                   ;; 
    445               esac 
    446               if test "X$found_dir" != "X"; then 
    447                 break 
    448               fi 
    449             done 
    450           fi 
    451           if test "X$found_dir" != "X"; then 
    452             dnl Found the library. 
    453             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" 
    454             if test "X$found_so" != "X"; then 
    455               dnl Linking with a shared library. We attempt to hardcode its 
    456               dnl directory into the executable's runpath, unless it's the 
    457               dnl standard /usr/lib. 
    458               if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then 
    459                 dnl No hardcoding is needed. 
    460                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 
    461               else 
    462                 dnl Use an explicit option to hardcode DIR into the resulting 
    463                 dnl binary. 
    464                 dnl Potentially add DIR to ltrpathdirs. 
    465                 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 
    466                 haveit= 
    467                 for x in $ltrpathdirs; do 
    468                   if test "X$x" = "X$found_dir"; then 
    469                     haveit=yes 
    470                     break 
    471                   fi 
    472                 done 
    473                 if test -z "$haveit"; then 
    474                   ltrpathdirs="$ltrpathdirs $found_dir" 
    475                 fi 
    476                 dnl The hardcoding into $LIBNAME is system dependent. 
    477                 if test "$hardcode_direct" = yes; then 
    478                   dnl Using DIR/libNAME.so during linking hardcodes DIR into the 
    479                   dnl resulting binary. 
    480                   LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 
    481                 else 
    482                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then 
    483                     dnl Use an explicit option to hardcode DIR into the resulting 
    484                     dnl binary. 
    485                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 
    486                     dnl Potentially add DIR to rpathdirs. 
    487                     dnl The rpathdirs will be appended to $LIBNAME at the end. 
    488                     haveit= 
    489                     for x in $rpathdirs; do 
    490                       if test "X$x" = "X$found_dir"; then 
    491                         haveit=yes 
    492                         break 
    493                       fi 
    494                     done 
    495                     if test -z "$haveit"; then 
    496                       rpathdirs="$rpathdirs $found_dir" 
    497                     fi 
    498                   else 
    499                     dnl Rely on "-L$found_dir". 
    500                     dnl But don't add it if it's already contained in the LDFLAGS 
    501                     dnl or the already constructed $LIBNAME 
    502                     haveit= 
    503                     for x in $LDFLAGS $LIB[]NAME; do 
    504                       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    505                       if test "X$x" = "X-L$found_dir"; then 
    506                         haveit=yes 
    507                         break 
    508                       fi 
    509                     done 
    510                     if test -z "$haveit"; then 
    511                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" 
    512                     fi 
    513                     if test "$hardcode_minus_L" != no; then 
    514                       dnl FIXME: Not sure whether we should use 
    515                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 
    516                       dnl here. 
    517                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" 
    518                     else 
    519                       dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH 
    520                       dnl here, because this doesn't fit in flags passed to the 
    521                       dnl compiler. So give up. No hardcoding. This affects only 
    522                       dnl very old systems. 
    523                       dnl FIXME: Not sure whether we should use 
    524                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" 
    525                       dnl here. 
    526                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 
    527                     fi 
    528                   fi 
    529                 fi 
    530               fi 
    531             else 
    532               if test "X$found_a" != "X"; then 
    533                 dnl Linking with a static library. 
    534                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" 
    535               else 
    536                 dnl We shouldn't come here, but anyway it's good to have a 
    537                 dnl fallback. 
    538                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" 
    539               fi 
    540             fi 
    541             dnl Assume the include files are nearby. 
    542             additional_includedir= 
    543             case "$found_dir" in 
    544               */lib | */lib/) 
    545                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` 
    546                 additional_includedir="$basedir/include" 
    547                 ;; 
    548             esac 
    549             if test "X$additional_includedir" != "X"; then 
    550               dnl Potentially add $additional_includedir to $INCNAME. 
    551               dnl But don't add it 
    552               dnl   1. if it's the standard /usr/include, 
    553               dnl   2. if it's /usr/local/include and we are using GCC on Linux, 
    554               dnl   3. if it's already present in $CPPFLAGS or the already 
    555               dnl      constructed $INCNAME, 
    556               dnl   4. if it doesn't exist as a directory. 
    557               if test "X$additional_includedir" != "X/usr/include"; then 
    558                 haveit= 
    559                 if test "X$additional_includedir" = "X/usr/local/include"; then 
    560                   if test -n "$GCC"; then 
    561                     case $host_os in 
    562                       linux*) haveit=yes;; 
    563                     esac 
    564                   fi 
    565                 fi 
    566                 if test -z "$haveit"; then 
    567                   for x in $CPPFLAGS $INC[]NAME; do 
    568                     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    569                     if test "X$x" = "X-I$additional_includedir"; then 
    570                       haveit=yes 
    571                       break 
    572                     fi 
    573                   done 
    574                   if test -z "$haveit"; then 
    575                     if test -d "$additional_includedir"; then 
    576                       dnl Really add $additional_includedir to $INCNAME. 
    577                       INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" 
    578                     fi 
    579                   fi 
    580                 fi 
    581               fi 
    582             fi 
    583             dnl Look for dependencies. 
    584             if test -n "$found_la"; then 
    585               dnl Read the .la file. It defines the variables 
    586               dnl dlname, library_names, old_library, dependency_libs, current, 
    587               dnl age, revision, installed, dlopen, dlpreopen, libdir. 
    588               save_libdir="$libdir" 
    589               case "$found_la" in 
    590                 */* | *\\*) . "$found_la" ;; 
    591                 *) . "./$found_la" ;; 
    592               esac 
    593               libdir="$save_libdir" 
    594               dnl We use only dependency_libs. 
    595               for dep in $dependency_libs; do 
    596                 case "$dep" in 
    597                   -L*) 
    598                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` 
    599                     dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. 
    600                     dnl But don't add it 
    601                     dnl   1. if it's the standard /usr/lib, 
    602                     dnl   2. if it's /usr/local/lib and we are using GCC on Linux, 
    603                     dnl   3. if it's already present in $LDFLAGS or the already 
    604                     dnl      constructed $LIBNAME, 
    605                     dnl   4. if it doesn't exist as a directory. 
    606                     if test "X$additional_libdir" != "X/usr/lib"; then 
    607                       haveit= 
    608                       if test "X$additional_libdir" = "X/usr/local/lib"; then 
    609                         if test -n "$GCC"; then 
    610                           case $host_os in 
    611                             linux*) haveit=yes;; 
    612                           esac 
    613                         fi 
    614                       fi 
    615                       if test -z "$haveit"; then 
    616                         haveit= 
    617                         for x in $LDFLAGS $LIB[]NAME; do 
    618                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    619                           if test "X$x" = "X-L$additional_libdir"; then 
    620                             haveit=yes 
    621                             break 
    622                           fi 
    623                         done 
    624                         if test -z "$haveit"; then 
    625                           if test -d "$additional_libdir"; then 
    626                             dnl Really add $additional_libdir to $LIBNAME. 
    627                             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" 
    628                           fi 
    629                         fi 
    630                         haveit= 
    631                         for x in $LDFLAGS $LTLIB[]NAME; do 
    632                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    633                           if test "X$x" = "X-L$additional_libdir"; then 
    634                             haveit=yes 
    635                             break 
    636                           fi 
    637                         done 
    638                         if test -z "$haveit"; then 
    639                           if test -d "$additional_libdir"; then 
    640                             dnl Really add $additional_libdir to $LTLIBNAME. 
    641                             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" 
    642                           fi 
    643                         fi 
    644                       fi 
    645                     fi 
    646                     ;; 
    647                   -R*) 
    648                     dir=`echo "X$dep" | sed -e 's/^X-R//'` 
    649                     if test "$enable_rpath" != no; then 
    650                       dnl Potentially add DIR to rpathdirs. 
    651                       dnl The rpathdirs will be appended to $LIBNAME at the end. 
    652                       haveit= 
    653                       for x in $rpathdirs; do 
    654                         if test "X$x" = "X$dir"; then 
    655                           haveit=yes 
    656                           break 
    657                         fi 
    658                       done 
    659                       if test -z "$haveit"; then 
    660                         rpathdirs="$rpathdirs $dir" 
    661                       fi 
    662                       dnl Potentially add DIR to ltrpathdirs. 
    663                       dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. 
    664                       haveit= 
    665                       for x in $ltrpathdirs; do 
    666                         if test "X$x" = "X$dir"; then 
    667                           haveit=yes 
    668                           break 
    669                         fi 
    670                       done 
    671                       if test -z "$haveit"; then 
    672                         ltrpathdirs="$ltrpathdirs $dir" 
    673                       fi 
    674                     fi 
    675                     ;; 
    676                   -l*) 
    677                     dnl Handle this in the next round. 
    678                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` 
    679                     ;; 
    680                   *.la) 
    681                     dnl Handle this in the next round. Throw away the .la's 
    682                     dnl directory; it is already contained in a preceding -L 
    683                     dnl option. 
    684                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` 
    685                     ;; 
    686                   *) 
    687                     dnl Most likely an immediate library name. 
    688                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" 
    689                     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" 
    690                     ;; 
    691                 esac 
    692               done 
    693             fi 
    694           else 
    695             dnl Didn't find the library; assume it is in the system directories 
    696             dnl known to the linker and runtime loader. (All the system 
    697             dnl directories known to the linker should also be known to the 
    698             dnl runtime loader, otherwise the system is severely misconfigured.) 
    699             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" 
    700             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" 
    701           fi 
    702         fi 
    703       fi 
    704     done 
    705   done 
    706   if test "X$rpathdirs" != "X"; then 
    707     if test -n "$hardcode_libdir_separator"; then 
    708       dnl Weird platform: only the last -rpath option counts, the user must 
    709       dnl pass all path elements in one option. We can arrange that for a 
    710       dnl single library, but not when more than one $LIBNAMEs are used. 
    711       alldirs= 
    712       for found_dir in $rpathdirs; do 
    713         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" 
    714       done 
    715       dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. 
    716       acl_save_libdir="$libdir" 
    717       libdir="$alldirs" 
    718       eval flag=\"$hardcode_libdir_flag_spec\" 
    719       libdir="$acl_save_libdir" 
    720       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 
    721     else 
    722       dnl The -rpath options are cumulative. 
    723       for found_dir in $rpathdirs; do 
    724         acl_save_libdir="$libdir" 
    725         libdir="$found_dir" 
    726         eval flag=\"$hardcode_libdir_flag_spec\" 
    727         libdir="$acl_save_libdir" 
    728         LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" 
    729       done 
    730     fi 
    731   fi 
    732   if test "X$ltrpathdirs" != "X"; then 
    733     dnl When using libtool, the option that works for both libraries and 
    734     dnl executables is -R. The -R options are cumulative. 
    735     for found_dir in $ltrpathdirs; do 
    736       LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" 
    737     done 
    738   fi 
    739 ]) 
    740  
    741 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, 
    742 dnl unless already present in VAR. 
    743 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes 
    744 dnl contains two or three consecutive elements that belong together. 
    745 AC_DEFUN([AC_LIB_APPENDTOVAR], 
    746 
    747   for element in [$2]; do 
    748     haveit= 
    749     for x in $[$1]; do 
    750       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) 
    751       if test "X$x" = "X$element"; then 
    752         haveit=yes 
    753         break 
    754       fi 
    755     done 
    756     if test -z "$haveit"; then 
    757       [$1]="${[$1]}${[$1]:+ }$element" 
    758     fi 
    759   done 
    760 ]) 
    761  
    762 # lib-ld.m4 serial 3 (gettext-0.13) 
    763 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. 
    764 dnl This file is free software, distributed under the terms of the GNU 
    765 dnl General Public License.  As a special exception to the GNU General 
    766 dnl Public License, this file may be distributed as part of a program 
    767 dnl that contains a configuration script generated by Autoconf, under 
    768 dnl the same distribution terms as the rest of that program. 
    769  
    770 dnl Subroutines of libtool.m4, 
    771 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision 
    772 dnl with libtool.m4. 
    773  
    774 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. 
    775 AC_DEFUN([AC_LIB_PROG_LD_GNU], 
    776 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, 
    777 [# I'd rather use --version here, but apparently some GNU ld's only accept -v. 
    778 case `$LD -v 2>&1 </dev/null` in 
    779 *GNU* | *'with BFD'*) 
    780   acl_cv_prog_gnu_ld=yes ;; 
    781 *) 
    782   acl_cv_prog_gnu_ld=no ;; 
    783 esac]) 
    784 with_gnu_ld=$acl_cv_prog_gnu_ld 
    785 ]) 
    786  
    787 dnl From libtool-1.4. Sets the variable LD. 
    788 AC_DEFUN([AC_LIB_PROG_LD], 
    789 [AC_ARG_WITH(gnu-ld, 
    790 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]], 
    791 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) 
    792 AC_REQUIRE([AC_PROG_CC])dnl 
    793 AC_REQUIRE([AC_CANONICAL_HOST])dnl 
    794 # Prepare PATH_SEPARATOR. 
    795 # The user is always right. 
    796 if test "${PATH_SEPARATOR+set}" != set; then 
    797   echo "#! /bin/sh" >conf$$.sh 
    798   echo  "exit 0"   >>conf$$.sh 
    799   chmod +x conf$$.sh 
    800   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 
    801     PATH_SEPARATOR=';' 
    802   else 
    803     PATH_SEPARATOR=: 
    804   fi 
    805   rm -f conf$$.sh 
    806 fi 
    807 ac_prog=ld 
    808 if test "$GCC" = yes; then 
    809   # Check if gcc -print-prog-name=ld gives a path. 
    810   AC_MSG_CHECKING([for ld used by GCC]) 
    811   case $host in 
    812   *-*-mingw*) 
    813     # gcc leaves a trailing carriage return which upsets mingw 
    814     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 
    815   *) 
    816     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 
    817   esac 
    818   case $ac_prog in 
    819     # Accept absolute paths. 
    820     [[\\/]* | [A-Za-z]:[\\/]*)] 
    821       [re_direlt='/[^/][^/]*/\.\./'] 
    822       # Canonicalize the path of ld 
    823       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 
    824       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 
    825         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 
    826       done 
    827       test -z "$LD" && LD="$ac_prog" 
    828       ;; 
    829   "") 
    830     # If it fails, then pretend we aren't using GCC. 
    831     ac_prog=ld 
    832     ;; 
    833   *) 
    834     # If it is relative, then search for the first ld in PATH. 
    835     with_gnu_ld=unknown 
    836     ;; 
    837   esac 
    838 elif test "$with_gnu_ld" = yes; then 
    839   AC_MSG_CHECKING([for GNU ld]) 
    840 else 
    841   AC_MSG_CHECKING([for non-GNU ld]) 
    842 fi 
    843 AC_CACHE_VAL(acl_cv_path_LD, 
    844 [if test -z "$LD"; then 
    845   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 
    846   for ac_dir in $PATH; do 
    847     test -z "$ac_dir" && ac_dir=. 
    848     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 
    849       acl_cv_path_LD="$ac_dir/$ac_prog" 
    850       # Check to see if the program is GNU ld.  I'd rather use --version, 
    851       # but apparently some GNU ld's only accept -v. 
    852       # Break only if it was the GNU/non-GNU ld that we prefer. 
    853       case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in 
    854       *GNU* | *'with BFD'*) 
    855         test "$with_gnu_ld" != no && break ;; 
    856       *) 
    857         test "$with_gnu_ld" != yes && break ;; 
    858       esac 
    859     fi 
    860   done 
    861   IFS="$ac_save_ifs" 
    862 else 
    863   acl_cv_path_LD="$LD" # Let the user override the test with a path. 
    864 fi]) 
    865 LD="$acl_cv_path_LD" 
    866 if test -n "$LD"; then 
    867   AC_MSG_RESULT($LD) 
    868 else 
    869   AC_MSG_RESULT(no) 
    870 fi 
    871 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 
    872 AC_LIB_PROG_LD_GNU 
    873 ]) 
    874  
    875 # Do all the work for Automake.  This macro actually does too much -- 
    876 # some checks are only needed if your package does certain things. 
    877 # But this isn't really a big deal. 
    878  
    879 # serial 1 
    880  
    881 dnl Usage: 
    882 dnl AM_INIT_AUTOMAKE(package,version, [no-define]) 
    883  
    884 AC_DEFUN([AM_INIT_AUTOMAKE], 
    885 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 
    886 AC_REQUIRE([AC_PROG_INSTALL]) 
    887 PACKAGE=[$1] 
    888 AC_SUBST(PACKAGE) 
    889 VERSION=[$2] 
    890 AC_SUBST(VERSION) 
    891 dnl test to see if srcdir already configured 
    892 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then 
    893   AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 
    894 fi 
    895 ifelse([$3],, 
    896 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 
    897 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) 
    898 AC_REQUIRE([AM_SANITY_CHECK]) 
    899 AC_REQUIRE([AC_ARG_PROGRAM]) 
    900 dnl FIXME This is truly gross. 
    901 missing_dir=`cd $ac_aux_dir && pwd` 
    902 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) 
    903 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) 
    904 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) 
    905 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) 
    906 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) 
    907 AC_REQUIRE([AC_PROG_MAKE_SET])]) 
    908  
    909 # Copyright 2002  Free Software Foundation, Inc. 
    910  
    911 # This program is free software; you can redistribute it and/or modify 
    912 # it under the terms of the GNU General Public License as published by 
    913 # the Free Software Foundation; either version 2, or (at your option) 
    914 # any later version. 
    915  
    916 # This program is distributed in the hope that it will be useful, 
    917 # but WITHOUT ANY WARRANTY; without even the implied warranty of 
    918 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    919 # GNU General Public License for more details. 
    920  
    921 # You should have received a copy of the GNU General Public License 
    922 # along with this program; if not, write to the Free Software 
    923 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
    924  
    925 # AM_AUTOMAKE_VERSION(VERSION) 
    926 # ---------------------------- 
    927 # Automake X.Y traces this macro to ensure aclocal.m4 has been 
    928 # generated from the m4 files accompanying Automake X.Y. 
    929 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) 
    930  
    931 # AM_SET_CURRENT_AUTOMAKE_VERSION 
    932 # ------------------------------- 
    933 # Call AM_AUTOMAKE_VERSION so it can be traced. 
    934 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 
    935 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 
    936          [AM_AUTOMAKE_VERSION([1.4-p6])]) 
    937  
    938 
    939 # Check to make sure that the build environment is sane. 
    940 
    941  
    942 AC_DEFUN([AM_SANITY_CHECK], 
    943 [AC_MSG_CHECKING([whether build environment is sane]) 
    944 # Just in case 
    945 sleep 1 
    946 echo timestamp > conftestfile 
    947 # Do `set' in a subshell so we don't clobber the current shell's 
    948 # arguments.  Must try -L first in case configure is actually a 
    949 # symlink; some systems play weird games with the mod time of symlinks 
    950 # (eg FreeBSD returns the mod time of the symlink's containing 
    951 # directory). 
    952 if ( 
    953    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` 
    954    if test "[$]*" = "X"; then 
    955       # -L didn't work. 
    956       set X `ls -t $srcdir/configure conftestfile` 
    957    fi 
    958    if test "[$]*" != "X $srcdir/configure conftestfile" \ 
    959       && test "[$]*" != "X conftestfile $srcdir/configure"; then 
    960  
    961       # If neither matched, then we have a broken ls.  This can happen 
    962       # if, for instance, CONFIG_SHELL is bash and it inherits a 
    963       # broken ls alias from the environment.  This has actually 
    964       # happened.  Such a system could not be considered "sane". 
    965       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken 
    966 alias in your environment]) 
    967    fi 
    968  
    969    test "[$]2" = conftestfile 
    970    ) 
    971 then 
    972    # Ok. 
    973    : 
    974 else 
    975    AC_MSG_ERROR([newly created file is older than distributed files! 
    976 Check your system clock]) 
    977 fi 
    978 rm -f conftest* 
    979 AC_MSG_RESULT(yes)]) 
    980  
    981 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) 
    982 dnl The program must properly implement --version. 
    983 AC_DEFUN([AM_MISSING_PROG], 
    984 [AC_MSG_CHECKING(for working $2) 
    985 # Run test in a subshell; some versions of sh will print an error if 
    986 # an executable is not found, even if stderr is redirected. 
    987 # Redirect stdin to placate older versions of autoconf.  Sigh. 
    988 if ($2 --version) < /dev/null > /dev/null 2>&1; then 
    989    $1=$2 
    990    AC_MSG_RESULT(found) 
    991 else 
    992    $1="$3/missing $2" 
    993    AC_MSG_RESULT(missing) 
    994 fi 
    995 AC_SUBST($1)]) 
    996  
    997 # Like AC_CONFIG_HEADER, but automatically create stamp file. 
    998  
    999 AC_DEFUN([AM_CONFIG_HEADER], 
    1000 [AC_PREREQ([2.12]) 
    1001 AC_CONFIG_HEADER([$1]) 
    1002 dnl When config.status generates a header, we must update the stamp-h file. 
    1003 dnl This file resides in the same directory as the config header 
    1004 dnl that is generated.  We must strip everything past the first ":", 
    1005 dnl and everything past the last "/". 
    1006 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl 
    1007 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, 
    1008 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, 
    1009 <<am_indx=1 
    1010 for am_file in <<$1>>; do 
    1011   case " <<$>>CONFIG_HEADERS " in 
    1012   *" <<$>>am_file "*<<)>> 
    1013     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx 
    1014     ;; 
    1015   esac 
    1016   am_indx=`expr "<<$>>am_indx" + 1` 
    1017 done<<>>dnl>>) 
    1018 changequote([,]))]) 
     1# generated automatically by aclocal 1.8.5 -*- Autoconf -*- 
     2 
     3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 
     4# Free Software Foundation, Inc. 
     5# This file is free software; the Free Software Foundation 
     6# gives unlimited permission to copy and/or distribute it, 
     7# with or without modifications, as long as this notice is preserved. 
     8 
     9# This program is distributed in the hope that it will be useful, 
     10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 
     11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
     12# PARTICULAR PURPOSE. 
    101913 
    102014 
     
    107670 
    107771 
     72#                                                        -*- Autoconf -*- 
     73# Copyright (C) 2002, 2003  Free Software Foundation, Inc. 
     74# Generated from amversion.in; do not edit by hand. 
     75 
     76# This program is free software; you can redistribute it and/or modify 
     77# it under the terms of the GNU General Public License as published by 
     78# the Free Software Foundation; either version 2, or (at your option) 
     79# any later version. 
     80 
     81# This program is distributed in the hope that it will be useful, 
     82# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     83# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     84# GNU General Public License for more details. 
     85 
     86# You should have received a copy of the GNU General Public License 
     87# along with this program; if not, write to the Free Software 
     88# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     89 
     90# AM_AUTOMAKE_VERSION(VERSION) 
     91# ---------------------------- 
     92# Automake X.Y traces this macro to ensure aclocal.m4 has been 
     93# generated from the m4 files accompanying Automake X.Y. 
     94AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) 
     95 
     96# AM_SET_CURRENT_AUTOMAKE_VERSION 
     97# ------------------------------- 
     98# Call AM_AUTOMAKE_VERSION so it can be traced. 
     99# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 
     100AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 
     101         [AM_AUTOMAKE_VERSION([1.8.5])]) 
     102 
     103# AM_AUX_DIR_EXPAND 
     104 
     105# Copyright (C) 2001, 2003 Free Software Foundation, Inc. 
     106 
     107# This program is free software; you can redistribute it and/or modify 
     108# it under the terms of the GNU General Public License as published by 
     109# the Free Software Foundation; either version 2, or (at your option) 
     110# any later version. 
     111 
     112# This program is distributed in the hope that it will be useful, 
     113# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     114# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     115# GNU General Public License for more details. 
     116 
     117# You should have received a copy of the GNU General Public License 
     118# along with this program; if not, write to the Free Software 
     119# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     120# 02111-1307, USA. 
     121 
     122# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 
     123# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to 
     124# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 
     125# 
     126# Of course, Automake must honor this variable whenever it calls a 
     127# tool from the auxiliary directory.  The problem is that $srcdir (and 
     128# therefore $ac_aux_dir as well) can be either absolute or relative, 
     129# depending on how configure is run.  This is pretty annoying, since 
     130# it makes $ac_aux_dir quite unusable in subdirectories: in the top 
     131# source directory, any form will work fine, but in subdirectories a 
     132# relative path needs to be adjusted first. 
     133# 
     134# $ac_aux_dir/missing 
     135#    fails when called from a subdirectory if $ac_aux_dir is relative 
     136# $top_srcdir/$ac_aux_dir/missing 
     137#    fails if $ac_aux_dir is absolute, 
     138#    fails when called from a subdirectory in a VPATH build with 
     139#          a relative $ac_aux_dir 
     140# 
     141# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 
     142# are both prefixed by $srcdir.  In an in-source build this is usually 
     143# harmless because $srcdir is `.', but things will broke when you 
     144# start a VPATH build or use an absolute $srcdir. 
     145# 
     146# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 
     147# iff we strip the leading $srcdir from $ac_aux_dir.  That would be: 
     148#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 
     149# and then we would define $MISSING as 
     150#   MISSING="\${SHELL} $am_aux_dir/missing" 
     151# This will work as long as MISSING is not called from configure, because 
     152# unfortunately $(top_srcdir) has no meaning in configure. 
     153# However there are other variables, like CC, which are often used in 
     154# configure, and could therefore not use this "fixed" $ac_aux_dir. 
     155# 
     156# Another solution, used here, is to always expand $ac_aux_dir to an 
     157# absolute PATH.  The drawback is that using absolute paths prevent a 
     158# configured tree to be moved without reconfiguration. 
     159 
     160AC_DEFUN([AM_AUX_DIR_EXPAND], 
     161[dnl Rely on autoconf to set up CDPATH properly. 
     162AC_PREREQ([2.50])dnl 
     163# expand $ac_aux_dir to an absolute path 
     164am_aux_dir=`cd $ac_aux_dir && pwd` 
     165]) 
     166 
     167# AM_CONDITIONAL                                              -*- Autoconf -*- 
     168 
     169# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. 
     170 
     171# This program is free software; you can redistribute it and/or modify 
     172# it under the terms of the GNU General Public License as published by 
     173# the Free Software Foundation; either version 2, or (at your option) 
     174# any later version. 
     175 
     176# This program is distributed in the hope that it will be useful, 
     177# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     178# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     179# GNU General Public License for more details. 
     180 
     181# You should have received a copy of the GNU General Public License 
     182# along with this program; if not, write to the Free Software 
     183# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     184# 02111-1307, USA. 
     185 
     186# serial 6 
     187 
     188# AM_CONDITIONAL(NAME, SHELL-CONDITION) 
     189# ------------------------------------- 
     190# Define a conditional. 
     191AC_DEFUN([AM_CONDITIONAL], 
     192[AC_PREREQ(2.52)dnl 
     193 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])], 
     194        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 
     195AC_SUBST([$1_TRUE]) 
     196AC_SUBST([$1_FALSE]) 
     197if $2; then 
     198  $1_TRUE= 
     199  $1_FALSE='#' 
     200else 
     201  $1_TRUE='#' 
     202  $1_FALSE= 
     203fi 
     204AC_CONFIG_COMMANDS_PRE( 
     205[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 
     206  AC_MSG_ERROR([conditional "$1" was never defined. 
     207Usually this means the macro was only invoked conditionally.]) 
     208fi])]) 
     209 
     210# serial 7                                              -*- Autoconf -*- 
     211 
     212# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 
     213# Free Software Foundation, Inc. 
     214 
     215# This program is free software; you can redistribute it and/or modify 
     216# it under the terms of the GNU General Public License as published by 
     217# the Free Software Foundation; either version 2, or (at your option) 
     218# any later version. 
     219 
     220# This program is distributed in the hope that it will be useful, 
     221# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     222# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     223# GNU General Public License for more details. 
     224 
     225# You should have received a copy of the GNU General Public License 
     226# along with this program; if not, write to the Free Software 
     227# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     228# 02111-1307, USA. 
     229 
     230 
     231# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 
     232# written in clear, in which case automake, when reading aclocal.m4, 
     233# will think it sees a *use*, and therefore will trigger all it's 
     234# C support machinery.  Also note that it means that autoscan, seeing 
     235# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 
     236 
     237 
     238 
     239# _AM_DEPENDENCIES(NAME) 
     240# ---------------------- 
     241# See how the compiler implements dependency checking. 
     242# NAME is "CC", "CXX", "GCJ", or "OBJC". 
     243# We try a few techniques and use that to set a single cache variable. 
     244# 
     245# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 
     246# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 
     247# dependency, and given that the user is not expected to run this macro, 
     248# just rely on AC_PROG_CC. 
     249AC_DEFUN([_AM_DEPENDENCIES], 
     250[AC_REQUIRE([AM_SET_DEPDIR])dnl 
     251AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 
     252AC_REQUIRE([AM_MAKE_INCLUDE])dnl 
     253AC_REQUIRE([AM_DEP_TRACK])dnl 
     254 
     255ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=], 
     256       [$1], CXX,  [depcc="$CXX"  am_compiler_list=], 
     257       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 
     258       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'], 
     259                   [depcc="$$1"   am_compiler_list=]) 
     260 
     261AC_CACHE_CHECK([dependency style of $depcc], 
     262               [am_cv_$1_dependencies_compiler_type], 
     263[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 
     264  # We make a subdir and do the tests there.  Otherwise we can end up 
     265  # making bogus files that we don't know about and never remove.  For 
     266  # instance it was reported that on HP-UX the gcc test will end up 
     267  # making a dummy file named `D' -- because `-MD' means `put the output 
     268  # in D'. 
     269  mkdir conftest.dir 
     270  # Copy depcomp to subdir because otherwise we won't find it if we're 
     271  # using a relative directory. 
     272  cp "$am_depcomp" conftest.dir 
     273  cd conftest.dir 
     274  # We will build objects and dependencies in a subdirectory because 
     275  # it helps to detect inapplicable dependency modes.  For instance 
     276  # both Tru64's cc and ICC support -MD to output dependencies as a 
     277  # side effect of compilation, but ICC will put the dependencies in 
     278  # the current directory while Tru64 will put them in the object 
     279  # directory. 
     280  mkdir sub 
     281 
     282  am_cv_$1_dependencies_compiler_type=none 
     283  if test "$am_compiler_list" = ""; then 
     284     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 
     285  fi 
     286  for depmode in $am_compiler_list; do 
     287    # Setup a source with many dependencies, because some compilers 
     288    # like to wrap large dependency lists on column 80 (with \), and 
     289    # we should not choose a depcomp mode which is confused by this. 
     290    # 
     291    # We need to recreate these files for each test, as the compiler may 
     292    # overwrite some of them when testing with obscure command lines. 
     293    # This happens at least with the AIX C compiler. 
     294    : > sub/conftest.c 
     295    for i in 1 2 3 4 5 6; do 
     296      echo '#include "conftst'$i'.h"' >> sub/conftest.c 
     297      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 
     298      # Solaris 8's {/usr,}/bin/sh. 
     299      touch sub/conftst$i.h 
     300    done 
     301    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 
     302 
     303    case $depmode in 
     304    nosideeffect) 
     305      # after this tag, mechanisms are not by side-effect, so they'll 
     306      # only be used when explicitly requested 
     307      if test "x$enable_dependency_tracking" = xyes; then 
     308        continue 
     309      else 
     310        break 
     311      fi 
     312      ;; 
     313    none) break ;; 
     314    esac 
     315    # We check with `-c' and `-o' for the sake of the "dashmstdout" 
     316    # mode.  It turns out that the SunPro C++ compiler does not properly 
     317    # handle `-M -o', and we need to detect this. 
     318    if depmode=$depmode \ 
     319       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 
     320       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 
     321       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 
     322         >/dev/null 2>conftest.err && 
     323       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 
     324       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 
     325       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 
     326      # icc doesn't choke on unknown options, it will just issue warnings 
     327      # or remarks (even with -Werror).  So we grep stderr for any message 
     328      # that says an option was ignored or not supported. 
     329      # When given -MP, icc 7.0 and 7.1 complain thusly: 
     330      #   icc: Command line warning: ignoring option '-M'; no argument required 
     331      # The diagnosis changed in icc 8.0: 
     332      #   icc: Command line remark: option '-MP' not supported 
     333      if (grep 'ignoring option' conftest.err || 
     334          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 
     335        am_cv_$1_dependencies_compiler_type=$depmode 
     336        break 
     337      fi 
     338    fi 
     339  done 
     340 
     341  cd .. 
     342  rm -rf conftest.dir 
     343else 
     344  am_cv_$1_dependencies_compiler_type=none 
     345fi 
     346]) 
     347AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 
     348AM_CONDITIONAL([am__fastdep$1], [ 
     349  test "x$enable_dependency_tracking" != xno \ 
     350  && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 
     351]) 
     352 
     353 
     354# AM_SET_DEPDIR 
     355# ------------- 
     356# Choose a directory name for dependency files. 
     357# This macro is AC_REQUIREd in _AM_DEPENDENCIES 
     358AC_DEFUN([AM_SET_DEPDIR], 
     359[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 
     360AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 
     361]) 
     362 
     363 
     364# AM_DEP_TRACK 
     365# ------------ 
     366AC_DEFUN([AM_DEP_TRACK], 
     367[AC_ARG_ENABLE(dependency-tracking, 
     368[  --disable-dependency-tracking  speeds up one-time build 
     369  --enable-dependency-tracking   do not reject slow dependency extractors]) 
     370if test "x$enable_dependency_tracking" != xno; then 
     371  am_depcomp="$ac_aux_dir/depcomp" 
     372  AMDEPBACKSLASH='\' 
     373fi 
     374AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 
     375AC_SUBST([AMDEPBACKSLASH]) 
     376]) 
     377 
     378# Generate code to set up dependency tracking.   -*- Autoconf -*- 
     379 
     380# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 
     381 
     382# This program is free software; you can redistribute it and/or modify 
     383# it under the terms of the GNU General Public License as published by 
     384# the Free Software Foundation; either version 2, or (at your option) 
     385# any later version. 
     386 
     387# This program is distributed in the hope that it will be useful, 
     388# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     389# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     390# GNU General Public License for more details. 
     391 
     392# You should have received a copy of the GNU General Public License 
     393# along with this program; if not, write to the Free Software 
     394# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     395# 02111-1307, USA. 
     396 
     397#serial 2 
     398 
     399# _AM_OUTPUT_DEPENDENCY_COMMANDS 
     400# ------------------------------ 
     401AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 
     402[for mf in $CONFIG_FILES; do 
     403  # Strip MF so we end up with the name of the file. 
     404  mf=`echo "$mf" | sed -e 's/:.*$//'` 
     405  # Check whether this is an Automake generated Makefile or not. 
     406  # We used to match only the files named `Makefile.in', but 
     407  # some people rename them; so instead we look at the file content. 
     408  # Grep'ing the first line is not enough: some people post-process 
     409  # each Makefile.in and add a new line on top of each file to say so. 
     410  # So let's grep whole file. 
     411  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 
     412    dirpart=`AS_DIRNAME("$mf")` 
     413  else 
     414    continue 
     415  fi 
     416  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue 
     417  # Extract the definition of DEP_FILES from the Makefile without 
     418  # running `make'. 
     419  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 
     420  test -z "$DEPDIR" && continue 
     421  # When using ansi2knr, U may be empty or an underscore; expand it 
     422  U=`sed -n 's/^U = //p' < "$mf"` 
     423  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 
     424  # We invoke sed twice because it is the simplest approach to 
     425  # changing $(DEPDIR) to its actual value in the expansion. 
     426  for file in `sed -n ' 
     427    /^DEP_FILES = .*\\\\$/ { 
     428      s/^DEP_FILES = // 
     429      :loop 
     430        s/\\\\$// 
     431        p 
     432        n 
     433        /\\\\$/ b loop 
     434      p 
     435    } 
     436    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ 
     437       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 
     438    # Make sure the directory exists. 
     439    test -f "$dirpart/$file" && continue 
     440    fdir=`AS_DIRNAME(["$file"])` 
     441    AS_MKDIR_P([$dirpart/$fdir]) 
     442    # echo "creating $dirpart/$file" 
     443    echo '# dummy' > "$dirpart/$file" 
     444  done 
     445done 
     446])# _AM_OUTPUT_DEPENDENCY_COMMANDS 
     447 
     448 
     449# AM_OUTPUT_DEPENDENCY_COMMANDS 
     450# ----------------------------- 
     451# This macro should only be invoked once -- use via AC_REQUIRE. 
     452# 
     453# This code is only required when automatic dependency tracking 
     454# is enabled.  FIXME.  This creates each `.P' file that we will 
     455# need in order to bootstrap the dependency handling code. 
     456AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 
     457[AC_CONFIG_COMMANDS([depfiles], 
     458     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 
     459     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 
     460]) 
     461 
     462# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- 
     463 
     464# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. 
     465 
     466# This program is free software; you can redistribute it and/or modify 
     467# it under the terms of the GNU General Public License as published by 
     468# the Free Software Foundation; either version 2, or (at your option) 
     469# any later version. 
     470 
     471# This program is distributed in the hope that it will be useful, 
     472# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     473# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     474# GNU General Public License for more details. 
     475 
     476# You should have received a copy of the GNU General Public License 
     477# along with this program; if not, write to the Free Software 
     478# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     479# 02111-1307, USA. 
     480 
     481# serial 7 
     482 
     483# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS. 
     484AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 
     485 
     486# Do all the work for Automake.                            -*- Autoconf -*- 
     487 
     488# This macro actually does too much some checks are only needed if 
     489# your package does certain things.  But this isn't really a big deal. 
     490 
     491# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 
     492# Free Software Foundation, Inc. 
     493 
     494# This program is free software; you can redistribute it and/or modify 
     495# it under the terms of the GNU General Public License as published by 
     496# the Free Software Foundation; either version 2, or (at your option) 
     497# any later version. 
     498 
     499# This program is distributed in the hope that it will be useful, 
     500# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     501# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     502# GNU General Public License for more details. 
     503 
     504# You should have received a copy of the GNU General Public License 
     505# along with this program; if not, write to the Free Software 
     506# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     507# 02111-1307, USA. 
     508 
     509# serial 11 
     510 
     511# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 
     512# AM_INIT_AUTOMAKE([OPTIONS]) 
     513# ----------------------------------------------- 
     514# The call with PACKAGE and VERSION arguments is the old style 
     515# call (pre autoconf-2.50), which is being phased out.  PACKAGE 
     516# and VERSION should now be passed to AC_INIT and removed from 
     517# the call to AM_INIT_AUTOMAKE. 
     518# We support both call styles for the transition.  After 
     519# the next Automake release, Autoconf can make the AC_INIT 
     520# arguments mandatory, and then we can depend on a new Autoconf 
     521# release and drop the old call support. 
     522AC_DEFUN([AM_INIT_AUTOMAKE], 
     523[AC_PREREQ([2.58])dnl 
     524dnl Autoconf wants to disallow AM_ names.  We explicitly allow 
     525dnl the ones we care about. 
     526m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 
     527AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 
     528AC_REQUIRE([AC_PROG_INSTALL])dnl 
     529# test to see if srcdir already configured 
     530if test "`cd $srcdir && pwd`" != "`pwd`" && 
     531   test -f $srcdir/config.status; then 
     532  AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 
     533fi 
     534 
     535# test whether we have cygpath 
     536if test -z "$CYGPATH_W"; then 
     537  if (cygpath --version) >/dev/null 2>/dev/null; then 
     538    CYGPATH_W='cygpath -w' 
     539  else 
     540    CYGPATH_W=echo 
     541  fi 
     542fi 
     543AC_SUBST([CYGPATH_W]) 
     544 
     545# Define the identity of the package. 
     546dnl Distinguish between old-style and new-style calls. 
     547m4_ifval([$2], 
     548[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 
     549 AC_SUBST([PACKAGE], [$1])dnl 
     550 AC_SUBST([VERSION], [$2])], 
     551[_AM_SET_OPTIONS([$1])dnl 
     552 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 
     553 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 
     554 
     555_AM_IF_OPTION([no-define],, 
     556[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 
     557 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 
     558 
     559# Some tools Automake needs. 
     560AC_REQUIRE([AM_SANITY_CHECK])dnl 
     561AC_REQUIRE([AC_ARG_PROGRAM])dnl 
     562AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 
     563AM_MISSING_PROG(AUTOCONF, autoconf) 
     564AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 
     565AM_MISSING_PROG(AUTOHEADER, autoheader) 
     566AM_MISSING_PROG(MAKEINFO, makeinfo) 
     567AM_MISSING_PROG(AMTAR, tar) 
     568AM_PROG_INSTALL_SH 
     569AM_PROG_INSTALL_STRIP 
     570AC_REQUIRE([AM_PROG_MKDIR_P])dnl 
     571# We need awk for the "check" target.  The system "awk" is bad on 
     572# some platforms. 
     573AC_REQUIRE([AC_PROG_AWK])dnl 
     574AC_REQUIRE([AC_PROG_MAKE_SET])dnl 
     575AC_REQUIRE([AM_SET_LEADING_DOT])dnl 
     576 
     577_AM_IF_OPTION([no-dependencies],, 
     578[AC_PROVIDE_IFELSE([AC_PROG_CC], 
     579                  [_AM_DEPENDENCIES(CC)], 
     580                  [define([AC_PROG_CC], 
     581                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 
     582AC_PROVIDE_IFELSE([AC_PROG_CXX], 
     583                  [_AM_DEPENDENCIES(CXX)], 
     584                  [define([AC_PROG_CXX], 
     585                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 
     586]) 
     587]) 
     588 
     589 
     590# When config.status generates a header, we must update the stamp-h file. 
     591# This file resides in the same directory as the config header 
     592# that is generated.  The stamp files are numbered to have different names. 
     593 
     594# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 
     595# loop where config.status creates the headers, so we can generate 
     596# our stamp files there. 
     597AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 
     598[# Compute $1's index in $config_headers. 
     599_am_stamp_count=1 
     600for _am_header in $config_headers :; do 
     601  case $_am_header in 
     602    $1 | $1:* ) 
     603      break ;; 
     604    * ) 
     605      _am_stamp_count=`expr $_am_stamp_count + 1` ;; 
     606  esac 
     607done 
     608echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 
     609 
     610# AM_PROG_INSTALL_SH 
     611# ------------------ 
     612# Define $install_sh. 
     613 
     614# Copyright (C) 2001, 2003 Free Software Foundation, Inc. 
     615 
     616# This program is free software; you can redistribute it and/or modify 
     617# it under the terms of the GNU General Public License as published by 
     618# the Free Software Foundation; either version 2, or (at your option) 
     619# any later version. 
     620 
     621# This program is distributed in the hope that it will be useful, 
     622# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     623# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     624# GNU General Public License for more details. 
     625 
     626# You should have received a copy of the GNU General Public License 
     627# along with this program; if not, write to the Free Software 
     628# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     629# 02111-1307, USA. 
     630 
     631AC_DEFUN([AM_PROG_INSTALL_SH], 
     632[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 
     633install_sh=${install_sh-"$am_aux_dir/install-sh"} 
     634AC_SUBST(install_sh)]) 
     635 
     636#                                                          -*- Autoconf -*- 
     637# Copyright (C) 2003  Free Software Foundation, Inc. 
     638 
     639# This program is free software; you can redistribute it and/or modify 
     640# it under the terms of the GNU General Public License as published by 
     641# the Free Software Foundation; either version 2, or (at your option) 
     642# any later version. 
     643 
     644# This program is distributed in the hope that it will be useful, 
     645# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     646# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     647# GNU General Public License for more details. 
     648 
     649# You should have received a copy of the GNU General Public License 
     650# along with this program; if not, write to the Free Software 
     651# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     652# 02111-1307, USA. 
     653 
     654# serial 1 
     655 
     656# Check whether the underlying file-system supports filenames 
     657# with a leading dot.  For instance MS-DOS doesn't. 
     658AC_DEFUN([AM_SET_LEADING_DOT], 
     659[rm -rf .tst 2>/dev/null 
     660mkdir .tst 2>/dev/null 
     661if test -d .tst; then 
     662  am__leading_dot=. 
     663else 
     664  am__leading_dot=_ 
     665fi 
     666rmdir .tst 2>/dev/null 
     667AC_SUBST([am__leading_dot])]) 
     668 
     669# Check to see how 'make' treats includes.      -*- Autoconf -*- 
     670 
     671# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 
     672 
     673# This program is free software; you can redistribute it and/or modify 
     674# it under the terms of the GNU General Public License as published by 
     675# the Free Software Foundation; either version 2, or (at your option) 
     676# any later version. 
     677 
     678# This program is distributed in the hope that it will be useful, 
     679# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     680# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     681# GNU General Public License for more details. 
     682 
     683# You should have received a copy of the GNU General Public License 
     684# along with this program; if not, write to the Free Software 
     685# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     686# 02111-1307, USA. 
     687 
     688# serial 2 
     689 
     690# AM_MAKE_INCLUDE() 
     691# ----------------- 
     692# Check to see how make treats includes. 
     693AC_DEFUN([AM_MAKE_INCLUDE], 
     694[am_make=${MAKE-make} 
     695cat > confinc << 'END' 
     696am__doit: 
     697        @echo done 
     698.PHONY: am__doit 
     699END 
     700# If we don't find an include directive, just comment out the code. 
     701AC_MSG_CHECKING([for style of include used by $am_make]) 
     702am__include="#" 
     703am__quote= 
     704_am_result=none 
     705# First try GNU make style include. 
     706echo "include confinc" > confmf 
     707# We grep out `Entering directory' and `Leaving directory' 
     708# messages which can occur if `w' ends up in MAKEFLAGS. 
     709# In particular we don't look at `^make:' because GNU make might 
     710# be invoked under some other name (usually "gmake"), in which 
     711# case it prints its new name instead of `make'. 
     712if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 
     713   am__include=include 
     714   am__quote= 
     715   _am_result=GNU 
     716fi 
     717# Now try BSD make style include. 
     718if test "$am__include" = "#"; then 
     719   echo '.include "confinc"' > confmf 
     720   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 
     721      am__include=.include 
     722      am__quote="\"" 
     723      _am_result=BSD 
     724   fi 
     725fi 
     726AC_SUBST([am__include]) 
     727AC_SUBST([am__quote]) 
     728AC_MSG_RESULT([$_am_result]) 
     729rm -f confinc confmf 
     730]) 
     731 
     732#  -*- Autoconf -*- 
     733 
     734 
     735# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. 
     736 
     737# This program is free software; you can redistribute it and/or modify 
     738# it under the terms of the GNU General Public License as published by 
     739# the Free Software Foundation; either version 2, or (at your option) 
     740# any later version. 
     741 
     742# This program is distributed in the hope that it will be useful, 
     743# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     744# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     745# GNU General Public License for more details. 
     746 
     747# You should have received a copy of the GNU General Public License 
     748# along with this program; if not, write to the Free Software 
     749# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     750# 02111-1307, USA. 
     751 
     752# serial 3 
     753 
     754# AM_MISSING_PROG(NAME, PROGRAM) 
     755# ------------------------------ 
     756AC_DEFUN([AM_MISSING_PROG], 
     757[AC_REQUIRE([AM_MISSING_HAS_RUN]) 
     758$1=${$1-"${am_missing_run}$2"} 
     759AC_SUBST($1)]) 
     760 
     761 
     762# AM_MISSING_HAS_RUN 
     763# ------------------ 
     764# Define MISSING if not defined so far and test if it supports --run. 
     765# If it does, set am_missing_run to use it, otherwise, to nothing. 
     766AC_DEFUN([AM_MISSING_HAS_RUN], 
     767[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 
     768test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 
     769# Use eval to expand $SHELL 
     770if eval "$MISSING --run true"; then 
     771  am_missing_run="$MISSING --run " 
     772else 
     773  am_missing_run= 
     774  AC_MSG_WARN([`missing' script is too old or missing]) 
     775fi 
     776]) 
     777 
     778# AM_PROG_MKDIR_P 
     779# --------------- 
     780# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 
     781 
     782# Copyright (C) 2003, 2004 Free Software Foundation, Inc. 
     783 
     784# This program is free software; you can redistribute it and/or modify 
     785# it under the terms of the GNU General Public License as published by 
     786# the Free Software Foundation; either version 2, or (at your option) 
     787# any later version. 
     788 
     789# This program is distributed in the hope that it will be useful, 
     790# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     791# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     792# GNU General Public License for more details. 
     793 
     794# You should have received a copy of the GNU General Public License 
     795# along with this program; if not, write to the Free Software 
     796# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     797# 02111-1307, USA. 
     798 
     799# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 
     800# created by `make install' are always world readable, even if the 
     801# installer happens to have an overly restrictive umask (e.g. 077). 
     802# This was a mistake.  There are at least two reasons why we must not 
     803# use `-m 0755': 
     804#   - it causes special bits like SGID to be ignored, 
     805#   - it may be too restrictive (some setups expect 775 directories). 
     806# 
     807# Do not use -m 0755 and let people choose whatever they expect by 
     808# setting umask. 
     809# 
     810# We cannot accept any implementation of `mkdir' that recognizes `-p'. 
     811# Some implementations (such as Solaris 8's) are not thread-safe: if a 
     812# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 
     813# concurrently, both version can detect that a/ is missing, but only 
     814# one can create it and the other will error out.  Consequently we 
     815# restrict ourselves to GNU make (using the --version option ensures 
     816# this.) 
     817AC_DEFUN([AM_PROG_MKDIR_P], 
     818[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 
     819  # Keeping the `.' argument allows $(mkdir_p) to be used without 
     820  # argument.  Indeed, we sometimes output rules like 
     821  #   $(mkdir_p) $(somedir) 
     822  # where $(somedir) is conditionally defined. 
     823  # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more 
     824  # expensive solution, as it forces Make to start a sub-shell.) 
     825  mkdir_p='mkdir -p -- .' 
     826else 
     827  # On NextStep and OpenStep, the `mkdir' command does not 
     828  # recognize any option.  It will interpret all options as 
     829  # directories to create, and then abort because `.' already 
     830  # exists. 
     831  for d in ./-p ./--version; 
     832  do 
     833    test -d $d && rmdir $d 
     834  done 
     835  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 
     836  if test -f "$ac_aux_dir/mkinstalldirs"; then 
     837    mkdir_p='$(mkinstalldirs)' 
     838  else 
     839    mkdir_p='$(install_sh) -d' 
     840  fi 
     841fi 
     842AC_SUBST([mkdir_p])]) 
     843 
     844# Helper functions for option handling.                    -*- Autoconf -*- 
     845 
     846# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc. 
     847 
     848# This program is free software; you can redistribute it and/or modify 
     849# it under the terms of the GNU General Public License as published by 
     850# the Free Software Foundation; either version 2, or (at your option) 
     851# any later version. 
     852 
     853# This program is distributed in the hope that it will be useful, 
     854# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     855# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     856# GNU General Public License for more details. 
     857 
     858# You should have received a copy of the GNU General Public License 
     859# along with this program; if not, write to the Free Software 
     860# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     861# 02111-1307, USA. 
     862 
     863# serial 2 
     864 
     865# _AM_MANGLE_OPTION(NAME) 
     866# ----------------------- 
     867AC_DEFUN([_AM_MANGLE_OPTION], 
     868[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 
     869 
     870# _AM_SET_OPTION(NAME) 
     871# ------------------------------ 
     872# Set option NAME.  Presently that only means defining a flag for this option. 
     873AC_DEFUN([_AM_SET_OPTION], 
     874[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 
     875 
     876# _AM_SET_OPTIONS(OPTIONS) 
     877# ---------------------------------- 
     878# OPTIONS is a space-separated list of Automake options. 
     879AC_DEFUN([_AM_SET_OPTIONS], 
     880[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 
     881 
     882# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 
     883# ------------------------------------------- 
     884# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 
     885AC_DEFUN([_AM_IF_OPTION], 
     886[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 
     887 
     888# 
     889# Check to make sure that the build environment is sane. 
     890# 
     891 
     892# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. 
     893 
     894# This program is free software; you can redistribute it and/or modify 
     895# it under the terms of the GNU General Public License as published by 
     896# the Free Software Foundation; either version 2, or (at your option) 
     897# any later version. 
     898 
     899# This program is distributed in the hope that it will be useful, 
     900# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     901# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     902# GNU General Public License for more details. 
     903 
     904# You should have received a copy of the GNU General Public License 
     905# along with this program; if not, write to the Free Software 
     906# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     907# 02111-1307, USA. 
     908 
     909# serial 3 
     910 
     911# AM_SANITY_CHECK 
     912# --------------- 
     913AC_DEFUN([AM_SANITY_CHECK], 
     914[AC_MSG_CHECKING([whether build environment is sane]) 
     915# Just in case 
     916sleep 1 
     917echo timestamp > conftest.file 
     918# Do `set' in a subshell so we don't clobber the current shell's 
     919# arguments.  Must try -L first in case configure is actually a 
     920# symlink; some systems play weird games with the mod time of symlinks 
     921# (eg FreeBSD returns the mod time of the symlink's containing 
     922# directory). 
     923if ( 
     924   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 
     925   if test "$[*]" = "X"; then 
     926      # -L didn't work. 
     927      set X `ls -t $srcdir/configure conftest.file` 
     928   fi 
     929   rm -f conftest.file 
     930   if test "$[*]" != "X $srcdir/configure conftest.file" \ 
     931      && test "$[*]" != "X conftest.file $srcdir/configure"; then 
     932 
     933      # If neither matched, then we have a broken ls.  This can happen 
     934      # if, for instance, CONFIG_SHELL is bash and it inherits a 
     935      # broken ls alias from the environment.  This has actually 
     936      # happened.  Such a system could not be considered "sane". 
     937      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken 
     938alias in your environment]) 
     939   fi 
     940 
     941   test "$[2]" = conftest.file 
     942   ) 
     943then 
     944   # Ok. 
     945   : 
     946else 
     947   AC_MSG_ERROR([newly created file is older than distributed files! 
     948Check your system clock]) 
     949fi 
     950AC_MSG_RESULT(yes)]) 
     951 
     952# AM_PROG_INSTALL_STRIP 
     953 
     954# Copyright (C) 2001, 2003 Free Software Foundation, Inc. 
     955 
     956# This program is free software; you can redistribute it and/or modify 
     957# it under the terms of the GNU General Public License as published by 
     958# the Free Software Foundation; either version 2, or (at your option) 
     959# any later version. 
     960 
     961# This program is distributed in the hope that it will be useful, 
     962# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     963# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     964# GNU General Public License for more details. 
     965 
     966# You should have received a copy of the GNU General Public License 
     967# along with this program; if not, write to the Free Software 
     968# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
     969# 02111-1307, USA. 
     970 
     971# One issue with vendor `install' (even GNU) is that you can't 
     972# specify the program used to strip binaries.  This is especially 
     973# annoying in cross-compiling environments, where the build's strip 
     974# is unlikely to handle the host's binaries. 
     975# Fortunately install-sh will honor a STRIPPROG variable, so we 
     976# always use install-sh in `make install-strip', and initialize 
     977# STRIPPROG with the value of the STRIP variable (set by the user). 
     978AC_DEFUN([AM_PROG_INSTALL_STRIP], 
     979[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 
     980# Installed binaries are usually stripped using `strip' when the user 
     981# run `make install-strip'.  However `strip' might not be the right 
     982# tool to use in cross-compilation environments, therefore Automake 
     983# will honor the `STRIP' environment variable to overrule this program. 
     984dnl Don't test for $cross_compiling = yes, because it might be `maybe'. 
     985if test "$cross_compiling" != no; then 
     986  AC_CHECK_TOOL([STRIP], [strip], :) 
     987fi 
     988INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 
     989AC_SUBST([INSTALL_STRIP_PROGRAM])]) 
     990 
     991m4_include([acinclude.m4]) 
  • beatfish/trunk/install-sh

    r331 r332  
    11#!/bin/sh 
    2 # 
    32# install - install a program, script, or datafile 
    4 # This comes from X11R5 (mit/util/scripts/install.sh). 
    5 
    6 # Copyright 1991 by the Massachusetts Institute of Technology 
    7 
    8 # Permission to use, copy, modify, distribute, and sell this software and its 
    9 # documentation for any purpose is hereby granted without fee, provided that 
    10 # the above copyright notice appear in all copies and that both that 
    11 # copyright notice and this permission notice appear in supporting 
    12 # documentation, and that the name of M.I.T. not be used in advertising or 
    13 # publicity pertaining to distribution of the software without specific, 
    14 # written prior permission.  M.I.T. makes no representations about the 
    15 # suitability of this software for any purpose.  It is provided "as is" 
    16 # without express or implied warranty. 
     3 
     4scriptversion=2004-04-01.17 
     5 
     6# This originates from X11R5 (mit/util/scripts/install.sh), which was 
     7# later released in X11R6 (xc/config/util/install.sh) with the 
     8# following copyright and license. 
     9
     10# Copyright (C) 1994 X Consortium 
     11
     12# Permission is hereby granted, free of charge, to any person obtaining a copy 
     13# of this software and associated documentation files (the "Software"), to 
     14# deal in the Software without restriction, including without limitation the 
     15# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 
     16# sell copies of the Software, and to permit persons to whom the Software is 
     17# furnished to do so, subject to the following conditions: 
     18
     19# The above copyright notice and this permission notice shall be included in 
     20# all copies or substantial portions of the Software. 
     21
     22# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
     23# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
     24# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE 
     25# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 
     26# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- 
     27# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
     28
     29# Except as contained in this notice, the name of the X Consortium shall not 
     30# be used in advertising or otherwise to promote the sale, use or other deal- 
     31# ings in this Software without prior written authorization from the X Consor- 
     32# tium. 
     33
     34
     35# FSF changes to this file are in the public domain. 
    1736# 
    1837# Calling this script install-sh is preferred over install.sh, to prevent 
     
    2443# shared with many OS's install programs. 
    2544 
    26  
    2745# set DOITPROG to echo to test this script 
    2846 
    2947# Don't use :- since 4.3BSD and earlier shells don't like it. 
    3048doit="${DOITPROG-}" 
    31  
    3249 
    3350# put in absolute paths if you don't have them in your path; or use env. vars. 
     
    4259mkdirprog="${MKDIRPROG-mkdir}" 
    4360 
    44 transformbasename="" 
    45 transform_arg="" 
     61transformbasename= 
     62transform_arg= 
    4663instcmd="$mvprog" 
    4764chmodcmd="$chmodprog 0755" 
    48 chowncmd="" 
    49 chgrpcmd="" 
    50 stripcmd="" 
     65chowncmd= 
     66chgrpcmd= 
     67stripcmd= 
    5168rmcmd="$rmprog -f" 
    5269mvcmd="$mvprog" 
    53 src="" 
    54 dst="" 
    55 dir_arg="" 
    56  
    57 while [ x"$1" != x ]; do 
    58     case $1 in 
    59         -c) instcmd="$cpprog" 
    60             shift 
    61             continue;; 
    62  
    63         -d) dir_arg=true 
    64             shift 
    65             continue;; 
    66  
    67         -m) chmodcmd="$chmodprog $2" 
    68             shift 
    69             shift 
    70             continue;; 
    71  
    72         -o) chowncmd="$chownprog $2" 
    73             shift 
    74             shift 
    75             continue;; 
    76  
    77         -g) chgrpcmd="$chgrpprog $2" 
    78             shift 
    79             shift 
    80             continue;; 
    81  
    82         -s) stripcmd="$stripprog" 
    83             shift 
    84             continue;; 
    85  
    86         -t=*) transformarg=`echo $1 | sed 's/-t=//'` 
    87             shift 
    88             continue;; 
    89  
    90         -b=*) transformbasename=`echo $1 | sed 's/-b=//'` 
    91             shift 
    92             continue;; 
    93  
    94         *)  if [ x"$src" = x ] 
    95             then 
    96                 src=$1 
    97             else 
    98                 # this colon is to work around a 386BSD /bin/sh bug 
    99                 : 
    100                 dst=$1 
    101             fi 
    102             shift 
    103             continue;; 
     70src= 
     71dst= 
     72dir_arg= 
     73 
     74usage="Usage: $0 [OPTION]... SRCFILE DSTFILE 
     75   or: $0 [OPTION]... SRCFILES... DIRECTORY 
     76   or: $0 -d DIRECTORIES... 
     77 
     78In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. 
     79In the second, create the directory path DIR. 
     80 
     81Options: 
     82-b=TRANSFORMBASENAME 
     83-c         copy source (using $cpprog) instead of moving (using $mvprog). 
     84-d         create directories instead of installing files. 
     85-g GROUP   $chgrp installed files to GROUP. 
     86-m MODE    $chmod installed files to MODE. 
     87-o USER    $chown installed files to USER. 
     88-s         strip installed files (using $stripprog). 
     89-t=TRANSFORM 
     90--help     display this help and exit. 
     91--version  display version info and exit. 
     92 
     93Environment variables override the default commands: 
     94  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG 
     95
     96 
     97while test -n "$1"; do 
     98  case $1 in 
     99    -b=*) transformbasename=`echo $1 | sed 's/-b=//'` 
     100        shift 
     101        continue;; 
     102 
     103    -c) instcmd=$cpprog 
     104        shift 
     105        continue;; 
     106 
     107    -d) dir_arg=true 
     108        shift 
     109        continue;; 
     110 
     111    -g) chgrpcmd="$chgrpprog $2" 
     112        shift 
     113        shift 
     114        continue;; 
     115 
     116    --help) echo "$usage"; exit 0;; 
     117 
     118    -m) chmodcmd="$chmodprog $2" 
     119        shift 
     120        shift 
     121        continue;; 
     122 
     123    -o) chowncmd="$chownprog $2" 
     124        shift 
     125        shift 
     126        continue;; 
     127 
     128    -s) stripcmd=$stripprog 
     129        shift 
     130        continue;; 
     131 
     132    -t=*) transformarg=`echo $1 | sed 's/-t=//'` 
     133        shift 
     134        continue;; 
     135 
     136    --version) echo "$0 $scriptversion"; exit 0;; 
     137 
     138    *)  # When -d is used, all remaining arguments are directories to create. 
     139        test -n "$dir_arg" && break 
     140        # Otherwise, the last argument is the destination.  Remove it from $@. 
     141        for arg 
     142        do 
     143          if test -n "$dstarg"; then 
     144            # $@ is not empty: it contains at least $arg. 
     145            set fnord "$@" "$dstarg" 
     146            shift # fnord 
     147          fi 
     148          shift # arg 
     149          dstarg=$arg 
     150        done 
     151        break;; 
     152  esac 
     153done 
     154 
     155if test -z "$1"; then 
     156  if test -z "$dir_arg"; then 
     157    echo "$0: no input file specified." >&2 
     158    exit 1 
     159  fi 
     160  # It's OK to call `install-sh -d' without argument. 
     161  # This can happen when creating conditional directories. 
     162  exit 0 
     163fi 
     164 
     165for src 
     166do 
     167  # Protect names starting with `-'. 
     168  case $src in 
     169    -*) src=./$src ;; 
     170  esac 
     171 
     172  if test -n "$dir_arg"; then 
     173    dst=$src 
     174    src= 
     175 
     176    if test -d "$dst"; then 
     177      instcmd=: 
     178      chmodcmd= 
     179    else 
     180      instcmd=$mkdirprog 
     181    fi 
     182  else 
     183    # Waiting for this to be detected by the "$instcmd $src $dsttmp" command 
     184    # might cause directories to be created, which would be especially bad 
     185    # if $src (and thus $dsttmp) contains '*'. 
     186    if test ! -f "$src" && test ! -d "$src"; then 
     187      echo "$0: $src does not exist." >&2 
     188      exit 1 
     189    fi 
     190 
     191    if test -z "$dstarg"; then 
     192      echo "$0: no destination specified." >&2 
     193      exit 1 
     194    fi 
     195 
     196    dst=$dstarg 
     197    # Protect names starting with `-'. 
     198    case $dst in 
     199      -*) dst=./$dst ;; 
    104200    esac 
     201 
     202    # If destination is a directory, append the input filename; won't work 
     203    # if double slashes aren't ignored. 
     204    if test -d "$dst"; then 
     205      dst=$dst/`basename "$src"` 
     206    fi 
     207  fi 
     208 
     209  # This sed command emulates the dirname command. 
     210  dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` 
     211 
     212  # Make sure that the destination directory exists. 
     213 
     214  # Skip lots of stat calls in the usual case. 
     215  if test ! -d "$dstdir"; then 
     216    defaultIFS=' 
     217         ' 
     218    IFS="${IFS-$defaultIFS}" 
     219 
     220    oIFS=$IFS 
     221    # Some sh's can't handle IFS=/ for some reason. 
     222    IFS='%' 
     223    set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` 
     224    IFS=$oIFS 
     225 
     226    pathcomp= 
     227 
     228    while test $# -ne 0 ; do 
     229      pathcomp=$pathcomp$1 
     230      shift 
     231      if test ! -d "$pathcomp"; then 
     232        $mkdirprog "$pathcomp" || lasterr=$? 
     233        # mkdir can fail with a `File exist' error in case several 
     234        # install-sh are creating the directory concurrently.  This 
     235        # is OK. 
     236        test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; } 
     237      fi 
     238      pathcomp=$pathcomp/ 
     239    done 
     240  fi 
     241 
     242  if test -n "$dir_arg"; then 
     243    $doit $instcmd "$dst" \ 
     244      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ 
     245      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ 
     246      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ 
     247      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } 
     248 
     249  else 
     250    # If we're going to rename the final executable, determine the name now. 
     251    if test -z "$transformarg"; then 
     252      dstfile=`basename "$dst"` 
     253    else 
     254      dstfile=`basename "$dst" $transformbasename \ 
     255               | sed $transformarg`$transformbasename 
     256    fi 
     257 
     258    # don't allow the sed command to completely eliminate the filename. 
     259    test -z "$dstfile" && dstfile=`basename "$dst"` 
     260 
     261    # Make a couple of temp file names in the proper directory. 
     262    dsttmp=$dstdir/_inst.$$_ 
     263    rmtmp=$dstdir/_rm.$$_ 
     264 
     265    # Trap to clean up those temp files at exit. 
     266    trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 
     267    trap '(exit $?); exit' 1 2 13 15 
     268 
     269    # Move or copy the file name to the temp name 
     270    $doit $instcmd "$src" "$dsttmp" && 
     271 
     272    # and set any options; do chmod last to preserve setuid bits. 
     273    # 
     274    # If any of these fail, we abort the whole thing.  If we want to 
     275    # ignore errors from any of these, just make sure not to ignore 
     276    # errors from the above "$doit $instcmd $src $dsttmp" command. 
     277    # 
     278    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ 
     279      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ 
     280      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ 
     281      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && 
     282 
     283    # Now rename the file to the real destination. 
     284    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ 
     285      || { 
     286           # The rename failed, perhaps because mv can't rename something else 
     287           # to itself, or perhaps because mv is so ancient that it does not 
     288           # support -f. 
     289 
     290           # Now remove or move aside any old file at destination location. 
     291           # We try this two ways since rm can't unlink itself on some 
     292           # systems and the destination file might be busy for other 
     293           # reasons.  In this case, the final cleanup might fail but the new 
     294           # file should still install successfully. 
     295           { 
     296             if test -f "$dstdir/$dstfile"; then 
     297               $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ 
     298               || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ 
     299               || { 
     300                 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 
     301                 (exit 1); exit 
     302               } 
     303             else 
     304               : 
     305             fi 
     306           } && 
     307 
     308           # Now rename the file to the real destination. 
     309           $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" 
     310         } 
     311    } 
     312  fi || { (exit 1); exit; } 
    105313done 
    106314 
    107 if [ x"$src" = x ] 
    108 then 
    109         echo "install:  no input file specified" 
    110         exit 1 
    111 else 
    112         true 
    113 fi 
    114  
    115 if [ x"$dir_arg" != x ]; then 
    116         dst=$src 
    117         src="" 
    118          
    119         if [ -d $dst ]; then 
    120                 instcmd=: 
    121                 chmodcmd="" 
    122         else 
    123                 instcmd=mkdir 
    124         fi 
    125 else 
    126  
    127 # Waiting for this to be detected by the "$instcmd $src $dsttmp" command 
    128 # might cause directories to be created, which would be especially bad  
    129 # if $src (and thus $dsttmp) contains '*'. 
    130  
    131         if [ -f $src -o -d $src ] 
    132         then 
    133                 true 
    134         else 
    135                 echo "install:  $src does not exist" 
    136                 exit 1 
    137         fi 
    138          
    139         if [ x"$dst" = x ] 
    140         then 
    141                 echo "install:  no destination specified" 
    142                 exit 1 
    143         else 
    144                 true 
    145         fi 
    146  
    147 # If destination is a directory, append the input filename; if your system 
    148 # does not like double slashes in filenames, you may need to add some logic 
    149  
    150         if [ -d $dst ] 
    151         then 
    152                 dst="$dst"/`basename $src` 
    153         else 
    154                 true 
    155         fi 
    156 fi 
    157  
    158 ## this sed command emulates the dirname command 
    159 dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` 
    160  
    161 # Make sure that the destination directory exists. 
    162 #  this part is taken from Noah Friedman's mkinstalldirs script 
    163  
    164 # Skip lots of stat calls in the usual case. 
    165 if [ ! -d "$dstdir" ]; then 
    166 defaultIFS='     
    167 
    168 IFS="${IFS-${defaultIFS}}" 
    169  
    170 oIFS="${IFS}" 
    171 # Some sh's can't handle IFS=/ for some reason. 
    172 IFS='%' 
    173 set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` 
    174 IFS="${oIFS}" 
    175  
    176 pathcomp='' 
    177  
    178 while [ $# -ne 0 ] ; do 
    179         pathcomp="${pathcomp}${1}" 
    180         shift 
    181  
    182         if [ ! -d "${pathcomp}" ] ; 
    183         then 
    184                 $mkdirprog "${pathcomp}" 
    185         else 
    186                 true 
    187         fi 
    188  
    189         pathcomp="${pathcomp}/" 
    190 done 
    191 fi 
    192  
    193 if [ x"$dir_arg" != x ] 
    194 then 
    195         $doit $instcmd $dst && 
    196  
    197         if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && 
    198         if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && 
    199         if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && 
    200         if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi 
    201 else 
    202  
    203 # If we're going to rename the final executable, determine the name now. 
    204  
    205         if [ x"$transformarg" = x ]  
    206         then 
    207                 dstfile=`basename $dst` 
    208         else 
    209                 dstfile=`basename $dst $transformbasename |  
    210                         sed $transformarg`$transformbasename 
    211         fi 
    212  
    213 # don't allow the sed command to completely eliminate the filename 
    214  
    215         if [ x"$dstfile" = x ]  
    216         then 
    217                 dstfile=`basename $dst` 
    218         else 
    219                 true 
    220         fi 
    221  
    222 # Make a temp file name in the proper directory. 
    223  
    224         dsttmp=$dstdir/#inst.$$# 
    225  
    226 # Move or copy the file name to the temp name 
    227  
    228         $doit $instcmd $src $dsttmp && 
    229  
    230         trap "rm -f ${dsttmp}" 0 && 
    231  
    232 # and set any options; do chmod last to preserve setuid bits 
    233  
    234 # If any of these fail, we abort the whole thing.  If we want to 
    235 # ignore errors from any of these, just make sure not to ignore 
    236 # errors from the above "$doit $instcmd $src $dsttmp" command. 
    237  
    238         if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && 
    239         if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && 
    240         if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && 
    241         if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && 
    242  
    243 # Now rename the file to the real destination. 
    244  
    245         $doit $rmcmd -f $dstdir/$dstfile && 
    246         $doit $mvcmd $dsttmp $dstdir/$dstfile  
    247  
    248 fi && 
    249  
    250  
    251 exit 0 
     315# The final little trick to "correctly" pass the exit status to the exit trap. 
     316
     317  (exit 0); exit 
     318
     319 
     320# Local variables: 
     321# eval: (add-hook 'write-file-hooks 'time-stamp) 
     322# time-stamp-start: "scriptversion=" 
     323# time-stamp-format: "%:y-%02m-%02d.%02H" 
     324# time-stamp-end: "$" 
     325# End: 
  • beatfish/trunk/missing

    r331 r332  
    11#! /bin/sh 
    22# Common stub for a few missing GNU programs while installing. 
    3 # Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc. 
    4 # Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996. 
     3 
     4scriptversion=2003-09-02.23 
     5 
     6# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003  
     7#   Free Software Foundation, Inc. 
     8# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. 
    59 
    610# This program is free software; you can redistribute it and/or modify 
     
    1923# 02111-1307, USA. 
    2024 
     25# As a special exception to the GNU General Public License, if you 
     26# distribute this file as part of a program that contains a 
     27# configuration script generated by Autoconf, you may include it under 
     28# the same distribution terms that you use for the rest of that program. 
     29 
    2130if test $# -eq 0; then 
    2231  echo 1>&2 "Try \`$0 --help' for more information" 
     
    2433fi 
    2534 
     35run=: 
     36 
    2637# In the cases where this matters, `missing' is being run in the 
    2738# srcdir already. 
    28 if test -f configure.in; then 
     39if test -f configure.ac; then 
    2940  configure_ac=configure.ac 
    3041else 
     
    3243fi 
    3344 
     45msg="missing on your system" 
     46 
     47case "$1" in 
     48--run) 
     49  # Try to run requested program, and just exit if it succeeds. 
     50  run= 
     51  shift 
     52  "$@" && exit 0 
     53  # Exit code 63 means version mismatch.  This often happens 
     54  # when the user try to use an ancient version of a tool on 
     55  # a file that requires a minimum version.  In this case we 
     56  # we should proceed has if the program had been absent, or 
     57  # if --run hadn't been passed. 
     58  if test $? = 63; then 
     59    run=: 
     60    msg="probably too old" 
     61  fi 
     62  ;; 
     63esac 
     64 
     65# If it does not exist, or fails to run (possibly an outdated version), 
     66# try to emulate it. 
    3467case "$1" in 
    3568 
     
    4477  -h, --help      display this help and exit 
    4578  -v, --version   output version information and exit 
     79  --run           try to run the given command, and emulate it if it fails 
    4680 
    4781Supported PROGRAM values: 
     
    5286  bison        create \`y.tab.[ch]', if possible, from existing .[ch] 
    5387  flex         create \`lex.yy.c', if possible, from existing .c 
     88  help2man     touch the output file 
    5489  lex          create \`lex.yy.c', if possible, from existing .c 
    5590  makeinfo     touch the output file 
    56   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]" 
     91  tar          try tar, gnutar, gtar, then tar without non-portable flags 
     92  yacc         create \`y.tab.[ch]', if possible, from existing .[ch] 
     93 
     94Send bug reports to <bug-automake@gnu.org>." 
    5795    ;; 
    5896 
    5997  -v|--v|--ve|--ver|--vers|--versi|--versio|--version) 
    60     echo "missing - GNU libit 0.0
     98    echo "missing $scriptversion (GNU Automake)
    6199    ;; 
    62100 
     
    68106 
    69107  aclocal*) 
    70     echo 1>&2 "\ 
    71 WARNING: \`$1' is missing on your system.  You should only need it if 
    72          you modified \`acinclude.m4' or \`$configure_ac'.  You might want 
     108    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then 
     109       # We have it, but it failed. 
     110       exit 1 
     111    fi 
     112 
     113    echo 1>&2 "\ 
     114WARNING: \`$1' is $msg.  You should only need it if 
     115         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want 
    73116         to install the \`Automake' and \`Perl' packages.  Grab them from 
    74117         any GNU archive site." 
     
    77120 
    78121  autoconf) 
    79     echo 1>&2 "\ 
    80 WARNING: \`$1' is missing on your system.  You should only need it if 
    81          you modified \`$configure_ac'.  You might want to install the 
     122    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then 
     123       # We have it, but it failed. 
     124       exit 1 
     125    fi 
     126 
     127    echo 1>&2 "\ 
     128WARNING: \`$1' is $msg.  You should only need it if 
     129         you modified \`${configure_ac}'.  You might want to install the 
    82130         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU 
    83131         archive site." 
     
    86134 
    87135  autoheader) 
    88     echo 1>&2 "\ 
    89 WARNING: \`$1' is missing on your system.  You should only need it if 
    90          you modified \`acconfig.h' or \`$configure_ac'.  You might want 
     136    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then 
     137       # We have it, but it failed. 
     138       exit 1 
     139    fi 
     140 
     141    echo 1>&2 "\ 
     142WARNING: \`$1' is $msg.  You should only need it if 
     143         you modified \`acconfig.h' or \`${configure_ac}'.  You might want 
    91144         to install the \`Autoconf' and \`GNU m4' packages.  Grab them 
    92145         from any GNU archive site." 
    93     files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' $configure_ac
     146    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}
    94147    test -z "$files" && files="config.h" 
    95148    touch_files= 
     
    105158 
    106159  automake*) 
    107     echo 1>&2 "\ 
    108 WARNING: \`$1' is missing on your system.  You should only need it if 
    109          you modified \`Makefile.am', \`acinclude.m4' or \`$configure_ac'. 
     160    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then 
     161       # We have it, but it failed. 
     162       exit 1 
     163    fi 
     164 
     165    echo 1>&2 "\ 
     166WARNING: \`$1' is $msg.  You should only need it if 
     167         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. 
    110168         You might want to install the \`Automake' and \`Perl' packages. 
    111169         Grab them from any GNU archive site." 
     
    115173    ;; 
    116174 
     175  autom4te) 
     176    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then 
     177       # We have it, but it failed. 
     178       exit 1 
     179    fi 
     180 
     181    echo 1>&2 "\ 
     182WARNING: \`$1' is needed, but is $msg. 
     183         You might have modified some files without having the 
     184         proper tools for further handling them. 
     185         You can get \`$1' as part of \`Autoconf' from any GNU 
     186         archive site." 
     187 
     188    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` 
     189    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` 
     190    if test -f "$file"; then 
     191        touch $file 
     192    else 
     193        test -z "$file" || exec >$file 
     194        echo "#! /bin/sh" 
     195        echo "# Created by GNU Automake missing as a replacement of" 
     196        echo "#  $ $@" 
     197        echo "exit 0" 
     198        chmod +x $file 
     199        exit 1 
     200    fi 
     201    ;; 
     202 
    117203  bison|yacc) 
    118204    echo 1>&2 "\ 
    119 WARNING: \`$1' is missing on your system.  You should only need it if 
     205WARNING: \`$1' $msg.  You should only need it if 
    120206         you modified a \`.y' file.  You may need the \`Bison' package 
    121207         in order for those modifications to take effect.  You can get 
     
    147233  lex|flex) 
    148234    echo 1>&2 "\ 
    149 WARNING: \`$1' is missing on your system.  You should only need it if 
     235WARNING: \`$1' is $msg.  You should only need it if 
    150236         you modified a \`.l' file.  You may need the \`Flex' package 
    151237         in order for those modifications to take effect.  You can get 
     
    168254    ;; 
    169255 
     256  help2man) 
     257    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then 
     258       # We have it, but it failed. 
     259       exit 1 
     260    fi 
     261 
     262    echo 1>&2 "\ 
     263WARNING: \`$1' is $msg.  You should only need it if 
     264         you modified a dependency of a manual page.  You may need the 
     265         \`Help2man' package in order for those modifications to take 
     266         effect.  You can get \`Help2man' from any GNU archive site." 
     267 
     268    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` 
     269    if test -z "$file"; then 
     270        file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` 
     271    fi 
     272    if [ -f "$file" ]; then 
     273        touch $file 
     274    else 
     275        test -z "$file" || exec >$file 
     276        echo ".ab help2man is required to generate this page" 
     277        exit 1 
     278    fi 
     279    ;; 
     280 
    170281  makeinfo) 
    171     echo 1>&2 "\ 
    172 WARNING: \`$1' is missing on your system.  You should only need it if 
     282    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then 
     283       # We have makeinfo, but it failed. 
     284       exit 1 
     285    fi 
     286 
     287    echo 1>&2 "\ 
     288WARNING: \`$1' is $msg.  You should only need it if 
    173289         you modified a \`.texi' or \`.texinfo' file, or any other file 
    174290         indirectly affecting the aspect of the manual.  The spurious 
     
    184300    ;; 
    185301 
     302  tar) 
     303    shift 
     304    if test -n "$run"; then 
     305      echo 1>&2 "ERROR: \`tar' requires --run" 
     306      exit 1 
     307    fi 
     308 
     309    # We have already tried tar in the generic part. 
     310    # Look for gnutar/gtar before invocation to avoid ugly error 
     311    # messages. 
     312    if (gnutar --version > /dev/null 2>&1); then 
     313       gnutar "$@" && exit 0 
     314    fi 
     315    if (gtar --version > /dev/null 2>&1); then 
     316       gtar "$@" && exit 0 
     317    fi 
     318    firstarg="$1" 
     319    if shift; then 
     320        case "$firstarg" in 
     321        *o*) 
     322            firstarg=`echo "$firstarg" | sed s/o//` 
     323            tar "$firstarg" "$@" && exit 0 
     324            ;; 
     325        esac 
     326        case "$firstarg" in 
     327        *h*) 
     328            firstarg=`echo "$firstarg" | sed s/h//` 
     329            tar "$firstarg" "$@" && exit 0 
     330            ;; 
     331        esac 
     332    fi 
     333 
     334    echo 1>&2 "\ 
     335WARNING: I can't seem to be able to run \`tar' with the given arguments. 
     336         You may want to install GNU tar or Free paxutils, or check the 
     337         command line arguments." 
     338    exit 1 
     339    ;; 
     340 
    186341  *) 
    187342    echo 1>&2 "\ 
    188 WARNING: \`$1' is needed, and you do not seem to have it handy on your 
    189          system.  You might have modified some files without having the 
     343WARNING: \`$1' is needed, and is $msg. 
     344         You might have modified some files without having the 
    190345         proper tools for further handling them.  Check the \`README' file, 
    191          it often tells you about the needed prerequirements for installing 
     346         it often tells you about the needed prerequisites for installing 
    192347         this package.  You may also peek at any GNU archive site, in case 
    193348         some other package would contain this missing \`$1' program." 
     
    197352 
    198353exit 0 
     354 
     355# Local variables: 
     356# eval: (add-hook 'write-file-hooks 'time-stamp) 
     357# time-stamp-start: "scriptversion=" 
     358# time-stamp-format: "%:y-%02m-%02d.%02H" 
     359# time-stamp-end: "$" 
     360# End: