annotate kdiff3/admin/libtool.m4.in @ 2:53b8ecbce0cb

Initial revision
author joachim99
date Sun, 18 Aug 2002 16:23:32 +0000
parents
children 415083d043f3
rev   line source
joachim99@2 1 ## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
joachim99@2 2 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
joachim99@2 3 ## Free Software Foundation, Inc.
joachim99@2 4 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
joachim99@2 5 ##
joachim99@2 6 ## This program is free software; you can redistribute it and/or modify
joachim99@2 7 ## it under the terms of the GNU General Public License as published by
joachim99@2 8 ## the Free Software Foundation; either version 2 of the License, or
joachim99@2 9 ## (at your option) any later version.
joachim99@2 10 ##
joachim99@2 11 ## This program is distributed in the hope that it will be useful, but
joachim99@2 12 ## WITHOUT ANY WARRANTY; without even the implied warranty of
joachim99@2 13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
joachim99@2 14 ## General Public License for more details.
joachim99@2 15 ##
joachim99@2 16 ## You should have received a copy of the GNU General Public License
joachim99@2 17 ## along with this program; if not, write to the Free Software
joachim99@2 18 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
joachim99@2 19 ##
joachim99@2 20 ## As a special exception to the GNU General Public License, if you
joachim99@2 21 ## distribute this file as part of a program that contains a
joachim99@2 22 ## configuration script generated by Autoconf, you may include it under
joachim99@2 23 ## the same distribution terms that you use for the rest of that program.
joachim99@2 24
joachim99@2 25 # serial 46 AC_PROG_LIBTOOL
joachim99@2 26 AC_DEFUN([AC_PROG_LIBTOOL],
joachim99@2 27 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
joachim99@2 28 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
joachim99@2 29 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
joachim99@2 30 AC_PROVIDE_IFELSE([AC_PROG_CXX],
joachim99@2 31 [AC_LIBTOOL_CXX],
joachim99@2 32 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
joachim99@2 33 ])])
joachim99@2 34
joachim99@2 35 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
joachim99@2 36 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
joachim99@2 37 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
joachim99@2 38 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
joachim99@2 39 [AC_LIBTOOL_GCJ],
joachim99@2 40 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
joachim99@2 41 [AC_LIBTOOL_GCJ],
joachim99@2 42 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
joachim99@2 43 [AC_LIBTOOL_GCJ],
joachim99@2 44 [ifdef([AC_PROG_GCJ],
joachim99@2 45 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
joachim99@2 46 ])])
joachim99@2 47 ifdef([A][M_PROG_GCJ],
joachim99@2 48 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
joachim99@2 49 ])])
joachim99@2 50 ifdef([LT_AC_PROG_GCJ],
joachim99@2 51 [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
joachim99@2 52 ])])])])])])
joachim99@2 53
joachim99@2 54 AC_DEFUN([_AC_PROG_LIBTOOL],
joachim99@2 55 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
joachim99@2 56 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
joachim99@2 57 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
joachim99@2 58
joachim99@2 59 # Save cache, so that ltconfig can load it
joachim99@2 60 AC_CACHE_SAVE
joachim99@2 61
joachim99@2 62 # Actually configure libtool. ac_aux_dir is where install-sh is found.
joachim99@2 63 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
joachim99@2 64 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
joachim99@2 65 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
joachim99@2 66 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
joachim99@2 67 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
joachim99@2 68 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
joachim99@2 69 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
joachim99@2 70 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
joachim99@2 71 || AC_MSG_ERROR([libtool configure failed])
joachim99@2 72
joachim99@2 73 # Reload cache, that may have been modified by ltconfig
joachim99@2 74 AC_CACHE_LOAD
joachim99@2 75
joachim99@2 76 # This can be used to rebuild libtool when needed
joachim99@2 77 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
joachim99@2 78
joachim99@2 79 # Always use our own libtool.
joachim99@2 80 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
joachim99@2 81 AC_SUBST(LIBTOOL)dnl
joachim99@2 82
joachim99@2 83 # Redirect the config.log output again, so that the ltconfig log is not
joachim99@2 84 # clobbered by the next message.
joachim99@2 85 exec 5>>./config.log
joachim99@2 86 ])
joachim99@2 87
joachim99@2 88 AC_DEFUN([AC_LIBTOOL_SETUP],
joachim99@2 89 [AC_PREREQ(2.13)dnl
joachim99@2 90 AC_REQUIRE([AC_ENABLE_SHARED])dnl
joachim99@2 91 AC_REQUIRE([AC_ENABLE_STATIC])dnl
joachim99@2 92 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
joachim99@2 93 AC_REQUIRE([AC_CANONICAL_HOST])dnl
joachim99@2 94 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
joachim99@2 95 AC_REQUIRE([AC_PROG_CC])dnl
joachim99@2 96 AC_REQUIRE([AC_PROG_LD])dnl
joachim99@2 97 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
joachim99@2 98 AC_REQUIRE([AC_PROG_NM])dnl
joachim99@2 99 AC_REQUIRE([AC_PROG_LN_S])dnl
joachim99@2 100 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
joachim99@2 101 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
joachim99@2 102 AC_REQUIRE([AC_OBJEXT])dnl
joachim99@2 103 AC_REQUIRE([AC_EXEEXT])dnl
joachim99@2 104 dnl
joachim99@2 105
joachim99@2 106 # Only perform the check for file, if the check method requires it
joachim99@2 107 case $deplibs_check_method in
joachim99@2 108 file_magic*)
joachim99@2 109 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
joachim99@2 110 AC_PATH_MAGIC
joachim99@2 111 fi
joachim99@2 112 ;;
joachim99@2 113 esac
joachim99@2 114
joachim99@2 115 AC_CHECK_TOOL(RANLIB, ranlib, :)
joachim99@2 116 AC_CHECK_TOOL(STRIP, strip, :)
joachim99@2 117
joachim99@2 118 # Check for any special flags to pass to ltconfig.
joachim99@2 119 libtool_flags="--cache-file=$cache_file"
joachim99@2 120 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
joachim99@2 121 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
joachim99@2 122 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
joachim99@2 123 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
joachim99@2 124 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
joachim99@2 125 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
joachim99@2 126 [libtool_flags="$libtool_flags --enable-dlopen"])
joachim99@2 127 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
joachim99@2 128 [libtool_flags="$libtool_flags --enable-win32-dll"])
joachim99@2 129 AC_ARG_ENABLE(libtool-lock,
joachim99@2 130 [ --disable-libtool-lock avoid locking (might break parallel builds)])
joachim99@2 131 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
joachim99@2 132 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
joachim99@2 133
joachim99@2 134 AC_ARG_WITH(pic,
joachim99@2 135 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
joachim99@2 136 pic_mode="$withval", pic_mode=default)
joachim99@2 137 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
joachim99@2 138 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
joachim99@2 139
joachim99@2 140 # Some flags need to be propagated to the compiler or linker for good
joachim99@2 141 # libtool support.
joachim99@2 142 case $host in
joachim99@2 143 *-*-irix6*)
joachim99@2 144 # Find out which ABI we are using.
joachim99@2 145 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
joachim99@2 146 if AC_TRY_EVAL(ac_compile); then
joachim99@2 147 case `/usr/bin/file conftest.$ac_objext` in
joachim99@2 148 *32-bit*)
joachim99@2 149 LD="${LD-ld} -32"
joachim99@2 150 ;;
joachim99@2 151 *N32*)
joachim99@2 152 LD="${LD-ld} -n32"
joachim99@2 153 ;;
joachim99@2 154 *64-bit*)
joachim99@2 155 LD="${LD-ld} -64"
joachim99@2 156 ;;
joachim99@2 157 esac
joachim99@2 158 fi
joachim99@2 159 rm -rf conftest*
joachim99@2 160 ;;
joachim99@2 161
joachim99@2 162 *-*-sco3.2v5*)
joachim99@2 163 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
joachim99@2 164 SAVE_CFLAGS="$CFLAGS"
joachim99@2 165 CFLAGS="$CFLAGS -belf"
joachim99@2 166 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
joachim99@2 167 [AC_LANG_SAVE
joachim99@2 168 AC_LANG_C
joachim99@2 169 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
joachim99@2 170 AC_LANG_RESTORE])
joachim99@2 171 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
joachim99@2 172 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
joachim99@2 173 CFLAGS="$SAVE_CFLAGS"
joachim99@2 174 fi
joachim99@2 175 ;;
joachim99@2 176
joachim99@2 177 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
joachim99@2 178 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
joachim99@2 179 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
joachim99@2 180 AC_CHECK_TOOL(AS, as, false)
joachim99@2 181 AC_CHECK_TOOL(OBJDUMP, objdump, false)
joachim99@2 182
joachim99@2 183 # recent cygwin and mingw systems supply a stub DllMain which the user
joachim99@2 184 # can override, but on older systems we have to supply one
joachim99@2 185 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
joachim99@2 186 [AC_TRY_LINK([],
joachim99@2 187 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
joachim99@2 188 DllMain (0, 0, 0);],
joachim99@2 189 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
joachim99@2 190
joachim99@2 191 case $host/$CC in
joachim99@2 192 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
joachim99@2 193 # old mingw systems require "-dll" to link a DLL, while more recent ones
joachim99@2 194 # require "-mdll"
joachim99@2 195 SAVE_CFLAGS="$CFLAGS"
joachim99@2 196 CFLAGS="$CFLAGS -mdll"
joachim99@2 197 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
joachim99@2 198 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
joachim99@2 199 CFLAGS="$SAVE_CFLAGS" ;;
joachim99@2 200 *-*-cygwin* | *-*-pw32*)
joachim99@2 201 # cygwin systems need to pass --dll to the linker, and not link
joachim99@2 202 # crt.o which will require a WinMain@16 definition.
joachim99@2 203 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
joachim99@2 204 esac
joachim99@2 205 ;;
joachim99@2 206 ])
joachim99@2 207 esac
joachim99@2 208 ])
joachim99@2 209
joachim99@2 210 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
joachim99@2 211 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
joachim99@2 212
joachim99@2 213 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
joachim99@2 214 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
joachim99@2 215
joachim99@2 216 # AC_ENABLE_SHARED - implement the --enable-shared flag
joachim99@2 217 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
joachim99@2 218 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
joachim99@2 219 # `yes'.
joachim99@2 220 AC_DEFUN([AC_ENABLE_SHARED],
joachim99@2 221 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
joachim99@2 222 AC_ARG_ENABLE(shared,
joachim99@2 223 changequote(<<, >>)dnl
joachim99@2 224 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
joachim99@2 225 changequote([, ])dnl
joachim99@2 226 [p=${PACKAGE-default}
joachim99@2 227 case $enableval in
joachim99@2 228 yes) enable_shared=yes ;;
joachim99@2 229 no) enable_shared=no ;;
joachim99@2 230 *)
joachim99@2 231 enable_shared=no
joachim99@2 232 # Look at the argument we got. We use all the common list separators.
joachim99@2 233 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
joachim99@2 234 for pkg in $enableval; do
joachim99@2 235 if test "X$pkg" = "X$p"; then
joachim99@2 236 enable_shared=yes
joachim99@2 237 fi
joachim99@2 238 done
joachim99@2 239 IFS="$ac_save_ifs"
joachim99@2 240 ;;
joachim99@2 241 esac],
joachim99@2 242 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
joachim99@2 243 ])
joachim99@2 244
joachim99@2 245 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
joachim99@2 246 AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
joachim99@2 247 AC_ENABLE_SHARED(no)])
joachim99@2 248
joachim99@2 249 # AC_ENABLE_STATIC - implement the --enable-static flag
joachim99@2 250 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
joachim99@2 251 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
joachim99@2 252 # `yes'.
joachim99@2 253 AC_DEFUN([AC_ENABLE_STATIC],
joachim99@2 254 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
joachim99@2 255 AC_ARG_ENABLE(static,
joachim99@2 256 changequote(<<, >>)dnl
joachim99@2 257 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
joachim99@2 258 changequote([, ])dnl
joachim99@2 259 [p=${PACKAGE-default}
joachim99@2 260 case $enableval in
joachim99@2 261 yes) enable_static=yes ;;
joachim99@2 262 no) enable_static=no ;;
joachim99@2 263 *)
joachim99@2 264 enable_static=no
joachim99@2 265 # Look at the argument we got. We use all the common list separators.
joachim99@2 266 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
joachim99@2 267 for pkg in $enableval; do
joachim99@2 268 if test "X$pkg" = "X$p"; then
joachim99@2 269 enable_static=yes
joachim99@2 270 fi
joachim99@2 271 done
joachim99@2 272 IFS="$ac_save_ifs"
joachim99@2 273 ;;
joachim99@2 274 esac],
joachim99@2 275 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
joachim99@2 276 ])
joachim99@2 277
joachim99@2 278 # AC_DISABLE_STATIC - set the default static flag to --disable-static
joachim99@2 279 AC_DEFUN([AC_DISABLE_STATIC],
joachim99@2 280 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
joachim99@2 281 AC_ENABLE_STATIC(no)])
joachim99@2 282
joachim99@2 283
joachim99@2 284 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
joachim99@2 285 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
joachim99@2 286 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
joachim99@2 287 # `yes'.
joachim99@2 288 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
joachim99@2 289 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
joachim99@2 290 AC_ARG_ENABLE(fast-install,
joachim99@2 291 changequote(<<, >>)dnl
joachim99@2 292 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
joachim99@2 293 changequote([, ])dnl
joachim99@2 294 [p=${PACKAGE-default}
joachim99@2 295 case $enableval in
joachim99@2 296 yes) enable_fast_install=yes ;;
joachim99@2 297 no) enable_fast_install=no ;;
joachim99@2 298 *)
joachim99@2 299 enable_fast_install=no
joachim99@2 300 # Look at the argument we got. We use all the common list separators.
joachim99@2 301 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
joachim99@2 302 for pkg in $enableval; do
joachim99@2 303 if test "X$pkg" = "X$p"; then
joachim99@2 304 enable_fast_install=yes
joachim99@2 305 fi
joachim99@2 306 done
joachim99@2 307 IFS="$ac_save_ifs"
joachim99@2 308 ;;
joachim99@2 309 esac],
joachim99@2 310 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
joachim99@2 311 ])
joachim99@2 312
joachim99@2 313 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
joachim99@2 314 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
joachim99@2 315 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
joachim99@2 316 AC_ENABLE_FAST_INSTALL(no)])
joachim99@2 317
joachim99@2 318 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
joachim99@2 319 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
joachim99@2 320 # Where MODE is either `yes' or `no'. If omitted, it defaults to
joachim99@2 321 # `both'.
joachim99@2 322 AC_DEFUN([AC_LIBTOOL_PICMODE],
joachim99@2 323 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
joachim99@2 324 pic_mode=ifelse($#,1,$1,default)])
joachim99@2 325
joachim99@2 326
joachim99@2 327 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
joachim99@2 328 AC_DEFUN([AC_PATH_TOOL_PREFIX],
joachim99@2 329 [AC_MSG_CHECKING([for $1])
joachim99@2 330 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
joachim99@2 331 [case $MAGIC_CMD in
joachim99@2 332 /*)
joachim99@2 333 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
joachim99@2 334 ;;
joachim99@2 335 ?:/*)
joachim99@2 336 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
joachim99@2 337 ;;
joachim99@2 338 *)
joachim99@2 339 ac_save_MAGIC_CMD="$MAGIC_CMD"
joachim99@2 340 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
joachim99@2 341 dnl $ac_dummy forces splitting on constant user-supplied paths.
joachim99@2 342 dnl POSIX.2 word splitting is done only on the output of word expansions,
joachim99@2 343 dnl not every word. This closes a longstanding sh security hole.
joachim99@2 344 ac_dummy="ifelse([$2], , $PATH, [$2])"
joachim99@2 345 for ac_dir in $ac_dummy; do
joachim99@2 346 test -z "$ac_dir" && ac_dir=.
joachim99@2 347 if test -f $ac_dir/$1; then
joachim99@2 348 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
joachim99@2 349 if test -n "$file_magic_test_file"; then
joachim99@2 350 case $deplibs_check_method in
joachim99@2 351 "file_magic "*)
joachim99@2 352 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
joachim99@2 353 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
joachim99@2 354 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
joachim99@2 355 egrep "$file_magic_regex" > /dev/null; then
joachim99@2 356 :
joachim99@2 357 else
joachim99@2 358 cat <<EOF 1>&2
joachim99@2 359
joachim99@2 360 *** Warning: the command libtool uses to detect shared libraries,
joachim99@2 361 *** $file_magic_cmd, produces output that libtool cannot recognize.
joachim99@2 362 *** The result is that libtool may fail to recognize shared libraries
joachim99@2 363 *** as such. This will affect the creation of libtool libraries that
joachim99@2 364 *** depend on shared libraries, but programs linked with such libtool
joachim99@2 365 *** libraries will work regardless of this problem. Nevertheless, you
joachim99@2 366 *** may want to report the problem to your system manager and/or to
joachim99@2 367 *** bug-libtool@gnu.org
joachim99@2 368
joachim99@2 369 EOF
joachim99@2 370 fi ;;
joachim99@2 371 esac
joachim99@2 372 fi
joachim99@2 373 break
joachim99@2 374 fi
joachim99@2 375 done
joachim99@2 376 IFS="$ac_save_ifs"
joachim99@2 377 MAGIC_CMD="$ac_save_MAGIC_CMD"
joachim99@2 378 ;;
joachim99@2 379 esac])
joachim99@2 380 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
joachim99@2 381 if test -n "$MAGIC_CMD"; then
joachim99@2 382 AC_MSG_RESULT($MAGIC_CMD)
joachim99@2 383 else
joachim99@2 384 AC_MSG_RESULT(no)
joachim99@2 385 fi
joachim99@2 386 ])
joachim99@2 387
joachim99@2 388
joachim99@2 389 # AC_PATH_MAGIC - find a file program which can recognise a shared library
joachim99@2 390 AC_DEFUN([AC_PATH_MAGIC],
joachim99@2 391 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
joachim99@2 392 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
joachim99@2 393 if test -z "$lt_cv_path_MAGIC_CMD"; then
joachim99@2 394 if test -n "$ac_tool_prefix"; then
joachim99@2 395 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
joachim99@2 396 else
joachim99@2 397 MAGIC_CMD=:
joachim99@2 398 fi
joachim99@2 399 fi
joachim99@2 400 ])
joachim99@2 401
joachim99@2 402
joachim99@2 403 # AC_PROG_LD - find the path to the GNU or non-GNU linker
joachim99@2 404 AC_DEFUN([AC_PROG_LD],
joachim99@2 405 [AC_ARG_WITH(gnu-ld,
joachim99@2 406 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
joachim99@2 407 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
joachim99@2 408 AC_REQUIRE([AC_PROG_CC])dnl
joachim99@2 409 AC_REQUIRE([AC_CANONICAL_HOST])dnl
joachim99@2 410 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
joachim99@2 411 ac_prog=ld
joachim99@2 412 if test "$GCC" = yes; then
joachim99@2 413 # Check if gcc -print-prog-name=ld gives a path.
joachim99@2 414 AC_MSG_CHECKING([for ld used by GCC])
joachim99@2 415 case $host in
joachim99@2 416 *-*-mingw*)
joachim99@2 417 # gcc leaves a trailing carriage return which upsets mingw
joachim99@2 418 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
joachim99@2 419 *)
joachim99@2 420 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
joachim99@2 421 esac
joachim99@2 422 case $ac_prog in
joachim99@2 423 # Accept absolute paths.
joachim99@2 424 [[\\/]* | [A-Za-z]:[\\/]*)]
joachim99@2 425 re_direlt=['/[^/][^/]*/\.\./']
joachim99@2 426 # Canonicalize the path of ld
joachim99@2 427 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
joachim99@2 428 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
joachim99@2 429 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
joachim99@2 430 done
joachim99@2 431 test -z "$LD" && LD="$ac_prog"
joachim99@2 432 ;;
joachim99@2 433 "")
joachim99@2 434 # If it fails, then pretend we aren't using GCC.
joachim99@2 435 ac_prog=ld
joachim99@2 436 ;;
joachim99@2 437 *)
joachim99@2 438 # If it is relative, then search for the first ld in PATH.
joachim99@2 439 with_gnu_ld=unknown
joachim99@2 440 ;;
joachim99@2 441 esac
joachim99@2 442 elif test "$with_gnu_ld" = yes; then
joachim99@2 443 AC_MSG_CHECKING([for GNU ld])
joachim99@2 444 else
joachim99@2 445 AC_MSG_CHECKING([for non-GNU ld])
joachim99@2 446 fi
joachim99@2 447 AC_CACHE_VAL(lt_cv_path_LD,
joachim99@2 448 [if test -z "$LD"; then
joachim99@2 449 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
joachim99@2 450 for ac_dir in $PATH; do
joachim99@2 451 test -z "$ac_dir" && ac_dir=.
joachim99@2 452 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
joachim99@2 453 lt_cv_path_LD="$ac_dir/$ac_prog"
joachim99@2 454 # Check to see if the program is GNU ld. I'd rather use --version,
joachim99@2 455 # but apparently some GNU ld's only accept -v.
joachim99@2 456 # Break only if it was the GNU/non-GNU ld that we prefer.
joachim99@2 457 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
joachim99@2 458 test "$with_gnu_ld" != no && break
joachim99@2 459 else
joachim99@2 460 test "$with_gnu_ld" != yes && break
joachim99@2 461 fi
joachim99@2 462 fi
joachim99@2 463 done
joachim99@2 464 IFS="$ac_save_ifs"
joachim99@2 465 else
joachim99@2 466 lt_cv_path_LD="$LD" # Let the user override the test with a path.
joachim99@2 467 fi])
joachim99@2 468 LD="$lt_cv_path_LD"
joachim99@2 469 if test -n "$LD"; then
joachim99@2 470 AC_MSG_RESULT($LD)
joachim99@2 471 else
joachim99@2 472 AC_MSG_RESULT(no)
joachim99@2 473 fi
joachim99@2 474 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
joachim99@2 475 AC_PROG_LD_GNU
joachim99@2 476 ])
joachim99@2 477
joachim99@2 478 AC_DEFUN([AC_PROG_LD_GNU],
joachim99@2 479 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
joachim99@2 480 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
joachim99@2 481 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
joachim99@2 482 lt_cv_prog_gnu_ld=yes
joachim99@2 483 else
joachim99@2 484 lt_cv_prog_gnu_ld=no
joachim99@2 485 fi])
joachim99@2 486 with_gnu_ld=$lt_cv_prog_gnu_ld
joachim99@2 487 ])
joachim99@2 488
joachim99@2 489 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
joachim99@2 490 # -- PORTME Some linkers may need a different reload flag.
joachim99@2 491 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
joachim99@2 492 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
joachim99@2 493 [lt_cv_ld_reload_flag='-r'])
joachim99@2 494 reload_flag=$lt_cv_ld_reload_flag
joachim99@2 495 test -n "$reload_flag" && reload_flag=" $reload_flag"
joachim99@2 496 ])
joachim99@2 497
joachim99@2 498 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
joachim99@2 499 # -- PORTME fill in with the dynamic library characteristics
joachim99@2 500 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
joachim99@2 501 [AC_CACHE_CHECK([how to recognise dependant libraries],
joachim99@2 502 lt_cv_deplibs_check_method,
joachim99@2 503 [lt_cv_file_magic_cmd='$MAGIC_CMD'
joachim99@2 504 lt_cv_file_magic_test_file=
joachim99@2 505 lt_cv_deplibs_check_method='unknown'
joachim99@2 506 # Need to set the preceding variable on all platforms that support
joachim99@2 507 # interlibrary dependencies.
joachim99@2 508 # 'none' -- dependencies not supported.
joachim99@2 509 # `unknown' -- same as none, but documents that we really don't know.
joachim99@2 510 # 'pass_all' -- all dependencies passed with no checks.
joachim99@2 511 # 'test_compile' -- check by making test program.
joachim99@2 512 # 'file_magic [regex]' -- check by looking for files in library path
joachim99@2 513 # which responds to the $file_magic_cmd with a given egrep regex.
joachim99@2 514 # If you have `file' or equivalent on your system and you're not sure
joachim99@2 515 # whether `pass_all' will *always* work, you probably want this one.
joachim99@2 516
joachim99@2 517 case $host_os in
joachim99@2 518 aix*)
joachim99@2 519 lt_cv_deplibs_check_method=pass_all
joachim99@2 520 ;;
joachim99@2 521
joachim99@2 522 beos*)
joachim99@2 523 lt_cv_deplibs_check_method=pass_all
joachim99@2 524 ;;
joachim99@2 525
joachim99@2 526 bsdi4*)
joachim99@2 527 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
joachim99@2 528 lt_cv_file_magic_cmd='/usr/bin/file -L'
joachim99@2 529 lt_cv_file_magic_test_file=/shlib/libc.so
joachim99@2 530 ;;
joachim99@2 531
joachim99@2 532 cygwin* | mingw* |pw32*)
joachim99@2 533 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
joachim99@2 534 lt_cv_file_magic_cmd='$OBJDUMP -f'
joachim99@2 535 ;;
joachim99@2 536
joachim99@2 537 darwin* | rhapsody*)
joachim99@2 538 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
joachim99@2 539 lt_cv_file_magic_cmd='/usr/bin/file -L'
joachim99@2 540 case "$host_os" in
joachim99@2 541 rhapsody* | darwin1.[012])
joachim99@2 542 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
joachim99@2 543 ;;
joachim99@2 544 *) # Darwin 1.3 on
joachim99@2 545 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
joachim99@2 546 ;;
joachim99@2 547 esac
joachim99@2 548 ;;
joachim99@2 549
joachim99@2 550 freebsd* )
joachim99@2 551 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
joachim99@2 552 case $host_cpu in
joachim99@2 553 i*86 )
joachim99@2 554 # Not sure whether the presence of OpenBSD here was a mistake.
joachim99@2 555 # Let's accept both of them until this is cleared up.
joachim99@2 556 lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
joachim99@2 557 lt_cv_file_magic_cmd=/usr/bin/file
joachim99@2 558 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
joachim99@2 559 ;;
joachim99@2 560 esac
joachim99@2 561 else
joachim99@2 562 lt_cv_deplibs_check_method=pass_all
joachim99@2 563 fi
joachim99@2 564 ;;
joachim99@2 565
joachim99@2 566 gnu*)
joachim99@2 567 lt_cv_deplibs_check_method=pass_all
joachim99@2 568 ;;
joachim99@2 569
joachim99@2 570 hpux10.20*|hpux11*)
joachim99@2 571 lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
joachim99@2 572 lt_cv_file_magic_cmd=/usr/bin/file
joachim99@2 573 lt_cv_file_magic_test_file=/usr/lib/libc.sl
joachim99@2 574 ;;
joachim99@2 575
joachim99@2 576 irix5* | irix6*)
joachim99@2 577 case $host_os in
joachim99@2 578 irix5*)
joachim99@2 579 # this will be overridden with pass_all, but let us keep it just in case
joachim99@2 580 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
joachim99@2 581 ;;
joachim99@2 582 *)
joachim99@2 583 case $LD in
joachim99@2 584 *-32|*"-32 ") libmagic=32-bit;;
joachim99@2 585 *-n32|*"-n32 ") libmagic=N32;;
joachim99@2 586 *-64|*"-64 ") libmagic=64-bit;;
joachim99@2 587 *) libmagic=never-match;;
joachim99@2 588 esac
joachim99@2 589 # this will be overridden with pass_all, but let us keep it just in case
joachim99@2 590 lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
joachim99@2 591 ;;
joachim99@2 592 esac
joachim99@2 593 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
joachim99@2 594 lt_cv_deplibs_check_method=pass_all
joachim99@2 595 ;;
joachim99@2 596
joachim99@2 597 # This must be Linux ELF.
joachim99@2 598 linux-gnu*)
joachim99@2 599 case $host_cpu in
joachim99@2 600 alpha* | i*86 | powerpc* | sparc* | ia64* | s390* | m68k* | arm* | mips* | hppa* | sh* )
joachim99@2 601 lt_cv_deplibs_check_method=pass_all ;;
joachim99@2 602 *)
joachim99@2 603 # glibc up to 2.1.1 does not perform some relocations on ARM
joachim99@2 604 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
joachim99@2 605 esac
joachim99@2 606 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
joachim99@2 607 ;;
joachim99@2 608
joachim99@2 609 netbsd*)
joachim99@2 610 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
joachim99@2 611 [lt_cv_deplibs_check_method='file_magic NetBSD/[a-z0-9]* demand paged shared library']
joachim99@2 612 else
joachim99@2 613 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object']
joachim99@2 614 fi
joachim99@2 615 lt_cv_file_magic_cmd='/usr/bin/file -L'
joachim99@2 616 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
joachim99@2 617 ;;
joachim99@2 618
joachim99@2 619 openbsd* )
joachim99@2 620 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
joachim99@2 621 case "$host_cpu" in
joachim99@2 622 i*86 )
joachim99@2 623 changequote(,)dnl
joachim99@2 624 lt_cv_deplibs_check_method='file_magic OpenBSD/i[3-9]86 demand paged shared library'
joachim99@2 625 changequote([, ])dnl
joachim99@2 626 lt_cv_file_magic_cmd=/usr/bin/file
joachim99@2 627 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
joachim99@2 628 ;;
joachim99@2 629 esac
joachim99@2 630 else
joachim99@2 631 lt_cv_deplibs_check_method=pass_all
joachim99@2 632 fi
joachim99@2 633 ;;
joachim99@2 634
joachim99@2 635 newsos6)
joachim99@2 636 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
joachim99@2 637 lt_cv_file_magic_cmd=/usr/bin/file
joachim99@2 638 lt_cv_file_magic_test_file=/usr/lib/libnls.so
joachim99@2 639 ;;
joachim99@2 640
joachim99@2 641 osf3* | osf4* | osf5*)
joachim99@2 642 # this will be overridden with pass_all, but let us keep it just in case
joachim99@2 643 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
joachim99@2 644 lt_cv_file_magic_test_file=/shlib/libc.so
joachim99@2 645 lt_cv_deplibs_check_method=pass_all
joachim99@2 646 ;;
joachim99@2 647
joachim99@2 648 sco3.2v5*)
joachim99@2 649 lt_cv_deplibs_check_method=pass_all
joachim99@2 650 ;;
joachim99@2 651
joachim99@2 652 solaris*)
joachim99@2 653 lt_cv_deplibs_check_method=pass_all
joachim99@2 654 lt_cv_file_magic_test_file=/lib/libc.so
joachim99@2 655 ;;
joachim99@2 656
joachim99@2 657 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
joachim99@2 658 case $host_vendor in
joachim99@2 659 ncr)
joachim99@2 660 lt_cv_deplibs_check_method=pass_all
joachim99@2 661 ;;
joachim99@2 662 motorola)
joachim99@2 663 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
joachim99@2 664 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
joachim99@2 665 ;;
joachim99@2 666 esac
joachim99@2 667 ;;
joachim99@2 668 esac
joachim99@2 669 ])
joachim99@2 670 file_magic_cmd=$lt_cv_file_magic_cmd
joachim99@2 671 deplibs_check_method=$lt_cv_deplibs_check_method
joachim99@2 672 ])
joachim99@2 673
joachim99@2 674
joachim99@2 675 # AC_PROG_NM - find the path to a BSD-compatible name lister
joachim99@2 676 AC_DEFUN([AC_PROG_NM],
joachim99@2 677 [AC_MSG_CHECKING([for BSD-compatible nm])
joachim99@2 678 AC_CACHE_VAL(lt_cv_path_NM,
joachim99@2 679 [if test -n "$NM"; then
joachim99@2 680 # Let the user override the test.
joachim99@2 681 lt_cv_path_NM="$NM"
joachim99@2 682 else
joachim99@2 683 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
joachim99@2 684 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
joachim99@2 685 test -z "$ac_dir" && ac_dir=.
joachim99@2 686 tmp_nm=$ac_dir/${ac_tool_prefix}nm
joachim99@2 687 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
joachim99@2 688 # Check to see if the nm accepts a BSD-compat flag.
joachim99@2 689 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
joachim99@2 690 # nm: unknown option "B" ignored
joachim99@2 691 # Tru64's nm complains that /dev/null is an invalid object file
joachim99@2 692 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
joachim99@2 693 lt_cv_path_NM="$tmp_nm -B"
joachim99@2 694 break
joachim99@2 695 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
joachim99@2 696 lt_cv_path_NM="$tmp_nm -p"
joachim99@2 697 break
joachim99@2 698 else
joachim99@2 699 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
joachim99@2 700 continue # so that we can try to find one that supports BSD flags
joachim99@2 701 fi
joachim99@2 702 fi
joachim99@2 703 done
joachim99@2 704 IFS="$ac_save_ifs"
joachim99@2 705 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
joachim99@2 706 fi])
joachim99@2 707 NM="$lt_cv_path_NM"
joachim99@2 708 AC_MSG_RESULT([$NM])
joachim99@2 709 ])
joachim99@2 710
joachim99@2 711 # AC_CHECK_LIBM - check for math library
joachim99@2 712 AC_DEFUN([AC_CHECK_LIBM],
joachim99@2 713 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
joachim99@2 714 LIBM=
joachim99@2 715 case $host in
joachim99@2 716 *-*-beos* | *-*-cygwin* | *-*-pw32*)
joachim99@2 717 # These system don't have libm
joachim99@2 718 ;;
joachim99@2 719 *-ncr-sysv4.3*)
joachim99@2 720 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
joachim99@2 721 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
joachim99@2 722 ;;
joachim99@2 723 *)
joachim99@2 724 AC_CHECK_LIB(m, main, LIBM="-lm")
joachim99@2 725 ;;
joachim99@2 726 esac
joachim99@2 727 ])
joachim99@2 728
joachim99@2 729 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
joachim99@2 730 # the libltdl convenience library and INCLTDL to the include flags for
joachim99@2 731 # the libltdl header and adds --enable-ltdl-convenience to the
joachim99@2 732 # configure arguments. Note that LIBLTDL and INCLTDL are not
joachim99@2 733 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
joachim99@2 734 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
joachim99@2 735 # with '${top_builddir}/' and INCLTDL will be prefixed with
joachim99@2 736 # '${top_srcdir}/' (note the single quotes!). If your package is not
joachim99@2 737 # flat and you're not using automake, define top_builddir and
joachim99@2 738 # top_srcdir appropriately in the Makefiles.
joachim99@2 739 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
joachim99@2 740 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
joachim99@2 741 case $enable_ltdl_convenience in
joachim99@2 742 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
joachim99@2 743 "") enable_ltdl_convenience=yes
joachim99@2 744 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
joachim99@2 745 esac
joachim99@2 746 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
joachim99@2 747 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
joachim99@2 748 ])
joachim99@2 749
joachim99@2 750 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
joachim99@2 751 # the libltdl installable library and INCLTDL to the include flags for
joachim99@2 752 # the libltdl header and adds --enable-ltdl-install to the configure
joachim99@2 753 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
joachim99@2 754 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
joachim99@2 755 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
joachim99@2 756 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
joachim99@2 757 # with '${top_srcdir}/' (note the single quotes!). If your package is
joachim99@2 758 # not flat and you're not using automake, define top_builddir and
joachim99@2 759 # top_srcdir appropriately in the Makefiles.
joachim99@2 760 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
joachim99@2 761 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
joachim99@2 762 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
joachim99@2 763 AC_CHECK_LIB(ltdl, main,
joachim99@2 764 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
joachim99@2 765 [if test x"$enable_ltdl_install" = xno; then
joachim99@2 766 AC_MSG_WARN([libltdl not installed, but installation disabled])
joachim99@2 767 else
joachim99@2 768 enable_ltdl_install=yes
joachim99@2 769 fi
joachim99@2 770 ])
joachim99@2 771 if test x"$enable_ltdl_install" = x"yes"; then
joachim99@2 772 ac_configure_args="$ac_configure_args --enable-ltdl-install"
joachim99@2 773 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
joachim99@2 774 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
joachim99@2 775 else
joachim99@2 776 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
joachim99@2 777 LIBLTDL="-lltdl"
joachim99@2 778 INCLTDL=
joachim99@2 779 fi
joachim99@2 780 ])
joachim99@2 781
joachim99@2 782 # If this macro is not defined by Autoconf, define it here.
joachim99@2 783 ifdef([AC_PROVIDE_IFELSE],
joachim99@2 784 [],
joachim99@2 785 [define([AC_PROVIDE_IFELSE],
joachim99@2 786 [ifdef([AC_PROVIDE_$1],
joachim99@2 787 [$2], [$3])])])
joachim99@2 788
joachim99@2 789 # AC_LIBTOOL_CXX - enable support for C++ libraries
joachim99@2 790 AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
joachim99@2 791
joachim99@2 792 AC_DEFUN([_AC_LIBTOOL_CXX],
joachim99@2 793 [AC_REQUIRE([AC_PROG_CXX])
joachim99@2 794 AC_REQUIRE([AC_PROG_CXXCPP])
joachim99@2 795 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
joachim99@2 796 lt_save_CC="$CC"
joachim99@2 797 lt_save_CFLAGS="$CFLAGS"
joachim99@2 798 dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
joachim99@2 799 dnl is set to the C++ compiler.
joachim99@2 800 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
joachim99@2 801 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
joachim99@2 802 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
joachim99@2 803 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
joachim99@2 804 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
joachim99@2 805 deplibs_check_method="$deplibs_check_method" \
joachim99@2 806 file_magic_cmd="$file_magic_cmd" \
joachim99@2 807 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
joachim99@2 808 --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
joachim99@2 809 || AC_MSG_ERROR([libtool tag configuration failed])
joachim99@2 810 CC="$lt_save_CC"
joachim99@2 811 CFLAGS="$lt_save_CFLAGS"
joachim99@2 812
joachim99@2 813 # Redirect the config.log output again, so that the ltconfig log is not
joachim99@2 814 # clobbered by the next message.
joachim99@2 815 exec 5>>./config.log
joachim99@2 816 ])
joachim99@2 817
joachim99@2 818 # AC_LIBTOOL_GCJ - enable support for GCJ libraries
joachim99@2 819 AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
joachim99@2 820
joachim99@2 821 AC_DEFUN([_AC_LIBTOOL_GCJ],
joachim99@2 822 [AC_REQUIRE([AC_PROG_LIBTOOL])
joachim99@2 823 AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
joachim99@2 824 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
joachim99@2 825 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
joachim99@2 826 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
joachim99@2 827 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
joachim99@2 828 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
joachim99@2 829 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
joachim99@2 830 lt_save_CC="$CC"
joachim99@2 831 lt_save_CFLAGS="$CFLAGS"
joachim99@2 832 dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
joachim99@2 833 dnl is set to the C++ compiler.
joachim99@2 834 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
joachim99@2 835 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
joachim99@2 836 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
joachim99@2 837 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
joachim99@2 838 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
joachim99@2 839 deplibs_check_method="$deplibs_check_method" \
joachim99@2 840 file_magic_cmd="$file_magic_cmd" \
joachim99@2 841 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
joachim99@2 842 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
joachim99@2 843 || AC_MSG_ERROR([libtool tag configuration failed])
joachim99@2 844 CC="$lt_save_CC"
joachim99@2 845 CFLAGS="$lt_save_CFLAGS"
joachim99@2 846
joachim99@2 847 # Redirect the config.log output again, so that the ltconfig log is not
joachim99@2 848 # clobbered by the next message.
joachim99@2 849 exec 5>>./config.log
joachim99@2 850 ])
joachim99@2 851
joachim99@2 852 dnl old names
joachim99@2 853 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
joachim99@2 854 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
joachim99@2 855 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
joachim99@2 856 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
joachim99@2 857 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
joachim99@2 858 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
joachim99@2 859 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
joachim99@2 860
joachim99@2 861 dnl This is just to silence aclocal about the macro not being used
joachim99@2 862 ifelse([AC_DISABLE_FAST_INSTALL])dnl
joachim99@2 863
joachim99@2 864 AC_DEFUN([LT_AC_PROG_GCJ],
joachim99@2 865 [AC_CHECK_TOOL(GCJ, gcj, no)
joachim99@2 866 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
joachim99@2 867 AC_SUBST(GCJFLAGS)
joachim99@2 868 ])