"Fossies" - the Fresh Open Source Software Archive

Member "fusesmb-0.8.7/aclocal.m4" (7 Sep 2007, 44675 Bytes) of package /linux/privat/old/fusesmb-0.8.7.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    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 dnl as-ac-expand.m4 0.1.0
   55 dnl autostars m4 macro for expanding directories using configure's prefix
   56 dnl thomas@apestaart.org 
   57 
   58 dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
   59 dnl
   60 dnl example
   61 dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
   62 dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
   63 
   64 AC_DEFUN(AS_AC_EXPAND,
   65 [
   66   EXP_VAR=[$1]
   67   FROM_VAR=[$2]
   68 
   69   dnl first expand prefix and exec_prefix if necessary
   70   prefix_save=$prefix
   71   exec_prefix_save=$exec_prefix
   72 
   73   dnl if no prefix given, then use /usr/local, the default prefix
   74   if test "x$prefix" = "xNONE"; then
   75     prefix=$ac_default_prefix
   76   fi
   77   dnl if no exec_prefix given, then use prefix
   78   if test "x$exec_prefix" = "xNONE"; then
   79     exec_prefix=$prefix
   80   fi
   81 
   82   full_var="$FROM_VAR"
   83   dnl loop until it doesn't change anymore
   84   while true; do
   85     new_full_var="`eval echo $full_var`"
   86     if test "x$new_full_var"="x$full_var"; then break; fi
   87     full_var=$new_full_var
   88   done
   89 
   90   dnl clean up
   91   full_var=$new_full_var
   92   AC_SUBST([$1], "$full_var")
   93 
   94   dnl restore prefix and exec_prefix
   95   prefix=$prefix_save
   96   exec_prefix=$exec_prefix_save
   97 ])
   98 
   99 # lib-prefix.m4 serial 5 (gettext-0.15)
  100 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
  101 dnl This file is free software; the Free Software Foundation
  102 dnl gives unlimited permission to copy and/or distribute it,
  103 dnl with or without modifications, as long as this notice is preserved.
  104 
  105 dnl From Bruno Haible.
  106 
  107 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
  108 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
  109 dnl require excessive bracketing.
  110 ifdef([AC_HELP_STRING],
  111 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
  112 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
  113 
  114 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
  115 dnl to access previously installed libraries. The basic assumption is that
  116 dnl a user will want packages to use other packages he previously installed
  117 dnl with the same --prefix option.
  118 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
  119 dnl libraries, but is otherwise very convenient.
  120 AC_DEFUN([AC_LIB_PREFIX],
  121 [
  122   AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
  123   AC_REQUIRE([AC_PROG_CC])
  124   AC_REQUIRE([AC_CANONICAL_HOST])
  125   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
  126   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  127   dnl By default, look in $includedir and $libdir.
  128   use_additional=yes
  129   AC_LIB_WITH_FINAL_PREFIX([
  130     eval additional_includedir=\"$includedir\"
  131     eval additional_libdir=\"$libdir\"
  132   ])
  133   AC_LIB_ARG_WITH([lib-prefix],
  134 [  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
  135   --without-lib-prefix    don't search for libraries in includedir and libdir],
  136 [
  137     if test "X$withval" = "Xno"; then
  138       use_additional=no
  139     else
  140       if test "X$withval" = "X"; then
  141         AC_LIB_WITH_FINAL_PREFIX([
  142           eval additional_includedir=\"$includedir\"
  143           eval additional_libdir=\"$libdir\"
  144         ])
  145       else
  146         additional_includedir="$withval/include"
  147         additional_libdir="$withval/$acl_libdirstem"
  148       fi
  149     fi
  150 ])
  151   if test $use_additional = yes; then
  152     dnl Potentially add $additional_includedir to $CPPFLAGS.
  153     dnl But don't add it
  154     dnl   1. if it's the standard /usr/include,
  155     dnl   2. if it's already present in $CPPFLAGS,
  156     dnl   3. if it's /usr/local/include and we are using GCC on Linux,
  157     dnl   4. if it doesn't exist as a directory.
  158     if test "X$additional_includedir" != "X/usr/include"; then
  159       haveit=
  160       for x in $CPPFLAGS; do
  161         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  162         if test "X$x" = "X-I$additional_includedir"; then
  163           haveit=yes
  164           break
  165         fi
  166       done
  167       if test -z "$haveit"; then
  168         if test "X$additional_includedir" = "X/usr/local/include"; then
  169           if test -n "$GCC"; then
  170             case $host_os in
  171               linux* | gnu* | k*bsd*-gnu) haveit=yes;;
  172             esac
  173           fi
  174         fi
  175         if test -z "$haveit"; then
  176           if test -d "$additional_includedir"; then
  177             dnl Really add $additional_includedir to $CPPFLAGS.
  178             CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
  179           fi
  180         fi
  181       fi
  182     fi
  183     dnl Potentially add $additional_libdir to $LDFLAGS.
  184     dnl But don't add it
  185     dnl   1. if it's the standard /usr/lib,
  186     dnl   2. if it's already present in $LDFLAGS,
  187     dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
  188     dnl   4. if it doesn't exist as a directory.
  189     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
  190       haveit=
  191       for x in $LDFLAGS; do
  192         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  193         if test "X$x" = "X-L$additional_libdir"; then
  194           haveit=yes
  195           break
  196         fi
  197       done
  198       if test -z "$haveit"; then
  199         if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
  200           if test -n "$GCC"; then
  201             case $host_os in
  202               linux*) haveit=yes;;
  203             esac
  204           fi
  205         fi
  206         if test -z "$haveit"; then
  207           if test -d "$additional_libdir"; then
  208             dnl Really add $additional_libdir to $LDFLAGS.
  209             LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
  210           fi
  211         fi
  212       fi
  213     fi
  214   fi
  215 ])
  216 
  217 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
  218 dnl acl_final_exec_prefix, containing the values to which $prefix and
  219 dnl $exec_prefix will expand at the end of the configure script.
  220 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
  221 [
  222   dnl Unfortunately, prefix and exec_prefix get only finally determined
  223   dnl at the end of configure.
  224   if test "X$prefix" = "XNONE"; then
  225     acl_final_prefix="$ac_default_prefix"
  226   else
  227     acl_final_prefix="$prefix"
  228   fi
  229   if test "X$exec_prefix" = "XNONE"; then
  230     acl_final_exec_prefix='${prefix}'
  231   else
  232     acl_final_exec_prefix="$exec_prefix"
  233   fi
  234   acl_save_prefix="$prefix"
  235   prefix="$acl_final_prefix"
  236   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
  237   prefix="$acl_save_prefix"
  238 ])
  239 
  240 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
  241 dnl variables prefix and exec_prefix bound to the values they will have
  242 dnl at the end of the configure script.
  243 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
  244 [
  245   acl_save_prefix="$prefix"
  246   prefix="$acl_final_prefix"
  247   acl_save_exec_prefix="$exec_prefix"
  248   exec_prefix="$acl_final_exec_prefix"
  249   $1
  250   exec_prefix="$acl_save_exec_prefix"
  251   prefix="$acl_save_prefix"
  252 ])
  253 
  254 dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
  255 dnl the basename of the libdir, either "lib" or "lib64".
  256 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
  257 [
  258   dnl There is no formal standard regarding lib and lib64. The current
  259   dnl practice is that on a system supporting 32-bit and 64-bit instruction
  260   dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
  261   dnl libraries go under $prefix/lib. We determine the compiler's default
  262   dnl mode by looking at the compiler's library search path. If at least
  263   dnl of its elements ends in /lib64 or points to a directory whose absolute
  264   dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
  265   dnl default, namely "lib".
  266   acl_libdirstem=lib
  267   searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
  268   if test -n "$searchpath"; then
  269     acl_save_IFS="${IFS= 	}"; IFS=":"
  270     for searchdir in $searchpath; do
  271       if test -d "$searchdir"; then
  272         case "$searchdir" in
  273           */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
  274           *) searchdir=`cd "$searchdir" && pwd`
  275              case "$searchdir" in
  276                */lib64 ) acl_libdirstem=lib64 ;;
  277              esac ;;
  278         esac
  279       fi
  280     done
  281     IFS="$acl_save_IFS"
  282   fi
  283 ])
  284 
  285 # lib-link.m4 serial 9 (gettext-0.16)
  286 dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
  287 dnl This file is free software; the Free Software Foundation
  288 dnl gives unlimited permission to copy and/or distribute it,
  289 dnl with or without modifications, as long as this notice is preserved.
  290 
  291 dnl From Bruno Haible.
  292 
  293 AC_PREREQ(2.50)
  294 
  295 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
  296 dnl the libraries corresponding to explicit and implicit dependencies.
  297 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
  298 dnl augments the CPPFLAGS variable.
  299 AC_DEFUN([AC_LIB_LINKFLAGS],
  300 [
  301   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  302   AC_REQUIRE([AC_LIB_RPATH])
  303   define([Name],[translit([$1],[./-], [___])])
  304   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
  305                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
  306   AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
  307     AC_LIB_LINKFLAGS_BODY([$1], [$2])
  308     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
  309     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
  310     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
  311   ])
  312   LIB[]NAME="$ac_cv_lib[]Name[]_libs"
  313   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
  314   INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
  315   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
  316   AC_SUBST([LIB]NAME)
  317   AC_SUBST([LTLIB]NAME)
  318   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
  319   dnl results of this search when this library appears as a dependency.
  320   HAVE_LIB[]NAME=yes
  321   undefine([Name])
  322   undefine([NAME])
  323 ])
  324 
  325 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
  326 dnl searches for libname and the libraries corresponding to explicit and
  327 dnl implicit dependencies, together with the specified include files and
  328 dnl the ability to compile and link the specified testcode. If found, it
  329 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
  330 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
  331 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
  332 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
  333 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
  334 [
  335   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  336   AC_REQUIRE([AC_LIB_RPATH])
  337   define([Name],[translit([$1],[./-], [___])])
  338   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
  339                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
  340 
  341   dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
  342   dnl accordingly.
  343   AC_LIB_LINKFLAGS_BODY([$1], [$2])
  344 
  345   dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
  346   dnl because if the user has installed lib[]Name and not disabled its use
  347   dnl via --without-lib[]Name-prefix, he wants to use it.
  348   ac_save_CPPFLAGS="$CPPFLAGS"
  349   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
  350 
  351   AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
  352     ac_save_LIBS="$LIBS"
  353     LIBS="$LIBS $LIB[]NAME"
  354     AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
  355     LIBS="$ac_save_LIBS"
  356   ])
  357   if test "$ac_cv_lib[]Name" = yes; then
  358     HAVE_LIB[]NAME=yes
  359     AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
  360     AC_MSG_CHECKING([how to link with lib[]$1])
  361     AC_MSG_RESULT([$LIB[]NAME])
  362   else
  363     HAVE_LIB[]NAME=no
  364     dnl If $LIB[]NAME didn't lead to a usable library, we don't need
  365     dnl $INC[]NAME either.
  366     CPPFLAGS="$ac_save_CPPFLAGS"
  367     LIB[]NAME=
  368     LTLIB[]NAME=
  369   fi
  370   AC_SUBST([HAVE_LIB]NAME)
  371   AC_SUBST([LIB]NAME)
  372   AC_SUBST([LTLIB]NAME)
  373   undefine([Name])
  374   undefine([NAME])
  375 ])
  376 
  377 dnl Determine the platform dependent parameters needed to use rpath:
  378 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
  379 dnl hardcode_direct, hardcode_minus_L.
  380 AC_DEFUN([AC_LIB_RPATH],
  381 [
  382   dnl Tell automake >= 1.10 to complain if config.rpath is missing.
  383   m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
  384   AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
  385   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
  386   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
  387   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
  388   AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
  389     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
  390     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
  391     . ./conftest.sh
  392     rm -f ./conftest.sh
  393     acl_cv_rpath=done
  394   ])
  395   wl="$acl_cv_wl"
  396   libext="$acl_cv_libext"
  397   shlibext="$acl_cv_shlibext"
  398   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
  399   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
  400   hardcode_direct="$acl_cv_hardcode_direct"
  401   hardcode_minus_L="$acl_cv_hardcode_minus_L"
  402   dnl Determine whether the user wants rpath handling at all.
  403   AC_ARG_ENABLE(rpath,
  404     [  --disable-rpath         do not hardcode runtime library paths],
  405     :, enable_rpath=yes)
  406 ])
  407 
  408 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
  409 dnl the libraries corresponding to explicit and implicit dependencies.
  410 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
  411 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
  412 [
  413   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
  414   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
  415                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
  416   dnl By default, look in $includedir and $libdir.
  417   use_additional=yes
  418   AC_LIB_WITH_FINAL_PREFIX([
  419     eval additional_includedir=\"$includedir\"
  420     eval additional_libdir=\"$libdir\"
  421   ])
  422   AC_LIB_ARG_WITH([lib$1-prefix],
  423 [  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
  424   --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
  425 [
  426     if test "X$withval" = "Xno"; then
  427       use_additional=no
  428     else
  429       if test "X$withval" = "X"; then
  430         AC_LIB_WITH_FINAL_PREFIX([
  431           eval additional_includedir=\"$includedir\"
  432           eval additional_libdir=\"$libdir\"
  433         ])
  434       else
  435         additional_includedir="$withval/include"
  436         additional_libdir="$withval/$acl_libdirstem"
  437       fi
  438     fi
  439 ])
  440   dnl Search the library and its dependencies in $additional_libdir and
  441   dnl $LDFLAGS. Using breadth-first-seach.
  442   LIB[]NAME=
  443   LTLIB[]NAME=
  444   INC[]NAME=
  445   rpathdirs=
  446   ltrpathdirs=
  447   names_already_handled=
  448   names_next_round='$1 $2'
  449   while test -n "$names_next_round"; do
  450     names_this_round="$names_next_round"
  451     names_next_round=
  452     for name in $names_this_round; do
  453       already_handled=
  454       for n in $names_already_handled; do
  455         if test "$n" = "$name"; then
  456           already_handled=yes
  457           break
  458         fi
  459       done
  460       if test -z "$already_handled"; then
  461         names_already_handled="$names_already_handled $name"
  462         dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
  463         dnl or AC_LIB_HAVE_LINKFLAGS call.
  464         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
  465         eval value=\"\$HAVE_LIB$uppername\"
  466         if test -n "$value"; then
  467           if test "$value" = yes; then
  468             eval value=\"\$LIB$uppername\"
  469             test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
  470             eval value=\"\$LTLIB$uppername\"
  471             test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
  472           else
  473             dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
  474             dnl that this library doesn't exist. So just drop it.
  475             :
  476           fi
  477         else
  478           dnl Search the library lib$name in $additional_libdir and $LDFLAGS
  479           dnl and the already constructed $LIBNAME/$LTLIBNAME.
  480           found_dir=
  481           found_la=
  482           found_so=
  483           found_a=
  484           if test $use_additional = yes; then
  485             if test -n "$shlibext" \
  486                && { test -f "$additional_libdir/lib$name.$shlibext" \
  487                     || { test "$shlibext" = dll \
  488                          && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
  489               found_dir="$additional_libdir"
  490               if test -f "$additional_libdir/lib$name.$shlibext"; then
  491                 found_so="$additional_libdir/lib$name.$shlibext"
  492               else
  493                 found_so="$additional_libdir/lib$name.dll.a"
  494               fi
  495               if test -f "$additional_libdir/lib$name.la"; then
  496                 found_la="$additional_libdir/lib$name.la"
  497               fi
  498             else
  499               if test -f "$additional_libdir/lib$name.$libext"; then
  500                 found_dir="$additional_libdir"
  501                 found_a="$additional_libdir/lib$name.$libext"
  502                 if test -f "$additional_libdir/lib$name.la"; then
  503                   found_la="$additional_libdir/lib$name.la"
  504                 fi
  505               fi
  506             fi
  507           fi
  508           if test "X$found_dir" = "X"; then
  509             for x in $LDFLAGS $LTLIB[]NAME; do
  510               AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  511               case "$x" in
  512                 -L*)
  513                   dir=`echo "X$x" | sed -e 's/^X-L//'`
  514                   if test -n "$shlibext" \
  515                      && { test -f "$dir/lib$name.$shlibext" \
  516                           || { test "$shlibext" = dll \
  517                                && test -f "$dir/lib$name.dll.a"; }; }; then
  518                     found_dir="$dir"
  519                     if test -f "$dir/lib$name.$shlibext"; then
  520                       found_so="$dir/lib$name.$shlibext"
  521                     else
  522                       found_so="$dir/lib$name.dll.a"
  523                     fi
  524                     if test -f "$dir/lib$name.la"; then
  525                       found_la="$dir/lib$name.la"
  526                     fi
  527                   else
  528                     if test -f "$dir/lib$name.$libext"; then
  529                       found_dir="$dir"
  530                       found_a="$dir/lib$name.$libext"
  531                       if test -f "$dir/lib$name.la"; then
  532                         found_la="$dir/lib$name.la"
  533                       fi
  534                     fi
  535                   fi
  536                   ;;
  537               esac
  538               if test "X$found_dir" != "X"; then
  539                 break
  540               fi
  541             done
  542           fi
  543           if test "X$found_dir" != "X"; then
  544             dnl Found the library.
  545             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
  546             if test "X$found_so" != "X"; then
  547               dnl Linking with a shared library. We attempt to hardcode its
  548               dnl directory into the executable's runpath, unless it's the
  549               dnl standard /usr/lib.
  550               if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
  551                 dnl No hardcoding is needed.
  552                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  553               else
  554                 dnl Use an explicit option to hardcode DIR into the resulting
  555                 dnl binary.
  556                 dnl Potentially add DIR to ltrpathdirs.
  557                 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
  558                 haveit=
  559                 for x in $ltrpathdirs; do
  560                   if test "X$x" = "X$found_dir"; then
  561                     haveit=yes
  562                     break
  563                   fi
  564                 done
  565                 if test -z "$haveit"; then
  566                   ltrpathdirs="$ltrpathdirs $found_dir"
  567                 fi
  568                 dnl The hardcoding into $LIBNAME is system dependent.
  569                 if test "$hardcode_direct" = yes; then
  570                   dnl Using DIR/libNAME.so during linking hardcodes DIR into the
  571                   dnl resulting binary.
  572                   LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  573                 else
  574                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
  575                     dnl Use an explicit option to hardcode DIR into the resulting
  576                     dnl binary.
  577                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  578                     dnl Potentially add DIR to rpathdirs.
  579                     dnl The rpathdirs will be appended to $LIBNAME at the end.
  580                     haveit=
  581                     for x in $rpathdirs; do
  582                       if test "X$x" = "X$found_dir"; then
  583                         haveit=yes
  584                         break
  585                       fi
  586                     done
  587                     if test -z "$haveit"; then
  588                       rpathdirs="$rpathdirs $found_dir"
  589                     fi
  590                   else
  591                     dnl Rely on "-L$found_dir".
  592                     dnl But don't add it if it's already contained in the LDFLAGS
  593                     dnl or the already constructed $LIBNAME
  594                     haveit=
  595                     for x in $LDFLAGS $LIB[]NAME; do
  596                       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  597                       if test "X$x" = "X-L$found_dir"; then
  598                         haveit=yes
  599                         break
  600                       fi
  601                     done
  602                     if test -z "$haveit"; then
  603                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
  604                     fi
  605                     if test "$hardcode_minus_L" != no; then
  606                       dnl FIXME: Not sure whether we should use
  607                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
  608                       dnl here.
  609                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  610                     else
  611                       dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
  612                       dnl here, because this doesn't fit in flags passed to the
  613                       dnl compiler. So give up. No hardcoding. This affects only
  614                       dnl very old systems.
  615                       dnl FIXME: Not sure whether we should use
  616                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
  617                       dnl here.
  618                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
  619                     fi
  620                   fi
  621                 fi
  622               fi
  623             else
  624               if test "X$found_a" != "X"; then
  625                 dnl Linking with a static library.
  626                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
  627               else
  628                 dnl We shouldn't come here, but anyway it's good to have a
  629                 dnl fallback.
  630                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
  631               fi
  632             fi
  633             dnl Assume the include files are nearby.
  634             additional_includedir=
  635             case "$found_dir" in
  636               */$acl_libdirstem | */$acl_libdirstem/)
  637                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
  638                 additional_includedir="$basedir/include"
  639                 ;;
  640             esac
  641             if test "X$additional_includedir" != "X"; then
  642               dnl Potentially add $additional_includedir to $INCNAME.
  643               dnl But don't add it
  644               dnl   1. if it's the standard /usr/include,
  645               dnl   2. if it's /usr/local/include and we are using GCC on Linux,
  646               dnl   3. if it's already present in $CPPFLAGS or the already
  647               dnl      constructed $INCNAME,
  648               dnl   4. if it doesn't exist as a directory.
  649               if test "X$additional_includedir" != "X/usr/include"; then
  650                 haveit=
  651                 if test "X$additional_includedir" = "X/usr/local/include"; then
  652                   if test -n "$GCC"; then
  653                     case $host_os in
  654                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
  655                     esac
  656                   fi
  657                 fi
  658                 if test -z "$haveit"; then
  659                   for x in $CPPFLAGS $INC[]NAME; do
  660                     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  661                     if test "X$x" = "X-I$additional_includedir"; then
  662                       haveit=yes
  663                       break
  664                     fi
  665                   done
  666                   if test -z "$haveit"; then
  667                     if test -d "$additional_includedir"; then
  668                       dnl Really add $additional_includedir to $INCNAME.
  669                       INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
  670                     fi
  671                   fi
  672                 fi
  673               fi
  674             fi
  675             dnl Look for dependencies.
  676             if test -n "$found_la"; then
  677               dnl Read the .la file. It defines the variables
  678               dnl dlname, library_names, old_library, dependency_libs, current,
  679               dnl age, revision, installed, dlopen, dlpreopen, libdir.
  680               save_libdir="$libdir"
  681               case "$found_la" in
  682                 */* | *\\*) . "$found_la" ;;
  683                 *) . "./$found_la" ;;
  684               esac
  685               libdir="$save_libdir"
  686               dnl We use only dependency_libs.
  687               for dep in $dependency_libs; do
  688                 case "$dep" in
  689                   -L*)
  690                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
  691                     dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
  692                     dnl But don't add it
  693                     dnl   1. if it's the standard /usr/lib,
  694                     dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
  695                     dnl   3. if it's already present in $LDFLAGS or the already
  696                     dnl      constructed $LIBNAME,
  697                     dnl   4. if it doesn't exist as a directory.
  698                     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
  699                       haveit=
  700                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
  701                         if test -n "$GCC"; then
  702                           case $host_os in
  703                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
  704                           esac
  705                         fi
  706                       fi
  707                       if test -z "$haveit"; then
  708                         haveit=
  709                         for x in $LDFLAGS $LIB[]NAME; do
  710                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  711                           if test "X$x" = "X-L$additional_libdir"; then
  712                             haveit=yes
  713                             break
  714                           fi
  715                         done
  716                         if test -z "$haveit"; then
  717                           if test -d "$additional_libdir"; then
  718                             dnl Really add $additional_libdir to $LIBNAME.
  719                             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
  720                           fi
  721                         fi
  722                         haveit=
  723                         for x in $LDFLAGS $LTLIB[]NAME; do
  724                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  725                           if test "X$x" = "X-L$additional_libdir"; then
  726                             haveit=yes
  727                             break
  728                           fi
  729                         done
  730                         if test -z "$haveit"; then
  731                           if test -d "$additional_libdir"; then
  732                             dnl Really add $additional_libdir to $LTLIBNAME.
  733                             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
  734                           fi
  735                         fi
  736                       fi
  737                     fi
  738                     ;;
  739                   -R*)
  740                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
  741                     if test "$enable_rpath" != no; then
  742                       dnl Potentially add DIR to rpathdirs.
  743                       dnl The rpathdirs will be appended to $LIBNAME at the end.
  744                       haveit=
  745                       for x in $rpathdirs; do
  746                         if test "X$x" = "X$dir"; then
  747                           haveit=yes
  748                           break
  749                         fi
  750                       done
  751                       if test -z "$haveit"; then
  752                         rpathdirs="$rpathdirs $dir"
  753                       fi
  754                       dnl Potentially add DIR to ltrpathdirs.
  755                       dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
  756                       haveit=
  757                       for x in $ltrpathdirs; do
  758                         if test "X$x" = "X$dir"; then
  759                           haveit=yes
  760                           break
  761                         fi
  762                       done
  763                       if test -z "$haveit"; then
  764                         ltrpathdirs="$ltrpathdirs $dir"
  765                       fi
  766                     fi
  767                     ;;
  768                   -l*)
  769                     dnl Handle this in the next round.
  770                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
  771                     ;;
  772                   *.la)
  773                     dnl Handle this in the next round. Throw away the .la's
  774                     dnl directory; it is already contained in a preceding -L
  775                     dnl option.
  776                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
  777                     ;;
  778                   *)
  779                     dnl Most likely an immediate library name.
  780                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
  781                     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
  782                     ;;
  783                 esac
  784               done
  785             fi
  786           else
  787             dnl Didn't find the library; assume it is in the system directories
  788             dnl known to the linker and runtime loader. (All the system
  789             dnl directories known to the linker should also be known to the
  790             dnl runtime loader, otherwise the system is severely misconfigured.)
  791             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
  792             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
  793           fi
  794         fi
  795       fi
  796     done
  797   done
  798   if test "X$rpathdirs" != "X"; then
  799     if test -n "$hardcode_libdir_separator"; then
  800       dnl Weird platform: only the last -rpath option counts, the user must
  801       dnl pass all path elements in one option. We can arrange that for a
  802       dnl single library, but not when more than one $LIBNAMEs are used.
  803       alldirs=
  804       for found_dir in $rpathdirs; do
  805         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
  806       done
  807       dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
  808       acl_save_libdir="$libdir"
  809       libdir="$alldirs"
  810       eval flag=\"$hardcode_libdir_flag_spec\"
  811       libdir="$acl_save_libdir"
  812       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
  813     else
  814       dnl The -rpath options are cumulative.
  815       for found_dir in $rpathdirs; do
  816         acl_save_libdir="$libdir"
  817         libdir="$found_dir"
  818         eval flag=\"$hardcode_libdir_flag_spec\"
  819         libdir="$acl_save_libdir"
  820         LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
  821       done
  822     fi
  823   fi
  824   if test "X$ltrpathdirs" != "X"; then
  825     dnl When using libtool, the option that works for both libraries and
  826     dnl executables is -R. The -R options are cumulative.
  827     for found_dir in $ltrpathdirs; do
  828       LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
  829     done
  830   fi
  831 ])
  832 
  833 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
  834 dnl unless already present in VAR.
  835 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
  836 dnl contains two or three consecutive elements that belong together.
  837 AC_DEFUN([AC_LIB_APPENDTOVAR],
  838 [
  839   for element in [$2]; do
  840     haveit=
  841     for x in $[$1]; do
  842       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  843       if test "X$x" = "X$element"; then
  844         haveit=yes
  845         break
  846       fi
  847     done
  848     if test -z "$haveit"; then
  849       [$1]="${[$1]}${[$1]:+ }$element"
  850     fi
  851   done
  852 ])
  853 
  854 dnl For those cases where a variable contains several -L and -l options
  855 dnl referring to unknown libraries and directories, this macro determines the
  856 dnl necessary additional linker options for the runtime path.
  857 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
  858 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
  859 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
  860 dnl otherwise linking without libtool is assumed.
  861 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
  862 [
  863   AC_REQUIRE([AC_LIB_RPATH])
  864   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
  865   $1=
  866   if test "$enable_rpath" != no; then
  867     if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
  868       dnl Use an explicit option to hardcode directories into the resulting
  869       dnl binary.
  870       rpathdirs=
  871       next=
  872       for opt in $2; do
  873         if test -n "$next"; then
  874           dir="$next"
  875           dnl No need to hardcode the standard /usr/lib.
  876           if test "X$dir" != "X/usr/$acl_libdirstem"; then
  877             rpathdirs="$rpathdirs $dir"
  878           fi
  879           next=
  880         else
  881           case $opt in
  882             -L) next=yes ;;
  883             -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
  884                  dnl No need to hardcode the standard /usr/lib.
  885                  if test "X$dir" != "X/usr/$acl_libdirstem"; then
  886                    rpathdirs="$rpathdirs $dir"
  887                  fi
  888                  next= ;;
  889             *) next= ;;
  890           esac
  891         fi
  892       done
  893       if test "X$rpathdirs" != "X"; then
  894         if test -n ""$3""; then
  895           dnl libtool is used for linking. Use -R options.
  896           for dir in $rpathdirs; do
  897             $1="${$1}${$1:+ }-R$dir"
  898           done
  899         else
  900           dnl The linker is used for linking directly.
  901           if test -n "$hardcode_libdir_separator"; then
  902             dnl Weird platform: only the last -rpath option counts, the user
  903             dnl must pass all path elements in one option.
  904             alldirs=
  905             for dir in $rpathdirs; do
  906               alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir"
  907             done
  908             acl_save_libdir="$libdir"
  909             libdir="$alldirs"
  910             eval flag=\"$hardcode_libdir_flag_spec\"
  911             libdir="$acl_save_libdir"
  912             $1="$flag"
  913           else
  914             dnl The -rpath options are cumulative.
  915             for dir in $rpathdirs; do
  916               acl_save_libdir="$libdir"
  917               libdir="$dir"
  918               eval flag=\"$hardcode_libdir_flag_spec\"
  919               libdir="$acl_save_libdir"
  920               $1="${$1}${$1:+ }$flag"
  921             done
  922           fi
  923         fi
  924       fi
  925     fi
  926   fi
  927   AC_SUBST([$1])
  928 ])
  929 
  930 # lib-ld.m4 serial 3 (gettext-0.13)
  931 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
  932 dnl This file is free software; the Free Software Foundation
  933 dnl gives unlimited permission to copy and/or distribute it,
  934 dnl with or without modifications, as long as this notice is preserved.
  935 
  936 dnl Subroutines of libtool.m4,
  937 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
  938 dnl with libtool.m4.
  939 
  940 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
  941 AC_DEFUN([AC_LIB_PROG_LD_GNU],
  942 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
  943 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
  944 case `$LD -v 2>&1 </dev/null` in
  945 *GNU* | *'with BFD'*)
  946   acl_cv_prog_gnu_ld=yes ;;
  947 *)
  948   acl_cv_prog_gnu_ld=no ;;
  949 esac])
  950 with_gnu_ld=$acl_cv_prog_gnu_ld
  951 ])
  952 
  953 dnl From libtool-1.4. Sets the variable LD.
  954 AC_DEFUN([AC_LIB_PROG_LD],
  955 [AC_ARG_WITH(gnu-ld,
  956 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
  957 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
  958 AC_REQUIRE([AC_PROG_CC])dnl
  959 AC_REQUIRE([AC_CANONICAL_HOST])dnl
  960 # Prepare PATH_SEPARATOR.
  961 # The user is always right.
  962 if test "${PATH_SEPARATOR+set}" != set; then
  963   echo "#! /bin/sh" >conf$$.sh
  964   echo  "exit 0"   >>conf$$.sh
  965   chmod +x conf$$.sh
  966   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
  967     PATH_SEPARATOR=';'
  968   else
  969     PATH_SEPARATOR=:
  970   fi
  971   rm -f conf$$.sh
  972 fi
  973 ac_prog=ld
  974 if test "$GCC" = yes; then
  975   # Check if gcc -print-prog-name=ld gives a path.
  976   AC_MSG_CHECKING([for ld used by GCC])
  977   case $host in
  978   *-*-mingw*)
  979     # gcc leaves a trailing carriage return which upsets mingw
  980     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  981   *)
  982     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  983   esac
  984   case $ac_prog in
  985     # Accept absolute paths.
  986     [[\\/]* | [A-Za-z]:[\\/]*)]
  987       [re_direlt='/[^/][^/]*/\.\./']
  988       # Canonicalize the path of ld
  989       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
  990       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  991 	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
  992       done
  993       test -z "$LD" && LD="$ac_prog"
  994       ;;
  995   "")
  996     # If it fails, then pretend we aren't using GCC.
  997     ac_prog=ld
  998     ;;
  999   *)
 1000     # If it is relative, then search for the first ld in PATH.
 1001     with_gnu_ld=unknown
 1002     ;;
 1003   esac
 1004 elif test "$with_gnu_ld" = yes; then
 1005   AC_MSG_CHECKING([for GNU ld])
 1006 else
 1007   AC_MSG_CHECKING([for non-GNU ld])
 1008 fi
 1009 AC_CACHE_VAL(acl_cv_path_LD,
 1010 [if test -z "$LD"; then
 1011   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
 1012   for ac_dir in $PATH; do
 1013     test -z "$ac_dir" && ac_dir=.
 1014     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 1015       acl_cv_path_LD="$ac_dir/$ac_prog"
 1016       # Check to see if the program is GNU ld.  I'd rather use --version,
 1017       # but apparently some GNU ld's only accept -v.
 1018       # Break only if it was the GNU/non-GNU ld that we prefer.
 1019       case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
 1020       *GNU* | *'with BFD'*)
 1021 	test "$with_gnu_ld" != no && break ;;
 1022       *)
 1023 	test "$with_gnu_ld" != yes && break ;;
 1024       esac
 1025     fi
 1026   done
 1027   IFS="$ac_save_ifs"
 1028 else
 1029   acl_cv_path_LD="$LD" # Let the user override the test with a path.
 1030 fi])
 1031 LD="$acl_cv_path_LD"
 1032 if test -n "$LD"; then
 1033   AC_MSG_RESULT($LD)
 1034 else
 1035   AC_MSG_RESULT(no)
 1036 fi
 1037 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 1038 AC_LIB_PROG_LD_GNU
 1039 ])
 1040 
 1041 # Do all the work for Automake.  This macro actually does too much --
 1042 # some checks are only needed if your package does certain things.
 1043 # But this isn't really a big deal.
 1044 
 1045 # serial 1
 1046 
 1047 dnl Usage:
 1048 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
 1049 
 1050 AC_DEFUN([AM_INIT_AUTOMAKE],
 1051 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 1052 AC_REQUIRE([AC_PROG_INSTALL])
 1053 PACKAGE=[$1]
 1054 AC_SUBST(PACKAGE)
 1055 VERSION=[$2]
 1056 AC_SUBST(VERSION)
 1057 dnl test to see if srcdir already configured
 1058 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
 1059   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 1060 fi
 1061 ifelse([$3],,
 1062 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 1063 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
 1064 AC_REQUIRE([AM_SANITY_CHECK])
 1065 AC_REQUIRE([AC_ARG_PROGRAM])
 1066 dnl FIXME This is truly gross.
 1067 missing_dir=`cd $ac_aux_dir && pwd`
 1068 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
 1069 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
 1070 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
 1071 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
 1072 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
 1073 AC_REQUIRE([AC_PROG_MAKE_SET])])
 1074 
 1075 # Copyright 2002  Free Software Foundation, Inc.
 1076 
 1077 # This program is free software; you can redistribute it and/or modify
 1078 # it under the terms of the GNU General Public License as published by
 1079 # the Free Software Foundation; either version 2, or (at your option)
 1080 # any later version.
 1081 
 1082 # This program is distributed in the hope that it will be useful,
 1083 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 1084 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 1085 # GNU General Public License for more details.
 1086 
 1087 # You should have received a copy of the GNU General Public License
 1088 # along with this program; if not, write to the Free Software
 1089 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 1090 
 1091 # AM_AUTOMAKE_VERSION(VERSION)
 1092 # ----------------------------
 1093 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 1094 # generated from the m4 files accompanying Automake X.Y.
 1095 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
 1096 
 1097 # AM_SET_CURRENT_AUTOMAKE_VERSION
 1098 # -------------------------------
 1099 # Call AM_AUTOMAKE_VERSION so it can be traced.
 1100 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 1101 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 1102 	 [AM_AUTOMAKE_VERSION([1.4-p6])])
 1103 
 1104 #
 1105 # Check to make sure that the build environment is sane.
 1106 #
 1107 
 1108 AC_DEFUN([AM_SANITY_CHECK],
 1109 [AC_MSG_CHECKING([whether build environment is sane])
 1110 # Just in case
 1111 sleep 1
 1112 echo timestamp > conftestfile
 1113 # Do `set' in a subshell so we don't clobber the current shell's
 1114 # arguments.  Must try -L first in case configure is actually a
 1115 # symlink; some systems play weird games with the mod time of symlinks
 1116 # (eg FreeBSD returns the mod time of the symlink's containing
 1117 # directory).
 1118 if (
 1119    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
 1120    if test "[$]*" = "X"; then
 1121       # -L didn't work.
 1122       set X `ls -t $srcdir/configure conftestfile`
 1123    fi
 1124    if test "[$]*" != "X $srcdir/configure conftestfile" \
 1125       && test "[$]*" != "X conftestfile $srcdir/configure"; then
 1126 
 1127       # If neither matched, then we have a broken ls.  This can happen
 1128       # if, for instance, CONFIG_SHELL is bash and it inherits a
 1129       # broken ls alias from the environment.  This has actually
 1130       # happened.  Such a system could not be considered "sane".
 1131       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 1132 alias in your environment])
 1133    fi
 1134 
 1135    test "[$]2" = conftestfile
 1136    )
 1137 then
 1138    # Ok.
 1139    :
 1140 else
 1141    AC_MSG_ERROR([newly created file is older than distributed files!
 1142 Check your system clock])
 1143 fi
 1144 rm -f conftest*
 1145 AC_MSG_RESULT(yes)])
 1146 
 1147 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
 1148 dnl The program must properly implement --version.
 1149 AC_DEFUN([AM_MISSING_PROG],
 1150 [AC_MSG_CHECKING(for working $2)
 1151 # Run test in a subshell; some versions of sh will print an error if
 1152 # an executable is not found, even if stderr is redirected.
 1153 # Redirect stdin to placate older versions of autoconf.  Sigh.
 1154 if ($2 --version) < /dev/null > /dev/null 2>&1; then
 1155    $1=$2
 1156    AC_MSG_RESULT(found)
 1157 else
 1158    $1="$3/missing $2"
 1159    AC_MSG_RESULT(missing)
 1160 fi
 1161 AC_SUBST($1)])
 1162 
 1163 # Like AC_CONFIG_HEADER, but automatically create stamp file.
 1164 
 1165 AC_DEFUN([AM_CONFIG_HEADER],
 1166 [AC_PREREQ([2.12])
 1167 AC_CONFIG_HEADER([$1])
 1168 dnl When config.status generates a header, we must update the stamp-h file.
 1169 dnl This file resides in the same directory as the config header
 1170 dnl that is generated.  We must strip everything past the first ":",
 1171 dnl and everything past the last "/".
 1172 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
 1173 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
 1174 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
 1175 <<am_indx=1
 1176 for am_file in <<$1>>; do
 1177   case " <<$>>CONFIG_HEADERS " in
 1178   *" <<$>>am_file "*<<)>>
 1179     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
 1180     ;;
 1181   esac
 1182   am_indx=`expr "<<$>>am_indx" + 1`
 1183 done<<>>dnl>>)
 1184 changequote([,]))])
 1185