jjako | 1fabd27 | 2003-01-29 10:33:54 +0000 | [diff] [blame] | 1 | # aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- |
| 2 | |
| 3 | # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 |
| 4 | # Free Software Foundation, Inc. |
| 5 | # This file is free software; the Free Software Foundation |
| 6 | # gives unlimited permission to copy and/or distribute it, |
| 7 | # with or without modifications, as long as this notice is preserved. |
| 8 | |
| 9 | # This program is distributed in the hope that it will be useful, |
| 10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
| 11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 12 | # PARTICULAR PURPOSE. |
| 13 | |
| 14 | # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- |
| 15 | |
| 16 | # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. |
| 17 | |
| 18 | # This program is free software; you can redistribute it and/or modify |
| 19 | # it under the terms of the GNU General Public License as published by |
| 20 | # the Free Software Foundation; either version 2, or (at your option) |
| 21 | # any later version. |
| 22 | |
| 23 | # This program is distributed in the hope that it will be useful, |
| 24 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 25 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 26 | # GNU General Public License for more details. |
| 27 | |
| 28 | # You should have received a copy of the GNU General Public License |
| 29 | # along with this program; if not, write to the Free Software |
| 30 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 31 | # 02111-1307, USA. |
| 32 | |
| 33 | AC_PREREQ([2.52]) |
| 34 | |
| 35 | # serial 6 |
| 36 | |
| 37 | # When config.status generates a header, we must update the stamp-h file. |
| 38 | # This file resides in the same directory as the config header |
| 39 | # that is generated. We must strip everything past the first ":", |
| 40 | # and everything past the last "/". |
| 41 | |
| 42 | # _AM_DIRNAME(PATH) |
| 43 | # ----------------- |
| 44 | # Like AS_DIRNAME, only do it during macro expansion |
| 45 | AC_DEFUN([_AM_DIRNAME], |
| 46 | [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1, |
| 47 | m4_if(regexp([$1], [^//\([^/]\|$\)]), -1, |
| 48 | m4_if(regexp([$1], [^/.*]), -1, |
| 49 | [.], |
| 50 | patsubst([$1], [^\(/\).*], [\1])), |
| 51 | patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])), |
| 52 | patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl |
| 53 | ])# _AM_DIRNAME |
| 54 | |
| 55 | |
| 56 | # The stamp files are numbered to have different names. |
| 57 | # We could number them on a directory basis, but that's additional |
| 58 | # complications, let's have a unique counter. |
| 59 | m4_define([_AM_STAMP_Count], [0]) |
| 60 | |
| 61 | |
| 62 | # _AM_STAMP(HEADER) |
| 63 | # ----------------- |
| 64 | # The name of the stamp file for HEADER. |
| 65 | AC_DEFUN([_AM_STAMP], |
| 66 | [m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl |
| 67 | AS_ESCAPE(_AM_DIRNAME(patsubst([$1], |
| 68 | [:.*])))/stamp-h[]_AM_STAMP_Count]) |
| 69 | |
| 70 | |
| 71 | # _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS) |
| 72 | # ------------------------------------------------------------ |
| 73 | # We used to try to get a real timestamp in stamp-h. But the fear is that |
| 74 | # that will cause unnecessary cvs conflicts. |
| 75 | AC_DEFUN([_AM_CONFIG_HEADER], |
| 76 | [# Add the stamp file to the list of files AC keeps track of, |
| 77 | # along with our hook. |
| 78 | AC_CONFIG_HEADERS([$1], |
| 79 | [# update the timestamp |
| 80 | echo 'timestamp for $1' >"_AM_STAMP([$1])" |
| 81 | $2], |
| 82 | [$3]) |
| 83 | ])# _AM_CONFIG_HEADER |
| 84 | |
| 85 | |
| 86 | # AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS) |
| 87 | # -------------------------------------------------------------- |
| 88 | AC_DEFUN([AM_CONFIG_HEADER], |
| 89 | [AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])]) |
| 90 | ])# AM_CONFIG_HEADER |
| 91 | |
| 92 | # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- |
| 93 | |
| 94 | # serial 46 AC_PROG_LIBTOOL |
| 95 | |
| 96 | AC_DEFUN([AC_PROG_LIBTOOL], |
| 97 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl |
| 98 | |
| 99 | # This can be used to rebuild libtool when needed |
| 100 | LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" |
| 101 | |
| 102 | # Always use our own libtool. |
| 103 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
| 104 | AC_SUBST(LIBTOOL)dnl |
| 105 | |
| 106 | # Prevent multiple expansion |
| 107 | define([AC_PROG_LIBTOOL], []) |
| 108 | ]) |
| 109 | |
| 110 | AC_DEFUN([AC_LIBTOOL_SETUP], |
| 111 | [AC_PREREQ(2.13)dnl |
| 112 | AC_REQUIRE([AC_ENABLE_SHARED])dnl |
| 113 | AC_REQUIRE([AC_ENABLE_STATIC])dnl |
| 114 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl |
| 115 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 116 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
| 117 | AC_REQUIRE([AC_PROG_CC])dnl |
| 118 | AC_REQUIRE([AC_PROG_LD])dnl |
| 119 | AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl |
| 120 | AC_REQUIRE([AC_PROG_NM])dnl |
| 121 | AC_REQUIRE([AC_PROG_LN_S])dnl |
| 122 | AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl |
| 123 | AC_REQUIRE([AC_OBJEXT])dnl |
| 124 | AC_REQUIRE([AC_EXEEXT])dnl |
| 125 | dnl |
| 126 | |
| 127 | _LT_AC_PROG_ECHO_BACKSLASH |
| 128 | # Only perform the check for file, if the check method requires it |
| 129 | case $deplibs_check_method in |
| 130 | file_magic*) |
| 131 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then |
| 132 | AC_PATH_MAGIC |
| 133 | fi |
| 134 | ;; |
| 135 | esac |
| 136 | |
| 137 | AC_CHECK_TOOL(RANLIB, ranlib, :) |
| 138 | AC_CHECK_TOOL(STRIP, strip, :) |
| 139 | |
| 140 | ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) |
| 141 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
| 142 | enable_win32_dll=yes, enable_win32_dll=no) |
| 143 | |
| 144 | AC_ARG_ENABLE(libtool-lock, |
| 145 | [ --disable-libtool-lock avoid locking (might break parallel builds)]) |
| 146 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
| 147 | |
| 148 | # Some flags need to be propagated to the compiler or linker for good |
| 149 | # libtool support. |
| 150 | case $host in |
| 151 | *-*-irix6*) |
| 152 | # Find out which ABI we are using. |
| 153 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
| 154 | if AC_TRY_EVAL(ac_compile); then |
| 155 | case `/usr/bin/file conftest.$ac_objext` in |
| 156 | *32-bit*) |
| 157 | LD="${LD-ld} -32" |
| 158 | ;; |
| 159 | *N32*) |
| 160 | LD="${LD-ld} -n32" |
| 161 | ;; |
| 162 | *64-bit*) |
| 163 | LD="${LD-ld} -64" |
| 164 | ;; |
| 165 | esac |
| 166 | fi |
| 167 | rm -rf conftest* |
| 168 | ;; |
| 169 | |
| 170 | *-*-sco3.2v5*) |
| 171 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. |
| 172 | SAVE_CFLAGS="$CFLAGS" |
| 173 | CFLAGS="$CFLAGS -belf" |
| 174 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
| 175 | [AC_LANG_SAVE |
| 176 | AC_LANG_C |
| 177 | AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) |
| 178 | AC_LANG_RESTORE]) |
| 179 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
| 180 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
| 181 | CFLAGS="$SAVE_CFLAGS" |
| 182 | fi |
| 183 | ;; |
| 184 | |
| 185 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
| 186 | [*-*-cygwin* | *-*-mingw* | *-*-pw32*) |
| 187 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
| 188 | AC_CHECK_TOOL(AS, as, false) |
| 189 | AC_CHECK_TOOL(OBJDUMP, objdump, false) |
| 190 | |
| 191 | # recent cygwin and mingw systems supply a stub DllMain which the user |
| 192 | # can override, but on older systems we have to supply one |
| 193 | AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, |
| 194 | [AC_TRY_LINK([], |
| 195 | [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); |
| 196 | DllMain (0, 0, 0);], |
| 197 | [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) |
| 198 | |
| 199 | case $host/$CC in |
| 200 | *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) |
| 201 | # old mingw systems require "-dll" to link a DLL, while more recent ones |
| 202 | # require "-mdll" |
| 203 | SAVE_CFLAGS="$CFLAGS" |
| 204 | CFLAGS="$CFLAGS -mdll" |
| 205 | AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, |
| 206 | [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) |
| 207 | CFLAGS="$SAVE_CFLAGS" ;; |
| 208 | *-*-cygwin* | *-*-pw32*) |
| 209 | # cygwin systems need to pass --dll to the linker, and not link |
| 210 | # crt.o which will require a WinMain@16 definition. |
| 211 | lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; |
| 212 | esac |
| 213 | ;; |
| 214 | ]) |
| 215 | esac |
| 216 | |
| 217 | _LT_AC_LTCONFIG_HACK |
| 218 | |
| 219 | ]) |
| 220 | |
| 221 | # AC_LIBTOOL_HEADER_ASSERT |
| 222 | # ------------------------ |
| 223 | AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], |
| 224 | [AC_CACHE_CHECK([whether $CC supports assert without backlinking], |
| 225 | [lt_cv_func_assert_works], |
| 226 | [case $host in |
| 227 | *-*-solaris*) |
| 228 | if test "$GCC" = yes && test "$with_gnu_ld" != yes; then |
| 229 | case `$CC --version 2>/dev/null` in |
| 230 | [[12]].*) lt_cv_func_assert_works=no ;; |
| 231 | *) lt_cv_func_assert_works=yes ;; |
| 232 | esac |
| 233 | fi |
| 234 | ;; |
| 235 | esac]) |
| 236 | |
| 237 | if test "x$lt_cv_func_assert_works" = xyes; then |
| 238 | AC_CHECK_HEADERS(assert.h) |
| 239 | fi |
| 240 | ])# AC_LIBTOOL_HEADER_ASSERT |
| 241 | |
| 242 | # _LT_AC_CHECK_DLFCN |
| 243 | # -------------------- |
| 244 | AC_DEFUN([_LT_AC_CHECK_DLFCN], |
| 245 | [AC_CHECK_HEADERS(dlfcn.h) |
| 246 | ])# _LT_AC_CHECK_DLFCN |
| 247 | |
| 248 | # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
| 249 | # --------------------------------- |
| 250 | AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], |
| 251 | [AC_REQUIRE([AC_CANONICAL_HOST]) |
| 252 | AC_REQUIRE([AC_PROG_NM]) |
| 253 | AC_REQUIRE([AC_OBJEXT]) |
| 254 | # Check for command to grab the raw symbol name followed by C symbol from nm. |
| 255 | AC_MSG_CHECKING([command to parse $NM output]) |
| 256 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl |
| 257 | |
| 258 | # These are sane defaults that work on at least a few old systems. |
| 259 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] |
| 260 | |
| 261 | # Character class describing NM global symbol codes. |
| 262 | symcode='[[BCDEGRST]]' |
| 263 | |
| 264 | # Regexp to match symbols that can be accessed directly from C. |
| 265 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' |
| 266 | |
| 267 | # Transform the above into a raw symbol and a C symbol. |
| 268 | symxfrm='\1 \2\3 \3' |
| 269 | |
| 270 | # Transform an extracted symbol line into a proper C declaration |
| 271 | lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" |
| 272 | |
| 273 | # Transform an extracted symbol line into symbol name and symbol address |
| 274 | lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
| 275 | |
| 276 | # Define system-specific variables. |
| 277 | case $host_os in |
| 278 | aix*) |
| 279 | symcode='[[BCDT]]' |
| 280 | ;; |
| 281 | cygwin* | mingw* | pw32*) |
| 282 | symcode='[[ABCDGISTW]]' |
| 283 | ;; |
| 284 | hpux*) # Its linker distinguishes data from code symbols |
| 285 | lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
| 286 | lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
| 287 | ;; |
| 288 | irix*) |
| 289 | symcode='[[BCDEGRST]]' |
| 290 | ;; |
| 291 | solaris* | sysv5*) |
| 292 | symcode='[[BDT]]' |
| 293 | ;; |
| 294 | sysv4) |
| 295 | symcode='[[DFNSTU]]' |
| 296 | ;; |
| 297 | esac |
| 298 | |
| 299 | # Handle CRLF in mingw tool chain |
| 300 | opt_cr= |
| 301 | case $host_os in |
| 302 | mingw*) |
| 303 | opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
| 304 | ;; |
| 305 | esac |
| 306 | |
| 307 | # If we're using GNU nm, then use its standard symbol codes. |
| 308 | if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then |
| 309 | symcode='[[ABCDGISTW]]' |
| 310 | fi |
| 311 | |
| 312 | # Try without a prefix undercore, then with it. |
| 313 | for ac_symprfx in "" "_"; do |
| 314 | |
| 315 | # Write the raw and C identifiers. |
| 316 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" |
| 317 | |
| 318 | # Check to see that the pipe works correctly. |
| 319 | pipe_works=no |
| 320 | rm -f conftest* |
| 321 | cat > conftest.$ac_ext <<EOF |
| 322 | #ifdef __cplusplus |
| 323 | extern "C" { |
| 324 | #endif |
| 325 | char nm_test_var; |
| 326 | void nm_test_func(){} |
| 327 | #ifdef __cplusplus |
| 328 | } |
| 329 | #endif |
| 330 | int main(){nm_test_var='a';nm_test_func();return(0);} |
| 331 | EOF |
| 332 | |
| 333 | if AC_TRY_EVAL(ac_compile); then |
| 334 | # Now try to grab the symbols. |
| 335 | nlist=conftest.nm |
| 336 | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
| 337 | # Try sorting and uniquifying the output. |
| 338 | if sort "$nlist" | uniq > "$nlist"T; then |
| 339 | mv -f "$nlist"T "$nlist" |
| 340 | else |
| 341 | rm -f "$nlist"T |
| 342 | fi |
| 343 | |
| 344 | # Make sure that we snagged all the symbols we need. |
| 345 | if egrep ' nm_test_var$' "$nlist" >/dev/null; then |
| 346 | if egrep ' nm_test_func$' "$nlist" >/dev/null; then |
| 347 | cat <<EOF > conftest.$ac_ext |
| 348 | #ifdef __cplusplus |
| 349 | extern "C" { |
| 350 | #endif |
| 351 | |
| 352 | EOF |
| 353 | # Now generate the symbol file. |
| 354 | eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' |
| 355 | |
| 356 | cat <<EOF >> conftest.$ac_ext |
| 357 | #if defined (__STDC__) && __STDC__ |
| 358 | # define lt_ptr void * |
| 359 | #else |
| 360 | # define lt_ptr char * |
| 361 | # define const |
| 362 | #endif |
| 363 | |
| 364 | /* The mapping between symbol names and symbols. */ |
| 365 | const struct { |
| 366 | const char *name; |
| 367 | lt_ptr address; |
| 368 | } |
| 369 | lt_preloaded_symbols[[]] = |
| 370 | { |
| 371 | EOF |
| 372 | sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext |
| 373 | cat <<\EOF >> conftest.$ac_ext |
| 374 | {0, (lt_ptr) 0} |
| 375 | }; |
| 376 | |
| 377 | #ifdef __cplusplus |
| 378 | } |
| 379 | #endif |
| 380 | EOF |
| 381 | # Now try linking the two files. |
| 382 | mv conftest.$ac_objext conftstm.$ac_objext |
| 383 | save_LIBS="$LIBS" |
| 384 | save_CFLAGS="$CFLAGS" |
| 385 | LIBS="conftstm.$ac_objext" |
| 386 | CFLAGS="$CFLAGS$no_builtin_flag" |
| 387 | if AC_TRY_EVAL(ac_link) && test -s conftest; then |
| 388 | pipe_works=yes |
| 389 | fi |
| 390 | LIBS="$save_LIBS" |
| 391 | CFLAGS="$save_CFLAGS" |
| 392 | else |
| 393 | echo "cannot find nm_test_func in $nlist" >&AC_FD_CC |
| 394 | fi |
| 395 | else |
| 396 | echo "cannot find nm_test_var in $nlist" >&AC_FD_CC |
| 397 | fi |
| 398 | else |
| 399 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC |
| 400 | fi |
| 401 | else |
| 402 | echo "$progname: failed program was:" >&AC_FD_CC |
| 403 | cat conftest.$ac_ext >&5 |
| 404 | fi |
| 405 | rm -f conftest* conftst* |
| 406 | |
| 407 | # Do not use the global_symbol_pipe unless it works. |
| 408 | if test "$pipe_works" = yes; then |
| 409 | break |
| 410 | else |
| 411 | lt_cv_sys_global_symbol_pipe= |
| 412 | fi |
| 413 | done |
| 414 | ]) |
| 415 | global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" |
| 416 | if test -z "$lt_cv_sys_global_symbol_pipe"; then |
| 417 | global_symbol_to_cdecl= |
| 418 | global_symbol_to_c_name_address= |
| 419 | else |
| 420 | global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" |
| 421 | global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" |
| 422 | fi |
| 423 | if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; |
| 424 | then |
| 425 | AC_MSG_RESULT(failed) |
| 426 | else |
| 427 | AC_MSG_RESULT(ok) |
| 428 | fi |
| 429 | ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
| 430 | |
| 431 | # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
| 432 | # --------------------------------- |
| 433 | AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], |
| 434 | [# Find the correct PATH separator. Usually this is `:', but |
| 435 | # DJGPP uses `;' like DOS. |
| 436 | if test "X${PATH_SEPARATOR+set}" != Xset; then |
| 437 | UNAME=${UNAME-`uname 2>/dev/null`} |
| 438 | case X$UNAME in |
| 439 | *-DOS) lt_cv_sys_path_separator=';' ;; |
| 440 | *) lt_cv_sys_path_separator=':' ;; |
| 441 | esac |
| 442 | PATH_SEPARATOR=$lt_cv_sys_path_separator |
| 443 | fi |
| 444 | ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
| 445 | |
| 446 | # _LT_AC_PROG_ECHO_BACKSLASH |
| 447 | # -------------------------- |
| 448 | # Add some code to the start of the generated configure script which |
| 449 | # will find an echo command which doesn't interpret backslashes. |
| 450 | AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], |
| 451 | [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], |
| 452 | [AC_DIVERT_PUSH(NOTICE)]) |
| 453 | _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
| 454 | |
| 455 | # Check that we are running under the correct shell. |
| 456 | SHELL=${CONFIG_SHELL-/bin/sh} |
| 457 | |
| 458 | case X$ECHO in |
| 459 | X*--fallback-echo) |
| 460 | # Remove one level of quotation (which was required for Make). |
| 461 | ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` |
| 462 | ;; |
| 463 | esac |
| 464 | |
| 465 | echo=${ECHO-echo} |
| 466 | if test "X[$]1" = X--no-reexec; then |
| 467 | # Discard the --no-reexec flag, and continue. |
| 468 | shift |
| 469 | elif test "X[$]1" = X--fallback-echo; then |
| 470 | # Avoid inline document here, it may be left over |
| 471 | : |
| 472 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then |
| 473 | # Yippee, $echo works! |
| 474 | : |
| 475 | else |
| 476 | # Restart under the correct shell. |
| 477 | exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} |
| 478 | fi |
| 479 | |
| 480 | if test "X[$]1" = X--fallback-echo; then |
| 481 | # used as fallback echo |
| 482 | shift |
| 483 | cat <<EOF |
| 484 | $* |
| 485 | EOF |
| 486 | exit 0 |
| 487 | fi |
| 488 | |
| 489 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
| 490 | # if CDPATH is set. |
| 491 | if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
| 492 | |
| 493 | if test -z "$ECHO"; then |
| 494 | if test "X${echo_test_string+set}" != Xset; then |
| 495 | # find a string as large as possible, as long as the shell can cope with it |
| 496 | for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do |
| 497 | # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... |
| 498 | if (echo_test_string="`eval $cmd`") 2>/dev/null && |
| 499 | echo_test_string="`eval $cmd`" && |
| 500 | (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null |
| 501 | then |
| 502 | break |
| 503 | fi |
| 504 | done |
| 505 | fi |
| 506 | |
| 507 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
| 508 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
| 509 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 510 | : |
| 511 | else |
| 512 | # The Solaris, AIX, and Digital Unix default echo programs unquote |
| 513 | # backslashes. This makes it impossible to quote backslashes using |
| 514 | # echo "$something" | sed 's/\\/\\\\/g' |
| 515 | # |
| 516 | # So, first we look for a working echo in the user's PATH. |
| 517 | |
| 518 | IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
| 519 | for dir in $PATH /usr/ucb; do |
| 520 | if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && |
| 521 | test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && |
| 522 | echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && |
| 523 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 524 | echo="$dir/echo" |
| 525 | break |
| 526 | fi |
| 527 | done |
| 528 | IFS="$save_ifs" |
| 529 | |
| 530 | if test "X$echo" = Xecho; then |
| 531 | # We didn't find a better echo, so look for alternatives. |
| 532 | if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && |
| 533 | echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && |
| 534 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 535 | # This shell has a builtin print -r that does the trick. |
| 536 | echo='print -r' |
| 537 | elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && |
| 538 | test "X$CONFIG_SHELL" != X/bin/ksh; then |
| 539 | # If we have ksh, try running configure again with it. |
| 540 | ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
| 541 | export ORIGINAL_CONFIG_SHELL |
| 542 | CONFIG_SHELL=/bin/ksh |
| 543 | export CONFIG_SHELL |
| 544 | exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} |
| 545 | else |
| 546 | # Try using printf. |
| 547 | echo='printf %s\n' |
| 548 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
| 549 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
| 550 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 551 | # Cool, printf works |
| 552 | : |
| 553 | elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
| 554 | test "X$echo_testing_string" = 'X\t' && |
| 555 | echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
| 556 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 557 | CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL |
| 558 | export CONFIG_SHELL |
| 559 | SHELL="$CONFIG_SHELL" |
| 560 | export SHELL |
| 561 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
| 562 | elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
| 563 | test "X$echo_testing_string" = 'X\t' && |
| 564 | echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
| 565 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 566 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
| 567 | else |
| 568 | # maybe with a smaller string... |
| 569 | prev=: |
| 570 | |
| 571 | for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do |
| 572 | if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null |
| 573 | then |
| 574 | break |
| 575 | fi |
| 576 | prev="$cmd" |
| 577 | done |
| 578 | |
| 579 | if test "$prev" != 'sed 50q "[$]0"'; then |
| 580 | echo_test_string=`eval $prev` |
| 581 | export echo_test_string |
| 582 | exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} |
| 583 | else |
| 584 | # Oops. We lost completely, so just stick with echo. |
| 585 | echo=echo |
| 586 | fi |
| 587 | fi |
| 588 | fi |
| 589 | fi |
| 590 | fi |
| 591 | fi |
| 592 | |
| 593 | # Copy echo and quote the copy suitably for passing to libtool from |
| 594 | # the Makefile, instead of quoting the original, which is used later. |
| 595 | ECHO=$echo |
| 596 | if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then |
| 597 | ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" |
| 598 | fi |
| 599 | |
| 600 | AC_SUBST(ECHO) |
| 601 | AC_DIVERT_POP |
| 602 | ])# _LT_AC_PROG_ECHO_BACKSLASH |
| 603 | |
| 604 | # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, |
| 605 | # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) |
| 606 | # ------------------------------------------------------------------ |
| 607 | AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], |
| 608 | [if test "$cross_compiling" = yes; then : |
| 609 | [$4] |
| 610 | else |
| 611 | AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
| 612 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
| 613 | lt_status=$lt_dlunknown |
| 614 | cat > conftest.$ac_ext <<EOF |
| 615 | [#line __oline__ "configure" |
| 616 | #include "confdefs.h" |
| 617 | |
| 618 | #if HAVE_DLFCN_H |
| 619 | #include <dlfcn.h> |
| 620 | #endif |
| 621 | |
| 622 | #include <stdio.h> |
| 623 | |
| 624 | #ifdef RTLD_GLOBAL |
| 625 | # define LT_DLGLOBAL RTLD_GLOBAL |
| 626 | #else |
| 627 | # ifdef DL_GLOBAL |
| 628 | # define LT_DLGLOBAL DL_GLOBAL |
| 629 | # else |
| 630 | # define LT_DLGLOBAL 0 |
| 631 | # endif |
| 632 | #endif |
| 633 | |
| 634 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we |
| 635 | find out it does not work in some platform. */ |
| 636 | #ifndef LT_DLLAZY_OR_NOW |
| 637 | # ifdef RTLD_LAZY |
| 638 | # define LT_DLLAZY_OR_NOW RTLD_LAZY |
| 639 | # else |
| 640 | # ifdef DL_LAZY |
| 641 | # define LT_DLLAZY_OR_NOW DL_LAZY |
| 642 | # else |
| 643 | # ifdef RTLD_NOW |
| 644 | # define LT_DLLAZY_OR_NOW RTLD_NOW |
| 645 | # else |
| 646 | # ifdef DL_NOW |
| 647 | # define LT_DLLAZY_OR_NOW DL_NOW |
| 648 | # else |
| 649 | # define LT_DLLAZY_OR_NOW 0 |
| 650 | # endif |
| 651 | # endif |
| 652 | # endif |
| 653 | # endif |
| 654 | #endif |
| 655 | |
| 656 | #ifdef __cplusplus |
| 657 | extern "C" void exit (int); |
| 658 | #endif |
| 659 | |
| 660 | void fnord() { int i=42;} |
| 661 | int main () |
| 662 | { |
| 663 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); |
| 664 | int status = $lt_dlunknown; |
| 665 | |
| 666 | if (self) |
| 667 | { |
| 668 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; |
| 669 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; |
| 670 | /* dlclose (self); */ |
| 671 | } |
| 672 | |
| 673 | exit (status); |
| 674 | }] |
| 675 | EOF |
| 676 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then |
| 677 | (./conftest; exit; ) 2>/dev/null |
| 678 | lt_status=$? |
| 679 | case x$lt_status in |
| 680 | x$lt_dlno_uscore) $1 ;; |
| 681 | x$lt_dlneed_uscore) $2 ;; |
| 682 | x$lt_unknown|x*) $3 ;; |
| 683 | esac |
| 684 | else : |
| 685 | # compilation failed |
| 686 | $3 |
| 687 | fi |
| 688 | fi |
| 689 | rm -fr conftest* |
| 690 | ])# _LT_AC_TRY_DLOPEN_SELF |
| 691 | |
| 692 | # AC_LIBTOOL_DLOPEN_SELF |
| 693 | # ------------------- |
| 694 | AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], |
| 695 | [if test "x$enable_dlopen" != xyes; then |
| 696 | enable_dlopen=unknown |
| 697 | enable_dlopen_self=unknown |
| 698 | enable_dlopen_self_static=unknown |
| 699 | else |
| 700 | lt_cv_dlopen=no |
| 701 | lt_cv_dlopen_libs= |
| 702 | |
| 703 | case $host_os in |
| 704 | beos*) |
| 705 | lt_cv_dlopen="load_add_on" |
| 706 | lt_cv_dlopen_libs= |
| 707 | lt_cv_dlopen_self=yes |
| 708 | ;; |
| 709 | |
| 710 | cygwin* | mingw* | pw32*) |
| 711 | lt_cv_dlopen="LoadLibrary" |
| 712 | lt_cv_dlopen_libs= |
| 713 | ;; |
| 714 | |
| 715 | *) |
| 716 | AC_CHECK_FUNC([shl_load], |
| 717 | [lt_cv_dlopen="shl_load"], |
| 718 | [AC_CHECK_LIB([dld], [shl_load], |
| 719 | [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], |
| 720 | [AC_CHECK_FUNC([dlopen], |
| 721 | [lt_cv_dlopen="dlopen"], |
| 722 | [AC_CHECK_LIB([dl], [dlopen], |
| 723 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], |
| 724 | [AC_CHECK_LIB([svld], [dlopen], |
| 725 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], |
| 726 | [AC_CHECK_LIB([dld], [dld_link], |
| 727 | [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) |
| 728 | ]) |
| 729 | ]) |
| 730 | ]) |
| 731 | ]) |
| 732 | ]) |
| 733 | ;; |
| 734 | esac |
| 735 | |
| 736 | if test "x$lt_cv_dlopen" != xno; then |
| 737 | enable_dlopen=yes |
| 738 | else |
| 739 | enable_dlopen=no |
| 740 | fi |
| 741 | |
| 742 | case $lt_cv_dlopen in |
| 743 | dlopen) |
| 744 | save_CPPFLAGS="$CPPFLAGS" |
| 745 | AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
| 746 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" |
| 747 | |
| 748 | save_LDFLAGS="$LDFLAGS" |
| 749 | eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" |
| 750 | |
| 751 | save_LIBS="$LIBS" |
| 752 | LIBS="$lt_cv_dlopen_libs $LIBS" |
| 753 | |
| 754 | AC_CACHE_CHECK([whether a program can dlopen itself], |
| 755 | lt_cv_dlopen_self, [dnl |
| 756 | _LT_AC_TRY_DLOPEN_SELF( |
| 757 | lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, |
| 758 | lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) |
| 759 | ]) |
| 760 | |
| 761 | if test "x$lt_cv_dlopen_self" = xyes; then |
| 762 | LDFLAGS="$LDFLAGS $link_static_flag" |
| 763 | AC_CACHE_CHECK([whether a statically linked program can dlopen itself], |
| 764 | lt_cv_dlopen_self_static, [dnl |
| 765 | _LT_AC_TRY_DLOPEN_SELF( |
| 766 | lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, |
| 767 | lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) |
| 768 | ]) |
| 769 | fi |
| 770 | |
| 771 | CPPFLAGS="$save_CPPFLAGS" |
| 772 | LDFLAGS="$save_LDFLAGS" |
| 773 | LIBS="$save_LIBS" |
| 774 | ;; |
| 775 | esac |
| 776 | |
| 777 | case $lt_cv_dlopen_self in |
| 778 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; |
| 779 | *) enable_dlopen_self=unknown ;; |
| 780 | esac |
| 781 | |
| 782 | case $lt_cv_dlopen_self_static in |
| 783 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; |
| 784 | *) enable_dlopen_self_static=unknown ;; |
| 785 | esac |
| 786 | fi |
| 787 | ])# AC_LIBTOOL_DLOPEN_SELF |
| 788 | |
| 789 | AC_DEFUN([_LT_AC_LTCONFIG_HACK], |
| 790 | [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl |
| 791 | # Sed substitution that helps us do robust quoting. It backslashifies |
| 792 | # metacharacters that are still active within double-quoted strings. |
| 793 | Xsed='sed -e s/^X//' |
| 794 | sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g' |
| 795 | |
| 796 | # Same as above, but do not quote variable references. |
| 797 | double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' |
| 798 | |
| 799 | # Sed substitution to delay expansion of an escaped shell variable in a |
| 800 | # double_quote_subst'ed string. |
| 801 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
| 802 | |
| 803 | # Constants: |
| 804 | rm="rm -f" |
| 805 | |
| 806 | # Global variables: |
| 807 | default_ofile=libtool |
| 808 | can_build_shared=yes |
| 809 | |
| 810 | # All known linkers require a `.a' archive for static linking (except M$VC, |
| 811 | # which needs '.lib'). |
| 812 | libext=a |
| 813 | ltmain="$ac_aux_dir/ltmain.sh" |
| 814 | ofile="$default_ofile" |
| 815 | with_gnu_ld="$lt_cv_prog_gnu_ld" |
| 816 | need_locks="$enable_libtool_lock" |
| 817 | |
| 818 | old_CC="$CC" |
| 819 | old_CFLAGS="$CFLAGS" |
| 820 | |
| 821 | # Set sane defaults for various variables |
| 822 | test -z "$AR" && AR=ar |
| 823 | test -z "$AR_FLAGS" && AR_FLAGS=cru |
| 824 | test -z "$AS" && AS=as |
| 825 | test -z "$CC" && CC=cc |
| 826 | test -z "$DLLTOOL" && DLLTOOL=dlltool |
| 827 | test -z "$LD" && LD=ld |
| 828 | test -z "$LN_S" && LN_S="ln -s" |
| 829 | test -z "$MAGIC_CMD" && MAGIC_CMD=file |
| 830 | test -z "$NM" && NM=nm |
| 831 | test -z "$OBJDUMP" && OBJDUMP=objdump |
| 832 | test -z "$RANLIB" && RANLIB=: |
| 833 | test -z "$STRIP" && STRIP=: |
| 834 | test -z "$ac_objext" && ac_objext=o |
| 835 | |
| 836 | if test x"$host" != x"$build"; then |
| 837 | ac_tool_prefix=${host_alias}- |
| 838 | else |
| 839 | ac_tool_prefix= |
| 840 | fi |
| 841 | |
| 842 | # Transform linux* to *-*-linux-gnu*, to support old configure scripts. |
| 843 | case $host_os in |
| 844 | linux-gnu*) ;; |
| 845 | linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` |
| 846 | esac |
| 847 | |
| 848 | case $host_os in |
| 849 | aix3*) |
| 850 | # AIX sometimes has problems with the GCC collect2 program. For some |
| 851 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
| 852 | # vanish in a puff of smoke. |
| 853 | if test "X${COLLECT_NAMES+set}" != Xset; then |
| 854 | COLLECT_NAMES= |
| 855 | export COLLECT_NAMES |
| 856 | fi |
| 857 | ;; |
| 858 | esac |
| 859 | |
| 860 | # Determine commands to create old-style static archives. |
| 861 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' |
| 862 | old_postinstall_cmds='chmod 644 $oldlib' |
| 863 | old_postuninstall_cmds= |
| 864 | |
| 865 | if test -n "$RANLIB"; then |
| 866 | case $host_os in |
| 867 | openbsd*) |
| 868 | old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" |
| 869 | ;; |
| 870 | *) |
| 871 | old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" |
| 872 | ;; |
| 873 | esac |
| 874 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" |
| 875 | fi |
| 876 | |
| 877 | # Allow CC to be a program name with arguments. |
| 878 | set dummy $CC |
| 879 | compiler="[$]2" |
| 880 | |
| 881 | AC_MSG_CHECKING([for objdir]) |
| 882 | rm -f .libs 2>/dev/null |
| 883 | mkdir .libs 2>/dev/null |
| 884 | if test -d .libs; then |
| 885 | objdir=.libs |
| 886 | else |
| 887 | # MS-DOS does not allow filenames that begin with a dot. |
| 888 | objdir=_libs |
| 889 | fi |
| 890 | rmdir .libs 2>/dev/null |
| 891 | AC_MSG_RESULT($objdir) |
| 892 | |
| 893 | |
| 894 | AC_ARG_WITH(pic, |
| 895 | [ --with-pic try to use only PIC/non-PIC objects [default=use both]], |
| 896 | pic_mode="$withval", pic_mode=default) |
| 897 | test -z "$pic_mode" && pic_mode=default |
| 898 | |
| 899 | # We assume here that the value for lt_cv_prog_cc_pic will not be cached |
| 900 | # in isolation, and that seeing it set (from the cache) indicates that |
| 901 | # the associated values are set (in the cache) correctly too. |
| 902 | AC_MSG_CHECKING([for $compiler option to produce PIC]) |
| 903 | AC_CACHE_VAL(lt_cv_prog_cc_pic, |
| 904 | [ lt_cv_prog_cc_pic= |
| 905 | lt_cv_prog_cc_shlib= |
| 906 | lt_cv_prog_cc_wl= |
| 907 | lt_cv_prog_cc_static= |
| 908 | lt_cv_prog_cc_no_builtin= |
| 909 | lt_cv_prog_cc_can_build_shared=$can_build_shared |
| 910 | |
| 911 | if test "$GCC" = yes; then |
| 912 | lt_cv_prog_cc_wl='-Wl,' |
| 913 | lt_cv_prog_cc_static='-static' |
| 914 | |
| 915 | case $host_os in |
| 916 | aix*) |
| 917 | # Below there is a dirty hack to force normal static linking with -ldl |
| 918 | # The problem is because libdl dynamically linked with both libc and |
| 919 | # libC (AIX C++ library), which obviously doesn't included in libraries |
| 920 | # list by gcc. This cause undefined symbols with -static flags. |
| 921 | # This hack allows C programs to be linked with "-static -ldl", but |
| 922 | # not sure about C++ programs. |
| 923 | lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" |
| 924 | ;; |
| 925 | amigaos*) |
| 926 | # FIXME: we need at least 68020 code to build shared libraries, but |
| 927 | # adding the `-m68020' flag to GCC prevents building anything better, |
| 928 | # like `-m68040'. |
| 929 | lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' |
| 930 | ;; |
| 931 | beos* | irix5* | irix6* | osf3* | osf4* | osf5*) |
| 932 | # PIC is the default for these OSes. |
| 933 | ;; |
| 934 | darwin* | rhapsody*) |
| 935 | # PIC is the default on this platform |
| 936 | # Common symbols not allowed in MH_DYLIB files |
| 937 | lt_cv_prog_cc_pic='-fno-common' |
| 938 | ;; |
| 939 | cygwin* | mingw* | pw32* | os2*) |
| 940 | # This hack is so that the source file can tell whether it is being |
| 941 | # built for inclusion in a dll (and should export symbols for example). |
| 942 | lt_cv_prog_cc_pic='-DDLL_EXPORT' |
| 943 | ;; |
| 944 | sysv4*MP*) |
| 945 | if test -d /usr/nec; then |
| 946 | lt_cv_prog_cc_pic=-Kconform_pic |
| 947 | fi |
| 948 | ;; |
| 949 | *) |
| 950 | lt_cv_prog_cc_pic='-fPIC' |
| 951 | ;; |
| 952 | esac |
| 953 | else |
| 954 | # PORTME Check for PIC flags for the system compiler. |
| 955 | case $host_os in |
| 956 | aix3* | aix4* | aix5*) |
| 957 | lt_cv_prog_cc_wl='-Wl,' |
| 958 | # All AIX code is PIC. |
| 959 | if test "$host_cpu" = ia64; then |
| 960 | # AIX 5 now supports IA64 processor |
| 961 | lt_cv_prog_cc_static='-Bstatic' |
| 962 | else |
| 963 | lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' |
| 964 | fi |
| 965 | ;; |
| 966 | |
| 967 | hpux9* | hpux10* | hpux11*) |
| 968 | # Is there a better lt_cv_prog_cc_static that works with the bundled CC? |
| 969 | lt_cv_prog_cc_wl='-Wl,' |
| 970 | lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" |
| 971 | lt_cv_prog_cc_pic='+Z' |
| 972 | ;; |
| 973 | |
| 974 | irix5* | irix6*) |
| 975 | lt_cv_prog_cc_wl='-Wl,' |
| 976 | lt_cv_prog_cc_static='-non_shared' |
| 977 | # PIC (with -KPIC) is the default. |
| 978 | ;; |
| 979 | |
| 980 | cygwin* | mingw* | pw32* | os2*) |
| 981 | # This hack is so that the source file can tell whether it is being |
| 982 | # built for inclusion in a dll (and should export symbols for example). |
| 983 | lt_cv_prog_cc_pic='-DDLL_EXPORT' |
| 984 | ;; |
| 985 | |
| 986 | newsos6) |
| 987 | lt_cv_prog_cc_pic='-KPIC' |
| 988 | lt_cv_prog_cc_static='-Bstatic' |
| 989 | ;; |
| 990 | |
| 991 | osf3* | osf4* | osf5*) |
| 992 | # All OSF/1 code is PIC. |
| 993 | lt_cv_prog_cc_wl='-Wl,' |
| 994 | lt_cv_prog_cc_static='-non_shared' |
| 995 | ;; |
| 996 | |
| 997 | sco3.2v5*) |
| 998 | lt_cv_prog_cc_pic='-Kpic' |
| 999 | lt_cv_prog_cc_static='-dn' |
| 1000 | lt_cv_prog_cc_shlib='-belf' |
| 1001 | ;; |
| 1002 | |
| 1003 | solaris*) |
| 1004 | lt_cv_prog_cc_pic='-KPIC' |
| 1005 | lt_cv_prog_cc_static='-Bstatic' |
| 1006 | lt_cv_prog_cc_wl='-Wl,' |
| 1007 | ;; |
| 1008 | |
| 1009 | sunos4*) |
| 1010 | lt_cv_prog_cc_pic='-PIC' |
| 1011 | lt_cv_prog_cc_static='-Bstatic' |
| 1012 | lt_cv_prog_cc_wl='-Qoption ld ' |
| 1013 | ;; |
| 1014 | |
| 1015 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
| 1016 | lt_cv_prog_cc_pic='-KPIC' |
| 1017 | lt_cv_prog_cc_static='-Bstatic' |
| 1018 | if test "x$host_vendor" = xsni; then |
| 1019 | lt_cv_prog_cc_wl='-LD' |
| 1020 | else |
| 1021 | lt_cv_prog_cc_wl='-Wl,' |
| 1022 | fi |
| 1023 | ;; |
| 1024 | |
| 1025 | uts4*) |
| 1026 | lt_cv_prog_cc_pic='-pic' |
| 1027 | lt_cv_prog_cc_static='-Bstatic' |
| 1028 | ;; |
| 1029 | |
| 1030 | sysv4*MP*) |
| 1031 | if test -d /usr/nec ;then |
| 1032 | lt_cv_prog_cc_pic='-Kconform_pic' |
| 1033 | lt_cv_prog_cc_static='-Bstatic' |
| 1034 | fi |
| 1035 | ;; |
| 1036 | |
| 1037 | *) |
| 1038 | lt_cv_prog_cc_can_build_shared=no |
| 1039 | ;; |
| 1040 | esac |
| 1041 | fi |
| 1042 | ]) |
| 1043 | if test -z "$lt_cv_prog_cc_pic"; then |
| 1044 | AC_MSG_RESULT([none]) |
| 1045 | else |
| 1046 | AC_MSG_RESULT([$lt_cv_prog_cc_pic]) |
| 1047 | |
| 1048 | # Check to make sure the pic_flag actually works. |
| 1049 | AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) |
| 1050 | AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl |
| 1051 | save_CFLAGS="$CFLAGS" |
| 1052 | CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" |
| 1053 | AC_TRY_COMPILE([], [], [dnl |
| 1054 | case $host_os in |
| 1055 | hpux9* | hpux10* | hpux11*) |
| 1056 | # On HP-UX, both CC and GCC only warn that PIC is supported... then |
| 1057 | # they create non-PIC objects. So, if there were any warnings, we |
| 1058 | # assume that PIC is not supported. |
| 1059 | if test -s conftest.err; then |
| 1060 | lt_cv_prog_cc_pic_works=no |
| 1061 | else |
| 1062 | lt_cv_prog_cc_pic_works=yes |
| 1063 | fi |
| 1064 | ;; |
| 1065 | *) |
| 1066 | lt_cv_prog_cc_pic_works=yes |
| 1067 | ;; |
| 1068 | esac |
| 1069 | ], [dnl |
| 1070 | lt_cv_prog_cc_pic_works=no |
| 1071 | ]) |
| 1072 | CFLAGS="$save_CFLAGS" |
| 1073 | ]) |
| 1074 | |
| 1075 | if test "X$lt_cv_prog_cc_pic_works" = Xno; then |
| 1076 | lt_cv_prog_cc_pic= |
| 1077 | lt_cv_prog_cc_can_build_shared=no |
| 1078 | else |
| 1079 | lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" |
| 1080 | fi |
| 1081 | |
| 1082 | AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) |
| 1083 | fi |
| 1084 | |
| 1085 | # Check for any special shared library compilation flags. |
| 1086 | if test -n "$lt_cv_prog_cc_shlib"; then |
| 1087 | AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) |
| 1088 | if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : |
| 1089 | else |
| 1090 | AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) |
| 1091 | lt_cv_prog_cc_can_build_shared=no |
| 1092 | fi |
| 1093 | fi |
| 1094 | |
| 1095 | AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) |
| 1096 | AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl |
| 1097 | lt_cv_prog_cc_static_works=no |
| 1098 | save_LDFLAGS="$LDFLAGS" |
| 1099 | LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" |
| 1100 | AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) |
| 1101 | LDFLAGS="$save_LDFLAGS" |
| 1102 | ]) |
| 1103 | |
| 1104 | # Belt *and* braces to stop my trousers falling down: |
| 1105 | test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= |
| 1106 | AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) |
| 1107 | |
| 1108 | pic_flag="$lt_cv_prog_cc_pic" |
| 1109 | special_shlib_compile_flags="$lt_cv_prog_cc_shlib" |
| 1110 | wl="$lt_cv_prog_cc_wl" |
| 1111 | link_static_flag="$lt_cv_prog_cc_static" |
| 1112 | no_builtin_flag="$lt_cv_prog_cc_no_builtin" |
| 1113 | can_build_shared="$lt_cv_prog_cc_can_build_shared" |
| 1114 | |
| 1115 | |
| 1116 | # Check to see if options -o and -c are simultaneously supported by compiler |
| 1117 | AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) |
| 1118 | AC_CACHE_VAL([lt_cv_compiler_c_o], [ |
| 1119 | $rm -r conftest 2>/dev/null |
| 1120 | mkdir conftest |
| 1121 | cd conftest |
| 1122 | echo "int some_variable = 0;" > conftest.$ac_ext |
| 1123 | mkdir out |
| 1124 | # According to Tom Tromey, Ian Lance Taylor reported there are C compilers |
| 1125 | # that will create temporary files in the current directory regardless of |
| 1126 | # the output directory. Thus, making CWD read-only will cause this test |
| 1127 | # to fail, enabling locking or at least warning the user not to do parallel |
| 1128 | # builds. |
| 1129 | chmod -w . |
| 1130 | save_CFLAGS="$CFLAGS" |
| 1131 | CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" |
| 1132 | compiler_c_o=no |
| 1133 | if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then |
| 1134 | # The compiler can only warn and ignore the option if not recognized |
| 1135 | # So say no if there are warnings |
| 1136 | if test -s out/conftest.err; then |
| 1137 | lt_cv_compiler_c_o=no |
| 1138 | else |
| 1139 | lt_cv_compiler_c_o=yes |
| 1140 | fi |
| 1141 | else |
| 1142 | # Append any errors to the config.log. |
| 1143 | cat out/conftest.err 1>&AC_FD_CC |
| 1144 | lt_cv_compiler_c_o=no |
| 1145 | fi |
| 1146 | CFLAGS="$save_CFLAGS" |
| 1147 | chmod u+w . |
| 1148 | $rm conftest* out/* |
| 1149 | rmdir out |
| 1150 | cd .. |
| 1151 | rmdir conftest |
| 1152 | $rm -r conftest 2>/dev/null |
| 1153 | ]) |
| 1154 | compiler_c_o=$lt_cv_compiler_c_o |
| 1155 | AC_MSG_RESULT([$compiler_c_o]) |
| 1156 | |
| 1157 | if test x"$compiler_c_o" = x"yes"; then |
| 1158 | # Check to see if we can write to a .lo |
| 1159 | AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) |
| 1160 | AC_CACHE_VAL([lt_cv_compiler_o_lo], [ |
| 1161 | lt_cv_compiler_o_lo=no |
| 1162 | save_CFLAGS="$CFLAGS" |
| 1163 | CFLAGS="$CFLAGS -c -o conftest.lo" |
| 1164 | save_objext="$ac_objext" |
| 1165 | ac_objext=lo |
| 1166 | AC_TRY_COMPILE([], [int some_variable = 0;], [dnl |
| 1167 | # The compiler can only warn and ignore the option if not recognized |
| 1168 | # So say no if there are warnings |
| 1169 | if test -s conftest.err; then |
| 1170 | lt_cv_compiler_o_lo=no |
| 1171 | else |
| 1172 | lt_cv_compiler_o_lo=yes |
| 1173 | fi |
| 1174 | ]) |
| 1175 | ac_objext="$save_objext" |
| 1176 | CFLAGS="$save_CFLAGS" |
| 1177 | ]) |
| 1178 | compiler_o_lo=$lt_cv_compiler_o_lo |
| 1179 | AC_MSG_RESULT([$compiler_o_lo]) |
| 1180 | else |
| 1181 | compiler_o_lo=no |
| 1182 | fi |
| 1183 | |
| 1184 | # Check to see if we can do hard links to lock some files if needed |
| 1185 | hard_links="nottested" |
| 1186 | if test "$compiler_c_o" = no && test "$need_locks" != no; then |
| 1187 | # do not overwrite the value of need_locks provided by the user |
| 1188 | AC_MSG_CHECKING([if we can lock with hard links]) |
| 1189 | hard_links=yes |
| 1190 | $rm conftest* |
| 1191 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
| 1192 | touch conftest.a |
| 1193 | ln conftest.a conftest.b 2>&5 || hard_links=no |
| 1194 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
| 1195 | AC_MSG_RESULT([$hard_links]) |
| 1196 | if test "$hard_links" = no; then |
| 1197 | AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe]) |
| 1198 | need_locks=warn |
| 1199 | fi |
| 1200 | else |
| 1201 | need_locks=no |
| 1202 | fi |
| 1203 | |
| 1204 | if test "$GCC" = yes; then |
| 1205 | # Check to see if options -fno-rtti -fno-exceptions are supported by compiler |
| 1206 | AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) |
| 1207 | echo "int some_variable = 0;" > conftest.$ac_ext |
| 1208 | save_CFLAGS="$CFLAGS" |
| 1209 | CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" |
| 1210 | compiler_rtti_exceptions=no |
| 1211 | AC_TRY_COMPILE([], [int some_variable = 0;], [dnl |
| 1212 | # The compiler can only warn and ignore the option if not recognized |
| 1213 | # So say no if there are warnings |
| 1214 | if test -s conftest.err; then |
| 1215 | compiler_rtti_exceptions=no |
| 1216 | else |
| 1217 | compiler_rtti_exceptions=yes |
| 1218 | fi |
| 1219 | ]) |
| 1220 | CFLAGS="$save_CFLAGS" |
| 1221 | AC_MSG_RESULT([$compiler_rtti_exceptions]) |
| 1222 | |
| 1223 | if test "$compiler_rtti_exceptions" = "yes"; then |
| 1224 | no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' |
| 1225 | else |
| 1226 | no_builtin_flag=' -fno-builtin' |
| 1227 | fi |
| 1228 | fi |
| 1229 | |
| 1230 | # See if the linker supports building shared libraries. |
| 1231 | AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) |
| 1232 | |
| 1233 | allow_undefined_flag= |
| 1234 | no_undefined_flag= |
| 1235 | need_lib_prefix=unknown |
| 1236 | need_version=unknown |
| 1237 | # when you set need_version to no, make sure it does not cause -set_version |
| 1238 | # flags to be left without arguments |
| 1239 | archive_cmds= |
| 1240 | archive_expsym_cmds= |
| 1241 | old_archive_from_new_cmds= |
| 1242 | old_archive_from_expsyms_cmds= |
| 1243 | export_dynamic_flag_spec= |
| 1244 | whole_archive_flag_spec= |
| 1245 | thread_safe_flag_spec= |
| 1246 | hardcode_into_libs=no |
| 1247 | hardcode_libdir_flag_spec= |
| 1248 | hardcode_libdir_separator= |
| 1249 | hardcode_direct=no |
| 1250 | hardcode_minus_L=no |
| 1251 | hardcode_shlibpath_var=unsupported |
| 1252 | runpath_var= |
| 1253 | link_all_deplibs=unknown |
| 1254 | always_export_symbols=no |
| 1255 | export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' |
| 1256 | # include_expsyms should be a list of space-separated symbols to be *always* |
| 1257 | # included in the symbol list |
| 1258 | include_expsyms= |
| 1259 | # exclude_expsyms can be an egrep regular expression of symbols to exclude |
| 1260 | # it will be wrapped by ` (' and `)$', so one must not match beginning or |
| 1261 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
| 1262 | # as well as any symbol that contains `d'. |
| 1263 | exclude_expsyms="_GLOBAL_OFFSET_TABLE_" |
| 1264 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
| 1265 | # platforms (ab)use it in PIC code, but their linkers get confused if |
| 1266 | # the symbol is explicitly referenced. Since portable code cannot |
| 1267 | # rely on this symbol name, it's probably fine to never include it in |
| 1268 | # preloaded symbol tables. |
| 1269 | extract_expsyms_cmds= |
| 1270 | |
| 1271 | case $host_os in |
| 1272 | cygwin* | mingw* | pw32*) |
| 1273 | # FIXME: the MSVC++ port hasn't been tested in a loooong time |
| 1274 | # When not using gcc, we currently assume that we are using |
| 1275 | # Microsoft Visual C++. |
| 1276 | if test "$GCC" != yes; then |
| 1277 | with_gnu_ld=no |
| 1278 | fi |
| 1279 | ;; |
| 1280 | openbsd*) |
| 1281 | with_gnu_ld=no |
| 1282 | ;; |
| 1283 | esac |
| 1284 | |
| 1285 | ld_shlibs=yes |
| 1286 | if test "$with_gnu_ld" = yes; then |
| 1287 | # If archive_cmds runs LD, not CC, wlarc should be empty |
| 1288 | wlarc='${wl}' |
| 1289 | |
| 1290 | # See if GNU ld supports shared libraries. |
| 1291 | case $host_os in |
| 1292 | aix3* | aix4* | aix5*) |
| 1293 | # On AIX, the GNU linker is very broken |
| 1294 | # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. |
| 1295 | ld_shlibs=no |
| 1296 | cat <<EOF 1>&2 |
| 1297 | |
| 1298 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported |
| 1299 | *** to be unable to reliably create shared libraries on AIX. |
| 1300 | *** Therefore, libtool is disabling shared libraries support. If you |
| 1301 | *** really care for shared libraries, you may want to modify your PATH |
| 1302 | *** so that a non-GNU linker is found, and then restart. |
| 1303 | |
| 1304 | EOF |
| 1305 | ;; |
| 1306 | |
| 1307 | amigaos*) |
| 1308 | archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' |
| 1309 | hardcode_libdir_flag_spec='-L$libdir' |
| 1310 | hardcode_minus_L=yes |
| 1311 | |
| 1312 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
| 1313 | # that the semantics of dynamic libraries on AmigaOS, at least up |
| 1314 | # to version 4, is to share data among multiple programs linked |
| 1315 | # with the same dynamic library. Since this doesn't match the |
| 1316 | # behavior of shared libraries on other platforms, we can use |
| 1317 | # them. |
| 1318 | ld_shlibs=no |
| 1319 | ;; |
| 1320 | |
| 1321 | beos*) |
| 1322 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
| 1323 | allow_undefined_flag=unsupported |
| 1324 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
| 1325 | # support --undefined. This deserves some investigation. FIXME |
| 1326 | archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 1327 | else |
| 1328 | ld_shlibs=no |
| 1329 | fi |
| 1330 | ;; |
| 1331 | |
| 1332 | cygwin* | mingw* | pw32*) |
| 1333 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
| 1334 | # no search path for DLLs. |
| 1335 | hardcode_libdir_flag_spec='-L$libdir' |
| 1336 | allow_undefined_flag=unsupported |
| 1337 | always_export_symbols=yes |
| 1338 | |
| 1339 | extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ |
| 1340 | sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ |
| 1341 | test -f $output_objdir/impgen.exe || (cd $output_objdir && \ |
| 1342 | if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ |
| 1343 | else $CC -o impgen impgen.c ; fi)~ |
| 1344 | $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' |
| 1345 | |
| 1346 | old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' |
| 1347 | |
| 1348 | # cygwin and mingw dlls have different entry points and sets of symbols |
| 1349 | # to exclude. |
| 1350 | # FIXME: what about values for MSVC? |
| 1351 | dll_entry=__cygwin_dll_entry@12 |
| 1352 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ |
| 1353 | case $host_os in |
| 1354 | mingw*) |
| 1355 | # mingw values |
| 1356 | dll_entry=_DllMainCRTStartup@12 |
| 1357 | dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ |
| 1358 | ;; |
| 1359 | esac |
| 1360 | |
| 1361 | # mingw and cygwin differ, and it's simplest to just exclude the union |
| 1362 | # of the two symbol sets. |
| 1363 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 |
| 1364 | |
| 1365 | # recent cygwin and mingw systems supply a stub DllMain which the user |
| 1366 | # can override, but on older systems we have to supply one (in ltdll.c) |
| 1367 | if test "x$lt_cv_need_dllmain" = "xyes"; then |
| 1368 | ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " |
| 1369 | ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ |
| 1370 | test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' |
| 1371 | else |
| 1372 | ltdll_obj= |
| 1373 | ltdll_cmds= |
| 1374 | fi |
| 1375 | |
| 1376 | # Extract the symbol export list from an `--export-all' def file, |
| 1377 | # then regenerate the def file from the symbol export list, so that |
| 1378 | # the compiled dll only exports the symbol export list. |
| 1379 | # Be careful not to strip the DATA tag left be newer dlltools. |
| 1380 | export_symbols_cmds="$ltdll_cmds"' |
| 1381 | $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ |
| 1382 | sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' |
| 1383 | |
| 1384 | # If the export-symbols file already is a .def file (1st line |
| 1385 | # is EXPORTS), use it as is. |
| 1386 | # If DATA tags from a recent dlltool are present, honour them! |
| 1387 | archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then |
| 1388 | cp $export_symbols $output_objdir/$soname-def; |
| 1389 | else |
| 1390 | echo EXPORTS > $output_objdir/$soname-def; |
| 1391 | _lt_hint=1; |
| 1392 | cat $export_symbols | while read symbol; do |
| 1393 | set dummy \$symbol; |
| 1394 | case \[$]# in |
| 1395 | 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; |
| 1396 | *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; |
| 1397 | esac; |
| 1398 | _lt_hint=`expr 1 + \$_lt_hint`; |
| 1399 | done; |
| 1400 | fi~ |
| 1401 | '"$ltdll_cmds"' |
| 1402 | $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ |
| 1403 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ |
| 1404 | $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ |
| 1405 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ |
| 1406 | $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' |
| 1407 | ;; |
| 1408 | |
| 1409 | netbsd*) |
| 1410 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 1411 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
| 1412 | wlarc= |
| 1413 | else |
| 1414 | archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 1415 | archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
| 1416 | fi |
| 1417 | ;; |
| 1418 | |
| 1419 | solaris* | sysv5*) |
| 1420 | if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then |
| 1421 | ld_shlibs=no |
| 1422 | cat <<EOF 1>&2 |
| 1423 | |
| 1424 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably |
| 1425 | *** create shared libraries on Solaris systems. Therefore, libtool |
| 1426 | *** is disabling shared libraries support. We urge you to upgrade GNU |
| 1427 | *** binutils to release 2.9.1 or newer. Another option is to modify |
| 1428 | *** your PATH or compiler configuration so that the native linker is |
| 1429 | *** used, and then restart. |
| 1430 | |
| 1431 | EOF |
| 1432 | elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
| 1433 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 1434 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
| 1435 | else |
| 1436 | ld_shlibs=no |
| 1437 | fi |
| 1438 | ;; |
| 1439 | |
| 1440 | sunos4*) |
| 1441 | archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 1442 | wlarc= |
| 1443 | hardcode_direct=yes |
| 1444 | hardcode_shlibpath_var=no |
| 1445 | ;; |
| 1446 | |
| 1447 | *) |
| 1448 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
| 1449 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 1450 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
| 1451 | else |
| 1452 | ld_shlibs=no |
| 1453 | fi |
| 1454 | ;; |
| 1455 | esac |
| 1456 | |
| 1457 | if test "$ld_shlibs" = yes; then |
| 1458 | runpath_var=LD_RUN_PATH |
| 1459 | hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' |
| 1460 | export_dynamic_flag_spec='${wl}--export-dynamic' |
| 1461 | case $host_os in |
| 1462 | cygwin* | mingw* | pw32*) |
| 1463 | # dlltool doesn't understand --whole-archive et. al. |
| 1464 | whole_archive_flag_spec= |
| 1465 | ;; |
| 1466 | *) |
| 1467 | # ancient GNU ld didn't support --whole-archive et. al. |
| 1468 | if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then |
| 1469 | whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
| 1470 | else |
| 1471 | whole_archive_flag_spec= |
| 1472 | fi |
| 1473 | ;; |
| 1474 | esac |
| 1475 | fi |
| 1476 | else |
| 1477 | # PORTME fill in a description of your system's linker (not GNU ld) |
| 1478 | case $host_os in |
| 1479 | aix3*) |
| 1480 | allow_undefined_flag=unsupported |
| 1481 | always_export_symbols=yes |
| 1482 | archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' |
| 1483 | # Note: this linker hardcodes the directories in LIBPATH if there |
| 1484 | # are no directories specified by -L. |
| 1485 | hardcode_minus_L=yes |
| 1486 | if test "$GCC" = yes && test -z "$link_static_flag"; then |
| 1487 | # Neither direct hardcoding nor static linking is supported with a |
| 1488 | # broken collect2. |
| 1489 | hardcode_direct=unsupported |
| 1490 | fi |
| 1491 | ;; |
| 1492 | |
| 1493 | aix4* | aix5*) |
| 1494 | if test "$host_cpu" = ia64; then |
| 1495 | # On IA64, the linker does run time linking by default, so we don't |
| 1496 | # have to do anything special. |
| 1497 | aix_use_runtimelinking=no |
| 1498 | exp_sym_flag='-Bexport' |
| 1499 | no_entry_flag="" |
| 1500 | else |
| 1501 | aix_use_runtimelinking=no |
| 1502 | |
| 1503 | # Test if we are trying to use run time linking or normal |
| 1504 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we |
| 1505 | # need to do runtime linking. |
| 1506 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
| 1507 | for ld_flag in $LDFLAGS; do |
| 1508 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then |
| 1509 | aix_use_runtimelinking=yes |
| 1510 | break |
| 1511 | fi |
| 1512 | done |
| 1513 | esac |
| 1514 | |
| 1515 | exp_sym_flag='-bexport' |
| 1516 | no_entry_flag='-bnoentry' |
| 1517 | fi |
| 1518 | |
| 1519 | # When large executables or shared objects are built, AIX ld can |
| 1520 | # have problems creating the table of contents. If linking a library |
| 1521 | # or program results in "error TOC overflow" add -mminimal-toc to |
| 1522 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
| 1523 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
| 1524 | |
| 1525 | hardcode_direct=yes |
| 1526 | archive_cmds='' |
| 1527 | hardcode_libdir_separator=':' |
| 1528 | if test "$GCC" = yes; then |
| 1529 | case $host_os in aix4.[[012]]|aix4.[[012]].*) |
| 1530 | collect2name=`${CC} -print-prog-name=collect2` |
| 1531 | if test -f "$collect2name" && \ |
| 1532 | strings "$collect2name" | grep resolve_lib_name >/dev/null |
| 1533 | then |
| 1534 | # We have reworked collect2 |
| 1535 | hardcode_direct=yes |
| 1536 | else |
| 1537 | # We have old collect2 |
| 1538 | hardcode_direct=unsupported |
| 1539 | # It fails to find uninstalled libraries when the uninstalled |
| 1540 | # path is not listed in the libpath. Setting hardcode_minus_L |
| 1541 | # to unsupported forces relinking |
| 1542 | hardcode_minus_L=yes |
| 1543 | hardcode_libdir_flag_spec='-L$libdir' |
| 1544 | hardcode_libdir_separator= |
| 1545 | fi |
| 1546 | esac |
| 1547 | |
| 1548 | shared_flag='-shared' |
| 1549 | else |
| 1550 | # not using gcc |
| 1551 | if test "$host_cpu" = ia64; then |
| 1552 | shared_flag='${wl}-G' |
| 1553 | else |
| 1554 | if test "$aix_use_runtimelinking" = yes; then |
| 1555 | shared_flag='${wl}-G' |
| 1556 | else |
| 1557 | shared_flag='${wl}-bM:SRE' |
| 1558 | fi |
| 1559 | fi |
| 1560 | fi |
| 1561 | |
| 1562 | # It seems that -bexpall can do strange things, so it is better to |
| 1563 | # generate a list of symbols to export. |
| 1564 | always_export_symbols=yes |
| 1565 | if test "$aix_use_runtimelinking" = yes; then |
| 1566 | # Warning - without using the other runtime loading flags (-brtl), |
| 1567 | # -berok will link without error, but may produce a broken library. |
| 1568 | allow_undefined_flag='-berok' |
| 1569 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' |
| 1570 | archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
| 1571 | else |
| 1572 | if test "$host_cpu" = ia64; then |
| 1573 | hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' |
| 1574 | allow_undefined_flag="-z nodefs" |
| 1575 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" |
| 1576 | else |
| 1577 | hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' |
| 1578 | # Warning - without using the other run time loading flags, |
| 1579 | # -berok will link without error, but may produce a broken library. |
| 1580 | allow_undefined_flag='${wl}-berok' |
| 1581 | # This is a bit strange, but is similar to how AIX traditionally builds |
| 1582 | # it's shared libraries. |
| 1583 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' |
| 1584 | fi |
| 1585 | fi |
| 1586 | ;; |
| 1587 | |
| 1588 | amigaos*) |
| 1589 | archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' |
| 1590 | hardcode_libdir_flag_spec='-L$libdir' |
| 1591 | hardcode_minus_L=yes |
| 1592 | # see comment about different semantics on the GNU ld section |
| 1593 | ld_shlibs=no |
| 1594 | ;; |
| 1595 | |
| 1596 | cygwin* | mingw* | pw32*) |
| 1597 | # When not using gcc, we currently assume that we are using |
| 1598 | # Microsoft Visual C++. |
| 1599 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
| 1600 | # no search path for DLLs. |
| 1601 | hardcode_libdir_flag_spec=' ' |
| 1602 | allow_undefined_flag=unsupported |
| 1603 | # Tell ltmain to make .lib files, not .a files. |
| 1604 | libext=lib |
| 1605 | # FIXME: Setting linknames here is a bad hack. |
| 1606 | archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
| 1607 | # The linker will automatically build a .lib file if we build a DLL. |
| 1608 | old_archive_from_new_cmds='true' |
| 1609 | # FIXME: Should let the user specify the lib program. |
| 1610 | old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' |
| 1611 | fix_srcfile_path='`cygpath -w "$srcfile"`' |
| 1612 | ;; |
| 1613 | |
| 1614 | darwin* | rhapsody*) |
| 1615 | case "$host_os" in |
| 1616 | rhapsody* | darwin1.[[012]]) |
| 1617 | allow_undefined_flag='-undefined suppress' |
| 1618 | ;; |
| 1619 | *) # Darwin 1.3 on |
| 1620 | allow_undefined_flag='-flat_namespace -undefined suppress' |
| 1621 | ;; |
| 1622 | esac |
| 1623 | # FIXME: Relying on posixy $() will cause problems for |
| 1624 | # cross-compilation, but unfortunately the echo tests do not |
| 1625 | # yet detect zsh echo's removal of \ escapes. |
| 1626 | archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' |
| 1627 | # We need to add '_' to the symbols in $export_symbols first |
| 1628 | #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' |
| 1629 | hardcode_direct=yes |
| 1630 | hardcode_shlibpath_var=no |
| 1631 | whole_archive_flag_spec='-all_load $convenience' |
| 1632 | ;; |
| 1633 | |
| 1634 | freebsd1*) |
| 1635 | ld_shlibs=no |
| 1636 | ;; |
| 1637 | |
| 1638 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
| 1639 | # support. Future versions do this automatically, but an explicit c++rt0.o |
| 1640 | # does not break anything, and helps significantly (at the cost of a little |
| 1641 | # extra space). |
| 1642 | freebsd2.2*) |
| 1643 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' |
| 1644 | hardcode_libdir_flag_spec='-R$libdir' |
| 1645 | hardcode_direct=yes |
| 1646 | hardcode_shlibpath_var=no |
| 1647 | ;; |
| 1648 | |
| 1649 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
| 1650 | freebsd2*) |
| 1651 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 1652 | hardcode_direct=yes |
| 1653 | hardcode_minus_L=yes |
| 1654 | hardcode_shlibpath_var=no |
| 1655 | ;; |
| 1656 | |
| 1657 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
| 1658 | freebsd*) |
| 1659 | archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' |
| 1660 | hardcode_libdir_flag_spec='-R$libdir' |
| 1661 | hardcode_direct=yes |
| 1662 | hardcode_shlibpath_var=no |
| 1663 | ;; |
| 1664 | |
| 1665 | hpux9* | hpux10* | hpux11*) |
| 1666 | case $host_os in |
| 1667 | hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; |
| 1668 | *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; |
| 1669 | esac |
| 1670 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
| 1671 | hardcode_libdir_separator=: |
| 1672 | hardcode_direct=yes |
| 1673 | hardcode_minus_L=yes # Not in the search PATH, but as the default |
| 1674 | # location of the library. |
| 1675 | export_dynamic_flag_spec='${wl}-E' |
| 1676 | ;; |
| 1677 | |
| 1678 | irix5* | irix6*) |
| 1679 | if test "$GCC" = yes; then |
| 1680 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
| 1681 | else |
| 1682 | archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
| 1683 | fi |
| 1684 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| 1685 | hardcode_libdir_separator=: |
| 1686 | link_all_deplibs=yes |
| 1687 | ;; |
| 1688 | |
| 1689 | netbsd*) |
| 1690 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 1691 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
| 1692 | else |
| 1693 | archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
| 1694 | fi |
| 1695 | hardcode_libdir_flag_spec='-R$libdir' |
| 1696 | hardcode_direct=yes |
| 1697 | hardcode_shlibpath_var=no |
| 1698 | ;; |
| 1699 | |
| 1700 | newsos6) |
| 1701 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 1702 | hardcode_direct=yes |
| 1703 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| 1704 | hardcode_libdir_separator=: |
| 1705 | hardcode_shlibpath_var=no |
| 1706 | ;; |
| 1707 | |
| 1708 | openbsd*) |
| 1709 | hardcode_direct=yes |
| 1710 | hardcode_shlibpath_var=no |
| 1711 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| 1712 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' |
| 1713 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
| 1714 | export_dynamic_flag_spec='${wl}-E' |
| 1715 | else |
| 1716 | case "$host_os" in |
| 1717 | openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) |
| 1718 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 1719 | hardcode_libdir_flag_spec='-R$libdir' |
| 1720 | ;; |
| 1721 | *) |
| 1722 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' |
| 1723 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
| 1724 | ;; |
| 1725 | esac |
| 1726 | fi |
| 1727 | ;; |
| 1728 | |
| 1729 | os2*) |
| 1730 | hardcode_libdir_flag_spec='-L$libdir' |
| 1731 | hardcode_minus_L=yes |
| 1732 | allow_undefined_flag=unsupported |
| 1733 | archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' |
| 1734 | old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
| 1735 | ;; |
| 1736 | |
| 1737 | osf3*) |
| 1738 | if test "$GCC" = yes; then |
| 1739 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
| 1740 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
| 1741 | else |
| 1742 | allow_undefined_flag=' -expect_unresolved \*' |
| 1743 | archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
| 1744 | fi |
| 1745 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| 1746 | hardcode_libdir_separator=: |
| 1747 | ;; |
| 1748 | |
| 1749 | osf4* | osf5*) # as osf3* with the addition of -msym flag |
| 1750 | if test "$GCC" = yes; then |
| 1751 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
| 1752 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
| 1753 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
| 1754 | else |
| 1755 | allow_undefined_flag=' -expect_unresolved \*' |
| 1756 | archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
| 1757 | archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ |
| 1758 | $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' |
| 1759 | |
| 1760 | #Both c and cxx compiler support -rpath directly |
| 1761 | hardcode_libdir_flag_spec='-rpath $libdir' |
| 1762 | fi |
| 1763 | hardcode_libdir_separator=: |
| 1764 | ;; |
| 1765 | |
| 1766 | sco3.2v5*) |
| 1767 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 1768 | hardcode_shlibpath_var=no |
| 1769 | runpath_var=LD_RUN_PATH |
| 1770 | hardcode_runpath_var=yes |
| 1771 | export_dynamic_flag_spec='${wl}-Bexport' |
| 1772 | ;; |
| 1773 | |
| 1774 | solaris*) |
| 1775 | # gcc --version < 3.0 without binutils cannot create self contained |
| 1776 | # shared libraries reliably, requiring libgcc.a to resolve some of |
| 1777 | # the object symbols generated in some cases. Libraries that use |
| 1778 | # assert need libgcc.a to resolve __eprintf, for example. Linking |
| 1779 | # a copy of libgcc.a into every shared library to guarantee resolving |
| 1780 | # such symbols causes other problems: According to Tim Van Holder |
| 1781 | # <tim.van.holder@pandora.be>, C++ libraries end up with a separate |
| 1782 | # (to the application) exception stack for one thing. |
| 1783 | no_undefined_flag=' -z defs' |
| 1784 | if test "$GCC" = yes; then |
| 1785 | case `$CC --version 2>/dev/null` in |
| 1786 | [[12]].*) |
| 1787 | cat <<EOF 1>&2 |
| 1788 | |
| 1789 | *** Warning: Releases of GCC earlier than version 3.0 cannot reliably |
| 1790 | *** create self contained shared libraries on Solaris systems, without |
| 1791 | *** introducing a dependency on libgcc.a. Therefore, libtool is disabling |
| 1792 | *** -no-undefined support, which will at least allow you to build shared |
| 1793 | *** libraries. However, you may find that when you link such libraries |
| 1794 | *** into an application without using GCC, you have to manually add |
| 1795 | *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to |
| 1796 | *** upgrade to a newer version of GCC. Another option is to rebuild your |
| 1797 | *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. |
| 1798 | |
| 1799 | EOF |
| 1800 | no_undefined_flag= |
| 1801 | ;; |
| 1802 | esac |
| 1803 | fi |
| 1804 | # $CC -shared without GNU ld will not create a library from C++ |
| 1805 | # object files and a static libstdc++, better avoid it by now |
| 1806 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 1807 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 1808 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
| 1809 | hardcode_libdir_flag_spec='-R$libdir' |
| 1810 | hardcode_shlibpath_var=no |
| 1811 | case $host_os in |
| 1812 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
| 1813 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) |
| 1814 | whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; |
| 1815 | esac |
| 1816 | link_all_deplibs=yes |
| 1817 | ;; |
| 1818 | |
| 1819 | sunos4*) |
| 1820 | if test "x$host_vendor" = xsequent; then |
| 1821 | # Use $CC to link under sequent, because it throws in some extra .o |
| 1822 | # files that make .init and .fini sections work. |
| 1823 | archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' |
| 1824 | else |
| 1825 | archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' |
| 1826 | fi |
| 1827 | hardcode_libdir_flag_spec='-L$libdir' |
| 1828 | hardcode_direct=yes |
| 1829 | hardcode_minus_L=yes |
| 1830 | hardcode_shlibpath_var=no |
| 1831 | ;; |
| 1832 | |
| 1833 | sysv4) |
| 1834 | if test "x$host_vendor" = xsno; then |
| 1835 | archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 1836 | hardcode_direct=yes # is this really true??? |
| 1837 | else |
| 1838 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 1839 | hardcode_direct=no #Motorola manual says yes, but my tests say they lie |
| 1840 | fi |
| 1841 | runpath_var='LD_RUN_PATH' |
| 1842 | hardcode_shlibpath_var=no |
| 1843 | ;; |
| 1844 | |
| 1845 | sysv4.3*) |
| 1846 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 1847 | hardcode_shlibpath_var=no |
| 1848 | export_dynamic_flag_spec='-Bexport' |
| 1849 | ;; |
| 1850 | |
| 1851 | sysv5*) |
| 1852 | no_undefined_flag=' -z text' |
| 1853 | # $CC -shared without GNU ld will not create a library from C++ |
| 1854 | # object files and a static libstdc++, better avoid it by now |
| 1855 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 1856 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 1857 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
| 1858 | hardcode_libdir_flag_spec= |
| 1859 | hardcode_shlibpath_var=no |
| 1860 | runpath_var='LD_RUN_PATH' |
| 1861 | ;; |
| 1862 | |
| 1863 | uts4*) |
| 1864 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 1865 | hardcode_libdir_flag_spec='-L$libdir' |
| 1866 | hardcode_shlibpath_var=no |
| 1867 | ;; |
| 1868 | |
| 1869 | dgux*) |
| 1870 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 1871 | hardcode_libdir_flag_spec='-L$libdir' |
| 1872 | hardcode_shlibpath_var=no |
| 1873 | ;; |
| 1874 | |
| 1875 | sysv4*MP*) |
| 1876 | if test -d /usr/nec; then |
| 1877 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 1878 | hardcode_shlibpath_var=no |
| 1879 | runpath_var=LD_RUN_PATH |
| 1880 | hardcode_runpath_var=yes |
| 1881 | ld_shlibs=yes |
| 1882 | fi |
| 1883 | ;; |
| 1884 | |
| 1885 | sysv4.2uw2*) |
| 1886 | archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
| 1887 | hardcode_direct=yes |
| 1888 | hardcode_minus_L=no |
| 1889 | hardcode_shlibpath_var=no |
| 1890 | hardcode_runpath_var=yes |
| 1891 | runpath_var=LD_RUN_PATH |
| 1892 | ;; |
| 1893 | |
| 1894 | sysv5uw7* | unixware7*) |
| 1895 | no_undefined_flag='${wl}-z ${wl}text' |
| 1896 | if test "$GCC" = yes; then |
| 1897 | archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 1898 | else |
| 1899 | archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 1900 | fi |
| 1901 | runpath_var='LD_RUN_PATH' |
| 1902 | hardcode_shlibpath_var=no |
| 1903 | ;; |
| 1904 | |
| 1905 | *) |
| 1906 | ld_shlibs=no |
| 1907 | ;; |
| 1908 | esac |
| 1909 | fi |
| 1910 | AC_MSG_RESULT([$ld_shlibs]) |
| 1911 | test "$ld_shlibs" = no && can_build_shared=no |
| 1912 | |
| 1913 | # Check hardcoding attributes. |
| 1914 | AC_MSG_CHECKING([how to hardcode library paths into programs]) |
| 1915 | hardcode_action= |
| 1916 | if test -n "$hardcode_libdir_flag_spec" || \ |
| 1917 | test -n "$runpath_var"; then |
| 1918 | |
| 1919 | # We can hardcode non-existant directories. |
| 1920 | if test "$hardcode_direct" != no && |
| 1921 | # If the only mechanism to avoid hardcoding is shlibpath_var, we |
| 1922 | # have to relink, otherwise we might link with an installed library |
| 1923 | # when we should be linking with a yet-to-be-installed one |
| 1924 | ## test "$hardcode_shlibpath_var" != no && |
| 1925 | test "$hardcode_minus_L" != no; then |
| 1926 | # Linking always hardcodes the temporary library directory. |
| 1927 | hardcode_action=relink |
| 1928 | else |
| 1929 | # We can link without hardcoding, and we can hardcode nonexisting dirs. |
| 1930 | hardcode_action=immediate |
| 1931 | fi |
| 1932 | else |
| 1933 | # We cannot hardcode anything, or else we can only hardcode existing |
| 1934 | # directories. |
| 1935 | hardcode_action=unsupported |
| 1936 | fi |
| 1937 | AC_MSG_RESULT([$hardcode_action]) |
| 1938 | |
| 1939 | striplib= |
| 1940 | old_striplib= |
| 1941 | AC_MSG_CHECKING([whether stripping libraries is possible]) |
| 1942 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then |
| 1943 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" |
| 1944 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" |
| 1945 | AC_MSG_RESULT([yes]) |
| 1946 | else |
| 1947 | AC_MSG_RESULT([no]) |
| 1948 | fi |
| 1949 | |
| 1950 | reload_cmds='$LD$reload_flag -o $output$reload_objs' |
| 1951 | test -z "$deplibs_check_method" && deplibs_check_method=unknown |
| 1952 | |
| 1953 | # PORTME Fill in your ld.so characteristics |
| 1954 | AC_MSG_CHECKING([dynamic linker characteristics]) |
| 1955 | library_names_spec= |
| 1956 | libname_spec='lib$name' |
| 1957 | soname_spec= |
| 1958 | postinstall_cmds= |
| 1959 | postuninstall_cmds= |
| 1960 | finish_cmds= |
| 1961 | finish_eval= |
| 1962 | shlibpath_var= |
| 1963 | shlibpath_overrides_runpath=unknown |
| 1964 | version_type=none |
| 1965 | dynamic_linker="$host_os ld.so" |
| 1966 | sys_lib_dlsearch_path_spec="/lib /usr/lib" |
| 1967 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
| 1968 | |
| 1969 | case $host_os in |
| 1970 | aix3*) |
| 1971 | version_type=linux |
| 1972 | library_names_spec='${libname}${release}.so$versuffix $libname.a' |
| 1973 | shlibpath_var=LIBPATH |
| 1974 | |
| 1975 | # AIX has no versioning support, so we append a major version to the name. |
| 1976 | soname_spec='${libname}${release}.so$major' |
| 1977 | ;; |
| 1978 | |
| 1979 | aix4* | aix5*) |
| 1980 | version_type=linux |
| 1981 | if test "$host_cpu" = ia64; then |
| 1982 | # AIX 5 supports IA64 |
| 1983 | library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' |
| 1984 | shlibpath_var=LD_LIBRARY_PATH |
| 1985 | else |
| 1986 | # With GCC up to 2.95.x, collect2 would create an import file |
| 1987 | # for dependence libraries. The import file would start with |
| 1988 | # the line `#! .'. This would cause the generated library to |
| 1989 | # depend on `.', always an invalid library. This was fixed in |
| 1990 | # development snapshots of GCC prior to 3.0. |
| 1991 | case $host_os in |
| 1992 | aix4 | aix4.[[01]] | aix4.[[01]].*) |
| 1993 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' |
| 1994 | echo ' yes ' |
| 1995 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then |
| 1996 | : |
| 1997 | else |
| 1998 | can_build_shared=no |
| 1999 | fi |
| 2000 | ;; |
| 2001 | esac |
| 2002 | # AIX (on Power*) has no versioning support, so currently we can |
| 2003 | # not hardcode correct soname into executable. Probably we can |
| 2004 | # add versioning support to collect2, so additional links can |
| 2005 | # be useful in future. |
| 2006 | if test "$aix_use_runtimelinking" = yes; then |
| 2007 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so |
| 2008 | # instead of lib<name>.a to let people know that these are not |
| 2009 | # typical AIX shared libraries. |
| 2010 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 2011 | else |
| 2012 | # We preserve .a as extension for shared libraries through AIX4.2 |
| 2013 | # and later when we are not doing run time linking. |
| 2014 | library_names_spec='${libname}${release}.a $libname.a' |
| 2015 | soname_spec='${libname}${release}.so$major' |
| 2016 | fi |
| 2017 | shlibpath_var=LIBPATH |
| 2018 | fi |
| 2019 | ;; |
| 2020 | |
| 2021 | amigaos*) |
| 2022 | library_names_spec='$libname.ixlibrary $libname.a' |
| 2023 | # Create ${libname}_ixlibrary.a entries in /sys/libs. |
| 2024 | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' |
| 2025 | ;; |
| 2026 | |
| 2027 | beos*) |
| 2028 | library_names_spec='${libname}.so' |
| 2029 | dynamic_linker="$host_os ld.so" |
| 2030 | shlibpath_var=LIBRARY_PATH |
| 2031 | ;; |
| 2032 | |
| 2033 | bsdi4*) |
| 2034 | version_type=linux |
| 2035 | need_version=no |
| 2036 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 2037 | soname_spec='${libname}${release}.so$major' |
| 2038 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' |
| 2039 | shlibpath_var=LD_LIBRARY_PATH |
| 2040 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
| 2041 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
| 2042 | export_dynamic_flag_spec=-rdynamic |
| 2043 | # the default ld.so.conf also contains /usr/contrib/lib and |
| 2044 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
| 2045 | # libtool to hard-code these into programs |
| 2046 | ;; |
| 2047 | |
| 2048 | cygwin* | mingw* | pw32*) |
| 2049 | version_type=windows |
| 2050 | need_version=no |
| 2051 | need_lib_prefix=no |
| 2052 | case $GCC,$host_os in |
| 2053 | yes,cygwin*) |
| 2054 | library_names_spec='$libname.dll.a' |
| 2055 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' |
| 2056 | postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ |
| 2057 | dldir=$destdir/`dirname \$dlpath`~ |
| 2058 | test -d \$dldir || mkdir -p \$dldir~ |
| 2059 | $install_prog .libs/$dlname \$dldir/$dlname' |
| 2060 | postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ |
| 2061 | dlpath=$dir/\$dldll~ |
| 2062 | $rm \$dlpath' |
| 2063 | ;; |
| 2064 | yes,mingw*) |
| 2065 | library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' |
| 2066 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` |
| 2067 | ;; |
| 2068 | yes,pw32*) |
| 2069 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' |
| 2070 | ;; |
| 2071 | *) |
| 2072 | library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' |
| 2073 | ;; |
| 2074 | esac |
| 2075 | dynamic_linker='Win32 ld.exe' |
| 2076 | # FIXME: first we should search . and the directory the executable is in |
| 2077 | shlibpath_var=PATH |
| 2078 | ;; |
| 2079 | |
| 2080 | darwin* | rhapsody*) |
| 2081 | dynamic_linker="$host_os dyld" |
| 2082 | version_type=darwin |
| 2083 | need_lib_prefix=no |
| 2084 | need_version=no |
| 2085 | # FIXME: Relying on posixy $() will cause problems for |
| 2086 | # cross-compilation, but unfortunately the echo tests do not |
| 2087 | # yet detect zsh echo's removal of \ escapes. |
| 2088 | library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' |
| 2089 | soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' |
| 2090 | shlibpath_overrides_runpath=yes |
| 2091 | shlibpath_var=DYLD_LIBRARY_PATH |
| 2092 | ;; |
| 2093 | |
| 2094 | freebsd1*) |
| 2095 | dynamic_linker=no |
| 2096 | ;; |
| 2097 | |
| 2098 | freebsd*) |
| 2099 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` |
| 2100 | version_type=freebsd-$objformat |
| 2101 | case $version_type in |
| 2102 | freebsd-elf*) |
| 2103 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
| 2104 | need_version=no |
| 2105 | need_lib_prefix=no |
| 2106 | ;; |
| 2107 | freebsd-*) |
| 2108 | library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' |
| 2109 | need_version=yes |
| 2110 | ;; |
| 2111 | esac |
| 2112 | shlibpath_var=LD_LIBRARY_PATH |
| 2113 | case $host_os in |
| 2114 | freebsd2*) |
| 2115 | shlibpath_overrides_runpath=yes |
| 2116 | ;; |
| 2117 | *) |
| 2118 | shlibpath_overrides_runpath=no |
| 2119 | hardcode_into_libs=yes |
| 2120 | ;; |
| 2121 | esac |
| 2122 | ;; |
| 2123 | |
| 2124 | gnu*) |
| 2125 | version_type=linux |
| 2126 | need_lib_prefix=no |
| 2127 | need_version=no |
| 2128 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' |
| 2129 | soname_spec='${libname}${release}.so$major' |
| 2130 | shlibpath_var=LD_LIBRARY_PATH |
| 2131 | hardcode_into_libs=yes |
| 2132 | ;; |
| 2133 | |
| 2134 | hpux9* | hpux10* | hpux11*) |
| 2135 | # Give a soname corresponding to the major version so that dld.sl refuses to |
| 2136 | # link against other versions. |
| 2137 | dynamic_linker="$host_os dld.sl" |
| 2138 | version_type=sunos |
| 2139 | need_lib_prefix=no |
| 2140 | need_version=no |
| 2141 | shlibpath_var=SHLIB_PATH |
| 2142 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH |
| 2143 | library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' |
| 2144 | soname_spec='${libname}${release}.sl$major' |
| 2145 | # HP-UX runs *really* slowly unless shared libraries are mode 555. |
| 2146 | postinstall_cmds='chmod 555 $lib' |
| 2147 | ;; |
| 2148 | |
| 2149 | irix5* | irix6*) |
| 2150 | version_type=irix |
| 2151 | need_lib_prefix=no |
| 2152 | need_version=no |
| 2153 | soname_spec='${libname}${release}.so$major' |
| 2154 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' |
| 2155 | case $host_os in |
| 2156 | irix5*) |
| 2157 | libsuff= shlibsuff= |
| 2158 | ;; |
| 2159 | *) |
| 2160 | case $LD in # libtool.m4 will add one of these switches to LD |
| 2161 | *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; |
| 2162 | *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; |
| 2163 | *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; |
| 2164 | *) libsuff= shlibsuff= libmagic=never-match;; |
| 2165 | esac |
| 2166 | ;; |
| 2167 | esac |
| 2168 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
| 2169 | shlibpath_overrides_runpath=no |
| 2170 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" |
| 2171 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" |
| 2172 | ;; |
| 2173 | |
| 2174 | # No shared lib support for Linux oldld, aout, or coff. |
| 2175 | linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) |
| 2176 | dynamic_linker=no |
| 2177 | ;; |
| 2178 | |
| 2179 | # This must be Linux ELF. |
| 2180 | linux-gnu*) |
| 2181 | version_type=linux |
| 2182 | need_lib_prefix=no |
| 2183 | need_version=no |
| 2184 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 2185 | soname_spec='${libname}${release}.so$major' |
| 2186 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
| 2187 | shlibpath_var=LD_LIBRARY_PATH |
| 2188 | shlibpath_overrides_runpath=no |
| 2189 | # This implies no fast_install, which is unacceptable. |
| 2190 | # Some rework will be needed to allow for fast_install |
| 2191 | # before this can be enabled. |
| 2192 | hardcode_into_libs=yes |
| 2193 | |
| 2194 | # We used to test for /lib/ld.so.1 and disable shared libraries on |
| 2195 | # powerpc, because MkLinux only supported shared libraries with the |
| 2196 | # GNU dynamic linker. Since this was broken with cross compilers, |
| 2197 | # most powerpc-linux boxes support dynamic linking these days and |
| 2198 | # people can always --disable-shared, the test was removed, and we |
| 2199 | # assume the GNU/Linux dynamic linker is in use. |
| 2200 | dynamic_linker='GNU/Linux ld.so' |
| 2201 | ;; |
| 2202 | |
| 2203 | netbsd*) |
| 2204 | version_type=sunos |
| 2205 | need_lib_prefix=no |
| 2206 | need_version=no |
| 2207 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 2208 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
| 2209 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
| 2210 | dynamic_linker='NetBSD (a.out) ld.so' |
| 2211 | else |
| 2212 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' |
| 2213 | soname_spec='${libname}${release}.so$major' |
| 2214 | dynamic_linker='NetBSD ld.elf_so' |
| 2215 | fi |
| 2216 | shlibpath_var=LD_LIBRARY_PATH |
| 2217 | shlibpath_overrides_runpath=yes |
| 2218 | hardcode_into_libs=yes |
| 2219 | ;; |
| 2220 | |
| 2221 | newsos6) |
| 2222 | version_type=linux |
| 2223 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 2224 | shlibpath_var=LD_LIBRARY_PATH |
| 2225 | shlibpath_overrides_runpath=yes |
| 2226 | ;; |
| 2227 | |
| 2228 | openbsd*) |
| 2229 | version_type=sunos |
| 2230 | need_lib_prefix=no |
| 2231 | need_version=no |
| 2232 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| 2233 | case "$host_os" in |
| 2234 | openbsd2.[[89]] | openbsd2.[[89]].*) |
| 2235 | shlibpath_overrides_runpath=no |
| 2236 | ;; |
| 2237 | *) |
| 2238 | shlibpath_overrides_runpath=yes |
| 2239 | ;; |
| 2240 | esac |
| 2241 | else |
| 2242 | shlibpath_overrides_runpath=yes |
| 2243 | fi |
| 2244 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
| 2245 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
| 2246 | shlibpath_var=LD_LIBRARY_PATH |
| 2247 | ;; |
| 2248 | |
| 2249 | os2*) |
| 2250 | libname_spec='$name' |
| 2251 | need_lib_prefix=no |
| 2252 | library_names_spec='$libname.dll $libname.a' |
| 2253 | dynamic_linker='OS/2 ld.exe' |
| 2254 | shlibpath_var=LIBPATH |
| 2255 | ;; |
| 2256 | |
| 2257 | osf3* | osf4* | osf5*) |
| 2258 | version_type=osf |
| 2259 | need_version=no |
| 2260 | soname_spec='${libname}${release}.so' |
| 2261 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
| 2262 | shlibpath_var=LD_LIBRARY_PATH |
| 2263 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" |
| 2264 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" |
| 2265 | ;; |
| 2266 | |
| 2267 | sco3.2v5*) |
| 2268 | version_type=osf |
| 2269 | soname_spec='${libname}${release}.so$major' |
| 2270 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 2271 | shlibpath_var=LD_LIBRARY_PATH |
| 2272 | ;; |
| 2273 | |
| 2274 | solaris*) |
| 2275 | version_type=linux |
| 2276 | need_lib_prefix=no |
| 2277 | need_version=no |
| 2278 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 2279 | soname_spec='${libname}${release}.so$major' |
| 2280 | shlibpath_var=LD_LIBRARY_PATH |
| 2281 | shlibpath_overrides_runpath=yes |
| 2282 | hardcode_into_libs=yes |
| 2283 | # ldd complains unless libraries are executable |
| 2284 | postinstall_cmds='chmod +x $lib' |
| 2285 | ;; |
| 2286 | |
| 2287 | sunos4*) |
| 2288 | version_type=sunos |
| 2289 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
| 2290 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' |
| 2291 | shlibpath_var=LD_LIBRARY_PATH |
| 2292 | shlibpath_overrides_runpath=yes |
| 2293 | if test "$with_gnu_ld" = yes; then |
| 2294 | need_lib_prefix=no |
| 2295 | fi |
| 2296 | need_version=yes |
| 2297 | ;; |
| 2298 | |
| 2299 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
| 2300 | version_type=linux |
| 2301 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 2302 | soname_spec='${libname}${release}.so$major' |
| 2303 | shlibpath_var=LD_LIBRARY_PATH |
| 2304 | case $host_vendor in |
| 2305 | sni) |
| 2306 | shlibpath_overrides_runpath=no |
| 2307 | ;; |
| 2308 | motorola) |
| 2309 | need_lib_prefix=no |
| 2310 | need_version=no |
| 2311 | shlibpath_overrides_runpath=no |
| 2312 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' |
| 2313 | ;; |
| 2314 | esac |
| 2315 | ;; |
| 2316 | |
| 2317 | uts4*) |
| 2318 | version_type=linux |
| 2319 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 2320 | soname_spec='${libname}${release}.so$major' |
| 2321 | shlibpath_var=LD_LIBRARY_PATH |
| 2322 | ;; |
| 2323 | |
| 2324 | dgux*) |
| 2325 | version_type=linux |
| 2326 | need_lib_prefix=no |
| 2327 | need_version=no |
| 2328 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 2329 | soname_spec='${libname}${release}.so$major' |
| 2330 | shlibpath_var=LD_LIBRARY_PATH |
| 2331 | ;; |
| 2332 | |
| 2333 | sysv4*MP*) |
| 2334 | if test -d /usr/nec ;then |
| 2335 | version_type=linux |
| 2336 | library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' |
| 2337 | soname_spec='$libname.so.$major' |
| 2338 | shlibpath_var=LD_LIBRARY_PATH |
| 2339 | fi |
| 2340 | ;; |
| 2341 | |
| 2342 | *) |
| 2343 | dynamic_linker=no |
| 2344 | ;; |
| 2345 | esac |
| 2346 | AC_MSG_RESULT([$dynamic_linker]) |
| 2347 | test "$dynamic_linker" = no && can_build_shared=no |
| 2348 | |
| 2349 | # Report the final consequences. |
| 2350 | AC_MSG_CHECKING([if libtool supports shared libraries]) |
| 2351 | AC_MSG_RESULT([$can_build_shared]) |
| 2352 | |
| 2353 | AC_MSG_CHECKING([whether to build shared libraries]) |
| 2354 | test "$can_build_shared" = "no" && enable_shared=no |
| 2355 | |
| 2356 | # On AIX, shared libraries and static libraries use the same namespace, and |
| 2357 | # are all built from PIC. |
| 2358 | case "$host_os" in |
| 2359 | aix3*) |
| 2360 | test "$enable_shared" = yes && enable_static=no |
| 2361 | if test -n "$RANLIB"; then |
| 2362 | archive_cmds="$archive_cmds~\$RANLIB \$lib" |
| 2363 | postinstall_cmds='$RANLIB $lib' |
| 2364 | fi |
| 2365 | ;; |
| 2366 | |
| 2367 | aix4*) |
| 2368 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then |
| 2369 | test "$enable_shared" = yes && enable_static=no |
| 2370 | fi |
| 2371 | ;; |
| 2372 | esac |
| 2373 | AC_MSG_RESULT([$enable_shared]) |
| 2374 | |
| 2375 | AC_MSG_CHECKING([whether to build static libraries]) |
| 2376 | # Make sure either enable_shared or enable_static is yes. |
| 2377 | test "$enable_shared" = yes || enable_static=yes |
| 2378 | AC_MSG_RESULT([$enable_static]) |
| 2379 | |
| 2380 | if test "$hardcode_action" = relink; then |
| 2381 | # Fast installation is not supported |
| 2382 | enable_fast_install=no |
| 2383 | elif test "$shlibpath_overrides_runpath" = yes || |
| 2384 | test "$enable_shared" = no; then |
| 2385 | # Fast installation is not necessary |
| 2386 | enable_fast_install=needless |
| 2387 | fi |
| 2388 | |
| 2389 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
| 2390 | if test "$GCC" = yes; then |
| 2391 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
| 2392 | fi |
| 2393 | |
| 2394 | AC_LIBTOOL_DLOPEN_SELF |
| 2395 | |
| 2396 | if test "$enable_shared" = yes && test "$GCC" = yes; then |
| 2397 | case $archive_cmds in |
| 2398 | *'~'*) |
| 2399 | # FIXME: we may have to deal with multi-command sequences. |
| 2400 | ;; |
| 2401 | '$CC '*) |
| 2402 | # Test whether the compiler implicitly links with -lc since on some |
| 2403 | # systems, -lgcc has to come before -lc. If gcc already passes -lc |
| 2404 | # to ld, don't add -lc before -lgcc. |
| 2405 | AC_MSG_CHECKING([whether -lc should be explicitly linked in]) |
| 2406 | AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], |
| 2407 | [$rm conftest* |
| 2408 | echo 'static int dummy;' > conftest.$ac_ext |
| 2409 | |
| 2410 | if AC_TRY_EVAL(ac_compile); then |
| 2411 | soname=conftest |
| 2412 | lib=conftest |
| 2413 | libobjs=conftest.$ac_objext |
| 2414 | deplibs= |
| 2415 | wl=$lt_cv_prog_cc_wl |
| 2416 | compiler_flags=-v |
| 2417 | linker_flags=-v |
| 2418 | verstring= |
| 2419 | output_objdir=. |
| 2420 | libname=conftest |
| 2421 | save_allow_undefined_flag=$allow_undefined_flag |
| 2422 | allow_undefined_flag= |
| 2423 | if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) |
| 2424 | then |
| 2425 | lt_cv_archive_cmds_need_lc=no |
| 2426 | else |
| 2427 | lt_cv_archive_cmds_need_lc=yes |
| 2428 | fi |
| 2429 | allow_undefined_flag=$save_allow_undefined_flag |
| 2430 | else |
| 2431 | cat conftest.err 1>&5 |
| 2432 | fi]) |
| 2433 | AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) |
| 2434 | ;; |
| 2435 | esac |
| 2436 | fi |
| 2437 | need_lc=${lt_cv_archive_cmds_need_lc-yes} |
| 2438 | |
| 2439 | # The second clause should only fire when bootstrapping the |
| 2440 | # libtool distribution, otherwise you forgot to ship ltmain.sh |
| 2441 | # with your package, and you will get complaints that there are |
| 2442 | # no rules to generate ltmain.sh. |
| 2443 | if test -f "$ltmain"; then |
| 2444 | : |
| 2445 | else |
| 2446 | # If there is no Makefile yet, we rely on a make rule to execute |
| 2447 | # `config.status --recheck' to rerun these tests and create the |
| 2448 | # libtool script then. |
| 2449 | test -f Makefile && make "$ltmain" |
| 2450 | fi |
| 2451 | |
| 2452 | if test -f "$ltmain"; then |
| 2453 | trap "$rm \"${ofile}T\"; exit 1" 1 2 15 |
| 2454 | $rm -f "${ofile}T" |
| 2455 | |
| 2456 | echo creating $ofile |
| 2457 | |
| 2458 | # Now quote all the things that may contain metacharacters while being |
| 2459 | # careful not to overquote the AC_SUBSTed values. We take copies of the |
| 2460 | # variables and quote the copies for generation of the libtool script. |
| 2461 | for var in echo old_CC old_CFLAGS \ |
| 2462 | AR AR_FLAGS CC LD LN_S NM SHELL \ |
| 2463 | reload_flag reload_cmds wl \ |
| 2464 | pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ |
| 2465 | thread_safe_flag_spec whole_archive_flag_spec libname_spec \ |
| 2466 | library_names_spec soname_spec \ |
| 2467 | RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ |
| 2468 | old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ |
| 2469 | postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ |
| 2470 | old_striplib striplib file_magic_cmd export_symbols_cmds \ |
| 2471 | deplibs_check_method allow_undefined_flag no_undefined_flag \ |
| 2472 | finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ |
| 2473 | global_symbol_to_c_name_address \ |
| 2474 | hardcode_libdir_flag_spec hardcode_libdir_separator \ |
| 2475 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ |
| 2476 | compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do |
| 2477 | |
| 2478 | case $var in |
| 2479 | reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ |
| 2480 | old_postinstall_cmds | old_postuninstall_cmds | \ |
| 2481 | export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ |
| 2482 | extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ |
| 2483 | postinstall_cmds | postuninstall_cmds | \ |
| 2484 | finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) |
| 2485 | # Double-quote double-evaled strings. |
| 2486 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" |
| 2487 | ;; |
| 2488 | *) |
| 2489 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" |
| 2490 | ;; |
| 2491 | esac |
| 2492 | done |
| 2493 | |
| 2494 | cat <<__EOF__ > "${ofile}T" |
| 2495 | #! $SHELL |
| 2496 | |
| 2497 | # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
| 2498 | # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
| 2499 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. |
| 2500 | # |
| 2501 | # Copyright (C) 1996-2000 Free Software Foundation, Inc. |
| 2502 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
| 2503 | # |
| 2504 | # This program is free software; you can redistribute it and/or modify |
| 2505 | # it under the terms of the GNU General Public License as published by |
| 2506 | # the Free Software Foundation; either version 2 of the License, or |
| 2507 | # (at your option) any later version. |
| 2508 | # |
| 2509 | # This program is distributed in the hope that it will be useful, but |
| 2510 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 2511 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 2512 | # General Public License for more details. |
| 2513 | # |
| 2514 | # You should have received a copy of the GNU General Public License |
| 2515 | # along with this program; if not, write to the Free Software |
| 2516 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 2517 | # |
| 2518 | # As a special exception to the GNU General Public License, if you |
| 2519 | # distribute this file as part of a program that contains a |
| 2520 | # configuration script generated by Autoconf, you may include it under |
| 2521 | # the same distribution terms that you use for the rest of that program. |
| 2522 | |
| 2523 | # Sed that helps us avoid accidentally triggering echo(1) options like -n. |
| 2524 | Xsed="sed -e s/^X//" |
| 2525 | |
| 2526 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
| 2527 | # if CDPATH is set. |
| 2528 | if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
| 2529 | |
| 2530 | # ### BEGIN LIBTOOL CONFIG |
| 2531 | |
| 2532 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 2533 | |
| 2534 | # Shell to use when invoking shell scripts. |
| 2535 | SHELL=$lt_SHELL |
| 2536 | |
| 2537 | # Whether or not to build shared libraries. |
| 2538 | build_libtool_libs=$enable_shared |
| 2539 | |
| 2540 | # Whether or not to build static libraries. |
| 2541 | build_old_libs=$enable_static |
| 2542 | |
| 2543 | # Whether or not to add -lc for building shared libraries. |
| 2544 | build_libtool_need_lc=$need_lc |
| 2545 | |
| 2546 | # Whether or not to optimize for fast installation. |
| 2547 | fast_install=$enable_fast_install |
| 2548 | |
| 2549 | # The host system. |
| 2550 | host_alias=$host_alias |
| 2551 | host=$host |
| 2552 | |
| 2553 | # An echo program that does not interpret backslashes. |
| 2554 | echo=$lt_echo |
| 2555 | |
| 2556 | # The archiver. |
| 2557 | AR=$lt_AR |
| 2558 | AR_FLAGS=$lt_AR_FLAGS |
| 2559 | |
| 2560 | # The default C compiler. |
| 2561 | CC=$lt_CC |
| 2562 | |
| 2563 | # Is the compiler the GNU C compiler? |
| 2564 | with_gcc=$GCC |
| 2565 | |
| 2566 | # The linker used to build libraries. |
| 2567 | LD=$lt_LD |
| 2568 | |
| 2569 | # Whether we need hard or soft links. |
| 2570 | LN_S=$lt_LN_S |
| 2571 | |
| 2572 | # A BSD-compatible nm program. |
| 2573 | NM=$lt_NM |
| 2574 | |
| 2575 | # A symbol stripping program |
| 2576 | STRIP=$STRIP |
| 2577 | |
| 2578 | # Used to examine libraries when file_magic_cmd begins "file" |
| 2579 | MAGIC_CMD=$MAGIC_CMD |
| 2580 | |
| 2581 | # Used on cygwin: DLL creation program. |
| 2582 | DLLTOOL="$DLLTOOL" |
| 2583 | |
| 2584 | # Used on cygwin: object dumper. |
| 2585 | OBJDUMP="$OBJDUMP" |
| 2586 | |
| 2587 | # Used on cygwin: assembler. |
| 2588 | AS="$AS" |
| 2589 | |
| 2590 | # The name of the directory that contains temporary libtool files. |
| 2591 | objdir=$objdir |
| 2592 | |
| 2593 | # How to create reloadable object files. |
| 2594 | reload_flag=$lt_reload_flag |
| 2595 | reload_cmds=$lt_reload_cmds |
| 2596 | |
| 2597 | # How to pass a linker flag through the compiler. |
| 2598 | wl=$lt_wl |
| 2599 | |
| 2600 | # Object file suffix (normally "o"). |
| 2601 | objext="$ac_objext" |
| 2602 | |
| 2603 | # Old archive suffix (normally "a"). |
| 2604 | libext="$libext" |
| 2605 | |
| 2606 | # Executable file suffix (normally ""). |
| 2607 | exeext="$exeext" |
| 2608 | |
| 2609 | # Additional compiler flags for building library objects. |
| 2610 | pic_flag=$lt_pic_flag |
| 2611 | pic_mode=$pic_mode |
| 2612 | |
| 2613 | # Does compiler simultaneously support -c and -o options? |
| 2614 | compiler_c_o=$lt_compiler_c_o |
| 2615 | |
| 2616 | # Can we write directly to a .lo ? |
| 2617 | compiler_o_lo=$lt_compiler_o_lo |
| 2618 | |
| 2619 | # Must we lock files when doing compilation ? |
| 2620 | need_locks=$lt_need_locks |
| 2621 | |
| 2622 | # Do we need the lib prefix for modules? |
| 2623 | need_lib_prefix=$need_lib_prefix |
| 2624 | |
| 2625 | # Do we need a version for libraries? |
| 2626 | need_version=$need_version |
| 2627 | |
| 2628 | # Whether dlopen is supported. |
| 2629 | dlopen_support=$enable_dlopen |
| 2630 | |
| 2631 | # Whether dlopen of programs is supported. |
| 2632 | dlopen_self=$enable_dlopen_self |
| 2633 | |
| 2634 | # Whether dlopen of statically linked programs is supported. |
| 2635 | dlopen_self_static=$enable_dlopen_self_static |
| 2636 | |
| 2637 | # Compiler flag to prevent dynamic linking. |
| 2638 | link_static_flag=$lt_link_static_flag |
| 2639 | |
| 2640 | # Compiler flag to turn off builtin functions. |
| 2641 | no_builtin_flag=$lt_no_builtin_flag |
| 2642 | |
| 2643 | # Compiler flag to allow reflexive dlopens. |
| 2644 | export_dynamic_flag_spec=$lt_export_dynamic_flag_spec |
| 2645 | |
| 2646 | # Compiler flag to generate shared objects directly from archives. |
| 2647 | whole_archive_flag_spec=$lt_whole_archive_flag_spec |
| 2648 | |
| 2649 | # Compiler flag to generate thread-safe objects. |
| 2650 | thread_safe_flag_spec=$lt_thread_safe_flag_spec |
| 2651 | |
| 2652 | # Library versioning type. |
| 2653 | version_type=$version_type |
| 2654 | |
| 2655 | # Format of library name prefix. |
| 2656 | libname_spec=$lt_libname_spec |
| 2657 | |
| 2658 | # List of archive names. First name is the real one, the rest are links. |
| 2659 | # The last name is the one that the linker finds with -lNAME. |
| 2660 | library_names_spec=$lt_library_names_spec |
| 2661 | |
| 2662 | # The coded name of the library, if different from the real name. |
| 2663 | soname_spec=$lt_soname_spec |
| 2664 | |
| 2665 | # Commands used to build and install an old-style archive. |
| 2666 | RANLIB=$lt_RANLIB |
| 2667 | old_archive_cmds=$lt_old_archive_cmds |
| 2668 | old_postinstall_cmds=$lt_old_postinstall_cmds |
| 2669 | old_postuninstall_cmds=$lt_old_postuninstall_cmds |
| 2670 | |
| 2671 | # Create an old-style archive from a shared archive. |
| 2672 | old_archive_from_new_cmds=$lt_old_archive_from_new_cmds |
| 2673 | |
| 2674 | # Create a temporary old-style archive to link instead of a shared archive. |
| 2675 | old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds |
| 2676 | |
| 2677 | # Commands used to build and install a shared archive. |
| 2678 | archive_cmds=$lt_archive_cmds |
| 2679 | archive_expsym_cmds=$lt_archive_expsym_cmds |
| 2680 | postinstall_cmds=$lt_postinstall_cmds |
| 2681 | postuninstall_cmds=$lt_postuninstall_cmds |
| 2682 | |
| 2683 | # Commands to strip libraries. |
| 2684 | old_striplib=$lt_old_striplib |
| 2685 | striplib=$lt_striplib |
| 2686 | |
| 2687 | # Method to check whether dependent libraries are shared objects. |
| 2688 | deplibs_check_method=$lt_deplibs_check_method |
| 2689 | |
| 2690 | # Command to use when deplibs_check_method == file_magic. |
| 2691 | file_magic_cmd=$lt_file_magic_cmd |
| 2692 | |
| 2693 | # Flag that allows shared libraries with undefined symbols to be built. |
| 2694 | allow_undefined_flag=$lt_allow_undefined_flag |
| 2695 | |
| 2696 | # Flag that forces no undefined symbols. |
| 2697 | no_undefined_flag=$lt_no_undefined_flag |
| 2698 | |
| 2699 | # Commands used to finish a libtool library installation in a directory. |
| 2700 | finish_cmds=$lt_finish_cmds |
| 2701 | |
| 2702 | # Same as above, but a single script fragment to be evaled but not shown. |
| 2703 | finish_eval=$lt_finish_eval |
| 2704 | |
| 2705 | # Take the output of nm and produce a listing of raw symbols and C names. |
| 2706 | global_symbol_pipe=$lt_global_symbol_pipe |
| 2707 | |
| 2708 | # Transform the output of nm in a proper C declaration |
| 2709 | global_symbol_to_cdecl=$lt_global_symbol_to_cdecl |
| 2710 | |
| 2711 | # Transform the output of nm in a C name address pair |
| 2712 | global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address |
| 2713 | |
| 2714 | # This is the shared library runtime path variable. |
| 2715 | runpath_var=$runpath_var |
| 2716 | |
| 2717 | # This is the shared library path variable. |
| 2718 | shlibpath_var=$shlibpath_var |
| 2719 | |
| 2720 | # Is shlibpath searched before the hard-coded library search path? |
| 2721 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath |
| 2722 | |
| 2723 | # How to hardcode a shared library path into an executable. |
| 2724 | hardcode_action=$hardcode_action |
| 2725 | |
| 2726 | # Whether we should hardcode library paths into libraries. |
| 2727 | hardcode_into_libs=$hardcode_into_libs |
| 2728 | |
| 2729 | # Flag to hardcode \$libdir into a binary during linking. |
| 2730 | # This must work even if \$libdir does not exist. |
| 2731 | hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec |
| 2732 | |
| 2733 | # Whether we need a single -rpath flag with a separated argument. |
| 2734 | hardcode_libdir_separator=$lt_hardcode_libdir_separator |
| 2735 | |
| 2736 | # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the |
| 2737 | # resulting binary. |
| 2738 | hardcode_direct=$hardcode_direct |
| 2739 | |
| 2740 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the |
| 2741 | # resulting binary. |
| 2742 | hardcode_minus_L=$hardcode_minus_L |
| 2743 | |
| 2744 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into |
| 2745 | # the resulting binary. |
| 2746 | hardcode_shlibpath_var=$hardcode_shlibpath_var |
| 2747 | |
| 2748 | # Variables whose values should be saved in libtool wrapper scripts and |
| 2749 | # restored at relink time. |
| 2750 | variables_saved_for_relink="$variables_saved_for_relink" |
| 2751 | |
| 2752 | # Whether libtool must link a program against all its dependency libraries. |
| 2753 | link_all_deplibs=$link_all_deplibs |
| 2754 | |
| 2755 | # Compile-time system search path for libraries |
| 2756 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec |
| 2757 | |
| 2758 | # Run-time system search path for libraries |
| 2759 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec |
| 2760 | |
| 2761 | # Fix the shell variable \$srcfile for the compiler. |
| 2762 | fix_srcfile_path="$fix_srcfile_path" |
| 2763 | |
| 2764 | # Set to yes if exported symbols are required. |
| 2765 | always_export_symbols=$always_export_symbols |
| 2766 | |
| 2767 | # The commands to list exported symbols. |
| 2768 | export_symbols_cmds=$lt_export_symbols_cmds |
| 2769 | |
| 2770 | # The commands to extract the exported symbol list from a shared archive. |
| 2771 | extract_expsyms_cmds=$lt_extract_expsyms_cmds |
| 2772 | |
| 2773 | # Symbols that should not be listed in the preloaded symbols. |
| 2774 | exclude_expsyms=$lt_exclude_expsyms |
| 2775 | |
| 2776 | # Symbols that must always be exported. |
| 2777 | include_expsyms=$lt_include_expsyms |
| 2778 | |
| 2779 | # ### END LIBTOOL CONFIG |
| 2780 | |
| 2781 | __EOF__ |
| 2782 | |
| 2783 | case $host_os in |
| 2784 | aix3*) |
| 2785 | cat <<\EOF >> "${ofile}T" |
| 2786 | |
| 2787 | # AIX sometimes has problems with the GCC collect2 program. For some |
| 2788 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
| 2789 | # vanish in a puff of smoke. |
| 2790 | if test "X${COLLECT_NAMES+set}" != Xset; then |
| 2791 | COLLECT_NAMES= |
| 2792 | export COLLECT_NAMES |
| 2793 | fi |
| 2794 | EOF |
| 2795 | ;; |
| 2796 | esac |
| 2797 | |
| 2798 | case $host_os in |
| 2799 | cygwin* | mingw* | pw32* | os2*) |
| 2800 | cat <<'EOF' >> "${ofile}T" |
| 2801 | # This is a source program that is used to create dlls on Windows |
| 2802 | # Don't remove nor modify the starting and closing comments |
| 2803 | # /* ltdll.c starts here */ |
| 2804 | # #define WIN32_LEAN_AND_MEAN |
| 2805 | # #include <windows.h> |
| 2806 | # #undef WIN32_LEAN_AND_MEAN |
| 2807 | # #include <stdio.h> |
| 2808 | # |
| 2809 | # #ifndef __CYGWIN__ |
| 2810 | # # ifdef __CYGWIN32__ |
| 2811 | # # define __CYGWIN__ __CYGWIN32__ |
| 2812 | # # endif |
| 2813 | # #endif |
| 2814 | # |
| 2815 | # #ifdef __cplusplus |
| 2816 | # extern "C" { |
| 2817 | # #endif |
| 2818 | # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); |
| 2819 | # #ifdef __cplusplus |
| 2820 | # } |
| 2821 | # #endif |
| 2822 | # |
| 2823 | # #ifdef __CYGWIN__ |
| 2824 | # #include <cygwin/cygwin_dll.h> |
| 2825 | # DECLARE_CYGWIN_DLL( DllMain ); |
| 2826 | # #endif |
| 2827 | # HINSTANCE __hDllInstance_base; |
| 2828 | # |
| 2829 | # BOOL APIENTRY |
| 2830 | # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) |
| 2831 | # { |
| 2832 | # __hDllInstance_base = hInst; |
| 2833 | # return TRUE; |
| 2834 | # } |
| 2835 | # /* ltdll.c ends here */ |
| 2836 | # This is a source program that is used to create import libraries |
| 2837 | # on Windows for dlls which lack them. Don't remove nor modify the |
| 2838 | # starting and closing comments |
| 2839 | # /* impgen.c starts here */ |
| 2840 | # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. |
| 2841 | # |
| 2842 | # This file is part of GNU libtool. |
| 2843 | # |
| 2844 | # This program is free software; you can redistribute it and/or modify |
| 2845 | # it under the terms of the GNU General Public License as published by |
| 2846 | # the Free Software Foundation; either version 2 of the License, or |
| 2847 | # (at your option) any later version. |
| 2848 | # |
| 2849 | # This program is distributed in the hope that it will be useful, |
| 2850 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 2851 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 2852 | # GNU General Public License for more details. |
| 2853 | # |
| 2854 | # You should have received a copy of the GNU General Public License |
| 2855 | # along with this program; if not, write to the Free Software |
| 2856 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 2857 | # */ |
| 2858 | # |
| 2859 | # #include <stdio.h> /* for printf() */ |
| 2860 | # #include <unistd.h> /* for open(), lseek(), read() */ |
| 2861 | # #include <fcntl.h> /* for O_RDONLY, O_BINARY */ |
| 2862 | # #include <string.h> /* for strdup() */ |
| 2863 | # |
| 2864 | # /* O_BINARY isn't required (or even defined sometimes) under Unix */ |
| 2865 | # #ifndef O_BINARY |
| 2866 | # #define O_BINARY 0 |
| 2867 | # #endif |
| 2868 | # |
| 2869 | # static unsigned int |
| 2870 | # pe_get16 (fd, offset) |
| 2871 | # int fd; |
| 2872 | # int offset; |
| 2873 | # { |
| 2874 | # unsigned char b[2]; |
| 2875 | # lseek (fd, offset, SEEK_SET); |
| 2876 | # read (fd, b, 2); |
| 2877 | # return b[0] + (b[1]<<8); |
| 2878 | # } |
| 2879 | # |
| 2880 | # static unsigned int |
| 2881 | # pe_get32 (fd, offset) |
| 2882 | # int fd; |
| 2883 | # int offset; |
| 2884 | # { |
| 2885 | # unsigned char b[4]; |
| 2886 | # lseek (fd, offset, SEEK_SET); |
| 2887 | # read (fd, b, 4); |
| 2888 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
| 2889 | # } |
| 2890 | # |
| 2891 | # static unsigned int |
| 2892 | # pe_as32 (ptr) |
| 2893 | # void *ptr; |
| 2894 | # { |
| 2895 | # unsigned char *b = ptr; |
| 2896 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
| 2897 | # } |
| 2898 | # |
| 2899 | # int |
| 2900 | # main (argc, argv) |
| 2901 | # int argc; |
| 2902 | # char *argv[]; |
| 2903 | # { |
| 2904 | # int dll; |
| 2905 | # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; |
| 2906 | # unsigned long export_rva, export_size, nsections, secptr, expptr; |
| 2907 | # unsigned long name_rvas, nexp; |
| 2908 | # unsigned char *expdata, *erva; |
| 2909 | # char *filename, *dll_name; |
| 2910 | # |
| 2911 | # filename = argv[1]; |
| 2912 | # |
| 2913 | # dll = open(filename, O_RDONLY|O_BINARY); |
| 2914 | # if (dll < 1) |
| 2915 | # return 1; |
| 2916 | # |
| 2917 | # dll_name = filename; |
| 2918 | # |
| 2919 | # for (i=0; filename[i]; i++) |
| 2920 | # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') |
| 2921 | # dll_name = filename + i +1; |
| 2922 | # |
| 2923 | # pe_header_offset = pe_get32 (dll, 0x3c); |
| 2924 | # opthdr_ofs = pe_header_offset + 4 + 20; |
| 2925 | # num_entries = pe_get32 (dll, opthdr_ofs + 92); |
| 2926 | # |
| 2927 | # if (num_entries < 1) /* no exports */ |
| 2928 | # return 1; |
| 2929 | # |
| 2930 | # export_rva = pe_get32 (dll, opthdr_ofs + 96); |
| 2931 | # export_size = pe_get32 (dll, opthdr_ofs + 100); |
| 2932 | # nsections = pe_get16 (dll, pe_header_offset + 4 +2); |
| 2933 | # secptr = (pe_header_offset + 4 + 20 + |
| 2934 | # pe_get16 (dll, pe_header_offset + 4 + 16)); |
| 2935 | # |
| 2936 | # expptr = 0; |
| 2937 | # for (i = 0; i < nsections; i++) |
| 2938 | # { |
| 2939 | # char sname[8]; |
| 2940 | # unsigned long secptr1 = secptr + 40 * i; |
| 2941 | # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); |
| 2942 | # unsigned long vsize = pe_get32 (dll, secptr1 + 16); |
| 2943 | # unsigned long fptr = pe_get32 (dll, secptr1 + 20); |
| 2944 | # lseek(dll, secptr1, SEEK_SET); |
| 2945 | # read(dll, sname, 8); |
| 2946 | # if (vaddr <= export_rva && vaddr+vsize > export_rva) |
| 2947 | # { |
| 2948 | # expptr = fptr + (export_rva - vaddr); |
| 2949 | # if (export_rva + export_size > vaddr + vsize) |
| 2950 | # export_size = vsize - (export_rva - vaddr); |
| 2951 | # break; |
| 2952 | # } |
| 2953 | # } |
| 2954 | # |
| 2955 | # expdata = (unsigned char*)malloc(export_size); |
| 2956 | # lseek (dll, expptr, SEEK_SET); |
| 2957 | # read (dll, expdata, export_size); |
| 2958 | # erva = expdata - export_rva; |
| 2959 | # |
| 2960 | # nexp = pe_as32 (expdata+24); |
| 2961 | # name_rvas = pe_as32 (expdata+32); |
| 2962 | # |
| 2963 | # printf ("EXPORTS\n"); |
| 2964 | # for (i = 0; i<nexp; i++) |
| 2965 | # { |
| 2966 | # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); |
| 2967 | # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); |
| 2968 | # } |
| 2969 | # |
| 2970 | # return 0; |
| 2971 | # } |
| 2972 | # /* impgen.c ends here */ |
| 2973 | |
| 2974 | EOF |
| 2975 | ;; |
| 2976 | esac |
| 2977 | |
| 2978 | # We use sed instead of cat because bash on DJGPP gets confused if |
| 2979 | # if finds mixed CR/LF and LF-only lines. Since sed operates in |
| 2980 | # text mode, it properly converts lines to CR/LF. This bash problem |
| 2981 | # is reportedly fixed, but why not run on old versions too? |
| 2982 | sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) |
| 2983 | |
| 2984 | mv -f "${ofile}T" "$ofile" || \ |
| 2985 | (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") |
| 2986 | chmod +x "$ofile" |
| 2987 | fi |
| 2988 | |
| 2989 | ])# _LT_AC_LTCONFIG_HACK |
| 2990 | |
| 2991 | # AC_LIBTOOL_DLOPEN - enable checks for dlopen support |
| 2992 | AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) |
| 2993 | |
| 2994 | # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's |
| 2995 | AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) |
| 2996 | |
| 2997 | # AC_ENABLE_SHARED - implement the --enable-shared flag |
| 2998 | # Usage: AC_ENABLE_SHARED[(DEFAULT)] |
| 2999 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
| 3000 | # `yes'. |
| 3001 | AC_DEFUN([AC_ENABLE_SHARED], |
| 3002 | [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl |
| 3003 | AC_ARG_ENABLE(shared, |
| 3004 | changequote(<<, >>)dnl |
| 3005 | << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], |
| 3006 | changequote([, ])dnl |
| 3007 | [p=${PACKAGE-default} |
| 3008 | case $enableval in |
| 3009 | yes) enable_shared=yes ;; |
| 3010 | no) enable_shared=no ;; |
| 3011 | *) |
| 3012 | enable_shared=no |
| 3013 | # Look at the argument we got. We use all the common list separators. |
| 3014 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
| 3015 | for pkg in $enableval; do |
| 3016 | if test "X$pkg" = "X$p"; then |
| 3017 | enable_shared=yes |
| 3018 | fi |
| 3019 | done |
| 3020 | IFS="$ac_save_ifs" |
| 3021 | ;; |
| 3022 | esac], |
| 3023 | enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl |
| 3024 | ]) |
| 3025 | |
| 3026 | # AC_DISABLE_SHARED - set the default shared flag to --disable-shared |
| 3027 | AC_DEFUN([AC_DISABLE_SHARED], |
| 3028 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 3029 | AC_ENABLE_SHARED(no)]) |
| 3030 | |
| 3031 | # AC_ENABLE_STATIC - implement the --enable-static flag |
| 3032 | # Usage: AC_ENABLE_STATIC[(DEFAULT)] |
| 3033 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
| 3034 | # `yes'. |
| 3035 | AC_DEFUN([AC_ENABLE_STATIC], |
| 3036 | [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl |
| 3037 | AC_ARG_ENABLE(static, |
| 3038 | changequote(<<, >>)dnl |
| 3039 | << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], |
| 3040 | changequote([, ])dnl |
| 3041 | [p=${PACKAGE-default} |
| 3042 | case $enableval in |
| 3043 | yes) enable_static=yes ;; |
| 3044 | no) enable_static=no ;; |
| 3045 | *) |
| 3046 | enable_static=no |
| 3047 | # Look at the argument we got. We use all the common list separators. |
| 3048 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
| 3049 | for pkg in $enableval; do |
| 3050 | if test "X$pkg" = "X$p"; then |
| 3051 | enable_static=yes |
| 3052 | fi |
| 3053 | done |
| 3054 | IFS="$ac_save_ifs" |
| 3055 | ;; |
| 3056 | esac], |
| 3057 | enable_static=AC_ENABLE_STATIC_DEFAULT)dnl |
| 3058 | ]) |
| 3059 | |
| 3060 | # AC_DISABLE_STATIC - set the default static flag to --disable-static |
| 3061 | AC_DEFUN([AC_DISABLE_STATIC], |
| 3062 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 3063 | AC_ENABLE_STATIC(no)]) |
| 3064 | |
| 3065 | |
| 3066 | # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag |
| 3067 | # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] |
| 3068 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
| 3069 | # `yes'. |
| 3070 | AC_DEFUN([AC_ENABLE_FAST_INSTALL], |
| 3071 | [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl |
| 3072 | AC_ARG_ENABLE(fast-install, |
| 3073 | changequote(<<, >>)dnl |
| 3074 | << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], |
| 3075 | changequote([, ])dnl |
| 3076 | [p=${PACKAGE-default} |
| 3077 | case $enableval in |
| 3078 | yes) enable_fast_install=yes ;; |
| 3079 | no) enable_fast_install=no ;; |
| 3080 | *) |
| 3081 | enable_fast_install=no |
| 3082 | # Look at the argument we got. We use all the common list separators. |
| 3083 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
| 3084 | for pkg in $enableval; do |
| 3085 | if test "X$pkg" = "X$p"; then |
| 3086 | enable_fast_install=yes |
| 3087 | fi |
| 3088 | done |
| 3089 | IFS="$ac_save_ifs" |
| 3090 | ;; |
| 3091 | esac], |
| 3092 | enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl |
| 3093 | ]) |
| 3094 | |
| 3095 | # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install |
| 3096 | AC_DEFUN([AC_DISABLE_FAST_INSTALL], |
| 3097 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 3098 | AC_ENABLE_FAST_INSTALL(no)]) |
| 3099 | |
| 3100 | # AC_LIBTOOL_PICMODE - implement the --with-pic flag |
| 3101 | # Usage: AC_LIBTOOL_PICMODE[(MODE)] |
| 3102 | # Where MODE is either `yes' or `no'. If omitted, it defaults to |
| 3103 | # `both'. |
| 3104 | AC_DEFUN([AC_LIBTOOL_PICMODE], |
| 3105 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 3106 | pic_mode=ifelse($#,1,$1,default)]) |
| 3107 | |
| 3108 | |
| 3109 | # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library |
| 3110 | AC_DEFUN([AC_PATH_TOOL_PREFIX], |
| 3111 | [AC_MSG_CHECKING([for $1]) |
| 3112 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, |
| 3113 | [case $MAGIC_CMD in |
| 3114 | /*) |
| 3115 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
| 3116 | ;; |
| 3117 | ?:/*) |
| 3118 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. |
| 3119 | ;; |
| 3120 | *) |
| 3121 | ac_save_MAGIC_CMD="$MAGIC_CMD" |
| 3122 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 3123 | dnl $ac_dummy forces splitting on constant user-supplied paths. |
| 3124 | dnl POSIX.2 word splitting is done only on the output of word expansions, |
| 3125 | dnl not every word. This closes a longstanding sh security hole. |
| 3126 | ac_dummy="ifelse([$2], , $PATH, [$2])" |
| 3127 | for ac_dir in $ac_dummy; do |
| 3128 | test -z "$ac_dir" && ac_dir=. |
| 3129 | if test -f $ac_dir/$1; then |
| 3130 | lt_cv_path_MAGIC_CMD="$ac_dir/$1" |
| 3131 | if test -n "$file_magic_test_file"; then |
| 3132 | case $deplibs_check_method in |
| 3133 | "file_magic "*) |
| 3134 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" |
| 3135 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
| 3136 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
| 3137 | egrep "$file_magic_regex" > /dev/null; then |
| 3138 | : |
| 3139 | else |
| 3140 | cat <<EOF 1>&2 |
| 3141 | |
| 3142 | *** Warning: the command libtool uses to detect shared libraries, |
| 3143 | *** $file_magic_cmd, produces output that libtool cannot recognize. |
| 3144 | *** The result is that libtool may fail to recognize shared libraries |
| 3145 | *** as such. This will affect the creation of libtool libraries that |
| 3146 | *** depend on shared libraries, but programs linked with such libtool |
| 3147 | *** libraries will work regardless of this problem. Nevertheless, you |
| 3148 | *** may want to report the problem to your system manager and/or to |
| 3149 | *** bug-libtool@gnu.org |
| 3150 | |
| 3151 | EOF |
| 3152 | fi ;; |
| 3153 | esac |
| 3154 | fi |
| 3155 | break |
| 3156 | fi |
| 3157 | done |
| 3158 | IFS="$ac_save_ifs" |
| 3159 | MAGIC_CMD="$ac_save_MAGIC_CMD" |
| 3160 | ;; |
| 3161 | esac]) |
| 3162 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
| 3163 | if test -n "$MAGIC_CMD"; then |
| 3164 | AC_MSG_RESULT($MAGIC_CMD) |
| 3165 | else |
| 3166 | AC_MSG_RESULT(no) |
| 3167 | fi |
| 3168 | ]) |
| 3169 | |
| 3170 | |
| 3171 | # AC_PATH_MAGIC - find a file program which can recognise a shared library |
| 3172 | AC_DEFUN([AC_PATH_MAGIC], |
| 3173 | [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl |
| 3174 | AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) |
| 3175 | if test -z "$lt_cv_path_MAGIC_CMD"; then |
| 3176 | if test -n "$ac_tool_prefix"; then |
| 3177 | AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) |
| 3178 | else |
| 3179 | MAGIC_CMD=: |
| 3180 | fi |
| 3181 | fi |
| 3182 | ]) |
| 3183 | |
| 3184 | |
| 3185 | # AC_PROG_LD - find the path to the GNU or non-GNU linker |
| 3186 | AC_DEFUN([AC_PROG_LD], |
| 3187 | [AC_ARG_WITH(gnu-ld, |
| 3188 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
| 3189 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
| 3190 | AC_REQUIRE([AC_PROG_CC])dnl |
| 3191 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 3192 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
| 3193 | AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl |
| 3194 | ac_prog=ld |
| 3195 | if test "$GCC" = yes; then |
| 3196 | # Check if gcc -print-prog-name=ld gives a path. |
| 3197 | AC_MSG_CHECKING([for ld used by GCC]) |
| 3198 | case $host in |
| 3199 | *-*-mingw*) |
| 3200 | # gcc leaves a trailing carriage return which upsets mingw |
| 3201 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
| 3202 | *) |
| 3203 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
| 3204 | esac |
| 3205 | case $ac_prog in |
| 3206 | # Accept absolute paths. |
| 3207 | [[\\/]]* | [[A-Za-z]]:[[\\/]]*) |
| 3208 | re_direlt='/[[^/]][[^/]]*/\.\./' |
| 3209 | # Canonicalize the path of ld |
| 3210 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
| 3211 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
| 3212 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
| 3213 | done |
| 3214 | test -z "$LD" && LD="$ac_prog" |
| 3215 | ;; |
| 3216 | "") |
| 3217 | # If it fails, then pretend we aren't using GCC. |
| 3218 | ac_prog=ld |
| 3219 | ;; |
| 3220 | *) |
| 3221 | # If it is relative, then search for the first ld in PATH. |
| 3222 | with_gnu_ld=unknown |
| 3223 | ;; |
| 3224 | esac |
| 3225 | elif test "$with_gnu_ld" = yes; then |
| 3226 | AC_MSG_CHECKING([for GNU ld]) |
| 3227 | else |
| 3228 | AC_MSG_CHECKING([for non-GNU ld]) |
| 3229 | fi |
| 3230 | AC_CACHE_VAL(lt_cv_path_LD, |
| 3231 | [if test -z "$LD"; then |
| 3232 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
| 3233 | for ac_dir in $PATH; do |
| 3234 | test -z "$ac_dir" && ac_dir=. |
| 3235 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
| 3236 | lt_cv_path_LD="$ac_dir/$ac_prog" |
| 3237 | # Check to see if the program is GNU ld. I'd rather use --version, |
| 3238 | # but apparently some GNU ld's only accept -v. |
| 3239 | # Break only if it was the GNU/non-GNU ld that we prefer. |
| 3240 | if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
| 3241 | test "$with_gnu_ld" != no && break |
| 3242 | else |
| 3243 | test "$with_gnu_ld" != yes && break |
| 3244 | fi |
| 3245 | fi |
| 3246 | done |
| 3247 | IFS="$ac_save_ifs" |
| 3248 | else |
| 3249 | lt_cv_path_LD="$LD" # Let the user override the test with a path. |
| 3250 | fi]) |
| 3251 | LD="$lt_cv_path_LD" |
| 3252 | if test -n "$LD"; then |
| 3253 | AC_MSG_RESULT($LD) |
| 3254 | else |
| 3255 | AC_MSG_RESULT(no) |
| 3256 | fi |
| 3257 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
| 3258 | AC_PROG_LD_GNU |
| 3259 | ]) |
| 3260 | |
| 3261 | # AC_PROG_LD_GNU - |
| 3262 | AC_DEFUN([AC_PROG_LD_GNU], |
| 3263 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, |
| 3264 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
| 3265 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
| 3266 | lt_cv_prog_gnu_ld=yes |
| 3267 | else |
| 3268 | lt_cv_prog_gnu_ld=no |
| 3269 | fi]) |
| 3270 | with_gnu_ld=$lt_cv_prog_gnu_ld |
| 3271 | ]) |
| 3272 | |
| 3273 | # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker |
| 3274 | # -- PORTME Some linkers may need a different reload flag. |
| 3275 | AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], |
| 3276 | [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, |
| 3277 | [lt_cv_ld_reload_flag='-r']) |
| 3278 | reload_flag=$lt_cv_ld_reload_flag |
| 3279 | test -n "$reload_flag" && reload_flag=" $reload_flag" |
| 3280 | ]) |
| 3281 | |
| 3282 | # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies |
| 3283 | # -- PORTME fill in with the dynamic library characteristics |
| 3284 | AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], |
| 3285 | [AC_CACHE_CHECK([how to recognise dependant libraries], |
| 3286 | lt_cv_deplibs_check_method, |
| 3287 | [lt_cv_file_magic_cmd='$MAGIC_CMD' |
| 3288 | lt_cv_file_magic_test_file= |
| 3289 | lt_cv_deplibs_check_method='unknown' |
| 3290 | # Need to set the preceding variable on all platforms that support |
| 3291 | # interlibrary dependencies. |
| 3292 | # 'none' -- dependencies not supported. |
| 3293 | # `unknown' -- same as none, but documents that we really don't know. |
| 3294 | # 'pass_all' -- all dependencies passed with no checks. |
| 3295 | # 'test_compile' -- check by making test program. |
| 3296 | # 'file_magic [[regex]]' -- check by looking for files in library path |
| 3297 | # which responds to the $file_magic_cmd with a given egrep regex. |
| 3298 | # If you have `file' or equivalent on your system and you're not sure |
| 3299 | # whether `pass_all' will *always* work, you probably want this one. |
| 3300 | |
| 3301 | case $host_os in |
| 3302 | aix4* | aix5*) |
| 3303 | lt_cv_deplibs_check_method=pass_all |
| 3304 | ;; |
| 3305 | |
| 3306 | beos*) |
| 3307 | lt_cv_deplibs_check_method=pass_all |
| 3308 | ;; |
| 3309 | |
| 3310 | bsdi4*) |
| 3311 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' |
| 3312 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
| 3313 | lt_cv_file_magic_test_file=/shlib/libc.so |
| 3314 | ;; |
| 3315 | |
| 3316 | cygwin* | mingw* | pw32*) |
| 3317 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
| 3318 | lt_cv_file_magic_cmd='$OBJDUMP -f' |
| 3319 | ;; |
| 3320 | |
| 3321 | darwin* | rhapsody*) |
| 3322 | lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' |
| 3323 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
| 3324 | case "$host_os" in |
| 3325 | rhapsody* | darwin1.[[012]]) |
| 3326 | lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` |
| 3327 | ;; |
| 3328 | *) # Darwin 1.3 on |
| 3329 | lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' |
| 3330 | ;; |
| 3331 | esac |
| 3332 | ;; |
| 3333 | |
| 3334 | freebsd*) |
| 3335 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
| 3336 | case $host_cpu in |
| 3337 | i*86 ) |
| 3338 | # Not sure whether the presence of OpenBSD here was a mistake. |
| 3339 | # Let's accept both of them until this is cleared up. |
| 3340 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' |
| 3341 | lt_cv_file_magic_cmd=/usr/bin/file |
| 3342 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
| 3343 | ;; |
| 3344 | esac |
| 3345 | else |
| 3346 | lt_cv_deplibs_check_method=pass_all |
| 3347 | fi |
| 3348 | ;; |
| 3349 | |
| 3350 | gnu*) |
| 3351 | lt_cv_deplibs_check_method=pass_all |
| 3352 | ;; |
| 3353 | |
| 3354 | hpux10.20*|hpux11*) |
| 3355 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' |
| 3356 | lt_cv_file_magic_cmd=/usr/bin/file |
| 3357 | lt_cv_file_magic_test_file=/usr/lib/libc.sl |
| 3358 | ;; |
| 3359 | |
| 3360 | irix5* | irix6*) |
| 3361 | case $host_os in |
| 3362 | irix5*) |
| 3363 | # this will be overridden with pass_all, but let us keep it just in case |
| 3364 | lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" |
| 3365 | ;; |
| 3366 | *) |
| 3367 | case $LD in |
| 3368 | *-32|*"-32 ") libmagic=32-bit;; |
| 3369 | *-n32|*"-n32 ") libmagic=N32;; |
| 3370 | *-64|*"-64 ") libmagic=64-bit;; |
| 3371 | *) libmagic=never-match;; |
| 3372 | esac |
| 3373 | # this will be overridden with pass_all, but let us keep it just in case |
| 3374 | lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" |
| 3375 | ;; |
| 3376 | esac |
| 3377 | lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` |
| 3378 | lt_cv_deplibs_check_method=pass_all |
| 3379 | ;; |
| 3380 | |
| 3381 | # This must be Linux ELF. |
| 3382 | linux-gnu*) |
| 3383 | case $host_cpu in |
| 3384 | alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* ) |
| 3385 | lt_cv_deplibs_check_method=pass_all ;; |
| 3386 | *) |
| 3387 | # glibc up to 2.1.1 does not perform some relocations on ARM |
| 3388 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; |
| 3389 | esac |
| 3390 | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` |
| 3391 | ;; |
| 3392 | |
| 3393 | netbsd*) |
| 3394 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
| 3395 | lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' |
| 3396 | else |
| 3397 | lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' |
| 3398 | fi |
| 3399 | ;; |
| 3400 | |
| 3401 | newos6*) |
| 3402 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' |
| 3403 | lt_cv_file_magic_cmd=/usr/bin/file |
| 3404 | lt_cv_file_magic_test_file=/usr/lib/libnls.so |
| 3405 | ;; |
| 3406 | |
| 3407 | openbsd*) |
| 3408 | lt_cv_file_magic_cmd=/usr/bin/file |
| 3409 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
| 3410 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| 3411 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' |
| 3412 | else |
| 3413 | lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' |
| 3414 | fi |
| 3415 | ;; |
| 3416 | |
| 3417 | osf3* | osf4* | osf5*) |
| 3418 | # this will be overridden with pass_all, but let us keep it just in case |
| 3419 | lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' |
| 3420 | lt_cv_file_magic_test_file=/shlib/libc.so |
| 3421 | lt_cv_deplibs_check_method=pass_all |
| 3422 | ;; |
| 3423 | |
| 3424 | sco3.2v5*) |
| 3425 | lt_cv_deplibs_check_method=pass_all |
| 3426 | ;; |
| 3427 | |
| 3428 | solaris*) |
| 3429 | lt_cv_deplibs_check_method=pass_all |
| 3430 | lt_cv_file_magic_test_file=/lib/libc.so |
| 3431 | ;; |
| 3432 | |
| 3433 | sysv5uw[[78]]* | sysv4*uw2*) |
| 3434 | lt_cv_deplibs_check_method=pass_all |
| 3435 | ;; |
| 3436 | |
| 3437 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
| 3438 | case $host_vendor in |
| 3439 | motorola) |
| 3440 | 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]]' |
| 3441 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` |
| 3442 | ;; |
| 3443 | ncr) |
| 3444 | lt_cv_deplibs_check_method=pass_all |
| 3445 | ;; |
| 3446 | sequent) |
| 3447 | lt_cv_file_magic_cmd='/bin/file' |
| 3448 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' |
| 3449 | ;; |
| 3450 | sni) |
| 3451 | lt_cv_file_magic_cmd='/bin/file' |
| 3452 | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" |
| 3453 | lt_cv_file_magic_test_file=/lib/libc.so |
| 3454 | ;; |
| 3455 | esac |
| 3456 | ;; |
| 3457 | esac |
| 3458 | ]) |
| 3459 | file_magic_cmd=$lt_cv_file_magic_cmd |
| 3460 | deplibs_check_method=$lt_cv_deplibs_check_method |
| 3461 | ]) |
| 3462 | |
| 3463 | |
| 3464 | # AC_PROG_NM - find the path to a BSD-compatible name lister |
| 3465 | AC_DEFUN([AC_PROG_NM], |
| 3466 | [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl |
| 3467 | AC_MSG_CHECKING([for BSD-compatible nm]) |
| 3468 | AC_CACHE_VAL(lt_cv_path_NM, |
| 3469 | [if test -n "$NM"; then |
| 3470 | # Let the user override the test. |
| 3471 | lt_cv_path_NM="$NM" |
| 3472 | else |
| 3473 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
| 3474 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
| 3475 | test -z "$ac_dir" && ac_dir=. |
| 3476 | tmp_nm=$ac_dir/${ac_tool_prefix}nm |
| 3477 | if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then |
| 3478 | # Check to see if the nm accepts a BSD-compat flag. |
| 3479 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
| 3480 | # nm: unknown option "B" ignored |
| 3481 | # Tru64's nm complains that /dev/null is an invalid object file |
| 3482 | if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then |
| 3483 | lt_cv_path_NM="$tmp_nm -B" |
| 3484 | break |
| 3485 | elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
| 3486 | lt_cv_path_NM="$tmp_nm -p" |
| 3487 | break |
| 3488 | else |
| 3489 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
| 3490 | continue # so that we can try to find one that supports BSD flags |
| 3491 | fi |
| 3492 | fi |
| 3493 | done |
| 3494 | IFS="$ac_save_ifs" |
| 3495 | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
| 3496 | fi]) |
| 3497 | NM="$lt_cv_path_NM" |
| 3498 | AC_MSG_RESULT([$NM]) |
| 3499 | ]) |
| 3500 | |
| 3501 | # AC_CHECK_LIBM - check for math library |
| 3502 | AC_DEFUN([AC_CHECK_LIBM], |
| 3503 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 3504 | LIBM= |
| 3505 | case $host in |
| 3506 | *-*-beos* | *-*-cygwin* | *-*-pw32*) |
| 3507 | # These system don't have libm |
| 3508 | ;; |
| 3509 | *-ncr-sysv4.3*) |
| 3510 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
| 3511 | AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") |
| 3512 | ;; |
| 3513 | *) |
| 3514 | AC_CHECK_LIB(m, main, LIBM="-lm") |
| 3515 | ;; |
| 3516 | esac |
| 3517 | ]) |
| 3518 | |
| 3519 | # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for |
| 3520 | # the libltdl convenience library and INCLTDL to the include flags for |
| 3521 | # the libltdl header and adds --enable-ltdl-convenience to the |
| 3522 | # configure arguments. Note that LIBLTDL and INCLTDL are not |
| 3523 | # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not |
| 3524 | # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed |
| 3525 | # with '${top_builddir}/' and INCLTDL will be prefixed with |
| 3526 | # '${top_srcdir}/' (note the single quotes!). If your package is not |
| 3527 | # flat and you're not using automake, define top_builddir and |
| 3528 | # top_srcdir appropriately in the Makefiles. |
| 3529 | AC_DEFUN([AC_LIBLTDL_CONVENIENCE], |
| 3530 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 3531 | case $enable_ltdl_convenience in |
| 3532 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
| 3533 | "") enable_ltdl_convenience=yes |
| 3534 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
| 3535 | esac |
| 3536 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la |
| 3537 | INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
| 3538 | ]) |
| 3539 | |
| 3540 | # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for |
| 3541 | # the libltdl installable library and INCLTDL to the include flags for |
| 3542 | # the libltdl header and adds --enable-ltdl-install to the configure |
| 3543 | # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is |
| 3544 | # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed |
| 3545 | # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will |
| 3546 | # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed |
| 3547 | # with '${top_srcdir}/' (note the single quotes!). If your package is |
| 3548 | # not flat and you're not using automake, define top_builddir and |
| 3549 | # top_srcdir appropriately in the Makefiles. |
| 3550 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. |
| 3551 | AC_DEFUN([AC_LIBLTDL_INSTALLABLE], |
| 3552 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 3553 | AC_CHECK_LIB(ltdl, main, |
| 3554 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], |
| 3555 | [if test x"$enable_ltdl_install" = xno; then |
| 3556 | AC_MSG_WARN([libltdl not installed, but installation disabled]) |
| 3557 | else |
| 3558 | enable_ltdl_install=yes |
| 3559 | fi |
| 3560 | ]) |
| 3561 | if test x"$enable_ltdl_install" = x"yes"; then |
| 3562 | ac_configure_args="$ac_configure_args --enable-ltdl-install" |
| 3563 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la |
| 3564 | INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
| 3565 | else |
| 3566 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" |
| 3567 | LIBLTDL="-lltdl" |
| 3568 | INCLTDL= |
| 3569 | fi |
| 3570 | ]) |
| 3571 | |
| 3572 | # old names |
| 3573 | AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) |
| 3574 | AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
| 3575 | AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) |
| 3576 | AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) |
| 3577 | AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) |
| 3578 | AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) |
| 3579 | AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) |
| 3580 | |
| 3581 | # This is just to silence aclocal about the macro not being used |
| 3582 | ifelse([AC_DISABLE_FAST_INSTALL]) |
| 3583 | |
| 3584 | # Do all the work for Automake. -*- Autoconf -*- |
| 3585 | |
| 3586 | # This macro actually does too much some checks are only needed if |
| 3587 | # your package does certain things. But this isn't really a big deal. |
| 3588 | |
| 3589 | # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 |
| 3590 | # Free Software Foundation, Inc. |
| 3591 | |
| 3592 | # This program is free software; you can redistribute it and/or modify |
| 3593 | # it under the terms of the GNU General Public License as published by |
| 3594 | # the Free Software Foundation; either version 2, or (at your option) |
| 3595 | # any later version. |
| 3596 | |
| 3597 | # This program is distributed in the hope that it will be useful, |
| 3598 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 3599 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 3600 | # GNU General Public License for more details. |
| 3601 | |
| 3602 | # You should have received a copy of the GNU General Public License |
| 3603 | # along with this program; if not, write to the Free Software |
| 3604 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 3605 | # 02111-1307, USA. |
| 3606 | |
| 3607 | # serial 8 |
| 3608 | |
| 3609 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
| 3610 | # written in clear, in which case automake, when reading aclocal.m4, |
| 3611 | # will think it sees a *use*, and therefore will trigger all it's |
| 3612 | # C support machinery. Also note that it means that autoscan, seeing |
| 3613 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
| 3614 | |
| 3615 | |
| 3616 | AC_PREREQ([2.52]) |
| 3617 | |
| 3618 | # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow |
| 3619 | # the ones we care about. |
| 3620 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
| 3621 | |
| 3622 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) |
| 3623 | # AM_INIT_AUTOMAKE([OPTIONS]) |
| 3624 | # ----------------------------------------------- |
| 3625 | # The call with PACKAGE and VERSION arguments is the old style |
| 3626 | # call (pre autoconf-2.50), which is being phased out. PACKAGE |
| 3627 | # and VERSION should now be passed to AC_INIT and removed from |
| 3628 | # the call to AM_INIT_AUTOMAKE. |
| 3629 | # We support both call styles for the transition. After |
| 3630 | # the next Automake release, Autoconf can make the AC_INIT |
| 3631 | # arguments mandatory, and then we can depend on a new Autoconf |
| 3632 | # release and drop the old call support. |
| 3633 | AC_DEFUN([AM_INIT_AUTOMAKE], |
| 3634 | [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
| 3635 | AC_REQUIRE([AC_PROG_INSTALL])dnl |
| 3636 | # test to see if srcdir already configured |
| 3637 | if test "`cd $srcdir && pwd`" != "`pwd`" && |
| 3638 | test -f $srcdir/config.status; then |
| 3639 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
| 3640 | fi |
| 3641 | |
| 3642 | # Define the identity of the package. |
| 3643 | dnl Distinguish between old-style and new-style calls. |
| 3644 | m4_ifval([$2], |
| 3645 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl |
| 3646 | AC_SUBST([PACKAGE], [$1])dnl |
| 3647 | AC_SUBST([VERSION], [$2])], |
| 3648 | [_AM_SET_OPTIONS([$1])dnl |
| 3649 | AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl |
| 3650 | AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl |
| 3651 | |
| 3652 | _AM_IF_OPTION([no-define],, |
| 3653 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
| 3654 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl |
| 3655 | |
| 3656 | # Some tools Automake needs. |
| 3657 | AC_REQUIRE([AM_SANITY_CHECK])dnl |
| 3658 | AC_REQUIRE([AC_ARG_PROGRAM])dnl |
| 3659 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) |
| 3660 | AM_MISSING_PROG(AUTOCONF, autoconf) |
| 3661 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) |
| 3662 | AM_MISSING_PROG(AUTOHEADER, autoheader) |
| 3663 | AM_MISSING_PROG(MAKEINFO, makeinfo) |
| 3664 | AM_MISSING_PROG(AMTAR, tar) |
| 3665 | AM_PROG_INSTALL_SH |
| 3666 | AM_PROG_INSTALL_STRIP |
| 3667 | # We need awk for the "check" target. The system "awk" is bad on |
| 3668 | # some platforms. |
| 3669 | AC_REQUIRE([AC_PROG_AWK])dnl |
| 3670 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
| 3671 | |
| 3672 | _AM_IF_OPTION([no-dependencies],, |
| 3673 | [AC_PROVIDE_IFELSE([AC_PROG_][CC], |
| 3674 | [_AM_DEPENDENCIES(CC)], |
| 3675 | [define([AC_PROG_][CC], |
| 3676 | defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl |
| 3677 | AC_PROVIDE_IFELSE([AC_PROG_][CXX], |
| 3678 | [_AM_DEPENDENCIES(CXX)], |
| 3679 | [define([AC_PROG_][CXX], |
| 3680 | defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl |
| 3681 | ]) |
| 3682 | ]) |
| 3683 | |
| 3684 | # Copyright 2002 Free Software Foundation, Inc. |
| 3685 | |
| 3686 | # This program is free software; you can redistribute it and/or modify |
| 3687 | # it under the terms of the GNU General Public License as published by |
| 3688 | # the Free Software Foundation; either version 2, or (at your option) |
| 3689 | # any later version. |
| 3690 | |
| 3691 | # This program is distributed in the hope that it will be useful, |
| 3692 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 3693 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 3694 | # GNU General Public License for more details. |
| 3695 | |
| 3696 | # You should have received a copy of the GNU General Public License |
| 3697 | # along with this program; if not, write to the Free Software |
| 3698 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 3699 | |
| 3700 | # AM_AUTOMAKE_VERSION(VERSION) |
| 3701 | # ---------------------------- |
| 3702 | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
| 3703 | # generated from the m4 files accompanying Automake X.Y. |
| 3704 | AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"]) |
| 3705 | |
| 3706 | # AM_SET_CURRENT_AUTOMAKE_VERSION |
| 3707 | # ------------------------------- |
| 3708 | # Call AM_AUTOMAKE_VERSION so it can be traced. |
| 3709 | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
| 3710 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
| 3711 | [AM_AUTOMAKE_VERSION([1.6.3])]) |
| 3712 | |
| 3713 | # Helper functions for option handling. -*- Autoconf -*- |
| 3714 | |
| 3715 | # Copyright 2001, 2002 Free Software Foundation, Inc. |
| 3716 | |
| 3717 | # This program is free software; you can redistribute it and/or modify |
| 3718 | # it under the terms of the GNU General Public License as published by |
| 3719 | # the Free Software Foundation; either version 2, or (at your option) |
| 3720 | # any later version. |
| 3721 | |
| 3722 | # This program is distributed in the hope that it will be useful, |
| 3723 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 3724 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 3725 | # GNU General Public License for more details. |
| 3726 | |
| 3727 | # You should have received a copy of the GNU General Public License |
| 3728 | # along with this program; if not, write to the Free Software |
| 3729 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 3730 | # 02111-1307, USA. |
| 3731 | |
| 3732 | # serial 2 |
| 3733 | |
| 3734 | # _AM_MANGLE_OPTION(NAME) |
| 3735 | # ----------------------- |
| 3736 | AC_DEFUN([_AM_MANGLE_OPTION], |
| 3737 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) |
| 3738 | |
| 3739 | # _AM_SET_OPTION(NAME) |
| 3740 | # ------------------------------ |
| 3741 | # Set option NAME. Presently that only means defining a flag for this option. |
| 3742 | AC_DEFUN([_AM_SET_OPTION], |
| 3743 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) |
| 3744 | |
| 3745 | # _AM_SET_OPTIONS(OPTIONS) |
| 3746 | # ---------------------------------- |
| 3747 | # OPTIONS is a space-separated list of Automake options. |
| 3748 | AC_DEFUN([_AM_SET_OPTIONS], |
| 3749 | [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
| 3750 | |
| 3751 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) |
| 3752 | # ------------------------------------------- |
| 3753 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
| 3754 | AC_DEFUN([_AM_IF_OPTION], |
| 3755 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
| 3756 | |
| 3757 | # |
| 3758 | # Check to make sure that the build environment is sane. |
| 3759 | # |
| 3760 | |
| 3761 | # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. |
| 3762 | |
| 3763 | # This program is free software; you can redistribute it and/or modify |
| 3764 | # it under the terms of the GNU General Public License as published by |
| 3765 | # the Free Software Foundation; either version 2, or (at your option) |
| 3766 | # any later version. |
| 3767 | |
| 3768 | # This program is distributed in the hope that it will be useful, |
| 3769 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 3770 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 3771 | # GNU General Public License for more details. |
| 3772 | |
| 3773 | # You should have received a copy of the GNU General Public License |
| 3774 | # along with this program; if not, write to the Free Software |
| 3775 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 3776 | # 02111-1307, USA. |
| 3777 | |
| 3778 | # serial 3 |
| 3779 | |
| 3780 | # AM_SANITY_CHECK |
| 3781 | # --------------- |
| 3782 | AC_DEFUN([AM_SANITY_CHECK], |
| 3783 | [AC_MSG_CHECKING([whether build environment is sane]) |
| 3784 | # Just in case |
| 3785 | sleep 1 |
| 3786 | echo timestamp > conftest.file |
| 3787 | # Do `set' in a subshell so we don't clobber the current shell's |
| 3788 | # arguments. Must try -L first in case configure is actually a |
| 3789 | # symlink; some systems play weird games with the mod time of symlinks |
| 3790 | # (eg FreeBSD returns the mod time of the symlink's containing |
| 3791 | # directory). |
| 3792 | if ( |
| 3793 | set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` |
| 3794 | if test "$[*]" = "X"; then |
| 3795 | # -L didn't work. |
| 3796 | set X `ls -t $srcdir/configure conftest.file` |
| 3797 | fi |
| 3798 | rm -f conftest.file |
| 3799 | if test "$[*]" != "X $srcdir/configure conftest.file" \ |
| 3800 | && test "$[*]" != "X conftest.file $srcdir/configure"; then |
| 3801 | |
| 3802 | # If neither matched, then we have a broken ls. This can happen |
| 3803 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
| 3804 | # broken ls alias from the environment. This has actually |
| 3805 | # happened. Such a system could not be considered "sane". |
| 3806 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
| 3807 | alias in your environment]) |
| 3808 | fi |
| 3809 | |
| 3810 | test "$[2]" = conftest.file |
| 3811 | ) |
| 3812 | then |
| 3813 | # Ok. |
| 3814 | : |
| 3815 | else |
| 3816 | AC_MSG_ERROR([newly created file is older than distributed files! |
| 3817 | Check your system clock]) |
| 3818 | fi |
| 3819 | AC_MSG_RESULT(yes)]) |
| 3820 | |
| 3821 | # -*- Autoconf -*- |
| 3822 | |
| 3823 | |
| 3824 | # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. |
| 3825 | |
| 3826 | # This program is free software; you can redistribute it and/or modify |
| 3827 | # it under the terms of the GNU General Public License as published by |
| 3828 | # the Free Software Foundation; either version 2, or (at your option) |
| 3829 | # any later version. |
| 3830 | |
| 3831 | # This program is distributed in the hope that it will be useful, |
| 3832 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 3833 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 3834 | # GNU General Public License for more details. |
| 3835 | |
| 3836 | # You should have received a copy of the GNU General Public License |
| 3837 | # along with this program; if not, write to the Free Software |
| 3838 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 3839 | # 02111-1307, USA. |
| 3840 | |
| 3841 | # serial 3 |
| 3842 | |
| 3843 | # AM_MISSING_PROG(NAME, PROGRAM) |
| 3844 | # ------------------------------ |
| 3845 | AC_DEFUN([AM_MISSING_PROG], |
| 3846 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) |
| 3847 | $1=${$1-"${am_missing_run}$2"} |
| 3848 | AC_SUBST($1)]) |
| 3849 | |
| 3850 | |
| 3851 | # AM_MISSING_HAS_RUN |
| 3852 | # ------------------ |
| 3853 | # Define MISSING if not defined so far and test if it supports --run. |
| 3854 | # If it does, set am_missing_run to use it, otherwise, to nothing. |
| 3855 | AC_DEFUN([AM_MISSING_HAS_RUN], |
| 3856 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
| 3857 | test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" |
| 3858 | # Use eval to expand $SHELL |
| 3859 | if eval "$MISSING --run true"; then |
| 3860 | am_missing_run="$MISSING --run " |
| 3861 | else |
| 3862 | am_missing_run= |
| 3863 | AC_MSG_WARN([`missing' script is too old or missing]) |
| 3864 | fi |
| 3865 | ]) |
| 3866 | |
| 3867 | # AM_AUX_DIR_EXPAND |
| 3868 | |
| 3869 | # Copyright 2001 Free Software Foundation, Inc. |
| 3870 | |
| 3871 | # This program is free software; you can redistribute it and/or modify |
| 3872 | # it under the terms of the GNU General Public License as published by |
| 3873 | # the Free Software Foundation; either version 2, or (at your option) |
| 3874 | # any later version. |
| 3875 | |
| 3876 | # This program is distributed in the hope that it will be useful, |
| 3877 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 3878 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 3879 | # GNU General Public License for more details. |
| 3880 | |
| 3881 | # You should have received a copy of the GNU General Public License |
| 3882 | # along with this program; if not, write to the Free Software |
| 3883 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 3884 | # 02111-1307, USA. |
| 3885 | |
| 3886 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
| 3887 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to |
| 3888 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'. |
| 3889 | # |
| 3890 | # Of course, Automake must honor this variable whenever it calls a |
| 3891 | # tool from the auxiliary directory. The problem is that $srcdir (and |
| 3892 | # therefore $ac_aux_dir as well) can be either absolute or relative, |
| 3893 | # depending on how configure is run. This is pretty annoying, since |
| 3894 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top |
| 3895 | # source directory, any form will work fine, but in subdirectories a |
| 3896 | # relative path needs to be adjusted first. |
| 3897 | # |
| 3898 | # $ac_aux_dir/missing |
| 3899 | # fails when called from a subdirectory if $ac_aux_dir is relative |
| 3900 | # $top_srcdir/$ac_aux_dir/missing |
| 3901 | # fails if $ac_aux_dir is absolute, |
| 3902 | # fails when called from a subdirectory in a VPATH build with |
| 3903 | # a relative $ac_aux_dir |
| 3904 | # |
| 3905 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir |
| 3906 | # are both prefixed by $srcdir. In an in-source build this is usually |
| 3907 | # harmless because $srcdir is `.', but things will broke when you |
| 3908 | # start a VPATH build or use an absolute $srcdir. |
| 3909 | # |
| 3910 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
| 3911 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: |
| 3912 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
| 3913 | # and then we would define $MISSING as |
| 3914 | # MISSING="\${SHELL} $am_aux_dir/missing" |
| 3915 | # This will work as long as MISSING is not called from configure, because |
| 3916 | # unfortunately $(top_srcdir) has no meaning in configure. |
| 3917 | # However there are other variables, like CC, which are often used in |
| 3918 | # configure, and could therefore not use this "fixed" $ac_aux_dir. |
| 3919 | # |
| 3920 | # Another solution, used here, is to always expand $ac_aux_dir to an |
| 3921 | # absolute PATH. The drawback is that using absolute paths prevent a |
| 3922 | # configured tree to be moved without reconfiguration. |
| 3923 | |
| 3924 | # Rely on autoconf to set up CDPATH properly. |
| 3925 | AC_PREREQ([2.50]) |
| 3926 | |
| 3927 | AC_DEFUN([AM_AUX_DIR_EXPAND], [ |
| 3928 | # expand $ac_aux_dir to an absolute path |
| 3929 | am_aux_dir=`cd $ac_aux_dir && pwd` |
| 3930 | ]) |
| 3931 | |
| 3932 | # AM_PROG_INSTALL_SH |
| 3933 | # ------------------ |
| 3934 | # Define $install_sh. |
| 3935 | |
| 3936 | # Copyright 2001 Free Software Foundation, Inc. |
| 3937 | |
| 3938 | # This program is free software; you can redistribute it and/or modify |
| 3939 | # it under the terms of the GNU General Public License as published by |
| 3940 | # the Free Software Foundation; either version 2, or (at your option) |
| 3941 | # any later version. |
| 3942 | |
| 3943 | # This program is distributed in the hope that it will be useful, |
| 3944 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 3945 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 3946 | # GNU General Public License for more details. |
| 3947 | |
| 3948 | # You should have received a copy of the GNU General Public License |
| 3949 | # along with this program; if not, write to the Free Software |
| 3950 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 3951 | # 02111-1307, USA. |
| 3952 | |
| 3953 | AC_DEFUN([AM_PROG_INSTALL_SH], |
| 3954 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
| 3955 | install_sh=${install_sh-"$am_aux_dir/install-sh"} |
| 3956 | AC_SUBST(install_sh)]) |
| 3957 | |
| 3958 | # AM_PROG_INSTALL_STRIP |
| 3959 | |
| 3960 | # Copyright 2001 Free Software Foundation, Inc. |
| 3961 | |
| 3962 | # This program is free software; you can redistribute it and/or modify |
| 3963 | # it under the terms of the GNU General Public License as published by |
| 3964 | # the Free Software Foundation; either version 2, or (at your option) |
| 3965 | # any later version. |
| 3966 | |
| 3967 | # This program is distributed in the hope that it will be useful, |
| 3968 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 3969 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 3970 | # GNU General Public License for more details. |
| 3971 | |
| 3972 | # You should have received a copy of the GNU General Public License |
| 3973 | # along with this program; if not, write to the Free Software |
| 3974 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 3975 | # 02111-1307, USA. |
| 3976 | |
| 3977 | # One issue with vendor `install' (even GNU) is that you can't |
| 3978 | # specify the program used to strip binaries. This is especially |
| 3979 | # annoying in cross-compiling environments, where the build's strip |
| 3980 | # is unlikely to handle the host's binaries. |
| 3981 | # Fortunately install-sh will honor a STRIPPROG variable, so we |
| 3982 | # always use install-sh in `make install-strip', and initialize |
| 3983 | # STRIPPROG with the value of the STRIP variable (set by the user). |
| 3984 | AC_DEFUN([AM_PROG_INSTALL_STRIP], |
| 3985 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
| 3986 | # Installed binaries are usually stripped using `strip' when the user |
| 3987 | # run `make install-strip'. However `strip' might not be the right |
| 3988 | # tool to use in cross-compilation environments, therefore Automake |
| 3989 | # will honor the `STRIP' environment variable to overrule this program. |
| 3990 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'. |
| 3991 | if test "$cross_compiling" != no; then |
| 3992 | AC_CHECK_TOOL([STRIP], [strip], :) |
| 3993 | fi |
| 3994 | INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" |
| 3995 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
| 3996 | |
| 3997 | # serial 4 -*- Autoconf -*- |
| 3998 | |
| 3999 | # Copyright 1999, 2000, 2001 Free Software Foundation, Inc. |
| 4000 | |
| 4001 | # This program is free software; you can redistribute it and/or modify |
| 4002 | # it under the terms of the GNU General Public License as published by |
| 4003 | # the Free Software Foundation; either version 2, or (at your option) |
| 4004 | # any later version. |
| 4005 | |
| 4006 | # This program is distributed in the hope that it will be useful, |
| 4007 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 4008 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 4009 | # GNU General Public License for more details. |
| 4010 | |
| 4011 | # You should have received a copy of the GNU General Public License |
| 4012 | # along with this program; if not, write to the Free Software |
| 4013 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 4014 | # 02111-1307, USA. |
| 4015 | |
| 4016 | |
| 4017 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
| 4018 | # written in clear, in which case automake, when reading aclocal.m4, |
| 4019 | # will think it sees a *use*, and therefore will trigger all it's |
| 4020 | # C support machinery. Also note that it means that autoscan, seeing |
| 4021 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
| 4022 | |
| 4023 | |
| 4024 | |
| 4025 | # _AM_DEPENDENCIES(NAME) |
| 4026 | # ---------------------- |
| 4027 | # See how the compiler implements dependency checking. |
| 4028 | # NAME is "CC", "CXX", "GCJ", or "OBJC". |
| 4029 | # We try a few techniques and use that to set a single cache variable. |
| 4030 | # |
| 4031 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
| 4032 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular |
| 4033 | # dependency, and given that the user is not expected to run this macro, |
| 4034 | # just rely on AC_PROG_CC. |
| 4035 | AC_DEFUN([_AM_DEPENDENCIES], |
| 4036 | [AC_REQUIRE([AM_SET_DEPDIR])dnl |
| 4037 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl |
| 4038 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl |
| 4039 | AC_REQUIRE([AM_DEP_TRACK])dnl |
| 4040 | |
| 4041 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=], |
| 4042 | [$1], CXX, [depcc="$CXX" am_compiler_list=], |
| 4043 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], |
| 4044 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
| 4045 | [depcc="$$1" am_compiler_list=]) |
| 4046 | |
| 4047 | AC_CACHE_CHECK([dependency style of $depcc], |
| 4048 | [am_cv_$1_dependencies_compiler_type], |
| 4049 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then |
| 4050 | # We make a subdir and do the tests there. Otherwise we can end up |
| 4051 | # making bogus files that we don't know about and never remove. For |
| 4052 | # instance it was reported that on HP-UX the gcc test will end up |
| 4053 | # making a dummy file named `D' -- because `-MD' means `put the output |
| 4054 | # in D'. |
| 4055 | mkdir conftest.dir |
| 4056 | # Copy depcomp to subdir because otherwise we won't find it if we're |
| 4057 | # using a relative directory. |
| 4058 | cp "$am_depcomp" conftest.dir |
| 4059 | cd conftest.dir |
| 4060 | |
| 4061 | am_cv_$1_dependencies_compiler_type=none |
| 4062 | if test "$am_compiler_list" = ""; then |
| 4063 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
| 4064 | fi |
| 4065 | for depmode in $am_compiler_list; do |
| 4066 | # We need to recreate these files for each test, as the compiler may |
| 4067 | # overwrite some of them when testing with obscure command lines. |
| 4068 | # This happens at least with the AIX C compiler. |
| 4069 | echo '#include "conftest.h"' > conftest.c |
| 4070 | echo 'int i;' > conftest.h |
| 4071 | echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf |
| 4072 | |
| 4073 | case $depmode in |
| 4074 | nosideeffect) |
| 4075 | # after this tag, mechanisms are not by side-effect, so they'll |
| 4076 | # only be used when explicitly requested |
| 4077 | if test "x$enable_dependency_tracking" = xyes; then |
| 4078 | continue |
| 4079 | else |
| 4080 | break |
| 4081 | fi |
| 4082 | ;; |
| 4083 | none) break ;; |
| 4084 | esac |
| 4085 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
| 4086 | # mode. It turns out that the SunPro C++ compiler does not properly |
| 4087 | # handle `-M -o', and we need to detect this. |
| 4088 | if depmode=$depmode \ |
| 4089 | source=conftest.c object=conftest.o \ |
| 4090 | depfile=conftest.Po tmpdepfile=conftest.TPo \ |
| 4091 | $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && |
| 4092 | grep conftest.h conftest.Po > /dev/null 2>&1 && |
| 4093 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
| 4094 | am_cv_$1_dependencies_compiler_type=$depmode |
| 4095 | break |
| 4096 | fi |
| 4097 | done |
| 4098 | |
| 4099 | cd .. |
| 4100 | rm -rf conftest.dir |
| 4101 | else |
| 4102 | am_cv_$1_dependencies_compiler_type=none |
| 4103 | fi |
| 4104 | ]) |
| 4105 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) |
| 4106 | ]) |
| 4107 | |
| 4108 | |
| 4109 | # AM_SET_DEPDIR |
| 4110 | # ------------- |
| 4111 | # Choose a directory name for dependency files. |
| 4112 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES |
| 4113 | AC_DEFUN([AM_SET_DEPDIR], |
| 4114 | [rm -f .deps 2>/dev/null |
| 4115 | mkdir .deps 2>/dev/null |
| 4116 | if test -d .deps; then |
| 4117 | DEPDIR=.deps |
| 4118 | else |
| 4119 | # MS-DOS does not allow filenames that begin with a dot. |
| 4120 | DEPDIR=_deps |
| 4121 | fi |
| 4122 | rmdir .deps 2>/dev/null |
| 4123 | AC_SUBST([DEPDIR]) |
| 4124 | ]) |
| 4125 | |
| 4126 | |
| 4127 | # AM_DEP_TRACK |
| 4128 | # ------------ |
| 4129 | AC_DEFUN([AM_DEP_TRACK], |
| 4130 | [AC_ARG_ENABLE(dependency-tracking, |
| 4131 | [ --disable-dependency-tracking Speeds up one-time builds |
| 4132 | --enable-dependency-tracking Do not reject slow dependency extractors]) |
| 4133 | if test "x$enable_dependency_tracking" != xno; then |
| 4134 | am_depcomp="$ac_aux_dir/depcomp" |
| 4135 | AMDEPBACKSLASH='\' |
| 4136 | fi |
| 4137 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
| 4138 | AC_SUBST([AMDEPBACKSLASH]) |
| 4139 | ]) |
| 4140 | |
| 4141 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
| 4142 | |
| 4143 | # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
| 4144 | |
| 4145 | # This program is free software; you can redistribute it and/or modify |
| 4146 | # it under the terms of the GNU General Public License as published by |
| 4147 | # the Free Software Foundation; either version 2, or (at your option) |
| 4148 | # any later version. |
| 4149 | |
| 4150 | # This program is distributed in the hope that it will be useful, |
| 4151 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 4152 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 4153 | # GNU General Public License for more details. |
| 4154 | |
| 4155 | # You should have received a copy of the GNU General Public License |
| 4156 | # along with this program; if not, write to the Free Software |
| 4157 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 4158 | # 02111-1307, USA. |
| 4159 | |
| 4160 | #serial 2 |
| 4161 | |
| 4162 | # _AM_OUTPUT_DEPENDENCY_COMMANDS |
| 4163 | # ------------------------------ |
| 4164 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 4165 | [for mf in $CONFIG_FILES; do |
| 4166 | # Strip MF so we end up with the name of the file. |
| 4167 | mf=`echo "$mf" | sed -e 's/:.*$//'` |
| 4168 | # Check whether this is an Automake generated Makefile or not. |
| 4169 | # We used to match only the files named `Makefile.in', but |
| 4170 | # some people rename them; so instead we look at the file content. |
| 4171 | # Grep'ing the first line is not enough: some people post-process |
| 4172 | # each Makefile.in and add a new line on top of each file to say so. |
| 4173 | # So let's grep whole file. |
| 4174 | if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then |
| 4175 | dirpart=`AS_DIRNAME("$mf")` |
| 4176 | else |
| 4177 | continue |
| 4178 | fi |
| 4179 | grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue |
| 4180 | # Extract the definition of DEP_FILES from the Makefile without |
| 4181 | # running `make'. |
| 4182 | DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` |
| 4183 | test -z "$DEPDIR" && continue |
| 4184 | # When using ansi2knr, U may be empty or an underscore; expand it |
| 4185 | U=`sed -n -e '/^U = / s///p' < "$mf"` |
| 4186 | test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" |
| 4187 | # We invoke sed twice because it is the simplest approach to |
| 4188 | # changing $(DEPDIR) to its actual value in the expansion. |
| 4189 | for file in `sed -n -e ' |
| 4190 | /^DEP_FILES = .*\\\\$/ { |
| 4191 | s/^DEP_FILES = // |
| 4192 | :loop |
| 4193 | s/\\\\$// |
| 4194 | p |
| 4195 | n |
| 4196 | /\\\\$/ b loop |
| 4197 | p |
| 4198 | } |
| 4199 | /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ |
| 4200 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do |
| 4201 | # Make sure the directory exists. |
| 4202 | test -f "$dirpart/$file" && continue |
| 4203 | fdir=`AS_DIRNAME(["$file"])` |
| 4204 | AS_MKDIR_P([$dirpart/$fdir]) |
| 4205 | # echo "creating $dirpart/$file" |
| 4206 | echo '# dummy' > "$dirpart/$file" |
| 4207 | done |
| 4208 | done |
| 4209 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
| 4210 | |
| 4211 | |
| 4212 | # AM_OUTPUT_DEPENDENCY_COMMANDS |
| 4213 | # ----------------------------- |
| 4214 | # This macro should only be invoked once -- use via AC_REQUIRE. |
| 4215 | # |
| 4216 | # This code is only required when automatic dependency tracking |
| 4217 | # is enabled. FIXME. This creates each `.P' file that we will |
| 4218 | # need in order to bootstrap the dependency handling code. |
| 4219 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 4220 | [AC_CONFIG_COMMANDS([depfiles], |
| 4221 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 4222 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) |
| 4223 | ]) |
| 4224 | |
| 4225 | # Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*- |
| 4226 | |
| 4227 | # This program is free software; you can redistribute it and/or modify |
| 4228 | # it under the terms of the GNU General Public License as published by |
| 4229 | # the Free Software Foundation; either version 2, or (at your option) |
| 4230 | # any later version. |
| 4231 | |
| 4232 | # This program is distributed in the hope that it will be useful, |
| 4233 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 4234 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 4235 | # GNU General Public License for more details. |
| 4236 | |
| 4237 | # You should have received a copy of the GNU General Public License |
| 4238 | # along with this program; if not, write to the Free Software |
| 4239 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 4240 | # 02111-1307, USA. |
| 4241 | |
| 4242 | # serial 2 |
| 4243 | |
| 4244 | # AM_MAKE_INCLUDE() |
| 4245 | # ----------------- |
| 4246 | # Check to see how make treats includes. |
| 4247 | AC_DEFUN([AM_MAKE_INCLUDE], |
| 4248 | [am_make=${MAKE-make} |
| 4249 | cat > confinc << 'END' |
| 4250 | doit: |
| 4251 | @echo done |
| 4252 | END |
| 4253 | # If we don't find an include directive, just comment out the code. |
| 4254 | AC_MSG_CHECKING([for style of include used by $am_make]) |
| 4255 | am__include="#" |
| 4256 | am__quote= |
| 4257 | _am_result=none |
| 4258 | # First try GNU make style include. |
| 4259 | echo "include confinc" > confmf |
| 4260 | # We grep out `Entering directory' and `Leaving directory' |
| 4261 | # messages which can occur if `w' ends up in MAKEFLAGS. |
| 4262 | # In particular we don't look at `^make:' because GNU make might |
| 4263 | # be invoked under some other name (usually "gmake"), in which |
| 4264 | # case it prints its new name instead of `make'. |
| 4265 | if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then |
| 4266 | am__include=include |
| 4267 | am__quote= |
| 4268 | _am_result=GNU |
| 4269 | fi |
| 4270 | # Now try BSD make style include. |
| 4271 | if test "$am__include" = "#"; then |
| 4272 | echo '.include "confinc"' > confmf |
| 4273 | if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then |
| 4274 | am__include=.include |
| 4275 | am__quote="\"" |
| 4276 | _am_result=BSD |
| 4277 | fi |
| 4278 | fi |
| 4279 | AC_SUBST(am__include) |
| 4280 | AC_SUBST(am__quote) |
| 4281 | AC_MSG_RESULT($_am_result) |
| 4282 | rm -f confinc confmf |
| 4283 | ]) |
| 4284 | |
| 4285 | # AM_CONDITIONAL -*- Autoconf -*- |
| 4286 | |
| 4287 | # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. |
| 4288 | |
| 4289 | # This program is free software; you can redistribute it and/or modify |
| 4290 | # it under the terms of the GNU General Public License as published by |
| 4291 | # the Free Software Foundation; either version 2, or (at your option) |
| 4292 | # any later version. |
| 4293 | |
| 4294 | # This program is distributed in the hope that it will be useful, |
| 4295 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 4296 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 4297 | # GNU General Public License for more details. |
| 4298 | |
| 4299 | # You should have received a copy of the GNU General Public License |
| 4300 | # along with this program; if not, write to the Free Software |
| 4301 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 4302 | # 02111-1307, USA. |
| 4303 | |
| 4304 | # serial 5 |
| 4305 | |
| 4306 | AC_PREREQ(2.52) |
| 4307 | |
| 4308 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) |
| 4309 | # ------------------------------------- |
| 4310 | # Define a conditional. |
| 4311 | AC_DEFUN([AM_CONDITIONAL], |
| 4312 | [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], |
| 4313 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl |
| 4314 | AC_SUBST([$1_TRUE]) |
| 4315 | AC_SUBST([$1_FALSE]) |
| 4316 | if $2; then |
| 4317 | $1_TRUE= |
| 4318 | $1_FALSE='#' |
| 4319 | else |
| 4320 | $1_TRUE='#' |
| 4321 | $1_FALSE= |
| 4322 | fi |
| 4323 | AC_CONFIG_COMMANDS_PRE( |
| 4324 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then |
| 4325 | AC_MSG_ERROR([conditional \"$1\" was never defined. |
| 4326 | Usually this means the macro was only invoked conditionally.]) |
| 4327 | fi])]) |
| 4328 | |