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