Blame m4/lib-link.m4

Packit a4058c
# lib-link.m4 serial 26 (gettext-0.18.2)
Packit a4058c
dnl Copyright (C) 2001-2014 Free Software Foundation, Inc.
Packit a4058c
dnl This file is free software; the Free Software Foundation
Packit a4058c
dnl gives unlimited permission to copy and/or distribute it,
Packit a4058c
dnl with or without modifications, as long as this notice is preserved.
Packit a4058c
Packit a4058c
dnl From Bruno Haible.
Packit a4058c
Packit a4058c
AC_PREREQ([2.54])
Packit a4058c
Packit a4058c
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
Packit a4058c
dnl the libraries corresponding to explicit and implicit dependencies.
Packit a4058c
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
Packit a4058c
dnl augments the CPPFLAGS variable.
Packit a4058c
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
Packit a4058c
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
Packit a4058c
AC_DEFUN([AC_LIB_LINKFLAGS],
Packit a4058c
[
Packit a4058c
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
Packit a4058c
  AC_REQUIRE([AC_LIB_RPATH])
Packit a4058c
  pushdef([Name],[m4_translit([$1],[./+-], [____])])
Packit a4058c
  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
Packit a4058c
                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
Packit a4058c
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
Packit a4058c
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
Packit a4058c
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
Packit a4058c
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
Packit a4058c
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
Packit a4058c
    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
Packit a4058c
  ])
Packit a4058c
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
Packit a4058c
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
Packit a4058c
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
Packit a4058c
  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
Packit a4058c
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
Packit a4058c
  AC_SUBST([LIB]NAME)
Packit a4058c
  AC_SUBST([LTLIB]NAME)
Packit a4058c
  AC_SUBST([LIB]NAME[_PREFIX])
Packit a4058c
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
Packit a4058c
  dnl results of this search when this library appears as a dependency.
Packit a4058c
  HAVE_LIB[]NAME=yes
Packit a4058c
  popdef([NAME])
Packit a4058c
  popdef([Name])
Packit a4058c
])
Packit a4058c
Packit a4058c
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
Packit a4058c
dnl searches for libname and the libraries corresponding to explicit and
Packit a4058c
dnl implicit dependencies, together with the specified include files and
Packit a4058c
dnl the ability to compile and link the specified testcode. The missing-message
Packit a4058c
dnl defaults to 'no' and may contain additional hints for the user.
Packit a4058c
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
Packit a4058c
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
Packit a4058c
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
Packit a4058c
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
Packit a4058c
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
Packit a4058c
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
Packit a4058c
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
Packit a4058c
[
Packit a4058c
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
Packit a4058c
  AC_REQUIRE([AC_LIB_RPATH])
Packit a4058c
  pushdef([Name],[m4_translit([$1],[./+-], [____])])
Packit a4058c
  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
Packit a4058c
                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
Packit a4058c
Packit a4058c
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
Packit a4058c
  dnl accordingly.
Packit a4058c
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
Packit a4058c
Packit a4058c
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
Packit a4058c
  dnl because if the user has installed lib[]Name and not disabled its use
Packit a4058c
  dnl via --without-lib[]Name-prefix, he wants to use it.
Packit a4058c
  ac_save_CPPFLAGS="$CPPFLAGS"
Packit a4058c
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
Packit a4058c
Packit a4058c
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
Packit a4058c
    ac_save_LIBS="$LIBS"
Packit a4058c
    dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
Packit a4058c
    dnl because these -l options might require -L options that are present in
Packit a4058c
    dnl LIBS. -l options benefit only from the -L options listed before it.
Packit a4058c
    dnl Otherwise, add it to the front of LIBS, because it may be a static
Packit a4058c
    dnl library that depends on another static library that is present in LIBS.
Packit a4058c
    dnl Static libraries benefit only from the static libraries listed after
Packit a4058c
    dnl it.
Packit a4058c
    case " $LIB[]NAME" in
Packit a4058c
      *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
Packit a4058c
      *)       LIBS="$LIB[]NAME $LIBS" ;;
Packit a4058c
    esac
Packit a4058c
    AC_LINK_IFELSE(
Packit a4058c
      [AC_LANG_PROGRAM([[$3]], [[$4]])],
Packit a4058c
      [ac_cv_lib[]Name=yes],
Packit a4058c
      [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
Packit a4058c
    LIBS="$ac_save_LIBS"
Packit a4058c
  ])
Packit a4058c
  if test "$ac_cv_lib[]Name" = yes; then
Packit a4058c
    HAVE_LIB[]NAME=yes
Packit a4058c
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
Packit a4058c
    AC_MSG_CHECKING([how to link with lib[]$1])
Packit a4058c
    AC_MSG_RESULT([$LIB[]NAME])
Packit a4058c
  else
Packit a4058c
    HAVE_LIB[]NAME=no
Packit a4058c
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
Packit a4058c
    dnl $INC[]NAME either.
Packit a4058c
    CPPFLAGS="$ac_save_CPPFLAGS"
Packit a4058c
    LIB[]NAME=
Packit a4058c
    LTLIB[]NAME=
Packit a4058c
    LIB[]NAME[]_PREFIX=
Packit a4058c
  fi
Packit a4058c
  AC_SUBST([HAVE_LIB]NAME)
Packit a4058c
  AC_SUBST([LIB]NAME)
Packit a4058c
  AC_SUBST([LTLIB]NAME)
Packit a4058c
  AC_SUBST([LIB]NAME[_PREFIX])
Packit a4058c
  popdef([NAME])
Packit a4058c
  popdef([Name])
Packit a4058c
])
Packit a4058c
Packit a4058c
dnl Determine the platform dependent parameters needed to use rpath:
Packit a4058c
dnl   acl_libext,
Packit a4058c
dnl   acl_shlibext,
Packit a4058c
dnl   acl_libname_spec,
Packit a4058c
dnl   acl_library_names_spec,
Packit a4058c
dnl   acl_hardcode_libdir_flag_spec,
Packit a4058c
dnl   acl_hardcode_libdir_separator,
Packit a4058c
dnl   acl_hardcode_direct,
Packit a4058c
dnl   acl_hardcode_minus_L.
Packit a4058c
AC_DEFUN([AC_LIB_RPATH],
Packit a4058c
[
Packit a4058c
  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
Packit a4058c
  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
Packit a4058c
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
Packit a4058c
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
Packit a4058c
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
Packit a4058c
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
Packit a4058c
  AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
Packit a4058c
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
Packit a4058c
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
Packit a4058c
    . ./conftest.sh
Packit a4058c
    rm -f ./conftest.sh
Packit a4058c
    acl_cv_rpath=done
Packit a4058c
  ])
Packit a4058c
  wl="$acl_cv_wl"
Packit a4058c
  acl_libext="$acl_cv_libext"
Packit a4058c
  acl_shlibext="$acl_cv_shlibext"
Packit a4058c
  acl_libname_spec="$acl_cv_libname_spec"
Packit a4058c
  acl_library_names_spec="$acl_cv_library_names_spec"
Packit a4058c
  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
Packit a4058c
  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
Packit a4058c
  acl_hardcode_direct="$acl_cv_hardcode_direct"
Packit a4058c
  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
Packit a4058c
  dnl Determine whether the user wants rpath handling at all.
Packit a4058c
  AC_ARG_ENABLE([rpath],
Packit a4058c
    [  --disable-rpath         do not hardcode runtime library paths],
Packit a4058c
    :, enable_rpath=yes)
Packit a4058c
])
Packit a4058c
Packit a4058c
dnl AC_LIB_FROMPACKAGE(name, package)
Packit a4058c
dnl declares that libname comes from the given package. The configure file
Packit a4058c
dnl will then not have a --with-libname-prefix option but a
Packit a4058c
dnl --with-package-prefix option. Several libraries can come from the same
Packit a4058c
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
Packit a4058c
dnl macro call that searches for libname.
Packit a4058c
AC_DEFUN([AC_LIB_FROMPACKAGE],
Packit a4058c
[
Packit a4058c
  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
Packit a4058c
                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
Packit a4058c
  define([acl_frompackage_]NAME, [$2])
Packit a4058c
  popdef([NAME])
Packit a4058c
  pushdef([PACK],[$2])
Packit a4058c
  pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
Packit a4058c
                                     [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
Packit a4058c
  define([acl_libsinpackage_]PACKUP,
Packit a4058c
    m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
Packit a4058c
  popdef([PACKUP])
Packit a4058c
  popdef([PACK])
Packit a4058c
])
Packit a4058c
Packit a4058c
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
Packit a4058c
dnl the libraries corresponding to explicit and implicit dependencies.
Packit a4058c
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
Packit a4058c
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
Packit a4058c
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
Packit a4058c
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
Packit a4058c
[
Packit a4058c
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
Packit a4058c
  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
Packit a4058c
                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
Packit a4058c
  pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
Packit a4058c
  pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
Packit a4058c
                                     [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
Packit a4058c
  pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
Packit a4058c
  dnl Autoconf >= 2.61 supports dots in --with options.
Packit a4058c
  pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
Packit a4058c
  dnl By default, look in $includedir and $libdir.
Packit a4058c
  use_additional=yes
Packit a4058c
  AC_LIB_WITH_FINAL_PREFIX([
Packit a4058c
    eval additional_includedir=\"$includedir\"
Packit a4058c
    eval additional_libdir=\"$libdir\"
Packit a4058c
  ])
Packit a4058c
  AC_ARG_WITH(P_A_C_K[-prefix],
Packit a4058c
[[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
Packit a4058c
  --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
Packit a4058c
[
Packit a4058c
    if test "X$withval" = "Xno"; then
Packit a4058c
      use_additional=no
Packit a4058c
    else
Packit a4058c
      if test "X$withval" = "X"; then
Packit a4058c
        AC_LIB_WITH_FINAL_PREFIX([
Packit a4058c
          eval additional_includedir=\"$includedir\"
Packit a4058c
          eval additional_libdir=\"$libdir\"
Packit a4058c
        ])
Packit a4058c
      else
Packit a4058c
        additional_includedir="$withval/include"
Packit a4058c
        additional_libdir="$withval/$acl_libdirstem"
Packit a4058c
        if test "$acl_libdirstem2" != "$acl_libdirstem" \
Packit a4058c
           && ! test -d "$withval/$acl_libdirstem"; then
Packit a4058c
          additional_libdir="$withval/$acl_libdirstem2"
Packit a4058c
        fi
Packit a4058c
      fi
Packit a4058c
    fi
Packit a4058c
])
Packit a4058c
  dnl Search the library and its dependencies in $additional_libdir and
Packit a4058c
  dnl $LDFLAGS. Using breadth-first-seach.
Packit a4058c
  LIB[]NAME=
Packit a4058c
  LTLIB[]NAME=
Packit a4058c
  INC[]NAME=
Packit a4058c
  LIB[]NAME[]_PREFIX=
Packit a4058c
  dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
Packit a4058c
  dnl computed. So it has to be reset here.
Packit a4058c
  HAVE_LIB[]NAME=
Packit a4058c
  rpathdirs=
Packit a4058c
  ltrpathdirs=
Packit a4058c
  names_already_handled=
Packit a4058c
  names_next_round='$1 $2'
Packit a4058c
  while test -n "$names_next_round"; do
Packit a4058c
    names_this_round="$names_next_round"
Packit a4058c
    names_next_round=
Packit a4058c
    for name in $names_this_round; do
Packit a4058c
      already_handled=
Packit a4058c
      for n in $names_already_handled; do
Packit a4058c
        if test "$n" = "$name"; then
Packit a4058c
          already_handled=yes
Packit a4058c
          break
Packit a4058c
        fi
Packit a4058c
      done
Packit a4058c
      if test -z "$already_handled"; then
Packit a4058c
        names_already_handled="$names_already_handled $name"
Packit a4058c
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
Packit a4058c
        dnl or AC_LIB_HAVE_LINKFLAGS call.
Packit a4058c
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
Packit a4058c
        eval value=\"\$HAVE_LIB$uppername\"
Packit a4058c
        if test -n "$value"; then
Packit a4058c
          if test "$value" = yes; then
Packit a4058c
            eval value=\"\$LIB$uppername\"
Packit a4058c
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
Packit a4058c
            eval value=\"\$LTLIB$uppername\"
Packit a4058c
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
Packit a4058c
          else
Packit a4058c
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
Packit a4058c
            dnl that this library doesn't exist. So just drop it.
Packit a4058c
            :
Packit a4058c
          fi
Packit a4058c
        else
Packit a4058c
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
Packit a4058c
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
Packit a4058c
          found_dir=
Packit a4058c
          found_la=
Packit a4058c
          found_so=
Packit a4058c
          found_a=
Packit a4058c
          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
Packit a4058c
          if test -n "$acl_shlibext"; then
Packit a4058c
            shrext=".$acl_shlibext"             # typically: shrext=.so
Packit a4058c
          else
Packit a4058c
            shrext=
Packit a4058c
          fi
Packit a4058c
          if test $use_additional = yes; then
Packit a4058c
            dir="$additional_libdir"
Packit a4058c
            dnl The same code as in the loop below:
Packit a4058c
            dnl First look for a shared library.
Packit a4058c
            if test -n "$acl_shlibext"; then
Packit a4058c
              if test -f "$dir/$libname$shrext"; then
Packit a4058c
                found_dir="$dir"
Packit a4058c
                found_so="$dir/$libname$shrext"
Packit a4058c
              else
Packit a4058c
                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
Packit a4058c
                  ver=`(cd "$dir" && \
Packit a4058c
                        for f in "$libname$shrext".*; do echo "$f"; done \
Packit a4058c
                        | sed -e "s,^$libname$shrext\\\\.,," \
Packit a4058c
                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
Packit a4058c
                        | sed 1q ) 2>/dev/null`
Packit a4058c
                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
Packit a4058c
                    found_dir="$dir"
Packit a4058c
                    found_so="$dir/$libname$shrext.$ver"
Packit a4058c
                  fi
Packit a4058c
                else
Packit a4058c
                  eval library_names=\"$acl_library_names_spec\"
Packit a4058c
                  for f in $library_names; do
Packit a4058c
                    if test -f "$dir/$f"; then
Packit a4058c
                      found_dir="$dir"
Packit a4058c
                      found_so="$dir/$f"
Packit a4058c
                      break
Packit a4058c
                    fi
Packit a4058c
                  done
Packit a4058c
                fi
Packit a4058c
              fi
Packit a4058c
            fi
Packit a4058c
            dnl Then look for a static library.
Packit a4058c
            if test "X$found_dir" = "X"; then
Packit a4058c
              if test -f "$dir/$libname.$acl_libext"; then
Packit a4058c
                found_dir="$dir"
Packit a4058c
                found_a="$dir/$libname.$acl_libext"
Packit a4058c
              fi
Packit a4058c
            fi
Packit a4058c
            if test "X$found_dir" != "X"; then
Packit a4058c
              if test -f "$dir/$libname.la"; then
Packit a4058c
                found_la="$dir/$libname.la"
Packit a4058c
              fi
Packit a4058c
            fi
Packit a4058c
          fi
Packit a4058c
          if test "X$found_dir" = "X"; then
Packit a4058c
            for x in $LDFLAGS $LTLIB[]NAME; do
Packit a4058c
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
Packit a4058c
              case "$x" in
Packit a4058c
                -L*)
Packit a4058c
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
Packit a4058c
                  dnl First look for a shared library.
Packit a4058c
                  if test -n "$acl_shlibext"; then
Packit a4058c
                    if test -f "$dir/$libname$shrext"; then
Packit a4058c
                      found_dir="$dir"
Packit a4058c
                      found_so="$dir/$libname$shrext"
Packit a4058c
                    else
Packit a4058c
                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
Packit a4058c
                        ver=`(cd "$dir" && \
Packit a4058c
                              for f in "$libname$shrext".*; do echo "$f"; done \
Packit a4058c
                              | sed -e "s,^$libname$shrext\\\\.,," \
Packit a4058c
                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
Packit a4058c
                              | sed 1q ) 2>/dev/null`
Packit a4058c
                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
Packit a4058c
                          found_dir="$dir"
Packit a4058c
                          found_so="$dir/$libname$shrext.$ver"
Packit a4058c
                        fi
Packit a4058c
                      else
Packit a4058c
                        eval library_names=\"$acl_library_names_spec\"
Packit a4058c
                        for f in $library_names; do
Packit a4058c
                          if test -f "$dir/$f"; then
Packit a4058c
                            found_dir="$dir"
Packit a4058c
                            found_so="$dir/$f"
Packit a4058c
                            break
Packit a4058c
                          fi
Packit a4058c
                        done
Packit a4058c
                      fi
Packit a4058c
                    fi
Packit a4058c
                  fi
Packit a4058c
                  dnl Then look for a static library.
Packit a4058c
                  if test "X$found_dir" = "X"; then
Packit a4058c
                    if test -f "$dir/$libname.$acl_libext"; then
Packit a4058c
                      found_dir="$dir"
Packit a4058c
                      found_a="$dir/$libname.$acl_libext"
Packit a4058c
                    fi
Packit a4058c
                  fi
Packit a4058c
                  if test "X$found_dir" != "X"; then
Packit a4058c
                    if test -f "$dir/$libname.la"; then
Packit a4058c
                      found_la="$dir/$libname.la"
Packit a4058c
                    fi
Packit a4058c
                  fi
Packit a4058c
                  ;;
Packit a4058c
              esac
Packit a4058c
              if test "X$found_dir" != "X"; then
Packit a4058c
                break
Packit a4058c
              fi
Packit a4058c
            done
Packit a4058c
          fi
Packit a4058c
          if test "X$found_dir" != "X"; then
Packit a4058c
            dnl Found the library.
Packit a4058c
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
Packit a4058c
            if test "X$found_so" != "X"; then
Packit a4058c
              dnl Linking with a shared library. We attempt to hardcode its
Packit a4058c
              dnl directory into the executable's runpath, unless it's the
Packit a4058c
              dnl standard /usr/lib.
Packit a4058c
              if test "$enable_rpath" = no \
Packit a4058c
                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
Packit a4058c
                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
Packit a4058c
                dnl No hardcoding is needed.
Packit a4058c
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
Packit a4058c
              else
Packit a4058c
                dnl Use an explicit option to hardcode DIR into the resulting
Packit a4058c
                dnl binary.
Packit a4058c
                dnl Potentially add DIR to ltrpathdirs.
Packit a4058c
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
Packit a4058c
                haveit=
Packit a4058c
                for x in $ltrpathdirs; do
Packit a4058c
                  if test "X$x" = "X$found_dir"; then
Packit a4058c
                    haveit=yes
Packit a4058c
                    break
Packit a4058c
                  fi
Packit a4058c
                done
Packit a4058c
                if test -z "$haveit"; then
Packit a4058c
                  ltrpathdirs="$ltrpathdirs $found_dir"
Packit a4058c
                fi
Packit a4058c
                dnl The hardcoding into $LIBNAME is system dependent.
Packit a4058c
                if test "$acl_hardcode_direct" = yes; then
Packit a4058c
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
Packit a4058c
                  dnl resulting binary.
Packit a4058c
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
Packit a4058c
                else
Packit a4058c
                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
Packit a4058c
                    dnl Use an explicit option to hardcode DIR into the resulting
Packit a4058c
                    dnl binary.
Packit a4058c
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
Packit a4058c
                    dnl Potentially add DIR to rpathdirs.
Packit a4058c
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
Packit a4058c
                    haveit=
Packit a4058c
                    for x in $rpathdirs; do
Packit a4058c
                      if test "X$x" = "X$found_dir"; then
Packit a4058c
                        haveit=yes
Packit a4058c
                        break
Packit a4058c
                      fi
Packit a4058c
                    done
Packit a4058c
                    if test -z "$haveit"; then
Packit a4058c
                      rpathdirs="$rpathdirs $found_dir"
Packit a4058c
                    fi
Packit a4058c
                  else
Packit a4058c
                    dnl Rely on "-L$found_dir".
Packit a4058c
                    dnl But don't add it if it's already contained in the LDFLAGS
Packit a4058c
                    dnl or the already constructed $LIBNAME
Packit a4058c
                    haveit=
Packit a4058c
                    for x in $LDFLAGS $LIB[]NAME; do
Packit a4058c
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
Packit a4058c
                      if test "X$x" = "X-L$found_dir"; then
Packit a4058c
                        haveit=yes
Packit a4058c
                        break
Packit a4058c
                      fi
Packit a4058c
                    done
Packit a4058c
                    if test -z "$haveit"; then
Packit a4058c
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
Packit a4058c
                    fi
Packit a4058c
                    if test "$acl_hardcode_minus_L" != no; then
Packit a4058c
                      dnl FIXME: Not sure whether we should use
Packit a4058c
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
Packit a4058c
                      dnl here.
Packit a4058c
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
Packit a4058c
                    else
Packit a4058c
                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
Packit a4058c
                      dnl here, because this doesn't fit in flags passed to the
Packit a4058c
                      dnl compiler. So give up. No hardcoding. This affects only
Packit a4058c
                      dnl very old systems.
Packit a4058c
                      dnl FIXME: Not sure whether we should use
Packit a4058c
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
Packit a4058c
                      dnl here.
Packit a4058c
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
Packit a4058c
                    fi
Packit a4058c
                  fi
Packit a4058c
                fi
Packit a4058c
              fi
Packit a4058c
            else
Packit a4058c
              if test "X$found_a" != "X"; then
Packit a4058c
                dnl Linking with a static library.
Packit a4058c
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
Packit a4058c
              else
Packit a4058c
                dnl We shouldn't come here, but anyway it's good to have a
Packit a4058c
                dnl fallback.
Packit a4058c
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
Packit a4058c
              fi
Packit a4058c
            fi
Packit a4058c
            dnl Assume the include files are nearby.
Packit a4058c
            additional_includedir=
Packit a4058c
            case "$found_dir" in
Packit a4058c
              */$acl_libdirstem | */$acl_libdirstem/)
Packit a4058c
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
Packit a4058c
                if test "$name" = '$1'; then
Packit a4058c
                  LIB[]NAME[]_PREFIX="$basedir"
Packit a4058c
                fi
Packit a4058c
                additional_includedir="$basedir/include"
Packit a4058c
                ;;
Packit a4058c
              */$acl_libdirstem2 | */$acl_libdirstem2/)
Packit a4058c
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
Packit a4058c
                if test "$name" = '$1'; then
Packit a4058c
                  LIB[]NAME[]_PREFIX="$basedir"
Packit a4058c
                fi
Packit a4058c
                additional_includedir="$basedir/include"
Packit a4058c
                ;;
Packit a4058c
            esac
Packit a4058c
            if test "X$additional_includedir" != "X"; then
Packit a4058c
              dnl Potentially add $additional_includedir to $INCNAME.
Packit a4058c
              dnl But don't add it
Packit a4058c
              dnl   1. if it's the standard /usr/include,
Packit a4058c
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
Packit a4058c
              dnl   3. if it's already present in $CPPFLAGS or the already
Packit a4058c
              dnl      constructed $INCNAME,
Packit a4058c
              dnl   4. if it doesn't exist as a directory.
Packit a4058c
              if test "X$additional_includedir" != "X/usr/include"; then
Packit a4058c
                haveit=
Packit a4058c
                if test "X$additional_includedir" = "X/usr/local/include"; then
Packit a4058c
                  if test -n "$GCC"; then
Packit a4058c
                    case $host_os in
Packit a4058c
                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
Packit a4058c
                    esac
Packit a4058c
                  fi
Packit a4058c
                fi
Packit a4058c
                if test -z "$haveit"; then
Packit a4058c
                  for x in $CPPFLAGS $INC[]NAME; do
Packit a4058c
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
Packit a4058c
                    if test "X$x" = "X-I$additional_includedir"; then
Packit a4058c
                      haveit=yes
Packit a4058c
                      break
Packit a4058c
                    fi
Packit a4058c
                  done
Packit a4058c
                  if test -z "$haveit"; then
Packit a4058c
                    if test -d "$additional_includedir"; then
Packit a4058c
                      dnl Really add $additional_includedir to $INCNAME.
Packit a4058c
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
Packit a4058c
                    fi
Packit a4058c
                  fi
Packit a4058c
                fi
Packit a4058c
              fi
Packit a4058c
            fi
Packit a4058c
            dnl Look for dependencies.
Packit a4058c
            if test -n "$found_la"; then
Packit a4058c
              dnl Read the .la file. It defines the variables
Packit a4058c
              dnl dlname, library_names, old_library, dependency_libs, current,
Packit a4058c
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
Packit a4058c
              save_libdir="$libdir"
Packit a4058c
              case "$found_la" in
Packit a4058c
                */* | *\\*) . "$found_la" ;;
Packit a4058c
                *) . "./$found_la" ;;
Packit a4058c
              esac
Packit a4058c
              libdir="$save_libdir"
Packit a4058c
              dnl We use only dependency_libs.
Packit a4058c
              for dep in $dependency_libs; do
Packit a4058c
                case "$dep" in
Packit a4058c
                  -L*)
Packit a4058c
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
Packit a4058c
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
Packit a4058c
                    dnl But don't add it
Packit a4058c
                    dnl   1. if it's the standard /usr/lib,
Packit a4058c
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
Packit a4058c
                    dnl   3. if it's already present in $LDFLAGS or the already
Packit a4058c
                    dnl      constructed $LIBNAME,
Packit a4058c
                    dnl   4. if it doesn't exist as a directory.
Packit a4058c
                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
Packit a4058c
                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
Packit a4058c
                      haveit=
Packit a4058c
                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
Packit a4058c
                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
Packit a4058c
                        if test -n "$GCC"; then
Packit a4058c
                          case $host_os in
Packit a4058c
                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
Packit a4058c
                          esac
Packit a4058c
                        fi
Packit a4058c
                      fi
Packit a4058c
                      if test -z "$haveit"; then
Packit a4058c
                        haveit=
Packit a4058c
                        for x in $LDFLAGS $LIB[]NAME; do
Packit a4058c
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
Packit a4058c
                          if test "X$x" = "X-L$additional_libdir"; then
Packit a4058c
                            haveit=yes
Packit a4058c
                            break
Packit a4058c
                          fi
Packit a4058c
                        done
Packit a4058c
                        if test -z "$haveit"; then
Packit a4058c
                          if test -d "$additional_libdir"; then
Packit a4058c
                            dnl Really add $additional_libdir to $LIBNAME.
Packit a4058c
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
Packit a4058c
                          fi
Packit a4058c
                        fi
Packit a4058c
                        haveit=
Packit a4058c
                        for x in $LDFLAGS $LTLIB[]NAME; do
Packit a4058c
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
Packit a4058c
                          if test "X$x" = "X-L$additional_libdir"; then
Packit a4058c
                            haveit=yes
Packit a4058c
                            break
Packit a4058c
                          fi
Packit a4058c
                        done
Packit a4058c
                        if test -z "$haveit"; then
Packit a4058c
                          if test -d "$additional_libdir"; then
Packit a4058c
                            dnl Really add $additional_libdir to $LTLIBNAME.
Packit a4058c
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
Packit a4058c
                          fi
Packit a4058c
                        fi
Packit a4058c
                      fi
Packit a4058c
                    fi
Packit a4058c
                    ;;
Packit a4058c
                  -R*)
Packit a4058c
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
Packit a4058c
                    if test "$enable_rpath" != no; then
Packit a4058c
                      dnl Potentially add DIR to rpathdirs.
Packit a4058c
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
Packit a4058c
                      haveit=
Packit a4058c
                      for x in $rpathdirs; do
Packit a4058c
                        if test "X$x" = "X$dir"; then
Packit a4058c
                          haveit=yes
Packit a4058c
                          break
Packit a4058c
                        fi
Packit a4058c
                      done
Packit a4058c
                      if test -z "$haveit"; then
Packit a4058c
                        rpathdirs="$rpathdirs $dir"
Packit a4058c
                      fi
Packit a4058c
                      dnl Potentially add DIR to ltrpathdirs.
Packit a4058c
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
Packit a4058c
                      haveit=
Packit a4058c
                      for x in $ltrpathdirs; do
Packit a4058c
                        if test "X$x" = "X$dir"; then
Packit a4058c
                          haveit=yes
Packit a4058c
                          break
Packit a4058c
                        fi
Packit a4058c
                      done
Packit a4058c
                      if test -z "$haveit"; then
Packit a4058c
                        ltrpathdirs="$ltrpathdirs $dir"
Packit a4058c
                      fi
Packit a4058c
                    fi
Packit a4058c
                    ;;
Packit a4058c
                  -l*)
Packit a4058c
                    dnl Handle this in the next round.
Packit a4058c
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
Packit a4058c
                    ;;
Packit a4058c
                  *.la)
Packit a4058c
                    dnl Handle this in the next round. Throw away the .la's
Packit a4058c
                    dnl directory; it is already contained in a preceding -L
Packit a4058c
                    dnl option.
Packit a4058c
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
Packit a4058c
                    ;;
Packit a4058c
                  *)
Packit a4058c
                    dnl Most likely an immediate library name.
Packit a4058c
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
Packit a4058c
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
Packit a4058c
                    ;;
Packit a4058c
                esac
Packit a4058c
              done
Packit a4058c
            fi
Packit a4058c
          else
Packit a4058c
            dnl Didn't find the library; assume it is in the system directories
Packit a4058c
            dnl known to the linker and runtime loader. (All the system
Packit a4058c
            dnl directories known to the linker should also be known to the
Packit a4058c
            dnl runtime loader, otherwise the system is severely misconfigured.)
Packit a4058c
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
Packit a4058c
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
Packit a4058c
          fi
Packit a4058c
        fi
Packit a4058c
      fi
Packit a4058c
    done
Packit a4058c
  done
Packit a4058c
  if test "X$rpathdirs" != "X"; then
Packit a4058c
    if test -n "$acl_hardcode_libdir_separator"; then
Packit a4058c
      dnl Weird platform: only the last -rpath option counts, the user must
Packit a4058c
      dnl pass all path elements in one option. We can arrange that for a
Packit a4058c
      dnl single library, but not when more than one $LIBNAMEs are used.
Packit a4058c
      alldirs=
Packit a4058c
      for found_dir in $rpathdirs; do
Packit a4058c
        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
Packit a4058c
      done
Packit a4058c
      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
Packit a4058c
      acl_save_libdir="$libdir"
Packit a4058c
      libdir="$alldirs"
Packit a4058c
      eval flag=\"$acl_hardcode_libdir_flag_spec\"
Packit a4058c
      libdir="$acl_save_libdir"
Packit a4058c
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
Packit a4058c
    else
Packit a4058c
      dnl The -rpath options are cumulative.
Packit a4058c
      for found_dir in $rpathdirs; do
Packit a4058c
        acl_save_libdir="$libdir"
Packit a4058c
        libdir="$found_dir"
Packit a4058c
        eval flag=\"$acl_hardcode_libdir_flag_spec\"
Packit a4058c
        libdir="$acl_save_libdir"
Packit a4058c
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
Packit a4058c
      done
Packit a4058c
    fi
Packit a4058c
  fi
Packit a4058c
  if test "X$ltrpathdirs" != "X"; then
Packit a4058c
    dnl When using libtool, the option that works for both libraries and
Packit a4058c
    dnl executables is -R. The -R options are cumulative.
Packit a4058c
    for found_dir in $ltrpathdirs; do
Packit a4058c
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
Packit a4058c
    done
Packit a4058c
  fi
Packit a4058c
  popdef([P_A_C_K])
Packit a4058c
  popdef([PACKLIBS])
Packit a4058c
  popdef([PACKUP])
Packit a4058c
  popdef([PACK])
Packit a4058c
  popdef([NAME])
Packit a4058c
])
Packit a4058c
Packit a4058c
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
Packit a4058c
dnl unless already present in VAR.
Packit a4058c
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
Packit a4058c
dnl contains two or three consecutive elements that belong together.
Packit a4058c
AC_DEFUN([AC_LIB_APPENDTOVAR],
Packit a4058c
[
Packit a4058c
  for element in [$2]; do
Packit a4058c
    haveit=
Packit a4058c
    for x in $[$1]; do
Packit a4058c
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
Packit a4058c
      if test "X$x" = "X$element"; then
Packit a4058c
        haveit=yes
Packit a4058c
        break
Packit a4058c
      fi
Packit a4058c
    done
Packit a4058c
    if test -z "$haveit"; then
Packit a4058c
      [$1]="${[$1]}${[$1]:+ }$element"
Packit a4058c
    fi
Packit a4058c
  done
Packit a4058c
])
Packit a4058c
Packit a4058c
dnl For those cases where a variable contains several -L and -l options
Packit a4058c
dnl referring to unknown libraries and directories, this macro determines the
Packit a4058c
dnl necessary additional linker options for the runtime path.
Packit a4058c
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
Packit a4058c
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
Packit a4058c
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
Packit a4058c
dnl otherwise linking without libtool is assumed.
Packit a4058c
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
Packit a4058c
[
Packit a4058c
  AC_REQUIRE([AC_LIB_RPATH])
Packit a4058c
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
Packit a4058c
  $1=
Packit a4058c
  if test "$enable_rpath" != no; then
Packit a4058c
    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
Packit a4058c
      dnl Use an explicit option to hardcode directories into the resulting
Packit a4058c
      dnl binary.
Packit a4058c
      rpathdirs=
Packit a4058c
      next=
Packit a4058c
      for opt in $2; do
Packit a4058c
        if test -n "$next"; then
Packit a4058c
          dir="$next"
Packit a4058c
          dnl No need to hardcode the standard /usr/lib.
Packit a4058c
          if test "X$dir" != "X/usr/$acl_libdirstem" \
Packit a4058c
             && test "X$dir" != "X/usr/$acl_libdirstem2"; then
Packit a4058c
            rpathdirs="$rpathdirs $dir"
Packit a4058c
          fi
Packit a4058c
          next=
Packit a4058c
        else
Packit a4058c
          case $opt in
Packit a4058c
            -L) next=yes ;;
Packit a4058c
            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
Packit a4058c
                 dnl No need to hardcode the standard /usr/lib.
Packit a4058c
                 if test "X$dir" != "X/usr/$acl_libdirstem" \
Packit a4058c
                    && test "X$dir" != "X/usr/$acl_libdirstem2"; then
Packit a4058c
                   rpathdirs="$rpathdirs $dir"
Packit a4058c
                 fi
Packit a4058c
                 next= ;;
Packit a4058c
            *) next= ;;
Packit a4058c
          esac
Packit a4058c
        fi
Packit a4058c
      done
Packit a4058c
      if test "X$rpathdirs" != "X"; then
Packit a4058c
        if test -n ""$3""; then
Packit a4058c
          dnl libtool is used for linking. Use -R options.
Packit a4058c
          for dir in $rpathdirs; do
Packit a4058c
            $1="${$1}${$1:+ }-R$dir"
Packit a4058c
          done
Packit a4058c
        else
Packit a4058c
          dnl The linker is used for linking directly.
Packit a4058c
          if test -n "$acl_hardcode_libdir_separator"; then
Packit a4058c
            dnl Weird platform: only the last -rpath option counts, the user
Packit a4058c
            dnl must pass all path elements in one option.
Packit a4058c
            alldirs=
Packit a4058c
            for dir in $rpathdirs; do
Packit a4058c
              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
Packit a4058c
            done
Packit a4058c
            acl_save_libdir="$libdir"
Packit a4058c
            libdir="$alldirs"
Packit a4058c
            eval flag=\"$acl_hardcode_libdir_flag_spec\"
Packit a4058c
            libdir="$acl_save_libdir"
Packit a4058c
            $1="$flag"
Packit a4058c
          else
Packit a4058c
            dnl The -rpath options are cumulative.
Packit a4058c
            for dir in $rpathdirs; do
Packit a4058c
              acl_save_libdir="$libdir"
Packit a4058c
              libdir="$dir"
Packit a4058c
              eval flag=\"$acl_hardcode_libdir_flag_spec\"
Packit a4058c
              libdir="$acl_save_libdir"
Packit a4058c
              $1="${$1}${$1:+ }$flag"
Packit a4058c
            done
Packit a4058c
          fi
Packit a4058c
        fi
Packit a4058c
      fi
Packit a4058c
    fi
Packit a4058c
  fi
Packit a4058c
  AC_SUBST([$1])
Packit a4058c
])