diff options
Diffstat (limited to 'aclocal.m4')
| -rw-r--r-- | aclocal.m4 | 12472 |
1 files changed, 12472 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..dc17e0b --- /dev/null +++ b/aclocal.m4 | |||
| @@ -0,0 +1,12472 @@ | |||
| 1 | # generated automatically by aclocal 1.14.1 -*- Autoconf -*- | ||
| 2 | |||
| 3 | # Copyright (C) 1996-2013 Free Software Foundation, Inc. | ||
| 4 | |||
| 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 | m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) | ||
| 15 | m4_ifndef([AC_AUTOCONF_VERSION], | ||
| 16 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | ||
| 17 | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, | ||
| 18 | [m4_warning([this file was generated for autoconf 2.69. | ||
| 19 | You have another version of autoconf. It may work, but is not guaranteed to. | ||
| 20 | If you have problems, you may need to regenerate the build system entirely. | ||
| 21 | To do so, use the procedure documented by the package, typically 'autoreconf'.])]) | ||
| 22 | |||
| 23 | # Configure paths for GLIB | ||
| 24 | # Owen Taylor 1997-2001 | ||
| 25 | |||
| 26 | dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) | ||
| 27 | dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject, | ||
| 28 | dnl gthread, or gio is specified in MODULES, pass to pkg-config | ||
| 29 | dnl | ||
| 30 | AC_DEFUN([AM_PATH_GLIB_2_0], | ||
| 31 | [dnl | ||
| 32 | dnl Get the cflags and libraries from pkg-config | ||
| 33 | dnl | ||
| 34 | AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], | ||
| 35 | , enable_glibtest=yes) | ||
| 36 | |||
| 37 | pkg_config_args=glib-2.0 | ||
| 38 | for module in . $4 | ||
| 39 | do | ||
| 40 | case "$module" in | ||
| 41 | gmodule) | ||
| 42 | pkg_config_args="$pkg_config_args gmodule-2.0" | ||
| 43 | ;; | ||
| 44 | gmodule-no-export) | ||
| 45 | pkg_config_args="$pkg_config_args gmodule-no-export-2.0" | ||
| 46 | ;; | ||
| 47 | gobject) | ||
| 48 | pkg_config_args="$pkg_config_args gobject-2.0" | ||
| 49 | ;; | ||
| 50 | gthread) | ||
| 51 | pkg_config_args="$pkg_config_args gthread-2.0" | ||
| 52 | ;; | ||
| 53 | gio*) | ||
| 54 | pkg_config_args="$pkg_config_args $module-2.0" | ||
| 55 | ;; | ||
| 56 | esac | ||
| 57 | done | ||
| 58 | |||
| 59 | PKG_PROG_PKG_CONFIG([0.16]) | ||
| 60 | |||
| 61 | no_glib="" | ||
| 62 | |||
| 63 | if test "x$PKG_CONFIG" = x ; then | ||
| 64 | no_glib=yes | ||
| 65 | PKG_CONFIG=no | ||
| 66 | fi | ||
| 67 | |||
| 68 | min_glib_version=ifelse([$1], ,2.0.0,$1) | ||
| 69 | AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) | ||
| 70 | |||
| 71 | if test x$PKG_CONFIG != xno ; then | ||
| 72 | ## don't try to run the test against uninstalled libtool libs | ||
| 73 | if $PKG_CONFIG --uninstalled $pkg_config_args; then | ||
| 74 | echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" | ||
| 75 | enable_glibtest=no | ||
| 76 | fi | ||
| 77 | |||
| 78 | if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then | ||
| 79 | : | ||
| 80 | else | ||
| 81 | no_glib=yes | ||
| 82 | fi | ||
| 83 | fi | ||
| 84 | |||
| 85 | if test x"$no_glib" = x ; then | ||
| 86 | GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` | ||
| 87 | GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` | ||
| 88 | GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` | ||
| 89 | GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0` | ||
| 90 | |||
| 91 | GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` | ||
| 92 | GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` | ||
| 93 | glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ | ||
| 94 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | ||
| 95 | glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ | ||
| 96 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | ||
| 97 | glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ | ||
| 98 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | ||
| 99 | if test "x$enable_glibtest" = "xyes" ; then | ||
| 100 | ac_save_CFLAGS="$CFLAGS" | ||
| 101 | ac_save_LIBS="$LIBS" | ||
| 102 | CFLAGS="$CFLAGS $GLIB_CFLAGS" | ||
| 103 | LIBS="$GLIB_LIBS $LIBS" | ||
| 104 | dnl | ||
| 105 | dnl Now check if the installed GLIB is sufficiently new. (Also sanity | ||
| 106 | dnl checks the results of pkg-config to some extent) | ||
| 107 | dnl | ||
| 108 | rm -f conf.glibtest | ||
| 109 | AC_TRY_RUN([ | ||
| 110 | #include <glib.h> | ||
| 111 | #include <stdio.h> | ||
| 112 | #include <stdlib.h> | ||
| 113 | |||
| 114 | int | ||
| 115 | main () | ||
| 116 | { | ||
| 117 | unsigned int major, minor, micro; | ||
| 118 | |||
| 119 | fclose (fopen ("conf.glibtest", "w")); | ||
| 120 | |||
| 121 | if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, µ) != 3) { | ||
| 122 | printf("%s, bad version string\n", "$min_glib_version"); | ||
| 123 | exit(1); | ||
| 124 | } | ||
| 125 | |||
| 126 | if ((glib_major_version != $glib_config_major_version) || | ||
| 127 | (glib_minor_version != $glib_config_minor_version) || | ||
| 128 | (glib_micro_version != $glib_config_micro_version)) | ||
| 129 | { | ||
| 130 | printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", | ||
| 131 | $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, | ||
| 132 | glib_major_version, glib_minor_version, glib_micro_version); | ||
| 133 | printf ("*** was found! If pkg-config was correct, then it is best\n"); | ||
| 134 | printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); | ||
| 135 | printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); | ||
| 136 | printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); | ||
| 137 | printf("*** required on your system.\n"); | ||
| 138 | printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); | ||
| 139 | printf("*** to point to the correct configuration files\n"); | ||
| 140 | } | ||
| 141 | else if ((glib_major_version != GLIB_MAJOR_VERSION) || | ||
| 142 | (glib_minor_version != GLIB_MINOR_VERSION) || | ||
| 143 | (glib_micro_version != GLIB_MICRO_VERSION)) | ||
| 144 | { | ||
| 145 | printf("*** GLIB header files (version %d.%d.%d) do not match\n", | ||
| 146 | GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); | ||
| 147 | printf("*** library (version %d.%d.%d)\n", | ||
| 148 | glib_major_version, glib_minor_version, glib_micro_version); | ||
| 149 | } | ||
| 150 | else | ||
| 151 | { | ||
| 152 | if ((glib_major_version > major) || | ||
| 153 | ((glib_major_version == major) && (glib_minor_version > minor)) || | ||
| 154 | ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) | ||
| 155 | { | ||
| 156 | return 0; | ||
| 157 | } | ||
| 158 | else | ||
| 159 | { | ||
| 160 | printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n", | ||
| 161 | glib_major_version, glib_minor_version, glib_micro_version); | ||
| 162 | printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n", | ||
| 163 | major, minor, micro); | ||
| 164 | printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); | ||
| 165 | printf("***\n"); | ||
| 166 | printf("*** If you have already installed a sufficiently new version, this error\n"); | ||
| 167 | printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); | ||
| 168 | printf("*** being found. The easiest way to fix this is to remove the old version\n"); | ||
| 169 | printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); | ||
| 170 | printf("*** correct copy of pkg-config. (In this case, you will have to\n"); | ||
| 171 | printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); | ||
| 172 | printf("*** so that the correct libraries are found at run-time))\n"); | ||
| 173 | } | ||
| 174 | } | ||
| 175 | return 1; | ||
| 176 | } | ||
| 177 | ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | ||
| 178 | CFLAGS="$ac_save_CFLAGS" | ||
| 179 | LIBS="$ac_save_LIBS" | ||
| 180 | fi | ||
| 181 | fi | ||
| 182 | if test "x$no_glib" = x ; then | ||
| 183 | AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) | ||
| 184 | ifelse([$2], , :, [$2]) | ||
| 185 | else | ||
| 186 | AC_MSG_RESULT(no) | ||
| 187 | if test "$PKG_CONFIG" = "no" ; then | ||
| 188 | echo "*** A new enough version of pkg-config was not found." | ||
| 189 | echo "*** See http://www.freedesktop.org/software/pkgconfig/" | ||
| 190 | else | ||
| 191 | if test -f conf.glibtest ; then | ||
| 192 | : | ||
| 193 | else | ||
| 194 | echo "*** Could not run GLIB test program, checking why..." | ||
| 195 | ac_save_CFLAGS="$CFLAGS" | ||
| 196 | ac_save_LIBS="$LIBS" | ||
| 197 | CFLAGS="$CFLAGS $GLIB_CFLAGS" | ||
| 198 | LIBS="$LIBS $GLIB_LIBS" | ||
| 199 | AC_TRY_LINK([ | ||
| 200 | #include <glib.h> | ||
| 201 | #include <stdio.h> | ||
| 202 | ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], | ||
| 203 | [ echo "*** The test program compiled, but did not run. This usually means" | ||
| 204 | echo "*** that the run-time linker is not finding GLIB or finding the wrong" | ||
| 205 | echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" | ||
| 206 | echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | ||
| 207 | echo "*** to the installed location Also, make sure you have run ldconfig if that" | ||
| 208 | echo "*** is required on your system" | ||
| 209 | echo "***" | ||
| 210 | echo "*** If you have an old version installed, it is best to remove it, although" | ||
| 211 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], | ||
| 212 | [ echo "*** The test program failed to compile or link. See the file config.log for the" | ||
| 213 | echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) | ||
| 214 | CFLAGS="$ac_save_CFLAGS" | ||
| 215 | LIBS="$ac_save_LIBS" | ||
| 216 | fi | ||
| 217 | fi | ||
| 218 | GLIB_CFLAGS="" | ||
| 219 | GLIB_LIBS="" | ||
| 220 | GLIB_GENMARSHAL="" | ||
| 221 | GOBJECT_QUERY="" | ||
| 222 | GLIB_MKENUMS="" | ||
| 223 | GLIB_COMPILE_RESOURCES="" | ||
| 224 | ifelse([$3], , :, [$3]) | ||
| 225 | fi | ||
| 226 | AC_SUBST(GLIB_CFLAGS) | ||
| 227 | AC_SUBST(GLIB_LIBS) | ||
| 228 | AC_SUBST(GLIB_GENMARSHAL) | ||
| 229 | AC_SUBST(GOBJECT_QUERY) | ||
| 230 | AC_SUBST(GLIB_MKENUMS) | ||
| 231 | AC_SUBST(GLIB_COMPILE_RESOURCES) | ||
| 232 | rm -f conf.glibtest | ||
| 233 | ]) | ||
| 234 | |||
| 235 | # Copyright (C) 1995-2002 Free Software Foundation, Inc. | ||
| 236 | # Copyright (C) 2001-2003,2004 Red Hat, Inc. | ||
| 237 | # | ||
| 238 | # This file is free software, distributed under the terms of the GNU | ||
| 239 | # General Public License. As a special exception to the GNU General | ||
| 240 | # Public License, this file may be distributed as part of a program | ||
| 241 | # that contains a configuration script generated by Autoconf, under | ||
| 242 | # the same distribution terms as the rest of that program. | ||
| 243 | # | ||
| 244 | # This file can be copied and used freely without restrictions. It can | ||
| 245 | # be used in projects which are not available under the GNU Public License | ||
| 246 | # but which still want to provide support for the GNU gettext functionality. | ||
| 247 | # | ||
| 248 | # Macro to add for using GNU gettext. | ||
| 249 | # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996 | ||
| 250 | # | ||
| 251 | # Modified to never use included libintl. | ||
| 252 | # Owen Taylor <otaylor@redhat.com>, 12/15/1998 | ||
| 253 | # | ||
| 254 | # Major rework to remove unused code | ||
| 255 | # Owen Taylor <otaylor@redhat.com>, 12/11/2002 | ||
| 256 | # | ||
| 257 | # Added better handling of ALL_LINGUAS from GNU gettext version | ||
| 258 | # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002 | ||
| 259 | # | ||
| 260 | # Modified to require ngettext | ||
| 261 | # Matthias Clasen <mclasen@redhat.com> 08/06/2004 | ||
| 262 | # | ||
| 263 | # We need this here as well, since someone might use autoconf-2.5x | ||
| 264 | # to configure GLib then an older version to configure a package | ||
| 265 | # using AM_GLIB_GNU_GETTEXT | ||
| 266 | AC_PREREQ(2.53) | ||
| 267 | |||
| 268 | dnl | ||
| 269 | dnl We go to great lengths to make sure that aclocal won't | ||
| 270 | dnl try to pull in the installed version of these macros | ||
| 271 | dnl when running aclocal in the glib directory. | ||
| 272 | dnl | ||
| 273 | m4_copy([AC_DEFUN],[glib_DEFUN]) | ||
| 274 | m4_copy([AC_REQUIRE],[glib_REQUIRE]) | ||
| 275 | dnl | ||
| 276 | dnl At the end, if we're not within glib, we'll define the public | ||
| 277 | dnl definitions in terms of our private definitions. | ||
| 278 | dnl | ||
| 279 | |||
| 280 | # GLIB_LC_MESSAGES | ||
| 281 | #-------------------- | ||
| 282 | glib_DEFUN([GLIB_LC_MESSAGES], | ||
| 283 | [AC_CHECK_HEADERS([locale.h]) | ||
| 284 | if test $ac_cv_header_locale_h = yes; then | ||
| 285 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, | ||
| 286 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], | ||
| 287 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) | ||
| 288 | if test $am_cv_val_LC_MESSAGES = yes; then | ||
| 289 | AC_DEFINE(HAVE_LC_MESSAGES, 1, | ||
| 290 | [Define if your <locale.h> file defines LC_MESSAGES.]) | ||
| 291 | fi | ||
| 292 | fi]) | ||
| 293 | |||
| 294 | # GLIB_PATH_PROG_WITH_TEST | ||
| 295 | #---------------------------- | ||
| 296 | dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, | ||
| 297 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) | ||
| 298 | glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], | ||
| 299 | [# Extract the first word of "$2", so it can be a program name with args. | ||
| 300 | set dummy $2; ac_word=[$]2 | ||
| 301 | AC_MSG_CHECKING([for $ac_word]) | ||
| 302 | AC_CACHE_VAL(ac_cv_path_$1, | ||
| 303 | [case "[$]$1" in | ||
| 304 | /*) | ||
| 305 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. | ||
| 306 | ;; | ||
| 307 | *) | ||
| 308 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | ||
| 309 | for ac_dir in ifelse([$5], , $PATH, [$5]); do | ||
| 310 | test -z "$ac_dir" && ac_dir=. | ||
| 311 | if test -f $ac_dir/$ac_word; then | ||
| 312 | if [$3]; then | ||
| 313 | ac_cv_path_$1="$ac_dir/$ac_word" | ||
| 314 | break | ||
| 315 | fi | ||
| 316 | fi | ||
| 317 | done | ||
| 318 | IFS="$ac_save_ifs" | ||
| 319 | dnl If no 4th arg is given, leave the cache variable unset, | ||
| 320 | dnl so AC_PATH_PROGS will keep looking. | ||
| 321 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" | ||
| 322 | ])dnl | ||
| 323 | ;; | ||
| 324 | esac])dnl | ||
| 325 | $1="$ac_cv_path_$1" | ||
| 326 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then | ||
| 327 | AC_MSG_RESULT([$]$1) | ||
| 328 | else | ||
| 329 | AC_MSG_RESULT(no) | ||
| 330 | fi | ||
| 331 | AC_SUBST($1)dnl | ||
| 332 | ]) | ||
| 333 | |||
| 334 | # GLIB_WITH_NLS | ||
| 335 | #----------------- | ||
| 336 | glib_DEFUN([GLIB_WITH_NLS], | ||
| 337 | dnl NLS is obligatory | ||
| 338 | [USE_NLS=yes | ||
| 339 | AC_SUBST(USE_NLS) | ||
| 340 | |||
| 341 | gt_cv_have_gettext=no | ||
| 342 | |||
| 343 | CATOBJEXT=NONE | ||
| 344 | XGETTEXT=: | ||
| 345 | INTLLIBS= | ||
| 346 | |||
| 347 | AC_CHECK_HEADER(libintl.h, | ||
| 348 | [gt_cv_func_dgettext_libintl="no" | ||
| 349 | libintl_extra_libs="" | ||
| 350 | |||
| 351 | # | ||
| 352 | # First check in libc | ||
| 353 | # | ||
| 354 | AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, | ||
| 355 | [AC_TRY_LINK([ | ||
| 356 | #include <libintl.h> | ||
| 357 | ], | ||
| 358 | [return !ngettext ("","", 1)], | ||
| 359 | gt_cv_func_ngettext_libc=yes, | ||
| 360 | gt_cv_func_ngettext_libc=no) | ||
| 361 | ]) | ||
| 362 | |||
| 363 | if test "$gt_cv_func_ngettext_libc" = "yes" ; then | ||
| 364 | AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, | ||
| 365 | [AC_TRY_LINK([ | ||
| 366 | #include <libintl.h> | ||
| 367 | ], | ||
| 368 | [return !dgettext ("","")], | ||
| 369 | gt_cv_func_dgettext_libc=yes, | ||
| 370 | gt_cv_func_dgettext_libc=no) | ||
| 371 | ]) | ||
| 372 | fi | ||
| 373 | |||
| 374 | if test "$gt_cv_func_ngettext_libc" = "yes" ; then | ||
| 375 | AC_CHECK_FUNCS(bind_textdomain_codeset) | ||
| 376 | fi | ||
| 377 | |||
| 378 | # | ||
| 379 | # If we don't have everything we want, check in libintl | ||
| 380 | # | ||
| 381 | if test "$gt_cv_func_dgettext_libc" != "yes" \ | ||
| 382 | || test "$gt_cv_func_ngettext_libc" != "yes" \ | ||
| 383 | || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then | ||
| 384 | |||
| 385 | AC_CHECK_LIB(intl, bindtextdomain, | ||
| 386 | [AC_CHECK_LIB(intl, ngettext, | ||
| 387 | [AC_CHECK_LIB(intl, dgettext, | ||
| 388 | gt_cv_func_dgettext_libintl=yes)])]) | ||
| 389 | |||
| 390 | if test "$gt_cv_func_dgettext_libintl" != "yes" ; then | ||
| 391 | AC_MSG_CHECKING([if -liconv is needed to use gettext]) | ||
| 392 | AC_MSG_RESULT([]) | ||
| 393 | AC_CHECK_LIB(intl, ngettext, | ||
| 394 | [AC_CHECK_LIB(intl, dcgettext, | ||
| 395 | [gt_cv_func_dgettext_libintl=yes | ||
| 396 | libintl_extra_libs=-liconv], | ||
| 397 | :,-liconv)], | ||
| 398 | :,-liconv) | ||
| 399 | fi | ||
| 400 | |||
| 401 | # | ||
| 402 | # If we found libintl, then check in it for bind_textdomain_codeset(); | ||
| 403 | # we'll prefer libc if neither have bind_textdomain_codeset(), | ||
| 404 | # and both have dgettext and ngettext | ||
| 405 | # | ||
| 406 | if test "$gt_cv_func_dgettext_libintl" = "yes" ; then | ||
| 407 | glib_save_LIBS="$LIBS" | ||
| 408 | LIBS="$LIBS -lintl $libintl_extra_libs" | ||
| 409 | unset ac_cv_func_bind_textdomain_codeset | ||
| 410 | AC_CHECK_FUNCS(bind_textdomain_codeset) | ||
| 411 | LIBS="$glib_save_LIBS" | ||
| 412 | |||
| 413 | if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then | ||
| 414 | gt_cv_func_dgettext_libc=no | ||
| 415 | else | ||
| 416 | if test "$gt_cv_func_dgettext_libc" = "yes" \ | ||
| 417 | && test "$gt_cv_func_ngettext_libc" = "yes"; then | ||
| 418 | gt_cv_func_dgettext_libintl=no | ||
| 419 | fi | ||
| 420 | fi | ||
| 421 | fi | ||
| 422 | fi | ||
| 423 | |||
| 424 | if test "$gt_cv_func_dgettext_libc" = "yes" \ | ||
| 425 | || test "$gt_cv_func_dgettext_libintl" = "yes"; then | ||
| 426 | gt_cv_have_gettext=yes | ||
| 427 | fi | ||
| 428 | |||
| 429 | if test "$gt_cv_func_dgettext_libintl" = "yes"; then | ||
| 430 | INTLLIBS="-lintl $libintl_extra_libs" | ||
| 431 | fi | ||
| 432 | |||
| 433 | if test "$gt_cv_have_gettext" = "yes"; then | ||
| 434 | AC_DEFINE(HAVE_GETTEXT,1, | ||
| 435 | [Define if the GNU gettext() function is already present or preinstalled.]) | ||
| 436 | GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, | ||
| 437 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl | ||
| 438 | if test "$MSGFMT" != "no"; then | ||
| 439 | glib_save_LIBS="$LIBS" | ||
| 440 | LIBS="$LIBS $INTLLIBS" | ||
| 441 | AC_CHECK_FUNCS(dcgettext) | ||
| 442 | MSGFMT_OPTS= | ||
| 443 | AC_MSG_CHECKING([if msgfmt accepts -c]) | ||
| 444 | GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ | ||
| 445 | msgid "" | ||
| 446 | msgstr "" | ||
| 447 | "Content-Type: text/plain; charset=UTF-8\n" | ||
| 448 | "Project-Id-Version: test 1.0\n" | ||
| 449 | "PO-Revision-Date: 2007-02-15 12:01+0100\n" | ||
| 450 | "Last-Translator: test <foo@bar.xx>\n" | ||
| 451 | "Language-Team: C <LL@li.org>\n" | ||
| 452 | "MIME-Version: 1.0\n" | ||
| 453 | "Content-Transfer-Encoding: 8bit\n" | ||
| 454 | ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) | ||
| 455 | AC_SUBST(MSGFMT_OPTS) | ||
| 456 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) | ||
| 457 | GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, | ||
| 458 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) | ||
| 459 | AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; | ||
| 460 | return _nl_msg_cat_cntr], | ||
| 461 | [CATOBJEXT=.gmo | ||
| 462 | DATADIRNAME=share], | ||
| 463 | [case $host in | ||
| 464 | *-*-solaris*) | ||
| 465 | dnl On Solaris, if bind_textdomain_codeset is in libc, | ||
| 466 | dnl GNU format message catalog is always supported, | ||
| 467 | dnl since both are added to the libc all together. | ||
| 468 | dnl Hence, we'd like to go with DATADIRNAME=share and | ||
| 469 | dnl and CATOBJEXT=.gmo in this case. | ||
| 470 | AC_CHECK_FUNC(bind_textdomain_codeset, | ||
| 471 | [CATOBJEXT=.gmo | ||
| 472 | DATADIRNAME=share], | ||
| 473 | [CATOBJEXT=.mo | ||
| 474 | DATADIRNAME=lib]) | ||
| 475 | ;; | ||
| 476 | *-*-openbsd*) | ||
| 477 | CATOBJEXT=.mo | ||
| 478 | DATADIRNAME=share | ||
| 479 | ;; | ||
| 480 | *) | ||
| 481 | CATOBJEXT=.mo | ||
| 482 | DATADIRNAME=lib | ||
| 483 | ;; | ||
| 484 | esac]) | ||
| 485 | LIBS="$glib_save_LIBS" | ||
| 486 | INSTOBJEXT=.mo | ||
| 487 | else | ||
| 488 | gt_cv_have_gettext=no | ||
| 489 | fi | ||
| 490 | fi | ||
| 491 | ]) | ||
| 492 | |||
| 493 | if test "$gt_cv_have_gettext" = "yes" ; then | ||
| 494 | AC_DEFINE(ENABLE_NLS, 1, | ||
| 495 | [always defined to indicate that i18n is enabled]) | ||
| 496 | fi | ||
| 497 | |||
| 498 | dnl Test whether we really found GNU xgettext. | ||
| 499 | if test "$XGETTEXT" != ":"; then | ||
| 500 | dnl If it is not GNU xgettext we define it as : so that the | ||
| 501 | dnl Makefiles still can work. | ||
| 502 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | ||
| 503 | : ; | ||
| 504 | else | ||
| 505 | AC_MSG_RESULT( | ||
| 506 | [found xgettext program is not GNU xgettext; ignore it]) | ||
| 507 | XGETTEXT=":" | ||
| 508 | fi | ||
| 509 | fi | ||
| 510 | |||
| 511 | # We need to process the po/ directory. | ||
| 512 | POSUB=po | ||
| 513 | |||
| 514 | AC_OUTPUT_COMMANDS( | ||
| 515 | [case "$CONFIG_FILES" in *po/Makefile.in*) | ||
| 516 | sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile | ||
| 517 | esac]) | ||
| 518 | |||
| 519 | dnl These rules are solely for the distribution goal. While doing this | ||
| 520 | dnl we only have to keep exactly one list of the available catalogs | ||
| 521 | dnl in configure.ac. | ||
| 522 | for lang in $ALL_LINGUAS; do | ||
| 523 | GMOFILES="$GMOFILES $lang.gmo" | ||
| 524 | POFILES="$POFILES $lang.po" | ||
| 525 | done | ||
| 526 | |||
| 527 | dnl Make all variables we use known to autoconf. | ||
| 528 | AC_SUBST(CATALOGS) | ||
| 529 | AC_SUBST(CATOBJEXT) | ||
| 530 | AC_SUBST(DATADIRNAME) | ||
| 531 | AC_SUBST(GMOFILES) | ||
| 532 | AC_SUBST(INSTOBJEXT) | ||
| 533 | AC_SUBST(INTLLIBS) | ||
| 534 | AC_SUBST(PO_IN_DATADIR_TRUE) | ||
| 535 | AC_SUBST(PO_IN_DATADIR_FALSE) | ||
| 536 | AC_SUBST(POFILES) | ||
| 537 | AC_SUBST(POSUB) | ||
| 538 | ]) | ||
| 539 | |||
| 540 | # AM_GLIB_GNU_GETTEXT | ||
| 541 | # ------------------- | ||
| 542 | # Do checks necessary for use of gettext. If a suitable implementation | ||
| 543 | # of gettext is found in either in libintl or in the C library, | ||
| 544 | # it will set INTLLIBS to the libraries needed for use of gettext | ||
| 545 | # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable | ||
| 546 | # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() | ||
| 547 | # on various variables needed by the Makefile.in.in installed by | ||
| 548 | # glib-gettextize. | ||
| 549 | dnl | ||
| 550 | glib_DEFUN([GLIB_GNU_GETTEXT], | ||
| 551 | [AC_REQUIRE([AC_PROG_CC])dnl | ||
| 552 | |||
| 553 | GLIB_LC_MESSAGES | ||
| 554 | GLIB_WITH_NLS | ||
| 555 | |||
| 556 | if test "$gt_cv_have_gettext" = "yes"; then | ||
| 557 | if test "x$ALL_LINGUAS" = "x"; then | ||
| 558 | LINGUAS= | ||
| 559 | else | ||
| 560 | AC_MSG_CHECKING(for catalogs to be installed) | ||
| 561 | NEW_LINGUAS= | ||
| 562 | for presentlang in $ALL_LINGUAS; do | ||
| 563 | useit=no | ||
| 564 | if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then | ||
| 565 | desiredlanguages="$LINGUAS" | ||
| 566 | else | ||
| 567 | desiredlanguages="$ALL_LINGUAS" | ||
| 568 | fi | ||
| 569 | for desiredlang in $desiredlanguages; do | ||
| 570 | # Use the presentlang catalog if desiredlang is | ||
| 571 | # a. equal to presentlang, or | ||
| 572 | # b. a variant of presentlang (because in this case, | ||
| 573 | # presentlang can be used as a fallback for messages | ||
| 574 | # which are not translated in the desiredlang catalog). | ||
| 575 | case "$desiredlang" in | ||
| 576 | "$presentlang"*) useit=yes;; | ||
| 577 | esac | ||
| 578 | done | ||
| 579 | if test $useit = yes; then | ||
| 580 | NEW_LINGUAS="$NEW_LINGUAS $presentlang" | ||
| 581 | fi | ||
| 582 | done | ||
| 583 | LINGUAS=$NEW_LINGUAS | ||
| 584 | AC_MSG_RESULT($LINGUAS) | ||
| 585 | fi | ||
| 586 | |||
| 587 | dnl Construct list of names of catalog files to be constructed. | ||
| 588 | if test -n "$LINGUAS"; then | ||
| 589 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | ||
| 590 | fi | ||
| 591 | fi | ||
| 592 | |||
| 593 | dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly | ||
| 594 | dnl find the mkinstalldirs script in another subdir but ($top_srcdir). | ||
| 595 | dnl Try to locate is. | ||
| 596 | MKINSTALLDIRS= | ||
| 597 | if test -n "$ac_aux_dir"; then | ||
| 598 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" | ||
| 599 | fi | ||
| 600 | if test -z "$MKINSTALLDIRS"; then | ||
| 601 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" | ||
| 602 | fi | ||
| 603 | AC_SUBST(MKINSTALLDIRS) | ||
| 604 | |||
| 605 | dnl Generate list of files to be processed by xgettext which will | ||
| 606 | dnl be included in po/Makefile. | ||
| 607 | test -d po || mkdir po | ||
| 608 | if test "x$srcdir" != "x."; then | ||
| 609 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | ||
| 610 | posrcprefix="$srcdir/" | ||
| 611 | else | ||
| 612 | posrcprefix="../$srcdir/" | ||
| 613 | fi | ||
| 614 | else | ||
| 615 | posrcprefix="../" | ||
| 616 | fi | ||
| 617 | rm -f po/POTFILES | ||
| 618 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | ||
| 619 | < $srcdir/po/POTFILES.in > po/POTFILES | ||
| 620 | ]) | ||
| 621 | |||
| 622 | # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) | ||
| 623 | # ------------------------------- | ||
| 624 | # Define VARIABLE to the location where catalog files will | ||
| 625 | # be installed by po/Makefile. | ||
| 626 | glib_DEFUN([GLIB_DEFINE_LOCALEDIR], | ||
| 627 | [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl | ||
| 628 | glib_save_prefix="$prefix" | ||
| 629 | glib_save_exec_prefix="$exec_prefix" | ||
| 630 | glib_save_datarootdir="$datarootdir" | ||
| 631 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | ||
| 632 | test "x$exec_prefix" = xNONE && exec_prefix=$prefix | ||
| 633 | datarootdir=`eval echo "${datarootdir}"` | ||
| 634 | if test "x$CATOBJEXT" = "x.mo" ; then | ||
| 635 | localedir=`eval echo "${libdir}/locale"` | ||
| 636 | else | ||
| 637 | localedir=`eval echo "${datadir}/locale"` | ||
| 638 | fi | ||
| 639 | prefix="$glib_save_prefix" | ||
| 640 | exec_prefix="$glib_save_exec_prefix" | ||
| 641 | datarootdir="$glib_save_datarootdir" | ||
| 642 | AC_DEFINE_UNQUOTED($1, "$localedir", | ||
| 643 | [Define the location where the catalogs will be installed]) | ||
| 644 | ]) | ||
| 645 | |||
| 646 | dnl | ||
| 647 | dnl Now the definitions that aclocal will find | ||
| 648 | dnl | ||
| 649 | ifdef(glib_configure_ac,[],[ | ||
| 650 | AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) | ||
| 651 | AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) | ||
| 652 | ])dnl | ||
| 653 | |||
| 654 | # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) | ||
| 655 | # | ||
| 656 | # Create a temporary file with TEST-FILE as its contents and pass the | ||
| 657 | # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with | ||
| 658 | # 0 and perform ACTION-IF-FAIL for any other exit status. | ||
| 659 | AC_DEFUN([GLIB_RUN_PROG], | ||
| 660 | [cat >conftest.foo <<_ACEOF | ||
| 661 | $2 | ||
| 662 | _ACEOF | ||
| 663 | if AC_RUN_LOG([$1 conftest.foo]); then | ||
| 664 | m4_ifval([$3], [$3], [:]) | ||
| 665 | m4_ifvaln([$4], [else $4])dnl | ||
| 666 | echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD | ||
| 667 | sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD | ||
| 668 | fi]) | ||
| 669 | |||
| 670 | |||
| 671 | # gpgme.m4 - autoconf macro to detect GPGME. | ||
| 672 | # Copyright (C) 2002, 2003, 2004 g10 Code GmbH | ||
| 673 | # | ||
| 674 | # This file is free software; as a special exception the author gives | ||
| 675 | # unlimited permission to copy and/or distribute it, with or without | ||
| 676 | # modifications, as long as this notice is preserved. | ||
| 677 | # | ||
| 678 | # This file is distributed in the hope that it will be useful, but | ||
| 679 | # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the | ||
| 680 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| 681 | |||
| 682 | |||
| 683 | AC_DEFUN([_AM_PATH_GPGME_CONFIG], | ||
| 684 | [ AC_ARG_WITH(gpgme-prefix, | ||
| 685 | AC_HELP_STRING([--with-gpgme-prefix=PFX], | ||
| 686 | [prefix where GPGME is installed (optional)]), | ||
| 687 | gpgme_config_prefix="$withval", gpgme_config_prefix="") | ||
| 688 | if test "x$gpgme_config_prefix" != x ; then | ||
| 689 | GPGME_CONFIG="$gpgme_config_prefix/bin/gpgme-config" | ||
| 690 | fi | ||
| 691 | AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no) | ||
| 692 | |||
| 693 | if test "$GPGME_CONFIG" != "no" ; then | ||
| 694 | gpgme_version=`$GPGME_CONFIG --version` | ||
| 695 | fi | ||
| 696 | gpgme_version_major=`echo $gpgme_version | \ | ||
| 697 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` | ||
| 698 | gpgme_version_minor=`echo $gpgme_version | \ | ||
| 699 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` | ||
| 700 | gpgme_version_micro=`echo $gpgme_version | \ | ||
| 701 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` | ||
| 702 | ]) | ||
| 703 | |||
| 704 | dnl AM_PATH_GPGME([MINIMUM-VERSION, | ||
| 705 | dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) | ||
| 706 | dnl Test for libgpgme and define GPGME_CFLAGS and GPGME_LIBS. | ||
| 707 | dnl | ||
| 708 | AC_DEFUN([AM_PATH_GPGME], | ||
| 709 | [ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl | ||
| 710 | tmp=ifelse([$1], ,1:0.4.2,$1) | ||
| 711 | if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then | ||
| 712 | req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` | ||
| 713 | min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` | ||
| 714 | else | ||
| 715 | req_gpgme_api=0 | ||
| 716 | min_gpgme_version="$tmp" | ||
| 717 | fi | ||
| 718 | |||
| 719 | AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version) | ||
| 720 | ok=no | ||
| 721 | if test "$GPGME_CONFIG" != "no" ; then | ||
| 722 | req_major=`echo $min_gpgme_version | \ | ||
| 723 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` | ||
| 724 | req_minor=`echo $min_gpgme_version | \ | ||
| 725 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` | ||
| 726 | req_micro=`echo $min_gpgme_version | \ | ||
| 727 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` | ||
| 728 | if test "$gpgme_version_major" -gt "$req_major"; then | ||
| 729 | ok=yes | ||
| 730 | else | ||
| 731 | if test "$gpgme_version_major" -eq "$req_major"; then | ||
| 732 | if test "$gpgme_version_minor" -gt "$req_minor"; then | ||
| 733 | ok=yes | ||
| 734 | else | ||
| 735 | if test "$gpgme_version_minor" -eq "$req_minor"; then | ||
| 736 | if test "$gpgme_version_micro" -ge "$req_micro"; then | ||
| 737 | ok=yes | ||
| 738 | fi | ||
| 739 | fi | ||
| 740 | fi | ||
| 741 | fi | ||
| 742 | fi | ||
| 743 | fi | ||
| 744 | if test $ok = yes; then | ||
| 745 | # If we have a recent GPGME, we should also check that the | ||
| 746 | # API is compatible. | ||
| 747 | if test "$req_gpgme_api" -gt 0 ; then | ||
| 748 | tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` | ||
| 749 | if test "$tmp" -gt 0 ; then | ||
| 750 | if test "$req_gpgme_api" -ne "$tmp" ; then | ||
| 751 | ok=no | ||
| 752 | fi | ||
| 753 | fi | ||
| 754 | fi | ||
| 755 | fi | ||
| 756 | if test $ok = yes; then | ||
| 757 | GPGME_CFLAGS=`$GPGME_CONFIG --cflags` | ||
| 758 | GPGME_LIBS=`$GPGME_CONFIG --libs` | ||
| 759 | AC_MSG_RESULT(yes) | ||
| 760 | ifelse([$2], , :, [$2]) | ||
| 761 | else | ||
| 762 | GPGME_CFLAGS="" | ||
| 763 | GPGME_LIBS="" | ||
| 764 | AC_MSG_RESULT(no) | ||
| 765 | ifelse([$3], , :, [$3]) | ||
| 766 | fi | ||
| 767 | AC_SUBST(GPGME_CFLAGS) | ||
| 768 | AC_SUBST(GPGME_LIBS) | ||
| 769 | ]) | ||
| 770 | |||
| 771 | dnl AM_PATH_GPGME_PTHREAD([MINIMUM-VERSION, | ||
| 772 | dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) | ||
| 773 | dnl Test for libgpgme and define GPGME_PTHREAD_CFLAGS | ||
| 774 | dnl and GPGME_PTHREAD_LIBS. | ||
| 775 | dnl | ||
| 776 | AC_DEFUN([AM_PATH_GPGME_PTHREAD], | ||
| 777 | [ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl | ||
| 778 | tmp=ifelse([$1], ,1:0.4.2,$1) | ||
| 779 | if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then | ||
| 780 | req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` | ||
| 781 | min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` | ||
| 782 | else | ||
| 783 | req_gpgme_api=0 | ||
| 784 | min_gpgme_version="$tmp" | ||
| 785 | fi | ||
| 786 | |||
| 787 | AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version) | ||
| 788 | ok=no | ||
| 789 | if test "$GPGME_CONFIG" != "no" ; then | ||
| 790 | if `$GPGME_CONFIG --thread=pthread 2> /dev/null` ; then | ||
| 791 | req_major=`echo $min_gpgme_version | \ | ||
| 792 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` | ||
| 793 | req_minor=`echo $min_gpgme_version | \ | ||
| 794 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` | ||
| 795 | req_micro=`echo $min_gpgme_version | \ | ||
| 796 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` | ||
| 797 | if test "$gpgme_version_major" -gt "$req_major"; then | ||
| 798 | ok=yes | ||
| 799 | else | ||
| 800 | if test "$gpgme_version_major" -eq "$req_major"; then | ||
| 801 | if test "$gpgme_version_minor" -gt "$req_minor"; then | ||
| 802 | ok=yes | ||
| 803 | else | ||
| 804 | if test "$gpgme_version_minor" -eq "$req_minor"; then | ||
| 805 | if test "$gpgme_version_micro" -ge "$req_micro"; then | ||
| 806 | ok=yes | ||
| 807 | fi | ||
| 808 | fi | ||
| 809 | fi | ||
| 810 | fi | ||
| 811 | fi | ||
| 812 | fi | ||
| 813 | fi | ||
| 814 | if test $ok = yes; then | ||
| 815 | # If we have a recent GPGME, we should also check that the | ||
| 816 | # API is compatible. | ||
| 817 | if test "$req_gpgme_api" -gt 0 ; then | ||
| 818 | tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` | ||
| 819 | if test "$tmp" -gt 0 ; then | ||
| 820 | if test "$req_gpgme_api" -ne "$tmp" ; then | ||
| 821 | ok=no | ||
| 822 | fi | ||
| 823 | fi | ||
| 824 | fi | ||
| 825 | fi | ||
| 826 | if test $ok = yes; then | ||
| 827 | GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --thread=pthread --cflags` | ||
| 828 | GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs` | ||
| 829 | AC_MSG_RESULT(yes) | ||
| 830 | ifelse([$2], , :, [$2]) | ||
| 831 | else | ||
| 832 | GPGME_PTHREAD_CFLAGS="" | ||
| 833 | GPGME_PTHREAD_LIBS="" | ||
| 834 | AC_MSG_RESULT(no) | ||
| 835 | ifelse([$3], , :, [$3]) | ||
| 836 | fi | ||
| 837 | AC_SUBST(GPGME_PTHREAD_CFLAGS) | ||
| 838 | AC_SUBST(GPGME_PTHREAD_LIBS) | ||
| 839 | ]) | ||
| 840 | |||
| 841 | |||
| 842 | dnl AM_PATH_GPGME_GLIB([MINIMUM-VERSION, | ||
| 843 | dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) | ||
| 844 | dnl Test for libgpgme-glib and define GPGME_GLIB_CFLAGS and GPGME_GLIB_LIBS. | ||
| 845 | dnl | ||
| 846 | AC_DEFUN([AM_PATH_GPGME_GLIB], | ||
| 847 | [ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl | ||
| 848 | tmp=ifelse([$1], ,1:0.4.2,$1) | ||
| 849 | if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then | ||
| 850 | req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` | ||
| 851 | min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` | ||
| 852 | else | ||
| 853 | req_gpgme_api=0 | ||
| 854 | min_gpgme_version="$tmp" | ||
| 855 | fi | ||
| 856 | |||
| 857 | AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version) | ||
| 858 | ok=no | ||
| 859 | if test "$GPGME_CONFIG" != "no" ; then | ||
| 860 | req_major=`echo $min_gpgme_version | \ | ||
| 861 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` | ||
| 862 | req_minor=`echo $min_gpgme_version | \ | ||
| 863 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` | ||
| 864 | req_micro=`echo $min_gpgme_version | \ | ||
| 865 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` | ||
| 866 | if test "$gpgme_version_major" -gt "$req_major"; then | ||
| 867 | ok=yes | ||
| 868 | else | ||
| 869 | if test "$gpgme_version_major" -eq "$req_major"; then | ||
| 870 | if test "$gpgme_version_minor" -gt "$req_minor"; then | ||
| 871 | ok=yes | ||
| 872 | else | ||
| 873 | if test "$gpgme_version_minor" -eq "$req_minor"; then | ||
| 874 | if test "$gpgme_version_micro" -ge "$req_micro"; then | ||
| 875 | ok=yes | ||
| 876 | fi | ||
| 877 | fi | ||
| 878 | fi | ||
| 879 | fi | ||
| 880 | fi | ||
| 881 | fi | ||
| 882 | if test $ok = yes; then | ||
| 883 | # If we have a recent GPGME, we should also check that the | ||
| 884 | # API is compatible. | ||
| 885 | if test "$req_gpgme_api" -gt 0 ; then | ||
| 886 | tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` | ||
| 887 | if test "$tmp" -gt 0 ; then | ||
| 888 | if test "$req_gpgme_api" -ne "$tmp" ; then | ||
| 889 | ok=no | ||
| 890 | fi | ||
| 891 | fi | ||
| 892 | fi | ||
| 893 | fi | ||
| 894 | if test $ok = yes; then | ||
| 895 | GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags` | ||
| 896 | GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs` | ||
| 897 | AC_MSG_RESULT(yes) | ||
| 898 | ifelse([$2], , :, [$2]) | ||
| 899 | else | ||
| 900 | GPGME_GLIB_CFLAGS="" | ||
| 901 | GPGME_GLIB_LIBS="" | ||
| 902 | AC_MSG_RESULT(no) | ||
| 903 | ifelse([$3], , :, [$3]) | ||
| 904 | fi | ||
| 905 | AC_SUBST(GPGME_GLIB_CFLAGS) | ||
| 906 | AC_SUBST(GPGME_GLIB_LIBS) | ||
| 907 | ]) | ||
| 908 | |||
| 909 | |||
| 910 | # Configure paths for GTK+ | ||
| 911 | # Owen Taylor 1997-2001 | ||
| 912 | |||
| 913 | dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) | ||
| 914 | dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, | ||
| 915 | dnl pass to pkg-config | ||
| 916 | dnl | ||
| 917 | AC_DEFUN([AM_PATH_GTK_2_0], | ||
| 918 | [dnl | ||
| 919 | dnl Get the cflags and libraries from pkg-config | ||
| 920 | dnl | ||
| 921 | AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], | ||
| 922 | , enable_gtktest=yes) | ||
| 923 | |||
| 924 | pkg_config_args=gtk+-2.0 | ||
| 925 | for module in . $4 | ||
| 926 | do | ||
| 927 | case "$module" in | ||
| 928 | gthread) | ||
| 929 | pkg_config_args="$pkg_config_args gthread-2.0" | ||
| 930 | ;; | ||
| 931 | esac | ||
| 932 | done | ||
| 933 | |||
| 934 | no_gtk="" | ||
| 935 | |||
| 936 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) | ||
| 937 | |||
| 938 | if test x$PKG_CONFIG != xno ; then | ||
| 939 | if pkg-config --atleast-pkgconfig-version 0.7 ; then | ||
| 940 | : | ||
| 941 | else | ||
| 942 | echo "*** pkg-config too old; version 0.7 or better required." | ||
| 943 | no_gtk=yes | ||
| 944 | PKG_CONFIG=no | ||
| 945 | fi | ||
| 946 | else | ||
| 947 | no_gtk=yes | ||
| 948 | fi | ||
| 949 | |||
| 950 | min_gtk_version=ifelse([$1], ,2.0.0,$1) | ||
| 951 | AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) | ||
| 952 | |||
| 953 | if test x$PKG_CONFIG != xno ; then | ||
| 954 | ## don't try to run the test against uninstalled libtool libs | ||
| 955 | if $PKG_CONFIG --uninstalled $pkg_config_args; then | ||
| 956 | echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" | ||
| 957 | enable_gtktest=no | ||
| 958 | fi | ||
| 959 | |||
| 960 | if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then | ||
| 961 | : | ||
| 962 | else | ||
| 963 | no_gtk=yes | ||
| 964 | fi | ||
| 965 | fi | ||
| 966 | |||
| 967 | if test x"$no_gtk" = x ; then | ||
| 968 | GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` | ||
| 969 | GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` | ||
| 970 | gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ | ||
| 971 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | ||
| 972 | gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ | ||
| 973 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | ||
| 974 | gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ | ||
| 975 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | ||
| 976 | if test "x$enable_gtktest" = "xyes" ; then | ||
| 977 | ac_save_CFLAGS="$CFLAGS" | ||
| 978 | ac_save_LIBS="$LIBS" | ||
| 979 | CFLAGS="$CFLAGS $GTK_CFLAGS" | ||
| 980 | LIBS="$GTK_LIBS $LIBS" | ||
| 981 | dnl | ||
| 982 | dnl Now check if the installed GTK+ is sufficiently new. (Also sanity | ||
| 983 | dnl checks the results of pkg-config to some extent) | ||
| 984 | dnl | ||
| 985 | rm -f conf.gtktest | ||
| 986 | AC_TRY_RUN([ | ||
| 987 | #include <gtk/gtk.h> | ||
| 988 | #include <stdio.h> | ||
| 989 | #include <stdlib.h> | ||
| 990 | |||
| 991 | int | ||
| 992 | main () | ||
| 993 | { | ||
| 994 | int major, minor, micro; | ||
| 995 | char *tmp_version; | ||
| 996 | |||
| 997 | fclose (fopen ("conf.gtktest", "w")); | ||
| 998 | |||
| 999 | /* HP/UX 9 (%@#!) writes to sscanf strings */ | ||
| 1000 | tmp_version = g_strdup("$min_gtk_version"); | ||
| 1001 | if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | ||
| 1002 | printf("%s, bad version string\n", "$min_gtk_version"); | ||
| 1003 | exit(1); | ||
| 1004 | } | ||
| 1005 | |||
| 1006 | if ((gtk_major_version != $gtk_config_major_version) || | ||
| 1007 | (gtk_minor_version != $gtk_config_minor_version) || | ||
| 1008 | (gtk_micro_version != $gtk_config_micro_version)) | ||
| 1009 | { | ||
| 1010 | printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", | ||
| 1011 | $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, | ||
| 1012 | gtk_major_version, gtk_minor_version, gtk_micro_version); | ||
| 1013 | printf ("*** was found! If pkg-config was correct, then it is best\n"); | ||
| 1014 | printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); | ||
| 1015 | printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); | ||
| 1016 | printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); | ||
| 1017 | printf("*** required on your system.\n"); | ||
| 1018 | printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); | ||
| 1019 | printf("*** to point to the correct configuration files\n"); | ||
| 1020 | } | ||
| 1021 | else if ((gtk_major_version != GTK_MAJOR_VERSION) || | ||
| 1022 | (gtk_minor_version != GTK_MINOR_VERSION) || | ||
| 1023 | (gtk_micro_version != GTK_MICRO_VERSION)) | ||
| 1024 | { | ||
| 1025 | printf("*** GTK+ header files (version %d.%d.%d) do not match\n", | ||
| 1026 | GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); | ||
| 1027 | printf("*** library (version %d.%d.%d)\n", | ||
| 1028 | gtk_major_version, gtk_minor_version, gtk_micro_version); | ||
| 1029 | } | ||
| 1030 | else | ||
| 1031 | { | ||
| 1032 | if ((gtk_major_version > major) || | ||
| 1033 | ((gtk_major_version == major) && (gtk_minor_version > minor)) || | ||
| 1034 | ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) | ||
| 1035 | { | ||
| 1036 | return 0; | ||
| 1037 | } | ||
| 1038 | else | ||
| 1039 | { | ||
| 1040 | printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", | ||
| 1041 | gtk_major_version, gtk_minor_version, gtk_micro_version); | ||
| 1042 | printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", | ||
| 1043 | major, minor, micro); | ||
| 1044 | printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); | ||
| 1045 | printf("***\n"); | ||
| 1046 | printf("*** If you have already installed a sufficiently new version, this error\n"); | ||
| 1047 | printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); | ||
| 1048 | printf("*** being found. The easiest way to fix this is to remove the old version\n"); | ||
| 1049 | printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); | ||
| 1050 | printf("*** correct copy of pkg-config. (In this case, you will have to\n"); | ||
| 1051 | printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); | ||
| 1052 | printf("*** so that the correct libraries are found at run-time))\n"); | ||
| 1053 | } | ||
| 1054 | } | ||
| 1055 | return 1; | ||
| 1056 | } | ||
| 1057 | ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | ||
| 1058 | CFLAGS="$ac_save_CFLAGS" | ||
| 1059 | LIBS="$ac_save_LIBS" | ||
| 1060 | fi | ||
| 1061 | fi | ||
| 1062 | if test "x$no_gtk" = x ; then | ||
| 1063 | AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)) | ||
| 1064 | ifelse([$2], , :, [$2]) | ||
| 1065 | else | ||
| 1066 | AC_MSG_RESULT(no) | ||
| 1067 | if test "$PKG_CONFIG" = "no" ; then | ||
| 1068 | echo "*** A new enough version of pkg-config was not found." | ||
| 1069 | echo "*** See http://pkgconfig.sourceforge.net" | ||
| 1070 | else | ||
| 1071 | if test -f conf.gtktest ; then | ||
| 1072 | : | ||
| 1073 | else | ||
| 1074 | echo "*** Could not run GTK+ test program, checking why..." | ||
| 1075 | ac_save_CFLAGS="$CFLAGS" | ||
| 1076 | ac_save_LIBS="$LIBS" | ||
| 1077 | CFLAGS="$CFLAGS $GTK_CFLAGS" | ||
| 1078 | LIBS="$LIBS $GTK_LIBS" | ||
| 1079 | AC_TRY_LINK([ | ||
| 1080 | #include <gtk/gtk.h> | ||
| 1081 | #include <stdio.h> | ||
| 1082 | ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], | ||
| 1083 | [ echo "*** The test program compiled, but did not run. This usually means" | ||
| 1084 | echo "*** that the run-time linker is not finding GTK+ or finding the wrong" | ||
| 1085 | echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" | ||
| 1086 | echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | ||
| 1087 | echo "*** to the installed location Also, make sure you have run ldconfig if that" | ||
| 1088 | echo "*** is required on your system" | ||
| 1089 | echo "***" | ||
| 1090 | echo "*** If you have an old version installed, it is best to remove it, although" | ||
| 1091 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], | ||
| 1092 | [ echo "*** The test program failed to compile or link. See the file config.log for the" | ||
| 1093 | echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) | ||
| 1094 | CFLAGS="$ac_save_CFLAGS" | ||
| 1095 | LIBS="$ac_save_LIBS" | ||
| 1096 | fi | ||
| 1097 | fi | ||
| 1098 | GTK_CFLAGS="" | ||
| 1099 | GTK_LIBS="" | ||
| 1100 | ifelse([$3], , :, [$3]) | ||
| 1101 | fi | ||
| 1102 | AC_SUBST(GTK_CFLAGS) | ||
| 1103 | AC_SUBST(GTK_LIBS) | ||
| 1104 | rm -f conf.gtktest | ||
| 1105 | ]) | ||
| 1106 | |||
| 1107 | # iconv.m4 serial 18 (gettext-0.18.2) | ||
| 1108 | dnl Copyright (C) 2000-2002, 2007-2013 Free Software Foundation, Inc. | ||
| 1109 | dnl This file is free software; the Free Software Foundation | ||
| 1110 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 1111 | dnl with or without modifications, as long as this notice is preserved. | ||
| 1112 | |||
| 1113 | dnl From Bruno Haible. | ||
| 1114 | |||
| 1115 | AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], | ||
| 1116 | [ | ||
| 1117 | dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. | ||
| 1118 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
| 1119 | AC_REQUIRE([AC_LIB_RPATH]) | ||
| 1120 | |||
| 1121 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV | ||
| 1122 | dnl accordingly. | ||
| 1123 | AC_LIB_LINKFLAGS_BODY([iconv]) | ||
| 1124 | ]) | ||
| 1125 | |||
| 1126 | AC_DEFUN([AM_ICONV_LINK], | ||
| 1127 | [ | ||
| 1128 | dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and | ||
| 1129 | dnl those with the standalone portable GNU libiconv installed). | ||
| 1130 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles | ||
| 1131 | |||
| 1132 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV | ||
| 1133 | dnl accordingly. | ||
| 1134 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | ||
| 1135 | |||
| 1136 | dnl Add $INCICONV to CPPFLAGS before performing the following checks, | ||
| 1137 | dnl because if the user has installed libiconv and not disabled its use | ||
| 1138 | dnl via --without-libiconv-prefix, he wants to use it. The first | ||
| 1139 | dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. | ||
| 1140 | am_save_CPPFLAGS="$CPPFLAGS" | ||
| 1141 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) | ||
| 1142 | |||
| 1143 | AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ | ||
| 1144 | am_cv_func_iconv="no, consider installing GNU libiconv" | ||
| 1145 | am_cv_lib_iconv=no | ||
| 1146 | AC_LINK_IFELSE( | ||
| 1147 | [AC_LANG_PROGRAM( | ||
| 1148 | [[ | ||
| 1149 | #include <stdlib.h> | ||
| 1150 | #include <iconv.h> | ||
| 1151 | ]], | ||
| 1152 | [[iconv_t cd = iconv_open("",""); | ||
| 1153 | iconv(cd,NULL,NULL,NULL,NULL); | ||
| 1154 | iconv_close(cd);]])], | ||
| 1155 | [am_cv_func_iconv=yes]) | ||
| 1156 | if test "$am_cv_func_iconv" != yes; then | ||
| 1157 | am_save_LIBS="$LIBS" | ||
| 1158 | LIBS="$LIBS $LIBICONV" | ||
| 1159 | AC_LINK_IFELSE( | ||
| 1160 | [AC_LANG_PROGRAM( | ||
| 1161 | [[ | ||
| 1162 | #include <stdlib.h> | ||
| 1163 | #include <iconv.h> | ||
| 1164 | ]], | ||
| 1165 | [[iconv_t cd = iconv_open("",""); | ||
| 1166 | iconv(cd,NULL,NULL,NULL,NULL); | ||
| 1167 | iconv_close(cd);]])], | ||
| 1168 | [am_cv_lib_iconv=yes] | ||
| 1169 | [am_cv_func_iconv=yes]) | ||
| 1170 | LIBS="$am_save_LIBS" | ||
| 1171 | fi | ||
| 1172 | ]) | ||
| 1173 | if test "$am_cv_func_iconv" = yes; then | ||
| 1174 | AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ | ||
| 1175 | dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, | ||
| 1176 | dnl Solaris 10. | ||
| 1177 | am_save_LIBS="$LIBS" | ||
| 1178 | if test $am_cv_lib_iconv = yes; then | ||
| 1179 | LIBS="$LIBS $LIBICONV" | ||
| 1180 | fi | ||
| 1181 | AC_RUN_IFELSE( | ||
| 1182 | [AC_LANG_SOURCE([[ | ||
| 1183 | #include <iconv.h> | ||
| 1184 | #include <string.h> | ||
| 1185 | int main () | ||
| 1186 | { | ||
| 1187 | int result = 0; | ||
| 1188 | /* Test against AIX 5.1 bug: Failures are not distinguishable from successful | ||
| 1189 | returns. */ | ||
| 1190 | { | ||
| 1191 | iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); | ||
| 1192 | if (cd_utf8_to_88591 != (iconv_t)(-1)) | ||
| 1193 | { | ||
| 1194 | static const char input[] = "\342\202\254"; /* EURO SIGN */ | ||
| 1195 | char buf[10]; | ||
| 1196 | const char *inptr = input; | ||
| 1197 | size_t inbytesleft = strlen (input); | ||
| 1198 | char *outptr = buf; | ||
| 1199 | size_t outbytesleft = sizeof (buf); | ||
| 1200 | size_t res = iconv (cd_utf8_to_88591, | ||
| 1201 | (char **) &inptr, &inbytesleft, | ||
| 1202 | &outptr, &outbytesleft); | ||
| 1203 | if (res == 0) | ||
| 1204 | result |= 1; | ||
| 1205 | iconv_close (cd_utf8_to_88591); | ||
| 1206 | } | ||
| 1207 | } | ||
| 1208 | /* Test against Solaris 10 bug: Failures are not distinguishable from | ||
| 1209 | successful returns. */ | ||
| 1210 | { | ||
| 1211 | iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); | ||
| 1212 | if (cd_ascii_to_88591 != (iconv_t)(-1)) | ||
| 1213 | { | ||
| 1214 | static const char input[] = "\263"; | ||
| 1215 | char buf[10]; | ||
| 1216 | const char *inptr = input; | ||
| 1217 | size_t inbytesleft = strlen (input); | ||
| 1218 | char *outptr = buf; | ||
| 1219 | size_t outbytesleft = sizeof (buf); | ||
| 1220 | size_t res = iconv (cd_ascii_to_88591, | ||
| 1221 | (char **) &inptr, &inbytesleft, | ||
| 1222 | &outptr, &outbytesleft); | ||
| 1223 | if (res == 0) | ||
| 1224 | result |= 2; | ||
| 1225 | iconv_close (cd_ascii_to_88591); | ||
| 1226 | } | ||
| 1227 | } | ||
| 1228 | /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ | ||
| 1229 | { | ||
| 1230 | iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); | ||
| 1231 | if (cd_88591_to_utf8 != (iconv_t)(-1)) | ||
| 1232 | { | ||
| 1233 | static const char input[] = "\304"; | ||
| 1234 | static char buf[2] = { (char)0xDE, (char)0xAD }; | ||
| 1235 | const char *inptr = input; | ||
| 1236 | size_t inbytesleft = 1; | ||
| 1237 | char *outptr = buf; | ||
| 1238 | size_t outbytesleft = 1; | ||
| 1239 | size_t res = iconv (cd_88591_to_utf8, | ||
| 1240 | (char **) &inptr, &inbytesleft, | ||
| 1241 | &outptr, &outbytesleft); | ||
| 1242 | if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) | ||
| 1243 | result |= 4; | ||
| 1244 | iconv_close (cd_88591_to_utf8); | ||
| 1245 | } | ||
| 1246 | } | ||
| 1247 | #if 0 /* This bug could be worked around by the caller. */ | ||
| 1248 | /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ | ||
| 1249 | { | ||
| 1250 | iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); | ||
| 1251 | if (cd_88591_to_utf8 != (iconv_t)(-1)) | ||
| 1252 | { | ||
| 1253 | static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; | ||
| 1254 | char buf[50]; | ||
| 1255 | const char *inptr = input; | ||
| 1256 | size_t inbytesleft = strlen (input); | ||
| 1257 | char *outptr = buf; | ||
| 1258 | size_t outbytesleft = sizeof (buf); | ||
| 1259 | size_t res = iconv (cd_88591_to_utf8, | ||
| 1260 | (char **) &inptr, &inbytesleft, | ||
| 1261 | &outptr, &outbytesleft); | ||
| 1262 | if ((int)res > 0) | ||
| 1263 | result |= 8; | ||
| 1264 | iconv_close (cd_88591_to_utf8); | ||
| 1265 | } | ||
| 1266 | } | ||
| 1267 | #endif | ||
| 1268 | /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is | ||
| 1269 | provided. */ | ||
| 1270 | if (/* Try standardized names. */ | ||
| 1271 | iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) | ||
| 1272 | /* Try IRIX, OSF/1 names. */ | ||
| 1273 | && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) | ||
| 1274 | /* Try AIX names. */ | ||
| 1275 | && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) | ||
| 1276 | /* Try HP-UX names. */ | ||
| 1277 | && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) | ||
| 1278 | result |= 16; | ||
| 1279 | return result; | ||
| 1280 | }]])], | ||
| 1281 | [am_cv_func_iconv_works=yes], | ||
| 1282 | [am_cv_func_iconv_works=no], | ||
| 1283 | [ | ||
| 1284 | changequote(,)dnl | ||
| 1285 | case "$host_os" in | ||
| 1286 | aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; | ||
| 1287 | *) am_cv_func_iconv_works="guessing yes" ;; | ||
| 1288 | esac | ||
| 1289 | changequote([,])dnl | ||
| 1290 | ]) | ||
| 1291 | LIBS="$am_save_LIBS" | ||
| 1292 | ]) | ||
| 1293 | case "$am_cv_func_iconv_works" in | ||
| 1294 | *no) am_func_iconv=no am_cv_lib_iconv=no ;; | ||
| 1295 | *) am_func_iconv=yes ;; | ||
| 1296 | esac | ||
| 1297 | else | ||
| 1298 | am_func_iconv=no am_cv_lib_iconv=no | ||
| 1299 | fi | ||
| 1300 | if test "$am_func_iconv" = yes; then | ||
| 1301 | AC_DEFINE([HAVE_ICONV], [1], | ||
| 1302 | [Define if you have the iconv() function and it works.]) | ||
| 1303 | fi | ||
| 1304 | if test "$am_cv_lib_iconv" = yes; then | ||
| 1305 | AC_MSG_CHECKING([how to link with libiconv]) | ||
| 1306 | AC_MSG_RESULT([$LIBICONV]) | ||
| 1307 | else | ||
| 1308 | dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV | ||
| 1309 | dnl either. | ||
| 1310 | CPPFLAGS="$am_save_CPPFLAGS" | ||
| 1311 | LIBICONV= | ||
| 1312 | LTLIBICONV= | ||
| 1313 | fi | ||
| 1314 | AC_SUBST([LIBICONV]) | ||
| 1315 | AC_SUBST([LTLIBICONV]) | ||
| 1316 | ]) | ||
| 1317 | |||
| 1318 | dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to | ||
| 1319 | dnl avoid warnings like | ||
| 1320 | dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". | ||
| 1321 | dnl This is tricky because of the way 'aclocal' is implemented: | ||
| 1322 | dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. | ||
| 1323 | dnl Otherwise aclocal's initial scan pass would miss the macro definition. | ||
| 1324 | dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. | ||
| 1325 | dnl Otherwise aclocal would emit many "Use of uninitialized value $1" | ||
| 1326 | dnl warnings. | ||
| 1327 | m4_define([gl_iconv_AC_DEFUN], | ||
| 1328 | m4_version_prereq([2.64], | ||
| 1329 | [[AC_DEFUN_ONCE( | ||
| 1330 | [$1], [$2])]], | ||
| 1331 | [m4_ifdef([gl_00GNULIB], | ||
| 1332 | [[AC_DEFUN_ONCE( | ||
| 1333 | [$1], [$2])]], | ||
| 1334 | [[AC_DEFUN( | ||
| 1335 | [$1], [$2])]])])) | ||
| 1336 | gl_iconv_AC_DEFUN([AM_ICONV], | ||
| 1337 | [ | ||
| 1338 | AM_ICONV_LINK | ||
| 1339 | if test "$am_cv_func_iconv" = yes; then | ||
| 1340 | AC_MSG_CHECKING([for iconv declaration]) | ||
| 1341 | AC_CACHE_VAL([am_cv_proto_iconv], [ | ||
| 1342 | AC_COMPILE_IFELSE( | ||
| 1343 | [AC_LANG_PROGRAM( | ||
| 1344 | [[ | ||
| 1345 | #include <stdlib.h> | ||
| 1346 | #include <iconv.h> | ||
| 1347 | extern | ||
| 1348 | #ifdef __cplusplus | ||
| 1349 | "C" | ||
| 1350 | #endif | ||
| 1351 | #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) | ||
| 1352 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | ||
| 1353 | #else | ||
| 1354 | size_t iconv(); | ||
| 1355 | #endif | ||
| 1356 | ]], | ||
| 1357 | [[]])], | ||
| 1358 | [am_cv_proto_iconv_arg1=""], | ||
| 1359 | [am_cv_proto_iconv_arg1="const"]) | ||
| 1360 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) | ||
| 1361 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | ||
| 1362 | AC_MSG_RESULT([ | ||
| 1363 | $am_cv_proto_iconv]) | ||
| 1364 | AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], | ||
| 1365 | [Define as const if the declaration of iconv() needs const.]) | ||
| 1366 | dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. | ||
| 1367 | m4_ifdef([gl_ICONV_H_DEFAULTS], | ||
| 1368 | [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) | ||
| 1369 | if test -n "$am_cv_proto_iconv_arg1"; then | ||
| 1370 | ICONV_CONST="const" | ||
| 1371 | fi | ||
| 1372 | ]) | ||
| 1373 | fi | ||
| 1374 | ]) | ||
| 1375 | |||
| 1376 | # lib-ld.m4 serial 6 | ||
| 1377 | dnl Copyright (C) 1996-2003, 2009-2013 Free Software Foundation, Inc. | ||
| 1378 | dnl This file is free software; the Free Software Foundation | ||
| 1379 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 1380 | dnl with or without modifications, as long as this notice is preserved. | ||
| 1381 | |||
| 1382 | dnl Subroutines of libtool.m4, | ||
| 1383 | dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid | ||
| 1384 | dnl collision with libtool.m4. | ||
| 1385 | |||
| 1386 | dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. | ||
| 1387 | AC_DEFUN([AC_LIB_PROG_LD_GNU], | ||
| 1388 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], | ||
| 1389 | [# I'd rather use --version here, but apparently some GNU lds only accept -v. | ||
| 1390 | case `$LD -v 2>&1 </dev/null` in | ||
| 1391 | *GNU* | *'with BFD'*) | ||
| 1392 | acl_cv_prog_gnu_ld=yes | ||
| 1393 | ;; | ||
| 1394 | *) | ||
| 1395 | acl_cv_prog_gnu_ld=no | ||
| 1396 | ;; | ||
| 1397 | esac]) | ||
| 1398 | with_gnu_ld=$acl_cv_prog_gnu_ld | ||
| 1399 | ]) | ||
| 1400 | |||
| 1401 | dnl From libtool-2.4. Sets the variable LD. | ||
| 1402 | AC_DEFUN([AC_LIB_PROG_LD], | ||
| 1403 | [AC_REQUIRE([AC_PROG_CC])dnl | ||
| 1404 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
| 1405 | |||
| 1406 | AC_ARG_WITH([gnu-ld], | ||
| 1407 | [AS_HELP_STRING([--with-gnu-ld], | ||
| 1408 | [assume the C compiler uses GNU ld [default=no]])], | ||
| 1409 | [test "$withval" = no || with_gnu_ld=yes], | ||
| 1410 | [with_gnu_ld=no])dnl | ||
| 1411 | |||
| 1412 | # Prepare PATH_SEPARATOR. | ||
| 1413 | # The user is always right. | ||
| 1414 | if test "${PATH_SEPARATOR+set}" != set; then | ||
| 1415 | # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which | ||
| 1416 | # contains only /bin. Note that ksh looks also at the FPATH variable, | ||
| 1417 | # so we have to set that as well for the test. | ||
| 1418 | PATH_SEPARATOR=: | ||
| 1419 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ | ||
| 1420 | && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ | ||
| 1421 | || PATH_SEPARATOR=';' | ||
| 1422 | } | ||
| 1423 | fi | ||
| 1424 | |||
| 1425 | ac_prog=ld | ||
| 1426 | if test "$GCC" = yes; then | ||
| 1427 | # Check if gcc -print-prog-name=ld gives a path. | ||
| 1428 | AC_MSG_CHECKING([for ld used by $CC]) | ||
| 1429 | case $host in | ||
| 1430 | *-*-mingw*) | ||
| 1431 | # gcc leaves a trailing carriage return which upsets mingw | ||
| 1432 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | ||
| 1433 | *) | ||
| 1434 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | ||
| 1435 | esac | ||
| 1436 | case $ac_prog in | ||
| 1437 | # Accept absolute paths. | ||
| 1438 | [[\\/]]* | ?:[[\\/]]*) | ||
| 1439 | re_direlt='/[[^/]][[^/]]*/\.\./' | ||
| 1440 | # Canonicalize the pathname of ld | ||
| 1441 | ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` | ||
| 1442 | while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do | ||
| 1443 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | ||
| 1444 | done | ||
| 1445 | test -z "$LD" && LD="$ac_prog" | ||
| 1446 | ;; | ||
| 1447 | "") | ||
| 1448 | # If it fails, then pretend we aren't using GCC. | ||
| 1449 | ac_prog=ld | ||
| 1450 | ;; | ||
| 1451 | *) | ||
| 1452 | # If it is relative, then search for the first ld in PATH. | ||
| 1453 | with_gnu_ld=unknown | ||
| 1454 | ;; | ||
| 1455 | esac | ||
| 1456 | elif test "$with_gnu_ld" = yes; then | ||
| 1457 | AC_MSG_CHECKING([for GNU ld]) | ||
| 1458 | else | ||
| 1459 | AC_MSG_CHECKING([for non-GNU ld]) | ||
| 1460 | fi | ||
| 1461 | AC_CACHE_VAL([acl_cv_path_LD], | ||
| 1462 | [if test -z "$LD"; then | ||
| 1463 | acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
| 1464 | for ac_dir in $PATH; do | ||
| 1465 | IFS="$acl_save_ifs" | ||
| 1466 | test -z "$ac_dir" && ac_dir=. | ||
| 1467 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | ||
| 1468 | acl_cv_path_LD="$ac_dir/$ac_prog" | ||
| 1469 | # Check to see if the program is GNU ld. I'd rather use --version, | ||
| 1470 | # but apparently some variants of GNU ld only accept -v. | ||
| 1471 | # Break only if it was the GNU/non-GNU ld that we prefer. | ||
| 1472 | case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in | ||
| 1473 | *GNU* | *'with BFD'*) | ||
| 1474 | test "$with_gnu_ld" != no && break | ||
| 1475 | ;; | ||
| 1476 | *) | ||
| 1477 | test "$with_gnu_ld" != yes && break | ||
| 1478 | ;; | ||
| 1479 | esac | ||
| 1480 | fi | ||
| 1481 | done | ||
| 1482 | IFS="$acl_save_ifs" | ||
| 1483 | else | ||
| 1484 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | ||
| 1485 | fi]) | ||
| 1486 | LD="$acl_cv_path_LD" | ||
| 1487 | if test -n "$LD"; then | ||
| 1488 | AC_MSG_RESULT([$LD]) | ||
| 1489 | else | ||
| 1490 | AC_MSG_RESULT([no]) | ||
| 1491 | fi | ||
| 1492 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | ||
| 1493 | AC_LIB_PROG_LD_GNU | ||
| 1494 | ]) | ||
| 1495 | |||
| 1496 | # lib-link.m4 serial 26 (gettext-0.18.2) | ||
| 1497 | dnl Copyright (C) 2001-2013 Free Software Foundation, Inc. | ||
| 1498 | dnl This file is free software; the Free Software Foundation | ||
| 1499 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 1500 | dnl with or without modifications, as long as this notice is preserved. | ||
| 1501 | |||
| 1502 | dnl From Bruno Haible. | ||
| 1503 | |||
| 1504 | AC_PREREQ([2.54]) | ||
| 1505 | |||
| 1506 | dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and | ||
| 1507 | dnl the libraries corresponding to explicit and implicit dependencies. | ||
| 1508 | dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and | ||
| 1509 | dnl augments the CPPFLAGS variable. | ||
| 1510 | dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname | ||
| 1511 | dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | ||
| 1512 | AC_DEFUN([AC_LIB_LINKFLAGS], | ||
| 1513 | [ | ||
| 1514 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
| 1515 | AC_REQUIRE([AC_LIB_RPATH]) | ||
| 1516 | pushdef([Name],[m4_translit([$1],[./+-], [____])]) | ||
| 1517 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], | ||
| 1518 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
| 1519 | AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ | ||
| 1520 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) | ||
| 1521 | ac_cv_lib[]Name[]_libs="$LIB[]NAME" | ||
| 1522 | ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" | ||
| 1523 | ac_cv_lib[]Name[]_cppflags="$INC[]NAME" | ||
| 1524 | ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" | ||
| 1525 | ]) | ||
| 1526 | LIB[]NAME="$ac_cv_lib[]Name[]_libs" | ||
| 1527 | LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" | ||
| 1528 | INC[]NAME="$ac_cv_lib[]Name[]_cppflags" | ||
| 1529 | LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" | ||
| 1530 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) | ||
| 1531 | AC_SUBST([LIB]NAME) | ||
| 1532 | AC_SUBST([LTLIB]NAME) | ||
| 1533 | AC_SUBST([LIB]NAME[_PREFIX]) | ||
| 1534 | dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the | ||
| 1535 | dnl results of this search when this library appears as a dependency. | ||
| 1536 | HAVE_LIB[]NAME=yes | ||
| 1537 | popdef([NAME]) | ||
| 1538 | popdef([Name]) | ||
| 1539 | ]) | ||
| 1540 | |||
| 1541 | dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) | ||
| 1542 | dnl searches for libname and the libraries corresponding to explicit and | ||
| 1543 | dnl implicit dependencies, together with the specified include files and | ||
| 1544 | dnl the ability to compile and link the specified testcode. The missing-message | ||
| 1545 | dnl defaults to 'no' and may contain additional hints for the user. | ||
| 1546 | dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} | ||
| 1547 | dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and | ||
| 1548 | dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs | ||
| 1549 | dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. | ||
| 1550 | dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname | ||
| 1551 | dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | ||
| 1552 | AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], | ||
| 1553 | [ | ||
| 1554 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
| 1555 | AC_REQUIRE([AC_LIB_RPATH]) | ||
| 1556 | pushdef([Name],[m4_translit([$1],[./+-], [____])]) | ||
| 1557 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], | ||
| 1558 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
| 1559 | |||
| 1560 | dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME | ||
| 1561 | dnl accordingly. | ||
| 1562 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) | ||
| 1563 | |||
| 1564 | dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, | ||
| 1565 | dnl because if the user has installed lib[]Name and not disabled its use | ||
| 1566 | dnl via --without-lib[]Name-prefix, he wants to use it. | ||
| 1567 | ac_save_CPPFLAGS="$CPPFLAGS" | ||
| 1568 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) | ||
| 1569 | |||
| 1570 | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ | ||
| 1571 | ac_save_LIBS="$LIBS" | ||
| 1572 | dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, | ||
| 1573 | dnl because these -l options might require -L options that are present in | ||
| 1574 | dnl LIBS. -l options benefit only from the -L options listed before it. | ||
| 1575 | dnl Otherwise, add it to the front of LIBS, because it may be a static | ||
| 1576 | dnl library that depends on another static library that is present in LIBS. | ||
| 1577 | dnl Static libraries benefit only from the static libraries listed after | ||
| 1578 | dnl it. | ||
| 1579 | case " $LIB[]NAME" in | ||
| 1580 | *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; | ||
| 1581 | *) LIBS="$LIB[]NAME $LIBS" ;; | ||
| 1582 | esac | ||
| 1583 | AC_LINK_IFELSE( | ||
| 1584 | [AC_LANG_PROGRAM([[$3]], [[$4]])], | ||
| 1585 | [ac_cv_lib[]Name=yes], | ||
| 1586 | [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) | ||
| 1587 | LIBS="$ac_save_LIBS" | ||
| 1588 | ]) | ||
| 1589 | if test "$ac_cv_lib[]Name" = yes; then | ||
| 1590 | HAVE_LIB[]NAME=yes | ||
| 1591 | AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) | ||
| 1592 | AC_MSG_CHECKING([how to link with lib[]$1]) | ||
| 1593 | AC_MSG_RESULT([$LIB[]NAME]) | ||
| 1594 | else | ||
| 1595 | HAVE_LIB[]NAME=no | ||
| 1596 | dnl If $LIB[]NAME didn't lead to a usable library, we don't need | ||
| 1597 | dnl $INC[]NAME either. | ||
| 1598 | CPPFLAGS="$ac_save_CPPFLAGS" | ||
| 1599 | LIB[]NAME= | ||
| 1600 | LTLIB[]NAME= | ||
| 1601 | LIB[]NAME[]_PREFIX= | ||
| 1602 | fi | ||
| 1603 | AC_SUBST([HAVE_LIB]NAME) | ||
| 1604 | AC_SUBST([LIB]NAME) | ||
| 1605 | AC_SUBST([LTLIB]NAME) | ||
| 1606 | AC_SUBST([LIB]NAME[_PREFIX]) | ||
| 1607 | popdef([NAME]) | ||
| 1608 | popdef([Name]) | ||
| 1609 | ]) | ||
| 1610 | |||
| 1611 | dnl Determine the platform dependent parameters needed to use rpath: | ||
| 1612 | dnl acl_libext, | ||
| 1613 | dnl acl_shlibext, | ||
| 1614 | dnl acl_libname_spec, | ||
| 1615 | dnl acl_library_names_spec, | ||
| 1616 | dnl acl_hardcode_libdir_flag_spec, | ||
| 1617 | dnl acl_hardcode_libdir_separator, | ||
| 1618 | dnl acl_hardcode_direct, | ||
| 1619 | dnl acl_hardcode_minus_L. | ||
| 1620 | AC_DEFUN([AC_LIB_RPATH], | ||
| 1621 | [ | ||
| 1622 | dnl Tell automake >= 1.10 to complain if config.rpath is missing. | ||
| 1623 | m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) | ||
| 1624 | AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS | ||
| 1625 | AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld | ||
| 1626 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host | ||
| 1627 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir | ||
| 1628 | AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ | ||
| 1629 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | ||
| 1630 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | ||
| 1631 | . ./conftest.sh | ||
| 1632 | rm -f ./conftest.sh | ||
| 1633 | acl_cv_rpath=done | ||
| 1634 | ]) | ||
| 1635 | wl="$acl_cv_wl" | ||
| 1636 | acl_libext="$acl_cv_libext" | ||
| 1637 | acl_shlibext="$acl_cv_shlibext" | ||
| 1638 | acl_libname_spec="$acl_cv_libname_spec" | ||
| 1639 | acl_library_names_spec="$acl_cv_library_names_spec" | ||
| 1640 | acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | ||
| 1641 | acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | ||
| 1642 | acl_hardcode_direct="$acl_cv_hardcode_direct" | ||
| 1643 | acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" | ||
| 1644 | dnl Determine whether the user wants rpath handling at all. | ||
| 1645 | AC_ARG_ENABLE([rpath], | ||
| 1646 | [ --disable-rpath do not hardcode runtime library paths], | ||
| 1647 | :, enable_rpath=yes) | ||
| 1648 | ]) | ||
| 1649 | |||
| 1650 | dnl AC_LIB_FROMPACKAGE(name, package) | ||
| 1651 | dnl declares that libname comes from the given package. The configure file | ||
| 1652 | dnl will then not have a --with-libname-prefix option but a | ||
| 1653 | dnl --with-package-prefix option. Several libraries can come from the same | ||
| 1654 | dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar | ||
| 1655 | dnl macro call that searches for libname. | ||
| 1656 | AC_DEFUN([AC_LIB_FROMPACKAGE], | ||
| 1657 | [ | ||
| 1658 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], | ||
| 1659 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
| 1660 | define([acl_frompackage_]NAME, [$2]) | ||
| 1661 | popdef([NAME]) | ||
| 1662 | pushdef([PACK],[$2]) | ||
| 1663 | pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], | ||
| 1664 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
| 1665 | define([acl_libsinpackage_]PACKUP, | ||
| 1666 | m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) | ||
| 1667 | popdef([PACKUP]) | ||
| 1668 | popdef([PACK]) | ||
| 1669 | ]) | ||
| 1670 | |||
| 1671 | dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and | ||
| 1672 | dnl the libraries corresponding to explicit and implicit dependencies. | ||
| 1673 | dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. | ||
| 1674 | dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found | ||
| 1675 | dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | ||
| 1676 | AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | ||
| 1677 | [ | ||
| 1678 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | ||
| 1679 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], | ||
| 1680 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
| 1681 | pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) | ||
| 1682 | pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], | ||
| 1683 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
| 1684 | pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) | ||
| 1685 | dnl Autoconf >= 2.61 supports dots in --with options. | ||
| 1686 | pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) | ||
| 1687 | dnl By default, look in $includedir and $libdir. | ||
| 1688 | use_additional=yes | ||
| 1689 | AC_LIB_WITH_FINAL_PREFIX([ | ||
| 1690 | eval additional_includedir=\"$includedir\" | ||
| 1691 | eval additional_libdir=\"$libdir\" | ||
| 1692 | ]) | ||
| 1693 | AC_ARG_WITH(P_A_C_K[-prefix], | ||
| 1694 | [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib | ||
| 1695 | --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], | ||
| 1696 | [ | ||
| 1697 | if test "X$withval" = "Xno"; then | ||
| 1698 | use_additional=no | ||
| 1699 | else | ||
| 1700 | if test "X$withval" = "X"; then | ||
| 1701 | AC_LIB_WITH_FINAL_PREFIX([ | ||
| 1702 | eval additional_includedir=\"$includedir\" | ||
| 1703 | eval additional_libdir=\"$libdir\" | ||
| 1704 | ]) | ||
| 1705 | else | ||
| 1706 | additional_includedir="$withval/include" | ||
| 1707 | additional_libdir="$withval/$acl_libdirstem" | ||
| 1708 | if test "$acl_libdirstem2" != "$acl_libdirstem" \ | ||
| 1709 | && ! test -d "$withval/$acl_libdirstem"; then | ||
| 1710 | additional_libdir="$withval/$acl_libdirstem2" | ||
| 1711 | fi | ||
| 1712 | fi | ||
| 1713 | fi | ||
| 1714 | ]) | ||
| 1715 | dnl Search the library and its dependencies in $additional_libdir and | ||
| 1716 | dnl $LDFLAGS. Using breadth-first-seach. | ||
| 1717 | LIB[]NAME= | ||
| 1718 | LTLIB[]NAME= | ||
| 1719 | INC[]NAME= | ||
| 1720 | LIB[]NAME[]_PREFIX= | ||
| 1721 | dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been | ||
| 1722 | dnl computed. So it has to be reset here. | ||
| 1723 | HAVE_LIB[]NAME= | ||
| 1724 | rpathdirs= | ||
| 1725 | ltrpathdirs= | ||
| 1726 | names_already_handled= | ||
| 1727 | names_next_round='$1 $2' | ||
| 1728 | while test -n "$names_next_round"; do | ||
| 1729 | names_this_round="$names_next_round" | ||
| 1730 | names_next_round= | ||
| 1731 | for name in $names_this_round; do | ||
| 1732 | already_handled= | ||
| 1733 | for n in $names_already_handled; do | ||
| 1734 | if test "$n" = "$name"; then | ||
| 1735 | already_handled=yes | ||
| 1736 | break | ||
| 1737 | fi | ||
| 1738 | done | ||
| 1739 | if test -z "$already_handled"; then | ||
| 1740 | names_already_handled="$names_already_handled $name" | ||
| 1741 | dnl See if it was already located by an earlier AC_LIB_LINKFLAGS | ||
| 1742 | dnl or AC_LIB_HAVE_LINKFLAGS call. | ||
| 1743 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` | ||
| 1744 | eval value=\"\$HAVE_LIB$uppername\" | ||
| 1745 | if test -n "$value"; then | ||
| 1746 | if test "$value" = yes; then | ||
| 1747 | eval value=\"\$LIB$uppername\" | ||
| 1748 | test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" | ||
| 1749 | eval value=\"\$LTLIB$uppername\" | ||
| 1750 | test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" | ||
| 1751 | else | ||
| 1752 | dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined | ||
| 1753 | dnl that this library doesn't exist. So just drop it. | ||
| 1754 | : | ||
| 1755 | fi | ||
| 1756 | else | ||
| 1757 | dnl Search the library lib$name in $additional_libdir and $LDFLAGS | ||
| 1758 | dnl and the already constructed $LIBNAME/$LTLIBNAME. | ||
| 1759 | found_dir= | ||
| 1760 | found_la= | ||
| 1761 | found_so= | ||
| 1762 | found_a= | ||
| 1763 | eval libname=\"$acl_libname_spec\" # typically: libname=lib$name | ||
| 1764 | if test -n "$acl_shlibext"; then | ||
| 1765 | shrext=".$acl_shlibext" # typically: shrext=.so | ||
| 1766 | else | ||
| 1767 | shrext= | ||
| 1768 | fi | ||
| 1769 | if test $use_additional = yes; then | ||
| 1770 | dir="$additional_libdir" | ||
| 1771 | dnl The same code as in the loop below: | ||
| 1772 | dnl First look for a shared library. | ||
| 1773 | if test -n "$acl_shlibext"; then | ||
| 1774 | if test -f "$dir/$libname$shrext"; then | ||
| 1775 | found_dir="$dir" | ||
| 1776 | found_so="$dir/$libname$shrext" | ||
| 1777 | else | ||
| 1778 | if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | ||
| 1779 | ver=`(cd "$dir" && \ | ||
| 1780 | for f in "$libname$shrext".*; do echo "$f"; done \ | ||
| 1781 | | sed -e "s,^$libname$shrext\\\\.,," \ | ||
| 1782 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | ||
| 1783 | | sed 1q ) 2>/dev/null` | ||
| 1784 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then | ||
| 1785 | found_dir="$dir" | ||
| 1786 | found_so="$dir/$libname$shrext.$ver" | ||
| 1787 | fi | ||
| 1788 | else | ||
| 1789 | eval library_names=\"$acl_library_names_spec\" | ||
| 1790 | for f in $library_names; do | ||
| 1791 | if test -f "$dir/$f"; then | ||
| 1792 | found_dir="$dir" | ||
| 1793 | found_so="$dir/$f" | ||
| 1794 | break | ||
| 1795 | fi | ||
| 1796 | done | ||
| 1797 | fi | ||
| 1798 | fi | ||
| 1799 | fi | ||
| 1800 | dnl Then look for a static library. | ||
| 1801 | if test "X$found_dir" = "X"; then | ||
| 1802 | if test -f "$dir/$libname.$acl_libext"; then | ||
| 1803 | found_dir="$dir" | ||
| 1804 | found_a="$dir/$libname.$acl_libext" | ||
| 1805 | fi | ||
| 1806 | fi | ||
| 1807 | if test "X$found_dir" != "X"; then | ||
| 1808 | if test -f "$dir/$libname.la"; then | ||
| 1809 | found_la="$dir/$libname.la" | ||
| 1810 | fi | ||
| 1811 | fi | ||
| 1812 | fi | ||
| 1813 | if test "X$found_dir" = "X"; then | ||
| 1814 | for x in $LDFLAGS $LTLIB[]NAME; do | ||
| 1815 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 1816 | case "$x" in | ||
| 1817 | -L*) | ||
| 1818 | dir=`echo "X$x" | sed -e 's/^X-L//'` | ||
| 1819 | dnl First look for a shared library. | ||
| 1820 | if test -n "$acl_shlibext"; then | ||
| 1821 | if test -f "$dir/$libname$shrext"; then | ||
| 1822 | found_dir="$dir" | ||
| 1823 | found_so="$dir/$libname$shrext" | ||
| 1824 | else | ||
| 1825 | if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | ||
| 1826 | ver=`(cd "$dir" && \ | ||
| 1827 | for f in "$libname$shrext".*; do echo "$f"; done \ | ||
| 1828 | | sed -e "s,^$libname$shrext\\\\.,," \ | ||
| 1829 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | ||
| 1830 | | sed 1q ) 2>/dev/null` | ||
| 1831 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then | ||
| 1832 | found_dir="$dir" | ||
| 1833 | found_so="$dir/$libname$shrext.$ver" | ||
| 1834 | fi | ||
| 1835 | else | ||
| 1836 | eval library_names=\"$acl_library_names_spec\" | ||
| 1837 | for f in $library_names; do | ||
| 1838 | if test -f "$dir/$f"; then | ||
| 1839 | found_dir="$dir" | ||
| 1840 | found_so="$dir/$f" | ||
| 1841 | break | ||
| 1842 | fi | ||
| 1843 | done | ||
| 1844 | fi | ||
| 1845 | fi | ||
| 1846 | fi | ||
| 1847 | dnl Then look for a static library. | ||
| 1848 | if test "X$found_dir" = "X"; then | ||
| 1849 | if test -f "$dir/$libname.$acl_libext"; then | ||
| 1850 | found_dir="$dir" | ||
| 1851 | found_a="$dir/$libname.$acl_libext" | ||
| 1852 | fi | ||
| 1853 | fi | ||
| 1854 | if test "X$found_dir" != "X"; then | ||
| 1855 | if test -f "$dir/$libname.la"; then | ||
| 1856 | found_la="$dir/$libname.la" | ||
| 1857 | fi | ||
| 1858 | fi | ||
| 1859 | ;; | ||
| 1860 | esac | ||
| 1861 | if test "X$found_dir" != "X"; then | ||
| 1862 | break | ||
| 1863 | fi | ||
| 1864 | done | ||
| 1865 | fi | ||
| 1866 | if test "X$found_dir" != "X"; then | ||
| 1867 | dnl Found the library. | ||
| 1868 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" | ||
| 1869 | if test "X$found_so" != "X"; then | ||
| 1870 | dnl Linking with a shared library. We attempt to hardcode its | ||
| 1871 | dnl directory into the executable's runpath, unless it's the | ||
| 1872 | dnl standard /usr/lib. | ||
| 1873 | if test "$enable_rpath" = no \ | ||
| 1874 | || test "X$found_dir" = "X/usr/$acl_libdirstem" \ | ||
| 1875 | || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then | ||
| 1876 | dnl No hardcoding is needed. | ||
| 1877 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
| 1878 | else | ||
| 1879 | dnl Use an explicit option to hardcode DIR into the resulting | ||
| 1880 | dnl binary. | ||
| 1881 | dnl Potentially add DIR to ltrpathdirs. | ||
| 1882 | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. | ||
| 1883 | haveit= | ||
| 1884 | for x in $ltrpathdirs; do | ||
| 1885 | if test "X$x" = "X$found_dir"; then | ||
| 1886 | haveit=yes | ||
| 1887 | break | ||
| 1888 | fi | ||
| 1889 | done | ||
| 1890 | if test -z "$haveit"; then | ||
| 1891 | ltrpathdirs="$ltrpathdirs $found_dir" | ||
| 1892 | fi | ||
| 1893 | dnl The hardcoding into $LIBNAME is system dependent. | ||
| 1894 | if test "$acl_hardcode_direct" = yes; then | ||
| 1895 | dnl Using DIR/libNAME.so during linking hardcodes DIR into the | ||
| 1896 | dnl resulting binary. | ||
| 1897 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
| 1898 | else | ||
| 1899 | if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then | ||
| 1900 | dnl Use an explicit option to hardcode DIR into the resulting | ||
| 1901 | dnl binary. | ||
| 1902 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
| 1903 | dnl Potentially add DIR to rpathdirs. | ||
| 1904 | dnl The rpathdirs will be appended to $LIBNAME at the end. | ||
| 1905 | haveit= | ||
| 1906 | for x in $rpathdirs; do | ||
| 1907 | if test "X$x" = "X$found_dir"; then | ||
| 1908 | haveit=yes | ||
| 1909 | break | ||
| 1910 | fi | ||
| 1911 | done | ||
| 1912 | if test -z "$haveit"; then | ||
| 1913 | rpathdirs="$rpathdirs $found_dir" | ||
| 1914 | fi | ||
| 1915 | else | ||
| 1916 | dnl Rely on "-L$found_dir". | ||
| 1917 | dnl But don't add it if it's already contained in the LDFLAGS | ||
| 1918 | dnl or the already constructed $LIBNAME | ||
| 1919 | haveit= | ||
| 1920 | for x in $LDFLAGS $LIB[]NAME; do | ||
| 1921 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 1922 | if test "X$x" = "X-L$found_dir"; then | ||
| 1923 | haveit=yes | ||
| 1924 | break | ||
| 1925 | fi | ||
| 1926 | done | ||
| 1927 | if test -z "$haveit"; then | ||
| 1928 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" | ||
| 1929 | fi | ||
| 1930 | if test "$acl_hardcode_minus_L" != no; then | ||
| 1931 | dnl FIXME: Not sure whether we should use | ||
| 1932 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" | ||
| 1933 | dnl here. | ||
| 1934 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
| 1935 | else | ||
| 1936 | dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH | ||
| 1937 | dnl here, because this doesn't fit in flags passed to the | ||
| 1938 | dnl compiler. So give up. No hardcoding. This affects only | ||
| 1939 | dnl very old systems. | ||
| 1940 | dnl FIXME: Not sure whether we should use | ||
| 1941 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" | ||
| 1942 | dnl here. | ||
| 1943 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" | ||
| 1944 | fi | ||
| 1945 | fi | ||
| 1946 | fi | ||
| 1947 | fi | ||
| 1948 | else | ||
| 1949 | if test "X$found_a" != "X"; then | ||
| 1950 | dnl Linking with a static library. | ||
| 1951 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" | ||
| 1952 | else | ||
| 1953 | dnl We shouldn't come here, but anyway it's good to have a | ||
| 1954 | dnl fallback. | ||
| 1955 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" | ||
| 1956 | fi | ||
| 1957 | fi | ||
| 1958 | dnl Assume the include files are nearby. | ||
| 1959 | additional_includedir= | ||
| 1960 | case "$found_dir" in | ||
| 1961 | */$acl_libdirstem | */$acl_libdirstem/) | ||
| 1962 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` | ||
| 1963 | if test "$name" = '$1'; then | ||
| 1964 | LIB[]NAME[]_PREFIX="$basedir" | ||
| 1965 | fi | ||
| 1966 | additional_includedir="$basedir/include" | ||
| 1967 | ;; | ||
| 1968 | */$acl_libdirstem2 | */$acl_libdirstem2/) | ||
| 1969 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` | ||
| 1970 | if test "$name" = '$1'; then | ||
| 1971 | LIB[]NAME[]_PREFIX="$basedir" | ||
| 1972 | fi | ||
| 1973 | additional_includedir="$basedir/include" | ||
| 1974 | ;; | ||
| 1975 | esac | ||
| 1976 | if test "X$additional_includedir" != "X"; then | ||
| 1977 | dnl Potentially add $additional_includedir to $INCNAME. | ||
| 1978 | dnl But don't add it | ||
| 1979 | dnl 1. if it's the standard /usr/include, | ||
| 1980 | dnl 2. if it's /usr/local/include and we are using GCC on Linux, | ||
| 1981 | dnl 3. if it's already present in $CPPFLAGS or the already | ||
| 1982 | dnl constructed $INCNAME, | ||
| 1983 | dnl 4. if it doesn't exist as a directory. | ||
| 1984 | if test "X$additional_includedir" != "X/usr/include"; then | ||
| 1985 | haveit= | ||
| 1986 | if test "X$additional_includedir" = "X/usr/local/include"; then | ||
| 1987 | if test -n "$GCC"; then | ||
| 1988 | case $host_os in | ||
| 1989 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | ||
| 1990 | esac | ||
| 1991 | fi | ||
| 1992 | fi | ||
| 1993 | if test -z "$haveit"; then | ||
| 1994 | for x in $CPPFLAGS $INC[]NAME; do | ||
| 1995 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 1996 | if test "X$x" = "X-I$additional_includedir"; then | ||
| 1997 | haveit=yes | ||
| 1998 | break | ||
| 1999 | fi | ||
| 2000 | done | ||
| 2001 | if test -z "$haveit"; then | ||
| 2002 | if test -d "$additional_includedir"; then | ||
| 2003 | dnl Really add $additional_includedir to $INCNAME. | ||
| 2004 | INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" | ||
| 2005 | fi | ||
| 2006 | fi | ||
| 2007 | fi | ||
| 2008 | fi | ||
| 2009 | fi | ||
| 2010 | dnl Look for dependencies. | ||
| 2011 | if test -n "$found_la"; then | ||
| 2012 | dnl Read the .la file. It defines the variables | ||
| 2013 | dnl dlname, library_names, old_library, dependency_libs, current, | ||
| 2014 | dnl age, revision, installed, dlopen, dlpreopen, libdir. | ||
| 2015 | save_libdir="$libdir" | ||
| 2016 | case "$found_la" in | ||
| 2017 | */* | *\\*) . "$found_la" ;; | ||
| 2018 | *) . "./$found_la" ;; | ||
| 2019 | esac | ||
| 2020 | libdir="$save_libdir" | ||
| 2021 | dnl We use only dependency_libs. | ||
| 2022 | for dep in $dependency_libs; do | ||
| 2023 | case "$dep" in | ||
| 2024 | -L*) | ||
| 2025 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | ||
| 2026 | dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. | ||
| 2027 | dnl But don't add it | ||
| 2028 | dnl 1. if it's the standard /usr/lib, | ||
| 2029 | dnl 2. if it's /usr/local/lib and we are using GCC on Linux, | ||
| 2030 | dnl 3. if it's already present in $LDFLAGS or the already | ||
| 2031 | dnl constructed $LIBNAME, | ||
| 2032 | dnl 4. if it doesn't exist as a directory. | ||
| 2033 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ | ||
| 2034 | && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then | ||
| 2035 | haveit= | ||
| 2036 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ | ||
| 2037 | || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then | ||
| 2038 | if test -n "$GCC"; then | ||
| 2039 | case $host_os in | ||
| 2040 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | ||
| 2041 | esac | ||
| 2042 | fi | ||
| 2043 | fi | ||
| 2044 | if test -z "$haveit"; then | ||
| 2045 | haveit= | ||
| 2046 | for x in $LDFLAGS $LIB[]NAME; do | ||
| 2047 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 2048 | if test "X$x" = "X-L$additional_libdir"; then | ||
| 2049 | haveit=yes | ||
| 2050 | break | ||
| 2051 | fi | ||
| 2052 | done | ||
| 2053 | if test -z "$haveit"; then | ||
| 2054 | if test -d "$additional_libdir"; then | ||
| 2055 | dnl Really add $additional_libdir to $LIBNAME. | ||
| 2056 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" | ||
| 2057 | fi | ||
| 2058 | fi | ||
| 2059 | haveit= | ||
| 2060 | for x in $LDFLAGS $LTLIB[]NAME; do | ||
| 2061 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 2062 | if test "X$x" = "X-L$additional_libdir"; then | ||
| 2063 | haveit=yes | ||
| 2064 | break | ||
| 2065 | fi | ||
| 2066 | done | ||
| 2067 | if test -z "$haveit"; then | ||
| 2068 | if test -d "$additional_libdir"; then | ||
| 2069 | dnl Really add $additional_libdir to $LTLIBNAME. | ||
| 2070 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" | ||
| 2071 | fi | ||
| 2072 | fi | ||
| 2073 | fi | ||
| 2074 | fi | ||
| 2075 | ;; | ||
| 2076 | -R*) | ||
| 2077 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | ||
| 2078 | if test "$enable_rpath" != no; then | ||
| 2079 | dnl Potentially add DIR to rpathdirs. | ||
| 2080 | dnl The rpathdirs will be appended to $LIBNAME at the end. | ||
| 2081 | haveit= | ||
| 2082 | for x in $rpathdirs; do | ||
| 2083 | if test "X$x" = "X$dir"; then | ||
| 2084 | haveit=yes | ||
| 2085 | break | ||
| 2086 | fi | ||
| 2087 | done | ||
| 2088 | if test -z "$haveit"; then | ||
| 2089 | rpathdirs="$rpathdirs $dir" | ||
| 2090 | fi | ||
| 2091 | dnl Potentially add DIR to ltrpathdirs. | ||
| 2092 | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. | ||
| 2093 | haveit= | ||
| 2094 | for x in $ltrpathdirs; do | ||
| 2095 | if test "X$x" = "X$dir"; then | ||
| 2096 | haveit=yes | ||
| 2097 | break | ||
| 2098 | fi | ||
| 2099 | done | ||
| 2100 | if test -z "$haveit"; then | ||
| 2101 | ltrpathdirs="$ltrpathdirs $dir" | ||
| 2102 | fi | ||
| 2103 | fi | ||
| 2104 | ;; | ||
| 2105 | -l*) | ||
| 2106 | dnl Handle this in the next round. | ||
| 2107 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | ||
| 2108 | ;; | ||
| 2109 | *.la) | ||
| 2110 | dnl Handle this in the next round. Throw away the .la's | ||
| 2111 | dnl directory; it is already contained in a preceding -L | ||
| 2112 | dnl option. | ||
| 2113 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | ||
| 2114 | ;; | ||
| 2115 | *) | ||
| 2116 | dnl Most likely an immediate library name. | ||
| 2117 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" | ||
| 2118 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" | ||
| 2119 | ;; | ||
| 2120 | esac | ||
| 2121 | done | ||
| 2122 | fi | ||
| 2123 | else | ||
| 2124 | dnl Didn't find the library; assume it is in the system directories | ||
| 2125 | dnl known to the linker and runtime loader. (All the system | ||
| 2126 | dnl directories known to the linker should also be known to the | ||
| 2127 | dnl runtime loader, otherwise the system is severely misconfigured.) | ||
| 2128 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" | ||
| 2129 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" | ||
| 2130 | fi | ||
| 2131 | fi | ||
| 2132 | fi | ||
| 2133 | done | ||
| 2134 | done | ||
| 2135 | if test "X$rpathdirs" != "X"; then | ||
| 2136 | if test -n "$acl_hardcode_libdir_separator"; then | ||
| 2137 | dnl Weird platform: only the last -rpath option counts, the user must | ||
| 2138 | dnl pass all path elements in one option. We can arrange that for a | ||
| 2139 | dnl single library, but not when more than one $LIBNAMEs are used. | ||
| 2140 | alldirs= | ||
| 2141 | for found_dir in $rpathdirs; do | ||
| 2142 | alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" | ||
| 2143 | done | ||
| 2144 | dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. | ||
| 2145 | acl_save_libdir="$libdir" | ||
| 2146 | libdir="$alldirs" | ||
| 2147 | eval flag=\"$acl_hardcode_libdir_flag_spec\" | ||
| 2148 | libdir="$acl_save_libdir" | ||
| 2149 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" | ||
| 2150 | else | ||
| 2151 | dnl The -rpath options are cumulative. | ||
| 2152 | for found_dir in $rpathdirs; do | ||
| 2153 | acl_save_libdir="$libdir" | ||
| 2154 | libdir="$found_dir" | ||
| 2155 | eval flag=\"$acl_hardcode_libdir_flag_spec\" | ||
| 2156 | libdir="$acl_save_libdir" | ||
| 2157 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" | ||
| 2158 | done | ||
| 2159 | fi | ||
| 2160 | fi | ||
| 2161 | if test "X$ltrpathdirs" != "X"; then | ||
| 2162 | dnl When using libtool, the option that works for both libraries and | ||
| 2163 | dnl executables is -R. The -R options are cumulative. | ||
| 2164 | for found_dir in $ltrpathdirs; do | ||
| 2165 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" | ||
| 2166 | done | ||
| 2167 | fi | ||
| 2168 | popdef([P_A_C_K]) | ||
| 2169 | popdef([PACKLIBS]) | ||
| 2170 | popdef([PACKUP]) | ||
| 2171 | popdef([PACK]) | ||
| 2172 | popdef([NAME]) | ||
| 2173 | ]) | ||
| 2174 | |||
| 2175 | dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, | ||
| 2176 | dnl unless already present in VAR. | ||
| 2177 | dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes | ||
| 2178 | dnl contains two or three consecutive elements that belong together. | ||
| 2179 | AC_DEFUN([AC_LIB_APPENDTOVAR], | ||
| 2180 | [ | ||
| 2181 | for element in [$2]; do | ||
| 2182 | haveit= | ||
| 2183 | for x in $[$1]; do | ||
| 2184 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 2185 | if test "X$x" = "X$element"; then | ||
| 2186 | haveit=yes | ||
| 2187 | break | ||
| 2188 | fi | ||
| 2189 | done | ||
| 2190 | if test -z "$haveit"; then | ||
| 2191 | [$1]="${[$1]}${[$1]:+ }$element" | ||
| 2192 | fi | ||
| 2193 | done | ||
| 2194 | ]) | ||
| 2195 | |||
| 2196 | dnl For those cases where a variable contains several -L and -l options | ||
| 2197 | dnl referring to unknown libraries and directories, this macro determines the | ||
| 2198 | dnl necessary additional linker options for the runtime path. | ||
| 2199 | dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) | ||
| 2200 | dnl sets LDADDVAR to linker options needed together with LIBSVALUE. | ||
| 2201 | dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, | ||
| 2202 | dnl otherwise linking without libtool is assumed. | ||
| 2203 | AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], | ||
| 2204 | [ | ||
| 2205 | AC_REQUIRE([AC_LIB_RPATH]) | ||
| 2206 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | ||
| 2207 | $1= | ||
| 2208 | if test "$enable_rpath" != no; then | ||
| 2209 | if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then | ||
| 2210 | dnl Use an explicit option to hardcode directories into the resulting | ||
| 2211 | dnl binary. | ||
| 2212 | rpathdirs= | ||
| 2213 | next= | ||
| 2214 | for opt in $2; do | ||
| 2215 | if test -n "$next"; then | ||
| 2216 | dir="$next" | ||
| 2217 | dnl No need to hardcode the standard /usr/lib. | ||
| 2218 | if test "X$dir" != "X/usr/$acl_libdirstem" \ | ||
| 2219 | && test "X$dir" != "X/usr/$acl_libdirstem2"; then | ||
| 2220 | rpathdirs="$rpathdirs $dir" | ||
| 2221 | fi | ||
| 2222 | next= | ||
| 2223 | else | ||
| 2224 | case $opt in | ||
| 2225 | -L) next=yes ;; | ||
| 2226 | -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` | ||
| 2227 | dnl No need to hardcode the standard /usr/lib. | ||
| 2228 | if test "X$dir" != "X/usr/$acl_libdirstem" \ | ||
| 2229 | && test "X$dir" != "X/usr/$acl_libdirstem2"; then | ||
| 2230 | rpathdirs="$rpathdirs $dir" | ||
| 2231 | fi | ||
| 2232 | next= ;; | ||
| 2233 | *) next= ;; | ||
| 2234 | esac | ||
| 2235 | fi | ||
| 2236 | done | ||
| 2237 | if test "X$rpathdirs" != "X"; then | ||
| 2238 | if test -n ""$3""; then | ||
| 2239 | dnl libtool is used for linking. Use -R options. | ||
| 2240 | for dir in $rpathdirs; do | ||
| 2241 | $1="${$1}${$1:+ }-R$dir" | ||
| 2242 | done | ||
| 2243 | else | ||
| 2244 | dnl The linker is used for linking directly. | ||
| 2245 | if test -n "$acl_hardcode_libdir_separator"; then | ||
| 2246 | dnl Weird platform: only the last -rpath option counts, the user | ||
| 2247 | dnl must pass all path elements in one option. | ||
| 2248 | alldirs= | ||
| 2249 | for dir in $rpathdirs; do | ||
| 2250 | alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" | ||
| 2251 | done | ||
| 2252 | acl_save_libdir="$libdir" | ||
| 2253 | libdir="$alldirs" | ||
| 2254 | eval flag=\"$acl_hardcode_libdir_flag_spec\" | ||
| 2255 | libdir="$acl_save_libdir" | ||
| 2256 | $1="$flag" | ||
| 2257 | else | ||
| 2258 | dnl The -rpath options are cumulative. | ||
| 2259 | for dir in $rpathdirs; do | ||
| 2260 | acl_save_libdir="$libdir" | ||
| 2261 | libdir="$dir" | ||
| 2262 | eval flag=\"$acl_hardcode_libdir_flag_spec\" | ||
| 2263 | libdir="$acl_save_libdir" | ||
| 2264 | $1="${$1}${$1:+ }$flag" | ||
| 2265 | done | ||
| 2266 | fi | ||
| 2267 | fi | ||
| 2268 | fi | ||
| 2269 | fi | ||
| 2270 | fi | ||
| 2271 | AC_SUBST([$1]) | ||
| 2272 | ]) | ||
| 2273 | |||
| 2274 | # lib-prefix.m4 serial 7 (gettext-0.18) | ||
| 2275 | dnl Copyright (C) 2001-2005, 2008-2013 Free Software Foundation, Inc. | ||
| 2276 | dnl This file is free software; the Free Software Foundation | ||
| 2277 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 2278 | dnl with or without modifications, as long as this notice is preserved. | ||
| 2279 | |||
| 2280 | dnl From Bruno Haible. | ||
| 2281 | |||
| 2282 | dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and | ||
| 2283 | dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't | ||
| 2284 | dnl require excessive bracketing. | ||
| 2285 | ifdef([AC_HELP_STRING], | ||
| 2286 | [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], | ||
| 2287 | [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) | ||
| 2288 | |||
| 2289 | dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed | ||
| 2290 | dnl to access previously installed libraries. The basic assumption is that | ||
| 2291 | dnl a user will want packages to use other packages he previously installed | ||
| 2292 | dnl with the same --prefix option. | ||
| 2293 | dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate | ||
| 2294 | dnl libraries, but is otherwise very convenient. | ||
| 2295 | AC_DEFUN([AC_LIB_PREFIX], | ||
| 2296 | [ | ||
| 2297 | AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) | ||
| 2298 | AC_REQUIRE([AC_PROG_CC]) | ||
| 2299 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
| 2300 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | ||
| 2301 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
| 2302 | dnl By default, look in $includedir and $libdir. | ||
| 2303 | use_additional=yes | ||
| 2304 | AC_LIB_WITH_FINAL_PREFIX([ | ||
| 2305 | eval additional_includedir=\"$includedir\" | ||
| 2306 | eval additional_libdir=\"$libdir\" | ||
| 2307 | ]) | ||
| 2308 | AC_LIB_ARG_WITH([lib-prefix], | ||
| 2309 | [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib | ||
| 2310 | --without-lib-prefix don't search for libraries in includedir and libdir], | ||
| 2311 | [ | ||
| 2312 | if test "X$withval" = "Xno"; then | ||
| 2313 | use_additional=no | ||
| 2314 | else | ||
| 2315 | if test "X$withval" = "X"; then | ||
| 2316 | AC_LIB_WITH_FINAL_PREFIX([ | ||
| 2317 | eval additional_includedir=\"$includedir\" | ||
| 2318 | eval additional_libdir=\"$libdir\" | ||
| 2319 | ]) | ||
| 2320 | else | ||
| 2321 | additional_includedir="$withval/include" | ||
| 2322 | additional_libdir="$withval/$acl_libdirstem" | ||
| 2323 | fi | ||
| 2324 | fi | ||
| 2325 | ]) | ||
| 2326 | if test $use_additional = yes; then | ||
| 2327 | dnl Potentially add $additional_includedir to $CPPFLAGS. | ||
| 2328 | dnl But don't add it | ||
| 2329 | dnl 1. if it's the standard /usr/include, | ||
| 2330 | dnl 2. if it's already present in $CPPFLAGS, | ||
| 2331 | dnl 3. if it's /usr/local/include and we are using GCC on Linux, | ||
| 2332 | dnl 4. if it doesn't exist as a directory. | ||
| 2333 | if test "X$additional_includedir" != "X/usr/include"; then | ||
| 2334 | haveit= | ||
| 2335 | for x in $CPPFLAGS; do | ||
| 2336 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 2337 | if test "X$x" = "X-I$additional_includedir"; then | ||
| 2338 | haveit=yes | ||
| 2339 | break | ||
| 2340 | fi | ||
| 2341 | done | ||
| 2342 | if test -z "$haveit"; then | ||
| 2343 | if test "X$additional_includedir" = "X/usr/local/include"; then | ||
| 2344 | if test -n "$GCC"; then | ||
| 2345 | case $host_os in | ||
| 2346 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | ||
| 2347 | esac | ||
| 2348 | fi | ||
| 2349 | fi | ||
| 2350 | if test -z "$haveit"; then | ||
| 2351 | if test -d "$additional_includedir"; then | ||
| 2352 | dnl Really add $additional_includedir to $CPPFLAGS. | ||
| 2353 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" | ||
| 2354 | fi | ||
| 2355 | fi | ||
| 2356 | fi | ||
| 2357 | fi | ||
| 2358 | dnl Potentially add $additional_libdir to $LDFLAGS. | ||
| 2359 | dnl But don't add it | ||
| 2360 | dnl 1. if it's the standard /usr/lib, | ||
| 2361 | dnl 2. if it's already present in $LDFLAGS, | ||
| 2362 | dnl 3. if it's /usr/local/lib and we are using GCC on Linux, | ||
| 2363 | dnl 4. if it doesn't exist as a directory. | ||
| 2364 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then | ||
| 2365 | haveit= | ||
| 2366 | for x in $LDFLAGS; do | ||
| 2367 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
| 2368 | if test "X$x" = "X-L$additional_libdir"; then | ||
| 2369 | haveit=yes | ||
| 2370 | break | ||
| 2371 | fi | ||
| 2372 | done | ||
| 2373 | if test -z "$haveit"; then | ||
| 2374 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then | ||
| 2375 | if test -n "$GCC"; then | ||
| 2376 | case $host_os in | ||
| 2377 | linux*) haveit=yes;; | ||
| 2378 | esac | ||
| 2379 | fi | ||
| 2380 | fi | ||
| 2381 | if test -z "$haveit"; then | ||
| 2382 | if test -d "$additional_libdir"; then | ||
| 2383 | dnl Really add $additional_libdir to $LDFLAGS. | ||
| 2384 | LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" | ||
| 2385 | fi | ||
| 2386 | fi | ||
| 2387 | fi | ||
| 2388 | fi | ||
| 2389 | fi | ||
| 2390 | ]) | ||
| 2391 | |||
| 2392 | dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, | ||
| 2393 | dnl acl_final_exec_prefix, containing the values to which $prefix and | ||
| 2394 | dnl $exec_prefix will expand at the end of the configure script. | ||
| 2395 | AC_DEFUN([AC_LIB_PREPARE_PREFIX], | ||
| 2396 | [ | ||
| 2397 | dnl Unfortunately, prefix and exec_prefix get only finally determined | ||
| 2398 | dnl at the end of configure. | ||
| 2399 | if test "X$prefix" = "XNONE"; then | ||
| 2400 | acl_final_prefix="$ac_default_prefix" | ||
| 2401 | else | ||
| 2402 | acl_final_prefix="$prefix" | ||
| 2403 | fi | ||
| 2404 | if test "X$exec_prefix" = "XNONE"; then | ||
| 2405 | acl_final_exec_prefix='${prefix}' | ||
| 2406 | else | ||
| 2407 | acl_final_exec_prefix="$exec_prefix" | ||
| 2408 | fi | ||
| 2409 | acl_save_prefix="$prefix" | ||
| 2410 | prefix="$acl_final_prefix" | ||
| 2411 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | ||
| 2412 | prefix="$acl_save_prefix" | ||
| 2413 | ]) | ||
| 2414 | |||
| 2415 | dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the | ||
| 2416 | dnl variables prefix and exec_prefix bound to the values they will have | ||
| 2417 | dnl at the end of the configure script. | ||
| 2418 | AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], | ||
| 2419 | [ | ||
| 2420 | acl_save_prefix="$prefix" | ||
| 2421 | prefix="$acl_final_prefix" | ||
| 2422 | acl_save_exec_prefix="$exec_prefix" | ||
| 2423 | exec_prefix="$acl_final_exec_prefix" | ||
| 2424 | $1 | ||
| 2425 | exec_prefix="$acl_save_exec_prefix" | ||
| 2426 | prefix="$acl_save_prefix" | ||
| 2427 | ]) | ||
| 2428 | |||
| 2429 | dnl AC_LIB_PREPARE_MULTILIB creates | ||
| 2430 | dnl - a variable acl_libdirstem, containing the basename of the libdir, either | ||
| 2431 | dnl "lib" or "lib64" or "lib/64", | ||
| 2432 | dnl - a variable acl_libdirstem2, as a secondary possible value for | ||
| 2433 | dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or | ||
| 2434 | dnl "lib/amd64". | ||
| 2435 | AC_DEFUN([AC_LIB_PREPARE_MULTILIB], | ||
| 2436 | [ | ||
| 2437 | dnl There is no formal standard regarding lib and lib64. | ||
| 2438 | dnl On glibc systems, the current practice is that on a system supporting | ||
| 2439 | dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under | ||
| 2440 | dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine | ||
| 2441 | dnl the compiler's default mode by looking at the compiler's library search | ||
| 2442 | dnl path. If at least one of its elements ends in /lib64 or points to a | ||
| 2443 | dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. | ||
| 2444 | dnl Otherwise we use the default, namely "lib". | ||
| 2445 | dnl On Solaris systems, the current practice is that on a system supporting | ||
| 2446 | dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under | ||
| 2447 | dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or | ||
| 2448 | dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. | ||
| 2449 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
| 2450 | acl_libdirstem=lib | ||
| 2451 | acl_libdirstem2= | ||
| 2452 | case "$host_os" in | ||
| 2453 | solaris*) | ||
| 2454 | dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment | ||
| 2455 | dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. | ||
| 2456 | dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." | ||
| 2457 | dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the | ||
| 2458 | dnl symlink is missing, so we set acl_libdirstem2 too. | ||
| 2459 | AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], | ||
| 2460 | [AC_EGREP_CPP([sixtyfour bits], [ | ||
| 2461 | #ifdef _LP64 | ||
| 2462 | sixtyfour bits | ||
| 2463 | #endif | ||
| 2464 | ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) | ||
| 2465 | ]) | ||
| 2466 | if test $gl_cv_solaris_64bit = yes; then | ||
| 2467 | acl_libdirstem=lib/64 | ||
| 2468 | case "$host_cpu" in | ||
| 2469 | sparc*) acl_libdirstem2=lib/sparcv9 ;; | ||
| 2470 | i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; | ||
| 2471 | esac | ||
| 2472 | fi | ||
| 2473 | ;; | ||
| 2474 | *) | ||
| 2475 | searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | ||
| 2476 | if test -n "$searchpath"; then | ||
| 2477 | acl_save_IFS="${IFS= }"; IFS=":" | ||
| 2478 | for searchdir in $searchpath; do | ||
| 2479 | if test -d "$searchdir"; then | ||
| 2480 | case "$searchdir" in | ||
| 2481 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | ||
| 2482 | */../ | */.. ) | ||
| 2483 | # Better ignore directories of this form. They are misleading. | ||
| 2484 | ;; | ||
| 2485 | *) searchdir=`cd "$searchdir" && pwd` | ||
| 2486 | case "$searchdir" in | ||
| 2487 | */lib64 ) acl_libdirstem=lib64 ;; | ||
| 2488 | esac ;; | ||
| 2489 | esac | ||
| 2490 | fi | ||
| 2491 | done | ||
| 2492 | IFS="$acl_save_IFS" | ||
| 2493 | fi | ||
| 2494 | ;; | ||
| 2495 | esac | ||
| 2496 | test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" | ||
| 2497 | ]) | ||
| 2498 | |||
| 2499 | # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- | ||
| 2500 | # | ||
| 2501 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, | ||
| 2502 | # 2006, 2007, 2008, 2009, 2010, 2011 Free Software | ||
| 2503 | # Foundation, Inc. | ||
| 2504 | # Written by Gordon Matzigkeit, 1996 | ||
| 2505 | # | ||
| 2506 | # This file is free software; the Free Software Foundation gives | ||
| 2507 | # unlimited permission to copy and/or distribute it, with or without | ||
| 2508 | # modifications, as long as this notice is preserved. | ||
| 2509 | |||
| 2510 | m4_define([_LT_COPYING], [dnl | ||
| 2511 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, | ||
| 2512 | # 2006, 2007, 2008, 2009, 2010, 2011 Free Software | ||
| 2513 | # Foundation, Inc. | ||
| 2514 | # Written by Gordon Matzigkeit, 1996 | ||
| 2515 | # | ||
| 2516 | # This file is part of GNU Libtool. | ||
| 2517 | # | ||
| 2518 | # GNU Libtool is free software; you can redistribute it and/or | ||
| 2519 | # modify it under the terms of the GNU General Public License as | ||
| 2520 | # published by the Free Software Foundation; either version 2 of | ||
| 2521 | # the License, or (at your option) any later version. | ||
| 2522 | # | ||
| 2523 | # As a special exception to the GNU General Public License, | ||
| 2524 | # if you distribute this file as part of a program or library that | ||
| 2525 | # is built using GNU Libtool, you may include this file under the | ||
| 2526 | # same distribution terms that you use for the rest of that program. | ||
| 2527 | # | ||
| 2528 | # GNU Libtool is distributed in the hope that it will be useful, | ||
| 2529 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 2530 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 2531 | # GNU General Public License for more details. | ||
| 2532 | # | ||
| 2533 | # You should have received a copy of the GNU General Public License | ||
| 2534 | # along with GNU Libtool; see the file COPYING. If not, a copy | ||
| 2535 | # can be downloaded from http://www.gnu.org/licenses/gpl.html, or | ||
| 2536 | # obtained by writing to the Free Software Foundation, Inc., | ||
| 2537 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 2538 | ]) | ||
| 2539 | |||
| 2540 | # serial 57 LT_INIT | ||
| 2541 | |||
| 2542 | |||
| 2543 | # LT_PREREQ(VERSION) | ||
| 2544 | # ------------------ | ||
| 2545 | # Complain and exit if this libtool version is less that VERSION. | ||
| 2546 | m4_defun([LT_PREREQ], | ||
| 2547 | [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, | ||
| 2548 | [m4_default([$3], | ||
| 2549 | [m4_fatal([Libtool version $1 or higher is required], | ||
| 2550 | 63)])], | ||
| 2551 | [$2])]) | ||
| 2552 | |||
| 2553 | |||
| 2554 | # _LT_CHECK_BUILDDIR | ||
| 2555 | # ------------------ | ||
| 2556 | # Complain if the absolute build directory name contains unusual characters | ||
| 2557 | m4_defun([_LT_CHECK_BUILDDIR], | ||
| 2558 | [case `pwd` in | ||
| 2559 | *\ * | *\ *) | ||
| 2560 | AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; | ||
| 2561 | esac | ||
| 2562 | ]) | ||
| 2563 | |||
| 2564 | |||
| 2565 | # LT_INIT([OPTIONS]) | ||
| 2566 | # ------------------ | ||
| 2567 | AC_DEFUN([LT_INIT], | ||
| 2568 | [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT | ||
| 2569 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl | ||
| 2570 | AC_BEFORE([$0], [LT_LANG])dnl | ||
| 2571 | AC_BEFORE([$0], [LT_OUTPUT])dnl | ||
| 2572 | AC_BEFORE([$0], [LTDL_INIT])dnl | ||
| 2573 | m4_require([_LT_CHECK_BUILDDIR])dnl | ||
| 2574 | |||
| 2575 | dnl Autoconf doesn't catch unexpanded LT_ macros by default: | ||
| 2576 | m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl | ||
| 2577 | m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl | ||
| 2578 | dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 | ||
| 2579 | dnl unless we require an AC_DEFUNed macro: | ||
| 2580 | AC_REQUIRE([LTOPTIONS_VERSION])dnl | ||
| 2581 | AC_REQUIRE([LTSUGAR_VERSION])dnl | ||
| 2582 | AC_REQUIRE([LTVERSION_VERSION])dnl | ||
| 2583 | AC_REQUIRE([LTOBSOLETE_VERSION])dnl | ||
| 2584 | m4_require([_LT_PROG_LTMAIN])dnl | ||
| 2585 | |||
| 2586 | _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) | ||
| 2587 | |||
| 2588 | dnl Parse OPTIONS | ||
| 2589 | _LT_SET_OPTIONS([$0], [$1]) | ||
| 2590 | |||
| 2591 | # This can be used to rebuild libtool when needed | ||
| 2592 | LIBTOOL_DEPS="$ltmain" | ||
| 2593 | |||
| 2594 | # Always use our own libtool. | ||
| 2595 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | ||
| 2596 | AC_SUBST(LIBTOOL)dnl | ||
| 2597 | |||
| 2598 | _LT_SETUP | ||
| 2599 | |||
| 2600 | # Only expand once: | ||
| 2601 | m4_define([LT_INIT]) | ||
| 2602 | ])# LT_INIT | ||
| 2603 | |||
| 2604 | # Old names: | ||
| 2605 | AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) | ||
| 2606 | AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) | ||
| 2607 | dnl aclocal-1.4 backwards compatibility: | ||
| 2608 | dnl AC_DEFUN([AC_PROG_LIBTOOL], []) | ||
| 2609 | dnl AC_DEFUN([AM_PROG_LIBTOOL], []) | ||
| 2610 | |||
| 2611 | |||
| 2612 | # _LT_CC_BASENAME(CC) | ||
| 2613 | # ------------------- | ||
| 2614 | # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. | ||
| 2615 | m4_defun([_LT_CC_BASENAME], | ||
| 2616 | [for cc_temp in $1""; do | ||
| 2617 | case $cc_temp in | ||
| 2618 | compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; | ||
| 2619 | distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; | ||
| 2620 | \-*) ;; | ||
| 2621 | *) break;; | ||
| 2622 | esac | ||
| 2623 | done | ||
| 2624 | cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` | ||
| 2625 | ]) | ||
| 2626 | |||
| 2627 | |||
| 2628 | # _LT_FILEUTILS_DEFAULTS | ||
| 2629 | # ---------------------- | ||
| 2630 | # It is okay to use these file commands and assume they have been set | ||
| 2631 | # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. | ||
| 2632 | m4_defun([_LT_FILEUTILS_DEFAULTS], | ||
| 2633 | [: ${CP="cp -f"} | ||
| 2634 | : ${MV="mv -f"} | ||
| 2635 | : ${RM="rm -f"} | ||
| 2636 | ])# _LT_FILEUTILS_DEFAULTS | ||
| 2637 | |||
| 2638 | |||
| 2639 | # _LT_SETUP | ||
| 2640 | # --------- | ||
| 2641 | m4_defun([_LT_SETUP], | ||
| 2642 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
| 2643 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | ||
| 2644 | AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl | ||
| 2645 | AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl | ||
| 2646 | |||
| 2647 | _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl | ||
| 2648 | dnl | ||
| 2649 | _LT_DECL([], [host_alias], [0], [The host system])dnl | ||
| 2650 | _LT_DECL([], [host], [0])dnl | ||
| 2651 | _LT_DECL([], [host_os], [0])dnl | ||
| 2652 | dnl | ||
| 2653 | _LT_DECL([], [build_alias], [0], [The build system])dnl | ||
| 2654 | _LT_DECL([], [build], [0])dnl | ||
| 2655 | _LT_DECL([], [build_os], [0])dnl | ||
| 2656 | dnl | ||
| 2657 | AC_REQUIRE([AC_PROG_CC])dnl | ||
| 2658 | AC_REQUIRE([LT_PATH_LD])dnl | ||
| 2659 | AC_REQUIRE([LT_PATH_NM])dnl | ||
| 2660 | dnl | ||
| 2661 | AC_REQUIRE([AC_PROG_LN_S])dnl | ||
| 2662 | test -z "$LN_S" && LN_S="ln -s" | ||
| 2663 | _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl | ||
| 2664 | dnl | ||
| 2665 | AC_REQUIRE([LT_CMD_MAX_LEN])dnl | ||
| 2666 | _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl | ||
| 2667 | _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl | ||
| 2668 | dnl | ||
| 2669 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
| 2670 | m4_require([_LT_CHECK_SHELL_FEATURES])dnl | ||
| 2671 | m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl | ||
| 2672 | m4_require([_LT_CMD_RELOAD])dnl | ||
| 2673 | m4_require([_LT_CHECK_MAGIC_METHOD])dnl | ||
| 2674 | m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl | ||
| 2675 | m4_require([_LT_CMD_OLD_ARCHIVE])dnl | ||
| 2676 | m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl | ||
| 2677 | m4_require([_LT_WITH_SYSROOT])dnl | ||
| 2678 | |||
| 2679 | _LT_CONFIG_LIBTOOL_INIT([ | ||
| 2680 | # See if we are running on zsh, and set the options which allow our | ||
| 2681 | # commands through without removal of \ escapes INIT. | ||
| 2682 | if test -n "\${ZSH_VERSION+set}" ; then | ||
| 2683 | setopt NO_GLOB_SUBST | ||
| 2684 | fi | ||
| 2685 | ]) | ||
| 2686 | if test -n "${ZSH_VERSION+set}" ; then | ||
| 2687 | setopt NO_GLOB_SUBST | ||
| 2688 | fi | ||
| 2689 | |||
| 2690 | _LT_CHECK_OBJDIR | ||
| 2691 | |||
| 2692 | m4_require([_LT_TAG_COMPILER])dnl | ||
| 2693 | |||
| 2694 | case $host_os in | ||
| 2695 | aix3*) | ||
| 2696 | # AIX sometimes has problems with the GCC collect2 program. For some | ||
| 2697 | # reason, if we set the COLLECT_NAMES environment variable, the problems | ||
| 2698 | # vanish in a puff of smoke. | ||
| 2699 | if test "X${COLLECT_NAMES+set}" != Xset; then | ||
| 2700 | COLLECT_NAMES= | ||
| 2701 | export COLLECT_NAMES | ||
| 2702 | fi | ||
| 2703 | ;; | ||
| 2704 | esac | ||
| 2705 | |||
| 2706 | # Global variables: | ||
| 2707 | ofile=libtool | ||
| 2708 | can_build_shared=yes | ||
| 2709 | |||
| 2710 | # All known linkers require a `.a' archive for static linking (except MSVC, | ||
| 2711 | # which needs '.lib'). | ||
| 2712 | libext=a | ||
| 2713 | |||
| 2714 | with_gnu_ld="$lt_cv_prog_gnu_ld" | ||
| 2715 | |||
| 2716 | old_CC="$CC" | ||
| 2717 | old_CFLAGS="$CFLAGS" | ||
| 2718 | |||
| 2719 | # Set sane defaults for various variables | ||
| 2720 | test -z "$CC" && CC=cc | ||
| 2721 | test -z "$LTCC" && LTCC=$CC | ||
| 2722 | test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS | ||
| 2723 | test -z "$LD" && LD=ld | ||
| 2724 | test -z "$ac_objext" && ac_objext=o | ||
| 2725 | |||
| 2726 | _LT_CC_BASENAME([$compiler]) | ||
| 2727 | |||
| 2728 | # Only perform the check for file, if the check method requires it | ||
| 2729 | test -z "$MAGIC_CMD" && MAGIC_CMD=file | ||
| 2730 | case $deplibs_check_method in | ||
| 2731 | file_magic*) | ||
| 2732 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then | ||
| 2733 | _LT_PATH_MAGIC | ||
| 2734 | fi | ||
| 2735 | ;; | ||
| 2736 | esac | ||
| 2737 | |||
| 2738 | # Use C for the default configuration in the libtool script | ||
| 2739 | LT_SUPPORTED_TAG([CC]) | ||
| 2740 | _LT_LANG_C_CONFIG | ||
| 2741 | _LT_LANG_DEFAULT_CONFIG | ||
| 2742 | _LT_CONFIG_COMMANDS | ||
| 2743 | ])# _LT_SETUP | ||
| 2744 | |||
| 2745 | |||
| 2746 | # _LT_PREPARE_SED_QUOTE_VARS | ||
| 2747 | # -------------------------- | ||
| 2748 | # Define a few sed substitution that help us do robust quoting. | ||
| 2749 | m4_defun([_LT_PREPARE_SED_QUOTE_VARS], | ||
| 2750 | [# Backslashify metacharacters that are still active within | ||
| 2751 | # double-quoted strings. | ||
| 2752 | sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' | ||
| 2753 | |||
| 2754 | # Same as above, but do not quote variable references. | ||
| 2755 | double_quote_subst='s/\([["`\\]]\)/\\\1/g' | ||
| 2756 | |||
| 2757 | # Sed substitution to delay expansion of an escaped shell variable in a | ||
| 2758 | # double_quote_subst'ed string. | ||
| 2759 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' | ||
| 2760 | |||
| 2761 | # Sed substitution to delay expansion of an escaped single quote. | ||
| 2762 | delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' | ||
| 2763 | |||
| 2764 | # Sed substitution to avoid accidental globbing in evaled expressions | ||
| 2765 | no_glob_subst='s/\*/\\\*/g' | ||
| 2766 | ]) | ||
| 2767 | |||
| 2768 | # _LT_PROG_LTMAIN | ||
| 2769 | # --------------- | ||
| 2770 | # Note that this code is called both from `configure', and `config.status' | ||
| 2771 | # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, | ||
| 2772 | # `config.status' has no value for ac_aux_dir unless we are using Automake, | ||
| 2773 | # so we pass a copy along to make sure it has a sensible value anyway. | ||
| 2774 | m4_defun([_LT_PROG_LTMAIN], | ||
| 2775 | [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl | ||
| 2776 | _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) | ||
| 2777 | ltmain="$ac_aux_dir/ltmain.sh" | ||
| 2778 | ])# _LT_PROG_LTMAIN | ||
| 2779 | |||
| 2780 | |||
| 2781 | |||
| 2782 | # So that we can recreate a full libtool script including additional | ||
| 2783 | # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS | ||
| 2784 | # in macros and then make a single call at the end using the `libtool' | ||
| 2785 | # label. | ||
| 2786 | |||
| 2787 | |||
| 2788 | # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) | ||
| 2789 | # ---------------------------------------- | ||
| 2790 | # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. | ||
| 2791 | m4_define([_LT_CONFIG_LIBTOOL_INIT], | ||
| 2792 | [m4_ifval([$1], | ||
| 2793 | [m4_append([_LT_OUTPUT_LIBTOOL_INIT], | ||
| 2794 | [$1 | ||
| 2795 | ])])]) | ||
| 2796 | |||
| 2797 | # Initialize. | ||
| 2798 | m4_define([_LT_OUTPUT_LIBTOOL_INIT]) | ||
| 2799 | |||
| 2800 | |||
| 2801 | # _LT_CONFIG_LIBTOOL([COMMANDS]) | ||
| 2802 | # ------------------------------ | ||
| 2803 | # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. | ||
| 2804 | m4_define([_LT_CONFIG_LIBTOOL], | ||
| 2805 | [m4_ifval([$1], | ||
| 2806 | [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], | ||
| 2807 | [$1 | ||
| 2808 | ])])]) | ||
| 2809 | |||
| 2810 | # Initialize. | ||
| 2811 | m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) | ||
| 2812 | |||
| 2813 | |||
| 2814 | # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) | ||
| 2815 | # ----------------------------------------------------- | ||
| 2816 | m4_defun([_LT_CONFIG_SAVE_COMMANDS], | ||
| 2817 | [_LT_CONFIG_LIBTOOL([$1]) | ||
| 2818 | _LT_CONFIG_LIBTOOL_INIT([$2]) | ||
| 2819 | ]) | ||
| 2820 | |||
| 2821 | |||
| 2822 | # _LT_FORMAT_COMMENT([COMMENT]) | ||
| 2823 | # ----------------------------- | ||
| 2824 | # Add leading comment marks to the start of each line, and a trailing | ||
| 2825 | # full-stop to the whole comment if one is not present already. | ||
| 2826 | m4_define([_LT_FORMAT_COMMENT], | ||
| 2827 | [m4_ifval([$1], [ | ||
| 2828 | m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], | ||
| 2829 | [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) | ||
| 2830 | )]) | ||
| 2831 | |||
| 2832 | |||
| 2833 | |||
| 2834 | |||
| 2835 | |||
| 2836 | # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) | ||
| 2837 | # ------------------------------------------------------------------- | ||
| 2838 | # CONFIGNAME is the name given to the value in the libtool script. | ||
| 2839 | # VARNAME is the (base) name used in the configure script. | ||
| 2840 | # VALUE may be 0, 1 or 2 for a computed quote escaped value based on | ||
| 2841 | # VARNAME. Any other value will be used directly. | ||
| 2842 | m4_define([_LT_DECL], | ||
| 2843 | [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], | ||
| 2844 | [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], | ||
| 2845 | [m4_ifval([$1], [$1], [$2])]) | ||
| 2846 | lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) | ||
| 2847 | m4_ifval([$4], | ||
| 2848 | [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) | ||
| 2849 | lt_dict_add_subkey([lt_decl_dict], [$2], | ||
| 2850 | [tagged?], [m4_ifval([$5], [yes], [no])])]) | ||
| 2851 | ]) | ||
| 2852 | |||
| 2853 | |||
| 2854 | # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) | ||
| 2855 | # -------------------------------------------------------- | ||
| 2856 | m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) | ||
| 2857 | |||
| 2858 | |||
| 2859 | # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) | ||
| 2860 | # ------------------------------------------------ | ||
| 2861 | m4_define([lt_decl_tag_varnames], | ||
| 2862 | [_lt_decl_filter([tagged?], [yes], $@)]) | ||
| 2863 | |||
| 2864 | |||
| 2865 | # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) | ||
| 2866 | # --------------------------------------------------------- | ||
| 2867 | m4_define([_lt_decl_filter], | ||
| 2868 | [m4_case([$#], | ||
| 2869 | [0], [m4_fatal([$0: too few arguments: $#])], | ||
| 2870 | [1], [m4_fatal([$0: too few arguments: $#: $1])], | ||
| 2871 | [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], | ||
| 2872 | [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], | ||
| 2873 | [lt_dict_filter([lt_decl_dict], $@)])[]dnl | ||
| 2874 | ]) | ||
| 2875 | |||
| 2876 | |||
| 2877 | # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) | ||
| 2878 | # -------------------------------------------------- | ||
| 2879 | m4_define([lt_decl_quote_varnames], | ||
| 2880 | [_lt_decl_filter([value], [1], $@)]) | ||
| 2881 | |||
| 2882 | |||
| 2883 | # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) | ||
| 2884 | # --------------------------------------------------- | ||
| 2885 | m4_define([lt_decl_dquote_varnames], | ||
| 2886 | [_lt_decl_filter([value], [2], $@)]) | ||
| 2887 | |||
| 2888 | |||
| 2889 | # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) | ||
| 2890 | # --------------------------------------------------- | ||
| 2891 | m4_define([lt_decl_varnames_tagged], | ||
| 2892 | [m4_assert([$# <= 2])dnl | ||
| 2893 | _$0(m4_quote(m4_default([$1], [[, ]])), | ||
| 2894 | m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), | ||
| 2895 | m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) | ||
| 2896 | m4_define([_lt_decl_varnames_tagged], | ||
| 2897 | [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) | ||
| 2898 | |||
| 2899 | |||
| 2900 | # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) | ||
| 2901 | # ------------------------------------------------ | ||
| 2902 | m4_define([lt_decl_all_varnames], | ||
| 2903 | [_$0(m4_quote(m4_default([$1], [[, ]])), | ||
| 2904 | m4_if([$2], [], | ||
| 2905 | m4_quote(lt_decl_varnames), | ||
| 2906 | m4_quote(m4_shift($@))))[]dnl | ||
| 2907 | ]) | ||
| 2908 | m4_define([_lt_decl_all_varnames], | ||
| 2909 | [lt_join($@, lt_decl_varnames_tagged([$1], | ||
| 2910 | lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl | ||
| 2911 | ]) | ||
| 2912 | |||
| 2913 | |||
| 2914 | # _LT_CONFIG_STATUS_DECLARE([VARNAME]) | ||
| 2915 | # ------------------------------------ | ||
| 2916 | # Quote a variable value, and forward it to `config.status' so that its | ||
| 2917 | # declaration there will have the same value as in `configure'. VARNAME | ||
| 2918 | # must have a single quote delimited value for this to work. | ||
| 2919 | m4_define([_LT_CONFIG_STATUS_DECLARE], | ||
| 2920 | [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) | ||
| 2921 | |||
| 2922 | |||
| 2923 | # _LT_CONFIG_STATUS_DECLARATIONS | ||
| 2924 | # ------------------------------ | ||
| 2925 | # We delimit libtool config variables with single quotes, so when | ||
| 2926 | # we write them to config.status, we have to be sure to quote all | ||
| 2927 | # embedded single quotes properly. In configure, this macro expands | ||
| 2928 | # each variable declared with _LT_DECL (and _LT_TAGDECL) into: | ||
| 2929 | # | ||
| 2930 | # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' | ||
| 2931 | m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], | ||
| 2932 | [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), | ||
| 2933 | [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) | ||
| 2934 | |||
| 2935 | |||
| 2936 | # _LT_LIBTOOL_TAGS | ||
| 2937 | # ---------------- | ||
| 2938 | # Output comment and list of tags supported by the script | ||
| 2939 | m4_defun([_LT_LIBTOOL_TAGS], | ||
| 2940 | [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl | ||
| 2941 | available_tags="_LT_TAGS"dnl | ||
| 2942 | ]) | ||
| 2943 | |||
| 2944 | |||
| 2945 | # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) | ||
| 2946 | # ----------------------------------- | ||
| 2947 | # Extract the dictionary values for VARNAME (optionally with TAG) and | ||
| 2948 | # expand to a commented shell variable setting: | ||
| 2949 | # | ||
| 2950 | # # Some comment about what VAR is for. | ||
| 2951 | # visible_name=$lt_internal_name | ||
| 2952 | m4_define([_LT_LIBTOOL_DECLARE], | ||
| 2953 | [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], | ||
| 2954 | [description])))[]dnl | ||
| 2955 | m4_pushdef([_libtool_name], | ||
| 2956 | m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl | ||
| 2957 | m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), | ||
| 2958 | [0], [_libtool_name=[$]$1], | ||
| 2959 | [1], [_libtool_name=$lt_[]$1], | ||
| 2960 | [2], [_libtool_name=$lt_[]$1], | ||
| 2961 | [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl | ||
| 2962 | m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl | ||
| 2963 | ]) | ||
| 2964 | |||
| 2965 | |||
| 2966 | # _LT_LIBTOOL_CONFIG_VARS | ||
| 2967 | # ----------------------- | ||
| 2968 | # Produce commented declarations of non-tagged libtool config variables | ||
| 2969 | # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' | ||
| 2970 | # script. Tagged libtool config variables (even for the LIBTOOL CONFIG | ||
| 2971 | # section) are produced by _LT_LIBTOOL_TAG_VARS. | ||
| 2972 | m4_defun([_LT_LIBTOOL_CONFIG_VARS], | ||
| 2973 | [m4_foreach([_lt_var], | ||
| 2974 | m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), | ||
| 2975 | [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) | ||
| 2976 | |||
| 2977 | |||
| 2978 | # _LT_LIBTOOL_TAG_VARS(TAG) | ||
| 2979 | # ------------------------- | ||
| 2980 | m4_define([_LT_LIBTOOL_TAG_VARS], | ||
| 2981 | [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), | ||
| 2982 | [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) | ||
| 2983 | |||
| 2984 | |||
| 2985 | # _LT_TAGVAR(VARNAME, [TAGNAME]) | ||
| 2986 | # ------------------------------ | ||
| 2987 | m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) | ||
| 2988 | |||
| 2989 | |||
| 2990 | # _LT_CONFIG_COMMANDS | ||
| 2991 | # ------------------- | ||
| 2992 | # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of | ||
| 2993 | # variables for single and double quote escaping we saved from calls | ||
| 2994 | # to _LT_DECL, we can put quote escaped variables declarations | ||
| 2995 | # into `config.status', and then the shell code to quote escape them in | ||
| 2996 | # for loops in `config.status'. Finally, any additional code accumulated | ||
| 2997 | # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. | ||
| 2998 | m4_defun([_LT_CONFIG_COMMANDS], | ||
| 2999 | [AC_PROVIDE_IFELSE([LT_OUTPUT], | ||
| 3000 | dnl If the libtool generation code has been placed in $CONFIG_LT, | ||
| 3001 | dnl instead of duplicating it all over again into config.status, | ||
| 3002 | dnl then we will have config.status run $CONFIG_LT later, so it | ||
| 3003 | dnl needs to know what name is stored there: | ||
| 3004 | [AC_CONFIG_COMMANDS([libtool], | ||
| 3005 | [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], | ||
| 3006 | dnl If the libtool generation code is destined for config.status, | ||
| 3007 | dnl expand the accumulated commands and init code now: | ||
| 3008 | [AC_CONFIG_COMMANDS([libtool], | ||
| 3009 | [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) | ||
| 3010 | ])#_LT_CONFIG_COMMANDS | ||
| 3011 | |||
| 3012 | |||
| 3013 | # Initialize. | ||
| 3014 | m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], | ||
| 3015 | [ | ||
| 3016 | |||
| 3017 | # The HP-UX ksh and POSIX shell print the target directory to stdout | ||
| 3018 | # if CDPATH is set. | ||
| 3019 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | ||
| 3020 | |||
| 3021 | sed_quote_subst='$sed_quote_subst' | ||
| 3022 | double_quote_subst='$double_quote_subst' | ||
| 3023 | delay_variable_subst='$delay_variable_subst' | ||
| 3024 | _LT_CONFIG_STATUS_DECLARATIONS | ||
| 3025 | LTCC='$LTCC' | ||
| 3026 | LTCFLAGS='$LTCFLAGS' | ||
| 3027 | compiler='$compiler_DEFAULT' | ||
| 3028 | |||
| 3029 | # A function that is used when there is no print builtin or printf. | ||
| 3030 | func_fallback_echo () | ||
| 3031 | { | ||
| 3032 | eval 'cat <<_LTECHO_EOF | ||
| 3033 | \$[]1 | ||
| 3034 | _LTECHO_EOF' | ||
| 3035 | } | ||
| 3036 | |||
| 3037 | # Quote evaled strings. | ||
| 3038 | for var in lt_decl_all_varnames([[ \ | ||
| 3039 | ]], lt_decl_quote_varnames); do | ||
| 3040 | case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in | ||
| 3041 | *[[\\\\\\\`\\"\\\$]]*) | ||
| 3042 | eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" | ||
| 3043 | ;; | ||
| 3044 | *) | ||
| 3045 | eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" | ||
| 3046 | ;; | ||
| 3047 | esac | ||
| 3048 | done | ||
| 3049 | |||
| 3050 | # Double-quote double-evaled strings. | ||
| 3051 | for var in lt_decl_all_varnames([[ \ | ||
| 3052 | ]], lt_decl_dquote_varnames); do | ||
| 3053 | case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in | ||
| 3054 | *[[\\\\\\\`\\"\\\$]]*) | ||
| 3055 | eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" | ||
| 3056 | ;; | ||
| 3057 | *) | ||
| 3058 | eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" | ||
| 3059 | ;; | ||
| 3060 | esac | ||
| 3061 | done | ||
| 3062 | |||
| 3063 | _LT_OUTPUT_LIBTOOL_INIT | ||
| 3064 | ]) | ||
| 3065 | |||
| 3066 | # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) | ||
| 3067 | # ------------------------------------ | ||
| 3068 | # Generate a child script FILE with all initialization necessary to | ||
| 3069 | # reuse the environment learned by the parent script, and make the | ||
| 3070 | # file executable. If COMMENT is supplied, it is inserted after the | ||
| 3071 | # `#!' sequence but before initialization text begins. After this | ||
| 3072 | # macro, additional text can be appended to FILE to form the body of | ||
| 3073 | # the child script. The macro ends with non-zero status if the | ||
| 3074 | # file could not be fully written (such as if the disk is full). | ||
| 3075 | m4_ifdef([AS_INIT_GENERATED], | ||
| 3076 | [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], | ||
| 3077 | [m4_defun([_LT_GENERATED_FILE_INIT], | ||
| 3078 | [m4_require([AS_PREPARE])]dnl | ||
| 3079 | [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl | ||
| 3080 | [lt_write_fail=0 | ||
| 3081 | cat >$1 <<_ASEOF || lt_write_fail=1 | ||
| 3082 | #! $SHELL | ||
| 3083 | # Generated by $as_me. | ||
| 3084 | $2 | ||
| 3085 | SHELL=\${CONFIG_SHELL-$SHELL} | ||
| 3086 | export SHELL | ||
| 3087 | _ASEOF | ||
| 3088 | cat >>$1 <<\_ASEOF || lt_write_fail=1 | ||
| 3089 | AS_SHELL_SANITIZE | ||
| 3090 | _AS_PREPARE | ||
| 3091 | exec AS_MESSAGE_FD>&1 | ||
| 3092 | _ASEOF | ||
| 3093 | test $lt_write_fail = 0 && chmod +x $1[]dnl | ||
| 3094 | m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT | ||
| 3095 | |||
| 3096 | # LT_OUTPUT | ||
| 3097 | # --------- | ||
| 3098 | # This macro allows early generation of the libtool script (before | ||
| 3099 | # AC_OUTPUT is called), incase it is used in configure for compilation | ||
| 3100 | # tests. | ||
| 3101 | AC_DEFUN([LT_OUTPUT], | ||
| 3102 | [: ${CONFIG_LT=./config.lt} | ||
| 3103 | AC_MSG_NOTICE([creating $CONFIG_LT]) | ||
| 3104 | _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], | ||
| 3105 | [# Run this file to recreate a libtool stub with the current configuration.]) | ||
| 3106 | |||
| 3107 | cat >>"$CONFIG_LT" <<\_LTEOF | ||
| 3108 | lt_cl_silent=false | ||
| 3109 | exec AS_MESSAGE_LOG_FD>>config.log | ||
| 3110 | { | ||
| 3111 | echo | ||
| 3112 | AS_BOX([Running $as_me.]) | ||
| 3113 | } >&AS_MESSAGE_LOG_FD | ||
| 3114 | |||
| 3115 | lt_cl_help="\ | ||
| 3116 | \`$as_me' creates a local libtool stub from the current configuration, | ||
| 3117 | for use in further configure time tests before the real libtool is | ||
| 3118 | generated. | ||
| 3119 | |||
| 3120 | Usage: $[0] [[OPTIONS]] | ||
| 3121 | |||
| 3122 | -h, --help print this help, then exit | ||
| 3123 | -V, --version print version number, then exit | ||
| 3124 | -q, --quiet do not print progress messages | ||
| 3125 | -d, --debug don't remove temporary files | ||
| 3126 | |||
| 3127 | Report bugs to <bug-libtool@gnu.org>." | ||
| 3128 | |||
| 3129 | lt_cl_version="\ | ||
| 3130 | m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl | ||
| 3131 | m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) | ||
| 3132 | configured by $[0], generated by m4_PACKAGE_STRING. | ||
| 3133 | |||
| 3134 | Copyright (C) 2011 Free Software Foundation, Inc. | ||
| 3135 | This config.lt script is free software; the Free Software Foundation | ||
| 3136 | gives unlimited permision to copy, distribute and modify it." | ||
| 3137 | |||
| 3138 | while test $[#] != 0 | ||
| 3139 | do | ||
| 3140 | case $[1] in | ||
| 3141 | --version | --v* | -V ) | ||
| 3142 | echo "$lt_cl_version"; exit 0 ;; | ||
| 3143 | --help | --h* | -h ) | ||
| 3144 | echo "$lt_cl_help"; exit 0 ;; | ||
| 3145 | --debug | --d* | -d ) | ||
| 3146 | debug=: ;; | ||
| 3147 | --quiet | --q* | --silent | --s* | -q ) | ||
| 3148 | lt_cl_silent=: ;; | ||
| 3149 | |||
| 3150 | -*) AC_MSG_ERROR([unrecognized option: $[1] | ||
| 3151 | Try \`$[0] --help' for more information.]) ;; | ||
| 3152 | |||
| 3153 | *) AC_MSG_ERROR([unrecognized argument: $[1] | ||
| 3154 | Try \`$[0] --help' for more information.]) ;; | ||
| 3155 | esac | ||
| 3156 | shift | ||
| 3157 | done | ||
| 3158 | |||
| 3159 | if $lt_cl_silent; then | ||
| 3160 | exec AS_MESSAGE_FD>/dev/null | ||
| 3161 | fi | ||
| 3162 | _LTEOF | ||
| 3163 | |||
| 3164 | cat >>"$CONFIG_LT" <<_LTEOF | ||
| 3165 | _LT_OUTPUT_LIBTOOL_COMMANDS_INIT | ||
| 3166 | _LTEOF | ||
| 3167 | |||
| 3168 | cat >>"$CONFIG_LT" <<\_LTEOF | ||
| 3169 | AC_MSG_NOTICE([creating $ofile]) | ||
| 3170 | _LT_OUTPUT_LIBTOOL_COMMANDS | ||
| 3171 | AS_EXIT(0) | ||
| 3172 | _LTEOF | ||
| 3173 | chmod +x "$CONFIG_LT" | ||
| 3174 | |||
| 3175 | # configure is writing to config.log, but config.lt does its own redirection, | ||
| 3176 | # appending to config.log, which fails on DOS, as config.log is still kept | ||
| 3177 | # open by configure. Here we exec the FD to /dev/null, effectively closing | ||
| 3178 | # config.log, so it can be properly (re)opened and appended to by config.lt. | ||
| 3179 | lt_cl_success=: | ||
| 3180 | test "$silent" = yes && | ||
| 3181 | lt_config_lt_args="$lt_config_lt_args --quiet" | ||
| 3182 | exec AS_MESSAGE_LOG_FD>/dev/null | ||
| 3183 | $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false | ||
| 3184 | exec AS_MESSAGE_LOG_FD>>config.log | ||
| 3185 | $lt_cl_success || AS_EXIT(1) | ||
| 3186 | ])# LT_OUTPUT | ||
| 3187 | |||
| 3188 | |||
| 3189 | # _LT_CONFIG(TAG) | ||
| 3190 | # --------------- | ||
| 3191 | # If TAG is the built-in tag, create an initial libtool script with a | ||
| 3192 | # default configuration from the untagged config vars. Otherwise add code | ||
| 3193 | # to config.status for appending the configuration named by TAG from the | ||
| 3194 | # matching tagged config vars. | ||
| 3195 | m4_defun([_LT_CONFIG], | ||
| 3196 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
| 3197 | _LT_CONFIG_SAVE_COMMANDS([ | ||
| 3198 | m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl | ||
| 3199 | m4_if(_LT_TAG, [C], [ | ||
| 3200 | # See if we are running on zsh, and set the options which allow our | ||
| 3201 | # commands through without removal of \ escapes. | ||
| 3202 | if test -n "${ZSH_VERSION+set}" ; then | ||
| 3203 | setopt NO_GLOB_SUBST | ||
| 3204 | fi | ||
| 3205 | |||
| 3206 | cfgfile="${ofile}T" | ||
| 3207 | trap "$RM \"$cfgfile\"; exit 1" 1 2 15 | ||
| 3208 | $RM "$cfgfile" | ||
| 3209 | |||
| 3210 | cat <<_LT_EOF >> "$cfgfile" | ||
| 3211 | #! $SHELL | ||
| 3212 | |||
| 3213 | # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. | ||
| 3214 | # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION | ||
| 3215 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | ||
| 3216 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. | ||
| 3217 | # | ||
| 3218 | _LT_COPYING | ||
| 3219 | _LT_LIBTOOL_TAGS | ||
| 3220 | |||
| 3221 | # ### BEGIN LIBTOOL CONFIG | ||
| 3222 | _LT_LIBTOOL_CONFIG_VARS | ||
| 3223 | _LT_LIBTOOL_TAG_VARS | ||
| 3224 | # ### END LIBTOOL CONFIG | ||
| 3225 | |||
| 3226 | _LT_EOF | ||
| 3227 | |||
| 3228 | case $host_os in | ||
| 3229 | aix3*) | ||
| 3230 | cat <<\_LT_EOF >> "$cfgfile" | ||
| 3231 | # AIX sometimes has problems with the GCC collect2 program. For some | ||
| 3232 | # reason, if we set the COLLECT_NAMES environment variable, the problems | ||
| 3233 | # vanish in a puff of smoke. | ||
| 3234 | if test "X${COLLECT_NAMES+set}" != Xset; then | ||
| 3235 | COLLECT_NAMES= | ||
| 3236 | export COLLECT_NAMES | ||
| 3237 | fi | ||
| 3238 | _LT_EOF | ||
| 3239 | ;; | ||
| 3240 | esac | ||
| 3241 | |||
| 3242 | _LT_PROG_LTMAIN | ||
| 3243 | |||
| 3244 | # We use sed instead of cat because bash on DJGPP gets confused if | ||
| 3245 | # if finds mixed CR/LF and LF-only lines. Since sed operates in | ||
| 3246 | # text mode, it properly converts lines to CR/LF. This bash problem | ||
| 3247 | # is reportedly fixed, but why not run on old versions too? | ||
| 3248 | sed '$q' "$ltmain" >> "$cfgfile" \ | ||
| 3249 | || (rm -f "$cfgfile"; exit 1) | ||
| 3250 | |||
| 3251 | _LT_PROG_REPLACE_SHELLFNS | ||
| 3252 | |||
| 3253 | mv -f "$cfgfile" "$ofile" || | ||
| 3254 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") | ||
| 3255 | chmod +x "$ofile" | ||
| 3256 | ], | ||
| 3257 | [cat <<_LT_EOF >> "$ofile" | ||
| 3258 | |||
| 3259 | dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded | ||
| 3260 | dnl in a comment (ie after a #). | ||
| 3261 | # ### BEGIN LIBTOOL TAG CONFIG: $1 | ||
| 3262 | _LT_LIBTOOL_TAG_VARS(_LT_TAG) | ||
| 3263 | # ### END LIBTOOL TAG CONFIG: $1 | ||
| 3264 | _LT_EOF | ||
| 3265 | ])dnl /m4_if | ||
| 3266 | ], | ||
| 3267 | [m4_if([$1], [], [ | ||
| 3268 | PACKAGE='$PACKAGE' | ||
| 3269 | VERSION='$VERSION' | ||
| 3270 | TIMESTAMP='$TIMESTAMP' | ||
| 3271 | RM='$RM' | ||
| 3272 | ofile='$ofile'], []) | ||
| 3273 | ])dnl /_LT_CONFIG_SAVE_COMMANDS | ||
| 3274 | ])# _LT_CONFIG | ||
| 3275 | |||
| 3276 | |||
| 3277 | # LT_SUPPORTED_TAG(TAG) | ||
| 3278 | # --------------------- | ||
| 3279 | # Trace this macro to discover what tags are supported by the libtool | ||
| 3280 | # --tag option, using: | ||
| 3281 | # autoconf --trace 'LT_SUPPORTED_TAG:$1' | ||
| 3282 | AC_DEFUN([LT_SUPPORTED_TAG], []) | ||
| 3283 | |||
| 3284 | |||
| 3285 | # C support is built-in for now | ||
| 3286 | m4_define([_LT_LANG_C_enabled], []) | ||
| 3287 | m4_define([_LT_TAGS], []) | ||
| 3288 | |||
| 3289 | |||
| 3290 | # LT_LANG(LANG) | ||
| 3291 | # ------------- | ||
| 3292 | # Enable libtool support for the given language if not already enabled. | ||
| 3293 | AC_DEFUN([LT_LANG], | ||
| 3294 | [AC_BEFORE([$0], [LT_OUTPUT])dnl | ||
| 3295 | m4_case([$1], | ||
| 3296 | [C], [_LT_LANG(C)], | ||
| 3297 | [C++], [_LT_LANG(CXX)], | ||
| 3298 | [Go], [_LT_LANG(GO)], | ||
| 3299 | [Java], [_LT_LANG(GCJ)], | ||
| 3300 | [Fortran 77], [_LT_LANG(F77)], | ||
| 3301 | [Fortran], [_LT_LANG(FC)], | ||
| 3302 | [Windows Resource], [_LT_LANG(RC)], | ||
| 3303 | [m4_ifdef([_LT_LANG_]$1[_CONFIG], | ||
| 3304 | [_LT_LANG($1)], | ||
| 3305 | [m4_fatal([$0: unsupported language: "$1"])])])dnl | ||
| 3306 | ])# LT_LANG | ||
| 3307 | |||
| 3308 | |||
| 3309 | # _LT_LANG(LANGNAME) | ||
| 3310 | # ------------------ | ||
| 3311 | m4_defun([_LT_LANG], | ||
| 3312 | [m4_ifdef([_LT_LANG_]$1[_enabled], [], | ||
| 3313 | [LT_SUPPORTED_TAG([$1])dnl | ||
| 3314 | m4_append([_LT_TAGS], [$1 ])dnl | ||
| 3315 | m4_define([_LT_LANG_]$1[_enabled], [])dnl | ||
| 3316 | _LT_LANG_$1_CONFIG($1)])dnl | ||
| 3317 | ])# _LT_LANG | ||
| 3318 | |||
| 3319 | |||
| 3320 | m4_ifndef([AC_PROG_GO], [ | ||
| 3321 | # NOTE: This macro has been submitted for inclusion into # | ||
| 3322 | # GNU Autoconf as AC_PROG_GO. When it is available in # | ||
| 3323 | # a released version of Autoconf we should remove this # | ||
| 3324 | # macro and use it instead. # | ||
| 3325 | m4_defun([AC_PROG_GO], | ||
| 3326 | [AC_LANG_PUSH(Go)dnl | ||
| 3327 | AC_ARG_VAR([GOC], [Go compiler command])dnl | ||
| 3328 | AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl | ||
| 3329 | _AC_ARG_VAR_LDFLAGS()dnl | ||
| 3330 | AC_CHECK_TOOL(GOC, gccgo) | ||
| 3331 | if test -z "$GOC"; then | ||
| 3332 | if test -n "$ac_tool_prefix"; then | ||
| 3333 | AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) | ||
| 3334 | fi | ||
| 3335 | fi | ||
| 3336 | if test -z "$GOC"; then | ||
| 3337 | AC_CHECK_PROG(GOC, gccgo, gccgo, false) | ||
| 3338 | fi | ||
| 3339 | ])#m4_defun | ||
| 3340 | ])#m4_ifndef | ||
| 3341 | |||
| 3342 | |||
| 3343 | # _LT_LANG_DEFAULT_CONFIG | ||
| 3344 | # ----------------------- | ||
| 3345 | m4_defun([_LT_LANG_DEFAULT_CONFIG], | ||
| 3346 | [AC_PROVIDE_IFELSE([AC_PROG_CXX], | ||
| 3347 | [LT_LANG(CXX)], | ||
| 3348 | [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) | ||
| 3349 | |||
| 3350 | AC_PROVIDE_IFELSE([AC_PROG_F77], | ||
| 3351 | [LT_LANG(F77)], | ||
| 3352 | [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) | ||
| 3353 | |||
| 3354 | AC_PROVIDE_IFELSE([AC_PROG_FC], | ||
| 3355 | [LT_LANG(FC)], | ||
| 3356 | [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) | ||
| 3357 | |||
| 3358 | dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal | ||
| 3359 | dnl pulling things in needlessly. | ||
| 3360 | AC_PROVIDE_IFELSE([AC_PROG_GCJ], | ||
| 3361 | [LT_LANG(GCJ)], | ||
| 3362 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], | ||
| 3363 | [LT_LANG(GCJ)], | ||
| 3364 | [AC_PROVIDE_IFELSE([LT_PROG_GCJ], | ||
| 3365 | [LT_LANG(GCJ)], | ||
| 3366 | [m4_ifdef([AC_PROG_GCJ], | ||
| 3367 | [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) | ||
| 3368 | m4_ifdef([A][M_PROG_GCJ], | ||
| 3369 | [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) | ||
| 3370 | m4_ifdef([LT_PROG_GCJ], | ||
| 3371 | [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) | ||
| 3372 | |||
| 3373 | AC_PROVIDE_IFELSE([AC_PROG_GO], | ||
| 3374 | [LT_LANG(GO)], | ||
| 3375 | [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) | ||
| 3376 | |||
| 3377 | AC_PROVIDE_IFELSE([LT_PROG_RC], | ||
| 3378 | [LT_LANG(RC)], | ||
| 3379 | [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) | ||
| 3380 | ])# _LT_LANG_DEFAULT_CONFIG | ||
| 3381 | |||
| 3382 | # Obsolete macros: | ||
| 3383 | AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) | ||
| 3384 | AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) | ||
| 3385 | AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) | ||
| 3386 | AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) | ||
| 3387 | AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) | ||
| 3388 | dnl aclocal-1.4 backwards compatibility: | ||
| 3389 | dnl AC_DEFUN([AC_LIBTOOL_CXX], []) | ||
| 3390 | dnl AC_DEFUN([AC_LIBTOOL_F77], []) | ||
| 3391 | dnl AC_DEFUN([AC_LIBTOOL_FC], []) | ||
| 3392 | dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) | ||
| 3393 | dnl AC_DEFUN([AC_LIBTOOL_RC], []) | ||
| 3394 | |||
| 3395 | |||
| 3396 | # _LT_TAG_COMPILER | ||
| 3397 | # ---------------- | ||
| 3398 | m4_defun([_LT_TAG_COMPILER], | ||
| 3399 | [AC_REQUIRE([AC_PROG_CC])dnl | ||
| 3400 | |||
| 3401 | _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl | ||
| 3402 | _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl | ||
| 3403 | _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl | ||
| 3404 | _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl | ||
| 3405 | |||
| 3406 | # If no C compiler was specified, use CC. | ||
| 3407 | LTCC=${LTCC-"$CC"} | ||
| 3408 | |||
| 3409 | # If no C compiler flags were specified, use CFLAGS. | ||
| 3410 | LTCFLAGS=${LTCFLAGS-"$CFLAGS"} | ||
| 3411 | |||
| 3412 | # Allow CC to be a program name with arguments. | ||
| 3413 | compiler=$CC | ||
| 3414 | ])# _LT_TAG_COMPILER | ||
| 3415 | |||
| 3416 | |||
| 3417 | # _LT_COMPILER_BOILERPLATE | ||
| 3418 | # ------------------------ | ||
| 3419 | # Check for compiler boilerplate output or warnings with | ||
| 3420 | # the simple compiler test code. | ||
| 3421 | m4_defun([_LT_COMPILER_BOILERPLATE], | ||
| 3422 | [m4_require([_LT_DECL_SED])dnl | ||
| 3423 | ac_outfile=conftest.$ac_objext | ||
| 3424 | echo "$lt_simple_compile_test_code" >conftest.$ac_ext | ||
| 3425 | eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | ||
| 3426 | _lt_compiler_boilerplate=`cat conftest.err` | ||
| 3427 | $RM conftest* | ||
| 3428 | ])# _LT_COMPILER_BOILERPLATE | ||
| 3429 | |||
| 3430 | |||
| 3431 | # _LT_LINKER_BOILERPLATE | ||
| 3432 | # ---------------------- | ||
| 3433 | # Check for linker boilerplate output or warnings with | ||
| 3434 | # the simple link test code. | ||
| 3435 | m4_defun([_LT_LINKER_BOILERPLATE], | ||
| 3436 | [m4_require([_LT_DECL_SED])dnl | ||
| 3437 | ac_outfile=conftest.$ac_objext | ||
| 3438 | echo "$lt_simple_link_test_code" >conftest.$ac_ext | ||
| 3439 | eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | ||
| 3440 | _lt_linker_boilerplate=`cat conftest.err` | ||
| 3441 | $RM -r conftest* | ||
| 3442 | ])# _LT_LINKER_BOILERPLATE | ||
| 3443 | |||
| 3444 | # _LT_REQUIRED_DARWIN_CHECKS | ||
| 3445 | # ------------------------- | ||
| 3446 | m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ | ||
| 3447 | case $host_os in | ||
| 3448 | rhapsody* | darwin*) | ||
| 3449 | AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) | ||
| 3450 | AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) | ||
| 3451 | AC_CHECK_TOOL([LIPO], [lipo], [:]) | ||
| 3452 | AC_CHECK_TOOL([OTOOL], [otool], [:]) | ||
| 3453 | AC_CHECK_TOOL([OTOOL64], [otool64], [:]) | ||
| 3454 | _LT_DECL([], [DSYMUTIL], [1], | ||
| 3455 | [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) | ||
| 3456 | _LT_DECL([], [NMEDIT], [1], | ||
| 3457 | [Tool to change global to local symbols on Mac OS X]) | ||
| 3458 | _LT_DECL([], [LIPO], [1], | ||
| 3459 | [Tool to manipulate fat objects and archives on Mac OS X]) | ||
| 3460 | _LT_DECL([], [OTOOL], [1], | ||
| 3461 | [ldd/readelf like tool for Mach-O binaries on Mac OS X]) | ||
| 3462 | _LT_DECL([], [OTOOL64], [1], | ||
| 3463 | [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) | ||
| 3464 | |||
| 3465 | AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], | ||
| 3466 | [lt_cv_apple_cc_single_mod=no | ||
| 3467 | if test -z "${LT_MULTI_MODULE}"; then | ||
| 3468 | # By default we will add the -single_module flag. You can override | ||
| 3469 | # by either setting the environment variable LT_MULTI_MODULE | ||
| 3470 | # non-empty at configure time, or by adding -multi_module to the | ||
| 3471 | # link flags. | ||
| 3472 | rm -rf libconftest.dylib* | ||
| 3473 | echo "int foo(void){return 1;}" > conftest.c | ||
| 3474 | echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ | ||
| 3475 | -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD | ||
| 3476 | $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ | ||
| 3477 | -dynamiclib -Wl,-single_module conftest.c 2>conftest.err | ||
| 3478 | _lt_result=$? | ||
| 3479 | # If there is a non-empty error log, and "single_module" | ||
| 3480 | # appears in it, assume the flag caused a linker warning | ||
| 3481 | if test -s conftest.err && $GREP single_module conftest.err; then | ||
| 3482 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
| 3483 | # Otherwise, if the output was created with a 0 exit code from | ||
| 3484 | # the compiler, it worked. | ||
| 3485 | elif test -f libconftest.dylib && test $_lt_result -eq 0; then | ||
| 3486 | lt_cv_apple_cc_single_mod=yes | ||
| 3487 | else | ||
| 3488 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
| 3489 | fi | ||
| 3490 | rm -rf libconftest.dylib* | ||
| 3491 | rm -f conftest.* | ||
| 3492 | fi]) | ||
| 3493 | |||
| 3494 | AC_CACHE_CHECK([for -exported_symbols_list linker flag], | ||
| 3495 | [lt_cv_ld_exported_symbols_list], | ||
| 3496 | [lt_cv_ld_exported_symbols_list=no | ||
| 3497 | save_LDFLAGS=$LDFLAGS | ||
| 3498 | echo "_main" > conftest.sym | ||
| 3499 | LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" | ||
| 3500 | AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], | ||
| 3501 | [lt_cv_ld_exported_symbols_list=yes], | ||
| 3502 | [lt_cv_ld_exported_symbols_list=no]) | ||
| 3503 | LDFLAGS="$save_LDFLAGS" | ||
| 3504 | ]) | ||
| 3505 | |||
| 3506 | AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], | ||
| 3507 | [lt_cv_ld_force_load=no | ||
| 3508 | cat > conftest.c << _LT_EOF | ||
| 3509 | int forced_loaded() { return 2;} | ||
| 3510 | _LT_EOF | ||
| 3511 | echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD | ||
| 3512 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD | ||
| 3513 | echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD | ||
| 3514 | $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD | ||
| 3515 | echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD | ||
| 3516 | $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD | ||
| 3517 | cat > conftest.c << _LT_EOF | ||
| 3518 | int main() { return 0;} | ||
| 3519 | _LT_EOF | ||
| 3520 | echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD | ||
| 3521 | $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err | ||
| 3522 | _lt_result=$? | ||
| 3523 | if test -s conftest.err && $GREP force_load conftest.err; then | ||
| 3524 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
| 3525 | elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then | ||
| 3526 | lt_cv_ld_force_load=yes | ||
| 3527 | else | ||
| 3528 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
| 3529 | fi | ||
| 3530 | rm -f conftest.err libconftest.a conftest conftest.c | ||
| 3531 | rm -rf conftest.dSYM | ||
| 3532 | ]) | ||
| 3533 | case $host_os in | ||
| 3534 | rhapsody* | darwin1.[[012]]) | ||
| 3535 | _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; | ||
| 3536 | darwin1.*) | ||
| 3537 | _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; | ||
| 3538 | darwin*) # darwin 5.x on | ||
| 3539 | # if running on 10.5 or later, the deployment target defaults | ||
| 3540 | # to the OS version, if on x86, and 10.4, the deployment | ||
| 3541 | # target defaults to 10.4. Don't you love it? | ||
| 3542 | case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in | ||
| 3543 | 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) | ||
| 3544 | _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; | ||
| 3545 | 10.[[012]]*) | ||
| 3546 | _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; | ||
| 3547 | 10.*) | ||
| 3548 | _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; | ||
| 3549 | esac | ||
| 3550 | ;; | ||
| 3551 | esac | ||
| 3552 | if test "$lt_cv_apple_cc_single_mod" = "yes"; then | ||
| 3553 | _lt_dar_single_mod='$single_module' | ||
| 3554 | fi | ||
| 3555 | if test "$lt_cv_ld_exported_symbols_list" = "yes"; then | ||
| 3556 | _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' | ||
| 3557 | else | ||
| 3558 | _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
| 3559 | fi | ||
| 3560 | if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then | ||
| 3561 | _lt_dsymutil='~$DSYMUTIL $lib || :' | ||
| 3562 | else | ||
| 3563 | _lt_dsymutil= | ||
| 3564 | fi | ||
| 3565 | ;; | ||
| 3566 | esac | ||
| 3567 | ]) | ||
| 3568 | |||
| 3569 | |||
| 3570 | # _LT_DARWIN_LINKER_FEATURES([TAG]) | ||
| 3571 | # --------------------------------- | ||
| 3572 | # Checks for linker and compiler features on darwin | ||
| 3573 | m4_defun([_LT_DARWIN_LINKER_FEATURES], | ||
| 3574 | [ | ||
| 3575 | m4_require([_LT_REQUIRED_DARWIN_CHECKS]) | ||
| 3576 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
| 3577 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
| 3578 | _LT_TAGVAR(hardcode_automatic, $1)=yes | ||
| 3579 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | ||
| 3580 | if test "$lt_cv_ld_force_load" = "yes"; then | ||
| 3581 | _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' | ||
| 3582 | m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], | ||
| 3583 | [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) | ||
| 3584 | else | ||
| 3585 | _LT_TAGVAR(whole_archive_flag_spec, $1)='' | ||
| 3586 | fi | ||
| 3587 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
| 3588 | _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" | ||
| 3589 | case $cc_basename in | ||
| 3590 | ifort*) _lt_dar_can_shared=yes ;; | ||
| 3591 | *) _lt_dar_can_shared=$GCC ;; | ||
| 3592 | esac | ||
| 3593 | if test "$_lt_dar_can_shared" = "yes"; then | ||
| 3594 | output_verbose_link_cmd=func_echo_all | ||
| 3595 | _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" | ||
| 3596 | _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" | ||
| 3597 | _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" | ||
| 3598 | _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" | ||
| 3599 | m4_if([$1], [CXX], | ||
| 3600 | [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then | ||
| 3601 | _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" | ||
| 3602 | _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" | ||
| 3603 | fi | ||
| 3604 | ],[]) | ||
| 3605 | else | ||
| 3606 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 3607 | fi | ||
| 3608 | ]) | ||
| 3609 | |||
| 3610 | # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) | ||
| 3611 | # ---------------------------------- | ||
| 3612 | # Links a minimal program and checks the executable | ||
| 3613 | # for the system default hardcoded library path. In most cases, | ||
| 3614 | # this is /usr/lib:/lib, but when the MPI compilers are used | ||
| 3615 | # the location of the communication and MPI libs are included too. | ||
| 3616 | # If we don't find anything, use the default library path according | ||
| 3617 | # to the aix ld manual. | ||
| 3618 | # Store the results from the different compilers for each TAGNAME. | ||
| 3619 | # Allow to override them for all tags through lt_cv_aix_libpath. | ||
| 3620 | m4_defun([_LT_SYS_MODULE_PATH_AIX], | ||
| 3621 | [m4_require([_LT_DECL_SED])dnl | ||
| 3622 | if test "${lt_cv_aix_libpath+set}" = set; then | ||
| 3623 | aix_libpath=$lt_cv_aix_libpath | ||
| 3624 | else | ||
| 3625 | AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], | ||
| 3626 | [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ | ||
| 3627 | lt_aix_libpath_sed='[ | ||
| 3628 | /Import File Strings/,/^$/ { | ||
| 3629 | /^0/ { | ||
| 3630 | s/^0 *\([^ ]*\) *$/\1/ | ||
| 3631 | p | ||
| 3632 | } | ||
| 3633 | }]' | ||
| 3634 | _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
| 3635 | # Check for a 64-bit object if we didn't find anything. | ||
| 3636 | if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then | ||
| 3637 | _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
| 3638 | fi],[]) | ||
| 3639 | if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then | ||
| 3640 | _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" | ||
| 3641 | fi | ||
| 3642 | ]) | ||
| 3643 | aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) | ||
| 3644 | fi | ||
| 3645 | ])# _LT_SYS_MODULE_PATH_AIX | ||
| 3646 | |||
| 3647 | |||
| 3648 | # _LT_SHELL_INIT(ARG) | ||
| 3649 | # ------------------- | ||
| 3650 | m4_define([_LT_SHELL_INIT], | ||
| 3651 | [m4_divert_text([M4SH-INIT], [$1 | ||
| 3652 | ])])# _LT_SHELL_INIT | ||
| 3653 | |||
| 3654 | |||
| 3655 | |||
| 3656 | # _LT_PROG_ECHO_BACKSLASH | ||
| 3657 | # ----------------------- | ||
| 3658 | # Find how we can fake an echo command that does not interpret backslash. | ||
| 3659 | # In particular, with Autoconf 2.60 or later we add some code to the start | ||
| 3660 | # of the generated configure script which will find a shell with a builtin | ||
| 3661 | # printf (which we can use as an echo command). | ||
| 3662 | m4_defun([_LT_PROG_ECHO_BACKSLASH], | ||
| 3663 | [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | ||
| 3664 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO | ||
| 3665 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO | ||
| 3666 | |||
| 3667 | AC_MSG_CHECKING([how to print strings]) | ||
| 3668 | # Test print first, because it will be a builtin if present. | ||
| 3669 | if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ | ||
| 3670 | test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
| 3671 | ECHO='print -r --' | ||
| 3672 | elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
| 3673 | ECHO='printf %s\n' | ||
| 3674 | else | ||
| 3675 | # Use this function as a fallback that always works. | ||
| 3676 | func_fallback_echo () | ||
| 3677 | { | ||
| 3678 | eval 'cat <<_LTECHO_EOF | ||
| 3679 | $[]1 | ||
| 3680 | _LTECHO_EOF' | ||
| 3681 | } | ||
| 3682 | ECHO='func_fallback_echo' | ||
| 3683 | fi | ||
| 3684 | |||
| 3685 | # func_echo_all arg... | ||
| 3686 | # Invoke $ECHO with all args, space-separated. | ||
| 3687 | func_echo_all () | ||
| 3688 | { | ||
| 3689 | $ECHO "$*" | ||
| 3690 | } | ||
| 3691 | |||
| 3692 | case "$ECHO" in | ||
| 3693 | printf*) AC_MSG_RESULT([printf]) ;; | ||
| 3694 | print*) AC_MSG_RESULT([print -r]) ;; | ||
| 3695 | *) AC_MSG_RESULT([cat]) ;; | ||
| 3696 | esac | ||
| 3697 | |||
| 3698 | m4_ifdef([_AS_DETECT_SUGGESTED], | ||
| 3699 | [_AS_DETECT_SUGGESTED([ | ||
| 3700 | test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( | ||
| 3701 | ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | ||
| 3702 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO | ||
| 3703 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO | ||
| 3704 | PATH=/empty FPATH=/empty; export PATH FPATH | ||
| 3705 | test "X`printf %s $ECHO`" = "X$ECHO" \ | ||
| 3706 | || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) | ||
| 3707 | |||
| 3708 | _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) | ||
| 3709 | _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) | ||
| 3710 | ])# _LT_PROG_ECHO_BACKSLASH | ||
| 3711 | |||
| 3712 | |||
| 3713 | # _LT_WITH_SYSROOT | ||
| 3714 | # ---------------- | ||
| 3715 | AC_DEFUN([_LT_WITH_SYSROOT], | ||
| 3716 | [AC_MSG_CHECKING([for sysroot]) | ||
| 3717 | AC_ARG_WITH([sysroot], | ||
| 3718 | [ --with-sysroot[=DIR] Search for dependent libraries within DIR | ||
| 3719 | (or the compiler's sysroot if not specified).], | ||
| 3720 | [], [with_sysroot=no]) | ||
| 3721 | |||
| 3722 | dnl lt_sysroot will always be passed unquoted. We quote it here | ||
| 3723 | dnl in case the user passed a directory name. | ||
| 3724 | lt_sysroot= | ||
| 3725 | case ${with_sysroot} in #( | ||
| 3726 | yes) | ||
| 3727 | if test "$GCC" = yes; then | ||
| 3728 | lt_sysroot=`$CC --print-sysroot 2>/dev/null` | ||
| 3729 | fi | ||
| 3730 | ;; #( | ||
| 3731 | /*) | ||
| 3732 | lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` | ||
| 3733 | ;; #( | ||
| 3734 | no|'') | ||
| 3735 | ;; #( | ||
| 3736 | *) | ||
| 3737 | AC_MSG_RESULT([${with_sysroot}]) | ||
| 3738 | AC_MSG_ERROR([The sysroot must be an absolute path.]) | ||
| 3739 | ;; | ||
| 3740 | esac | ||
| 3741 | |||
| 3742 | AC_MSG_RESULT([${lt_sysroot:-no}]) | ||
| 3743 | _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl | ||
| 3744 | [dependent libraries, and in which our libraries should be installed.])]) | ||
| 3745 | |||
| 3746 | # _LT_ENABLE_LOCK | ||
| 3747 | # --------------- | ||
| 3748 | m4_defun([_LT_ENABLE_LOCK], | ||
| 3749 | [AC_ARG_ENABLE([libtool-lock], | ||
| 3750 | [AS_HELP_STRING([--disable-libtool-lock], | ||
| 3751 | [avoid locking (might break parallel builds)])]) | ||
| 3752 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes | ||
| 3753 | |||
| 3754 | # Some flags need to be propagated to the compiler or linker for good | ||
| 3755 | # libtool support. | ||
| 3756 | case $host in | ||
| 3757 | ia64-*-hpux*) | ||
| 3758 | # Find out which ABI we are using. | ||
| 3759 | echo 'int i;' > conftest.$ac_ext | ||
| 3760 | if AC_TRY_EVAL(ac_compile); then | ||
| 3761 | case `/usr/bin/file conftest.$ac_objext` in | ||
| 3762 | *ELF-32*) | ||
| 3763 | HPUX_IA64_MODE="32" | ||
| 3764 | ;; | ||
| 3765 | *ELF-64*) | ||
| 3766 | HPUX_IA64_MODE="64" | ||
| 3767 | ;; | ||
| 3768 | esac | ||
| 3769 | fi | ||
| 3770 | rm -rf conftest* | ||
| 3771 | ;; | ||
| 3772 | *-*-irix6*) | ||
| 3773 | # Find out which ABI we are using. | ||
| 3774 | echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext | ||
| 3775 | if AC_TRY_EVAL(ac_compile); then | ||
| 3776 | if test "$lt_cv_prog_gnu_ld" = yes; then | ||
| 3777 | case `/usr/bin/file conftest.$ac_objext` in | ||
| 3778 | *32-bit*) | ||
| 3779 | LD="${LD-ld} -melf32bsmip" | ||
| 3780 | ;; | ||
| 3781 | *N32*) | ||
| 3782 | LD="${LD-ld} -melf32bmipn32" | ||
| 3783 | ;; | ||
| 3784 | *64-bit*) | ||
| 3785 | LD="${LD-ld} -melf64bmip" | ||
| 3786 | ;; | ||
| 3787 | esac | ||
| 3788 | else | ||
| 3789 | case `/usr/bin/file conftest.$ac_objext` in | ||
| 3790 | *32-bit*) | ||
| 3791 | LD="${LD-ld} -32" | ||
| 3792 | ;; | ||
| 3793 | *N32*) | ||
| 3794 | LD="${LD-ld} -n32" | ||
| 3795 | ;; | ||
| 3796 | *64-bit*) | ||
| 3797 | LD="${LD-ld} -64" | ||
| 3798 | ;; | ||
| 3799 | esac | ||
| 3800 | fi | ||
| 3801 | fi | ||
| 3802 | rm -rf conftest* | ||
| 3803 | ;; | ||
| 3804 | |||
| 3805 | x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ | ||
| 3806 | s390*-*linux*|s390*-*tpf*|sparc*-*linux*) | ||
| 3807 | # Find out which ABI we are using. | ||
| 3808 | echo 'int i;' > conftest.$ac_ext | ||
| 3809 | if AC_TRY_EVAL(ac_compile); then | ||
| 3810 | case `/usr/bin/file conftest.o` in | ||
| 3811 | *32-bit*) | ||
| 3812 | case $host in | ||
| 3813 | x86_64-*kfreebsd*-gnu) | ||
| 3814 | LD="${LD-ld} -m elf_i386_fbsd" | ||
| 3815 | ;; | ||
| 3816 | x86_64-*linux*) | ||
| 3817 | case `/usr/bin/file conftest.o` in | ||
| 3818 | *x86-64*) | ||
| 3819 | LD="${LD-ld} -m elf32_x86_64" | ||
| 3820 | ;; | ||
| 3821 | *) | ||
| 3822 | LD="${LD-ld} -m elf_i386" | ||
| 3823 | ;; | ||
| 3824 | esac | ||
| 3825 | ;; | ||
| 3826 | powerpc64le-*) | ||
| 3827 | LD="${LD-ld} -m elf32lppclinux" | ||
| 3828 | ;; | ||
| 3829 | powerpc64-*) | ||
| 3830 | LD="${LD-ld} -m elf32ppclinux" | ||
| 3831 | ;; | ||
| 3832 | s390x-*linux*) | ||
| 3833 | LD="${LD-ld} -m elf_s390" | ||
| 3834 | ;; | ||
| 3835 | sparc64-*linux*) | ||
| 3836 | LD="${LD-ld} -m elf32_sparc" | ||
| 3837 | ;; | ||
| 3838 | esac | ||
| 3839 | ;; | ||
| 3840 | *64-bit*) | ||
| 3841 | case $host in | ||
| 3842 | x86_64-*kfreebsd*-gnu) | ||
| 3843 | LD="${LD-ld} -m elf_x86_64_fbsd" | ||
| 3844 | ;; | ||
| 3845 | x86_64-*linux*) | ||
| 3846 | LD="${LD-ld} -m elf_x86_64" | ||
| 3847 | ;; | ||
| 3848 | powerpcle-*) | ||
| 3849 | LD="${LD-ld} -m elf64lppc" | ||
| 3850 | ;; | ||
| 3851 | powerpc-*) | ||
| 3852 | LD="${LD-ld} -m elf64ppc" | ||
| 3853 | ;; | ||
| 3854 | s390*-*linux*|s390*-*tpf*) | ||
| 3855 | LD="${LD-ld} -m elf64_s390" | ||
| 3856 | ;; | ||
| 3857 | sparc*-*linux*) | ||
| 3858 | LD="${LD-ld} -m elf64_sparc" | ||
| 3859 | ;; | ||
| 3860 | esac | ||
| 3861 | ;; | ||
| 3862 | esac | ||
| 3863 | fi | ||
| 3864 | rm -rf conftest* | ||
| 3865 | ;; | ||
| 3866 | |||
| 3867 | *-*-sco3.2v5*) | ||
| 3868 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | ||
| 3869 | SAVE_CFLAGS="$CFLAGS" | ||
| 3870 | CFLAGS="$CFLAGS -belf" | ||
| 3871 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, | ||
| 3872 | [AC_LANG_PUSH(C) | ||
| 3873 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) | ||
| 3874 | AC_LANG_POP]) | ||
| 3875 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then | ||
| 3876 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | ||
| 3877 | CFLAGS="$SAVE_CFLAGS" | ||
| 3878 | fi | ||
| 3879 | ;; | ||
| 3880 | *-*solaris*) | ||
| 3881 | # Find out which ABI we are using. | ||
| 3882 | echo 'int i;' > conftest.$ac_ext | ||
| 3883 | if AC_TRY_EVAL(ac_compile); then | ||
| 3884 | case `/usr/bin/file conftest.o` in | ||
| 3885 | *64-bit*) | ||
| 3886 | case $lt_cv_prog_gnu_ld in | ||
| 3887 | yes*) | ||
| 3888 | case $host in | ||
| 3889 | i?86-*-solaris*) | ||
| 3890 | LD="${LD-ld} -m elf_x86_64" | ||
| 3891 | ;; | ||
| 3892 | sparc*-*-solaris*) | ||
| 3893 | LD="${LD-ld} -m elf64_sparc" | ||
| 3894 | ;; | ||
| 3895 | esac | ||
| 3896 | # GNU ld 2.21 introduced _sol2 emulations. Use them if available. | ||
| 3897 | if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then | ||
| 3898 | LD="${LD-ld}_sol2" | ||
| 3899 | fi | ||
| 3900 | ;; | ||
| 3901 | *) | ||
| 3902 | if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then | ||
| 3903 | LD="${LD-ld} -64" | ||
| 3904 | fi | ||
| 3905 | ;; | ||
| 3906 | esac | ||
| 3907 | ;; | ||
| 3908 | esac | ||
| 3909 | fi | ||
| 3910 | rm -rf conftest* | ||
| 3911 | ;; | ||
| 3912 | esac | ||
| 3913 | |||
| 3914 | need_locks="$enable_libtool_lock" | ||
| 3915 | ])# _LT_ENABLE_LOCK | ||
| 3916 | |||
| 3917 | |||
| 3918 | # _LT_PROG_AR | ||
| 3919 | # ----------- | ||
| 3920 | m4_defun([_LT_PROG_AR], | ||
| 3921 | [AC_CHECK_TOOLS(AR, [ar], false) | ||
| 3922 | : ${AR=ar} | ||
| 3923 | : ${AR_FLAGS=cru} | ||
| 3924 | _LT_DECL([], [AR], [1], [The archiver]) | ||
| 3925 | _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) | ||
| 3926 | |||
| 3927 | AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], | ||
| 3928 | [lt_cv_ar_at_file=no | ||
| 3929 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM], | ||
| 3930 | [echo conftest.$ac_objext > conftest.lst | ||
| 3931 | lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' | ||
| 3932 | AC_TRY_EVAL([lt_ar_try]) | ||
| 3933 | if test "$ac_status" -eq 0; then | ||
| 3934 | # Ensure the archiver fails upon bogus file names. | ||
| 3935 | rm -f conftest.$ac_objext libconftest.a | ||
| 3936 | AC_TRY_EVAL([lt_ar_try]) | ||
| 3937 | if test "$ac_status" -ne 0; then | ||
| 3938 | lt_cv_ar_at_file=@ | ||
| 3939 | fi | ||
| 3940 | fi | ||
| 3941 | rm -f conftest.* libconftest.a | ||
| 3942 | ]) | ||
| 3943 | ]) | ||
| 3944 | |||
| 3945 | if test "x$lt_cv_ar_at_file" = xno; then | ||
| 3946 | archiver_list_spec= | ||
| 3947 | else | ||
| 3948 | archiver_list_spec=$lt_cv_ar_at_file | ||
| 3949 | fi | ||
| 3950 | _LT_DECL([], [archiver_list_spec], [1], | ||
| 3951 | [How to feed a file listing to the archiver]) | ||
| 3952 | ])# _LT_PROG_AR | ||
| 3953 | |||
| 3954 | |||
| 3955 | # _LT_CMD_OLD_ARCHIVE | ||
| 3956 | # ------------------- | ||
| 3957 | m4_defun([_LT_CMD_OLD_ARCHIVE], | ||
| 3958 | [_LT_PROG_AR | ||
| 3959 | |||
| 3960 | AC_CHECK_TOOL(STRIP, strip, :) | ||
| 3961 | test -z "$STRIP" && STRIP=: | ||
| 3962 | _LT_DECL([], [STRIP], [1], [A symbol stripping program]) | ||
| 3963 | |||
| 3964 | AC_CHECK_TOOL(RANLIB, ranlib, :) | ||
| 3965 | test -z "$RANLIB" && RANLIB=: | ||
| 3966 | _LT_DECL([], [RANLIB], [1], | ||
| 3967 | [Commands used to install an old-style archive]) | ||
| 3968 | |||
| 3969 | # Determine commands to create old-style static archives. | ||
| 3970 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' | ||
| 3971 | old_postinstall_cmds='chmod 644 $oldlib' | ||
| 3972 | old_postuninstall_cmds= | ||
| 3973 | |||
| 3974 | if test -n "$RANLIB"; then | ||
| 3975 | case $host_os in | ||
| 3976 | openbsd*) | ||
| 3977 | old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" | ||
| 3978 | ;; | ||
| 3979 | *) | ||
| 3980 | old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" | ||
| 3981 | ;; | ||
| 3982 | esac | ||
| 3983 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" | ||
| 3984 | fi | ||
| 3985 | |||
| 3986 | case $host_os in | ||
| 3987 | darwin*) | ||
| 3988 | lock_old_archive_extraction=yes ;; | ||
| 3989 | *) | ||
| 3990 | lock_old_archive_extraction=no ;; | ||
| 3991 | esac | ||
| 3992 | _LT_DECL([], [old_postinstall_cmds], [2]) | ||
| 3993 | _LT_DECL([], [old_postuninstall_cmds], [2]) | ||
| 3994 | _LT_TAGDECL([], [old_archive_cmds], [2], | ||
| 3995 | [Commands used to build an old-style archive]) | ||
| 3996 | _LT_DECL([], [lock_old_archive_extraction], [0], | ||
| 3997 | [Whether to use a lock for old archive extraction]) | ||
| 3998 | ])# _LT_CMD_OLD_ARCHIVE | ||
| 3999 | |||
| 4000 | |||
| 4001 | # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, | ||
| 4002 | # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) | ||
| 4003 | # ---------------------------------------------------------------- | ||
| 4004 | # Check whether the given compiler option works | ||
| 4005 | AC_DEFUN([_LT_COMPILER_OPTION], | ||
| 4006 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
| 4007 | m4_require([_LT_DECL_SED])dnl | ||
| 4008 | AC_CACHE_CHECK([$1], [$2], | ||
| 4009 | [$2=no | ||
| 4010 | m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) | ||
| 4011 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
| 4012 | lt_compiler_flag="$3" | ||
| 4013 | # Insert the option either (1) after the last *FLAGS variable, or | ||
| 4014 | # (2) before a word containing "conftest.", or (3) at the end. | ||
| 4015 | # Note that $ac_compile itself does not contain backslashes and begins | ||
| 4016 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
| 4017 | # The option is referenced via a variable to avoid confusing sed. | ||
| 4018 | lt_compile=`echo "$ac_compile" | $SED \ | ||
| 4019 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | ||
| 4020 | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ | ||
| 4021 | -e 's:$: $lt_compiler_flag:'` | ||
| 4022 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) | ||
| 4023 | (eval "$lt_compile" 2>conftest.err) | ||
| 4024 | ac_status=$? | ||
| 4025 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
| 4026 | echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | ||
| 4027 | if (exit $ac_status) && test -s "$ac_outfile"; then | ||
| 4028 | # The compiler can only warn and ignore the option if not recognized | ||
| 4029 | # So say no if there are warnings other than the usual output. | ||
| 4030 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp | ||
| 4031 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 | ||
| 4032 | if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then | ||
| 4033 | $2=yes | ||
| 4034 | fi | ||
| 4035 | fi | ||
| 4036 | $RM conftest* | ||
| 4037 | ]) | ||
| 4038 | |||
| 4039 | if test x"[$]$2" = xyes; then | ||
| 4040 | m4_if([$5], , :, [$5]) | ||
| 4041 | else | ||
| 4042 | m4_if([$6], , :, [$6]) | ||
| 4043 | fi | ||
| 4044 | ])# _LT_COMPILER_OPTION | ||
| 4045 | |||
| 4046 | # Old name: | ||
| 4047 | AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) | ||
| 4048 | dnl aclocal-1.4 backwards compatibility: | ||
| 4049 | dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) | ||
| 4050 | |||
| 4051 | |||
| 4052 | # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, | ||
| 4053 | # [ACTION-SUCCESS], [ACTION-FAILURE]) | ||
| 4054 | # ---------------------------------------------------- | ||
| 4055 | # Check whether the given linker option works | ||
| 4056 | AC_DEFUN([_LT_LINKER_OPTION], | ||
| 4057 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
| 4058 | m4_require([_LT_DECL_SED])dnl | ||
| 4059 | AC_CACHE_CHECK([$1], [$2], | ||
| 4060 | [$2=no | ||
| 4061 | save_LDFLAGS="$LDFLAGS" | ||
| 4062 | LDFLAGS="$LDFLAGS $3" | ||
| 4063 | echo "$lt_simple_link_test_code" > conftest.$ac_ext | ||
| 4064 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then | ||
| 4065 | # The linker can only warn and ignore the option if not recognized | ||
| 4066 | # So say no if there are warnings | ||
| 4067 | if test -s conftest.err; then | ||
| 4068 | # Append any errors to the config.log. | ||
| 4069 | cat conftest.err 1>&AS_MESSAGE_LOG_FD | ||
| 4070 | $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp | ||
| 4071 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 | ||
| 4072 | if diff conftest.exp conftest.er2 >/dev/null; then | ||
| 4073 | $2=yes | ||
| 4074 | fi | ||
| 4075 | else | ||
| 4076 | $2=yes | ||
| 4077 | fi | ||
| 4078 | fi | ||
| 4079 | $RM -r conftest* | ||
| 4080 | LDFLAGS="$save_LDFLAGS" | ||
| 4081 | ]) | ||
| 4082 | |||
| 4083 | if test x"[$]$2" = xyes; then | ||
| 4084 | m4_if([$4], , :, [$4]) | ||
| 4085 | else | ||
| 4086 | m4_if([$5], , :, [$5]) | ||
| 4087 | fi | ||
| 4088 | ])# _LT_LINKER_OPTION | ||
| 4089 | |||
| 4090 | # Old name: | ||
| 4091 | AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) | ||
| 4092 | dnl aclocal-1.4 backwards compatibility: | ||
| 4093 | dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) | ||
| 4094 | |||
| 4095 | |||
| 4096 | # LT_CMD_MAX_LEN | ||
| 4097 | #--------------- | ||
| 4098 | AC_DEFUN([LT_CMD_MAX_LEN], | ||
| 4099 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
| 4100 | # find the maximum length of command line arguments | ||
| 4101 | AC_MSG_CHECKING([the maximum length of command line arguments]) | ||
| 4102 | AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl | ||
| 4103 | i=0 | ||
| 4104 | teststring="ABCD" | ||
| 4105 | |||
| 4106 | case $build_os in | ||
| 4107 | msdosdjgpp*) | ||
| 4108 | # On DJGPP, this test can blow up pretty badly due to problems in libc | ||
| 4109 | # (any single argument exceeding 2000 bytes causes a buffer overrun | ||
| 4110 | # during glob expansion). Even if it were fixed, the result of this | ||
| 4111 | # check would be larger than it should be. | ||
| 4112 | lt_cv_sys_max_cmd_len=12288; # 12K is about right | ||
| 4113 | ;; | ||
| 4114 | |||
| 4115 | gnu*) | ||
| 4116 | # Under GNU Hurd, this test is not required because there is | ||
| 4117 | # no limit to the length of command line arguments. | ||
| 4118 | # Libtool will interpret -1 as no limit whatsoever | ||
| 4119 | lt_cv_sys_max_cmd_len=-1; | ||
| 4120 | ;; | ||
| 4121 | |||
| 4122 | cygwin* | mingw* | cegcc*) | ||
| 4123 | # On Win9x/ME, this test blows up -- it succeeds, but takes | ||
| 4124 | # about 5 minutes as the teststring grows exponentially. | ||
| 4125 | # Worse, since 9x/ME are not pre-emptively multitasking, | ||
| 4126 | # you end up with a "frozen" computer, even though with patience | ||
| 4127 | # the test eventually succeeds (with a max line length of 256k). | ||
| 4128 | # Instead, let's just punt: use the minimum linelength reported by | ||
| 4129 | # all of the supported platforms: 8192 (on NT/2K/XP). | ||
| 4130 | lt_cv_sys_max_cmd_len=8192; | ||
| 4131 | ;; | ||
| 4132 | |||
| 4133 | mint*) | ||
| 4134 | # On MiNT this can take a long time and run out of memory. | ||
| 4135 | lt_cv_sys_max_cmd_len=8192; | ||
| 4136 | ;; | ||
| 4137 | |||
| 4138 | amigaos*) | ||
| 4139 | # On AmigaOS with pdksh, this test takes hours, literally. | ||
| 4140 | # So we just punt and use a minimum line length of 8192. | ||
| 4141 | lt_cv_sys_max_cmd_len=8192; | ||
| 4142 | ;; | ||
| 4143 | |||
| 4144 | netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) | ||
| 4145 | # This has been around since 386BSD, at least. Likely further. | ||
| 4146 | if test -x /sbin/sysctl; then | ||
| 4147 | lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` | ||
| 4148 | elif test -x /usr/sbin/sysctl; then | ||
| 4149 | lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` | ||
| 4150 | else | ||
| 4151 | lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs | ||
| 4152 | fi | ||
| 4153 | # And add a safety zone | ||
| 4154 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` | ||
| 4155 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` | ||
| 4156 | ;; | ||
| 4157 | |||
| 4158 | interix*) | ||
| 4159 | # We know the value 262144 and hardcode it with a safety zone (like BSD) | ||
| 4160 | lt_cv_sys_max_cmd_len=196608 | ||
| 4161 | ;; | ||
| 4162 | |||
| 4163 | os2*) | ||
| 4164 | # The test takes a long time on OS/2. | ||
| 4165 | lt_cv_sys_max_cmd_len=8192 | ||
| 4166 | ;; | ||
| 4167 | |||
| 4168 | osf*) | ||
| 4169 | # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure | ||
| 4170 | # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not | ||
| 4171 | # nice to cause kernel panics so lets avoid the loop below. | ||
| 4172 | # First set a reasonable default. | ||
| 4173 | lt_cv_sys_max_cmd_len=16384 | ||
| 4174 | # | ||
| 4175 | if test -x /sbin/sysconfig; then | ||
| 4176 | case `/sbin/sysconfig -q proc exec_disable_arg_limit` in | ||
| 4177 | *1*) lt_cv_sys_max_cmd_len=-1 ;; | ||
| 4178 | esac | ||
| 4179 | fi | ||
| 4180 | ;; | ||
| 4181 | sco3.2v5*) | ||
| 4182 | lt_cv_sys_max_cmd_len=102400 | ||
| 4183 | ;; | ||
| 4184 | sysv5* | sco5v6* | sysv4.2uw2*) | ||
| 4185 | kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` | ||
| 4186 | if test -n "$kargmax"; then | ||
| 4187 | lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` | ||
| 4188 | else | ||
| 4189 | lt_cv_sys_max_cmd_len=32768 | ||
| 4190 | fi | ||
| 4191 | ;; | ||
| 4192 | *) | ||
| 4193 | lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` | ||
| 4194 | if test -n "$lt_cv_sys_max_cmd_len" && \ | ||
| 4195 | test undefined != "$lt_cv_sys_max_cmd_len"; then | ||
| 4196 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` | ||
| 4197 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` | ||
| 4198 | else | ||
| 4199 | # Make teststring a little bigger before we do anything with it. | ||
| 4200 | # a 1K string should be a reasonable start. | ||
| 4201 | for i in 1 2 3 4 5 6 7 8 ; do | ||
| 4202 | teststring=$teststring$teststring | ||
| 4203 | done | ||
| 4204 | SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} | ||
| 4205 | # If test is not a shell built-in, we'll probably end up computing a | ||
| 4206 | # maximum length that is only half of the actual maximum length, but | ||
| 4207 | # we can't tell. | ||
| 4208 | while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ | ||
| 4209 | = "X$teststring$teststring"; } >/dev/null 2>&1 && | ||
| 4210 | test $i != 17 # 1/2 MB should be enough | ||
| 4211 | do | ||
| 4212 | i=`expr $i + 1` | ||
| 4213 | teststring=$teststring$teststring | ||
| 4214 | done | ||
| 4215 | # Only check the string length outside the loop. | ||
| 4216 | lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` | ||
| 4217 | teststring= | ||
| 4218 | # Add a significant safety factor because C++ compilers can tack on | ||
| 4219 | # massive amounts of additional arguments before passing them to the | ||
| 4220 | # linker. It appears as though 1/2 is a usable value. | ||
| 4221 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` | ||
| 4222 | fi | ||
| 4223 | ;; | ||
| 4224 | esac | ||
| 4225 | ]) | ||
| 4226 | if test -n $lt_cv_sys_max_cmd_len ; then | ||
| 4227 | AC_MSG_RESULT($lt_cv_sys_max_cmd_len) | ||
| 4228 | else | ||
| 4229 | AC_MSG_RESULT(none) | ||
| 4230 | fi | ||
| 4231 | max_cmd_len=$lt_cv_sys_max_cmd_len | ||
| 4232 | _LT_DECL([], [max_cmd_len], [0], | ||
| 4233 | [What is the maximum length of a command?]) | ||
| 4234 | ])# LT_CMD_MAX_LEN | ||
| 4235 | |||
| 4236 | # Old name: | ||
| 4237 | AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) | ||
| 4238 | dnl aclocal-1.4 backwards compatibility: | ||
| 4239 | dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) | ||
| 4240 | |||
| 4241 | |||
| 4242 | # _LT_HEADER_DLFCN | ||
| 4243 | # ---------------- | ||
| 4244 | m4_defun([_LT_HEADER_DLFCN], | ||
| 4245 | [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl | ||
| 4246 | ])# _LT_HEADER_DLFCN | ||
| 4247 | |||
| 4248 | |||
| 4249 | # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, | ||
| 4250 | # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) | ||
| 4251 | # ---------------------------------------------------------------- | ||
| 4252 | m4_defun([_LT_TRY_DLOPEN_SELF], | ||
| 4253 | [m4_require([_LT_HEADER_DLFCN])dnl | ||
| 4254 | if test "$cross_compiling" = yes; then : | ||
| 4255 | [$4] | ||
| 4256 | else | ||
| 4257 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
| 4258 | lt_status=$lt_dlunknown | ||
| 4259 | cat > conftest.$ac_ext <<_LT_EOF | ||
| 4260 | [#line $LINENO "configure" | ||
| 4261 | #include "confdefs.h" | ||
| 4262 | |||
| 4263 | #if HAVE_DLFCN_H | ||
| 4264 | #include <dlfcn.h> | ||
| 4265 | #endif | ||
| 4266 | |||
| 4267 | #include <stdio.h> | ||
| 4268 | |||
| 4269 | #ifdef RTLD_GLOBAL | ||
| 4270 | # define LT_DLGLOBAL RTLD_GLOBAL | ||
| 4271 | #else | ||
| 4272 | # ifdef DL_GLOBAL | ||
| 4273 | # define LT_DLGLOBAL DL_GLOBAL | ||
| 4274 | # else | ||
| 4275 | # define LT_DLGLOBAL 0 | ||
| 4276 | # endif | ||
| 4277 | #endif | ||
| 4278 | |||
| 4279 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | ||
| 4280 | find out it does not work in some platform. */ | ||
| 4281 | #ifndef LT_DLLAZY_OR_NOW | ||
| 4282 | # ifdef RTLD_LAZY | ||
| 4283 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | ||
| 4284 | # else | ||
| 4285 | # ifdef DL_LAZY | ||
| 4286 | # define LT_DLLAZY_OR_NOW DL_LAZY | ||
| 4287 | # else | ||
| 4288 | # ifdef RTLD_NOW | ||
| 4289 | # define LT_DLLAZY_OR_NOW RTLD_NOW | ||
| 4290 | # else | ||
| 4291 | # ifdef DL_NOW | ||
| 4292 | # define LT_DLLAZY_OR_NOW DL_NOW | ||
| 4293 | # else | ||
| 4294 | # define LT_DLLAZY_OR_NOW 0 | ||
| 4295 | # endif | ||
| 4296 | # endif | ||
| 4297 | # endif | ||
| 4298 | # endif | ||
| 4299 | #endif | ||
| 4300 | |||
| 4301 | /* When -fvisbility=hidden is used, assume the code has been annotated | ||
| 4302 | correspondingly for the symbols needed. */ | ||
| 4303 | #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | ||
| 4304 | int fnord () __attribute__((visibility("default"))); | ||
| 4305 | #endif | ||
| 4306 | |||
| 4307 | int fnord () { return 42; } | ||
| 4308 | int main () | ||
| 4309 | { | ||
| 4310 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
| 4311 | int status = $lt_dlunknown; | ||
| 4312 | |||
| 4313 | if (self) | ||
| 4314 | { | ||
| 4315 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | ||
| 4316 | else | ||
| 4317 | { | ||
| 4318 | if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | ||
| 4319 | else puts (dlerror ()); | ||
| 4320 | } | ||
| 4321 | /* dlclose (self); */ | ||
| 4322 | } | ||
| 4323 | else | ||
| 4324 | puts (dlerror ()); | ||
| 4325 | |||
| 4326 | return status; | ||
| 4327 | }] | ||
| 4328 | _LT_EOF | ||
| 4329 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then | ||
| 4330 | (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null | ||
| 4331 | lt_status=$? | ||
| 4332 | case x$lt_status in | ||
| 4333 | x$lt_dlno_uscore) $1 ;; | ||
| 4334 | x$lt_dlneed_uscore) $2 ;; | ||
| 4335 | x$lt_dlunknown|x*) $3 ;; | ||
| 4336 | esac | ||
| 4337 | else : | ||
| 4338 | # compilation failed | ||
| 4339 | $3 | ||
| 4340 | fi | ||
| 4341 | fi | ||
| 4342 | rm -fr conftest* | ||
| 4343 | ])# _LT_TRY_DLOPEN_SELF | ||
| 4344 | |||
| 4345 | |||
| 4346 | # LT_SYS_DLOPEN_SELF | ||
| 4347 | # ------------------ | ||
| 4348 | AC_DEFUN([LT_SYS_DLOPEN_SELF], | ||
| 4349 | [m4_require([_LT_HEADER_DLFCN])dnl | ||
| 4350 | if test "x$enable_dlopen" != xyes; then | ||
| 4351 | enable_dlopen=unknown | ||
| 4352 | enable_dlopen_self=unknown | ||
| 4353 | enable_dlopen_self_static=unknown | ||
| 4354 | else | ||
| 4355 | lt_cv_dlopen=no | ||
| 4356 | lt_cv_dlopen_libs= | ||
| 4357 | |||
| 4358 | case $host_os in | ||
| 4359 | beos*) | ||
| 4360 | lt_cv_dlopen="load_add_on" | ||
| 4361 | lt_cv_dlopen_libs= | ||
| 4362 | lt_cv_dlopen_self=yes | ||
| 4363 | ;; | ||
| 4364 | |||
| 4365 | mingw* | pw32* | cegcc*) | ||
| 4366 | lt_cv_dlopen="LoadLibrary" | ||
| 4367 | lt_cv_dlopen_libs= | ||
| 4368 | ;; | ||
| 4369 | |||
| 4370 | cygwin*) | ||
| 4371 | lt_cv_dlopen="dlopen" | ||
| 4372 | lt_cv_dlopen_libs= | ||
| 4373 | ;; | ||
| 4374 | |||
| 4375 | darwin*) | ||
| 4376 | # if libdl is installed we need to link against it | ||
| 4377 | AC_CHECK_LIB([dl], [dlopen], | ||
| 4378 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ | ||
| 4379 | lt_cv_dlopen="dyld" | ||
| 4380 | lt_cv_dlopen_libs= | ||
| 4381 | lt_cv_dlopen_self=yes | ||
| 4382 | ]) | ||
| 4383 | ;; | ||
| 4384 | |||
| 4385 | *) | ||
| 4386 | AC_CHECK_FUNC([shl_load], | ||
| 4387 | [lt_cv_dlopen="shl_load"], | ||
| 4388 | [AC_CHECK_LIB([dld], [shl_load], | ||
| 4389 | [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], | ||
| 4390 | [AC_CHECK_FUNC([dlopen], | ||
| 4391 | [lt_cv_dlopen="dlopen"], | ||
| 4392 | [AC_CHECK_LIB([dl], [dlopen], | ||
| 4393 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], | ||
| 4394 | [AC_CHECK_LIB([svld], [dlopen], | ||
| 4395 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], | ||
| 4396 | [AC_CHECK_LIB([dld], [dld_link], | ||
| 4397 | [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) | ||
| 4398 | ]) | ||
| 4399 | ]) | ||
| 4400 | ]) | ||
| 4401 | ]) | ||
| 4402 | ]) | ||
| 4403 | ;; | ||
| 4404 | esac | ||
| 4405 | |||
| 4406 | if test "x$lt_cv_dlopen" != xno; then | ||
| 4407 | enable_dlopen=yes | ||
| 4408 | else | ||
| 4409 | enable_dlopen=no | ||
| 4410 | fi | ||
| 4411 | |||
| 4412 | case $lt_cv_dlopen in | ||
| 4413 | dlopen) | ||
| 4414 | save_CPPFLAGS="$CPPFLAGS" | ||
| 4415 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | ||
| 4416 | |||
| 4417 | save_LDFLAGS="$LDFLAGS" | ||
| 4418 | wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | ||
| 4419 | |||
| 4420 | save_LIBS="$LIBS" | ||
| 4421 | LIBS="$lt_cv_dlopen_libs $LIBS" | ||
| 4422 | |||
| 4423 | AC_CACHE_CHECK([whether a program can dlopen itself], | ||
| 4424 | lt_cv_dlopen_self, [dnl | ||
| 4425 | _LT_TRY_DLOPEN_SELF( | ||
| 4426 | lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, | ||
| 4427 | lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) | ||
| 4428 | ]) | ||
| 4429 | |||
| 4430 | if test "x$lt_cv_dlopen_self" = xyes; then | ||
| 4431 | wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" | ||
| 4432 | AC_CACHE_CHECK([whether a statically linked program can dlopen itself], | ||
| 4433 | lt_cv_dlopen_self_static, [dnl | ||
| 4434 | _LT_TRY_DLOPEN_SELF( | ||
| 4435 | lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, | ||
| 4436 | lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) | ||
| 4437 | ]) | ||
| 4438 | fi | ||
| 4439 | |||
| 4440 | CPPFLAGS="$save_CPPFLAGS" | ||
| 4441 | LDFLAGS="$save_LDFLAGS" | ||
| 4442 | LIBS="$save_LIBS" | ||
| 4443 | ;; | ||
| 4444 | esac | ||
| 4445 | |||
| 4446 | case $lt_cv_dlopen_self in | ||
| 4447 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | ||
| 4448 | *) enable_dlopen_self=unknown ;; | ||
| 4449 | esac | ||
| 4450 | |||
| 4451 | case $lt_cv_dlopen_self_static in | ||
| 4452 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | ||
| 4453 | *) enable_dlopen_self_static=unknown ;; | ||
| 4454 | esac | ||
| 4455 | fi | ||
| 4456 | _LT_DECL([dlopen_support], [enable_dlopen], [0], | ||
| 4457 | [Whether dlopen is supported]) | ||
| 4458 | _LT_DECL([dlopen_self], [enable_dlopen_self], [0], | ||
| 4459 | [Whether dlopen of programs is supported]) | ||
| 4460 | _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], | ||
| 4461 | [Whether dlopen of statically linked programs is supported]) | ||
| 4462 | ])# LT_SYS_DLOPEN_SELF | ||
| 4463 | |||
| 4464 | # Old name: | ||
| 4465 | AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) | ||
| 4466 | dnl aclocal-1.4 backwards compatibility: | ||
| 4467 | dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) | ||
| 4468 | |||
| 4469 | |||
| 4470 | # _LT_COMPILER_C_O([TAGNAME]) | ||
| 4471 | # --------------------------- | ||
| 4472 | # Check to see if options -c and -o are simultaneously supported by compiler. | ||
| 4473 | # This macro does not hard code the compiler like AC_PROG_CC_C_O. | ||
| 4474 | m4_defun([_LT_COMPILER_C_O], | ||
| 4475 | [m4_require([_LT_DECL_SED])dnl | ||
| 4476 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
| 4477 | m4_require([_LT_TAG_COMPILER])dnl | ||
| 4478 | AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], | ||
| 4479 | [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], | ||
| 4480 | [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no | ||
| 4481 | $RM -r conftest 2>/dev/null | ||
| 4482 | mkdir conftest | ||
| 4483 | cd conftest | ||
| 4484 | mkdir out | ||
| 4485 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
| 4486 | |||
| 4487 | lt_compiler_flag="-o out/conftest2.$ac_objext" | ||
| 4488 | # Insert the option either (1) after the last *FLAGS variable, or | ||
| 4489 | # (2) before a word containing "conftest.", or (3) at the end. | ||
| 4490 | # Note that $ac_compile itself does not contain backslashes and begins | ||
| 4491 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
| 4492 | lt_compile=`echo "$ac_compile" | $SED \ | ||
| 4493 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | ||
| 4494 | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ | ||
| 4495 | -e 's:$: $lt_compiler_flag:'` | ||
| 4496 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) | ||
| 4497 | (eval "$lt_compile" 2>out/conftest.err) | ||
| 4498 | ac_status=$? | ||
| 4499 | cat out/conftest.err >&AS_MESSAGE_LOG_FD | ||
| 4500 | echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | ||
| 4501 | if (exit $ac_status) && test -s out/conftest2.$ac_objext | ||
| 4502 | then | ||
| 4503 | # The compiler can only warn and ignore the option if not recognized | ||
| 4504 | # So say no if there are warnings | ||
| 4505 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp | ||
| 4506 | $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 | ||
| 4507 | if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then | ||
| 4508 | _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes | ||
| 4509 | fi | ||
| 4510 | fi | ||
| 4511 | chmod u+w . 2>&AS_MESSAGE_LOG_FD | ||
| 4512 | $RM conftest* | ||
| 4513 | # SGI C++ compiler will create directory out/ii_files/ for | ||
| 4514 | # template instantiation | ||
| 4515 | test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files | ||
| 4516 | $RM out/* && rmdir out | ||
| 4517 | cd .. | ||
| 4518 | $RM -r conftest | ||
| 4519 | $RM conftest* | ||
| 4520 | ]) | ||
| 4521 | _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], | ||
| 4522 | [Does compiler simultaneously support -c and -o options?]) | ||
| 4523 | ])# _LT_COMPILER_C_O | ||
| 4524 | |||
| 4525 | |||
| 4526 | # _LT_COMPILER_FILE_LOCKS([TAGNAME]) | ||
| 4527 | # ---------------------------------- | ||
| 4528 | # Check to see if we can do hard links to lock some files if needed | ||
| 4529 | m4_defun([_LT_COMPILER_FILE_LOCKS], | ||
| 4530 | [m4_require([_LT_ENABLE_LOCK])dnl | ||
| 4531 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
| 4532 | _LT_COMPILER_C_O([$1]) | ||
| 4533 | |||
| 4534 | hard_links="nottested" | ||
| 4535 | if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then | ||
| 4536 | # do not overwrite the value of need_locks provided by the user | ||
| 4537 | AC_MSG_CHECKING([if we can lock with hard links]) | ||
| 4538 | hard_links=yes | ||
| 4539 | $RM conftest* | ||
| 4540 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | ||
| 4541 | touch conftest.a | ||
| 4542 | ln conftest.a conftest.b 2>&5 || hard_links=no | ||
| 4543 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | ||
| 4544 | AC_MSG_RESULT([$hard_links]) | ||
| 4545 | if test "$hard_links" = no; then | ||
| 4546 | AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) | ||
| 4547 | need_locks=warn | ||
| 4548 | fi | ||
| 4549 | else | ||
| 4550 | need_locks=no | ||
| 4551 | fi | ||
| 4552 | _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) | ||
| 4553 | ])# _LT_COMPILER_FILE_LOCKS | ||
| 4554 | |||
| 4555 | |||
| 4556 | # _LT_CHECK_OBJDIR | ||
| 4557 | # ---------------- | ||
| 4558 | m4_defun([_LT_CHECK_OBJDIR], | ||
| 4559 | [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], | ||
| 4560 | [rm -f .libs 2>/dev/null | ||
| 4561 | mkdir .libs 2>/dev/null | ||
| 4562 | if test -d .libs; then | ||
| 4563 | lt_cv_objdir=.libs | ||
| 4564 | else | ||
| 4565 | # MS-DOS does not allow filenames that begin with a dot. | ||
| 4566 | lt_cv_objdir=_libs | ||
| 4567 | fi | ||
| 4568 | rmdir .libs 2>/dev/null]) | ||
| 4569 | objdir=$lt_cv_objdir | ||
| 4570 | _LT_DECL([], [objdir], [0], | ||
| 4571 | [The name of the directory that contains temporary libtool files])dnl | ||
| 4572 | m4_pattern_allow([LT_OBJDIR])dnl | ||
| 4573 | AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", | ||
| 4574 | [Define to the sub-directory in which libtool stores uninstalled libraries.]) | ||
| 4575 | ])# _LT_CHECK_OBJDIR | ||
| 4576 | |||
| 4577 | |||
| 4578 | # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) | ||
| 4579 | # -------------------------------------- | ||
| 4580 | # Check hardcoding attributes. | ||
| 4581 | m4_defun([_LT_LINKER_HARDCODE_LIBPATH], | ||
| 4582 | [AC_MSG_CHECKING([how to hardcode library paths into programs]) | ||
| 4583 | _LT_TAGVAR(hardcode_action, $1)= | ||
| 4584 | if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || | ||
| 4585 | test -n "$_LT_TAGVAR(runpath_var, $1)" || | ||
| 4586 | test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then | ||
| 4587 | |||
| 4588 | # We can hardcode non-existent directories. | ||
| 4589 | if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && | ||
| 4590 | # If the only mechanism to avoid hardcoding is shlibpath_var, we | ||
| 4591 | # have to relink, otherwise we might link with an installed library | ||
| 4592 | # when we should be linking with a yet-to-be-installed one | ||
| 4593 | ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && | ||
| 4594 | test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then | ||
| 4595 | # Linking always hardcodes the temporary library directory. | ||
| 4596 | _LT_TAGVAR(hardcode_action, $1)=relink | ||
| 4597 | else | ||
| 4598 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | ||
| 4599 | _LT_TAGVAR(hardcode_action, $1)=immediate | ||
| 4600 | fi | ||
| 4601 | else | ||
| 4602 | # We cannot hardcode anything, or else we can only hardcode existing | ||
| 4603 | # directories. | ||
| 4604 | _LT_TAGVAR(hardcode_action, $1)=unsupported | ||
| 4605 | fi | ||
| 4606 | AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) | ||
| 4607 | |||
| 4608 | if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || | ||
| 4609 | test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then | ||
| 4610 | # Fast installation is not supported | ||
| 4611 | enable_fast_install=no | ||
| 4612 | elif test "$shlibpath_overrides_runpath" = yes || | ||
| 4613 | test "$enable_shared" = no; then | ||
| 4614 | # Fast installation is not necessary | ||
| 4615 | enable_fast_install=needless | ||
| 4616 | fi | ||
| 4617 | _LT_TAGDECL([], [hardcode_action], [0], | ||
| 4618 | [How to hardcode a shared library path into an executable]) | ||
| 4619 | ])# _LT_LINKER_HARDCODE_LIBPATH | ||
| 4620 | |||
| 4621 | |||
| 4622 | # _LT_CMD_STRIPLIB | ||
| 4623 | # ---------------- | ||
| 4624 | m4_defun([_LT_CMD_STRIPLIB], | ||
| 4625 | [m4_require([_LT_DECL_EGREP]) | ||
| 4626 | striplib= | ||
| 4627 | old_striplib= | ||
| 4628 | AC_MSG_CHECKING([whether stripping libraries is possible]) | ||
| 4629 | if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then | ||
| 4630 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | ||
| 4631 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" | ||
| 4632 | AC_MSG_RESULT([yes]) | ||
| 4633 | else | ||
| 4634 | # FIXME - insert some real tests, host_os isn't really good enough | ||
| 4635 | case $host_os in | ||
| 4636 | darwin*) | ||
| 4637 | if test -n "$STRIP" ; then | ||
| 4638 | striplib="$STRIP -x" | ||
| 4639 | old_striplib="$STRIP -S" | ||
| 4640 | AC_MSG_RESULT([yes]) | ||
| 4641 | else | ||
| 4642 | AC_MSG_RESULT([no]) | ||
| 4643 | fi | ||
| 4644 | ;; | ||
| 4645 | *) | ||
| 4646 | AC_MSG_RESULT([no]) | ||
| 4647 | ;; | ||
| 4648 | esac | ||
| 4649 | fi | ||
| 4650 | _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) | ||
| 4651 | _LT_DECL([], [striplib], [1]) | ||
| 4652 | ])# _LT_CMD_STRIPLIB | ||
| 4653 | |||
| 4654 | |||
| 4655 | # _LT_SYS_DYNAMIC_LINKER([TAG]) | ||
| 4656 | # ----------------------------- | ||
| 4657 | # PORTME Fill in your ld.so characteristics | ||
| 4658 | m4_defun([_LT_SYS_DYNAMIC_LINKER], | ||
| 4659 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
| 4660 | m4_require([_LT_DECL_EGREP])dnl | ||
| 4661 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
| 4662 | m4_require([_LT_DECL_OBJDUMP])dnl | ||
| 4663 | m4_require([_LT_DECL_SED])dnl | ||
| 4664 | m4_require([_LT_CHECK_SHELL_FEATURES])dnl | ||
| 4665 | AC_MSG_CHECKING([dynamic linker characteristics]) | ||
| 4666 | m4_if([$1], | ||
| 4667 | [], [ | ||
| 4668 | if test "$GCC" = yes; then | ||
| 4669 | case $host_os in | ||
| 4670 | darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; | ||
| 4671 | *) lt_awk_arg="/^libraries:/" ;; | ||
| 4672 | esac | ||
| 4673 | case $host_os in | ||
| 4674 | mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; | ||
| 4675 | *) lt_sed_strip_eq="s,=/,/,g" ;; | ||
| 4676 | esac | ||
| 4677 | lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` | ||
| 4678 | case $lt_search_path_spec in | ||
| 4679 | *\;*) | ||
| 4680 | # if the path contains ";" then we assume it to be the separator | ||
| 4681 | # otherwise default to the standard path separator (i.e. ":") - it is | ||
| 4682 | # assumed that no part of a normal pathname contains ";" but that should | ||
| 4683 | # okay in the real world where ";" in dirpaths is itself problematic. | ||
| 4684 | lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` | ||
| 4685 | ;; | ||
| 4686 | *) | ||
| 4687 | lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` | ||
| 4688 | ;; | ||
| 4689 | esac | ||
| 4690 | # Ok, now we have the path, separated by spaces, we can step through it | ||
| 4691 | # and add multilib dir if necessary. | ||
| 4692 | lt_tmp_lt_search_path_spec= | ||
| 4693 | lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` | ||
| 4694 | for lt_sys_path in $lt_search_path_spec; do | ||
| 4695 | if test -d "$lt_sys_path/$lt_multi_os_dir"; then | ||
| 4696 | lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" | ||
| 4697 | else | ||
| 4698 | test -d "$lt_sys_path" && \ | ||
| 4699 | lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" | ||
| 4700 | fi | ||
| 4701 | done | ||
| 4702 | lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' | ||
| 4703 | BEGIN {RS=" "; FS="/|\n";} { | ||
| 4704 | lt_foo=""; | ||
| 4705 | lt_count=0; | ||
| 4706 | for (lt_i = NF; lt_i > 0; lt_i--) { | ||
| 4707 | if ($lt_i != "" && $lt_i != ".") { | ||
| 4708 | if ($lt_i == "..") { | ||
| 4709 | lt_count++; | ||
| 4710 | } else { | ||
| 4711 | if (lt_count == 0) { | ||
| 4712 | lt_foo="/" $lt_i lt_foo; | ||
| 4713 | } else { | ||
| 4714 | lt_count--; | ||
| 4715 | } | ||
| 4716 | } | ||
| 4717 | } | ||
| 4718 | } | ||
| 4719 | if (lt_foo != "") { lt_freq[[lt_foo]]++; } | ||
| 4720 | if (lt_freq[[lt_foo]] == 1) { print lt_foo; } | ||
| 4721 | }'` | ||
| 4722 | # AWK program above erroneously prepends '/' to C:/dos/paths | ||
| 4723 | # for these hosts. | ||
| 4724 | case $host_os in | ||
| 4725 | mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ | ||
| 4726 | $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; | ||
| 4727 | esac | ||
| 4728 | sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` | ||
| 4729 | else | ||
| 4730 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | ||
| 4731 | fi]) | ||
| 4732 | library_names_spec= | ||
| 4733 | libname_spec='lib$name' | ||
| 4734 | soname_spec= | ||
| 4735 | shrext_cmds=".so" | ||
| 4736 | postinstall_cmds= | ||
| 4737 | postuninstall_cmds= | ||
| 4738 | finish_cmds= | ||
| 4739 | finish_eval= | ||
| 4740 | shlibpath_var= | ||
| 4741 | shlibpath_overrides_runpath=unknown | ||
| 4742 | version_type=none | ||
| 4743 | dynamic_linker="$host_os ld.so" | ||
| 4744 | sys_lib_dlsearch_path_spec="/lib /usr/lib" | ||
| 4745 | need_lib_prefix=unknown | ||
| 4746 | hardcode_into_libs=no | ||
| 4747 | |||
| 4748 | # when you set need_version to no, make sure it does not cause -set_version | ||
| 4749 | # flags to be left without arguments | ||
| 4750 | need_version=unknown | ||
| 4751 | |||
| 4752 | case $host_os in | ||
| 4753 | aix3*) | ||
| 4754 | version_type=linux # correct to gnu/linux during the next big refactor | ||
| 4755 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' | ||
| 4756 | shlibpath_var=LIBPATH | ||
| 4757 | |||
| 4758 | # AIX 3 has no versioning support, so we append a major version to the name. | ||
| 4759 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 4760 | ;; | ||
| 4761 | |||
| 4762 | aix[[4-9]]*) | ||
| 4763 | version_type=linux # correct to gnu/linux during the next big refactor | ||
| 4764 | need_lib_prefix=no | ||
| 4765 | need_version=no | ||
| 4766 | hardcode_into_libs=yes | ||
| 4767 | if test "$host_cpu" = ia64; then | ||
| 4768 | # AIX 5 supports IA64 | ||
| 4769 | library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' | ||
| 4770 | shlibpath_var=LD_LIBRARY_PATH | ||
| 4771 | else | ||
| 4772 | # With GCC up to 2.95.x, collect2 would create an import file | ||
| 4773 | # for dependence libraries. The import file would start with | ||
| 4774 | # the line `#! .'. This would cause the generated library to | ||
| 4775 | # depend on `.', always an invalid library. This was fixed in | ||
| 4776 | # development snapshots of GCC prior to 3.0. | ||
| 4777 | case $host_os in | ||
| 4778 | aix4 | aix4.[[01]] | aix4.[[01]].*) | ||
| 4779 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | ||
| 4780 | echo ' yes ' | ||
| 4781 | echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then | ||
| 4782 | : | ||
| 4783 | else | ||
| 4784 | can_build_shared=no | ||
| 4785 | fi | ||
| 4786 | ;; | ||
| 4787 | esac | ||
| 4788 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct | ||
| 4789 | # soname into executable. Probably we can add versioning support to | ||
| 4790 | # collect2, so additional links can be useful in future. | ||
| 4791 | if test "$aix_use_runtimelinking" = yes; then | ||
| 4792 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so | ||
| 4793 | # instead of lib<name>.a to let people know that these are not | ||
| 4794 | # typical AIX shared libraries. | ||
| 4795 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
| 4796 | else | ||
| 4797 | # We preserve .a as extension for shared libraries through AIX4.2 | ||
| 4798 | # and later when we are not doing run time linking. | ||
| 4799 | library_names_spec='${libname}${release}.a $libname.a' | ||
| 4800 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 4801 | fi | ||
| 4802 | shlibpath_var=LIBPATH | ||
| 4803 | fi | ||
| 4804 | ;; | ||
| 4805 | |||
| 4806 | amigaos*) | ||
| 4807 | case $host_cpu in | ||
| 4808 | powerpc) | ||
| 4809 | # Since July 2007 AmigaOS4 officially supports .so libraries. | ||
| 4810 | # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. | ||
| 4811 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
| 4812 | ;; | ||
| 4813 | m68k) | ||
| 4814 | library_names_spec='$libname.ixlibrary $libname.a' | ||
| 4815 | # Create ${libname}_ixlibrary.a entries in /sys/libs. | ||
| 4816 | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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' | ||
| 4817 | ;; | ||
| 4818 | esac | ||
| 4819 | ;; | ||
| 4820 | |||
| 4821 | beos*) | ||
| 4822 | library_names_spec='${libname}${shared_ext}' | ||
| 4823 | dynamic_linker="$host_os ld.so" | ||
| 4824 | shlibpath_var=LIBRARY_PATH | ||
| 4825 | ;; | ||
| 4826 | |||
| 4827 | bsdi[[45]]*) | ||
| 4828 | version_type=linux # correct to gnu/linux during the next big refactor | ||
| 4829 | need_version=no | ||
| 4830 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
| 4831 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 4832 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | ||
| 4833 | shlibpath_var=LD_LIBRARY_PATH | ||
| 4834 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | ||
| 4835 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | ||
| 4836 | # the default ld.so.conf also contains /usr/contrib/lib and | ||
| 4837 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | ||
| 4838 | # libtool to hard-code these into programs | ||
| 4839 | ;; | ||
| 4840 | |||
| 4841 | cygwin* | mingw* | pw32* | cegcc*) | ||
| 4842 | version_type=windows | ||
| 4843 | shrext_cmds=".dll" | ||
| 4844 | need_version=no | ||
| 4845 | need_lib_prefix=no | ||
| 4846 | |||
| 4847 | case $GCC,$cc_basename in | ||
| 4848 | yes,*) | ||
| 4849 | # gcc | ||
| 4850 | library_names_spec='$libname.dll.a' | ||
| 4851 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
| 4852 | postinstall_cmds='base_file=`basename \${file}`~ | ||
| 4853 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | ||
| 4854 | dldir=$destdir/`dirname \$dlpath`~ | ||
| 4855 | test -d \$dldir || mkdir -p \$dldir~ | ||
| 4856 | $install_prog $dir/$dlname \$dldir/$dlname~ | ||
| 4857 | chmod a+x \$dldir/$dlname~ | ||
| 4858 | if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then | ||
| 4859 | eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; | ||
| 4860 | fi' | ||
| 4861 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
| 4862 | dlpath=$dir/\$dldll~ | ||
| 4863 | $RM \$dlpath' | ||
| 4864 | shlibpath_overrides_runpath=yes | ||
| 4865 | |||
| 4866 | case $host_os in | ||
| 4867 | cygwin*) | ||
| 4868 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' | ||
| 4869 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | ||
| 4870 | m4_if([$1], [],[ | ||
| 4871 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) | ||
| 4872 | ;; | ||
| 4873 | mingw* | cegcc*) | ||
| 4874 | # MinGW DLLs use traditional 'lib' prefix | ||
| 4875 | soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | ||
| 4876 | ;; | ||
| 4877 | pw32*) | ||
| 4878 | # pw32 DLLs use 'pw' prefix rather than 'lib' | ||
| 4879 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | ||
| 4880 | ;; | ||
| 4881 | esac | ||
| 4882 | dynamic_linker='Win32 ld.exe' | ||
| 4883 | ;; | ||
| 4884 | |||
| 4885 | *,cl*) | ||
| 4886 | # Native MSVC | ||
| 4887 | libname_spec='$name' | ||
| 4888 | soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | ||
| 4889 | library_names_spec='${libname}.dll.lib' | ||
| 4890 | |||
| 4891 | case $build_os in | ||
| 4892 | mingw*) | ||
| 4893 | sys_lib_search_path_spec= | ||
| 4894 | lt_save_ifs=$IFS | ||
| 4895 | IFS=';' | ||
| 4896 | for lt_path in $LIB | ||
| 4897 | do | ||
| 4898 | IFS=$lt_save_ifs | ||
| 4899 | # Let DOS variable expansion print the short 8.3 style file name. | ||
| 4900 | lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` | ||
| 4901 | sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" | ||
| 4902 | done | ||
| 4903 | IFS=$lt_save_ifs | ||
| 4904 | # Convert to MSYS style. | ||
| 4905 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` | ||
| 4906 | ;; | ||
| 4907 | cygwin*) | ||
| 4908 | # Convert to unix form, then to dos form, then back to unix form | ||
| 4909 | # but this time dos style (no spaces!) so that the unix form looks | ||
| 4910 | # like /cygdrive/c/PROGRA~1:/cygdr... | ||
| 4911 | sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` | ||
| 4912 | sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` | ||
| 4913 | sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
| 4914 | ;; | ||
| 4915 | *) | ||
| 4916 | sys_lib_search_path_spec="$LIB" | ||
| 4917 | if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then | ||
| 4918 | # It is most probably a Windows format PATH. | ||
| 4919 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
| 4920 | else | ||
| 4921 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
| 4922 | fi | ||
| 4923 | # FIXME: find the short name or the path components, as spaces are | ||
| 4924 | # common. (e.g. "Program Files" -> "PROGRA~1") | ||
| 4925 | ;; | ||
| 4926 | esac | ||
| 4927 | |||
| 4928 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
| 4929 | postinstall_cmds='base_file=`basename \${file}`~ | ||
| 4930 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | ||
| 4931 | dldir=$destdir/`dirname \$dlpath`~ | ||
| 4932 | test -d \$dldir || mkdir -p \$dldir~ | ||
| 4933 | $install_prog $dir/$dlname \$dldir/$dlname' | ||
| 4934 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
| 4935 | dlpath=$dir/\$dldll~ | ||
| 4936 | $RM \$dlpath' | ||
| 4937 | shlibpath_overrides_runpath=yes | ||
| 4938 | dynamic_linker='Win32 link.exe' | ||
| 4939 | ;; | ||
| 4940 | |||
| 4941 | *) | ||
| 4942 | # Assume MSVC wrapper | ||
| 4943 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' | ||
| 4944 | dynamic_linker='Win32 ld.exe' | ||
| 4945 | ;; | ||
| 4946 | esac | ||
| 4947 | # FIXME: first we should search . and the directory the executable is in | ||
| 4948 | shlibpath_var=PATH | ||
| 4949 | ;; | ||
| 4950 | |||
| 4951 | darwin* | rhapsody*) | ||
| 4952 | dynamic_linker="$host_os dyld" | ||
| 4953 | version_type=darwin | ||
| 4954 | need_lib_prefix=no | ||
| 4955 | need_version=no | ||
| 4956 | library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' | ||
| 4957 | soname_spec='${libname}${release}${major}$shared_ext' | ||
| 4958 | shlibpath_overrides_runpath=yes | ||
| 4959 | shlibpath_var=DYLD_LIBRARY_PATH | ||
| 4960 | shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' | ||
| 4961 | m4_if([$1], [],[ | ||
| 4962 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) | ||
| 4963 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' | ||
| 4964 | ;; | ||
| 4965 | |||
| 4966 | dgux*) | ||
| 4967 | version_type=linux # correct to gnu/linux during the next big refactor | ||
| 4968 | need_lib_prefix=no | ||
| 4969 | need_version=no | ||
| 4970 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' | ||
| 4971 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 4972 | shlibpath_var=LD_LIBRARY_PATH | ||
| 4973 | ;; | ||
| 4974 | |||
| 4975 | freebsd* | dragonfly*) | ||
| 4976 | # DragonFly does not have aout. When/if they implement a new | ||
| 4977 | # versioning mechanism, adjust this. | ||
| 4978 | if test -x /usr/bin/objformat; then | ||
| 4979 | objformat=`/usr/bin/objformat` | ||
| 4980 | else | ||
| 4981 | case $host_os in | ||
| 4982 | freebsd[[23]].*) objformat=aout ;; | ||
| 4983 | *) objformat=elf ;; | ||
| 4984 | esac | ||
| 4985 | fi | ||
| 4986 | version_type=freebsd-$objformat | ||
| 4987 | case $version_type in | ||
| 4988 | freebsd-elf*) | ||
| 4989 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | ||
| 4990 | need_version=no | ||
| 4991 | need_lib_prefix=no | ||
| 4992 | ;; | ||
| 4993 | freebsd-*) | ||
| 4994 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' | ||
| 4995 | need_version=yes | ||
| 4996 | ;; | ||
| 4997 | esac | ||
| 4998 | shlibpath_var=LD_LIBRARY_PATH | ||
| 4999 | case $host_os in | ||
| 5000 | freebsd2.*) | ||
| 5001 | shlibpath_overrides_runpath=yes | ||
| 5002 | ;; | ||
| 5003 | freebsd3.[[01]]* | freebsdelf3.[[01]]*) | ||
| 5004 | shlibpath_overrides_runpath=yes | ||
| 5005 | hardcode_into_libs=yes | ||
| 5006 | ;; | ||
| 5007 | freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ | ||
| 5008 | freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) | ||
| 5009 | shlibpath_overrides_runpath=no | ||
| 5010 | hardcode_into_libs=yes | ||
| 5011 | ;; | ||
| 5012 | *) # from 4.6 on, and DragonFly | ||
| 5013 | shlibpath_overrides_runpath=yes | ||
| 5014 | hardcode_into_libs=yes | ||
| 5015 | ;; | ||
| 5016 | esac | ||
| 5017 | ;; | ||
| 5018 | |||
| 5019 | haiku*) | ||
| 5020 | version_type=linux # correct to gnu/linux during the next big refactor | ||
| 5021 | need_lib_prefix=no | ||
| 5022 | need_version=no | ||
| 5023 | dynamic_linker="$host_os runtime_loader" | ||
| 5024 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | ||
| 5025 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5026 | shlibpath_var=LIBRARY_PATH | ||
| 5027 | shlibpath_overrides_runpath=yes | ||
| 5028 | sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' | ||
| 5029 | hardcode_into_libs=yes | ||
| 5030 | ;; | ||
| 5031 | |||
| 5032 | hpux9* | hpux10* | hpux11*) | ||
| 5033 | # Give a soname corresponding to the major version so that dld.sl refuses to | ||
| 5034 | # link against other versions. | ||
| 5035 | version_type=sunos | ||
| 5036 | need_lib_prefix=no | ||
| 5037 | need_version=no | ||
| 5038 | case $host_cpu in | ||
| 5039 | ia64*) | ||
| 5040 | shrext_cmds='.so' | ||
| 5041 | hardcode_into_libs=yes | ||
| 5042 | dynamic_linker="$host_os dld.so" | ||
| 5043 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5044 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | ||
| 5045 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
| 5046 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5047 | if test "X$HPUX_IA64_MODE" = X32; then | ||
| 5048 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | ||
| 5049 | else | ||
| 5050 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | ||
| 5051 | fi | ||
| 5052 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
| 5053 | ;; | ||
| 5054 | hppa*64*) | ||
| 5055 | shrext_cmds='.sl' | ||
| 5056 | hardcode_into_libs=yes | ||
| 5057 | dynamic_linker="$host_os dld.sl" | ||
| 5058 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH | ||
| 5059 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | ||
| 5060 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
| 5061 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5062 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" | ||
| 5063 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
| 5064 | ;; | ||
| 5065 | *) | ||
| 5066 | shrext_cmds='.sl' | ||
| 5067 | dynamic_linker="$host_os dld.sl" | ||
| 5068 | shlibpath_var=SHLIB_PATH | ||
| 5069 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | ||
| 5070 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
| 5071 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5072 | ;; | ||
| 5073 | esac | ||
| 5074 | # HP-UX runs *really* slowly unless shared libraries are mode 555, ... | ||
| 5075 | postinstall_cmds='chmod 555 $lib' | ||
| 5076 | # or fails outright, so override atomically: | ||
| 5077 | install_override_mode=555 | ||
| 5078 | ;; | ||
| 5079 | |||
| 5080 | interix[[3-9]]*) | ||
| 5081 | version_type=linux # correct to gnu/linux during the next big refactor | ||
| 5082 | need_lib_prefix=no | ||
| 5083 | need_version=no | ||
| 5084 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
| 5085 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5086 | dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' | ||
| 5087 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5088 | shlibpath_overrides_runpath=no | ||
| 5089 | hardcode_into_libs=yes | ||
| 5090 | ;; | ||
| 5091 | |||
| 5092 | irix5* | irix6* | nonstopux*) | ||
| 5093 | case $host_os in | ||
| 5094 | nonstopux*) version_type=nonstopux ;; | ||
| 5095 | *) | ||
| 5096 | if test "$lt_cv_prog_gnu_ld" = yes; then | ||
| 5097 | version_type=linux # correct to gnu/linux during the next big refactor | ||
| 5098 | else | ||
| 5099 | version_type=irix | ||
| 5100 | fi ;; | ||
| 5101 | esac | ||
| 5102 | need_lib_prefix=no | ||
| 5103 | need_version=no | ||
| 5104 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5105 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' | ||
| 5106 | case $host_os in | ||
| 5107 | irix5* | nonstopux*) | ||
| 5108 | libsuff= shlibsuff= | ||
| 5109 | ;; | ||
| 5110 | *) | ||
| 5111 | case $LD in # libtool.m4 will add one of these switches to LD | ||
| 5112 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") | ||
| 5113 | libsuff= shlibsuff= libmagic=32-bit;; | ||
| 5114 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") | ||
| 5115 | libsuff=32 shlibsuff=N32 libmagic=N32;; | ||
| 5116 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") | ||
| 5117 | libsuff=64 shlibsuff=64 libmagic=64-bit;; | ||
| 5118 | *) libsuff= shlibsuff= libmagic=never-match;; | ||
| 5119 | esac | ||
| 5120 | ;; | ||
| 5121 | esac | ||
| 5122 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | ||
| 5123 | shlibpath_overrides_runpath=no | ||
| 5124 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | ||
| 5125 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | ||
| 5126 | hardcode_into_libs=yes | ||
| 5127 | ;; | ||
| 5128 | |||
| 5129 | # No shared lib support for Linux oldld, aout, or coff. | ||
| 5130 | linux*oldld* | linux*aout* | linux*coff*) | ||
| 5131 | dynamic_linker=no | ||
| 5132 | ;; | ||
| 5133 | |||
| 5134 | # This must be glibc/ELF. | ||
| 5135 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | ||
| 5136 | version_type=linux # correct to gnu/linux during the next big refactor | ||
| 5137 | need_lib_prefix=no | ||
| 5138 | need_version=no | ||
| 5139 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
| 5140 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5141 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | ||
| 5142 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5143 | shlibpath_overrides_runpath=no | ||
| 5144 | |||
| 5145 | # Some binutils ld are patched to set DT_RUNPATH | ||
| 5146 | AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], | ||
| 5147 | [lt_cv_shlibpath_overrides_runpath=no | ||
| 5148 | save_LDFLAGS=$LDFLAGS | ||
| 5149 | save_libdir=$libdir | ||
| 5150 | eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ | ||
| 5151 | LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" | ||
| 5152 | AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], | ||
| 5153 | [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], | ||
| 5154 | [lt_cv_shlibpath_overrides_runpath=yes])]) | ||
| 5155 | LDFLAGS=$save_LDFLAGS | ||
| 5156 | libdir=$save_libdir | ||
| 5157 | ]) | ||
| 5158 | shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath | ||
| 5159 | |||
| 5160 | # This implies no fast_install, which is unacceptable. | ||
| 5161 | # Some rework will be needed to allow for fast_install | ||
| 5162 | # before this can be enabled. | ||
| 5163 | hardcode_into_libs=yes | ||
| 5164 | |||
| 5165 | # Append ld.so.conf contents to the search path | ||
| 5166 | if test -f /etc/ld.so.conf; then | ||
| 5167 | lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` | ||
| 5168 | sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" | ||
| 5169 | fi | ||
| 5170 | |||
| 5171 | # We used to test for /lib/ld.so.1 and disable shared libraries on | ||
| 5172 | # powerpc, because MkLinux only supported shared libraries with the | ||
| 5173 | # GNU dynamic linker. Since this was broken with cross compilers, | ||
| 5174 | # most powerpc-linux boxes support dynamic linking these days and | ||
| 5175 | # people can always --disable-shared, the test was removed, and we | ||
| 5176 | # assume the GNU/Linux dynamic linker is in use. | ||
| 5177 | dynamic_linker='GNU/Linux ld.so' | ||
| 5178 | ;; | ||
| 5179 | |||
| 5180 | netbsdelf*-gnu) | ||
| 5181 | version_type=linux | ||
| 5182 | need_lib_prefix=no | ||
| 5183 | need_version=no | ||
| 5184 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
| 5185 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5186 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5187 | shlibpath_overrides_runpath=no | ||
| 5188 | hardcode_into_libs=yes | ||
| 5189 | dynamic_linker='NetBSD ld.elf_so' | ||
| 5190 | ;; | ||
| 5191 | |||
| 5192 | netbsd*) | ||
| 5193 | version_type=sunos | ||
| 5194 | need_lib_prefix=no | ||
| 5195 | need_version=no | ||
| 5196 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | ||
| 5197 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
| 5198 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
| 5199 | dynamic_linker='NetBSD (a.out) ld.so' | ||
| 5200 | else | ||
| 5201 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
| 5202 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5203 | dynamic_linker='NetBSD ld.elf_so' | ||
| 5204 | fi | ||
| 5205 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5206 | shlibpath_overrides_runpath=yes | ||
| 5207 | hardcode_into_libs=yes | ||
| 5208 | ;; | ||
| 5209 | |||
| 5210 | newsos6) | ||
| 5211 | version_type=linux # correct to gnu/linux during the next big refactor | ||
| 5212 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
| 5213 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5214 | shlibpath_overrides_runpath=yes | ||
| 5215 | ;; | ||
| 5216 | |||
| 5217 | *nto* | *qnx*) | ||
| 5218 | version_type=qnx | ||
| 5219 | need_lib_prefix=no | ||
| 5220 | need_version=no | ||
| 5221 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
| 5222 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5223 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5224 | shlibpath_overrides_runpath=no | ||
| 5225 | hardcode_into_libs=yes | ||
| 5226 | dynamic_linker='ldqnx.so' | ||
| 5227 | ;; | ||
| 5228 | |||
| 5229 | openbsd*) | ||
| 5230 | version_type=sunos | ||
| 5231 | sys_lib_dlsearch_path_spec="/usr/lib" | ||
| 5232 | need_lib_prefix=no | ||
| 5233 | # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. | ||
| 5234 | case $host_os in | ||
| 5235 | openbsd3.3 | openbsd3.3.*) need_version=yes ;; | ||
| 5236 | *) need_version=no ;; | ||
| 5237 | esac | ||
| 5238 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
| 5239 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
| 5240 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5241 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
| 5242 | case $host_os in | ||
| 5243 | openbsd2.[[89]] | openbsd2.[[89]].*) | ||
| 5244 | shlibpath_overrides_runpath=no | ||
| 5245 | ;; | ||
| 5246 | *) | ||
| 5247 | shlibpath_overrides_runpath=yes | ||
| 5248 | ;; | ||
| 5249 | esac | ||
| 5250 | else | ||
| 5251 | shlibpath_overrides_runpath=yes | ||
| 5252 | fi | ||
| 5253 | ;; | ||
| 5254 | |||
| 5255 | os2*) | ||
| 5256 | libname_spec='$name' | ||
| 5257 | shrext_cmds=".dll" | ||
| 5258 | need_lib_prefix=no | ||
| 5259 | library_names_spec='$libname${shared_ext} $libname.a' | ||
| 5260 | dynamic_linker='OS/2 ld.exe' | ||
| 5261 | shlibpath_var=LIBPATH | ||
| 5262 | ;; | ||
| 5263 | |||
| 5264 | osf3* | osf4* | osf5*) | ||
| 5265 | version_type=osf | ||
| 5266 | need_lib_prefix=no | ||
| 5267 | need_version=no | ||
| 5268 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5269 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
| 5270 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5271 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | ||
| 5272 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | ||
| 5273 | ;; | ||
| 5274 | |||
| 5275 | rdos*) | ||
| 5276 | dynamic_linker=no | ||
| 5277 | ;; | ||
| 5278 | |||
| 5279 | solaris*) | ||
| 5280 | version_type=linux # correct to gnu/linux during the next big refactor | ||
| 5281 | need_lib_prefix=no | ||
| 5282 | need_version=no | ||
| 5283 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
| 5284 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5285 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5286 | shlibpath_overrides_runpath=yes | ||
| 5287 | hardcode_into_libs=yes | ||
| 5288 | # ldd complains unless libraries are executable | ||
| 5289 | postinstall_cmds='chmod +x $lib' | ||
| 5290 | ;; | ||
| 5291 | |||
| 5292 | sunos4*) | ||
| 5293 | version_type=sunos | ||
| 5294 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
| 5295 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | ||
| 5296 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5297 | shlibpath_overrides_runpath=yes | ||
| 5298 | if test "$with_gnu_ld" = yes; then | ||
| 5299 | need_lib_prefix=no | ||
| 5300 | fi | ||
| 5301 | need_version=yes | ||
| 5302 | ;; | ||
| 5303 | |||
| 5304 | sysv4 | sysv4.3*) | ||
| 5305 | version_type=linux # correct to gnu/linux during the next big refactor | ||
| 5306 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
| 5307 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5308 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5309 | case $host_vendor in | ||
| 5310 | sni) | ||
| 5311 | shlibpath_overrides_runpath=no | ||
| 5312 | need_lib_prefix=no | ||
| 5313 | runpath_var=LD_RUN_PATH | ||
| 5314 | ;; | ||
| 5315 | siemens) | ||
| 5316 | need_lib_prefix=no | ||
| 5317 | ;; | ||
| 5318 | motorola) | ||
| 5319 | need_lib_prefix=no | ||
| 5320 | need_version=no | ||
| 5321 | shlibpath_overrides_runpath=no | ||
| 5322 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | ||
| 5323 | ;; | ||
| 5324 | esac | ||
| 5325 | ;; | ||
| 5326 | |||
| 5327 | sysv4*MP*) | ||
| 5328 | if test -d /usr/nec ;then | ||
| 5329 | version_type=linux # correct to gnu/linux during the next big refactor | ||
| 5330 | library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' | ||
| 5331 | soname_spec='$libname${shared_ext}.$major' | ||
| 5332 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5333 | fi | ||
| 5334 | ;; | ||
| 5335 | |||
| 5336 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) | ||
| 5337 | version_type=freebsd-elf | ||
| 5338 | need_lib_prefix=no | ||
| 5339 | need_version=no | ||
| 5340 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | ||
| 5341 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5342 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5343 | shlibpath_overrides_runpath=yes | ||
| 5344 | hardcode_into_libs=yes | ||
| 5345 | if test "$with_gnu_ld" = yes; then | ||
| 5346 | sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' | ||
| 5347 | else | ||
| 5348 | sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' | ||
| 5349 | case $host_os in | ||
| 5350 | sco3.2v5*) | ||
| 5351 | sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" | ||
| 5352 | ;; | ||
| 5353 | esac | ||
| 5354 | fi | ||
| 5355 | sys_lib_dlsearch_path_spec='/usr/lib' | ||
| 5356 | ;; | ||
| 5357 | |||
| 5358 | tpf*) | ||
| 5359 | # TPF is a cross-target only. Preferred cross-host = GNU/Linux. | ||
| 5360 | version_type=linux # correct to gnu/linux during the next big refactor | ||
| 5361 | need_lib_prefix=no | ||
| 5362 | need_version=no | ||
| 5363 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
| 5364 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5365 | shlibpath_overrides_runpath=no | ||
| 5366 | hardcode_into_libs=yes | ||
| 5367 | ;; | ||
| 5368 | |||
| 5369 | uts4*) | ||
| 5370 | version_type=linux # correct to gnu/linux during the next big refactor | ||
| 5371 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
| 5372 | soname_spec='${libname}${release}${shared_ext}$major' | ||
| 5373 | shlibpath_var=LD_LIBRARY_PATH | ||
| 5374 | ;; | ||
| 5375 | |||
| 5376 | *) | ||
| 5377 | dynamic_linker=no | ||
| 5378 | ;; | ||
| 5379 | esac | ||
| 5380 | AC_MSG_RESULT([$dynamic_linker]) | ||
| 5381 | test "$dynamic_linker" = no && can_build_shared=no | ||
| 5382 | |||
| 5383 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | ||
| 5384 | if test "$GCC" = yes; then | ||
| 5385 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | ||
| 5386 | fi | ||
| 5387 | |||
| 5388 | if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then | ||
| 5389 | sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" | ||
| 5390 | fi | ||
| 5391 | if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then | ||
| 5392 | sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" | ||
| 5393 | fi | ||
| 5394 | |||
| 5395 | _LT_DECL([], [variables_saved_for_relink], [1], | ||
| 5396 | [Variables whose values should be saved in libtool wrapper scripts and | ||
| 5397 | restored at link time]) | ||
| 5398 | _LT_DECL([], [need_lib_prefix], [0], | ||
| 5399 | [Do we need the "lib" prefix for modules?]) | ||
| 5400 | _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) | ||
| 5401 | _LT_DECL([], [version_type], [0], [Library versioning type]) | ||
| 5402 | _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) | ||
| 5403 | _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) | ||
| 5404 | _LT_DECL([], [shlibpath_overrides_runpath], [0], | ||
| 5405 | [Is shlibpath searched before the hard-coded library search path?]) | ||
| 5406 | _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) | ||
| 5407 | _LT_DECL([], [library_names_spec], [1], | ||
| 5408 | [[List of archive names. First name is the real one, the rest are links. | ||
| 5409 | The last name is the one that the linker finds with -lNAME]]) | ||
| 5410 | _LT_DECL([], [soname_spec], [1], | ||
| 5411 | [[The coded name of the library, if different from the real name]]) | ||
| 5412 | _LT_DECL([], [install_override_mode], [1], | ||
| 5413 | [Permission mode override for installation of shared libraries]) | ||
| 5414 | _LT_DECL([], [postinstall_cmds], [2], | ||
| 5415 | [Command to use after installation of a shared archive]) | ||
| 5416 | _LT_DECL([], [postuninstall_cmds], [2], | ||
| 5417 | [Command to use after uninstallation of a shared archive]) | ||
| 5418 | _LT_DECL([], [finish_cmds], [2], | ||
| 5419 | [Commands used to finish a libtool library installation in a directory]) | ||
| 5420 | _LT_DECL([], [finish_eval], [1], | ||
| 5421 | [[As "finish_cmds", except a single script fragment to be evaled but | ||
| 5422 | not shown]]) | ||
| 5423 | _LT_DECL([], [hardcode_into_libs], [0], | ||
| 5424 | [Whether we should hardcode library paths into libraries]) | ||
| 5425 | _LT_DECL([], [sys_lib_search_path_spec], [2], | ||
| 5426 | [Compile-time system search path for libraries]) | ||
| 5427 | _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], | ||
| 5428 | [Run-time system search path for libraries]) | ||
| 5429 | ])# _LT_SYS_DYNAMIC_LINKER | ||
| 5430 | |||
| 5431 | |||
| 5432 | # _LT_PATH_TOOL_PREFIX(TOOL) | ||
| 5433 | # -------------------------- | ||
| 5434 | # find a file program which can recognize shared library | ||
| 5435 | AC_DEFUN([_LT_PATH_TOOL_PREFIX], | ||
| 5436 | [m4_require([_LT_DECL_EGREP])dnl | ||
| 5437 | AC_MSG_CHECKING([for $1]) | ||
| 5438 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, | ||
| 5439 | [case $MAGIC_CMD in | ||
| 5440 | [[\\/*] | ?:[\\/]*]) | ||
| 5441 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | ||
| 5442 | ;; | ||
| 5443 | *) | ||
| 5444 | lt_save_MAGIC_CMD="$MAGIC_CMD" | ||
| 5445 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
| 5446 | dnl $ac_dummy forces splitting on constant user-supplied paths. | ||
| 5447 | dnl POSIX.2 word splitting is done only on the output of word expansions, | ||
| 5448 | dnl not every word. This closes a longstanding sh security hole. | ||
| 5449 | ac_dummy="m4_if([$2], , $PATH, [$2])" | ||
| 5450 | for ac_dir in $ac_dummy; do | ||
| 5451 | IFS="$lt_save_ifs" | ||
| 5452 | test -z "$ac_dir" && ac_dir=. | ||
| 5453 | if test -f $ac_dir/$1; then | ||
| 5454 | lt_cv_path_MAGIC_CMD="$ac_dir/$1" | ||
| 5455 | if test -n "$file_magic_test_file"; then | ||
| 5456 | case $deplibs_check_method in | ||
| 5457 | "file_magic "*) | ||
| 5458 | file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` | ||
| 5459 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | ||
| 5460 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | ||
| 5461 | $EGREP "$file_magic_regex" > /dev/null; then | ||
| 5462 | : | ||
| 5463 | else | ||
| 5464 | cat <<_LT_EOF 1>&2 | ||
| 5465 | |||
| 5466 | *** Warning: the command libtool uses to detect shared libraries, | ||
| 5467 | *** $file_magic_cmd, produces output that libtool cannot recognize. | ||
| 5468 | *** The result is that libtool may fail to recognize shared libraries | ||
| 5469 | *** as such. This will affect the creation of libtool libraries that | ||
| 5470 | *** depend on shared libraries, but programs linked with such libtool | ||
| 5471 | *** libraries will work regardless of this problem. Nevertheless, you | ||
| 5472 | *** may want to report the problem to your system manager and/or to | ||
| 5473 | *** bug-libtool@gnu.org | ||
| 5474 | |||
| 5475 | _LT_EOF | ||
| 5476 | fi ;; | ||
| 5477 | esac | ||
| 5478 | fi | ||
| 5479 | break | ||
| 5480 | fi | ||
| 5481 | done | ||
| 5482 | IFS="$lt_save_ifs" | ||
| 5483 | MAGIC_CMD="$lt_save_MAGIC_CMD" | ||
| 5484 | ;; | ||
| 5485 | esac]) | ||
| 5486 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | ||
| 5487 | if test -n "$MAGIC_CMD"; then | ||
| 5488 | AC_MSG_RESULT($MAGIC_CMD) | ||
| 5489 | else | ||
| 5490 | AC_MSG_RESULT(no) | ||
| 5491 | fi | ||
| 5492 | _LT_DECL([], [MAGIC_CMD], [0], | ||
| 5493 | [Used to examine libraries when file_magic_cmd begins with "file"])dnl | ||
| 5494 | ])# _LT_PATH_TOOL_PREFIX | ||
| 5495 | |||
| 5496 | # Old name: | ||
| 5497 | AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) | ||
| 5498 | dnl aclocal-1.4 backwards compatibility: | ||
| 5499 | dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) | ||
| 5500 | |||
| 5501 | |||
| 5502 | # _LT_PATH_MAGIC | ||
| 5503 | # -------------- | ||
| 5504 | # find a file program which can recognize a shared library | ||
| 5505 | m4_defun([_LT_PATH_MAGIC], | ||
| 5506 | [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) | ||
| 5507 | if test -z "$lt_cv_path_MAGIC_CMD"; then | ||
| 5508 | if test -n "$ac_tool_prefix"; then | ||
| 5509 | _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) | ||
| 5510 | else | ||
| 5511 | MAGIC_CMD=: | ||
| 5512 | fi | ||
| 5513 | fi | ||
| 5514 | ])# _LT_PATH_MAGIC | ||
| 5515 | |||
| 5516 | |||
| 5517 | # LT_PATH_LD | ||
| 5518 | # ---------- | ||
| 5519 | # find the pathname to the GNU or non-GNU linker | ||
| 5520 | AC_DEFUN([LT_PATH_LD], | ||
| 5521 | [AC_REQUIRE([AC_PROG_CC])dnl | ||
| 5522 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
| 5523 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | ||
| 5524 | m4_require([_LT_DECL_SED])dnl | ||
| 5525 | m4_require([_LT_DECL_EGREP])dnl | ||
| 5526 | m4_require([_LT_PROG_ECHO_BACKSLASH])dnl | ||
| 5527 | |||
| 5528 | AC_ARG_WITH([gnu-ld], | ||
| 5529 | [AS_HELP_STRING([--with-gnu-ld], | ||
| 5530 | [assume the C compiler uses GNU ld @<:@default=no@:>@])], | ||
| 5531 | [test "$withval" = no || with_gnu_ld=yes], | ||
| 5532 | [with_gnu_ld=no])dnl | ||
| 5533 | |||
| 5534 | ac_prog=ld | ||
| 5535 | if test "$GCC" = yes; then | ||
| 5536 | # Check if gcc -print-prog-name=ld gives a path. | ||
| 5537 | AC_MSG_CHECKING([for ld used by $CC]) | ||
| 5538 | case $host in | ||
| 5539 | *-*-mingw*) | ||
| 5540 | # gcc leaves a trailing carriage return which upsets mingw | ||
| 5541 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | ||
| 5542 | *) | ||
| 5543 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | ||
| 5544 | esac | ||
| 5545 | case $ac_prog in | ||
| 5546 | # Accept absolute paths. | ||
| 5547 | [[\\/]]* | ?:[[\\/]]*) | ||
| 5548 | re_direlt='/[[^/]][[^/]]*/\.\./' | ||
| 5549 | # Canonicalize the pathname of ld | ||
| 5550 | ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` | ||
| 5551 | while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do | ||
| 5552 | ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` | ||
| 5553 | done | ||
| 5554 | test -z "$LD" && LD="$ac_prog" | ||
| 5555 | ;; | ||
| 5556 | "") | ||
| 5557 | # If it fails, then pretend we aren't using GCC. | ||
| 5558 | ac_prog=ld | ||
| 5559 | ;; | ||
| 5560 | *) | ||
| 5561 | # If it is relative, then search for the first ld in PATH. | ||
| 5562 | with_gnu_ld=unknown | ||
| 5563 | ;; | ||
| 5564 | esac | ||
| 5565 | elif test "$with_gnu_ld" = yes; then | ||
| 5566 | AC_MSG_CHECKING([for GNU ld]) | ||
| 5567 | else | ||
| 5568 | AC_MSG_CHECKING([for non-GNU ld]) | ||
| 5569 | fi | ||
| 5570 | AC_CACHE_VAL(lt_cv_path_LD, | ||
| 5571 | [if test -z "$LD"; then | ||
| 5572 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
| 5573 | for ac_dir in $PATH; do | ||
| 5574 | IFS="$lt_save_ifs" | ||
| 5575 | test -z "$ac_dir" && ac_dir=. | ||
| 5576 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | ||
| 5577 | lt_cv_path_LD="$ac_dir/$ac_prog" | ||
| 5578 | # Check to see if the program is GNU ld. I'd rather use --version, | ||
| 5579 | # but apparently some variants of GNU ld only accept -v. | ||
| 5580 | # Break only if it was the GNU/non-GNU ld that we prefer. | ||
| 5581 | case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in | ||
| 5582 | *GNU* | *'with BFD'*) | ||
| 5583 | test "$with_gnu_ld" != no && break | ||
| 5584 | ;; | ||
| 5585 | *) | ||
| 5586 | test "$with_gnu_ld" != yes && break | ||
| 5587 | ;; | ||
| 5588 | esac | ||
| 5589 | fi | ||
| 5590 | done | ||
| 5591 | IFS="$lt_save_ifs" | ||
| 5592 | else | ||
| 5593 | lt_cv_path_LD="$LD" # Let the user override the test with a path. | ||
| 5594 | fi]) | ||
| 5595 | LD="$lt_cv_path_LD" | ||
| 5596 | if test -n "$LD"; then | ||
| 5597 | AC_MSG_RESULT($LD) | ||
| 5598 | else | ||
| 5599 | AC_MSG_RESULT(no) | ||
| 5600 | fi | ||
| 5601 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | ||
| 5602 | _LT_PATH_LD_GNU | ||
| 5603 | AC_SUBST([LD]) | ||
| 5604 | |||
| 5605 | _LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) | ||
| 5606 | ])# LT_PATH_LD | ||
| 5607 | |||
| 5608 | # Old names: | ||
| 5609 | AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) | ||
| 5610 | AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) | ||
| 5611 | dnl aclocal-1.4 backwards compatibility: | ||
| 5612 | dnl AC_DEFUN([AM_PROG_LD], []) | ||
| 5613 | dnl AC_DEFUN([AC_PROG_LD], []) | ||
| 5614 | |||
| 5615 | |||
| 5616 | # _LT_PATH_LD_GNU | ||
| 5617 | #- -------------- | ||
| 5618 | m4_defun([_LT_PATH_LD_GNU], | ||
| 5619 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, | ||
| 5620 | [# I'd rather use --version here, but apparently some GNU lds only accept -v. | ||
| 5621 | case `$LD -v 2>&1 </dev/null` in | ||
| 5622 | *GNU* | *'with BFD'*) | ||
| 5623 | lt_cv_prog_gnu_ld=yes | ||
| 5624 | ;; | ||
| 5625 | *) | ||
| 5626 | lt_cv_prog_gnu_ld=no | ||
| 5627 | ;; | ||
| 5628 | esac]) | ||
| 5629 | with_gnu_ld=$lt_cv_prog_gnu_ld | ||
| 5630 | ])# _LT_PATH_LD_GNU | ||
| 5631 | |||
| 5632 | |||
| 5633 | # _LT_CMD_RELOAD | ||
| 5634 | # -------------- | ||
| 5635 | # find reload flag for linker | ||
| 5636 | # -- PORTME Some linkers may need a different reload flag. | ||
| 5637 | m4_defun([_LT_CMD_RELOAD], | ||
| 5638 | [AC_CACHE_CHECK([for $LD option to reload object files], | ||
| 5639 | lt_cv_ld_reload_flag, | ||
| 5640 | [lt_cv_ld_reload_flag='-r']) | ||
| 5641 | reload_flag=$lt_cv_ld_reload_flag | ||
| 5642 | case $reload_flag in | ||
| 5643 | "" | " "*) ;; | ||
| 5644 | *) reload_flag=" $reload_flag" ;; | ||
| 5645 | esac | ||
| 5646 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | ||
| 5647 | case $host_os in | ||
| 5648 | cygwin* | mingw* | pw32* | cegcc*) | ||
| 5649 | if test "$GCC" != yes; then | ||
| 5650 | reload_cmds=false | ||
| 5651 | fi | ||
| 5652 | ;; | ||
| 5653 | darwin*) | ||
| 5654 | if test "$GCC" = yes; then | ||
| 5655 | reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' | ||
| 5656 | else | ||
| 5657 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | ||
| 5658 | fi | ||
| 5659 | ;; | ||
| 5660 | esac | ||
| 5661 | _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl | ||
| 5662 | _LT_TAGDECL([], [reload_cmds], [2])dnl | ||
| 5663 | ])# _LT_CMD_RELOAD | ||
| 5664 | |||
| 5665 | |||
| 5666 | # _LT_CHECK_MAGIC_METHOD | ||
| 5667 | # ---------------------- | ||
| 5668 | # how to check for library dependencies | ||
| 5669 | # -- PORTME fill in with the dynamic library characteristics | ||
| 5670 | m4_defun([_LT_CHECK_MAGIC_METHOD], | ||
| 5671 | [m4_require([_LT_DECL_EGREP]) | ||
| 5672 | m4_require([_LT_DECL_OBJDUMP]) | ||
| 5673 | AC_CACHE_CHECK([how to recognize dependent libraries], | ||
| 5674 | lt_cv_deplibs_check_method, | ||
| 5675 | [lt_cv_file_magic_cmd='$MAGIC_CMD' | ||
| 5676 | lt_cv_file_magic_test_file= | ||
| 5677 | lt_cv_deplibs_check_method='unknown' | ||
| 5678 | # Need to set the preceding variable on all platforms that support | ||
| 5679 | # interlibrary dependencies. | ||
| 5680 | # 'none' -- dependencies not supported. | ||
| 5681 | # `unknown' -- same as none, but documents that we really don't know. | ||
| 5682 | # 'pass_all' -- all dependencies passed with no checks. | ||
| 5683 | # 'test_compile' -- check by making test program. | ||
| 5684 | # 'file_magic [[regex]]' -- check by looking for files in library path | ||
| 5685 | # which responds to the $file_magic_cmd with a given extended regex. | ||
| 5686 | # If you have `file' or equivalent on your system and you're not sure | ||
| 5687 | # whether `pass_all' will *always* work, you probably want this one. | ||
| 5688 | |||
| 5689 | case $host_os in | ||
| 5690 | aix[[4-9]]*) | ||
| 5691 | lt_cv_deplibs_check_method=pass_all | ||
| 5692 | ;; | ||
| 5693 | |||
| 5694 | beos*) | ||
| 5695 | lt_cv_deplibs_check_method=pass_all | ||
| 5696 | ;; | ||
| 5697 | |||
| 5698 | bsdi[[45]]*) | ||
| 5699 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' | ||
| 5700 | lt_cv_file_magic_cmd='/usr/bin/file -L' | ||
| 5701 | lt_cv_file_magic_test_file=/shlib/libc.so | ||
| 5702 | ;; | ||
| 5703 | |||
| 5704 | cygwin*) | ||
| 5705 | # func_win32_libid is a shell function defined in ltmain.sh | ||
| 5706 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | ||
| 5707 | lt_cv_file_magic_cmd='func_win32_libid' | ||
| 5708 | ;; | ||
| 5709 | |||
| 5710 | mingw* | pw32*) | ||
| 5711 | # Base MSYS/MinGW do not provide the 'file' command needed by | ||
| 5712 | # func_win32_libid shell function, so use a weaker test based on 'objdump', | ||
| 5713 | # unless we find 'file', for example because we are cross-compiling. | ||
| 5714 | # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. | ||
| 5715 | if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then | ||
| 5716 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | ||
| 5717 | lt_cv_file_magic_cmd='func_win32_libid' | ||
| 5718 | else | ||
| 5719 | # Keep this pattern in sync with the one in func_win32_libid. | ||
| 5720 | lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' | ||
| 5721 | lt_cv_file_magic_cmd='$OBJDUMP -f' | ||
| 5722 | fi | ||
| 5723 | ;; | ||
| 5724 | |||
| 5725 | cegcc*) | ||
| 5726 | # use the weaker test based on 'objdump'. See mingw*. | ||
| 5727 | lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' | ||
| 5728 | lt_cv_file_magic_cmd='$OBJDUMP -f' | ||
| 5729 | ;; | ||
| 5730 | |||
| 5731 | darwin* | rhapsody*) | ||
| 5732 | lt_cv_deplibs_check_method=pass_all | ||
| 5733 | ;; | ||
| 5734 | |||
| 5735 | freebsd* | dragonfly*) | ||
| 5736 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then | ||
| 5737 | case $host_cpu in | ||
| 5738 | i*86 ) | ||
| 5739 | # Not sure whether the presence of OpenBSD here was a mistake. | ||
| 5740 | # Let's accept both of them until this is cleared up. | ||
| 5741 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' | ||
| 5742 | lt_cv_file_magic_cmd=/usr/bin/file | ||
| 5743 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | ||
| 5744 | ;; | ||
| 5745 | esac | ||
| 5746 | else | ||
| 5747 | lt_cv_deplibs_check_method=pass_all | ||
| 5748 | fi | ||
| 5749 | ;; | ||
| 5750 | |||
| 5751 | haiku*) | ||
| 5752 | lt_cv_deplibs_check_method=pass_all | ||
| 5753 | ;; | ||
| 5754 | |||
| 5755 | hpux10.20* | hpux11*) | ||
| 5756 | lt_cv_file_magic_cmd=/usr/bin/file | ||
| 5757 | case $host_cpu in | ||
| 5758 | ia64*) | ||
| 5759 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' | ||
| 5760 | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so | ||
| 5761 | ;; | ||
| 5762 | hppa*64*) | ||
| 5763 | [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] | ||
| 5764 | lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl | ||
| 5765 | ;; | ||
| 5766 | *) | ||
| 5767 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' | ||
| 5768 | lt_cv_file_magic_test_file=/usr/lib/libc.sl | ||
| 5769 | ;; | ||
| 5770 | esac | ||
| 5771 | ;; | ||
| 5772 | |||
| 5773 | interix[[3-9]]*) | ||
| 5774 | # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here | ||
| 5775 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' | ||
| 5776 | ;; | ||
| 5777 | |||
| 5778 | irix5* | irix6* | nonstopux*) | ||
| 5779 | case $LD in | ||
| 5780 | *-32|*"-32 ") libmagic=32-bit;; | ||
| 5781 | *-n32|*"-n32 ") libmagic=N32;; | ||
| 5782 | *-64|*"-64 ") libmagic=64-bit;; | ||
| 5783 | *) libmagic=never-match;; | ||
| 5784 | esac | ||
| 5785 | lt_cv_deplibs_check_method=pass_all | ||
| 5786 | ;; | ||
| 5787 | |||
| 5788 | # This must be glibc/ELF. | ||
| 5789 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | ||
| 5790 | lt_cv_deplibs_check_method=pass_all | ||
| 5791 | ;; | ||
| 5792 | |||
| 5793 | netbsd* | netbsdelf*-gnu) | ||
| 5794 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then | ||
| 5795 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' | ||
| 5796 | else | ||
| 5797 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' | ||
| 5798 | fi | ||
| 5799 | ;; | ||
| 5800 | |||
| 5801 | newos6*) | ||
| 5802 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' | ||
| 5803 | lt_cv_file_magic_cmd=/usr/bin/file | ||
| 5804 | lt_cv_file_magic_test_file=/usr/lib/libnls.so | ||
| 5805 | ;; | ||
| 5806 | |||
| 5807 | *nto* | *qnx*) | ||
| 5808 | lt_cv_deplibs_check_method=pass_all | ||
| 5809 | ;; | ||
| 5810 | |||
| 5811 | openbsd*) | ||
| 5812 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
| 5813 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' | ||
| 5814 | else | ||
| 5815 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' | ||
| 5816 | fi | ||
| 5817 | ;; | ||
| 5818 | |||
| 5819 | osf3* | osf4* | osf5*) | ||
| 5820 | lt_cv_deplibs_check_method=pass_all | ||
| 5821 | ;; | ||
| 5822 | |||
| 5823 | rdos*) | ||
| 5824 | lt_cv_deplibs_check_method=pass_all | ||
| 5825 | ;; | ||
| 5826 | |||
| 5827 | solaris*) | ||
| 5828 | lt_cv_deplibs_check_method=pass_all | ||
| 5829 | ;; | ||
| 5830 | |||
| 5831 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) | ||
| 5832 | lt_cv_deplibs_check_method=pass_all | ||
| 5833 | ;; | ||
| 5834 | |||
| 5835 | sysv4 | sysv4.3*) | ||
| 5836 | case $host_vendor in | ||
| 5837 | motorola) | ||
| 5838 | 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]]' | ||
| 5839 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | ||
| 5840 | ;; | ||
| 5841 | ncr) | ||
| 5842 | lt_cv_deplibs_check_method=pass_all | ||
| 5843 | ;; | ||
| 5844 | sequent) | ||
| 5845 | lt_cv_file_magic_cmd='/bin/file' | ||
| 5846 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' | ||
| 5847 | ;; | ||
| 5848 | sni) | ||
| 5849 | lt_cv_file_magic_cmd='/bin/file' | ||
| 5850 | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" | ||
| 5851 | lt_cv_file_magic_test_file=/lib/libc.so | ||
| 5852 | ;; | ||
| 5853 | siemens) | ||
| 5854 | lt_cv_deplibs_check_method=pass_all | ||
| 5855 | ;; | ||
| 5856 | pc) | ||
| 5857 | lt_cv_deplibs_check_method=pass_all | ||
| 5858 | ;; | ||
| 5859 | esac | ||
| 5860 | ;; | ||
| 5861 | |||
| 5862 | tpf*) | ||
| 5863 | lt_cv_deplibs_check_method=pass_all | ||
| 5864 | ;; | ||
| 5865 | esac | ||
| 5866 | ]) | ||
| 5867 | |||
| 5868 | file_magic_glob= | ||
| 5869 | want_nocaseglob=no | ||
| 5870 | if test "$build" = "$host"; then | ||
| 5871 | case $host_os in | ||
| 5872 | mingw* | pw32*) | ||
| 5873 | if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then | ||
| 5874 | want_nocaseglob=yes | ||
| 5875 | else | ||
| 5876 | file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` | ||
| 5877 | fi | ||
| 5878 | ;; | ||
| 5879 | esac | ||
| 5880 | fi | ||
| 5881 | |||
| 5882 | file_magic_cmd=$lt_cv_file_magic_cmd | ||
| 5883 | deplibs_check_method=$lt_cv_deplibs_check_method | ||
| 5884 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | ||
| 5885 | |||
| 5886 | _LT_DECL([], [deplibs_check_method], [1], | ||
| 5887 | [Method to check whether dependent libraries are shared objects]) | ||
| 5888 | _LT_DECL([], [file_magic_cmd], [1], | ||
| 5889 | [Command to use when deplibs_check_method = "file_magic"]) | ||
| 5890 | _LT_DECL([], [file_magic_glob], [1], | ||
| 5891 | [How to find potential files when deplibs_check_method = "file_magic"]) | ||
| 5892 | _LT_DECL([], [want_nocaseglob], [1], | ||
| 5893 | [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) | ||
| 5894 | ])# _LT_CHECK_MAGIC_METHOD | ||
| 5895 | |||
| 5896 | |||
| 5897 | # LT_PATH_NM | ||
| 5898 | # ---------- | ||
| 5899 | # find the pathname to a BSD- or MS-compatible name lister | ||
| 5900 | AC_DEFUN([LT_PATH_NM], | ||
| 5901 | [AC_REQUIRE([AC_PROG_CC])dnl | ||
| 5902 | AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, | ||
| 5903 | [if test -n "$NM"; then | ||
| 5904 | # Let the user override the test. | ||
| 5905 | lt_cv_path_NM="$NM" | ||
| 5906 | else | ||
| 5907 | lt_nm_to_check="${ac_tool_prefix}nm" | ||
| 5908 | if test -n "$ac_tool_prefix" && test "$build" = "$host"; then | ||
| 5909 | lt_nm_to_check="$lt_nm_to_check nm" | ||
| 5910 | fi | ||
| 5911 | for lt_tmp_nm in $lt_nm_to_check; do | ||
| 5912 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
| 5913 | for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do | ||
| 5914 | IFS="$lt_save_ifs" | ||
| 5915 | test -z "$ac_dir" && ac_dir=. | ||
| 5916 | tmp_nm="$ac_dir/$lt_tmp_nm" | ||
| 5917 | if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then | ||
| 5918 | # Check to see if the nm accepts a BSD-compat flag. | ||
| 5919 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: | ||
| 5920 | # nm: unknown option "B" ignored | ||
| 5921 | # Tru64's nm complains that /dev/null is an invalid object file | ||
| 5922 | case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in | ||
| 5923 | */dev/null* | *'Invalid file or object type'*) | ||
| 5924 | lt_cv_path_NM="$tmp_nm -B" | ||
| 5925 | break | ||
| 5926 | ;; | ||
| 5927 | *) | ||
| 5928 | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in | ||
| 5929 | */dev/null*) | ||
| 5930 | lt_cv_path_NM="$tmp_nm -p" | ||
| 5931 | break | ||
| 5932 | ;; | ||
| 5933 | *) | ||
| 5934 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but | ||
| 5935 | continue # so that we can try to find one that supports BSD flags | ||
| 5936 | ;; | ||
| 5937 | esac | ||
| 5938 | ;; | ||
| 5939 | esac | ||
| 5940 | fi | ||
| 5941 | done | ||
| 5942 | IFS="$lt_save_ifs" | ||
| 5943 | done | ||
| 5944 | : ${lt_cv_path_NM=no} | ||
| 5945 | fi]) | ||
| 5946 | if test "$lt_cv_path_NM" != "no"; then | ||
| 5947 | NM="$lt_cv_path_NM" | ||
| 5948 | else | ||
| 5949 | # Didn't find any BSD compatible name lister, look for dumpbin. | ||
| 5950 | if test -n "$DUMPBIN"; then : | ||
| 5951 | # Let the user override the test. | ||
| 5952 | else | ||
| 5953 | AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) | ||
| 5954 | case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in | ||
| 5955 | *COFF*) | ||
| 5956 | DUMPBIN="$DUMPBIN -symbols" | ||
| 5957 | ;; | ||
| 5958 | *) | ||
| 5959 | DUMPBIN=: | ||
| 5960 | ;; | ||
| 5961 | esac | ||
| 5962 | fi | ||
| 5963 | AC_SUBST([DUMPBIN]) | ||
| 5964 | if test "$DUMPBIN" != ":"; then | ||
| 5965 | NM="$DUMPBIN" | ||
| 5966 | fi | ||
| 5967 | fi | ||
| 5968 | test -z "$NM" && NM=nm | ||
| 5969 | AC_SUBST([NM]) | ||
| 5970 | _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl | ||
| 5971 | |||
| 5972 | AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], | ||
| 5973 | [lt_cv_nm_interface="BSD nm" | ||
| 5974 | echo "int some_variable = 0;" > conftest.$ac_ext | ||
| 5975 | (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) | ||
| 5976 | (eval "$ac_compile" 2>conftest.err) | ||
| 5977 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
| 5978 | (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) | ||
| 5979 | (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) | ||
| 5980 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
| 5981 | (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) | ||
| 5982 | cat conftest.out >&AS_MESSAGE_LOG_FD | ||
| 5983 | if $GREP 'External.*some_variable' conftest.out > /dev/null; then | ||
| 5984 | lt_cv_nm_interface="MS dumpbin" | ||
| 5985 | fi | ||
| 5986 | rm -f conftest*]) | ||
| 5987 | ])# LT_PATH_NM | ||
| 5988 | |||
| 5989 | # Old names: | ||
| 5990 | AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) | ||
| 5991 | AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) | ||
| 5992 | dnl aclocal-1.4 backwards compatibility: | ||
| 5993 | dnl AC_DEFUN([AM_PROG_NM], []) | ||
| 5994 | dnl AC_DEFUN([AC_PROG_NM], []) | ||
| 5995 | |||
| 5996 | # _LT_CHECK_SHAREDLIB_FROM_LINKLIB | ||
| 5997 | # -------------------------------- | ||
| 5998 | # how to determine the name of the shared library | ||
| 5999 | # associated with a specific link library. | ||
| 6000 | # -- PORTME fill in with the dynamic library characteristics | ||
| 6001 | m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], | ||
| 6002 | [m4_require([_LT_DECL_EGREP]) | ||
| 6003 | m4_require([_LT_DECL_OBJDUMP]) | ||
| 6004 | m4_require([_LT_DECL_DLLTOOL]) | ||
| 6005 | AC_CACHE_CHECK([how to associate runtime and link libraries], | ||
| 6006 | lt_cv_sharedlib_from_linklib_cmd, | ||
| 6007 | [lt_cv_sharedlib_from_linklib_cmd='unknown' | ||
| 6008 | |||
| 6009 | case $host_os in | ||
| 6010 | cygwin* | mingw* | pw32* | cegcc*) | ||
| 6011 | # two different shell functions defined in ltmain.sh | ||
| 6012 | # decide which to use based on capabilities of $DLLTOOL | ||
| 6013 | case `$DLLTOOL --help 2>&1` in | ||
| 6014 | *--identify-strict*) | ||
| 6015 | lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib | ||
| 6016 | ;; | ||
| 6017 | *) | ||
| 6018 | lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback | ||
| 6019 | ;; | ||
| 6020 | esac | ||
| 6021 | ;; | ||
| 6022 | *) | ||
| 6023 | # fallback: assume linklib IS sharedlib | ||
| 6024 | lt_cv_sharedlib_from_linklib_cmd="$ECHO" | ||
| 6025 | ;; | ||
| 6026 | esac | ||
| 6027 | ]) | ||
| 6028 | sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd | ||
| 6029 | test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO | ||
| 6030 | |||
| 6031 | _LT_DECL([], [sharedlib_from_linklib_cmd], [1], | ||
| 6032 | [Command to associate shared and link libraries]) | ||
| 6033 | ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB | ||
| 6034 | |||
| 6035 | |||
| 6036 | # _LT_PATH_MANIFEST_TOOL | ||
| 6037 | # ---------------------- | ||
| 6038 | # locate the manifest tool | ||
| 6039 | m4_defun([_LT_PATH_MANIFEST_TOOL], | ||
| 6040 | [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) | ||
| 6041 | test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt | ||
| 6042 | AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], | ||
| 6043 | [lt_cv_path_mainfest_tool=no | ||
| 6044 | echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD | ||
| 6045 | $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out | ||
| 6046 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
| 6047 | if $GREP 'Manifest Tool' conftest.out > /dev/null; then | ||
| 6048 | lt_cv_path_mainfest_tool=yes | ||
| 6049 | fi | ||
| 6050 | rm -f conftest*]) | ||
| 6051 | if test "x$lt_cv_path_mainfest_tool" != xyes; then | ||
| 6052 | MANIFEST_TOOL=: | ||
| 6053 | fi | ||
| 6054 | _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl | ||
| 6055 | ])# _LT_PATH_MANIFEST_TOOL | ||
| 6056 | |||
| 6057 | |||
| 6058 | # LT_LIB_M | ||
| 6059 | # -------- | ||
| 6060 | # check for math library | ||
| 6061 | AC_DEFUN([LT_LIB_M], | ||
| 6062 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
| 6063 | LIBM= | ||
| 6064 | case $host in | ||
| 6065 | *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) | ||
| 6066 | # These system don't have libm, or don't need it | ||
| 6067 | ;; | ||
| 6068 | *-ncr-sysv4.3*) | ||
| 6069 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") | ||
| 6070 | AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") | ||
| 6071 | ;; | ||
| 6072 | *) | ||
| 6073 | AC_CHECK_LIB(m, cos, LIBM="-lm") | ||
| 6074 | ;; | ||
| 6075 | esac | ||
| 6076 | AC_SUBST([LIBM]) | ||
| 6077 | ])# LT_LIB_M | ||
| 6078 | |||
| 6079 | # Old name: | ||
| 6080 | AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) | ||
| 6081 | dnl aclocal-1.4 backwards compatibility: | ||
| 6082 | dnl AC_DEFUN([AC_CHECK_LIBM], []) | ||
| 6083 | |||
| 6084 | |||
| 6085 | # _LT_COMPILER_NO_RTTI([TAGNAME]) | ||
| 6086 | # ------------------------------- | ||
| 6087 | m4_defun([_LT_COMPILER_NO_RTTI], | ||
| 6088 | [m4_require([_LT_TAG_COMPILER])dnl | ||
| 6089 | |||
| 6090 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= | ||
| 6091 | |||
| 6092 | if test "$GCC" = yes; then | ||
| 6093 | case $cc_basename in | ||
| 6094 | nvcc*) | ||
| 6095 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; | ||
| 6096 | *) | ||
| 6097 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; | ||
| 6098 | esac | ||
| 6099 | |||
| 6100 | _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], | ||
| 6101 | lt_cv_prog_compiler_rtti_exceptions, | ||
| 6102 | [-fno-rtti -fno-exceptions], [], | ||
| 6103 | [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) | ||
| 6104 | fi | ||
| 6105 | _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], | ||
| 6106 | [Compiler flag to turn off builtin functions]) | ||
| 6107 | ])# _LT_COMPILER_NO_RTTI | ||
| 6108 | |||
| 6109 | |||
| 6110 | # _LT_CMD_GLOBAL_SYMBOLS | ||
| 6111 | # ---------------------- | ||
| 6112 | m4_defun([_LT_CMD_GLOBAL_SYMBOLS], | ||
| 6113 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
| 6114 | AC_REQUIRE([AC_PROG_CC])dnl | ||
| 6115 | AC_REQUIRE([AC_PROG_AWK])dnl | ||
| 6116 | AC_REQUIRE([LT_PATH_NM])dnl | ||
| 6117 | AC_REQUIRE([LT_PATH_LD])dnl | ||
| 6118 | m4_require([_LT_DECL_SED])dnl | ||
| 6119 | m4_require([_LT_DECL_EGREP])dnl | ||
| 6120 | m4_require([_LT_TAG_COMPILER])dnl | ||
| 6121 | |||
| 6122 | # Check for command to grab the raw symbol name followed by C symbol from nm. | ||
| 6123 | AC_MSG_CHECKING([command to parse $NM output from $compiler object]) | ||
| 6124 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], | ||
| 6125 | [ | ||
| 6126 | # These are sane defaults that work on at least a few old systems. | ||
| 6127 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] | ||
| 6128 | |||
| 6129 | # Character class describing NM global symbol codes. | ||
| 6130 | symcode='[[BCDEGRST]]' | ||
| 6131 | |||
| 6132 | # Regexp to match symbols that can be accessed directly from C. | ||
| 6133 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' | ||
| 6134 | |||
| 6135 | # Define system-specific variables. | ||
| 6136 | case $host_os in | ||
| 6137 | aix*) | ||
| 6138 | symcode='[[BCDT]]' | ||
| 6139 | ;; | ||
| 6140 | cygwin* | mingw* | pw32* | cegcc*) | ||
| 6141 | symcode='[[ABCDGISTW]]' | ||
| 6142 | ;; | ||
| 6143 | hpux*) | ||
| 6144 | if test "$host_cpu" = ia64; then | ||
| 6145 | symcode='[[ABCDEGRST]]' | ||
| 6146 | fi | ||
| 6147 | ;; | ||
| 6148 | irix* | nonstopux*) | ||
| 6149 | symcode='[[BCDEGRST]]' | ||
| 6150 | ;; | ||
| 6151 | osf*) | ||
| 6152 | symcode='[[BCDEGQRST]]' | ||
| 6153 | ;; | ||
| 6154 | solaris*) | ||
| 6155 | symcode='[[BDRT]]' | ||
| 6156 | ;; | ||
| 6157 | sco3.2v5*) | ||
| 6158 | symcode='[[DT]]' | ||
| 6159 | ;; | ||
| 6160 | sysv4.2uw2*) | ||
| 6161 | symcode='[[DT]]' | ||
| 6162 | ;; | ||
| 6163 | sysv5* | sco5v6* | unixware* | OpenUNIX*) | ||
| 6164 | symcode='[[ABDT]]' | ||
| 6165 | ;; | ||
| 6166 | sysv4) | ||
| 6167 | symcode='[[DFNSTU]]' | ||
| 6168 | ;; | ||
| 6169 | esac | ||
| 6170 | |||
| 6171 | # If we're using GNU nm, then use its standard symbol codes. | ||
| 6172 | case `$NM -V 2>&1` in | ||
| 6173 | *GNU* | *'with BFD'*) | ||
| 6174 | symcode='[[ABCDGIRSTW]]' ;; | ||
| 6175 | esac | ||
| 6176 | |||
| 6177 | # Transform an extracted symbol line into a proper C declaration. | ||
| 6178 | # Some systems (esp. on ia64) link data and code symbols differently, | ||
| 6179 | # so use this general approach. | ||
| 6180 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | ||
| 6181 | |||
| 6182 | # Transform an extracted symbol line into symbol name and symbol address | ||
| 6183 | lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" | ||
| 6184 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" | ||
| 6185 | |||
| 6186 | # Handle CRLF in mingw tool chain | ||
| 6187 | opt_cr= | ||
| 6188 | case $build_os in | ||
| 6189 | mingw*) | ||
| 6190 | opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp | ||
| 6191 | ;; | ||
| 6192 | esac | ||
| 6193 | |||
| 6194 | # Try without a prefix underscore, then with it. | ||
| 6195 | for ac_symprfx in "" "_"; do | ||
| 6196 | |||
| 6197 | # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. | ||
| 6198 | symxfrm="\\1 $ac_symprfx\\2 \\2" | ||
| 6199 | |||
| 6200 | # Write the raw and C identifiers. | ||
| 6201 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then | ||
| 6202 | # Fake it for dumpbin and say T for any non-static function | ||
| 6203 | # and D for any global variable. | ||
| 6204 | # Also find C++ and __fastcall symbols from MSVC++, | ||
| 6205 | # which start with @ or ?. | ||
| 6206 | lt_cv_sys_global_symbol_pipe="$AWK ['"\ | ||
| 6207 | " {last_section=section; section=\$ 3};"\ | ||
| 6208 | " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ | ||
| 6209 | " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ | ||
| 6210 | " \$ 0!~/External *\|/{next};"\ | ||
| 6211 | " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ | ||
| 6212 | " {if(hide[section]) next};"\ | ||
| 6213 | " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ | ||
| 6214 | " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ | ||
| 6215 | " s[1]~/^[@?]/{print s[1], s[1]; next};"\ | ||
| 6216 | " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ | ||
| 6217 | " ' prfx=^$ac_symprfx]" | ||
| 6218 | else | ||
| 6219 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | ||
| 6220 | fi | ||
| 6221 | lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" | ||
| 6222 | |||
| 6223 | # Check to see that the pipe works correctly. | ||
| 6224 | pipe_works=no | ||
| 6225 | |||
| 6226 | rm -f conftest* | ||
| 6227 | cat > conftest.$ac_ext <<_LT_EOF | ||
| 6228 | #ifdef __cplusplus | ||
| 6229 | extern "C" { | ||
| 6230 | #endif | ||
| 6231 | char nm_test_var; | ||
| 6232 | void nm_test_func(void); | ||
| 6233 | void nm_test_func(void){} | ||
| 6234 | #ifdef __cplusplus | ||
| 6235 | } | ||
| 6236 | #endif | ||
| 6237 | int main(){nm_test_var='a';nm_test_func();return(0);} | ||
| 6238 | _LT_EOF | ||
| 6239 | |||
| 6240 | if AC_TRY_EVAL(ac_compile); then | ||
| 6241 | # Now try to grab the symbols. | ||
| 6242 | nlist=conftest.nm | ||
| 6243 | if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then | ||
| 6244 | # Try sorting and uniquifying the output. | ||
| 6245 | if sort "$nlist" | uniq > "$nlist"T; then | ||
| 6246 | mv -f "$nlist"T "$nlist" | ||
| 6247 | else | ||
| 6248 | rm -f "$nlist"T | ||
| 6249 | fi | ||
| 6250 | |||
| 6251 | # Make sure that we snagged all the symbols we need. | ||
| 6252 | if $GREP ' nm_test_var$' "$nlist" >/dev/null; then | ||
| 6253 | if $GREP ' nm_test_func$' "$nlist" >/dev/null; then | ||
| 6254 | cat <<_LT_EOF > conftest.$ac_ext | ||
| 6255 | /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ | ||
| 6256 | #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) | ||
| 6257 | /* DATA imports from DLLs on WIN32 con't be const, because runtime | ||
| 6258 | relocations are performed -- see ld's documentation on pseudo-relocs. */ | ||
| 6259 | # define LT@&t@_DLSYM_CONST | ||
| 6260 | #elif defined(__osf__) | ||
| 6261 | /* This system does not cope well with relocations in const data. */ | ||
| 6262 | # define LT@&t@_DLSYM_CONST | ||
| 6263 | #else | ||
| 6264 | # define LT@&t@_DLSYM_CONST const | ||
| 6265 | #endif | ||
| 6266 | |||
| 6267 | #ifdef __cplusplus | ||
| 6268 | extern "C" { | ||
| 6269 | #endif | ||
| 6270 | |||
| 6271 | _LT_EOF | ||
| 6272 | # Now generate the symbol file. | ||
| 6273 | eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' | ||
| 6274 | |||
| 6275 | cat <<_LT_EOF >> conftest.$ac_ext | ||
| 6276 | |||
| 6277 | /* The mapping between symbol names and symbols. */ | ||
| 6278 | LT@&t@_DLSYM_CONST struct { | ||
| 6279 | const char *name; | ||
| 6280 | void *address; | ||
| 6281 | } | ||
| 6282 | lt__PROGRAM__LTX_preloaded_symbols[[]] = | ||
| 6283 | { | ||
| 6284 | { "@PROGRAM@", (void *) 0 }, | ||
| 6285 | _LT_EOF | ||
| 6286 | $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext | ||
| 6287 | cat <<\_LT_EOF >> conftest.$ac_ext | ||
| 6288 | {0, (void *) 0} | ||
| 6289 | }; | ||
| 6290 | |||
| 6291 | /* This works around a problem in FreeBSD linker */ | ||
| 6292 | #ifdef FREEBSD_WORKAROUND | ||
| 6293 | static const void *lt_preloaded_setup() { | ||
| 6294 | return lt__PROGRAM__LTX_preloaded_symbols; | ||
| 6295 | } | ||
| 6296 | #endif | ||
| 6297 | |||
| 6298 | #ifdef __cplusplus | ||
| 6299 | } | ||
| 6300 | #endif | ||
| 6301 | _LT_EOF | ||
| 6302 | # Now try linking the two files. | ||
| 6303 | mv conftest.$ac_objext conftstm.$ac_objext | ||
| 6304 | lt_globsym_save_LIBS=$LIBS | ||
| 6305 | lt_globsym_save_CFLAGS=$CFLAGS | ||
| 6306 | LIBS="conftstm.$ac_objext" | ||
| 6307 | CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" | ||
| 6308 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then | ||
| 6309 | pipe_works=yes | ||
| 6310 | fi | ||
| 6311 | LIBS=$lt_globsym_save_LIBS | ||
| 6312 | CFLAGS=$lt_globsym_save_CFLAGS | ||
| 6313 | else | ||
| 6314 | echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD | ||
| 6315 | fi | ||
| 6316 | else | ||
| 6317 | echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD | ||
| 6318 | fi | ||
| 6319 | else | ||
| 6320 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD | ||
| 6321 | fi | ||
| 6322 | else | ||
| 6323 | echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD | ||
| 6324 | cat conftest.$ac_ext >&5 | ||
| 6325 | fi | ||
| 6326 | rm -rf conftest* conftst* | ||
| 6327 | |||
| 6328 | # Do not use the global_symbol_pipe unless it works. | ||
| 6329 | if test "$pipe_works" = yes; then | ||
| 6330 | break | ||
| 6331 | else | ||
| 6332 | lt_cv_sys_global_symbol_pipe= | ||
| 6333 | fi | ||
| 6334 | done | ||
| 6335 | ]) | ||
| 6336 | if test -z "$lt_cv_sys_global_symbol_pipe"; then | ||
| 6337 | lt_cv_sys_global_symbol_to_cdecl= | ||
| 6338 | fi | ||
| 6339 | if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then | ||
| 6340 | AC_MSG_RESULT(failed) | ||
| 6341 | else | ||
| 6342 | AC_MSG_RESULT(ok) | ||
| 6343 | fi | ||
| 6344 | |||
| 6345 | # Response file support. | ||
| 6346 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then | ||
| 6347 | nm_file_list_spec='@' | ||
| 6348 | elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then | ||
| 6349 | nm_file_list_spec='@' | ||
| 6350 | fi | ||
| 6351 | |||
| 6352 | _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], | ||
| 6353 | [Take the output of nm and produce a listing of raw symbols and C names]) | ||
| 6354 | _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], | ||
| 6355 | [Transform the output of nm in a proper C declaration]) | ||
| 6356 | _LT_DECL([global_symbol_to_c_name_address], | ||
| 6357 | [lt_cv_sys_global_symbol_to_c_name_address], [1], | ||
| 6358 | [Transform the output of nm in a C name address pair]) | ||
| 6359 | _LT_DECL([global_symbol_to_c_name_address_lib_prefix], | ||
| 6360 | [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], | ||
| 6361 | [Transform the output of nm in a C name address pair when lib prefix is needed]) | ||
| 6362 | _LT_DECL([], [nm_file_list_spec], [1], | ||
| 6363 | [Specify filename containing input files for $NM]) | ||
| 6364 | ]) # _LT_CMD_GLOBAL_SYMBOLS | ||
| 6365 | |||
| 6366 | |||
| 6367 | # _LT_COMPILER_PIC([TAGNAME]) | ||
| 6368 | # --------------------------- | ||
| 6369 | m4_defun([_LT_COMPILER_PIC], | ||
| 6370 | [m4_require([_LT_TAG_COMPILER])dnl | ||
| 6371 | _LT_TAGVAR(lt_prog_compiler_wl, $1)= | ||
| 6372 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | ||
| 6373 | _LT_TAGVAR(lt_prog_compiler_static, $1)= | ||
| 6374 | |||
| 6375 | m4_if([$1], [CXX], [ | ||
| 6376 | # C++ specific cases for pic, static, wl, etc. | ||
| 6377 | if test "$GXX" = yes; then | ||
| 6378 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6379 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
| 6380 | |||
| 6381 | case $host_os in | ||
| 6382 | aix*) | ||
| 6383 | # All AIX code is PIC. | ||
| 6384 | if test "$host_cpu" = ia64; then | ||
| 6385 | # AIX 5 now supports IA64 processor | ||
| 6386 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6387 | fi | ||
| 6388 | ;; | ||
| 6389 | |||
| 6390 | amigaos*) | ||
| 6391 | case $host_cpu in | ||
| 6392 | powerpc) | ||
| 6393 | # see comment about AmigaOS4 .so support | ||
| 6394 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
| 6395 | ;; | ||
| 6396 | m68k) | ||
| 6397 | # FIXME: we need at least 68020 code to build shared libraries, but | ||
| 6398 | # adding the `-m68020' flag to GCC prevents building anything better, | ||
| 6399 | # like `-m68040'. | ||
| 6400 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' | ||
| 6401 | ;; | ||
| 6402 | esac | ||
| 6403 | ;; | ||
| 6404 | |||
| 6405 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | ||
| 6406 | # PIC is the default for these OSes. | ||
| 6407 | ;; | ||
| 6408 | mingw* | cygwin* | os2* | pw32* | cegcc*) | ||
| 6409 | # This hack is so that the source file can tell whether it is being | ||
| 6410 | # built for inclusion in a dll (and should export symbols for example). | ||
| 6411 | # Although the cygwin gcc ignores -fPIC, still need this for old-style | ||
| 6412 | # (--disable-auto-import) libraries | ||
| 6413 | m4_if([$1], [GCJ], [], | ||
| 6414 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | ||
| 6415 | ;; | ||
| 6416 | darwin* | rhapsody*) | ||
| 6417 | # PIC is the default on this platform | ||
| 6418 | # Common symbols not allowed in MH_DYLIB files | ||
| 6419 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | ||
| 6420 | ;; | ||
| 6421 | *djgpp*) | ||
| 6422 | # DJGPP does not support shared libraries at all | ||
| 6423 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | ||
| 6424 | ;; | ||
| 6425 | haiku*) | ||
| 6426 | # PIC is the default for Haiku. | ||
| 6427 | # The "-static" flag exists, but is broken. | ||
| 6428 | _LT_TAGVAR(lt_prog_compiler_static, $1)= | ||
| 6429 | ;; | ||
| 6430 | interix[[3-9]]*) | ||
| 6431 | # Interix 3.x gcc -fpic/-fPIC options generate broken code. | ||
| 6432 | # Instead, we relocate shared libraries at runtime. | ||
| 6433 | ;; | ||
| 6434 | sysv4*MP*) | ||
| 6435 | if test -d /usr/nec; then | ||
| 6436 | _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic | ||
| 6437 | fi | ||
| 6438 | ;; | ||
| 6439 | hpux*) | ||
| 6440 | # PIC is the default for 64-bit PA HP-UX, but not for 32-bit | ||
| 6441 | # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag | ||
| 6442 | # sets the default TLS model and affects inlining. | ||
| 6443 | case $host_cpu in | ||
| 6444 | hppa*64*) | ||
| 6445 | ;; | ||
| 6446 | *) | ||
| 6447 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
| 6448 | ;; | ||
| 6449 | esac | ||
| 6450 | ;; | ||
| 6451 | *qnx* | *nto*) | ||
| 6452 | # QNX uses GNU C++, but need to define -shared option too, otherwise | ||
| 6453 | # it will coredump. | ||
| 6454 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | ||
| 6455 | ;; | ||
| 6456 | *) | ||
| 6457 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
| 6458 | ;; | ||
| 6459 | esac | ||
| 6460 | else | ||
| 6461 | case $host_os in | ||
| 6462 | aix[[4-9]]*) | ||
| 6463 | # All AIX code is PIC. | ||
| 6464 | if test "$host_cpu" = ia64; then | ||
| 6465 | # AIX 5 now supports IA64 processor | ||
| 6466 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6467 | else | ||
| 6468 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' | ||
| 6469 | fi | ||
| 6470 | ;; | ||
| 6471 | chorus*) | ||
| 6472 | case $cc_basename in | ||
| 6473 | cxch68*) | ||
| 6474 | # Green Hills C++ Compiler | ||
| 6475 | # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" | ||
| 6476 | ;; | ||
| 6477 | esac | ||
| 6478 | ;; | ||
| 6479 | mingw* | cygwin* | os2* | pw32* | cegcc*) | ||
| 6480 | # This hack is so that the source file can tell whether it is being | ||
| 6481 | # built for inclusion in a dll (and should export symbols for example). | ||
| 6482 | m4_if([$1], [GCJ], [], | ||
| 6483 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | ||
| 6484 | ;; | ||
| 6485 | dgux*) | ||
| 6486 | case $cc_basename in | ||
| 6487 | ec++*) | ||
| 6488 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
| 6489 | ;; | ||
| 6490 | ghcx*) | ||
| 6491 | # Green Hills C++ Compiler | ||
| 6492 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
| 6493 | ;; | ||
| 6494 | *) | ||
| 6495 | ;; | ||
| 6496 | esac | ||
| 6497 | ;; | ||
| 6498 | freebsd* | dragonfly*) | ||
| 6499 | # FreeBSD uses GNU C++ | ||
| 6500 | ;; | ||
| 6501 | hpux9* | hpux10* | hpux11*) | ||
| 6502 | case $cc_basename in | ||
| 6503 | CC*) | ||
| 6504 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6505 | _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' | ||
| 6506 | if test "$host_cpu" != ia64; then | ||
| 6507 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | ||
| 6508 | fi | ||
| 6509 | ;; | ||
| 6510 | aCC*) | ||
| 6511 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6512 | _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' | ||
| 6513 | case $host_cpu in | ||
| 6514 | hppa*64*|ia64*) | ||
| 6515 | # +Z the default | ||
| 6516 | ;; | ||
| 6517 | *) | ||
| 6518 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | ||
| 6519 | ;; | ||
| 6520 | esac | ||
| 6521 | ;; | ||
| 6522 | *) | ||
| 6523 | ;; | ||
| 6524 | esac | ||
| 6525 | ;; | ||
| 6526 | interix*) | ||
| 6527 | # This is c89, which is MS Visual C++ (no shared libs) | ||
| 6528 | # Anyone wants to do a port? | ||
| 6529 | ;; | ||
| 6530 | irix5* | irix6* | nonstopux*) | ||
| 6531 | case $cc_basename in | ||
| 6532 | CC*) | ||
| 6533 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6534 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
| 6535 | # CC pic flag -KPIC is the default. | ||
| 6536 | ;; | ||
| 6537 | *) | ||
| 6538 | ;; | ||
| 6539 | esac | ||
| 6540 | ;; | ||
| 6541 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | ||
| 6542 | case $cc_basename in | ||
| 6543 | KCC*) | ||
| 6544 | # KAI C++ Compiler | ||
| 6545 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | ||
| 6546 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
| 6547 | ;; | ||
| 6548 | ecpc* ) | ||
| 6549 | # old Intel C++ for x86_64 which still supported -KPIC. | ||
| 6550 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6551 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
| 6552 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
| 6553 | ;; | ||
| 6554 | icpc* ) | ||
| 6555 | # Intel C++, used to be incompatible with GCC. | ||
| 6556 | # ICC 10 doesn't accept -KPIC any more. | ||
| 6557 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6558 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
| 6559 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
| 6560 | ;; | ||
| 6561 | pgCC* | pgcpp*) | ||
| 6562 | # Portland Group C++ compiler | ||
| 6563 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6564 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' | ||
| 6565 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6566 | ;; | ||
| 6567 | cxx*) | ||
| 6568 | # Compaq C++ | ||
| 6569 | # Make sure the PIC flag is empty. It appears that all Alpha | ||
| 6570 | # Linux and Compaq Tru64 Unix objects are PIC. | ||
| 6571 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | ||
| 6572 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
| 6573 | ;; | ||
| 6574 | xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) | ||
| 6575 | # IBM XL 8.0, 9.0 on PPC and BlueGene | ||
| 6576 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6577 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' | ||
| 6578 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' | ||
| 6579 | ;; | ||
| 6580 | *) | ||
| 6581 | case `$CC -V 2>&1 | sed 5q` in | ||
| 6582 | *Sun\ C*) | ||
| 6583 | # Sun C++ 5.9 | ||
| 6584 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
| 6585 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6586 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | ||
| 6587 | ;; | ||
| 6588 | esac | ||
| 6589 | ;; | ||
| 6590 | esac | ||
| 6591 | ;; | ||
| 6592 | lynxos*) | ||
| 6593 | ;; | ||
| 6594 | m88k*) | ||
| 6595 | ;; | ||
| 6596 | mvs*) | ||
| 6597 | case $cc_basename in | ||
| 6598 | cxx*) | ||
| 6599 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' | ||
| 6600 | ;; | ||
| 6601 | *) | ||
| 6602 | ;; | ||
| 6603 | esac | ||
| 6604 | ;; | ||
| 6605 | netbsd* | netbsdelf*-gnu) | ||
| 6606 | ;; | ||
| 6607 | *qnx* | *nto*) | ||
| 6608 | # QNX uses GNU C++, but need to define -shared option too, otherwise | ||
| 6609 | # it will coredump. | ||
| 6610 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | ||
| 6611 | ;; | ||
| 6612 | osf3* | osf4* | osf5*) | ||
| 6613 | case $cc_basename in | ||
| 6614 | KCC*) | ||
| 6615 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | ||
| 6616 | ;; | ||
| 6617 | RCC*) | ||
| 6618 | # Rational C++ 2.4.1 | ||
| 6619 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
| 6620 | ;; | ||
| 6621 | cxx*) | ||
| 6622 | # Digital/Compaq C++ | ||
| 6623 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6624 | # Make sure the PIC flag is empty. It appears that all Alpha | ||
| 6625 | # Linux and Compaq Tru64 Unix objects are PIC. | ||
| 6626 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | ||
| 6627 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
| 6628 | ;; | ||
| 6629 | *) | ||
| 6630 | ;; | ||
| 6631 | esac | ||
| 6632 | ;; | ||
| 6633 | psos*) | ||
| 6634 | ;; | ||
| 6635 | solaris*) | ||
| 6636 | case $cc_basename in | ||
| 6637 | CC* | sunCC*) | ||
| 6638 | # Sun C++ 4.2, 5.x and Centerline C++ | ||
| 6639 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
| 6640 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6641 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | ||
| 6642 | ;; | ||
| 6643 | gcx*) | ||
| 6644 | # Green Hills C++ Compiler | ||
| 6645 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | ||
| 6646 | ;; | ||
| 6647 | *) | ||
| 6648 | ;; | ||
| 6649 | esac | ||
| 6650 | ;; | ||
| 6651 | sunos4*) | ||
| 6652 | case $cc_basename in | ||
| 6653 | CC*) | ||
| 6654 | # Sun C++ 4.x | ||
| 6655 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
| 6656 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6657 | ;; | ||
| 6658 | lcc*) | ||
| 6659 | # Lucid | ||
| 6660 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
| 6661 | ;; | ||
| 6662 | *) | ||
| 6663 | ;; | ||
| 6664 | esac | ||
| 6665 | ;; | ||
| 6666 | sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) | ||
| 6667 | case $cc_basename in | ||
| 6668 | CC*) | ||
| 6669 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6670 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
| 6671 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6672 | ;; | ||
| 6673 | esac | ||
| 6674 | ;; | ||
| 6675 | tandem*) | ||
| 6676 | case $cc_basename in | ||
| 6677 | NCC*) | ||
| 6678 | # NonStop-UX NCC 3.20 | ||
| 6679 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
| 6680 | ;; | ||
| 6681 | *) | ||
| 6682 | ;; | ||
| 6683 | esac | ||
| 6684 | ;; | ||
| 6685 | vxworks*) | ||
| 6686 | ;; | ||
| 6687 | *) | ||
| 6688 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | ||
| 6689 | ;; | ||
| 6690 | esac | ||
| 6691 | fi | ||
| 6692 | ], | ||
| 6693 | [ | ||
| 6694 | if test "$GCC" = yes; then | ||
| 6695 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6696 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
| 6697 | |||
| 6698 | case $host_os in | ||
| 6699 | aix*) | ||
| 6700 | # All AIX code is PIC. | ||
| 6701 | if test "$host_cpu" = ia64; then | ||
| 6702 | # AIX 5 now supports IA64 processor | ||
| 6703 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6704 | fi | ||
| 6705 | ;; | ||
| 6706 | |||
| 6707 | amigaos*) | ||
| 6708 | case $host_cpu in | ||
| 6709 | powerpc) | ||
| 6710 | # see comment about AmigaOS4 .so support | ||
| 6711 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
| 6712 | ;; | ||
| 6713 | m68k) | ||
| 6714 | # FIXME: we need at least 68020 code to build shared libraries, but | ||
| 6715 | # adding the `-m68020' flag to GCC prevents building anything better, | ||
| 6716 | # like `-m68040'. | ||
| 6717 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' | ||
| 6718 | ;; | ||
| 6719 | esac | ||
| 6720 | ;; | ||
| 6721 | |||
| 6722 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | ||
| 6723 | # PIC is the default for these OSes. | ||
| 6724 | ;; | ||
| 6725 | |||
| 6726 | mingw* | cygwin* | pw32* | os2* | cegcc*) | ||
| 6727 | # This hack is so that the source file can tell whether it is being | ||
| 6728 | # built for inclusion in a dll (and should export symbols for example). | ||
| 6729 | # Although the cygwin gcc ignores -fPIC, still need this for old-style | ||
| 6730 | # (--disable-auto-import) libraries | ||
| 6731 | m4_if([$1], [GCJ], [], | ||
| 6732 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | ||
| 6733 | ;; | ||
| 6734 | |||
| 6735 | darwin* | rhapsody*) | ||
| 6736 | # PIC is the default on this platform | ||
| 6737 | # Common symbols not allowed in MH_DYLIB files | ||
| 6738 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | ||
| 6739 | ;; | ||
| 6740 | |||
| 6741 | haiku*) | ||
| 6742 | # PIC is the default for Haiku. | ||
| 6743 | # The "-static" flag exists, but is broken. | ||
| 6744 | _LT_TAGVAR(lt_prog_compiler_static, $1)= | ||
| 6745 | ;; | ||
| 6746 | |||
| 6747 | hpux*) | ||
| 6748 | # PIC is the default for 64-bit PA HP-UX, but not for 32-bit | ||
| 6749 | # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag | ||
| 6750 | # sets the default TLS model and affects inlining. | ||
| 6751 | case $host_cpu in | ||
| 6752 | hppa*64*) | ||
| 6753 | # +Z the default | ||
| 6754 | ;; | ||
| 6755 | *) | ||
| 6756 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
| 6757 | ;; | ||
| 6758 | esac | ||
| 6759 | ;; | ||
| 6760 | |||
| 6761 | interix[[3-9]]*) | ||
| 6762 | # Interix 3.x gcc -fpic/-fPIC options generate broken code. | ||
| 6763 | # Instead, we relocate shared libraries at runtime. | ||
| 6764 | ;; | ||
| 6765 | |||
| 6766 | msdosdjgpp*) | ||
| 6767 | # Just because we use GCC doesn't mean we suddenly get shared libraries | ||
| 6768 | # on systems that don't support them. | ||
| 6769 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | ||
| 6770 | enable_shared=no | ||
| 6771 | ;; | ||
| 6772 | |||
| 6773 | *nto* | *qnx*) | ||
| 6774 | # QNX uses GNU C++, but need to define -shared option too, otherwise | ||
| 6775 | # it will coredump. | ||
| 6776 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | ||
| 6777 | ;; | ||
| 6778 | |||
| 6779 | sysv4*MP*) | ||
| 6780 | if test -d /usr/nec; then | ||
| 6781 | _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic | ||
| 6782 | fi | ||
| 6783 | ;; | ||
| 6784 | |||
| 6785 | *) | ||
| 6786 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
| 6787 | ;; | ||
| 6788 | esac | ||
| 6789 | |||
| 6790 | case $cc_basename in | ||
| 6791 | nvcc*) # Cuda Compiler Driver 2.2 | ||
| 6792 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' | ||
| 6793 | if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then | ||
| 6794 | _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" | ||
| 6795 | fi | ||
| 6796 | ;; | ||
| 6797 | esac | ||
| 6798 | else | ||
| 6799 | # PORTME Check for flag to pass linker flags through the system compiler. | ||
| 6800 | case $host_os in | ||
| 6801 | aix*) | ||
| 6802 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6803 | if test "$host_cpu" = ia64; then | ||
| 6804 | # AIX 5 now supports IA64 processor | ||
| 6805 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6806 | else | ||
| 6807 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' | ||
| 6808 | fi | ||
| 6809 | ;; | ||
| 6810 | |||
| 6811 | mingw* | cygwin* | pw32* | os2* | cegcc*) | ||
| 6812 | # This hack is so that the source file can tell whether it is being | ||
| 6813 | # built for inclusion in a dll (and should export symbols for example). | ||
| 6814 | m4_if([$1], [GCJ], [], | ||
| 6815 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | ||
| 6816 | ;; | ||
| 6817 | |||
| 6818 | hpux9* | hpux10* | hpux11*) | ||
| 6819 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6820 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | ||
| 6821 | # not for PA HP-UX. | ||
| 6822 | case $host_cpu in | ||
| 6823 | hppa*64*|ia64*) | ||
| 6824 | # +Z the default | ||
| 6825 | ;; | ||
| 6826 | *) | ||
| 6827 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | ||
| 6828 | ;; | ||
| 6829 | esac | ||
| 6830 | # Is there a better lt_prog_compiler_static that works with the bundled CC? | ||
| 6831 | _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' | ||
| 6832 | ;; | ||
| 6833 | |||
| 6834 | irix5* | irix6* | nonstopux*) | ||
| 6835 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6836 | # PIC (with -KPIC) is the default. | ||
| 6837 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
| 6838 | ;; | ||
| 6839 | |||
| 6840 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | ||
| 6841 | case $cc_basename in | ||
| 6842 | # old Intel for x86_64 which still supported -KPIC. | ||
| 6843 | ecc*) | ||
| 6844 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6845 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
| 6846 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
| 6847 | ;; | ||
| 6848 | # icc used to be incompatible with GCC. | ||
| 6849 | # ICC 10 doesn't accept -KPIC any more. | ||
| 6850 | icc* | ifort*) | ||
| 6851 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6852 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
| 6853 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
| 6854 | ;; | ||
| 6855 | # Lahey Fortran 8.1. | ||
| 6856 | lf95*) | ||
| 6857 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6858 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' | ||
| 6859 | _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' | ||
| 6860 | ;; | ||
| 6861 | nagfor*) | ||
| 6862 | # NAG Fortran compiler | ||
| 6863 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' | ||
| 6864 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | ||
| 6865 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6866 | ;; | ||
| 6867 | pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) | ||
| 6868 | # Portland Group compilers (*not* the Pentium gcc compiler, | ||
| 6869 | # which looks to be a dead project) | ||
| 6870 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6871 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' | ||
| 6872 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6873 | ;; | ||
| 6874 | ccc*) | ||
| 6875 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6876 | # All Alpha code is PIC. | ||
| 6877 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
| 6878 | ;; | ||
| 6879 | xl* | bgxl* | bgf* | mpixl*) | ||
| 6880 | # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene | ||
| 6881 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6882 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' | ||
| 6883 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' | ||
| 6884 | ;; | ||
| 6885 | *) | ||
| 6886 | case `$CC -V 2>&1 | sed 5q` in | ||
| 6887 | *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) | ||
| 6888 | # Sun Fortran 8.3 passes all unrecognized flags to the linker | ||
| 6889 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
| 6890 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6891 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='' | ||
| 6892 | ;; | ||
| 6893 | *Sun\ F* | *Sun*Fortran*) | ||
| 6894 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
| 6895 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6896 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | ||
| 6897 | ;; | ||
| 6898 | *Sun\ C*) | ||
| 6899 | # Sun C 5.9 | ||
| 6900 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
| 6901 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6902 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6903 | ;; | ||
| 6904 | *Intel*\ [[CF]]*Compiler*) | ||
| 6905 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6906 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
| 6907 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
| 6908 | ;; | ||
| 6909 | *Portland\ Group*) | ||
| 6910 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6911 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' | ||
| 6912 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6913 | ;; | ||
| 6914 | esac | ||
| 6915 | ;; | ||
| 6916 | esac | ||
| 6917 | ;; | ||
| 6918 | |||
| 6919 | newsos6) | ||
| 6920 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
| 6921 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6922 | ;; | ||
| 6923 | |||
| 6924 | *nto* | *qnx*) | ||
| 6925 | # QNX uses GNU C++, but need to define -shared option too, otherwise | ||
| 6926 | # it will coredump. | ||
| 6927 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | ||
| 6928 | ;; | ||
| 6929 | |||
| 6930 | osf3* | osf4* | osf5*) | ||
| 6931 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6932 | # All OSF/1 code is PIC. | ||
| 6933 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
| 6934 | ;; | ||
| 6935 | |||
| 6936 | rdos*) | ||
| 6937 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
| 6938 | ;; | ||
| 6939 | |||
| 6940 | solaris*) | ||
| 6941 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
| 6942 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6943 | case $cc_basename in | ||
| 6944 | f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) | ||
| 6945 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; | ||
| 6946 | *) | ||
| 6947 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; | ||
| 6948 | esac | ||
| 6949 | ;; | ||
| 6950 | |||
| 6951 | sunos4*) | ||
| 6952 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | ||
| 6953 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | ||
| 6954 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6955 | ;; | ||
| 6956 | |||
| 6957 | sysv4 | sysv4.2uw2* | sysv4.3*) | ||
| 6958 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6959 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
| 6960 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6961 | ;; | ||
| 6962 | |||
| 6963 | sysv4*MP*) | ||
| 6964 | if test -d /usr/nec ;then | ||
| 6965 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' | ||
| 6966 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6967 | fi | ||
| 6968 | ;; | ||
| 6969 | |||
| 6970 | sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) | ||
| 6971 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6972 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
| 6973 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6974 | ;; | ||
| 6975 | |||
| 6976 | unicos*) | ||
| 6977 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
| 6978 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | ||
| 6979 | ;; | ||
| 6980 | |||
| 6981 | uts4*) | ||
| 6982 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
| 6983 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
| 6984 | ;; | ||
| 6985 | |||
| 6986 | *) | ||
| 6987 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | ||
| 6988 | ;; | ||
| 6989 | esac | ||
| 6990 | fi | ||
| 6991 | ]) | ||
| 6992 | case $host_os in | ||
| 6993 | # For platforms which do not support PIC, -DPIC is meaningless: | ||
| 6994 | *djgpp*) | ||
| 6995 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | ||
| 6996 | ;; | ||
| 6997 | *) | ||
| 6998 | _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" | ||
| 6999 | ;; | ||
| 7000 | esac | ||
| 7001 | |||
| 7002 | AC_CACHE_CHECK([for $compiler option to produce PIC], | ||
| 7003 | [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], | ||
| 7004 | [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) | ||
| 7005 | _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) | ||
| 7006 | |||
| 7007 | # | ||
| 7008 | # Check to make sure the PIC flag actually works. | ||
| 7009 | # | ||
| 7010 | if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then | ||
| 7011 | _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], | ||
| 7012 | [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], | ||
| 7013 | [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], | ||
| 7014 | [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in | ||
| 7015 | "" | " "*) ;; | ||
| 7016 | *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; | ||
| 7017 | esac], | ||
| 7018 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)= | ||
| 7019 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) | ||
| 7020 | fi | ||
| 7021 | _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], | ||
| 7022 | [Additional compiler flags for building library objects]) | ||
| 7023 | |||
| 7024 | _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], | ||
| 7025 | [How to pass a linker flag through the compiler]) | ||
| 7026 | # | ||
| 7027 | # Check to make sure the static flag actually works. | ||
| 7028 | # | ||
| 7029 | wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" | ||
| 7030 | _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], | ||
| 7031 | _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), | ||
| 7032 | $lt_tmp_static_flag, | ||
| 7033 | [], | ||
| 7034 | [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) | ||
| 7035 | _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], | ||
| 7036 | [Compiler flag to prevent dynamic linking]) | ||
| 7037 | ])# _LT_COMPILER_PIC | ||
| 7038 | |||
| 7039 | |||
| 7040 | # _LT_LINKER_SHLIBS([TAGNAME]) | ||
| 7041 | # ---------------------------- | ||
| 7042 | # See if the linker supports building shared libraries. | ||
| 7043 | m4_defun([_LT_LINKER_SHLIBS], | ||
| 7044 | [AC_REQUIRE([LT_PATH_LD])dnl | ||
| 7045 | AC_REQUIRE([LT_PATH_NM])dnl | ||
| 7046 | m4_require([_LT_PATH_MANIFEST_TOOL])dnl | ||
| 7047 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
| 7048 | m4_require([_LT_DECL_EGREP])dnl | ||
| 7049 | m4_require([_LT_DECL_SED])dnl | ||
| 7050 | m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl | ||
| 7051 | m4_require([_LT_TAG_COMPILER])dnl | ||
| 7052 | AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) | ||
| 7053 | m4_if([$1], [CXX], [ | ||
| 7054 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
| 7055 | _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] | ||
| 7056 | case $host_os in | ||
| 7057 | aix[[4-9]]*) | ||
| 7058 | # If we're using GNU nm, then we don't want the "-C" option. | ||
| 7059 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | ||
| 7060 | # Also, AIX nm treats weak defined symbols like other global defined | ||
| 7061 | # symbols, whereas GNU nm marks them as "W". | ||
| 7062 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then | ||
| 7063 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' | ||
| 7064 | else | ||
| 7065 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' | ||
| 7066 | fi | ||
| 7067 | ;; | ||
| 7068 | pw32*) | ||
| 7069 | _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" | ||
| 7070 | ;; | ||
| 7071 | cygwin* | mingw* | cegcc*) | ||
| 7072 | case $cc_basename in | ||
| 7073 | cl*) | ||
| 7074 | _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' | ||
| 7075 | ;; | ||
| 7076 | *) | ||
| 7077 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' | ||
| 7078 | _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] | ||
| 7079 | ;; | ||
| 7080 | esac | ||
| 7081 | ;; | ||
| 7082 | linux* | k*bsd*-gnu | gnu*) | ||
| 7083 | _LT_TAGVAR(link_all_deplibs, $1)=no | ||
| 7084 | ;; | ||
| 7085 | *) | ||
| 7086 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
| 7087 | ;; | ||
| 7088 | esac | ||
| 7089 | ], [ | ||
| 7090 | runpath_var= | ||
| 7091 | _LT_TAGVAR(allow_undefined_flag, $1)= | ||
| 7092 | _LT_TAGVAR(always_export_symbols, $1)=no | ||
| 7093 | _LT_TAGVAR(archive_cmds, $1)= | ||
| 7094 | _LT_TAGVAR(archive_expsym_cmds, $1)= | ||
| 7095 | _LT_TAGVAR(compiler_needs_object, $1)=no | ||
| 7096 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | ||
| 7097 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | ||
| 7098 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
| 7099 | _LT_TAGVAR(hardcode_automatic, $1)=no | ||
| 7100 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
| 7101 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no | ||
| 7102 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | ||
| 7103 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | ||
| 7104 | _LT_TAGVAR(hardcode_minus_L, $1)=no | ||
| 7105 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | ||
| 7106 | _LT_TAGVAR(inherit_rpath, $1)=no | ||
| 7107 | _LT_TAGVAR(link_all_deplibs, $1)=unknown | ||
| 7108 | _LT_TAGVAR(module_cmds, $1)= | ||
| 7109 | _LT_TAGVAR(module_expsym_cmds, $1)= | ||
| 7110 | _LT_TAGVAR(old_archive_from_new_cmds, $1)= | ||
| 7111 | _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= | ||
| 7112 | _LT_TAGVAR(thread_safe_flag_spec, $1)= | ||
| 7113 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
| 7114 | # include_expsyms should be a list of space-separated symbols to be *always* | ||
| 7115 | # included in the symbol list | ||
| 7116 | _LT_TAGVAR(include_expsyms, $1)= | ||
| 7117 | # exclude_expsyms can be an extended regexp of symbols to exclude | ||
| 7118 | # it will be wrapped by ` (' and `)$', so one must not match beginning or | ||
| 7119 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', | ||
| 7120 | # as well as any symbol that contains `d'. | ||
| 7121 | _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] | ||
| 7122 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | ||
| 7123 | # platforms (ab)use it in PIC code, but their linkers get confused if | ||
| 7124 | # the symbol is explicitly referenced. Since portable code cannot | ||
| 7125 | # rely on this symbol name, it's probably fine to never include it in | ||
| 7126 | # preloaded symbol tables. | ||
| 7127 | # Exclude shared library initialization/finalization symbols. | ||
| 7128 | dnl Note also adjust exclude_expsyms for C++ above. | ||
| 7129 | extract_expsyms_cmds= | ||
| 7130 | |||
| 7131 | case $host_os in | ||
| 7132 | cygwin* | mingw* | pw32* | cegcc*) | ||
| 7133 | # FIXME: the MSVC++ port hasn't been tested in a loooong time | ||
| 7134 | # When not using gcc, we currently assume that we are using | ||
| 7135 | # Microsoft Visual C++. | ||
| 7136 | if test "$GCC" != yes; then | ||
| 7137 | with_gnu_ld=no | ||
| 7138 | fi | ||
| 7139 | ;; | ||
| 7140 | interix*) | ||
| 7141 | # we just hope/assume this is gcc and not c89 (= MSVC++) | ||
| 7142 | with_gnu_ld=yes | ||
| 7143 | ;; | ||
| 7144 | openbsd*) | ||
| 7145 | with_gnu_ld=no | ||
| 7146 | ;; | ||
| 7147 | linux* | k*bsd*-gnu | gnu*) | ||
| 7148 | _LT_TAGVAR(link_all_deplibs, $1)=no | ||
| 7149 | ;; | ||
| 7150 | esac | ||
| 7151 | |||
| 7152 | _LT_TAGVAR(ld_shlibs, $1)=yes | ||
| 7153 | |||
| 7154 | # On some targets, GNU ld is compatible enough with the native linker | ||
| 7155 | # that we're better off using the native interface for both. | ||
| 7156 | lt_use_gnu_ld_interface=no | ||
| 7157 | if test "$with_gnu_ld" = yes; then | ||
| 7158 | case $host_os in | ||
| 7159 | aix*) | ||
| 7160 | # The AIX port of GNU ld has always aspired to compatibility | ||
| 7161 | # with the native linker. However, as the warning in the GNU ld | ||
| 7162 | # block says, versions before 2.19.5* couldn't really create working | ||
| 7163 | # shared libraries, regardless of the interface used. | ||
| 7164 | case `$LD -v 2>&1` in | ||
| 7165 | *\ \(GNU\ Binutils\)\ 2.19.5*) ;; | ||
| 7166 | *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; | ||
| 7167 | *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; | ||
| 7168 | *) | ||
| 7169 | lt_use_gnu_ld_interface=yes | ||
| 7170 | ;; | ||
| 7171 | esac | ||
| 7172 | ;; | ||
| 7173 | *) | ||
| 7174 | lt_use_gnu_ld_interface=yes | ||
| 7175 | ;; | ||
| 7176 | esac | ||
| 7177 | fi | ||
| 7178 | |||
| 7179 | if test "$lt_use_gnu_ld_interface" = yes; then | ||
| 7180 | # If archive_cmds runs LD, not CC, wlarc should be empty | ||
| 7181 | wlarc='${wl}' | ||
| 7182 | |||
| 7183 | # Set some defaults for GNU ld with shared library support. These | ||
| 7184 | # are reset later if shared libraries are not supported. Putting them | ||
| 7185 | # here allows them to be overridden if necessary. | ||
| 7186 | runpath_var=LD_RUN_PATH | ||
| 7187 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
| 7188 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | ||
| 7189 | # ancient GNU ld didn't support --whole-archive et. al. | ||
| 7190 | if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then | ||
| 7191 | _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | ||
| 7192 | else | ||
| 7193 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
| 7194 | fi | ||
| 7195 | supports_anon_versioning=no | ||
| 7196 | case `$LD -v 2>&1` in | ||
| 7197 | *GNU\ gold*) supports_anon_versioning=yes ;; | ||
| 7198 | *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 | ||
| 7199 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... | ||
| 7200 | *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... | ||
| 7201 | *\ 2.11.*) ;; # other 2.11 versions | ||
| 7202 | *) supports_anon_versioning=yes ;; | ||
| 7203 | esac | ||
| 7204 | |||
| 7205 | # See if GNU ld supports shared libraries. | ||
| 7206 | case $host_os in | ||
| 7207 | aix[[3-9]]*) | ||
| 7208 | # On AIX/PPC, the GNU linker is very broken | ||
| 7209 | if test "$host_cpu" != ia64; then | ||
| 7210 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 7211 | cat <<_LT_EOF 1>&2 | ||
| 7212 | |||
| 7213 | *** Warning: the GNU linker, at least up to release 2.19, is reported | ||
| 7214 | *** to be unable to reliably create shared libraries on AIX. | ||
| 7215 | *** Therefore, libtool is disabling shared libraries support. If you | ||
| 7216 | *** really care for shared libraries, you may want to install binutils | ||
| 7217 | *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. | ||
| 7218 | *** You will then need to restart the configuration process. | ||
| 7219 | |||
| 7220 | _LT_EOF | ||
| 7221 | fi | ||
| 7222 | ;; | ||
| 7223 | |||
| 7224 | amigaos*) | ||
| 7225 | case $host_cpu in | ||
| 7226 | powerpc) | ||
| 7227 | # see comment about AmigaOS4 .so support | ||
| 7228 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 7229 | _LT_TAGVAR(archive_expsym_cmds, $1)='' | ||
| 7230 | ;; | ||
| 7231 | m68k) | ||
| 7232 | _LT_TAGVAR(archive_cmds, $1)='$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)' | ||
| 7233 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
| 7234 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
| 7235 | ;; | ||
| 7236 | esac | ||
| 7237 | ;; | ||
| 7238 | |||
| 7239 | beos*) | ||
| 7240 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
| 7241 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
| 7242 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | ||
| 7243 | # support --undefined. This deserves some investigation. FIXME | ||
| 7244 | _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 7245 | else | ||
| 7246 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 7247 | fi | ||
| 7248 | ;; | ||
| 7249 | |||
| 7250 | cygwin* | mingw* | pw32* | cegcc*) | ||
| 7251 | # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | ||
| 7252 | # as there is no search path for DLLs. | ||
| 7253 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
| 7254 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' | ||
| 7255 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
| 7256 | _LT_TAGVAR(always_export_symbols, $1)=no | ||
| 7257 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
| 7258 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' | ||
| 7259 | _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] | ||
| 7260 | |||
| 7261 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | ||
| 7262 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | ||
| 7263 | # If the export-symbols file already is a .def file (1st line | ||
| 7264 | # is EXPORTS), use it as is; otherwise, prepend... | ||
| 7265 | _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
| 7266 | cp $export_symbols $output_objdir/$soname.def; | ||
| 7267 | else | ||
| 7268 | echo EXPORTS > $output_objdir/$soname.def; | ||
| 7269 | cat $export_symbols >> $output_objdir/$soname.def; | ||
| 7270 | fi~ | ||
| 7271 | $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | ||
| 7272 | else | ||
| 7273 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 7274 | fi | ||
| 7275 | ;; | ||
| 7276 | |||
| 7277 | haiku*) | ||
| 7278 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 7279 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
| 7280 | ;; | ||
| 7281 | |||
| 7282 | interix[[3-9]]*) | ||
| 7283 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
| 7284 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 7285 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | ||
| 7286 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | ||
| 7287 | # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. | ||
| 7288 | # Instead, shared libraries are loaded at an image base (0x10000000 by | ||
| 7289 | # default) and relocated if they conflict, which is a slow very memory | ||
| 7290 | # consuming and fragmenting process. To avoid this, we pick a random, | ||
| 7291 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link | ||
| 7292 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. | ||
| 7293 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | ||
| 7294 | _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | ||
| 7295 | ;; | ||
| 7296 | |||
| 7297 | gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) | ||
| 7298 | tmp_diet=no | ||
| 7299 | if test "$host_os" = linux-dietlibc; then | ||
| 7300 | case $cc_basename in | ||
| 7301 | diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) | ||
| 7302 | esac | ||
| 7303 | fi | ||
| 7304 | if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ | ||
| 7305 | && test "$tmp_diet" = no | ||
| 7306 | then | ||
| 7307 | tmp_addflag=' $pic_flag' | ||
| 7308 | tmp_sharedflag='-shared' | ||
| 7309 | case $cc_basename,$host_cpu in | ||
| 7310 | pgcc*) # Portland Group C compiler | ||
| 7311 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' | ||
| 7312 | tmp_addflag=' $pic_flag' | ||
| 7313 | ;; | ||
| 7314 | pgf77* | pgf90* | pgf95* | pgfortran*) | ||
| 7315 | # Portland Group f77 and f90 compilers | ||
| 7316 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' | ||
| 7317 | tmp_addflag=' $pic_flag -Mnomain' ;; | ||
| 7318 | ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 | ||
| 7319 | tmp_addflag=' -i_dynamic' ;; | ||
| 7320 | efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 | ||
| 7321 | tmp_addflag=' -i_dynamic -nofor_main' ;; | ||
| 7322 | ifc* | ifort*) # Intel Fortran compiler | ||
| 7323 | tmp_addflag=' -nofor_main' ;; | ||
| 7324 | lf95*) # Lahey Fortran 8.1 | ||
| 7325 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
| 7326 | tmp_sharedflag='--shared' ;; | ||
| 7327 | xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) | ||
| 7328 | tmp_sharedflag='-qmkshrobj' | ||
| 7329 | tmp_addflag= ;; | ||
| 7330 | nvcc*) # Cuda Compiler Driver 2.2 | ||
| 7331 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' | ||
| 7332 | _LT_TAGVAR(compiler_needs_object, $1)=yes | ||
| 7333 | ;; | ||
| 7334 | esac | ||
| 7335 | case `$CC -V 2>&1 | sed 5q` in | ||
| 7336 | *Sun\ C*) # Sun C 5.9 | ||
| 7337 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' | ||
| 7338 | _LT_TAGVAR(compiler_needs_object, $1)=yes | ||
| 7339 | tmp_sharedflag='-G' ;; | ||
| 7340 | *Sun\ F*) # Sun Fortran 8.3 | ||
| 7341 | tmp_sharedflag='-G' ;; | ||
| 7342 | esac | ||
| 7343 | _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 7344 | |||
| 7345 | if test "x$supports_anon_versioning" = xyes; then | ||
| 7346 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ | ||
| 7347 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
| 7348 | echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
| 7349 | $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | ||
| 7350 | fi | ||
| 7351 | |||
| 7352 | case $cc_basename in | ||
| 7353 | xlf* | bgf* | bgxlf* | mpixlf*) | ||
| 7354 | # IBM XL Fortran 10.1 on PPC cannot create shared libs itself | ||
| 7355 | _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' | ||
| 7356 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
| 7357 | _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' | ||
| 7358 | if test "x$supports_anon_versioning" = xyes; then | ||
| 7359 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ | ||
| 7360 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
| 7361 | echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
| 7362 | $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | ||
| 7363 | fi | ||
| 7364 | ;; | ||
| 7365 | esac | ||
| 7366 | else | ||
| 7367 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 7368 | fi | ||
| 7369 | ;; | ||
| 7370 | |||
| 7371 | netbsd* | netbsdelf*-gnu) | ||
| 7372 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | ||
| 7373 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | ||
| 7374 | wlarc= | ||
| 7375 | else | ||
| 7376 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 7377 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
| 7378 | fi | ||
| 7379 | ;; | ||
| 7380 | |||
| 7381 | solaris*) | ||
| 7382 | if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then | ||
| 7383 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 7384 | cat <<_LT_EOF 1>&2 | ||
| 7385 | |||
| 7386 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably | ||
| 7387 | *** create shared libraries on Solaris systems. Therefore, libtool | ||
| 7388 | *** is disabling shared libraries support. We urge you to upgrade GNU | ||
| 7389 | *** binutils to release 2.9.1 or newer. Another option is to modify | ||
| 7390 | *** your PATH or compiler configuration so that the native linker is | ||
| 7391 | *** used, and then restart. | ||
| 7392 | |||
| 7393 | _LT_EOF | ||
| 7394 | elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
| 7395 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 7396 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
| 7397 | else | ||
| 7398 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 7399 | fi | ||
| 7400 | ;; | ||
| 7401 | |||
| 7402 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) | ||
| 7403 | case `$LD -v 2>&1` in | ||
| 7404 | *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) | ||
| 7405 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 7406 | cat <<_LT_EOF 1>&2 | ||
| 7407 | |||
| 7408 | *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not | ||
| 7409 | *** reliably create shared libraries on SCO systems. Therefore, libtool | ||
| 7410 | *** is disabling shared libraries support. We urge you to upgrade GNU | ||
| 7411 | *** binutils to release 2.16.91.0.3 or newer. Another option is to modify | ||
| 7412 | *** your PATH or compiler configuration so that the native linker is | ||
| 7413 | *** used, and then restart. | ||
| 7414 | |||
| 7415 | _LT_EOF | ||
| 7416 | ;; | ||
| 7417 | *) | ||
| 7418 | # For security reasons, it is highly recommended that you always | ||
| 7419 | # use absolute paths for naming shared libraries, and exclude the | ||
| 7420 | # DT_RUNPATH tag from executables and libraries. But doing so | ||
| 7421 | # requires that you compile everything twice, which is a pain. | ||
| 7422 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
| 7423 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
| 7424 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 7425 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
| 7426 | else | ||
| 7427 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 7428 | fi | ||
| 7429 | ;; | ||
| 7430 | esac | ||
| 7431 | ;; | ||
| 7432 | |||
| 7433 | sunos4*) | ||
| 7434 | _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
| 7435 | wlarc= | ||
| 7436 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 7437 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 7438 | ;; | ||
| 7439 | |||
| 7440 | *) | ||
| 7441 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
| 7442 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 7443 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
| 7444 | else | ||
| 7445 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 7446 | fi | ||
| 7447 | ;; | ||
| 7448 | esac | ||
| 7449 | |||
| 7450 | if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then | ||
| 7451 | runpath_var= | ||
| 7452 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | ||
| 7453 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | ||
| 7454 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
| 7455 | fi | ||
| 7456 | else | ||
| 7457 | # PORTME fill in a description of your system's linker (not GNU ld) | ||
| 7458 | case $host_os in | ||
| 7459 | aix3*) | ||
| 7460 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
| 7461 | _LT_TAGVAR(always_export_symbols, $1)=yes | ||
| 7462 | _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' | ||
| 7463 | # Note: this linker hardcodes the directories in LIBPATH if there | ||
| 7464 | # are no directories specified by -L. | ||
| 7465 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
| 7466 | if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then | ||
| 7467 | # Neither direct hardcoding nor static linking is supported with a | ||
| 7468 | # broken collect2. | ||
| 7469 | _LT_TAGVAR(hardcode_direct, $1)=unsupported | ||
| 7470 | fi | ||
| 7471 | ;; | ||
| 7472 | |||
| 7473 | aix[[4-9]]*) | ||
| 7474 | if test "$host_cpu" = ia64; then | ||
| 7475 | # On IA64, the linker does run time linking by default, so we don't | ||
| 7476 | # have to do anything special. | ||
| 7477 | aix_use_runtimelinking=no | ||
| 7478 | exp_sym_flag='-Bexport' | ||
| 7479 | no_entry_flag="" | ||
| 7480 | else | ||
| 7481 | # If we're using GNU nm, then we don't want the "-C" option. | ||
| 7482 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | ||
| 7483 | # Also, AIX nm treats weak defined symbols like other global | ||
| 7484 | # defined symbols, whereas GNU nm marks them as "W". | ||
| 7485 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then | ||
| 7486 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' | ||
| 7487 | else | ||
| 7488 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' | ||
| 7489 | fi | ||
| 7490 | aix_use_runtimelinking=no | ||
| 7491 | |||
| 7492 | # Test if we are trying to use run time linking or normal | ||
| 7493 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | ||
| 7494 | # need to do runtime linking. | ||
| 7495 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) | ||
| 7496 | for ld_flag in $LDFLAGS; do | ||
| 7497 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | ||
| 7498 | aix_use_runtimelinking=yes | ||
| 7499 | break | ||
| 7500 | fi | ||
| 7501 | done | ||
| 7502 | ;; | ||
| 7503 | esac | ||
| 7504 | |||
| 7505 | exp_sym_flag='-bexport' | ||
| 7506 | no_entry_flag='-bnoentry' | ||
| 7507 | fi | ||
| 7508 | |||
| 7509 | # When large executables or shared objects are built, AIX ld can | ||
| 7510 | # have problems creating the table of contents. If linking a library | ||
| 7511 | # or program results in "error TOC overflow" add -mminimal-toc to | ||
| 7512 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | ||
| 7513 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | ||
| 7514 | |||
| 7515 | _LT_TAGVAR(archive_cmds, $1)='' | ||
| 7516 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 7517 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | ||
| 7518 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | ||
| 7519 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
| 7520 | _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' | ||
| 7521 | |||
| 7522 | if test "$GCC" = yes; then | ||
| 7523 | case $host_os in aix4.[[012]]|aix4.[[012]].*) | ||
| 7524 | # We only want to do this on AIX 4.2 and lower, the check | ||
| 7525 | # below for broken collect2 doesn't work under 4.3+ | ||
| 7526 | collect2name=`${CC} -print-prog-name=collect2` | ||
| 7527 | if test -f "$collect2name" && | ||
| 7528 | strings "$collect2name" | $GREP resolve_lib_name >/dev/null | ||
| 7529 | then | ||
| 7530 | # We have reworked collect2 | ||
| 7531 | : | ||
| 7532 | else | ||
| 7533 | # We have old collect2 | ||
| 7534 | _LT_TAGVAR(hardcode_direct, $1)=unsupported | ||
| 7535 | # It fails to find uninstalled libraries when the uninstalled | ||
| 7536 | # path is not listed in the libpath. Setting hardcode_minus_L | ||
| 7537 | # to unsupported forces relinking | ||
| 7538 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
| 7539 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
| 7540 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | ||
| 7541 | fi | ||
| 7542 | ;; | ||
| 7543 | esac | ||
| 7544 | shared_flag='-shared' | ||
| 7545 | if test "$aix_use_runtimelinking" = yes; then | ||
| 7546 | shared_flag="$shared_flag "'${wl}-G' | ||
| 7547 | fi | ||
| 7548 | _LT_TAGVAR(link_all_deplibs, $1)=no | ||
| 7549 | else | ||
| 7550 | # not using gcc | ||
| 7551 | if test "$host_cpu" = ia64; then | ||
| 7552 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | ||
| 7553 | # chokes on -Wl,-G. The following line is correct: | ||
| 7554 | shared_flag='-G' | ||
| 7555 | else | ||
| 7556 | if test "$aix_use_runtimelinking" = yes; then | ||
| 7557 | shared_flag='${wl}-G' | ||
| 7558 | else | ||
| 7559 | shared_flag='${wl}-bM:SRE' | ||
| 7560 | fi | ||
| 7561 | fi | ||
| 7562 | fi | ||
| 7563 | |||
| 7564 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' | ||
| 7565 | # It seems that -bexpall does not export symbols beginning with | ||
| 7566 | # underscore (_), so it is better to generate a list of symbols to export. | ||
| 7567 | _LT_TAGVAR(always_export_symbols, $1)=yes | ||
| 7568 | if test "$aix_use_runtimelinking" = yes; then | ||
| 7569 | # Warning - without using the other runtime loading flags (-brtl), | ||
| 7570 | # -berok will link without error, but may produce a broken library. | ||
| 7571 | _LT_TAGVAR(allow_undefined_flag, $1)='-berok' | ||
| 7572 | # Determine the default libpath from the value encoded in an | ||
| 7573 | # empty executable. | ||
| 7574 | _LT_SYS_MODULE_PATH_AIX([$1]) | ||
| 7575 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
| 7576 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" | ||
| 7577 | else | ||
| 7578 | if test "$host_cpu" = ia64; then | ||
| 7579 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' | ||
| 7580 | _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" | ||
| 7581 | _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" | ||
| 7582 | else | ||
| 7583 | # Determine the default libpath from the value encoded in an | ||
| 7584 | # empty executable. | ||
| 7585 | _LT_SYS_MODULE_PATH_AIX([$1]) | ||
| 7586 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
| 7587 | # Warning - without using the other run time loading flags, | ||
| 7588 | # -berok will link without error, but may produce a broken library. | ||
| 7589 | _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' | ||
| 7590 | _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' | ||
| 7591 | if test "$with_gnu_ld" = yes; then | ||
| 7592 | # We only use this code for GNU lds that support --whole-archive. | ||
| 7593 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | ||
| 7594 | else | ||
| 7595 | # Exported symbols can be pulled into shared objects from archives | ||
| 7596 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' | ||
| 7597 | fi | ||
| 7598 | _LT_TAGVAR(archive_cmds_need_lc, $1)=yes | ||
| 7599 | # This is similar to how AIX traditionally builds its shared libraries. | ||
| 7600 | _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | ||
| 7601 | fi | ||
| 7602 | fi | ||
| 7603 | ;; | ||
| 7604 | |||
| 7605 | amigaos*) | ||
| 7606 | case $host_cpu in | ||
| 7607 | powerpc) | ||
| 7608 | # see comment about AmigaOS4 .so support | ||
| 7609 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 7610 | _LT_TAGVAR(archive_expsym_cmds, $1)='' | ||
| 7611 | ;; | ||
| 7612 | m68k) | ||
| 7613 | _LT_TAGVAR(archive_cmds, $1)='$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)' | ||
| 7614 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
| 7615 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
| 7616 | ;; | ||
| 7617 | esac | ||
| 7618 | ;; | ||
| 7619 | |||
| 7620 | bsdi[[45]]*) | ||
| 7621 | _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic | ||
| 7622 | ;; | ||
| 7623 | |||
| 7624 | cygwin* | mingw* | pw32* | cegcc*) | ||
| 7625 | # When not using gcc, we currently assume that we are using | ||
| 7626 | # Microsoft Visual C++. | ||
| 7627 | # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
| 7628 | # no search path for DLLs. | ||
| 7629 | case $cc_basename in | ||
| 7630 | cl*) | ||
| 7631 | # Native MSVC | ||
| 7632 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' | ||
| 7633 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
| 7634 | _LT_TAGVAR(always_export_symbols, $1)=yes | ||
| 7635 | _LT_TAGVAR(file_list_spec, $1)='@' | ||
| 7636 | # Tell ltmain to make .lib files, not .a files. | ||
| 7637 | libext=lib | ||
| 7638 | # Tell ltmain to make .dll files, not .so files. | ||
| 7639 | shrext_cmds=".dll" | ||
| 7640 | # FIXME: Setting linknames here is a bad hack. | ||
| 7641 | _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' | ||
| 7642 | _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
| 7643 | sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; | ||
| 7644 | else | ||
| 7645 | sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; | ||
| 7646 | fi~ | ||
| 7647 | $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ | ||
| 7648 | linknames=' | ||
| 7649 | # The linker will not automatically build a static lib if we build a DLL. | ||
| 7650 | # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' | ||
| 7651 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
| 7652 | _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' | ||
| 7653 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' | ||
| 7654 | # Don't use ranlib | ||
| 7655 | _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' | ||
| 7656 | _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ | ||
| 7657 | lt_tool_outputfile="@TOOL_OUTPUT@"~ | ||
| 7658 | case $lt_outputfile in | ||
| 7659 | *.exe|*.EXE) ;; | ||
| 7660 | *) | ||
| 7661 | lt_outputfile="$lt_outputfile.exe" | ||
| 7662 | lt_tool_outputfile="$lt_tool_outputfile.exe" | ||
| 7663 | ;; | ||
| 7664 | esac~ | ||
| 7665 | if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then | ||
| 7666 | $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; | ||
| 7667 | $RM "$lt_outputfile.manifest"; | ||
| 7668 | fi' | ||
| 7669 | ;; | ||
| 7670 | *) | ||
| 7671 | # Assume MSVC wrapper | ||
| 7672 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' | ||
| 7673 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
| 7674 | # Tell ltmain to make .lib files, not .a files. | ||
| 7675 | libext=lib | ||
| 7676 | # Tell ltmain to make .dll files, not .so files. | ||
| 7677 | shrext_cmds=".dll" | ||
| 7678 | # FIXME: Setting linknames here is a bad hack. | ||
| 7679 | _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
| 7680 | # The linker will automatically build a .lib file if we build a DLL. | ||
| 7681 | _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' | ||
| 7682 | # FIXME: Should let the user specify the lib program. | ||
| 7683 | _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' | ||
| 7684 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
| 7685 | ;; | ||
| 7686 | esac | ||
| 7687 | ;; | ||
| 7688 | |||
| 7689 | darwin* | rhapsody*) | ||
| 7690 | _LT_DARWIN_LINKER_FEATURES($1) | ||
| 7691 | ;; | ||
| 7692 | |||
| 7693 | dgux*) | ||
| 7694 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
| 7695 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
| 7696 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 7697 | ;; | ||
| 7698 | |||
| 7699 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor | ||
| 7700 | # support. Future versions do this automatically, but an explicit c++rt0.o | ||
| 7701 | # does not break anything, and helps significantly (at the cost of a little | ||
| 7702 | # extra space). | ||
| 7703 | freebsd2.2*) | ||
| 7704 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | ||
| 7705 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
| 7706 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 7707 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 7708 | ;; | ||
| 7709 | |||
| 7710 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. | ||
| 7711 | freebsd2.*) | ||
| 7712 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
| 7713 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 7714 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
| 7715 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 7716 | ;; | ||
| 7717 | |||
| 7718 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | ||
| 7719 | freebsd* | dragonfly*) | ||
| 7720 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
| 7721 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
| 7722 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 7723 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 7724 | ;; | ||
| 7725 | |||
| 7726 | hpux9*) | ||
| 7727 | if test "$GCC" = yes; then | ||
| 7728 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | ||
| 7729 | else | ||
| 7730 | _LT_TAGVAR(archive_cmds, $1)='$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' | ||
| 7731 | fi | ||
| 7732 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | ||
| 7733 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
| 7734 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 7735 | |||
| 7736 | # hardcode_minus_L: Not really in the search PATH, | ||
| 7737 | # but as the default location of the library. | ||
| 7738 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
| 7739 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | ||
| 7740 | ;; | ||
| 7741 | |||
| 7742 | hpux10*) | ||
| 7743 | if test "$GCC" = yes && test "$with_gnu_ld" = no; then | ||
| 7744 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
| 7745 | else | ||
| 7746 | _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | ||
| 7747 | fi | ||
| 7748 | if test "$with_gnu_ld" = no; then | ||
| 7749 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | ||
| 7750 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
| 7751 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 7752 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | ||
| 7753 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | ||
| 7754 | # hardcode_minus_L: Not really in the search PATH, | ||
| 7755 | # but as the default location of the library. | ||
| 7756 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
| 7757 | fi | ||
| 7758 | ;; | ||
| 7759 | |||
| 7760 | hpux11*) | ||
| 7761 | if test "$GCC" = yes && test "$with_gnu_ld" = no; then | ||
| 7762 | case $host_cpu in | ||
| 7763 | hppa*64*) | ||
| 7764 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 7765 | ;; | ||
| 7766 | ia64*) | ||
| 7767 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
| 7768 | ;; | ||
| 7769 | *) | ||
| 7770 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
| 7771 | ;; | ||
| 7772 | esac | ||
| 7773 | else | ||
| 7774 | case $host_cpu in | ||
| 7775 | hppa*64*) | ||
| 7776 | _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 7777 | ;; | ||
| 7778 | ia64*) | ||
| 7779 | _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
| 7780 | ;; | ||
| 7781 | *) | ||
| 7782 | m4_if($1, [], [ | ||
| 7783 | # Older versions of the 11.00 compiler do not understand -b yet | ||
| 7784 | # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) | ||
| 7785 | _LT_LINKER_OPTION([if $CC understands -b], | ||
| 7786 | _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], | ||
| 7787 | [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], | ||
| 7788 | [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], | ||
| 7789 | [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) | ||
| 7790 | ;; | ||
| 7791 | esac | ||
| 7792 | fi | ||
| 7793 | if test "$with_gnu_ld" = no; then | ||
| 7794 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | ||
| 7795 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
| 7796 | |||
| 7797 | case $host_cpu in | ||
| 7798 | hppa*64*|ia64*) | ||
| 7799 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
| 7800 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 7801 | ;; | ||
| 7802 | *) | ||
| 7803 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 7804 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | ||
| 7805 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | ||
| 7806 | |||
| 7807 | # hardcode_minus_L: Not really in the search PATH, | ||
| 7808 | # but as the default location of the library. | ||
| 7809 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
| 7810 | ;; | ||
| 7811 | esac | ||
| 7812 | fi | ||
| 7813 | ;; | ||
| 7814 | |||
| 7815 | irix5* | irix6* | nonstopux*) | ||
| 7816 | if test "$GCC" = yes; then | ||
| 7817 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
| 7818 | # Try to use the -exported_symbol ld option, if it does not | ||
| 7819 | # work, assume that -exports_file does not work either and | ||
| 7820 | # implicitly export all symbols. | ||
| 7821 | # This should be the same for all languages, so no per-tag cache variable. | ||
| 7822 | AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], | ||
| 7823 | [lt_cv_irix_exported_symbol], | ||
| 7824 | [save_LDFLAGS="$LDFLAGS" | ||
| 7825 | LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | ||
| 7826 | AC_LINK_IFELSE( | ||
| 7827 | [AC_LANG_SOURCE( | ||
| 7828 | [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], | ||
| 7829 | [C++], [[int foo (void) { return 0; }]], | ||
| 7830 | [Fortran 77], [[ | ||
| 7831 | subroutine foo | ||
| 7832 | end]], | ||
| 7833 | [Fortran], [[ | ||
| 7834 | subroutine foo | ||
| 7835 | end]])])], | ||
| 7836 | [lt_cv_irix_exported_symbol=yes], | ||
| 7837 | [lt_cv_irix_exported_symbol=no]) | ||
| 7838 | LDFLAGS="$save_LDFLAGS"]) | ||
| 7839 | if test "$lt_cv_irix_exported_symbol" = yes; then | ||
| 7840 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' | ||
| 7841 | fi | ||
| 7842 | else | ||
| 7843 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' | ||
| 7844 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' | ||
| 7845 | fi | ||
| 7846 | _LT_TAGVAR(archive_cmds_need_lc, $1)='no' | ||
| 7847 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
| 7848 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
| 7849 | _LT_TAGVAR(inherit_rpath, $1)=yes | ||
| 7850 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
| 7851 | ;; | ||
| 7852 | |||
| 7853 | netbsd* | netbsdelf*-gnu) | ||
| 7854 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | ||
| 7855 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | ||
| 7856 | else | ||
| 7857 | _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF | ||
| 7858 | fi | ||
| 7859 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
| 7860 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 7861 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 7862 | ;; | ||
| 7863 | |||
| 7864 | newsos6) | ||
| 7865 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
| 7866 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 7867 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
| 7868 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
| 7869 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 7870 | ;; | ||
| 7871 | |||
| 7872 | *nto* | *qnx*) | ||
| 7873 | ;; | ||
| 7874 | |||
| 7875 | openbsd*) | ||
| 7876 | if test -f /usr/libexec/ld.so; then | ||
| 7877 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 7878 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 7879 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | ||
| 7880 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
| 7881 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
| 7882 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' | ||
| 7883 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | ||
| 7884 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | ||
| 7885 | else | ||
| 7886 | case $host_os in | ||
| 7887 | openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) | ||
| 7888 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
| 7889 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
| 7890 | ;; | ||
| 7891 | *) | ||
| 7892 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
| 7893 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | ||
| 7894 | ;; | ||
| 7895 | esac | ||
| 7896 | fi | ||
| 7897 | else | ||
| 7898 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 7899 | fi | ||
| 7900 | ;; | ||
| 7901 | |||
| 7902 | os2*) | ||
| 7903 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
| 7904 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
| 7905 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
| 7906 | _LT_TAGVAR(archive_cmds, $1)='$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' | ||
| 7907 | _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' | ||
| 7908 | ;; | ||
| 7909 | |||
| 7910 | osf3*) | ||
| 7911 | if test "$GCC" = yes; then | ||
| 7912 | _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | ||
| 7913 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
| 7914 | else | ||
| 7915 | _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | ||
| 7916 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' | ||
| 7917 | fi | ||
| 7918 | _LT_TAGVAR(archive_cmds_need_lc, $1)='no' | ||
| 7919 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
| 7920 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
| 7921 | ;; | ||
| 7922 | |||
| 7923 | osf4* | osf5*) # as osf3* with the addition of -msym flag | ||
| 7924 | if test "$GCC" = yes; then | ||
| 7925 | _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | ||
| 7926 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
| 7927 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
| 7928 | else | ||
| 7929 | _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | ||
| 7930 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' | ||
| 7931 | _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ | ||
| 7932 | $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' | ||
| 7933 | |||
| 7934 | # Both c and cxx compiler support -rpath directly | ||
| 7935 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | ||
| 7936 | fi | ||
| 7937 | _LT_TAGVAR(archive_cmds_need_lc, $1)='no' | ||
| 7938 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
| 7939 | ;; | ||
| 7940 | |||
| 7941 | solaris*) | ||
| 7942 | _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' | ||
| 7943 | if test "$GCC" = yes; then | ||
| 7944 | wlarc='${wl}' | ||
| 7945 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 7946 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
| 7947 | $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | ||
| 7948 | else | ||
| 7949 | case `$CC -V 2>&1` in | ||
| 7950 | *"Compilers 5.0"*) | ||
| 7951 | wlarc='' | ||
| 7952 | _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
| 7953 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
| 7954 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' | ||
| 7955 | ;; | ||
| 7956 | *) | ||
| 7957 | wlarc='${wl}' | ||
| 7958 | _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 7959 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
| 7960 | $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | ||
| 7961 | ;; | ||
| 7962 | esac | ||
| 7963 | fi | ||
| 7964 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
| 7965 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 7966 | case $host_os in | ||
| 7967 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | ||
| 7968 | *) | ||
| 7969 | # The compiler driver will combine and reorder linker options, | ||
| 7970 | # but understands `-z linker_flag'. GCC discards it without `$wl', | ||
| 7971 | # but is careful enough not to reorder. | ||
| 7972 | # Supported since Solaris 2.6 (maybe 2.5.1?) | ||
| 7973 | if test "$GCC" = yes; then | ||
| 7974 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | ||
| 7975 | else | ||
| 7976 | _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' | ||
| 7977 | fi | ||
| 7978 | ;; | ||
| 7979 | esac | ||
| 7980 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
| 7981 | ;; | ||
| 7982 | |||
| 7983 | sunos4*) | ||
| 7984 | if test "x$host_vendor" = xsequent; then | ||
| 7985 | # Use $CC to link under sequent, because it throws in some extra .o | ||
| 7986 | # files that make .init and .fini sections work. | ||
| 7987 | _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 7988 | else | ||
| 7989 | _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | ||
| 7990 | fi | ||
| 7991 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
| 7992 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 7993 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
| 7994 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 7995 | ;; | ||
| 7996 | |||
| 7997 | sysv4) | ||
| 7998 | case $host_vendor in | ||
| 7999 | sni) | ||
| 8000 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
| 8001 | _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? | ||
| 8002 | ;; | ||
| 8003 | siemens) | ||
| 8004 | ## LD is ld it makes a PLAMLIB | ||
| 8005 | ## CC just makes a GrossModule. | ||
| 8006 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' | ||
| 8007 | _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' | ||
| 8008 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
| 8009 | ;; | ||
| 8010 | motorola) | ||
| 8011 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
| 8012 | _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie | ||
| 8013 | ;; | ||
| 8014 | esac | ||
| 8015 | runpath_var='LD_RUN_PATH' | ||
| 8016 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 8017 | ;; | ||
| 8018 | |||
| 8019 | sysv4.3*) | ||
| 8020 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
| 8021 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 8022 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' | ||
| 8023 | ;; | ||
| 8024 | |||
| 8025 | sysv4*MP*) | ||
| 8026 | if test -d /usr/nec; then | ||
| 8027 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
| 8028 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 8029 | runpath_var=LD_RUN_PATH | ||
| 8030 | hardcode_runpath_var=yes | ||
| 8031 | _LT_TAGVAR(ld_shlibs, $1)=yes | ||
| 8032 | fi | ||
| 8033 | ;; | ||
| 8034 | |||
| 8035 | sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) | ||
| 8036 | _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | ||
| 8037 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
| 8038 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 8039 | runpath_var='LD_RUN_PATH' | ||
| 8040 | |||
| 8041 | if test "$GCC" = yes; then | ||
| 8042 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 8043 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 8044 | else | ||
| 8045 | _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 8046 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 8047 | fi | ||
| 8048 | ;; | ||
| 8049 | |||
| 8050 | sysv5* | sco3.2v5* | sco5v6*) | ||
| 8051 | # Note: We can NOT use -z defs as we might desire, because we do not | ||
| 8052 | # link with -lc, and that would cause any symbols used from libc to | ||
| 8053 | # always be unresolved, which means just about no library would | ||
| 8054 | # ever link correctly. If we're not using GNU ld we use -z text | ||
| 8055 | # though, which does catch some bad symbols but isn't as heavy-handed | ||
| 8056 | # as -z defs. | ||
| 8057 | _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | ||
| 8058 | _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' | ||
| 8059 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
| 8060 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 8061 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' | ||
| 8062 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | ||
| 8063 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
| 8064 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' | ||
| 8065 | runpath_var='LD_RUN_PATH' | ||
| 8066 | |||
| 8067 | if test "$GCC" = yes; then | ||
| 8068 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 8069 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 8070 | else | ||
| 8071 | _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 8072 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 8073 | fi | ||
| 8074 | ;; | ||
| 8075 | |||
| 8076 | uts4*) | ||
| 8077 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
| 8078 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
| 8079 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 8080 | ;; | ||
| 8081 | |||
| 8082 | *) | ||
| 8083 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 8084 | ;; | ||
| 8085 | esac | ||
| 8086 | |||
| 8087 | if test x$host_vendor = xsni; then | ||
| 8088 | case $host in | ||
| 8089 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | ||
| 8090 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' | ||
| 8091 | ;; | ||
| 8092 | esac | ||
| 8093 | fi | ||
| 8094 | fi | ||
| 8095 | ]) | ||
| 8096 | AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) | ||
| 8097 | test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no | ||
| 8098 | |||
| 8099 | _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld | ||
| 8100 | |||
| 8101 | _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl | ||
| 8102 | _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl | ||
| 8103 | _LT_DECL([], [extract_expsyms_cmds], [2], | ||
| 8104 | [The commands to extract the exported symbol list from a shared archive]) | ||
| 8105 | |||
| 8106 | # | ||
| 8107 | # Do we need to explicitly link libc? | ||
| 8108 | # | ||
| 8109 | case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in | ||
| 8110 | x|xyes) | ||
| 8111 | # Assume -lc should be added | ||
| 8112 | _LT_TAGVAR(archive_cmds_need_lc, $1)=yes | ||
| 8113 | |||
| 8114 | if test "$enable_shared" = yes && test "$GCC" = yes; then | ||
| 8115 | case $_LT_TAGVAR(archive_cmds, $1) in | ||
| 8116 | *'~'*) | ||
| 8117 | # FIXME: we may have to deal with multi-command sequences. | ||
| 8118 | ;; | ||
| 8119 | '$CC '*) | ||
| 8120 | # Test whether the compiler implicitly links with -lc since on some | ||
| 8121 | # systems, -lgcc has to come before -lc. If gcc already passes -lc | ||
| 8122 | # to ld, don't add -lc before -lgcc. | ||
| 8123 | AC_CACHE_CHECK([whether -lc should be explicitly linked in], | ||
| 8124 | [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), | ||
| 8125 | [$RM conftest* | ||
| 8126 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
| 8127 | |||
| 8128 | if AC_TRY_EVAL(ac_compile) 2>conftest.err; then | ||
| 8129 | soname=conftest | ||
| 8130 | lib=conftest | ||
| 8131 | libobjs=conftest.$ac_objext | ||
| 8132 | deplibs= | ||
| 8133 | wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) | ||
| 8134 | pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) | ||
| 8135 | compiler_flags=-v | ||
| 8136 | linker_flags=-v | ||
| 8137 | verstring= | ||
| 8138 | output_objdir=. | ||
| 8139 | libname=conftest | ||
| 8140 | lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) | ||
| 8141 | _LT_TAGVAR(allow_undefined_flag, $1)= | ||
| 8142 | if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) | ||
| 8143 | then | ||
| 8144 | lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
| 8145 | else | ||
| 8146 | lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes | ||
| 8147 | fi | ||
| 8148 | _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag | ||
| 8149 | else | ||
| 8150 | cat conftest.err 1>&5 | ||
| 8151 | fi | ||
| 8152 | $RM conftest* | ||
| 8153 | ]) | ||
| 8154 | _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) | ||
| 8155 | ;; | ||
| 8156 | esac | ||
| 8157 | fi | ||
| 8158 | ;; | ||
| 8159 | esac | ||
| 8160 | |||
| 8161 | _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], | ||
| 8162 | [Whether or not to add -lc for building shared libraries]) | ||
| 8163 | _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], | ||
| 8164 | [enable_shared_with_static_runtimes], [0], | ||
| 8165 | [Whether or not to disallow shared libs when runtime libs are static]) | ||
| 8166 | _LT_TAGDECL([], [export_dynamic_flag_spec], [1], | ||
| 8167 | [Compiler flag to allow reflexive dlopens]) | ||
| 8168 | _LT_TAGDECL([], [whole_archive_flag_spec], [1], | ||
| 8169 | [Compiler flag to generate shared objects directly from archives]) | ||
| 8170 | _LT_TAGDECL([], [compiler_needs_object], [1], | ||
| 8171 | [Whether the compiler copes with passing no objects directly]) | ||
| 8172 | _LT_TAGDECL([], [old_archive_from_new_cmds], [2], | ||
| 8173 | [Create an old-style archive from a shared archive]) | ||
| 8174 | _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], | ||
| 8175 | [Create a temporary old-style archive to link instead of a shared archive]) | ||
| 8176 | _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) | ||
| 8177 | _LT_TAGDECL([], [archive_expsym_cmds], [2]) | ||
| 8178 | _LT_TAGDECL([], [module_cmds], [2], | ||
| 8179 | [Commands used to build a loadable module if different from building | ||
| 8180 | a shared archive.]) | ||
| 8181 | _LT_TAGDECL([], [module_expsym_cmds], [2]) | ||
| 8182 | _LT_TAGDECL([], [with_gnu_ld], [1], | ||
| 8183 | [Whether we are building with GNU ld or not]) | ||
| 8184 | _LT_TAGDECL([], [allow_undefined_flag], [1], | ||
| 8185 | [Flag that allows shared libraries with undefined symbols to be built]) | ||
| 8186 | _LT_TAGDECL([], [no_undefined_flag], [1], | ||
| 8187 | [Flag that enforces no undefined symbols]) | ||
| 8188 | _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], | ||
| 8189 | [Flag to hardcode $libdir into a binary during linking. | ||
| 8190 | This must work even if $libdir does not exist]) | ||
| 8191 | _LT_TAGDECL([], [hardcode_libdir_separator], [1], | ||
| 8192 | [Whether we need a single "-rpath" flag with a separated argument]) | ||
| 8193 | _LT_TAGDECL([], [hardcode_direct], [0], | ||
| 8194 | [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes | ||
| 8195 | DIR into the resulting binary]) | ||
| 8196 | _LT_TAGDECL([], [hardcode_direct_absolute], [0], | ||
| 8197 | [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes | ||
| 8198 | DIR into the resulting binary and the resulting library dependency is | ||
| 8199 | "absolute", i.e impossible to change by setting ${shlibpath_var} if the | ||
| 8200 | library is relocated]) | ||
| 8201 | _LT_TAGDECL([], [hardcode_minus_L], [0], | ||
| 8202 | [Set to "yes" if using the -LDIR flag during linking hardcodes DIR | ||
| 8203 | into the resulting binary]) | ||
| 8204 | _LT_TAGDECL([], [hardcode_shlibpath_var], [0], | ||
| 8205 | [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR | ||
| 8206 | into the resulting binary]) | ||
| 8207 | _LT_TAGDECL([], [hardcode_automatic], [0], | ||
| 8208 | [Set to "yes" if building a shared library automatically hardcodes DIR | ||
| 8209 | into the library and all subsequent libraries and executables linked | ||
| 8210 | against it]) | ||
| 8211 | _LT_TAGDECL([], [inherit_rpath], [0], | ||
| 8212 | [Set to yes if linker adds runtime paths of dependent libraries | ||
| 8213 | to runtime path list]) | ||
| 8214 | _LT_TAGDECL([], [link_all_deplibs], [0], | ||
| 8215 | [Whether libtool must link a program against all its dependency libraries]) | ||
| 8216 | _LT_TAGDECL([], [always_export_symbols], [0], | ||
| 8217 | [Set to "yes" if exported symbols are required]) | ||
| 8218 | _LT_TAGDECL([], [export_symbols_cmds], [2], | ||
| 8219 | [The commands to list exported symbols]) | ||
| 8220 | _LT_TAGDECL([], [exclude_expsyms], [1], | ||
| 8221 | [Symbols that should not be listed in the preloaded symbols]) | ||
| 8222 | _LT_TAGDECL([], [include_expsyms], [1], | ||
| 8223 | [Symbols that must always be exported]) | ||
| 8224 | _LT_TAGDECL([], [prelink_cmds], [2], | ||
| 8225 | [Commands necessary for linking programs (against libraries) with templates]) | ||
| 8226 | _LT_TAGDECL([], [postlink_cmds], [2], | ||
| 8227 | [Commands necessary for finishing linking programs]) | ||
| 8228 | _LT_TAGDECL([], [file_list_spec], [1], | ||
| 8229 | [Specify filename containing input files]) | ||
| 8230 | dnl FIXME: Not yet implemented | ||
| 8231 | dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], | ||
| 8232 | dnl [Compiler flag to generate thread safe objects]) | ||
| 8233 | ])# _LT_LINKER_SHLIBS | ||
| 8234 | |||
| 8235 | |||
| 8236 | # _LT_LANG_C_CONFIG([TAG]) | ||
| 8237 | # ------------------------ | ||
| 8238 | # Ensure that the configuration variables for a C compiler are suitably | ||
| 8239 | # defined. These variables are subsequently used by _LT_CONFIG to write | ||
| 8240 | # the compiler configuration to `libtool'. | ||
| 8241 | m4_defun([_LT_LANG_C_CONFIG], | ||
| 8242 | [m4_require([_LT_DECL_EGREP])dnl | ||
| 8243 | lt_save_CC="$CC" | ||
| 8244 | AC_LANG_PUSH(C) | ||
| 8245 | |||
| 8246 | # Source file extension for C test sources. | ||
| 8247 | ac_ext=c | ||
| 8248 | |||
| 8249 | # Object file extension for compiled C test sources. | ||
| 8250 | objext=o | ||
| 8251 | _LT_TAGVAR(objext, $1)=$objext | ||
| 8252 | |||
| 8253 | # Code to be used in simple compile tests | ||
| 8254 | lt_simple_compile_test_code="int some_variable = 0;" | ||
| 8255 | |||
| 8256 | # Code to be used in simple link tests | ||
| 8257 | lt_simple_link_test_code='int main(){return(0);}' | ||
| 8258 | |||
| 8259 | _LT_TAG_COMPILER | ||
| 8260 | # Save the default compiler, since it gets overwritten when the other | ||
| 8261 | # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. | ||
| 8262 | compiler_DEFAULT=$CC | ||
| 8263 | |||
| 8264 | # save warnings/boilerplate of simple test code | ||
| 8265 | _LT_COMPILER_BOILERPLATE | ||
| 8266 | _LT_LINKER_BOILERPLATE | ||
| 8267 | |||
| 8268 | if test -n "$compiler"; then | ||
| 8269 | _LT_COMPILER_NO_RTTI($1) | ||
| 8270 | _LT_COMPILER_PIC($1) | ||
| 8271 | _LT_COMPILER_C_O($1) | ||
| 8272 | _LT_COMPILER_FILE_LOCKS($1) | ||
| 8273 | _LT_LINKER_SHLIBS($1) | ||
| 8274 | _LT_SYS_DYNAMIC_LINKER($1) | ||
| 8275 | _LT_LINKER_HARDCODE_LIBPATH($1) | ||
| 8276 | LT_SYS_DLOPEN_SELF | ||
| 8277 | _LT_CMD_STRIPLIB | ||
| 8278 | |||
| 8279 | # Report which library types will actually be built | ||
| 8280 | AC_MSG_CHECKING([if libtool supports shared libraries]) | ||
| 8281 | AC_MSG_RESULT([$can_build_shared]) | ||
| 8282 | |||
| 8283 | AC_MSG_CHECKING([whether to build shared libraries]) | ||
| 8284 | test "$can_build_shared" = "no" && enable_shared=no | ||
| 8285 | |||
| 8286 | # On AIX, shared libraries and static libraries use the same namespace, and | ||
| 8287 | # are all built from PIC. | ||
| 8288 | case $host_os in | ||
| 8289 | aix3*) | ||
| 8290 | test "$enable_shared" = yes && enable_static=no | ||
| 8291 | if test -n "$RANLIB"; then | ||
| 8292 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | ||
| 8293 | postinstall_cmds='$RANLIB $lib' | ||
| 8294 | fi | ||
| 8295 | ;; | ||
| 8296 | |||
| 8297 | aix[[4-9]]*) | ||
| 8298 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | ||
| 8299 | test "$enable_shared" = yes && enable_static=no | ||
| 8300 | fi | ||
| 8301 | ;; | ||
| 8302 | esac | ||
| 8303 | AC_MSG_RESULT([$enable_shared]) | ||
| 8304 | |||
| 8305 | AC_MSG_CHECKING([whether to build static libraries]) | ||
| 8306 | # Make sure either enable_shared or enable_static is yes. | ||
| 8307 | test "$enable_shared" = yes || enable_static=yes | ||
| 8308 | AC_MSG_RESULT([$enable_static]) | ||
| 8309 | |||
| 8310 | _LT_CONFIG($1) | ||
| 8311 | fi | ||
| 8312 | AC_LANG_POP | ||
| 8313 | CC="$lt_save_CC" | ||
| 8314 | ])# _LT_LANG_C_CONFIG | ||
| 8315 | |||
| 8316 | |||
| 8317 | # _LT_LANG_CXX_CONFIG([TAG]) | ||
| 8318 | # -------------------------- | ||
| 8319 | # Ensure that the configuration variables for a C++ compiler are suitably | ||
| 8320 | # defined. These variables are subsequently used by _LT_CONFIG to write | ||
| 8321 | # the compiler configuration to `libtool'. | ||
| 8322 | m4_defun([_LT_LANG_CXX_CONFIG], | ||
| 8323 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
| 8324 | m4_require([_LT_DECL_EGREP])dnl | ||
| 8325 | m4_require([_LT_PATH_MANIFEST_TOOL])dnl | ||
| 8326 | if test -n "$CXX" && ( test "X$CXX" != "Xno" && | ||
| 8327 | ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || | ||
| 8328 | (test "X$CXX" != "Xg++"))) ; then | ||
| 8329 | AC_PROG_CXXCPP | ||
| 8330 | else | ||
| 8331 | _lt_caught_CXX_error=yes | ||
| 8332 | fi | ||
| 8333 | |||
| 8334 | AC_LANG_PUSH(C++) | ||
| 8335 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
| 8336 | _LT_TAGVAR(allow_undefined_flag, $1)= | ||
| 8337 | _LT_TAGVAR(always_export_symbols, $1)=no | ||
| 8338 | _LT_TAGVAR(archive_expsym_cmds, $1)= | ||
| 8339 | _LT_TAGVAR(compiler_needs_object, $1)=no | ||
| 8340 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | ||
| 8341 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
| 8342 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no | ||
| 8343 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | ||
| 8344 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | ||
| 8345 | _LT_TAGVAR(hardcode_minus_L, $1)=no | ||
| 8346 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | ||
| 8347 | _LT_TAGVAR(hardcode_automatic, $1)=no | ||
| 8348 | _LT_TAGVAR(inherit_rpath, $1)=no | ||
| 8349 | _LT_TAGVAR(module_cmds, $1)= | ||
| 8350 | _LT_TAGVAR(module_expsym_cmds, $1)= | ||
| 8351 | _LT_TAGVAR(link_all_deplibs, $1)=unknown | ||
| 8352 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | ||
| 8353 | _LT_TAGVAR(reload_flag, $1)=$reload_flag | ||
| 8354 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds | ||
| 8355 | _LT_TAGVAR(no_undefined_flag, $1)= | ||
| 8356 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
| 8357 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | ||
| 8358 | |||
| 8359 | # Source file extension for C++ test sources. | ||
| 8360 | ac_ext=cpp | ||
| 8361 | |||
| 8362 | # Object file extension for compiled C++ test sources. | ||
| 8363 | objext=o | ||
| 8364 | _LT_TAGVAR(objext, $1)=$objext | ||
| 8365 | |||
| 8366 | # No sense in running all these tests if we already determined that | ||
| 8367 | # the CXX compiler isn't working. Some variables (like enable_shared) | ||
| 8368 | # are currently assumed to apply to all compilers on this platform, | ||
| 8369 | # and will be corrupted by setting them based on a non-working compiler. | ||
| 8370 | if test "$_lt_caught_CXX_error" != yes; then | ||
| 8371 | # Code to be used in simple compile tests | ||
| 8372 | lt_simple_compile_test_code="int some_variable = 0;" | ||
| 8373 | |||
| 8374 | # Code to be used in simple link tests | ||
| 8375 | lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' | ||
| 8376 | |||
| 8377 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
| 8378 | _LT_TAG_COMPILER | ||
| 8379 | |||
| 8380 | # save warnings/boilerplate of simple test code | ||
| 8381 | _LT_COMPILER_BOILERPLATE | ||
| 8382 | _LT_LINKER_BOILERPLATE | ||
| 8383 | |||
| 8384 | # Allow CC to be a program name with arguments. | ||
| 8385 | lt_save_CC=$CC | ||
| 8386 | lt_save_CFLAGS=$CFLAGS | ||
| 8387 | lt_save_LD=$LD | ||
| 8388 | lt_save_GCC=$GCC | ||
| 8389 | GCC=$GXX | ||
| 8390 | lt_save_with_gnu_ld=$with_gnu_ld | ||
| 8391 | lt_save_path_LD=$lt_cv_path_LD | ||
| 8392 | if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then | ||
| 8393 | lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx | ||
| 8394 | else | ||
| 8395 | $as_unset lt_cv_prog_gnu_ld | ||
| 8396 | fi | ||
| 8397 | if test -n "${lt_cv_path_LDCXX+set}"; then | ||
| 8398 | lt_cv_path_LD=$lt_cv_path_LDCXX | ||
| 8399 | else | ||
| 8400 | $as_unset lt_cv_path_LD | ||
| 8401 | fi | ||
| 8402 | test -z "${LDCXX+set}" || LD=$LDCXX | ||
| 8403 | CC=${CXX-"c++"} | ||
| 8404 | CFLAGS=$CXXFLAGS | ||
| 8405 | compiler=$CC | ||
| 8406 | _LT_TAGVAR(compiler, $1)=$CC | ||
| 8407 | _LT_CC_BASENAME([$compiler]) | ||
| 8408 | |||
| 8409 | if test -n "$compiler"; then | ||
| 8410 | # We don't want -fno-exception when compiling C++ code, so set the | ||
| 8411 | # no_builtin_flag separately | ||
| 8412 | if test "$GXX" = yes; then | ||
| 8413 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' | ||
| 8414 | else | ||
| 8415 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= | ||
| 8416 | fi | ||
| 8417 | |||
| 8418 | if test "$GXX" = yes; then | ||
| 8419 | # Set up default GNU C++ configuration | ||
| 8420 | |||
| 8421 | LT_PATH_LD | ||
| 8422 | |||
| 8423 | # Check if GNU C++ uses GNU ld as the underlying linker, since the | ||
| 8424 | # archiving commands below assume that GNU ld is being used. | ||
| 8425 | if test "$with_gnu_ld" = yes; then | ||
| 8426 | _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 8427 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
| 8428 | |||
| 8429 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
| 8430 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | ||
| 8431 | |||
| 8432 | # If archive_cmds runs LD, not CC, wlarc should be empty | ||
| 8433 | # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to | ||
| 8434 | # investigate it a little bit more. (MM) | ||
| 8435 | wlarc='${wl}' | ||
| 8436 | |||
| 8437 | # ancient GNU ld didn't support --whole-archive et. al. | ||
| 8438 | if eval "`$CC -print-prog-name=ld` --help 2>&1" | | ||
| 8439 | $GREP 'no-whole-archive' > /dev/null; then | ||
| 8440 | _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | ||
| 8441 | else | ||
| 8442 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
| 8443 | fi | ||
| 8444 | else | ||
| 8445 | with_gnu_ld=no | ||
| 8446 | wlarc= | ||
| 8447 | |||
| 8448 | # A generic and very simple default shared library creation | ||
| 8449 | # command for GNU C++ for the case where it uses the native | ||
| 8450 | # linker, instead of GNU ld. If possible, this setting should | ||
| 8451 | # overridden to take advantage of the native linker features on | ||
| 8452 | # the platform it is being used on. | ||
| 8453 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | ||
| 8454 | fi | ||
| 8455 | |||
| 8456 | # Commands to make compiler produce verbose output that lists | ||
| 8457 | # what "hidden" libraries, object files and flags are used when | ||
| 8458 | # linking a shared library. | ||
| 8459 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | ||
| 8460 | |||
| 8461 | else | ||
| 8462 | GXX=no | ||
| 8463 | with_gnu_ld=no | ||
| 8464 | wlarc= | ||
| 8465 | fi | ||
| 8466 | |||
| 8467 | # PORTME: fill in a description of your system's C++ link characteristics | ||
| 8468 | AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) | ||
| 8469 | _LT_TAGVAR(ld_shlibs, $1)=yes | ||
| 8470 | case $host_os in | ||
| 8471 | aix3*) | ||
| 8472 | # FIXME: insert proper C++ library support | ||
| 8473 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 8474 | ;; | ||
| 8475 | aix[[4-9]]*) | ||
| 8476 | if test "$host_cpu" = ia64; then | ||
| 8477 | # On IA64, the linker does run time linking by default, so we don't | ||
| 8478 | # have to do anything special. | ||
| 8479 | aix_use_runtimelinking=no | ||
| 8480 | exp_sym_flag='-Bexport' | ||
| 8481 | no_entry_flag="" | ||
| 8482 | else | ||
| 8483 | aix_use_runtimelinking=no | ||
| 8484 | |||
| 8485 | # Test if we are trying to use run time linking or normal | ||
| 8486 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | ||
| 8487 | # need to do runtime linking. | ||
| 8488 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) | ||
| 8489 | for ld_flag in $LDFLAGS; do | ||
| 8490 | case $ld_flag in | ||
| 8491 | *-brtl*) | ||
| 8492 | aix_use_runtimelinking=yes | ||
| 8493 | break | ||
| 8494 | ;; | ||
| 8495 | esac | ||
| 8496 | done | ||
| 8497 | ;; | ||
| 8498 | esac | ||
| 8499 | |||
| 8500 | exp_sym_flag='-bexport' | ||
| 8501 | no_entry_flag='-bnoentry' | ||
| 8502 | fi | ||
| 8503 | |||
| 8504 | # When large executables or shared objects are built, AIX ld can | ||
| 8505 | # have problems creating the table of contents. If linking a library | ||
| 8506 | # or program results in "error TOC overflow" add -mminimal-toc to | ||
| 8507 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | ||
| 8508 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | ||
| 8509 | |||
| 8510 | _LT_TAGVAR(archive_cmds, $1)='' | ||
| 8511 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 8512 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | ||
| 8513 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | ||
| 8514 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
| 8515 | _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' | ||
| 8516 | |||
| 8517 | if test "$GXX" = yes; then | ||
| 8518 | case $host_os in aix4.[[012]]|aix4.[[012]].*) | ||
| 8519 | # We only want to do this on AIX 4.2 and lower, the check | ||
| 8520 | # below for broken collect2 doesn't work under 4.3+ | ||
| 8521 | collect2name=`${CC} -print-prog-name=collect2` | ||
| 8522 | if test -f "$collect2name" && | ||
| 8523 | strings "$collect2name" | $GREP resolve_lib_name >/dev/null | ||
| 8524 | then | ||
| 8525 | # We have reworked collect2 | ||
| 8526 | : | ||
| 8527 | else | ||
| 8528 | # We have old collect2 | ||
| 8529 | _LT_TAGVAR(hardcode_direct, $1)=unsupported | ||
| 8530 | # It fails to find uninstalled libraries when the uninstalled | ||
| 8531 | # path is not listed in the libpath. Setting hardcode_minus_L | ||
| 8532 | # to unsupported forces relinking | ||
| 8533 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
| 8534 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
| 8535 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | ||
| 8536 | fi | ||
| 8537 | esac | ||
| 8538 | shared_flag='-shared' | ||
| 8539 | if test "$aix_use_runtimelinking" = yes; then | ||
| 8540 | shared_flag="$shared_flag "'${wl}-G' | ||
| 8541 | fi | ||
| 8542 | else | ||
| 8543 | # not using gcc | ||
| 8544 | if test "$host_cpu" = ia64; then | ||
| 8545 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | ||
| 8546 | # chokes on -Wl,-G. The following line is correct: | ||
| 8547 | shared_flag='-G' | ||
| 8548 | else | ||
| 8549 | if test "$aix_use_runtimelinking" = yes; then | ||
| 8550 | shared_flag='${wl}-G' | ||
| 8551 | else | ||
| 8552 | shared_flag='${wl}-bM:SRE' | ||
| 8553 | fi | ||
| 8554 | fi | ||
| 8555 | fi | ||
| 8556 | |||
| 8557 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' | ||
| 8558 | # It seems that -bexpall does not export symbols beginning with | ||
| 8559 | # underscore (_), so it is better to generate a list of symbols to | ||
| 8560 | # export. | ||
| 8561 | _LT_TAGVAR(always_export_symbols, $1)=yes | ||
| 8562 | if test "$aix_use_runtimelinking" = yes; then | ||
| 8563 | # Warning - without using the other runtime loading flags (-brtl), | ||
| 8564 | # -berok will link without error, but may produce a broken library. | ||
| 8565 | _LT_TAGVAR(allow_undefined_flag, $1)='-berok' | ||
| 8566 | # Determine the default libpath from the value encoded in an empty | ||
| 8567 | # executable. | ||
| 8568 | _LT_SYS_MODULE_PATH_AIX([$1]) | ||
| 8569 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
| 8570 | |||
| 8571 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" | ||
| 8572 | else | ||
| 8573 | if test "$host_cpu" = ia64; then | ||
| 8574 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' | ||
| 8575 | _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" | ||
| 8576 | _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" | ||
| 8577 | else | ||
| 8578 | # Determine the default libpath from the value encoded in an | ||
| 8579 | # empty executable. | ||
| 8580 | _LT_SYS_MODULE_PATH_AIX([$1]) | ||
| 8581 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
| 8582 | # Warning - without using the other run time loading flags, | ||
| 8583 | # -berok will link without error, but may produce a broken library. | ||
| 8584 | _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' | ||
| 8585 | _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' | ||
| 8586 | if test "$with_gnu_ld" = yes; then | ||
| 8587 | # We only use this code for GNU lds that support --whole-archive. | ||
| 8588 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | ||
| 8589 | else | ||
| 8590 | # Exported symbols can be pulled into shared objects from archives | ||
| 8591 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' | ||
| 8592 | fi | ||
| 8593 | _LT_TAGVAR(archive_cmds_need_lc, $1)=yes | ||
| 8594 | # This is similar to how AIX traditionally builds its shared | ||
| 8595 | # libraries. | ||
| 8596 | _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | ||
| 8597 | fi | ||
| 8598 | fi | ||
| 8599 | ;; | ||
| 8600 | |||
| 8601 | beos*) | ||
| 8602 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
| 8603 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
| 8604 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | ||
| 8605 | # support --undefined. This deserves some investigation. FIXME | ||
| 8606 | _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 8607 | else | ||
| 8608 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 8609 | fi | ||
| 8610 | ;; | ||
| 8611 | |||
| 8612 | chorus*) | ||
| 8613 | case $cc_basename in | ||
| 8614 | *) | ||
| 8615 | # FIXME: insert proper C++ library support | ||
| 8616 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 8617 | ;; | ||
| 8618 | esac | ||
| 8619 | ;; | ||
| 8620 | |||
| 8621 | cygwin* | mingw* | pw32* | cegcc*) | ||
| 8622 | case $GXX,$cc_basename in | ||
| 8623 | ,cl* | no,cl*) | ||
| 8624 | # Native MSVC | ||
| 8625 | # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
| 8626 | # no search path for DLLs. | ||
| 8627 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' | ||
| 8628 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
| 8629 | _LT_TAGVAR(always_export_symbols, $1)=yes | ||
| 8630 | _LT_TAGVAR(file_list_spec, $1)='@' | ||
| 8631 | # Tell ltmain to make .lib files, not .a files. | ||
| 8632 | libext=lib | ||
| 8633 | # Tell ltmain to make .dll files, not .so files. | ||
| 8634 | shrext_cmds=".dll" | ||
| 8635 | # FIXME: Setting linknames here is a bad hack. | ||
| 8636 | _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' | ||
| 8637 | _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
| 8638 | $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; | ||
| 8639 | else | ||
| 8640 | $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; | ||
| 8641 | fi~ | ||
| 8642 | $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ | ||
| 8643 | linknames=' | ||
| 8644 | # The linker will not automatically build a static lib if we build a DLL. | ||
| 8645 | # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' | ||
| 8646 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
| 8647 | # Don't use ranlib | ||
| 8648 | _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' | ||
| 8649 | _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ | ||
| 8650 | lt_tool_outputfile="@TOOL_OUTPUT@"~ | ||
| 8651 | case $lt_outputfile in | ||
| 8652 | *.exe|*.EXE) ;; | ||
| 8653 | *) | ||
| 8654 | lt_outputfile="$lt_outputfile.exe" | ||
| 8655 | lt_tool_outputfile="$lt_tool_outputfile.exe" | ||
| 8656 | ;; | ||
| 8657 | esac~ | ||
| 8658 | func_to_tool_file "$lt_outputfile"~ | ||
| 8659 | if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then | ||
| 8660 | $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; | ||
| 8661 | $RM "$lt_outputfile.manifest"; | ||
| 8662 | fi' | ||
| 8663 | ;; | ||
| 8664 | *) | ||
| 8665 | # g++ | ||
| 8666 | # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | ||
| 8667 | # as there is no search path for DLLs. | ||
| 8668 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
| 8669 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' | ||
| 8670 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
| 8671 | _LT_TAGVAR(always_export_symbols, $1)=no | ||
| 8672 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
| 8673 | |||
| 8674 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | ||
| 8675 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | ||
| 8676 | # If the export-symbols file already is a .def file (1st line | ||
| 8677 | # is EXPORTS), use it as is; otherwise, prepend... | ||
| 8678 | _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
| 8679 | cp $export_symbols $output_objdir/$soname.def; | ||
| 8680 | else | ||
| 8681 | echo EXPORTS > $output_objdir/$soname.def; | ||
| 8682 | cat $export_symbols >> $output_objdir/$soname.def; | ||
| 8683 | fi~ | ||
| 8684 | $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | ||
| 8685 | else | ||
| 8686 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 8687 | fi | ||
| 8688 | ;; | ||
| 8689 | esac | ||
| 8690 | ;; | ||
| 8691 | darwin* | rhapsody*) | ||
| 8692 | _LT_DARWIN_LINKER_FEATURES($1) | ||
| 8693 | ;; | ||
| 8694 | |||
| 8695 | dgux*) | ||
| 8696 | case $cc_basename in | ||
| 8697 | ec++*) | ||
| 8698 | # FIXME: insert proper C++ library support | ||
| 8699 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 8700 | ;; | ||
| 8701 | ghcx*) | ||
| 8702 | # Green Hills C++ Compiler | ||
| 8703 | # FIXME: insert proper C++ library support | ||
| 8704 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 8705 | ;; | ||
| 8706 | *) | ||
| 8707 | # FIXME: insert proper C++ library support | ||
| 8708 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 8709 | ;; | ||
| 8710 | esac | ||
| 8711 | ;; | ||
| 8712 | |||
| 8713 | freebsd2.*) | ||
| 8714 | # C++ shared libraries reported to be fairly broken before | ||
| 8715 | # switch to ELF | ||
| 8716 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 8717 | ;; | ||
| 8718 | |||
| 8719 | freebsd-elf*) | ||
| 8720 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
| 8721 | ;; | ||
| 8722 | |||
| 8723 | freebsd* | dragonfly*) | ||
| 8724 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF | ||
| 8725 | # conventions | ||
| 8726 | _LT_TAGVAR(ld_shlibs, $1)=yes | ||
| 8727 | ;; | ||
| 8728 | |||
| 8729 | haiku*) | ||
| 8730 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 8731 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
| 8732 | ;; | ||
| 8733 | |||
| 8734 | hpux9*) | ||
| 8735 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | ||
| 8736 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
| 8737 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | ||
| 8738 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 8739 | _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, | ||
| 8740 | # but as the default | ||
| 8741 | # location of the library. | ||
| 8742 | |||
| 8743 | case $cc_basename in | ||
| 8744 | CC*) | ||
| 8745 | # FIXME: insert proper C++ library support | ||
| 8746 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 8747 | ;; | ||
| 8748 | aCC*) | ||
| 8749 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | ||
| 8750 | # Commands to make compiler produce verbose output that lists | ||
| 8751 | # what "hidden" libraries, object files and flags are used when | ||
| 8752 | # linking a shared library. | ||
| 8753 | # | ||
| 8754 | # There doesn't appear to be a way to prevent this compiler from | ||
| 8755 | # explicitly linking system object files so we need to strip them | ||
| 8756 | # from the output so that they don't get included in the library | ||
| 8757 | # dependencies. | ||
| 8758 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | ||
| 8759 | ;; | ||
| 8760 | *) | ||
| 8761 | if test "$GXX" = yes; then | ||
| 8762 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | ||
| 8763 | else | ||
| 8764 | # FIXME: insert proper C++ library support | ||
| 8765 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 8766 | fi | ||
| 8767 | ;; | ||
| 8768 | esac | ||
| 8769 | ;; | ||
| 8770 | |||
| 8771 | hpux10*|hpux11*) | ||
| 8772 | if test $with_gnu_ld = no; then | ||
| 8773 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | ||
| 8774 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
| 8775 | |||
| 8776 | case $host_cpu in | ||
| 8777 | hppa*64*|ia64*) | ||
| 8778 | ;; | ||
| 8779 | *) | ||
| 8780 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | ||
| 8781 | ;; | ||
| 8782 | esac | ||
| 8783 | fi | ||
| 8784 | case $host_cpu in | ||
| 8785 | hppa*64*|ia64*) | ||
| 8786 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
| 8787 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 8788 | ;; | ||
| 8789 | *) | ||
| 8790 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 8791 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | ||
| 8792 | _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, | ||
| 8793 | # but as the default | ||
| 8794 | # location of the library. | ||
| 8795 | ;; | ||
| 8796 | esac | ||
| 8797 | |||
| 8798 | case $cc_basename in | ||
| 8799 | CC*) | ||
| 8800 | # FIXME: insert proper C++ library support | ||
| 8801 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 8802 | ;; | ||
| 8803 | aCC*) | ||
| 8804 | case $host_cpu in | ||
| 8805 | hppa*64*) | ||
| 8806 | _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
| 8807 | ;; | ||
| 8808 | ia64*) | ||
| 8809 | _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
| 8810 | ;; | ||
| 8811 | *) | ||
| 8812 | _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
| 8813 | ;; | ||
| 8814 | esac | ||
| 8815 | # Commands to make compiler produce verbose output that lists | ||
| 8816 | # what "hidden" libraries, object files and flags are used when | ||
| 8817 | # linking a shared library. | ||
| 8818 | # | ||
| 8819 | # There doesn't appear to be a way to prevent this compiler from | ||
| 8820 | # explicitly linking system object files so we need to strip them | ||
| 8821 | # from the output so that they don't get included in the library | ||
| 8822 | # dependencies. | ||
| 8823 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | ||
| 8824 | ;; | ||
| 8825 | *) | ||
| 8826 | if test "$GXX" = yes; then | ||
| 8827 | if test $with_gnu_ld = no; then | ||
| 8828 | case $host_cpu in | ||
| 8829 | hppa*64*) | ||
| 8830 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
| 8831 | ;; | ||
| 8832 | ia64*) | ||
| 8833 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
| 8834 | ;; | ||
| 8835 | *) | ||
| 8836 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
| 8837 | ;; | ||
| 8838 | esac | ||
| 8839 | fi | ||
| 8840 | else | ||
| 8841 | # FIXME: insert proper C++ library support | ||
| 8842 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 8843 | fi | ||
| 8844 | ;; | ||
| 8845 | esac | ||
| 8846 | ;; | ||
| 8847 | |||
| 8848 | interix[[3-9]]*) | ||
| 8849 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
| 8850 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 8851 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | ||
| 8852 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | ||
| 8853 | # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. | ||
| 8854 | # Instead, shared libraries are loaded at an image base (0x10000000 by | ||
| 8855 | # default) and relocated if they conflict, which is a slow very memory | ||
| 8856 | # consuming and fragmenting process. To avoid this, we pick a random, | ||
| 8857 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link | ||
| 8858 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. | ||
| 8859 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | ||
| 8860 | _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | ||
| 8861 | ;; | ||
| 8862 | irix5* | irix6*) | ||
| 8863 | case $cc_basename in | ||
| 8864 | CC*) | ||
| 8865 | # SGI C++ | ||
| 8866 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' | ||
| 8867 | |||
| 8868 | # Archives containing C++ object files must be created using | ||
| 8869 | # "CC -ar", where "CC" is the IRIX C++ compiler. This is | ||
| 8870 | # necessary to make sure instantiated templates are included | ||
| 8871 | # in the archive. | ||
| 8872 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' | ||
| 8873 | ;; | ||
| 8874 | *) | ||
| 8875 | if test "$GXX" = yes; then | ||
| 8876 | if test "$with_gnu_ld" = no; then | ||
| 8877 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
| 8878 | else | ||
| 8879 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' | ||
| 8880 | fi | ||
| 8881 | fi | ||
| 8882 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
| 8883 | ;; | ||
| 8884 | esac | ||
| 8885 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
| 8886 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
| 8887 | _LT_TAGVAR(inherit_rpath, $1)=yes | ||
| 8888 | ;; | ||
| 8889 | |||
| 8890 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | ||
| 8891 | case $cc_basename in | ||
| 8892 | KCC*) | ||
| 8893 | # Kuck and Associates, Inc. (KAI) C++ Compiler | ||
| 8894 | |||
| 8895 | # KCC will only create a shared library if the output file | ||
| 8896 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | ||
| 8897 | # to its proper name (with version) after linking. | ||
| 8898 | _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | ||
| 8899 | _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' | ||
| 8900 | # Commands to make compiler produce verbose output that lists | ||
| 8901 | # what "hidden" libraries, object files and flags are used when | ||
| 8902 | # linking a shared library. | ||
| 8903 | # | ||
| 8904 | # There doesn't appear to be a way to prevent this compiler from | ||
| 8905 | # explicitly linking system object files so we need to strip them | ||
| 8906 | # from the output so that they don't get included in the library | ||
| 8907 | # dependencies. | ||
| 8908 | output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | ||
| 8909 | |||
| 8910 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | ||
| 8911 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | ||
| 8912 | |||
| 8913 | # Archives containing C++ object files must be created using | ||
| 8914 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. | ||
| 8915 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' | ||
| 8916 | ;; | ||
| 8917 | icpc* | ecpc* ) | ||
| 8918 | # Intel C++ | ||
| 8919 | with_gnu_ld=yes | ||
| 8920 | # version 8.0 and above of icpc choke on multiply defined symbols | ||
| 8921 | # if we add $predep_objects and $postdep_objects, however 7.1 and | ||
| 8922 | # earlier do not add the objects themselves. | ||
| 8923 | case `$CC -V 2>&1` in | ||
| 8924 | *"Version 7."*) | ||
| 8925 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 8926 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
| 8927 | ;; | ||
| 8928 | *) # Version 8.0 or newer | ||
| 8929 | tmp_idyn= | ||
| 8930 | case $host_cpu in | ||
| 8931 | ia64*) tmp_idyn=' -i_dynamic';; | ||
| 8932 | esac | ||
| 8933 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 8934 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
| 8935 | ;; | ||
| 8936 | esac | ||
| 8937 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
| 8938 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | ||
| 8939 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | ||
| 8940 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | ||
| 8941 | ;; | ||
| 8942 | pgCC* | pgcpp*) | ||
| 8943 | # Portland Group C++ compiler | ||
| 8944 | case `$CC -V` in | ||
| 8945 | *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) | ||
| 8946 | _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ | ||
| 8947 | rm -rf $tpldir~ | ||
| 8948 | $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ | ||
| 8949 | compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' | ||
| 8950 | _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ | ||
| 8951 | rm -rf $tpldir~ | ||
| 8952 | $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ | ||
| 8953 | $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ | ||
| 8954 | $RANLIB $oldlib' | ||
| 8955 | _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ | ||
| 8956 | rm -rf $tpldir~ | ||
| 8957 | $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ | ||
| 8958 | $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' | ||
| 8959 | _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ | ||
| 8960 | rm -rf $tpldir~ | ||
| 8961 | $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ | ||
| 8962 | $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' | ||
| 8963 | ;; | ||
| 8964 | *) # Version 6 and above use weak symbols | ||
| 8965 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' | ||
| 8966 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' | ||
| 8967 | ;; | ||
| 8968 | esac | ||
| 8969 | |||
| 8970 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' | ||
| 8971 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | ||
| 8972 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' | ||
| 8973 | ;; | ||
| 8974 | cxx*) | ||
| 8975 | # Compaq C++ | ||
| 8976 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 8977 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' | ||
| 8978 | |||
| 8979 | runpath_var=LD_RUN_PATH | ||
| 8980 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | ||
| 8981 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
| 8982 | |||
| 8983 | # Commands to make compiler produce verbose output that lists | ||
| 8984 | # what "hidden" libraries, object files and flags are used when | ||
| 8985 | # linking a shared library. | ||
| 8986 | # | ||
| 8987 | # There doesn't appear to be a way to prevent this compiler from | ||
| 8988 | # explicitly linking system object files so we need to strip them | ||
| 8989 | # from the output so that they don't get included in the library | ||
| 8990 | # dependencies. | ||
| 8991 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' | ||
| 8992 | ;; | ||
| 8993 | xl* | mpixl* | bgxl*) | ||
| 8994 | # IBM XL 8.0 on PPC, with GNU ld | ||
| 8995 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
| 8996 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | ||
| 8997 | _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
| 8998 | if test "x$supports_anon_versioning" = xyes; then | ||
| 8999 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ | ||
| 9000 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
| 9001 | echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
| 9002 | $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | ||
| 9003 | fi | ||
| 9004 | ;; | ||
| 9005 | *) | ||
| 9006 | case `$CC -V 2>&1 | sed 5q` in | ||
| 9007 | *Sun\ C*) | ||
| 9008 | # Sun C++ 5.9 | ||
| 9009 | _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' | ||
| 9010 | _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
| 9011 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' | ||
| 9012 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
| 9013 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' | ||
| 9014 | _LT_TAGVAR(compiler_needs_object, $1)=yes | ||
| 9015 | |||
| 9016 | # Not sure whether something based on | ||
| 9017 | # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | ||
| 9018 | # would be better. | ||
| 9019 | output_verbose_link_cmd='func_echo_all' | ||
| 9020 | |||
| 9021 | # Archives containing C++ object files must be created using | ||
| 9022 | # "CC -xar", where "CC" is the Sun C++ compiler. This is | ||
| 9023 | # necessary to make sure instantiated templates are included | ||
| 9024 | # in the archive. | ||
| 9025 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' | ||
| 9026 | ;; | ||
| 9027 | esac | ||
| 9028 | ;; | ||
| 9029 | esac | ||
| 9030 | ;; | ||
| 9031 | |||
| 9032 | lynxos*) | ||
| 9033 | # FIXME: insert proper C++ library support | ||
| 9034 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9035 | ;; | ||
| 9036 | |||
| 9037 | m88k*) | ||
| 9038 | # FIXME: insert proper C++ library support | ||
| 9039 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9040 | ;; | ||
| 9041 | |||
| 9042 | mvs*) | ||
| 9043 | case $cc_basename in | ||
| 9044 | cxx*) | ||
| 9045 | # FIXME: insert proper C++ library support | ||
| 9046 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9047 | ;; | ||
| 9048 | *) | ||
| 9049 | # FIXME: insert proper C++ library support | ||
| 9050 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9051 | ;; | ||
| 9052 | esac | ||
| 9053 | ;; | ||
| 9054 | |||
| 9055 | netbsd*) | ||
| 9056 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | ||
| 9057 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' | ||
| 9058 | wlarc= | ||
| 9059 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
| 9060 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 9061 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 9062 | fi | ||
| 9063 | # Workaround some broken pre-1.5 toolchains | ||
| 9064 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' | ||
| 9065 | ;; | ||
| 9066 | |||
| 9067 | *nto* | *qnx*) | ||
| 9068 | _LT_TAGVAR(ld_shlibs, $1)=yes | ||
| 9069 | ;; | ||
| 9070 | |||
| 9071 | openbsd2*) | ||
| 9072 | # C++ shared libraries are fairly broken | ||
| 9073 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9074 | ;; | ||
| 9075 | |||
| 9076 | openbsd*) | ||
| 9077 | if test -f /usr/libexec/ld.so; then | ||
| 9078 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
| 9079 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 9080 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | ||
| 9081 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | ||
| 9082 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | ||
| 9083 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
| 9084 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' | ||
| 9085 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | ||
| 9086 | _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | ||
| 9087 | fi | ||
| 9088 | output_verbose_link_cmd=func_echo_all | ||
| 9089 | else | ||
| 9090 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9091 | fi | ||
| 9092 | ;; | ||
| 9093 | |||
| 9094 | osf3* | osf4* | osf5*) | ||
| 9095 | case $cc_basename in | ||
| 9096 | KCC*) | ||
| 9097 | # Kuck and Associates, Inc. (KAI) C++ Compiler | ||
| 9098 | |||
| 9099 | # KCC will only create a shared library if the output file | ||
| 9100 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | ||
| 9101 | # to its proper name (with version) after linking. | ||
| 9102 | _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | ||
| 9103 | |||
| 9104 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | ||
| 9105 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
| 9106 | |||
| 9107 | # Archives containing C++ object files must be created using | ||
| 9108 | # the KAI C++ compiler. | ||
| 9109 | case $host in | ||
| 9110 | osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; | ||
| 9111 | *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; | ||
| 9112 | esac | ||
| 9113 | ;; | ||
| 9114 | RCC*) | ||
| 9115 | # Rational C++ 2.4.1 | ||
| 9116 | # FIXME: insert proper C++ library support | ||
| 9117 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9118 | ;; | ||
| 9119 | cxx*) | ||
| 9120 | case $host in | ||
| 9121 | osf3*) | ||
| 9122 | _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | ||
| 9123 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' | ||
| 9124 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
| 9125 | ;; | ||
| 9126 | *) | ||
| 9127 | _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | ||
| 9128 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' | ||
| 9129 | _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ | ||
| 9130 | echo "-hidden">> $lib.exp~ | ||
| 9131 | $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ | ||
| 9132 | $RM $lib.exp' | ||
| 9133 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | ||
| 9134 | ;; | ||
| 9135 | esac | ||
| 9136 | |||
| 9137 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
| 9138 | |||
| 9139 | # Commands to make compiler produce verbose output that lists | ||
| 9140 | # what "hidden" libraries, object files and flags are used when | ||
| 9141 | # linking a shared library. | ||
| 9142 | # | ||
| 9143 | # There doesn't appear to be a way to prevent this compiler from | ||
| 9144 | # explicitly linking system object files so we need to strip them | ||
| 9145 | # from the output so that they don't get included in the library | ||
| 9146 | # dependencies. | ||
| 9147 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | ||
| 9148 | ;; | ||
| 9149 | *) | ||
| 9150 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | ||
| 9151 | _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | ||
| 9152 | case $host in | ||
| 9153 | osf3*) | ||
| 9154 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
| 9155 | ;; | ||
| 9156 | *) | ||
| 9157 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
| 9158 | ;; | ||
| 9159 | esac | ||
| 9160 | |||
| 9161 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
| 9162 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
| 9163 | |||
| 9164 | # Commands to make compiler produce verbose output that lists | ||
| 9165 | # what "hidden" libraries, object files and flags are used when | ||
| 9166 | # linking a shared library. | ||
| 9167 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | ||
| 9168 | |||
| 9169 | else | ||
| 9170 | # FIXME: insert proper C++ library support | ||
| 9171 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9172 | fi | ||
| 9173 | ;; | ||
| 9174 | esac | ||
| 9175 | ;; | ||
| 9176 | |||
| 9177 | psos*) | ||
| 9178 | # FIXME: insert proper C++ library support | ||
| 9179 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9180 | ;; | ||
| 9181 | |||
| 9182 | sunos4*) | ||
| 9183 | case $cc_basename in | ||
| 9184 | CC*) | ||
| 9185 | # Sun C++ 4.x | ||
| 9186 | # FIXME: insert proper C++ library support | ||
| 9187 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9188 | ;; | ||
| 9189 | lcc*) | ||
| 9190 | # Lucid | ||
| 9191 | # FIXME: insert proper C++ library support | ||
| 9192 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9193 | ;; | ||
| 9194 | *) | ||
| 9195 | # FIXME: insert proper C++ library support | ||
| 9196 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9197 | ;; | ||
| 9198 | esac | ||
| 9199 | ;; | ||
| 9200 | |||
| 9201 | solaris*) | ||
| 9202 | case $cc_basename in | ||
| 9203 | CC* | sunCC*) | ||
| 9204 | # Sun C++ 4.2, 5.x and Centerline C++ | ||
| 9205 | _LT_TAGVAR(archive_cmds_need_lc,$1)=yes | ||
| 9206 | _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' | ||
| 9207 | _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
| 9208 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
| 9209 | $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | ||
| 9210 | |||
| 9211 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
| 9212 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 9213 | case $host_os in | ||
| 9214 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | ||
| 9215 | *) | ||
| 9216 | # The compiler driver will combine and reorder linker options, | ||
| 9217 | # but understands `-z linker_flag'. | ||
| 9218 | # Supported since Solaris 2.6 (maybe 2.5.1?) | ||
| 9219 | _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' | ||
| 9220 | ;; | ||
| 9221 | esac | ||
| 9222 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
| 9223 | |||
| 9224 | output_verbose_link_cmd='func_echo_all' | ||
| 9225 | |||
| 9226 | # Archives containing C++ object files must be created using | ||
| 9227 | # "CC -xar", where "CC" is the Sun C++ compiler. This is | ||
| 9228 | # necessary to make sure instantiated templates are included | ||
| 9229 | # in the archive. | ||
| 9230 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' | ||
| 9231 | ;; | ||
| 9232 | gcx*) | ||
| 9233 | # Green Hills C++ Compiler | ||
| 9234 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | ||
| 9235 | |||
| 9236 | # The C++ compiler must be used to create the archive. | ||
| 9237 | _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' | ||
| 9238 | ;; | ||
| 9239 | *) | ||
| 9240 | # GNU C++ compiler with Solaris linker | ||
| 9241 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | ||
| 9242 | _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' | ||
| 9243 | if $CC --version | $GREP -v '^2\.7' > /dev/null; then | ||
| 9244 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | ||
| 9245 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
| 9246 | $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | ||
| 9247 | |||
| 9248 | # Commands to make compiler produce verbose output that lists | ||
| 9249 | # what "hidden" libraries, object files and flags are used when | ||
| 9250 | # linking a shared library. | ||
| 9251 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | ||
| 9252 | else | ||
| 9253 | # g++ 2.7 appears to require `-G' NOT `-shared' on this | ||
| 9254 | # platform. | ||
| 9255 | _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | ||
| 9256 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
| 9257 | $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | ||
| 9258 | |||
| 9259 | # Commands to make compiler produce verbose output that lists | ||
| 9260 | # what "hidden" libraries, object files and flags are used when | ||
| 9261 | # linking a shared library. | ||
| 9262 | output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | ||
| 9263 | fi | ||
| 9264 | |||
| 9265 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' | ||
| 9266 | case $host_os in | ||
| 9267 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | ||
| 9268 | *) | ||
| 9269 | _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | ||
| 9270 | ;; | ||
| 9271 | esac | ||
| 9272 | fi | ||
| 9273 | ;; | ||
| 9274 | esac | ||
| 9275 | ;; | ||
| 9276 | |||
| 9277 | sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) | ||
| 9278 | _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | ||
| 9279 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
| 9280 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 9281 | runpath_var='LD_RUN_PATH' | ||
| 9282 | |||
| 9283 | case $cc_basename in | ||
| 9284 | CC*) | ||
| 9285 | _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 9286 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 9287 | ;; | ||
| 9288 | *) | ||
| 9289 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 9290 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 9291 | ;; | ||
| 9292 | esac | ||
| 9293 | ;; | ||
| 9294 | |||
| 9295 | sysv5* | sco3.2v5* | sco5v6*) | ||
| 9296 | # Note: We can NOT use -z defs as we might desire, because we do not | ||
| 9297 | # link with -lc, and that would cause any symbols used from libc to | ||
| 9298 | # always be unresolved, which means just about no library would | ||
| 9299 | # ever link correctly. If we're not using GNU ld we use -z text | ||
| 9300 | # though, which does catch some bad symbols but isn't as heavy-handed | ||
| 9301 | # as -z defs. | ||
| 9302 | _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | ||
| 9303 | _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' | ||
| 9304 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
| 9305 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
| 9306 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' | ||
| 9307 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | ||
| 9308 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
| 9309 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' | ||
| 9310 | runpath_var='LD_RUN_PATH' | ||
| 9311 | |||
| 9312 | case $cc_basename in | ||
| 9313 | CC*) | ||
| 9314 | _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 9315 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 9316 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ | ||
| 9317 | '"$_LT_TAGVAR(old_archive_cmds, $1)" | ||
| 9318 | _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ | ||
| 9319 | '"$_LT_TAGVAR(reload_cmds, $1)" | ||
| 9320 | ;; | ||
| 9321 | *) | ||
| 9322 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 9323 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
| 9324 | ;; | ||
| 9325 | esac | ||
| 9326 | ;; | ||
| 9327 | |||
| 9328 | tandem*) | ||
| 9329 | case $cc_basename in | ||
| 9330 | NCC*) | ||
| 9331 | # NonStop-UX NCC 3.20 | ||
| 9332 | # FIXME: insert proper C++ library support | ||
| 9333 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9334 | ;; | ||
| 9335 | *) | ||
| 9336 | # FIXME: insert proper C++ library support | ||
| 9337 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9338 | ;; | ||
| 9339 | esac | ||
| 9340 | ;; | ||
| 9341 | |||
| 9342 | vxworks*) | ||
| 9343 | # FIXME: insert proper C++ library support | ||
| 9344 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9345 | ;; | ||
| 9346 | |||
| 9347 | *) | ||
| 9348 | # FIXME: insert proper C++ library support | ||
| 9349 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
| 9350 | ;; | ||
| 9351 | esac | ||
| 9352 | |||
| 9353 | AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) | ||
| 9354 | test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no | ||
| 9355 | |||
| 9356 | _LT_TAGVAR(GCC, $1)="$GXX" | ||
| 9357 | _LT_TAGVAR(LD, $1)="$LD" | ||
| 9358 | |||
| 9359 | ## CAVEAT EMPTOR: | ||
| 9360 | ## There is no encapsulation within the following macros, do not change | ||
| 9361 | ## the running order or otherwise move them around unless you know exactly | ||
| 9362 | ## what you are doing... | ||
| 9363 | _LT_SYS_HIDDEN_LIBDEPS($1) | ||
| 9364 | _LT_COMPILER_PIC($1) | ||
| 9365 | _LT_COMPILER_C_O($1) | ||
| 9366 | _LT_COMPILER_FILE_LOCKS($1) | ||
| 9367 | _LT_LINKER_SHLIBS($1) | ||
| 9368 | _LT_SYS_DYNAMIC_LINKER($1) | ||
| 9369 | _LT_LINKER_HARDCODE_LIBPATH($1) | ||
| 9370 | |||
| 9371 | _LT_CONFIG($1) | ||
| 9372 | fi # test -n "$compiler" | ||
| 9373 | |||
| 9374 | CC=$lt_save_CC | ||
| 9375 | CFLAGS=$lt_save_CFLAGS | ||
| 9376 | LDCXX=$LD | ||
| 9377 | LD=$lt_save_LD | ||
| 9378 | GCC=$lt_save_GCC | ||
| 9379 | with_gnu_ld=$lt_save_with_gnu_ld | ||
| 9380 | lt_cv_path_LDCXX=$lt_cv_path_LD | ||
| 9381 | lt_cv_path_LD=$lt_save_path_LD | ||
| 9382 | lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld | ||
| 9383 | lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld | ||
| 9384 | fi # test "$_lt_caught_CXX_error" != yes | ||
| 9385 | |||
| 9386 | AC_LANG_POP | ||
| 9387 | ])# _LT_LANG_CXX_CONFIG | ||
| 9388 | |||
| 9389 | |||
| 9390 | # _LT_FUNC_STRIPNAME_CNF | ||
| 9391 | # ---------------------- | ||
| 9392 | # func_stripname_cnf prefix suffix name | ||
| 9393 | # strip PREFIX and SUFFIX off of NAME. | ||
| 9394 | # PREFIX and SUFFIX must not contain globbing or regex special | ||
| 9395 | # characters, hashes, percent signs, but SUFFIX may contain a leading | ||
| 9396 | # dot (in which case that matches only a dot). | ||
| 9397 | # | ||
| 9398 | # This function is identical to the (non-XSI) version of func_stripname, | ||
| 9399 | # except this one can be used by m4 code that may be executed by configure, | ||
| 9400 | # rather than the libtool script. | ||
| 9401 | m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl | ||
| 9402 | AC_REQUIRE([_LT_DECL_SED]) | ||
| 9403 | AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) | ||
| 9404 | func_stripname_cnf () | ||
| 9405 | { | ||
| 9406 | case ${2} in | ||
| 9407 | .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; | ||
| 9408 | *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; | ||
| 9409 | esac | ||
| 9410 | } # func_stripname_cnf | ||
| 9411 | ])# _LT_FUNC_STRIPNAME_CNF | ||
| 9412 | |||
| 9413 | # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) | ||
| 9414 | # --------------------------------- | ||
| 9415 | # Figure out "hidden" library dependencies from verbose | ||
| 9416 | # compiler output when linking a shared library. | ||
| 9417 | # Parse the compiler output and extract the necessary | ||
| 9418 | # objects, libraries and library flags. | ||
| 9419 | m4_defun([_LT_SYS_HIDDEN_LIBDEPS], | ||
| 9420 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
| 9421 | AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl | ||
| 9422 | # Dependencies to place before and after the object being linked: | ||
| 9423 | _LT_TAGVAR(predep_objects, $1)= | ||
| 9424 | _LT_TAGVAR(postdep_objects, $1)= | ||
| 9425 | _LT_TAGVAR(predeps, $1)= | ||
| 9426 | _LT_TAGVAR(postdeps, $1)= | ||
| 9427 | _LT_TAGVAR(compiler_lib_search_path, $1)= | ||
| 9428 | |||
| 9429 | dnl we can't use the lt_simple_compile_test_code here, | ||
| 9430 | dnl because it contains code intended for an executable, | ||
| 9431 | dnl not a library. It's possible we should let each | ||
| 9432 | dnl tag define a new lt_????_link_test_code variable, | ||
| 9433 | dnl but it's only used here... | ||
| 9434 | m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF | ||
| 9435 | int a; | ||
| 9436 | void foo (void) { a = 0; } | ||
| 9437 | _LT_EOF | ||
| 9438 | ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF | ||
| 9439 | class Foo | ||
| 9440 | { | ||
| 9441 | public: | ||
| 9442 | Foo (void) { a = 0; } | ||
| 9443 | private: | ||
| 9444 | int a; | ||
| 9445 | }; | ||
| 9446 | _LT_EOF | ||
| 9447 | ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF | ||
| 9448 | subroutine foo | ||
| 9449 | implicit none | ||
| 9450 | integer*4 a | ||
| 9451 | a=0 | ||
| 9452 | return | ||
| 9453 | end | ||
| 9454 | _LT_EOF | ||
| 9455 | ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF | ||
| 9456 | subroutine foo | ||
| 9457 | implicit none | ||
| 9458 | integer a | ||
| 9459 | a=0 | ||
| 9460 | return | ||
| 9461 | end | ||
| 9462 | _LT_EOF | ||
| 9463 | ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF | ||
| 9464 | public class foo { | ||
| 9465 | private int a; | ||
| 9466 | public void bar (void) { | ||
| 9467 | a = 0; | ||
| 9468 | } | ||
| 9469 | }; | ||
| 9470 | _LT_EOF | ||
| 9471 | ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF | ||
| 9472 | package foo | ||
| 9473 | func foo() { | ||
| 9474 | } | ||
| 9475 | _LT_EOF | ||
| 9476 | ]) | ||
| 9477 | |||
| 9478 | _lt_libdeps_save_CFLAGS=$CFLAGS | ||
| 9479 | case "$CC $CFLAGS " in #( | ||
| 9480 | *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; | ||
| 9481 | *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; | ||
| 9482 | *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; | ||
| 9483 | esac | ||
| 9484 | |||
| 9485 | dnl Parse the compiler output and extract the necessary | ||
| 9486 | dnl objects, libraries and library flags. | ||
| 9487 | if AC_TRY_EVAL(ac_compile); then | ||
| 9488 | # Parse the compiler output and extract the necessary | ||
| 9489 | # objects, libraries and library flags. | ||
| 9490 | |||
| 9491 | # Sentinel used to keep track of whether or not we are before | ||
| 9492 | # the conftest object file. | ||
| 9493 | pre_test_object_deps_done=no | ||
| 9494 | |||
| 9495 | for p in `eval "$output_verbose_link_cmd"`; do | ||
| 9496 | case ${prev}${p} in | ||
| 9497 | |||
| 9498 | -L* | -R* | -l*) | ||
| 9499 | # Some compilers place space between "-{L,R}" and the path. | ||
| 9500 | # Remove the space. | ||
| 9501 | if test $p = "-L" || | ||
| 9502 | test $p = "-R"; then | ||
| 9503 | prev=$p | ||
| 9504 | continue | ||
| 9505 | fi | ||
| 9506 | |||
| 9507 | # Expand the sysroot to ease extracting the directories later. | ||
| 9508 | if test -z "$prev"; then | ||
| 9509 | case $p in | ||
| 9510 | -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; | ||
| 9511 | -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; | ||
| 9512 | -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; | ||
| 9513 | esac | ||
| 9514 | fi | ||
| 9515 | case $p in | ||
| 9516 | =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; | ||
| 9517 | esac | ||
| 9518 | if test "$pre_test_object_deps_done" = no; then | ||
| 9519 | case ${prev} in | ||
| 9520 | -L | -R) | ||
| 9521 | # Internal compiler library paths should come after those | ||
| 9522 | # provided the user. The postdeps already come after the | ||
| 9523 | # user supplied libs so there is no need to process them. | ||
| 9524 | if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then | ||
| 9525 | _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" | ||
| 9526 | else | ||
| 9527 | _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" | ||
| 9528 | fi | ||
| 9529 | ;; | ||
| 9530 | # The "-l" case would never come before the object being | ||
| 9531 | # linked, so don't bother handling this case. | ||
| 9532 | esac | ||
| 9533 | else | ||
| 9534 | if test -z "$_LT_TAGVAR(postdeps, $1)"; then | ||
| 9535 | _LT_TAGVAR(postdeps, $1)="${prev}${p}" | ||
| 9536 | else | ||
| 9537 | _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" | ||
| 9538 | fi | ||
| 9539 | fi | ||
| 9540 | prev= | ||
| 9541 | ;; | ||
| 9542 | |||
| 9543 | *.lto.$objext) ;; # Ignore GCC LTO objects | ||
| 9544 | *.$objext) | ||
| 9545 | # This assumes that the test object file only shows up | ||
| 9546 | # once in the compiler output. | ||
| 9547 | if test "$p" = "conftest.$objext"; then | ||
| 9548 | pre_test_object_deps_done=yes | ||
| 9549 | continue | ||
| 9550 | fi | ||
| 9551 | |||
| 9552 | if test "$pre_test_object_deps_done" = no; then | ||
| 9553 | if test -z "$_LT_TAGVAR(predep_objects, $1)"; then | ||
| 9554 | _LT_TAGVAR(predep_objects, $1)="$p" | ||
| 9555 | else | ||
| 9556 | _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" | ||
| 9557 | fi | ||
| 9558 | else | ||
| 9559 | if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then | ||
| 9560 | _LT_TAGVAR(postdep_objects, $1)="$p" | ||
| 9561 | else | ||
| 9562 | _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" | ||
| 9563 | fi | ||
| 9564 | fi | ||
| 9565 | ;; | ||
| 9566 | |||
| 9567 | *) ;; # Ignore the rest. | ||
| 9568 | |||
| 9569 | esac | ||
| 9570 | done | ||
| 9571 | |||
| 9572 | # Clean up. | ||
| 9573 | rm -f a.out a.exe | ||
| 9574 | else | ||
| 9575 | echo "libtool.m4: error: problem compiling $1 test program" | ||
| 9576 | fi | ||
| 9577 | |||
| 9578 | $RM -f confest.$objext | ||
| 9579 | CFLAGS=$_lt_libdeps_save_CFLAGS | ||
| 9580 | |||
| 9581 | # PORTME: override above test on systems where it is broken | ||
| 9582 | m4_if([$1], [CXX], | ||
| 9583 | [case $host_os in | ||
| 9584 | interix[[3-9]]*) | ||
| 9585 | # Interix 3.5 installs completely hosed .la files for C++, so rather than | ||
| 9586 | # hack all around it, let's just trust "g++" to DTRT. | ||
| 9587 | _LT_TAGVAR(predep_objects,$1)= | ||
| 9588 | _LT_TAGVAR(postdep_objects,$1)= | ||
| 9589 | _LT_TAGVAR(postdeps,$1)= | ||
| 9590 | ;; | ||
| 9591 | |||
| 9592 | linux*) | ||
| 9593 | case `$CC -V 2>&1 | sed 5q` in | ||
| 9594 | *Sun\ C*) | ||
| 9595 | # Sun C++ 5.9 | ||
| 9596 | |||
| 9597 | # The more standards-conforming stlport4 library is | ||
| 9598 | # incompatible with the Cstd library. Avoid specifying | ||
| 9599 | # it if it's in CXXFLAGS. Ignore libCrun as | ||
| 9600 | # -library=stlport4 depends on it. | ||
| 9601 | case " $CXX $CXXFLAGS " in | ||
| 9602 | *" -library=stlport4 "*) | ||
| 9603 | solaris_use_stlport4=yes | ||
| 9604 | ;; | ||
| 9605 | esac | ||
| 9606 | |||
| 9607 | if test "$solaris_use_stlport4" != yes; then | ||
| 9608 | _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' | ||
| 9609 | fi | ||
| 9610 | ;; | ||
| 9611 | esac | ||
| 9612 | ;; | ||
| 9613 | |||
| 9614 | solaris*) | ||
| 9615 | case $cc_basename in | ||
| 9616 | CC* | sunCC*) | ||
| 9617 | # The more standards-conforming stlport4 library is | ||
| 9618 | # incompatible with the Cstd library. Avoid specifying | ||
| 9619 | # it if it's in CXXFLAGS. Ignore libCrun as | ||
| 9620 | # -library=stlport4 depends on it. | ||
| 9621 | case " $CXX $CXXFLAGS " in | ||
| 9622 | *" -library=stlport4 "*) | ||
| 9623 | solaris_use_stlport4=yes | ||
| 9624 | ;; | ||
| 9625 | esac | ||
| 9626 | |||
| 9627 | # Adding this requires a known-good setup of shared libraries for | ||
| 9628 | # Sun compiler versions before 5.6, else PIC objects from an old | ||
| 9629 | # archive will be linked into the output, leading to subtle bugs. | ||
| 9630 | if test "$solaris_use_stlport4" != yes; then | ||
| 9631 | _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' | ||
| 9632 | fi | ||
| 9633 | ;; | ||
| 9634 | esac | ||
| 9635 | ;; | ||
| 9636 | esac | ||
| 9637 | ]) | ||
| 9638 | |||
| 9639 | case " $_LT_TAGVAR(postdeps, $1) " in | ||
| 9640 | *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; | ||
| 9641 | esac | ||
| 9642 | _LT_TAGVAR(compiler_lib_search_dirs, $1)= | ||
| 9643 | if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then | ||
| 9644 | _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` | ||
| 9645 | fi | ||
| 9646 | _LT_TAGDECL([], [compiler_lib_search_dirs], [1], | ||
| 9647 | [The directories searched by this compiler when creating a shared library]) | ||
| 9648 | _LT_TAGDECL([], [predep_objects], [1], | ||
| 9649 | [Dependencies to place before and after the objects being linked to | ||
| 9650 | create a shared library]) | ||
| 9651 | _LT_TAGDECL([], [postdep_objects], [1]) | ||
| 9652 | _LT_TAGDECL([], [predeps], [1]) | ||
| 9653 | _LT_TAGDECL([], [postdeps], [1]) | ||
| 9654 | _LT_TAGDECL([], [compiler_lib_search_path], [1], | ||
| 9655 | [The library search path used internally by the compiler when linking | ||
| 9656 | a shared library]) | ||
| 9657 | ])# _LT_SYS_HIDDEN_LIBDEPS | ||
| 9658 | |||
| 9659 | |||
| 9660 | # _LT_LANG_F77_CONFIG([TAG]) | ||
| 9661 | # -------------------------- | ||
| 9662 | # Ensure that the configuration variables for a Fortran 77 compiler are | ||
| 9663 | # suitably defined. These variables are subsequently used by _LT_CONFIG | ||
| 9664 | # to write the compiler configuration to `libtool'. | ||
| 9665 | m4_defun([_LT_LANG_F77_CONFIG], | ||
| 9666 | [AC_LANG_PUSH(Fortran 77) | ||
| 9667 | if test -z "$F77" || test "X$F77" = "Xno"; then | ||
| 9668 | _lt_disable_F77=yes | ||
| 9669 | fi | ||
| 9670 | |||
| 9671 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
| 9672 | _LT_TAGVAR(allow_undefined_flag, $1)= | ||
| 9673 | _LT_TAGVAR(always_export_symbols, $1)=no | ||
| 9674 | _LT_TAGVAR(archive_expsym_cmds, $1)= | ||
| 9675 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | ||
| 9676 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
| 9677 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no | ||
| 9678 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | ||
| 9679 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | ||
| 9680 | _LT_TAGVAR(hardcode_minus_L, $1)=no | ||
| 9681 | _LT_TAGVAR(hardcode_automatic, $1)=no | ||
| 9682 | _LT_TAGVAR(inherit_rpath, $1)=no | ||
| 9683 | _LT_TAGVAR(module_cmds, $1)= | ||
| 9684 | _LT_TAGVAR(module_expsym_cmds, $1)= | ||
| 9685 | _LT_TAGVAR(link_all_deplibs, $1)=unknown | ||
| 9686 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | ||
| 9687 | _LT_TAGVAR(reload_flag, $1)=$reload_flag | ||
| 9688 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds | ||
| 9689 | _LT_TAGVAR(no_undefined_flag, $1)= | ||
| 9690 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
| 9691 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | ||
| 9692 | |||
| 9693 | # Source file extension for f77 test sources. | ||
| 9694 | ac_ext=f | ||
| 9695 | |||
| 9696 | # Object file extension for compiled f77 test sources. | ||
| 9697 | objext=o | ||
| 9698 | _LT_TAGVAR(objext, $1)=$objext | ||
| 9699 | |||
| 9700 | # No sense in running all these tests if we already determined that | ||
| 9701 | # the F77 compiler isn't working. Some variables (like enable_shared) | ||
| 9702 | # are currently assumed to apply to all compilers on this platform, | ||
| 9703 | # and will be corrupted by setting them based on a non-working compiler. | ||
| 9704 | if test "$_lt_disable_F77" != yes; then | ||
| 9705 | # Code to be used in simple compile tests | ||
| 9706 | lt_simple_compile_test_code="\ | ||
| 9707 | subroutine t | ||
| 9708 | return | ||
| 9709 | end | ||
| 9710 | " | ||
| 9711 | |||
| 9712 | # Code to be used in simple link tests | ||
| 9713 | lt_simple_link_test_code="\ | ||
| 9714 | program t | ||
| 9715 | end | ||
| 9716 | " | ||
| 9717 | |||
| 9718 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
| 9719 | _LT_TAG_COMPILER | ||
| 9720 | |||
| 9721 | # save warnings/boilerplate of simple test code | ||
| 9722 | _LT_COMPILER_BOILERPLATE | ||
| 9723 | _LT_LINKER_BOILERPLATE | ||
| 9724 | |||
| 9725 | # Allow CC to be a program name with arguments. | ||
| 9726 | lt_save_CC="$CC" | ||
| 9727 | lt_save_GCC=$GCC | ||
| 9728 | lt_save_CFLAGS=$CFLAGS | ||
| 9729 | CC=${F77-"f77"} | ||
| 9730 | CFLAGS=$FFLAGS | ||
| 9731 | compiler=$CC | ||
| 9732 | _LT_TAGVAR(compiler, $1)=$CC | ||
| 9733 | _LT_CC_BASENAME([$compiler]) | ||
| 9734 | GCC=$G77 | ||
| 9735 | if test -n "$compiler"; then | ||
| 9736 | AC_MSG_CHECKING([if libtool supports shared libraries]) | ||
| 9737 | AC_MSG_RESULT([$can_build_shared]) | ||
| 9738 | |||
| 9739 | AC_MSG_CHECKING([whether to build shared libraries]) | ||
| 9740 | test "$can_build_shared" = "no" && enable_shared=no | ||
| 9741 | |||
| 9742 | # On AIX, shared libraries and static libraries use the same namespace, and | ||
| 9743 | # are all built from PIC. | ||
| 9744 | case $host_os in | ||
| 9745 | aix3*) | ||
| 9746 | test "$enable_shared" = yes && enable_static=no | ||
| 9747 | if test -n "$RANLIB"; then | ||
| 9748 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | ||
| 9749 | postinstall_cmds='$RANLIB $lib' | ||
| 9750 | fi | ||
| 9751 | ;; | ||
| 9752 | aix[[4-9]]*) | ||
| 9753 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | ||
| 9754 | test "$enable_shared" = yes && enable_static=no | ||
| 9755 | fi | ||
| 9756 | ;; | ||
| 9757 | esac | ||
| 9758 | AC_MSG_RESULT([$enable_shared]) | ||
| 9759 | |||
| 9760 | AC_MSG_CHECKING([whether to build static libraries]) | ||
| 9761 | # Make sure either enable_shared or enable_static is yes. | ||
| 9762 | test "$enable_shared" = yes || enable_static=yes | ||
| 9763 | AC_MSG_RESULT([$enable_static]) | ||
| 9764 | |||
| 9765 | _LT_TAGVAR(GCC, $1)="$G77" | ||
| 9766 | _LT_TAGVAR(LD, $1)="$LD" | ||
| 9767 | |||
| 9768 | ## CAVEAT EMPTOR: | ||
| 9769 | ## There is no encapsulation within the following macros, do not change | ||
| 9770 | ## the running order or otherwise move them around unless you know exactly | ||
| 9771 | ## what you are doing... | ||
| 9772 | _LT_COMPILER_PIC($1) | ||
| 9773 | _LT_COMPILER_C_O($1) | ||
| 9774 | _LT_COMPILER_FILE_LOCKS($1) | ||
| 9775 | _LT_LINKER_SHLIBS($1) | ||
| 9776 | _LT_SYS_DYNAMIC_LINKER($1) | ||
| 9777 | _LT_LINKER_HARDCODE_LIBPATH($1) | ||
| 9778 | |||
| 9779 | _LT_CONFIG($1) | ||
| 9780 | fi # test -n "$compiler" | ||
| 9781 | |||
| 9782 | GCC=$lt_save_GCC | ||
| 9783 | CC="$lt_save_CC" | ||
| 9784 | CFLAGS="$lt_save_CFLAGS" | ||
| 9785 | fi # test "$_lt_disable_F77" != yes | ||
| 9786 | |||
| 9787 | AC_LANG_POP | ||
| 9788 | ])# _LT_LANG_F77_CONFIG | ||
| 9789 | |||
| 9790 | |||
| 9791 | # _LT_LANG_FC_CONFIG([TAG]) | ||
| 9792 | # ------------------------- | ||
| 9793 | # Ensure that the configuration variables for a Fortran compiler are | ||
| 9794 | # suitably defined. These variables are subsequently used by _LT_CONFIG | ||
| 9795 | # to write the compiler configuration to `libtool'. | ||
| 9796 | m4_defun([_LT_LANG_FC_CONFIG], | ||
| 9797 | [AC_LANG_PUSH(Fortran) | ||
| 9798 | |||
| 9799 | if test -z "$FC" || test "X$FC" = "Xno"; then | ||
| 9800 | _lt_disable_FC=yes | ||
| 9801 | fi | ||
| 9802 | |||
| 9803 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
| 9804 | _LT_TAGVAR(allow_undefined_flag, $1)= | ||
| 9805 | _LT_TAGVAR(always_export_symbols, $1)=no | ||
| 9806 | _LT_TAGVAR(archive_expsym_cmds, $1)= | ||
| 9807 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | ||
| 9808 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
| 9809 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no | ||
| 9810 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | ||
| 9811 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | ||
| 9812 | _LT_TAGVAR(hardcode_minus_L, $1)=no | ||
| 9813 | _LT_TAGVAR(hardcode_automatic, $1)=no | ||
| 9814 | _LT_TAGVAR(inherit_rpath, $1)=no | ||
| 9815 | _LT_TAGVAR(module_cmds, $1)= | ||
| 9816 | _LT_TAGVAR(module_expsym_cmds, $1)= | ||
| 9817 | _LT_TAGVAR(link_all_deplibs, $1)=unknown | ||
| 9818 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | ||
| 9819 | _LT_TAGVAR(reload_flag, $1)=$reload_flag | ||
| 9820 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds | ||
| 9821 | _LT_TAGVAR(no_undefined_flag, $1)= | ||
| 9822 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
| 9823 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | ||
| 9824 | |||
| 9825 | # Source file extension for fc test sources. | ||
| 9826 | ac_ext=${ac_fc_srcext-f} | ||
| 9827 | |||
| 9828 | # Object file extension for compiled fc test sources. | ||
| 9829 | objext=o | ||
| 9830 | _LT_TAGVAR(objext, $1)=$objext | ||
| 9831 | |||
| 9832 | # No sense in running all these tests if we already determined that | ||
| 9833 | # the FC compiler isn't working. Some variables (like enable_shared) | ||
| 9834 | # are currently assumed to apply to all compilers on this platform, | ||
| 9835 | # and will be corrupted by setting them based on a non-working compiler. | ||
| 9836 | if test "$_lt_disable_FC" != yes; then | ||
| 9837 | # Code to be used in simple compile tests | ||
| 9838 | lt_simple_compile_test_code="\ | ||
| 9839 | subroutine t | ||
| 9840 | return | ||
| 9841 | end | ||
| 9842 | " | ||
| 9843 | |||
| 9844 | # Code to be used in simple link tests | ||
| 9845 | lt_simple_link_test_code="\ | ||
| 9846 | program t | ||
| 9847 | end | ||
| 9848 | " | ||
| 9849 | |||
| 9850 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
| 9851 | _LT_TAG_COMPILER | ||
| 9852 | |||
| 9853 | # save warnings/boilerplate of simple test code | ||
| 9854 | _LT_COMPILER_BOILERPLATE | ||
| 9855 | _LT_LINKER_BOILERPLATE | ||
| 9856 | |||
| 9857 | # Allow CC to be a program name with arguments. | ||
| 9858 | lt_save_CC="$CC" | ||
| 9859 | lt_save_GCC=$GCC | ||
| 9860 | lt_save_CFLAGS=$CFLAGS | ||
| 9861 | CC=${FC-"f95"} | ||
| 9862 | CFLAGS=$FCFLAGS | ||
| 9863 | compiler=$CC | ||
| 9864 | GCC=$ac_cv_fc_compiler_gnu | ||
| 9865 | |||
| 9866 | _LT_TAGVAR(compiler, $1)=$CC | ||
| 9867 | _LT_CC_BASENAME([$compiler]) | ||
| 9868 | |||
| 9869 | if test -n "$compiler"; then | ||
| 9870 | AC_MSG_CHECKING([if libtool supports shared libraries]) | ||
| 9871 | AC_MSG_RESULT([$can_build_shared]) | ||
| 9872 | |||
| 9873 | AC_MSG_CHECKING([whether to build shared libraries]) | ||
| 9874 | test "$can_build_shared" = "no" && enable_shared=no | ||
| 9875 | |||
| 9876 | # On AIX, shared libraries and static libraries use the same namespace, and | ||
| 9877 | # are all built from PIC. | ||
| 9878 | case $host_os in | ||
| 9879 | aix3*) | ||
| 9880 | test "$enable_shared" = yes && enable_static=no | ||
| 9881 | if test -n "$RANLIB"; then | ||
| 9882 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | ||
| 9883 | postinstall_cmds='$RANLIB $lib' | ||
| 9884 | fi | ||
| 9885 | ;; | ||
| 9886 | aix[[4-9]]*) | ||
| 9887 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | ||
| 9888 | test "$enable_shared" = yes && enable_static=no | ||
| 9889 | fi | ||
| 9890 | ;; | ||
| 9891 | esac | ||
| 9892 | AC_MSG_RESULT([$enable_shared]) | ||
| 9893 | |||
| 9894 | AC_MSG_CHECKING([whether to build static libraries]) | ||
| 9895 | # Make sure either enable_shared or enable_static is yes. | ||
| 9896 | test "$enable_shared" = yes || enable_static=yes | ||
| 9897 | AC_MSG_RESULT([$enable_static]) | ||
| 9898 | |||
| 9899 | _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" | ||
| 9900 | _LT_TAGVAR(LD, $1)="$LD" | ||
| 9901 | |||
| 9902 | ## CAVEAT EMPTOR: | ||
| 9903 | ## There is no encapsulation within the following macros, do not change | ||
| 9904 | ## the running order or otherwise move them around unless you know exactly | ||
| 9905 | ## what you are doing... | ||
| 9906 | _LT_SYS_HIDDEN_LIBDEPS($1) | ||
| 9907 | _LT_COMPILER_PIC($1) | ||
| 9908 | _LT_COMPILER_C_O($1) | ||
| 9909 | _LT_COMPILER_FILE_LOCKS($1) | ||
| 9910 | _LT_LINKER_SHLIBS($1) | ||
| 9911 | _LT_SYS_DYNAMIC_LINKER($1) | ||
| 9912 | _LT_LINKER_HARDCODE_LIBPATH($1) | ||
| 9913 | |||
| 9914 | _LT_CONFIG($1) | ||
| 9915 | fi # test -n "$compiler" | ||
| 9916 | |||
| 9917 | GCC=$lt_save_GCC | ||
| 9918 | CC=$lt_save_CC | ||
| 9919 | CFLAGS=$lt_save_CFLAGS | ||
| 9920 | fi # test "$_lt_disable_FC" != yes | ||
| 9921 | |||
| 9922 | AC_LANG_POP | ||
| 9923 | ])# _LT_LANG_FC_CONFIG | ||
| 9924 | |||
| 9925 | |||
| 9926 | # _LT_LANG_GCJ_CONFIG([TAG]) | ||
| 9927 | # -------------------------- | ||
| 9928 | # Ensure that the configuration variables for the GNU Java Compiler compiler | ||
| 9929 | # are suitably defined. These variables are subsequently used by _LT_CONFIG | ||
| 9930 | # to write the compiler configuration to `libtool'. | ||
| 9931 | m4_defun([_LT_LANG_GCJ_CONFIG], | ||
| 9932 | [AC_REQUIRE([LT_PROG_GCJ])dnl | ||
| 9933 | AC_LANG_SAVE | ||
| 9934 | |||
| 9935 | # Source file extension for Java test sources. | ||
| 9936 | ac_ext=java | ||
| 9937 | |||
| 9938 | # Object file extension for compiled Java test sources. | ||
| 9939 | objext=o | ||
| 9940 | _LT_TAGVAR(objext, $1)=$objext | ||
| 9941 | |||
| 9942 | # Code to be used in simple compile tests | ||
| 9943 | lt_simple_compile_test_code="class foo {}" | ||
| 9944 | |||
| 9945 | # Code to be used in simple link tests | ||
| 9946 | lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' | ||
| 9947 | |||
| 9948 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
| 9949 | _LT_TAG_COMPILER | ||
| 9950 | |||
| 9951 | # save warnings/boilerplate of simple test code | ||
| 9952 | _LT_COMPILER_BOILERPLATE | ||
| 9953 | _LT_LINKER_BOILERPLATE | ||
| 9954 | |||
| 9955 | # Allow CC to be a program name with arguments. | ||
| 9956 | lt_save_CC=$CC | ||
| 9957 | lt_save_CFLAGS=$CFLAGS | ||
| 9958 | lt_save_GCC=$GCC | ||
| 9959 | GCC=yes | ||
| 9960 | CC=${GCJ-"gcj"} | ||
| 9961 | CFLAGS=$GCJFLAGS | ||
| 9962 | compiler=$CC | ||
| 9963 | _LT_TAGVAR(compiler, $1)=$CC | ||
| 9964 | _LT_TAGVAR(LD, $1)="$LD" | ||
| 9965 | _LT_CC_BASENAME([$compiler]) | ||
| 9966 | |||
| 9967 | # GCJ did not exist at the time GCC didn't implicitly link libc in. | ||
| 9968 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
| 9969 | |||
| 9970 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | ||
| 9971 | _LT_TAGVAR(reload_flag, $1)=$reload_flag | ||
| 9972 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds | ||
| 9973 | |||
| 9974 | if test -n "$compiler"; then | ||
| 9975 | _LT_COMPILER_NO_RTTI($1) | ||
| 9976 | _LT_COMPILER_PIC($1) | ||
| 9977 | _LT_COMPILER_C_O($1) | ||
| 9978 | _LT_COMPILER_FILE_LOCKS($1) | ||
| 9979 | _LT_LINKER_SHLIBS($1) | ||
| 9980 | _LT_LINKER_HARDCODE_LIBPATH($1) | ||
| 9981 | |||
| 9982 | _LT_CONFIG($1) | ||
| 9983 | fi | ||
| 9984 | |||
| 9985 | AC_LANG_RESTORE | ||
| 9986 | |||
| 9987 | GCC=$lt_save_GCC | ||
| 9988 | CC=$lt_save_CC | ||
| 9989 | CFLAGS=$lt_save_CFLAGS | ||
| 9990 | ])# _LT_LANG_GCJ_CONFIG | ||
| 9991 | |||
| 9992 | |||
| 9993 | # _LT_LANG_GO_CONFIG([TAG]) | ||
| 9994 | # -------------------------- | ||
| 9995 | # Ensure that the configuration variables for the GNU Go compiler | ||
| 9996 | # are suitably defined. These variables are subsequently used by _LT_CONFIG | ||
| 9997 | # to write the compiler configuration to `libtool'. | ||
| 9998 | m4_defun([_LT_LANG_GO_CONFIG], | ||
| 9999 | [AC_REQUIRE([LT_PROG_GO])dnl | ||
| 10000 | AC_LANG_SAVE | ||
| 10001 | |||
| 10002 | # Source file extension for Go test sources. | ||
| 10003 | ac_ext=go | ||
| 10004 | |||
| 10005 | # Object file extension for compiled Go test sources. | ||
| 10006 | objext=o | ||
| 10007 | _LT_TAGVAR(objext, $1)=$objext | ||
| 10008 | |||
| 10009 | # Code to be used in simple compile tests | ||
| 10010 | lt_simple_compile_test_code="package main; func main() { }" | ||
| 10011 | |||
| 10012 | # Code to be used in simple link tests | ||
| 10013 | lt_simple_link_test_code='package main; func main() { }' | ||
| 10014 | |||
| 10015 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
| 10016 | _LT_TAG_COMPILER | ||
| 10017 | |||
| 10018 | # save warnings/boilerplate of simple test code | ||
| 10019 | _LT_COMPILER_BOILERPLATE | ||
| 10020 | _LT_LINKER_BOILERPLATE | ||
| 10021 | |||
| 10022 | # Allow CC to be a program name with arguments. | ||
| 10023 | lt_save_CC=$CC | ||
| 10024 | lt_save_CFLAGS=$CFLAGS | ||
| 10025 | lt_save_GCC=$GCC | ||
| 10026 | GCC=yes | ||
| 10027 | CC=${GOC-"gccgo"} | ||
| 10028 | CFLAGS=$GOFLAGS | ||
| 10029 | compiler=$CC | ||
| 10030 | _LT_TAGVAR(compiler, $1)=$CC | ||
| 10031 | _LT_TAGVAR(LD, $1)="$LD" | ||
| 10032 | _LT_CC_BASENAME([$compiler]) | ||
| 10033 | |||
| 10034 | # Go did not exist at the time GCC didn't implicitly link libc in. | ||
| 10035 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
| 10036 | |||
| 10037 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | ||
| 10038 | _LT_TAGVAR(reload_flag, $1)=$reload_flag | ||
| 10039 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds | ||
| 10040 | |||
| 10041 | if test -n "$compiler"; then | ||
| 10042 | _LT_COMPILER_NO_RTTI($1) | ||
| 10043 | _LT_COMPILER_PIC($1) | ||
| 10044 | _LT_COMPILER_C_O($1) | ||
| 10045 | _LT_COMPILER_FILE_LOCKS($1) | ||
| 10046 | _LT_LINKER_SHLIBS($1) | ||
| 10047 | _LT_LINKER_HARDCODE_LIBPATH($1) | ||
| 10048 | |||
| 10049 | _LT_CONFIG($1) | ||
| 10050 | fi | ||
| 10051 | |||
| 10052 | AC_LANG_RESTORE | ||
| 10053 | |||
| 10054 | GCC=$lt_save_GCC | ||
| 10055 | CC=$lt_save_CC | ||
| 10056 | CFLAGS=$lt_save_CFLAGS | ||
| 10057 | ])# _LT_LANG_GO_CONFIG | ||
| 10058 | |||
| 10059 | |||
| 10060 | # _LT_LANG_RC_CONFIG([TAG]) | ||
| 10061 | # ------------------------- | ||
| 10062 | # Ensure that the configuration variables for the Windows resource compiler | ||
| 10063 | # are suitably defined. These variables are subsequently used by _LT_CONFIG | ||
| 10064 | # to write the compiler configuration to `libtool'. | ||
| 10065 | m4_defun([_LT_LANG_RC_CONFIG], | ||
| 10066 | [AC_REQUIRE([LT_PROG_RC])dnl | ||
| 10067 | AC_LANG_SAVE | ||
| 10068 | |||
| 10069 | # Source file extension for RC test sources. | ||
| 10070 | ac_ext=rc | ||
| 10071 | |||
| 10072 | # Object file extension for compiled RC test sources. | ||
| 10073 | objext=o | ||
| 10074 | _LT_TAGVAR(objext, $1)=$objext | ||
| 10075 | |||
| 10076 | # Code to be used in simple compile tests | ||
| 10077 | lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' | ||
| 10078 | |||
| 10079 | # Code to be used in simple link tests | ||
| 10080 | lt_simple_link_test_code="$lt_simple_compile_test_code" | ||
| 10081 | |||
| 10082 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
| 10083 | _LT_TAG_COMPILER | ||
| 10084 | |||
| 10085 | # save warnings/boilerplate of simple test code | ||
| 10086 | _LT_COMPILER_BOILERPLATE | ||
| 10087 | _LT_LINKER_BOILERPLATE | ||
| 10088 | |||
| 10089 | # Allow CC to be a program name with arguments. | ||
| 10090 | lt_save_CC="$CC" | ||
| 10091 | lt_save_CFLAGS=$CFLAGS | ||
| 10092 | lt_save_GCC=$GCC | ||
| 10093 | GCC= | ||
| 10094 | CC=${RC-"windres"} | ||
| 10095 | CFLAGS= | ||
| 10096 | compiler=$CC | ||
| 10097 | _LT_TAGVAR(compiler, $1)=$CC | ||
| 10098 | _LT_CC_BASENAME([$compiler]) | ||
| 10099 | _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes | ||
| 10100 | |||
| 10101 | if test -n "$compiler"; then | ||
| 10102 | : | ||
| 10103 | _LT_CONFIG($1) | ||
| 10104 | fi | ||
| 10105 | |||
| 10106 | GCC=$lt_save_GCC | ||
| 10107 | AC_LANG_RESTORE | ||
| 10108 | CC=$lt_save_CC | ||
| 10109 | CFLAGS=$lt_save_CFLAGS | ||
| 10110 | ])# _LT_LANG_RC_CONFIG | ||
| 10111 | |||
| 10112 | |||
| 10113 | # LT_PROG_GCJ | ||
| 10114 | # ----------- | ||
| 10115 | AC_DEFUN([LT_PROG_GCJ], | ||
| 10116 | [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], | ||
| 10117 | [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], | ||
| 10118 | [AC_CHECK_TOOL(GCJ, gcj,) | ||
| 10119 | test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" | ||
| 10120 | AC_SUBST(GCJFLAGS)])])[]dnl | ||
| 10121 | ]) | ||
| 10122 | |||
| 10123 | # Old name: | ||
| 10124 | AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) | ||
| 10125 | dnl aclocal-1.4 backwards compatibility: | ||
| 10126 | dnl AC_DEFUN([LT_AC_PROG_GCJ], []) | ||
| 10127 | |||
| 10128 | |||
| 10129 | # LT_PROG_GO | ||
| 10130 | # ---------- | ||
| 10131 | AC_DEFUN([LT_PROG_GO], | ||
| 10132 | [AC_CHECK_TOOL(GOC, gccgo,) | ||
| 10133 | ]) | ||
| 10134 | |||
| 10135 | |||
| 10136 | # LT_PROG_RC | ||
| 10137 | # ---------- | ||
| 10138 | AC_DEFUN([LT_PROG_RC], | ||
| 10139 | [AC_CHECK_TOOL(RC, windres,) | ||
| 10140 | ]) | ||
| 10141 | |||
| 10142 | # Old name: | ||
| 10143 | AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) | ||
| 10144 | dnl aclocal-1.4 backwards compatibility: | ||
| 10145 | dnl AC_DEFUN([LT_AC_PROG_RC], []) | ||
| 10146 | |||
| 10147 | |||
| 10148 | # _LT_DECL_EGREP | ||
| 10149 | # -------------- | ||
| 10150 | # If we don't have a new enough Autoconf to choose the best grep | ||
| 10151 | # available, choose the one first in the user's PATH. | ||
| 10152 | m4_defun([_LT_DECL_EGREP], | ||
| 10153 | [AC_REQUIRE([AC_PROG_EGREP])dnl | ||
| 10154 | AC_REQUIRE([AC_PROG_FGREP])dnl | ||
| 10155 | test -z "$GREP" && GREP=grep | ||
| 10156 | _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) | ||
| 10157 | _LT_DECL([], [EGREP], [1], [An ERE matcher]) | ||
| 10158 | _LT_DECL([], [FGREP], [1], [A literal string matcher]) | ||
| 10159 | dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too | ||
| 10160 | AC_SUBST([GREP]) | ||
| 10161 | ]) | ||
| 10162 | |||
| 10163 | |||
| 10164 | # _LT_DECL_OBJDUMP | ||
| 10165 | # -------------- | ||
| 10166 | # If we don't have a new enough Autoconf to choose the best objdump | ||
| 10167 | # available, choose the one first in the user's PATH. | ||
| 10168 | m4_defun([_LT_DECL_OBJDUMP], | ||
| 10169 | [AC_CHECK_TOOL(OBJDUMP, objdump, false) | ||
| 10170 | test -z "$OBJDUMP" && OBJDUMP=objdump | ||
| 10171 | _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) | ||
| 10172 | AC_SUBST([OBJDUMP]) | ||
| 10173 | ]) | ||
| 10174 | |||
| 10175 | # _LT_DECL_DLLTOOL | ||
| 10176 | # ---------------- | ||
| 10177 | # Ensure DLLTOOL variable is set. | ||
| 10178 | m4_defun([_LT_DECL_DLLTOOL], | ||
| 10179 | [AC_CHECK_TOOL(DLLTOOL, dlltool, false) | ||
| 10180 | test -z "$DLLTOOL" && DLLTOOL=dlltool | ||
| 10181 | _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) | ||
| 10182 | AC_SUBST([DLLTOOL]) | ||
| 10183 | ]) | ||
| 10184 | |||
| 10185 | # _LT_DECL_SED | ||
| 10186 | # ------------ | ||
| 10187 | # Check for a fully-functional sed program, that truncates | ||
| 10188 | # as few characters as possible. Prefer GNU sed if found. | ||
| 10189 | m4_defun([_LT_DECL_SED], | ||
| 10190 | [AC_PROG_SED | ||
| 10191 | test -z "$SED" && SED=sed | ||
| 10192 | Xsed="$SED -e 1s/^X//" | ||
| 10193 | _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) | ||
| 10194 | _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], | ||
| 10195 | [Sed that helps us avoid accidentally triggering echo(1) options like -n]) | ||
| 10196 | ])# _LT_DECL_SED | ||
| 10197 | |||
| 10198 | m4_ifndef([AC_PROG_SED], [ | ||
| 10199 | # NOTE: This macro has been submitted for inclusion into # | ||
| 10200 | # GNU Autoconf as AC_PROG_SED. When it is available in # | ||
| 10201 | # a released version of Autoconf we should remove this # | ||
| 10202 | # macro and use it instead. # | ||
| 10203 | |||
| 10204 | m4_defun([AC_PROG_SED], | ||
| 10205 | [AC_MSG_CHECKING([for a sed that does not truncate output]) | ||
| 10206 | AC_CACHE_VAL(lt_cv_path_SED, | ||
| 10207 | [# Loop through the user's path and test for sed and gsed. | ||
| 10208 | # Then use that list of sed's as ones to test for truncation. | ||
| 10209 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
| 10210 | for as_dir in $PATH | ||
| 10211 | do | ||
| 10212 | IFS=$as_save_IFS | ||
| 10213 | test -z "$as_dir" && as_dir=. | ||
| 10214 | for lt_ac_prog in sed gsed; do | ||
| 10215 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
| 10216 | if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then | ||
| 10217 | lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" | ||
| 10218 | fi | ||
| 10219 | done | ||
| 10220 | done | ||
| 10221 | done | ||
| 10222 | IFS=$as_save_IFS | ||
| 10223 | lt_ac_max=0 | ||
| 10224 | lt_ac_count=0 | ||
| 10225 | # Add /usr/xpg4/bin/sed as it is typically found on Solaris | ||
| 10226 | # along with /bin/sed that truncates output. | ||
| 10227 | for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do | ||
| 10228 | test ! -f $lt_ac_sed && continue | ||
| 10229 | cat /dev/null > conftest.in | ||
| 10230 | lt_ac_count=0 | ||
| 10231 | echo $ECHO_N "0123456789$ECHO_C" >conftest.in | ||
| 10232 | # Check for GNU sed and select it if it is found. | ||
| 10233 | if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then | ||
| 10234 | lt_cv_path_SED=$lt_ac_sed | ||
| 10235 | break | ||
| 10236 | fi | ||
| 10237 | while true; do | ||
| 10238 | cat conftest.in conftest.in >conftest.tmp | ||
| 10239 | mv conftest.tmp conftest.in | ||
| 10240 | cp conftest.in conftest.nl | ||
| 10241 | echo >>conftest.nl | ||
| 10242 | $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break | ||
| 10243 | cmp -s conftest.out conftest.nl || break | ||
| 10244 | # 10000 chars as input seems more than enough | ||
| 10245 | test $lt_ac_count -gt 10 && break | ||
| 10246 | lt_ac_count=`expr $lt_ac_count + 1` | ||
| 10247 | if test $lt_ac_count -gt $lt_ac_max; then | ||
| 10248 | lt_ac_max=$lt_ac_count | ||
| 10249 | lt_cv_path_SED=$lt_ac_sed | ||
| 10250 | fi | ||
| 10251 | done | ||
| 10252 | done | ||
| 10253 | ]) | ||
| 10254 | SED=$lt_cv_path_SED | ||
| 10255 | AC_SUBST([SED]) | ||
| 10256 | AC_MSG_RESULT([$SED]) | ||
| 10257 | ])#AC_PROG_SED | ||
| 10258 | ])#m4_ifndef | ||
| 10259 | |||
| 10260 | # Old name: | ||
| 10261 | AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) | ||
| 10262 | dnl aclocal-1.4 backwards compatibility: | ||
| 10263 | dnl AC_DEFUN([LT_AC_PROG_SED], []) | ||
| 10264 | |||
| 10265 | |||
| 10266 | # _LT_CHECK_SHELL_FEATURES | ||
| 10267 | # ------------------------ | ||
| 10268 | # Find out whether the shell is Bourne or XSI compatible, | ||
| 10269 | # or has some other useful features. | ||
| 10270 | m4_defun([_LT_CHECK_SHELL_FEATURES], | ||
| 10271 | [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) | ||
| 10272 | # Try some XSI features | ||
| 10273 | xsi_shell=no | ||
| 10274 | ( _lt_dummy="a/b/c" | ||
| 10275 | test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ | ||
| 10276 | = c,a/b,b/c, \ | ||
| 10277 | && eval 'test $(( 1 + 1 )) -eq 2 \ | ||
| 10278 | && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ | ||
| 10279 | && xsi_shell=yes | ||
| 10280 | AC_MSG_RESULT([$xsi_shell]) | ||
| 10281 | _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) | ||
| 10282 | |||
| 10283 | AC_MSG_CHECKING([whether the shell understands "+="]) | ||
| 10284 | lt_shell_append=no | ||
| 10285 | ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ | ||
| 10286 | >/dev/null 2>&1 \ | ||
| 10287 | && lt_shell_append=yes | ||
| 10288 | AC_MSG_RESULT([$lt_shell_append]) | ||
| 10289 | _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) | ||
| 10290 | |||
| 10291 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then | ||
| 10292 | lt_unset=unset | ||
| 10293 | else | ||
| 10294 | lt_unset=false | ||
| 10295 | fi | ||
| 10296 | _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl | ||
| 10297 | |||
| 10298 | # test EBCDIC or ASCII | ||
| 10299 | case `echo X|tr X '\101'` in | ||
| 10300 | A) # ASCII based system | ||
| 10301 | # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr | ||
| 10302 | lt_SP2NL='tr \040 \012' | ||
| 10303 | lt_NL2SP='tr \015\012 \040\040' | ||
| 10304 | ;; | ||
| 10305 | *) # EBCDIC based system | ||
| 10306 | lt_SP2NL='tr \100 \n' | ||
| 10307 | lt_NL2SP='tr \r\n \100\100' | ||
| 10308 | ;; | ||
| 10309 | esac | ||
| 10310 | _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl | ||
| 10311 | _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl | ||
| 10312 | ])# _LT_CHECK_SHELL_FEATURES | ||
| 10313 | |||
| 10314 | |||
| 10315 | # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) | ||
| 10316 | # ------------------------------------------------------ | ||
| 10317 | # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and | ||
| 10318 | # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. | ||
| 10319 | m4_defun([_LT_PROG_FUNCTION_REPLACE], | ||
| 10320 | [dnl { | ||
| 10321 | sed -e '/^$1 ()$/,/^} # $1 /c\ | ||
| 10322 | $1 ()\ | ||
| 10323 | {\ | ||
| 10324 | m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) | ||
| 10325 | } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ | ||
| 10326 | && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
| 10327 | || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
| 10328 | test 0 -eq $? || _lt_function_replace_fail=: | ||
| 10329 | ]) | ||
| 10330 | |||
| 10331 | |||
| 10332 | # _LT_PROG_REPLACE_SHELLFNS | ||
| 10333 | # ------------------------- | ||
| 10334 | # Replace existing portable implementations of several shell functions with | ||
| 10335 | # equivalent extended shell implementations where those features are available.. | ||
| 10336 | m4_defun([_LT_PROG_REPLACE_SHELLFNS], | ||
| 10337 | [if test x"$xsi_shell" = xyes; then | ||
| 10338 | _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl | ||
| 10339 | case ${1} in | ||
| 10340 | */*) func_dirname_result="${1%/*}${2}" ;; | ||
| 10341 | * ) func_dirname_result="${3}" ;; | ||
| 10342 | esac]) | ||
| 10343 | |||
| 10344 | _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl | ||
| 10345 | func_basename_result="${1##*/}"]) | ||
| 10346 | |||
| 10347 | _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl | ||
| 10348 | case ${1} in | ||
| 10349 | */*) func_dirname_result="${1%/*}${2}" ;; | ||
| 10350 | * ) func_dirname_result="${3}" ;; | ||
| 10351 | esac | ||
| 10352 | func_basename_result="${1##*/}"]) | ||
| 10353 | |||
| 10354 | _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl | ||
| 10355 | # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are | ||
| 10356 | # positional parameters, so assign one to ordinary parameter first. | ||
| 10357 | func_stripname_result=${3} | ||
| 10358 | func_stripname_result=${func_stripname_result#"${1}"} | ||
| 10359 | func_stripname_result=${func_stripname_result%"${2}"}]) | ||
| 10360 | |||
| 10361 | _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl | ||
| 10362 | func_split_long_opt_name=${1%%=*} | ||
| 10363 | func_split_long_opt_arg=${1#*=}]) | ||
| 10364 | |||
| 10365 | _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl | ||
| 10366 | func_split_short_opt_arg=${1#??} | ||
| 10367 | func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) | ||
| 10368 | |||
| 10369 | _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl | ||
| 10370 | case ${1} in | ||
| 10371 | *.lo) func_lo2o_result=${1%.lo}.${objext} ;; | ||
| 10372 | *) func_lo2o_result=${1} ;; | ||
| 10373 | esac]) | ||
| 10374 | |||
| 10375 | _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) | ||
| 10376 | |||
| 10377 | _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) | ||
| 10378 | |||
| 10379 | _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) | ||
| 10380 | fi | ||
| 10381 | |||
| 10382 | if test x"$lt_shell_append" = xyes; then | ||
| 10383 | _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) | ||
| 10384 | |||
| 10385 | _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl | ||
| 10386 | func_quote_for_eval "${2}" | ||
| 10387 | dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ | ||
| 10388 | eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) | ||
| 10389 | |||
| 10390 | # Save a `func_append' function call where possible by direct use of '+=' | ||
| 10391 | sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ | ||
| 10392 | && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
| 10393 | || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
| 10394 | test 0 -eq $? || _lt_function_replace_fail=: | ||
| 10395 | else | ||
| 10396 | # Save a `func_append' function call even when '+=' is not available | ||
| 10397 | sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ | ||
| 10398 | && mv -f "$cfgfile.tmp" "$cfgfile" \ | ||
| 10399 | || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | ||
| 10400 | test 0 -eq $? || _lt_function_replace_fail=: | ||
| 10401 | fi | ||
| 10402 | |||
| 10403 | if test x"$_lt_function_replace_fail" = x":"; then | ||
| 10404 | AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) | ||
| 10405 | fi | ||
| 10406 | ]) | ||
| 10407 | |||
| 10408 | # _LT_PATH_CONVERSION_FUNCTIONS | ||
| 10409 | # ----------------------------- | ||
| 10410 | # Determine which file name conversion functions should be used by | ||
| 10411 | # func_to_host_file (and, implicitly, by func_to_host_path). These are needed | ||
| 10412 | # for certain cross-compile configurations and native mingw. | ||
| 10413 | m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], | ||
| 10414 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
| 10415 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | ||
| 10416 | AC_MSG_CHECKING([how to convert $build file names to $host format]) | ||
| 10417 | AC_CACHE_VAL(lt_cv_to_host_file_cmd, | ||
| 10418 | [case $host in | ||
| 10419 | *-*-mingw* ) | ||
| 10420 | case $build in | ||
| 10421 | *-*-mingw* ) # actually msys | ||
| 10422 | lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 | ||
| 10423 | ;; | ||
| 10424 | *-*-cygwin* ) | ||
| 10425 | lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 | ||
| 10426 | ;; | ||
| 10427 | * ) # otherwise, assume *nix | ||
| 10428 | lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 | ||
| 10429 | ;; | ||
| 10430 | esac | ||
| 10431 | ;; | ||
| 10432 | *-*-cygwin* ) | ||
| 10433 | case $build in | ||
| 10434 | *-*-mingw* ) # actually msys | ||
| 10435 | lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin | ||
| 10436 | ;; | ||
| 10437 | *-*-cygwin* ) | ||
| 10438 | lt_cv_to_host_file_cmd=func_convert_file_noop | ||
| 10439 | ;; | ||
| 10440 | * ) # otherwise, assume *nix | ||
| 10441 | lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin | ||
| 10442 | ;; | ||
| 10443 | esac | ||
| 10444 | ;; | ||
| 10445 | * ) # unhandled hosts (and "normal" native builds) | ||
| 10446 | lt_cv_to_host_file_cmd=func_convert_file_noop | ||
| 10447 | ;; | ||
| 10448 | esac | ||
| 10449 | ]) | ||
| 10450 | to_host_file_cmd=$lt_cv_to_host_file_cmd | ||
| 10451 | AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) | ||
| 10452 | _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], | ||
| 10453 | [0], [convert $build file names to $host format])dnl | ||
| 10454 | |||
| 10455 | AC_MSG_CHECKING([how to convert $build file names to toolchain format]) | ||
| 10456 | AC_CACHE_VAL(lt_cv_to_tool_file_cmd, | ||
| 10457 | [#assume ordinary cross tools, or native build. | ||
| 10458 | lt_cv_to_tool_file_cmd=func_convert_file_noop | ||
| 10459 | case $host in | ||
| 10460 | *-*-mingw* ) | ||
| 10461 | case $build in | ||
| 10462 | *-*-mingw* ) # actually msys | ||
| 10463 | lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 | ||
| 10464 | ;; | ||
| 10465 | esac | ||
| 10466 | ;; | ||
| 10467 | esac | ||
| 10468 | ]) | ||
| 10469 | to_tool_file_cmd=$lt_cv_to_tool_file_cmd | ||
| 10470 | AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) | ||
| 10471 | _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], | ||
| 10472 | [0], [convert $build files to toolchain format])dnl | ||
| 10473 | ])# _LT_PATH_CONVERSION_FUNCTIONS | ||
| 10474 | |||
| 10475 | # Helper functions for option handling. -*- Autoconf -*- | ||
| 10476 | # | ||
| 10477 | # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, | ||
| 10478 | # Inc. | ||
| 10479 | # Written by Gary V. Vaughan, 2004 | ||
| 10480 | # | ||
| 10481 | # This file is free software; the Free Software Foundation gives | ||
| 10482 | # unlimited permission to copy and/or distribute it, with or without | ||
| 10483 | # modifications, as long as this notice is preserved. | ||
| 10484 | |||
| 10485 | # serial 7 ltoptions.m4 | ||
| 10486 | |||
| 10487 | # This is to help aclocal find these macros, as it can't see m4_define. | ||
| 10488 | AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) | ||
| 10489 | |||
| 10490 | |||
| 10491 | # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) | ||
| 10492 | # ------------------------------------------ | ||
| 10493 | m4_define([_LT_MANGLE_OPTION], | ||
| 10494 | [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) | ||
| 10495 | |||
| 10496 | |||
| 10497 | # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) | ||
| 10498 | # --------------------------------------- | ||
| 10499 | # Set option OPTION-NAME for macro MACRO-NAME, and if there is a | ||
| 10500 | # matching handler defined, dispatch to it. Other OPTION-NAMEs are | ||
| 10501 | # saved as a flag. | ||
| 10502 | m4_define([_LT_SET_OPTION], | ||
| 10503 | [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl | ||
| 10504 | m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), | ||
| 10505 | _LT_MANGLE_DEFUN([$1], [$2]), | ||
| 10506 | [m4_warning([Unknown $1 option `$2'])])[]dnl | ||
| 10507 | ]) | ||
| 10508 | |||
| 10509 | |||
| 10510 | # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) | ||
| 10511 | # ------------------------------------------------------------ | ||
| 10512 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. | ||
| 10513 | m4_define([_LT_IF_OPTION], | ||
| 10514 | [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) | ||
| 10515 | |||
| 10516 | |||
| 10517 | # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) | ||
| 10518 | # ------------------------------------------------------- | ||
| 10519 | # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME | ||
| 10520 | # are set. | ||
| 10521 | m4_define([_LT_UNLESS_OPTIONS], | ||
| 10522 | [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), | ||
| 10523 | [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), | ||
| 10524 | [m4_define([$0_found])])])[]dnl | ||
| 10525 | m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 | ||
| 10526 | ])[]dnl | ||
| 10527 | ]) | ||
| 10528 | |||
| 10529 | |||
| 10530 | # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) | ||
| 10531 | # ---------------------------------------- | ||
| 10532 | # OPTION-LIST is a space-separated list of Libtool options associated | ||
| 10533 | # with MACRO-NAME. If any OPTION has a matching handler declared with | ||
| 10534 | # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about | ||
| 10535 | # the unknown option and exit. | ||
| 10536 | m4_defun([_LT_SET_OPTIONS], | ||
| 10537 | [# Set options | ||
| 10538 | m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), | ||
| 10539 | [_LT_SET_OPTION([$1], _LT_Option)]) | ||
| 10540 | |||
| 10541 | m4_if([$1],[LT_INIT],[ | ||
| 10542 | dnl | ||
| 10543 | dnl Simply set some default values (i.e off) if boolean options were not | ||
| 10544 | dnl specified: | ||
| 10545 | _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no | ||
| 10546 | ]) | ||
| 10547 | _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no | ||
| 10548 | ]) | ||
| 10549 | dnl | ||
| 10550 | dnl If no reference was made to various pairs of opposing options, then | ||
| 10551 | dnl we run the default mode handler for the pair. For example, if neither | ||
| 10552 | dnl `shared' nor `disable-shared' was passed, we enable building of shared | ||
| 10553 | dnl archives by default: | ||
| 10554 | _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) | ||
| 10555 | _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) | ||
| 10556 | _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) | ||
| 10557 | _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], | ||
| 10558 | [_LT_ENABLE_FAST_INSTALL]) | ||
| 10559 | ]) | ||
| 10560 | ])# _LT_SET_OPTIONS | ||
| 10561 | |||
| 10562 | |||
| 10563 | |||
| 10564 | # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) | ||
| 10565 | # ----------------------------------------- | ||
| 10566 | m4_define([_LT_MANGLE_DEFUN], | ||
| 10567 | [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) | ||
| 10568 | |||
| 10569 | |||
| 10570 | # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) | ||
| 10571 | # ----------------------------------------------- | ||
| 10572 | m4_define([LT_OPTION_DEFINE], | ||
| 10573 | [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl | ||
| 10574 | ])# LT_OPTION_DEFINE | ||
| 10575 | |||
| 10576 | |||
| 10577 | # dlopen | ||
| 10578 | # ------ | ||
| 10579 | LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes | ||
| 10580 | ]) | ||
| 10581 | |||
| 10582 | AU_DEFUN([AC_LIBTOOL_DLOPEN], | ||
| 10583 | [_LT_SET_OPTION([LT_INIT], [dlopen]) | ||
| 10584 | AC_DIAGNOSE([obsolete], | ||
| 10585 | [$0: Remove this warning and the call to _LT_SET_OPTION when you | ||
| 10586 | put the `dlopen' option into LT_INIT's first parameter.]) | ||
| 10587 | ]) | ||
| 10588 | |||
| 10589 | dnl aclocal-1.4 backwards compatibility: | ||
| 10590 | dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) | ||
| 10591 | |||
| 10592 | |||
| 10593 | # win32-dll | ||
| 10594 | # --------- | ||
| 10595 | # Declare package support for building win32 dll's. | ||
| 10596 | LT_OPTION_DEFINE([LT_INIT], [win32-dll], | ||
| 10597 | [enable_win32_dll=yes | ||
| 10598 | |||
| 10599 | case $host in | ||
| 10600 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) | ||
| 10601 | AC_CHECK_TOOL(AS, as, false) | ||
| 10602 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) | ||
| 10603 | AC_CHECK_TOOL(OBJDUMP, objdump, false) | ||
| 10604 | ;; | ||
| 10605 | esac | ||
| 10606 | |||
| 10607 | test -z "$AS" && AS=as | ||
| 10608 | _LT_DECL([], [AS], [1], [Assembler program])dnl | ||
| 10609 | |||
| 10610 | test -z "$DLLTOOL" && DLLTOOL=dlltool | ||
| 10611 | _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl | ||
| 10612 | |||
| 10613 | test -z "$OBJDUMP" && OBJDUMP=objdump | ||
| 10614 | _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl | ||
| 10615 | ])# win32-dll | ||
| 10616 | |||
| 10617 | AU_DEFUN([AC_LIBTOOL_WIN32_DLL], | ||
| 10618 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
| 10619 | _LT_SET_OPTION([LT_INIT], [win32-dll]) | ||
| 10620 | AC_DIAGNOSE([obsolete], | ||
| 10621 | [$0: Remove this warning and the call to _LT_SET_OPTION when you | ||
| 10622 | put the `win32-dll' option into LT_INIT's first parameter.]) | ||
| 10623 | ]) | ||
| 10624 | |||
| 10625 | dnl aclocal-1.4 backwards compatibility: | ||
| 10626 | dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) | ||
| 10627 | |||
| 10628 | |||
| 10629 | # _LT_ENABLE_SHARED([DEFAULT]) | ||
| 10630 | # ---------------------------- | ||
| 10631 | # implement the --enable-shared flag, and supports the `shared' and | ||
| 10632 | # `disable-shared' LT_INIT options. | ||
| 10633 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | ||
| 10634 | m4_define([_LT_ENABLE_SHARED], | ||
| 10635 | [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl | ||
| 10636 | AC_ARG_ENABLE([shared], | ||
| 10637 | [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], | ||
| 10638 | [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], | ||
| 10639 | [p=${PACKAGE-default} | ||
| 10640 | case $enableval in | ||
| 10641 | yes) enable_shared=yes ;; | ||
| 10642 | no) enable_shared=no ;; | ||
| 10643 | *) | ||
| 10644 | enable_shared=no | ||
| 10645 | # Look at the argument we got. We use all the common list separators. | ||
| 10646 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | ||
| 10647 | for pkg in $enableval; do | ||
| 10648 | IFS="$lt_save_ifs" | ||
| 10649 | if test "X$pkg" = "X$p"; then | ||
| 10650 | enable_shared=yes | ||
| 10651 | fi | ||
| 10652 | done | ||
| 10653 | IFS="$lt_save_ifs" | ||
| 10654 | ;; | ||
| 10655 | esac], | ||
| 10656 | [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) | ||
| 10657 | |||
| 10658 | _LT_DECL([build_libtool_libs], [enable_shared], [0], | ||
| 10659 | [Whether or not to build shared libraries]) | ||
| 10660 | ])# _LT_ENABLE_SHARED | ||
| 10661 | |||
| 10662 | LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) | ||
| 10663 | LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) | ||
| 10664 | |||
| 10665 | # Old names: | ||
| 10666 | AC_DEFUN([AC_ENABLE_SHARED], | ||
| 10667 | [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) | ||
| 10668 | ]) | ||
| 10669 | |||
| 10670 | AC_DEFUN([AC_DISABLE_SHARED], | ||
| 10671 | [_LT_SET_OPTION([LT_INIT], [disable-shared]) | ||
| 10672 | ]) | ||
| 10673 | |||
| 10674 | AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) | ||
| 10675 | AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) | ||
| 10676 | |||
| 10677 | dnl aclocal-1.4 backwards compatibility: | ||
| 10678 | dnl AC_DEFUN([AM_ENABLE_SHARED], []) | ||
| 10679 | dnl AC_DEFUN([AM_DISABLE_SHARED], []) | ||
| 10680 | |||
| 10681 | |||
| 10682 | |||
| 10683 | # _LT_ENABLE_STATIC([DEFAULT]) | ||
| 10684 | # ---------------------------- | ||
| 10685 | # implement the --enable-static flag, and support the `static' and | ||
| 10686 | # `disable-static' LT_INIT options. | ||
| 10687 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | ||
| 10688 | m4_define([_LT_ENABLE_STATIC], | ||
| 10689 | [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl | ||
| 10690 | AC_ARG_ENABLE([static], | ||
| 10691 | [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], | ||
| 10692 | [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], | ||
| 10693 | [p=${PACKAGE-default} | ||
| 10694 | case $enableval in | ||
| 10695 | yes) enable_static=yes ;; | ||
| 10696 | no) enable_static=no ;; | ||
| 10697 | *) | ||
| 10698 | enable_static=no | ||
| 10699 | # Look at the argument we got. We use all the common list separators. | ||
| 10700 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | ||
| 10701 | for pkg in $enableval; do | ||
| 10702 | IFS="$lt_save_ifs" | ||
| 10703 | if test "X$pkg" = "X$p"; then | ||
| 10704 | enable_static=yes | ||
| 10705 | fi | ||
| 10706 | done | ||
| 10707 | IFS="$lt_save_ifs" | ||
| 10708 | ;; | ||
| 10709 | esac], | ||
| 10710 | [enable_static=]_LT_ENABLE_STATIC_DEFAULT) | ||
| 10711 | |||
| 10712 | _LT_DECL([build_old_libs], [enable_static], [0], | ||
| 10713 | [Whether or not to build static libraries]) | ||
| 10714 | ])# _LT_ENABLE_STATIC | ||
| 10715 | |||
| 10716 | LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) | ||
| 10717 | LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) | ||
| 10718 | |||
| 10719 | # Old names: | ||
| 10720 | AC_DEFUN([AC_ENABLE_STATIC], | ||
| 10721 | [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) | ||
| 10722 | ]) | ||
| 10723 | |||
| 10724 | AC_DEFUN([AC_DISABLE_STATIC], | ||
| 10725 | [_LT_SET_OPTION([LT_INIT], [disable-static]) | ||
| 10726 | ]) | ||
| 10727 | |||
| 10728 | AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) | ||
| 10729 | AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) | ||
| 10730 | |||
| 10731 | dnl aclocal-1.4 backwards compatibility: | ||
| 10732 | dnl AC_DEFUN([AM_ENABLE_STATIC], []) | ||
| 10733 | dnl AC_DEFUN([AM_DISABLE_STATIC], []) | ||
| 10734 | |||
| 10735 | |||
| 10736 | |||
| 10737 | # _LT_ENABLE_FAST_INSTALL([DEFAULT]) | ||
| 10738 | # ---------------------------------- | ||
| 10739 | # implement the --enable-fast-install flag, and support the `fast-install' | ||
| 10740 | # and `disable-fast-install' LT_INIT options. | ||
| 10741 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | ||
| 10742 | m4_define([_LT_ENABLE_FAST_INSTALL], | ||
| 10743 | [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl | ||
| 10744 | AC_ARG_ENABLE([fast-install], | ||
| 10745 | [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], | ||
| 10746 | [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], | ||
| 10747 | [p=${PACKAGE-default} | ||
| 10748 | case $enableval in | ||
| 10749 | yes) enable_fast_install=yes ;; | ||
| 10750 | no) enable_fast_install=no ;; | ||
| 10751 | *) | ||
| 10752 | enable_fast_install=no | ||
| 10753 | # Look at the argument we got. We use all the common list separators. | ||
| 10754 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | ||
| 10755 | for pkg in $enableval; do | ||
| 10756 | IFS="$lt_save_ifs" | ||
| 10757 | if test "X$pkg" = "X$p"; then | ||
| 10758 | enable_fast_install=yes | ||
| 10759 | fi | ||
| 10760 | done | ||
| 10761 | IFS="$lt_save_ifs" | ||
| 10762 | ;; | ||
| 10763 | esac], | ||
| 10764 | [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) | ||
| 10765 | |||
| 10766 | _LT_DECL([fast_install], [enable_fast_install], [0], | ||
| 10767 | [Whether or not to optimize for fast installation])dnl | ||
| 10768 | ])# _LT_ENABLE_FAST_INSTALL | ||
| 10769 | |||
| 10770 | LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) | ||
| 10771 | LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) | ||
| 10772 | |||
| 10773 | # Old names: | ||
| 10774 | AU_DEFUN([AC_ENABLE_FAST_INSTALL], | ||
| 10775 | [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) | ||
| 10776 | AC_DIAGNOSE([obsolete], | ||
| 10777 | [$0: Remove this warning and the call to _LT_SET_OPTION when you put | ||
| 10778 | the `fast-install' option into LT_INIT's first parameter.]) | ||
| 10779 | ]) | ||
| 10780 | |||
| 10781 | AU_DEFUN([AC_DISABLE_FAST_INSTALL], | ||
| 10782 | [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) | ||
| 10783 | AC_DIAGNOSE([obsolete], | ||
| 10784 | [$0: Remove this warning and the call to _LT_SET_OPTION when you put | ||
| 10785 | the `disable-fast-install' option into LT_INIT's first parameter.]) | ||
| 10786 | ]) | ||
| 10787 | |||
| 10788 | dnl aclocal-1.4 backwards compatibility: | ||
| 10789 | dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) | ||
| 10790 | dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) | ||
| 10791 | |||
| 10792 | |||
| 10793 | # _LT_WITH_PIC([MODE]) | ||
| 10794 | # -------------------- | ||
| 10795 | # implement the --with-pic flag, and support the `pic-only' and `no-pic' | ||
| 10796 | # LT_INIT options. | ||
| 10797 | # MODE is either `yes' or `no'. If omitted, it defaults to `both'. | ||
| 10798 | m4_define([_LT_WITH_PIC], | ||
| 10799 | [AC_ARG_WITH([pic], | ||
| 10800 | [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], | ||
| 10801 | [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], | ||
| 10802 | [lt_p=${PACKAGE-default} | ||
| 10803 | case $withval in | ||
| 10804 | yes|no) pic_mode=$withval ;; | ||
| 10805 | *) | ||
| 10806 | pic_mode=default | ||
| 10807 | # Look at the argument we got. We use all the common list separators. | ||
| 10808 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | ||
| 10809 | for lt_pkg in $withval; do | ||
| 10810 | IFS="$lt_save_ifs" | ||
| 10811 | if test "X$lt_pkg" = "X$lt_p"; then | ||
| 10812 | pic_mode=yes | ||
| 10813 | fi | ||
| 10814 | done | ||
| 10815 | IFS="$lt_save_ifs" | ||
| 10816 | ;; | ||
| 10817 | esac], | ||
| 10818 | [pic_mode=default]) | ||
| 10819 | |||
| 10820 | test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) | ||
| 10821 | |||
| 10822 | _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl | ||
| 10823 | ])# _LT_WITH_PIC | ||
| 10824 | |||
| 10825 | LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) | ||
| 10826 | LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) | ||
| 10827 | |||
| 10828 | # Old name: | ||
| 10829 | AU_DEFUN([AC_LIBTOOL_PICMODE], | ||
| 10830 | [_LT_SET_OPTION([LT_INIT], [pic-only]) | ||
| 10831 | AC_DIAGNOSE([obsolete], | ||
| 10832 | [$0: Remove this warning and the call to _LT_SET_OPTION when you | ||
| 10833 | put the `pic-only' option into LT_INIT's first parameter.]) | ||
| 10834 | ]) | ||
| 10835 | |||
| 10836 | dnl aclocal-1.4 backwards compatibility: | ||
| 10837 | dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) | ||
| 10838 | |||
| 10839 | |||
| 10840 | m4_define([_LTDL_MODE], []) | ||
| 10841 | LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], | ||
| 10842 | [m4_define([_LTDL_MODE], [nonrecursive])]) | ||
| 10843 | LT_OPTION_DEFINE([LTDL_INIT], [recursive], | ||
| 10844 | [m4_define([_LTDL_MODE], [recursive])]) | ||
| 10845 | LT_OPTION_DEFINE([LTDL_INIT], [subproject], | ||
| 10846 | [m4_define([_LTDL_MODE], [subproject])]) | ||
| 10847 | |||
| 10848 | m4_define([_LTDL_TYPE], []) | ||
| 10849 | LT_OPTION_DEFINE([LTDL_INIT], [installable], | ||
| 10850 | [m4_define([_LTDL_TYPE], [installable])]) | ||
| 10851 | LT_OPTION_DEFINE([LTDL_INIT], [convenience], | ||
| 10852 | [m4_define([_LTDL_TYPE], [convenience])]) | ||
| 10853 | |||
| 10854 | # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- | ||
| 10855 | # | ||
| 10856 | # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. | ||
| 10857 | # Written by Gary V. Vaughan, 2004 | ||
| 10858 | # | ||
| 10859 | # This file is free software; the Free Software Foundation gives | ||
| 10860 | # unlimited permission to copy and/or distribute it, with or without | ||
| 10861 | # modifications, as long as this notice is preserved. | ||
| 10862 | |||
| 10863 | # serial 6 ltsugar.m4 | ||
| 10864 | |||
| 10865 | # This is to help aclocal find these macros, as it can't see m4_define. | ||
| 10866 | AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) | ||
| 10867 | |||
| 10868 | |||
| 10869 | # lt_join(SEP, ARG1, [ARG2...]) | ||
| 10870 | # ----------------------------- | ||
| 10871 | # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their | ||
| 10872 | # associated separator. | ||
| 10873 | # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier | ||
| 10874 | # versions in m4sugar had bugs. | ||
| 10875 | m4_define([lt_join], | ||
| 10876 | [m4_if([$#], [1], [], | ||
| 10877 | [$#], [2], [[$2]], | ||
| 10878 | [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) | ||
| 10879 | m4_define([_lt_join], | ||
| 10880 | [m4_if([$#$2], [2], [], | ||
| 10881 | [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) | ||
| 10882 | |||
| 10883 | |||
| 10884 | # lt_car(LIST) | ||
| 10885 | # lt_cdr(LIST) | ||
| 10886 | # ------------ | ||
| 10887 | # Manipulate m4 lists. | ||
| 10888 | # These macros are necessary as long as will still need to support | ||
| 10889 | # Autoconf-2.59 which quotes differently. | ||
| 10890 | m4_define([lt_car], [[$1]]) | ||
| 10891 | m4_define([lt_cdr], | ||
| 10892 | [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], | ||
| 10893 | [$#], 1, [], | ||
| 10894 | [m4_dquote(m4_shift($@))])]) | ||
| 10895 | m4_define([lt_unquote], $1) | ||
| 10896 | |||
| 10897 | |||
| 10898 | # lt_append(MACRO-NAME, STRING, [SEPARATOR]) | ||
| 10899 | # ------------------------------------------ | ||
| 10900 | # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. | ||
| 10901 | # Note that neither SEPARATOR nor STRING are expanded; they are appended | ||
| 10902 | # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). | ||
| 10903 | # No SEPARATOR is output if MACRO-NAME was previously undefined (different | ||
| 10904 | # than defined and empty). | ||
| 10905 | # | ||
| 10906 | # This macro is needed until we can rely on Autoconf 2.62, since earlier | ||
| 10907 | # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. | ||
| 10908 | m4_define([lt_append], | ||
| 10909 | [m4_define([$1], | ||
| 10910 | m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) | ||
| 10911 | |||
| 10912 | |||
| 10913 | |||
| 10914 | # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) | ||
| 10915 | # ---------------------------------------------------------- | ||
| 10916 | # Produce a SEP delimited list of all paired combinations of elements of | ||
| 10917 | # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list | ||
| 10918 | # has the form PREFIXmINFIXSUFFIXn. | ||
| 10919 | # Needed until we can rely on m4_combine added in Autoconf 2.62. | ||
| 10920 | m4_define([lt_combine], | ||
| 10921 | [m4_if(m4_eval([$# > 3]), [1], | ||
| 10922 | [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl | ||
| 10923 | [[m4_foreach([_Lt_prefix], [$2], | ||
| 10924 | [m4_foreach([_Lt_suffix], | ||
| 10925 | ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, | ||
| 10926 | [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) | ||
| 10927 | |||
| 10928 | |||
| 10929 | # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) | ||
| 10930 | # ----------------------------------------------------------------------- | ||
| 10931 | # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited | ||
| 10932 | # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. | ||
| 10933 | m4_define([lt_if_append_uniq], | ||
| 10934 | [m4_ifdef([$1], | ||
| 10935 | [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], | ||
| 10936 | [lt_append([$1], [$2], [$3])$4], | ||
| 10937 | [$5])], | ||
| 10938 | [lt_append([$1], [$2], [$3])$4])]) | ||
| 10939 | |||
| 10940 | |||
| 10941 | # lt_dict_add(DICT, KEY, VALUE) | ||
| 10942 | # ----------------------------- | ||
| 10943 | m4_define([lt_dict_add], | ||
| 10944 | [m4_define([$1($2)], [$3])]) | ||
| 10945 | |||
| 10946 | |||
| 10947 | # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) | ||
| 10948 | # -------------------------------------------- | ||
| 10949 | m4_define([lt_dict_add_subkey], | ||
| 10950 | [m4_define([$1($2:$3)], [$4])]) | ||
| 10951 | |||
| 10952 | |||
| 10953 | # lt_dict_fetch(DICT, KEY, [SUBKEY]) | ||
| 10954 | # ---------------------------------- | ||
| 10955 | m4_define([lt_dict_fetch], | ||
| 10956 | [m4_ifval([$3], | ||
| 10957 | m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), | ||
| 10958 | m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) | ||
| 10959 | |||
| 10960 | |||
| 10961 | # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) | ||
| 10962 | # ----------------------------------------------------------------- | ||
| 10963 | m4_define([lt_if_dict_fetch], | ||
| 10964 | [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], | ||
| 10965 | [$5], | ||
| 10966 | [$6])]) | ||
| 10967 | |||
| 10968 | |||
| 10969 | # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) | ||
| 10970 | # -------------------------------------------------------------- | ||
| 10971 | m4_define([lt_dict_filter], | ||
| 10972 | [m4_if([$5], [], [], | ||
| 10973 | [lt_join(m4_quote(m4_default([$4], [[, ]])), | ||
| 10974 | lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), | ||
| 10975 | [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl | ||
| 10976 | ]) | ||
| 10977 | |||
| 10978 | # ltversion.m4 -- version numbers -*- Autoconf -*- | ||
| 10979 | # | ||
| 10980 | # Copyright (C) 2004 Free Software Foundation, Inc. | ||
| 10981 | # Written by Scott James Remnant, 2004 | ||
| 10982 | # | ||
| 10983 | # This file is free software; the Free Software Foundation gives | ||
| 10984 | # unlimited permission to copy and/or distribute it, with or without | ||
| 10985 | # modifications, as long as this notice is preserved. | ||
| 10986 | |||
| 10987 | # @configure_input@ | ||
| 10988 | |||
| 10989 | # serial 3337 ltversion.m4 | ||
| 10990 | # This file is part of GNU Libtool | ||
| 10991 | |||
| 10992 | m4_define([LT_PACKAGE_VERSION], [2.4.2]) | ||
| 10993 | m4_define([LT_PACKAGE_REVISION], [1.3337]) | ||
| 10994 | |||
| 10995 | AC_DEFUN([LTVERSION_VERSION], | ||
| 10996 | [macro_version='2.4.2' | ||
| 10997 | macro_revision='1.3337' | ||
| 10998 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) | ||
| 10999 | _LT_DECL(, macro_revision, 0) | ||
| 11000 | ]) | ||
| 11001 | |||
| 11002 | # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- | ||
| 11003 | # | ||
| 11004 | # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. | ||
| 11005 | # Written by Scott James Remnant, 2004. | ||
| 11006 | # | ||
| 11007 | # This file is free software; the Free Software Foundation gives | ||
| 11008 | # unlimited permission to copy and/or distribute it, with or without | ||
| 11009 | # modifications, as long as this notice is preserved. | ||
| 11010 | |||
| 11011 | # serial 5 lt~obsolete.m4 | ||
| 11012 | |||
| 11013 | # These exist entirely to fool aclocal when bootstrapping libtool. | ||
| 11014 | # | ||
| 11015 | # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) | ||
| 11016 | # which have later been changed to m4_define as they aren't part of the | ||
| 11017 | # exported API, or moved to Autoconf or Automake where they belong. | ||
| 11018 | # | ||
| 11019 | # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN | ||
| 11020 | # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us | ||
| 11021 | # using a macro with the same name in our local m4/libtool.m4 it'll | ||
| 11022 | # pull the old libtool.m4 in (it doesn't see our shiny new m4_define | ||
| 11023 | # and doesn't know about Autoconf macros at all.) | ||
| 11024 | # | ||
| 11025 | # So we provide this file, which has a silly filename so it's always | ||
| 11026 | # included after everything else. This provides aclocal with the | ||
| 11027 | # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything | ||
| 11028 | # because those macros already exist, or will be overwritten later. | ||
| 11029 | # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. | ||
| 11030 | # | ||
| 11031 | # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. | ||
| 11032 | # Yes, that means every name once taken will need to remain here until | ||
| 11033 | # we give up compatibility with versions before 1.7, at which point | ||
| 11034 | # we need to keep only those names which we still refer to. | ||
| 11035 | |||
| 11036 | # This is to help aclocal find these macros, as it can't see m4_define. | ||
| 11037 | AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) | ||
| 11038 | |||
| 11039 | m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) | ||
| 11040 | m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) | ||
| 11041 | m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) | ||
| 11042 | m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) | ||
| 11043 | m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) | ||
| 11044 | m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) | ||
| 11045 | m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) | ||
| 11046 | m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) | ||
| 11047 | m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) | ||
| 11048 | m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) | ||
| 11049 | m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) | ||
| 11050 | m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) | ||
| 11051 | m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) | ||
| 11052 | m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) | ||
| 11053 | m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) | ||
| 11054 | m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) | ||
| 11055 | m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) | ||
| 11056 | m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) | ||
| 11057 | m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) | ||
| 11058 | m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) | ||
| 11059 | m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) | ||
| 11060 | m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) | ||
| 11061 | m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) | ||
| 11062 | m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) | ||
| 11063 | m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) | ||
| 11064 | m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) | ||
| 11065 | m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) | ||
| 11066 | m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) | ||
| 11067 | m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) | ||
| 11068 | m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) | ||
| 11069 | m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) | ||
| 11070 | m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) | ||
| 11071 | m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) | ||
| 11072 | m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) | ||
| 11073 | m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) | ||
| 11074 | m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) | ||
| 11075 | m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) | ||
| 11076 | m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) | ||
| 11077 | m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) | ||
| 11078 | m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) | ||
| 11079 | m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) | ||
| 11080 | m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) | ||
| 11081 | m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) | ||
| 11082 | m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) | ||
| 11083 | m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) | ||
| 11084 | m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) | ||
| 11085 | m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) | ||
| 11086 | m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) | ||
| 11087 | m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) | ||
| 11088 | m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) | ||
| 11089 | m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) | ||
| 11090 | m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) | ||
| 11091 | m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) | ||
| 11092 | m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) | ||
| 11093 | m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) | ||
| 11094 | m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) | ||
| 11095 | m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) | ||
| 11096 | m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) | ||
| 11097 | m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) | ||
| 11098 | m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) | ||
| 11099 | m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) | ||
| 11100 | |||
| 11101 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | ||
| 11102 | # serial 1 (pkg-config-0.24) | ||
| 11103 | # | ||
| 11104 | # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. | ||
| 11105 | # | ||
| 11106 | # This program is free software; you can redistribute it and/or modify | ||
| 11107 | # it under the terms of the GNU General Public License as published by | ||
| 11108 | # the Free Software Foundation; either version 2 of the License, or | ||
| 11109 | # (at your option) any later version. | ||
| 11110 | # | ||
| 11111 | # This program is distributed in the hope that it will be useful, but | ||
| 11112 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11113 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 11114 | # General Public License for more details. | ||
| 11115 | # | ||
| 11116 | # You should have received a copy of the GNU General Public License | ||
| 11117 | # along with this program; if not, write to the Free Software | ||
| 11118 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
| 11119 | # | ||
| 11120 | # As a special exception to the GNU General Public License, if you | ||
| 11121 | # distribute this file as part of a program that contains a | ||
| 11122 | # configuration script generated by Autoconf, you may include it under | ||
| 11123 | # the same distribution terms that you use for the rest of that program. | ||
| 11124 | |||
| 11125 | # PKG_PROG_PKG_CONFIG([MIN-VERSION]) | ||
| 11126 | # ---------------------------------- | ||
| 11127 | AC_DEFUN([PKG_PROG_PKG_CONFIG], | ||
| 11128 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) | ||
| 11129 | m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) | ||
| 11130 | m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) | ||
| 11131 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) | ||
| 11132 | AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) | ||
| 11133 | AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) | ||
| 11134 | |||
| 11135 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | ||
| 11136 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) | ||
| 11137 | fi | ||
| 11138 | if test -n "$PKG_CONFIG"; then | ||
| 11139 | _pkg_min_version=m4_default([$1], [0.9.0]) | ||
| 11140 | AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) | ||
| 11141 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | ||
| 11142 | AC_MSG_RESULT([yes]) | ||
| 11143 | else | ||
| 11144 | AC_MSG_RESULT([no]) | ||
| 11145 | PKG_CONFIG="" | ||
| 11146 | fi | ||
| 11147 | fi[]dnl | ||
| 11148 | ])# PKG_PROG_PKG_CONFIG | ||
| 11149 | |||
| 11150 | # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | ||
| 11151 | # | ||
| 11152 | # Check to see whether a particular set of modules exists. Similar | ||
| 11153 | # to PKG_CHECK_MODULES(), but does not set variables or print errors. | ||
| 11154 | # | ||
| 11155 | # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
| 11156 | # only at the first occurence in configure.ac, so if the first place | ||
| 11157 | # it's called might be skipped (such as if it is within an "if", you | ||
| 11158 | # have to call PKG_CHECK_EXISTS manually | ||
| 11159 | # -------------------------------------------------------------- | ||
| 11160 | AC_DEFUN([PKG_CHECK_EXISTS], | ||
| 11161 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
| 11162 | if test -n "$PKG_CONFIG" && \ | ||
| 11163 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then | ||
| 11164 | m4_default([$2], [:]) | ||
| 11165 | m4_ifvaln([$3], [else | ||
| 11166 | $3])dnl | ||
| 11167 | fi]) | ||
| 11168 | |||
| 11169 | # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) | ||
| 11170 | # --------------------------------------------- | ||
| 11171 | m4_define([_PKG_CONFIG], | ||
| 11172 | [if test -n "$$1"; then | ||
| 11173 | pkg_cv_[]$1="$$1" | ||
| 11174 | elif test -n "$PKG_CONFIG"; then | ||
| 11175 | PKG_CHECK_EXISTS([$3], | ||
| 11176 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` | ||
| 11177 | test "x$?" != "x0" && pkg_failed=yes ], | ||
| 11178 | [pkg_failed=yes]) | ||
| 11179 | else | ||
| 11180 | pkg_failed=untried | ||
| 11181 | fi[]dnl | ||
| 11182 | ])# _PKG_CONFIG | ||
| 11183 | |||
| 11184 | # _PKG_SHORT_ERRORS_SUPPORTED | ||
| 11185 | # ----------------------------- | ||
| 11186 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], | ||
| 11187 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
| 11188 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | ||
| 11189 | _pkg_short_errors_supported=yes | ||
| 11190 | else | ||
| 11191 | _pkg_short_errors_supported=no | ||
| 11192 | fi[]dnl | ||
| 11193 | ])# _PKG_SHORT_ERRORS_SUPPORTED | ||
| 11194 | |||
| 11195 | |||
| 11196 | # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], | ||
| 11197 | # [ACTION-IF-NOT-FOUND]) | ||
| 11198 | # | ||
| 11199 | # | ||
| 11200 | # Note that if there is a possibility the first call to | ||
| 11201 | # PKG_CHECK_MODULES might not happen, you should be sure to include an | ||
| 11202 | # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac | ||
| 11203 | # | ||
| 11204 | # | ||
| 11205 | # -------------------------------------------------------------- | ||
| 11206 | AC_DEFUN([PKG_CHECK_MODULES], | ||
| 11207 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
| 11208 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl | ||
| 11209 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl | ||
| 11210 | |||
| 11211 | pkg_failed=no | ||
| 11212 | AC_MSG_CHECKING([for $1]) | ||
| 11213 | |||
| 11214 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) | ||
| 11215 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) | ||
| 11216 | |||
| 11217 | m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS | ||
| 11218 | and $1[]_LIBS to avoid the need to call pkg-config. | ||
| 11219 | See the pkg-config man page for more details.]) | ||
| 11220 | |||
| 11221 | if test $pkg_failed = yes; then | ||
| 11222 | AC_MSG_RESULT([no]) | ||
| 11223 | _PKG_SHORT_ERRORS_SUPPORTED | ||
| 11224 | if test $_pkg_short_errors_supported = yes; then | ||
| 11225 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` | ||
| 11226 | else | ||
| 11227 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` | ||
| 11228 | fi | ||
| 11229 | # Put the nasty error message in config.log where it belongs | ||
| 11230 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD | ||
| 11231 | |||
| 11232 | m4_default([$4], [AC_MSG_ERROR( | ||
| 11233 | [Package requirements ($2) were not met: | ||
| 11234 | |||
| 11235 | $$1_PKG_ERRORS | ||
| 11236 | |||
| 11237 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | ||
| 11238 | installed software in a non-standard prefix. | ||
| 11239 | |||
| 11240 | _PKG_TEXT])[]dnl | ||
| 11241 | ]) | ||
| 11242 | elif test $pkg_failed = untried; then | ||
| 11243 | AC_MSG_RESULT([no]) | ||
| 11244 | m4_default([$4], [AC_MSG_FAILURE( | ||
| 11245 | [The pkg-config script could not be found or is too old. Make sure it | ||
| 11246 | is in your PATH or set the PKG_CONFIG environment variable to the full | ||
| 11247 | path to pkg-config. | ||
| 11248 | |||
| 11249 | _PKG_TEXT | ||
| 11250 | |||
| 11251 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl | ||
| 11252 | ]) | ||
| 11253 | else | ||
| 11254 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS | ||
| 11255 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS | ||
| 11256 | AC_MSG_RESULT([yes]) | ||
| 11257 | $3 | ||
| 11258 | fi[]dnl | ||
| 11259 | ])# PKG_CHECK_MODULES | ||
| 11260 | |||
| 11261 | # Copyright (C) 2002-2013 Free Software Foundation, Inc. | ||
| 11262 | # | ||
| 11263 | # This file is free software; the Free Software Foundation | ||
| 11264 | # gives unlimited permission to copy and/or distribute it, | ||
| 11265 | # with or without modifications, as long as this notice is preserved. | ||
| 11266 | |||
| 11267 | # AM_AUTOMAKE_VERSION(VERSION) | ||
| 11268 | # ---------------------------- | ||
| 11269 | # Automake X.Y traces this macro to ensure aclocal.m4 has been | ||
| 11270 | # generated from the m4 files accompanying Automake X.Y. | ||
| 11271 | # (This private macro should not be called outside this file.) | ||
| 11272 | AC_DEFUN([AM_AUTOMAKE_VERSION], | ||
| 11273 | [am__api_version='1.14' | ||
| 11274 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to | ||
| 11275 | dnl require some minimum version. Point them to the right macro. | ||
| 11276 | m4_if([$1], [1.14.1], [], | ||
| 11277 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl | ||
| 11278 | ]) | ||
| 11279 | |||
| 11280 | # _AM_AUTOCONF_VERSION(VERSION) | ||
| 11281 | # ----------------------------- | ||
| 11282 | # aclocal traces this macro to find the Autoconf version. | ||
| 11283 | # This is a private macro too. Using m4_define simplifies | ||
| 11284 | # the logic in aclocal, which can simply ignore this definition. | ||
| 11285 | m4_define([_AM_AUTOCONF_VERSION], []) | ||
| 11286 | |||
| 11287 | # AM_SET_CURRENT_AUTOMAKE_VERSION | ||
| 11288 | # ------------------------------- | ||
| 11289 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. | ||
| 11290 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. | ||
| 11291 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], | ||
| 11292 | [AM_AUTOMAKE_VERSION([1.14.1])dnl | ||
| 11293 | m4_ifndef([AC_AUTOCONF_VERSION], | ||
| 11294 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | ||
| 11295 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) | ||
| 11296 | |||
| 11297 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- | ||
| 11298 | |||
| 11299 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. | ||
| 11300 | # | ||
| 11301 | # This file is free software; the Free Software Foundation | ||
| 11302 | # gives unlimited permission to copy and/or distribute it, | ||
| 11303 | # with or without modifications, as long as this notice is preserved. | ||
| 11304 | |||
| 11305 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets | ||
| 11306 | # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to | ||
| 11307 | # '$srcdir', '$srcdir/..', or '$srcdir/../..'. | ||
| 11308 | # | ||
| 11309 | # Of course, Automake must honor this variable whenever it calls a | ||
| 11310 | # tool from the auxiliary directory. The problem is that $srcdir (and | ||
| 11311 | # therefore $ac_aux_dir as well) can be either absolute or relative, | ||
| 11312 | # depending on how configure is run. This is pretty annoying, since | ||
| 11313 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top | ||
| 11314 | # source directory, any form will work fine, but in subdirectories a | ||
| 11315 | # relative path needs to be adjusted first. | ||
| 11316 | # | ||
| 11317 | # $ac_aux_dir/missing | ||
| 11318 | # fails when called from a subdirectory if $ac_aux_dir is relative | ||
| 11319 | # $top_srcdir/$ac_aux_dir/missing | ||
| 11320 | # fails if $ac_aux_dir is absolute, | ||
| 11321 | # fails when called from a subdirectory in a VPATH build with | ||
| 11322 | # a relative $ac_aux_dir | ||
| 11323 | # | ||
| 11324 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir | ||
| 11325 | # are both prefixed by $srcdir. In an in-source build this is usually | ||
| 11326 | # harmless because $srcdir is '.', but things will broke when you | ||
| 11327 | # start a VPATH build or use an absolute $srcdir. | ||
| 11328 | # | ||
| 11329 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, | ||
| 11330 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: | ||
| 11331 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` | ||
| 11332 | # and then we would define $MISSING as | ||
| 11333 | # MISSING="\${SHELL} $am_aux_dir/missing" | ||
| 11334 | # This will work as long as MISSING is not called from configure, because | ||
| 11335 | # unfortunately $(top_srcdir) has no meaning in configure. | ||
| 11336 | # However there are other variables, like CC, which are often used in | ||
| 11337 | # configure, and could therefore not use this "fixed" $ac_aux_dir. | ||
| 11338 | # | ||
| 11339 | # Another solution, used here, is to always expand $ac_aux_dir to an | ||
| 11340 | # absolute PATH. The drawback is that using absolute paths prevent a | ||
| 11341 | # configured tree to be moved without reconfiguration. | ||
| 11342 | |||
| 11343 | AC_DEFUN([AM_AUX_DIR_EXPAND], | ||
| 11344 | [dnl Rely on autoconf to set up CDPATH properly. | ||
| 11345 | AC_PREREQ([2.50])dnl | ||
| 11346 | # expand $ac_aux_dir to an absolute path | ||
| 11347 | am_aux_dir=`cd $ac_aux_dir && pwd` | ||
| 11348 | ]) | ||
| 11349 | |||
| 11350 | # AM_CONDITIONAL -*- Autoconf -*- | ||
| 11351 | |||
| 11352 | # Copyright (C) 1997-2013 Free Software Foundation, Inc. | ||
| 11353 | # | ||
| 11354 | # This file is free software; the Free Software Foundation | ||
| 11355 | # gives unlimited permission to copy and/or distribute it, | ||
| 11356 | # with or without modifications, as long as this notice is preserved. | ||
| 11357 | |||
| 11358 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) | ||
| 11359 | # ------------------------------------- | ||
| 11360 | # Define a conditional. | ||
| 11361 | AC_DEFUN([AM_CONDITIONAL], | ||
| 11362 | [AC_PREREQ([2.52])dnl | ||
| 11363 | m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], | ||
| 11364 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl | ||
| 11365 | AC_SUBST([$1_TRUE])dnl | ||
| 11366 | AC_SUBST([$1_FALSE])dnl | ||
| 11367 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl | ||
| 11368 | _AM_SUBST_NOTMAKE([$1_FALSE])dnl | ||
| 11369 | m4_define([_AM_COND_VALUE_$1], [$2])dnl | ||
| 11370 | if $2; then | ||
| 11371 | $1_TRUE= | ||
| 11372 | $1_FALSE='#' | ||
| 11373 | else | ||
| 11374 | $1_TRUE='#' | ||
| 11375 | $1_FALSE= | ||
| 11376 | fi | ||
| 11377 | AC_CONFIG_COMMANDS_PRE( | ||
| 11378 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then | ||
| 11379 | AC_MSG_ERROR([[conditional "$1" was never defined. | ||
| 11380 | Usually this means the macro was only invoked conditionally.]]) | ||
| 11381 | fi])]) | ||
| 11382 | |||
| 11383 | # Copyright (C) 1999-2013 Free Software Foundation, Inc. | ||
| 11384 | # | ||
| 11385 | # This file is free software; the Free Software Foundation | ||
| 11386 | # gives unlimited permission to copy and/or distribute it, | ||
| 11387 | # with or without modifications, as long as this notice is preserved. | ||
| 11388 | |||
| 11389 | |||
| 11390 | # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be | ||
| 11391 | # written in clear, in which case automake, when reading aclocal.m4, | ||
| 11392 | # will think it sees a *use*, and therefore will trigger all it's | ||
| 11393 | # C support machinery. Also note that it means that autoscan, seeing | ||
| 11394 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... | ||
| 11395 | |||
| 11396 | |||
| 11397 | # _AM_DEPENDENCIES(NAME) | ||
| 11398 | # ---------------------- | ||
| 11399 | # See how the compiler implements dependency checking. | ||
| 11400 | # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". | ||
| 11401 | # We try a few techniques and use that to set a single cache variable. | ||
| 11402 | # | ||
| 11403 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was | ||
| 11404 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular | ||
| 11405 | # dependency, and given that the user is not expected to run this macro, | ||
| 11406 | # just rely on AC_PROG_CC. | ||
| 11407 | AC_DEFUN([_AM_DEPENDENCIES], | ||
| 11408 | [AC_REQUIRE([AM_SET_DEPDIR])dnl | ||
| 11409 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl | ||
| 11410 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl | ||
| 11411 | AC_REQUIRE([AM_DEP_TRACK])dnl | ||
| 11412 | |||
| 11413 | m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], | ||
| 11414 | [$1], [CXX], [depcc="$CXX" am_compiler_list=], | ||
| 11415 | [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], | ||
| 11416 | [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], | ||
| 11417 | [$1], [UPC], [depcc="$UPC" am_compiler_list=], | ||
| 11418 | [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], | ||
| 11419 | [depcc="$$1" am_compiler_list=]) | ||
| 11420 | |||
| 11421 | AC_CACHE_CHECK([dependency style of $depcc], | ||
| 11422 | [am_cv_$1_dependencies_compiler_type], | ||
| 11423 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | ||
| 11424 | # We make a subdir and do the tests there. Otherwise we can end up | ||
| 11425 | # making bogus files that we don't know about and never remove. For | ||
| 11426 | # instance it was reported that on HP-UX the gcc test will end up | ||
| 11427 | # making a dummy file named 'D' -- because '-MD' means "put the output | ||
| 11428 | # in D". | ||
| 11429 | rm -rf conftest.dir | ||
| 11430 | mkdir conftest.dir | ||
| 11431 | # Copy depcomp to subdir because otherwise we won't find it if we're | ||
| 11432 | # using a relative directory. | ||
| 11433 | cp "$am_depcomp" conftest.dir | ||
| 11434 | cd conftest.dir | ||
| 11435 | # We will build objects and dependencies in a subdirectory because | ||
| 11436 | # it helps to detect inapplicable dependency modes. For instance | ||
| 11437 | # both Tru64's cc and ICC support -MD to output dependencies as a | ||
| 11438 | # side effect of compilation, but ICC will put the dependencies in | ||
| 11439 | # the current directory while Tru64 will put them in the object | ||
| 11440 | # directory. | ||
| 11441 | mkdir sub | ||
| 11442 | |||
| 11443 | am_cv_$1_dependencies_compiler_type=none | ||
| 11444 | if test "$am_compiler_list" = ""; then | ||
| 11445 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` | ||
| 11446 | fi | ||
| 11447 | am__universal=false | ||
| 11448 | m4_case([$1], [CC], | ||
| 11449 | [case " $depcc " in #( | ||
| 11450 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | ||
| 11451 | esac], | ||
| 11452 | [CXX], | ||
| 11453 | [case " $depcc " in #( | ||
| 11454 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | ||
| 11455 | esac]) | ||
| 11456 | |||
| 11457 | for depmode in $am_compiler_list; do | ||
| 11458 | # Setup a source with many dependencies, because some compilers | ||
| 11459 | # like to wrap large dependency lists on column 80 (with \), and | ||
| 11460 | # we should not choose a depcomp mode which is confused by this. | ||
| 11461 | # | ||
| 11462 | # We need to recreate these files for each test, as the compiler may | ||
| 11463 | # overwrite some of them when testing with obscure command lines. | ||
| 11464 | # This happens at least with the AIX C compiler. | ||
| 11465 | : > sub/conftest.c | ||
| 11466 | for i in 1 2 3 4 5 6; do | ||
| 11467 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | ||
| 11468 | # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with | ||
| 11469 | # Solaris 10 /bin/sh. | ||
| 11470 | echo '/* dummy */' > sub/conftst$i.h | ||
| 11471 | done | ||
| 11472 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | ||
| 11473 | |||
| 11474 | # We check with '-c' and '-o' for the sake of the "dashmstdout" | ||
| 11475 | # mode. It turns out that the SunPro C++ compiler does not properly | ||
| 11476 | # handle '-M -o', and we need to detect this. Also, some Intel | ||
| 11477 | # versions had trouble with output in subdirs. | ||
| 11478 | am__obj=sub/conftest.${OBJEXT-o} | ||
| 11479 | am__minus_obj="-o $am__obj" | ||
| 11480 | case $depmode in | ||
| 11481 | gcc) | ||
| 11482 | # This depmode causes a compiler race in universal mode. | ||
| 11483 | test "$am__universal" = false || continue | ||
| 11484 | ;; | ||
| 11485 | nosideeffect) | ||
| 11486 | # After this tag, mechanisms are not by side-effect, so they'll | ||
| 11487 | # only be used when explicitly requested. | ||
| 11488 | if test "x$enable_dependency_tracking" = xyes; then | ||
| 11489 | continue | ||
| 11490 | else | ||
| 11491 | break | ||
| 11492 | fi | ||
| 11493 | ;; | ||
| 11494 | msvc7 | msvc7msys | msvisualcpp | msvcmsys) | ||
| 11495 | # This compiler won't grok '-c -o', but also, the minuso test has | ||
| 11496 | # not run yet. These depmodes are late enough in the game, and | ||
| 11497 | # so weak that their functioning should not be impacted. | ||
| 11498 | am__obj=conftest.${OBJEXT-o} | ||
| 11499 | am__minus_obj= | ||
| 11500 | ;; | ||
| 11501 | none) break ;; | ||
| 11502 | esac | ||
| 11503 | if depmode=$depmode \ | ||
| 11504 | source=sub/conftest.c object=$am__obj \ | ||
| 11505 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | ||
| 11506 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | ||
| 11507 | >/dev/null 2>conftest.err && | ||
| 11508 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | ||
| 11509 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | ||
| 11510 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | ||
| 11511 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | ||
| 11512 | # icc doesn't choke on unknown options, it will just issue warnings | ||
| 11513 | # or remarks (even with -Werror). So we grep stderr for any message | ||
| 11514 | # that says an option was ignored or not supported. | ||
| 11515 | # When given -MP, icc 7.0 and 7.1 complain thusly: | ||
| 11516 | # icc: Command line warning: ignoring option '-M'; no argument required | ||
| 11517 | # The diagnosis changed in icc 8.0: | ||
| 11518 | # icc: Command line remark: option '-MP' not supported | ||
| 11519 | if (grep 'ignoring option' conftest.err || | ||
| 11520 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | ||
| 11521 | am_cv_$1_dependencies_compiler_type=$depmode | ||
| 11522 | break | ||
| 11523 | fi | ||
| 11524 | fi | ||
| 11525 | done | ||
| 11526 | |||
| 11527 | cd .. | ||
| 11528 | rm -rf conftest.dir | ||
| 11529 | else | ||
| 11530 | am_cv_$1_dependencies_compiler_type=none | ||
| 11531 | fi | ||
| 11532 | ]) | ||
| 11533 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) | ||
| 11534 | AM_CONDITIONAL([am__fastdep$1], [ | ||
| 11535 | test "x$enable_dependency_tracking" != xno \ | ||
| 11536 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) | ||
| 11537 | ]) | ||
| 11538 | |||
| 11539 | |||
| 11540 | # AM_SET_DEPDIR | ||
| 11541 | # ------------- | ||
| 11542 | # Choose a directory name for dependency files. | ||
| 11543 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES. | ||
| 11544 | AC_DEFUN([AM_SET_DEPDIR], | ||
| 11545 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl | ||
| 11546 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl | ||
| 11547 | ]) | ||
| 11548 | |||
| 11549 | |||
| 11550 | # AM_DEP_TRACK | ||
| 11551 | # ------------ | ||
| 11552 | AC_DEFUN([AM_DEP_TRACK], | ||
| 11553 | [AC_ARG_ENABLE([dependency-tracking], [dnl | ||
| 11554 | AS_HELP_STRING( | ||
| 11555 | [--enable-dependency-tracking], | ||
| 11556 | [do not reject slow dependency extractors]) | ||
| 11557 | AS_HELP_STRING( | ||
| 11558 | [--disable-dependency-tracking], | ||
| 11559 | [speeds up one-time build])]) | ||
| 11560 | if test "x$enable_dependency_tracking" != xno; then | ||
| 11561 | am_depcomp="$ac_aux_dir/depcomp" | ||
| 11562 | AMDEPBACKSLASH='\' | ||
| 11563 | am__nodep='_no' | ||
| 11564 | fi | ||
| 11565 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) | ||
| 11566 | AC_SUBST([AMDEPBACKSLASH])dnl | ||
| 11567 | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl | ||
| 11568 | AC_SUBST([am__nodep])dnl | ||
| 11569 | _AM_SUBST_NOTMAKE([am__nodep])dnl | ||
| 11570 | ]) | ||
| 11571 | |||
| 11572 | # Generate code to set up dependency tracking. -*- Autoconf -*- | ||
| 11573 | |||
| 11574 | # Copyright (C) 1999-2013 Free Software Foundation, Inc. | ||
| 11575 | # | ||
| 11576 | # This file is free software; the Free Software Foundation | ||
| 11577 | # gives unlimited permission to copy and/or distribute it, | ||
| 11578 | # with or without modifications, as long as this notice is preserved. | ||
| 11579 | |||
| 11580 | |||
| 11581 | # _AM_OUTPUT_DEPENDENCY_COMMANDS | ||
| 11582 | # ------------------------------ | ||
| 11583 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | ||
| 11584 | [{ | ||
| 11585 | # Older Autoconf quotes --file arguments for eval, but not when files | ||
| 11586 | # are listed without --file. Let's play safe and only enable the eval | ||
| 11587 | # if we detect the quoting. | ||
| 11588 | case $CONFIG_FILES in | ||
| 11589 | *\'*) eval set x "$CONFIG_FILES" ;; | ||
| 11590 | *) set x $CONFIG_FILES ;; | ||
| 11591 | esac | ||
| 11592 | shift | ||
| 11593 | for mf | ||
| 11594 | do | ||
| 11595 | # Strip MF so we end up with the name of the file. | ||
| 11596 | mf=`echo "$mf" | sed -e 's/:.*$//'` | ||
| 11597 | # Check whether this is an Automake generated Makefile or not. | ||
| 11598 | # We used to match only the files named 'Makefile.in', but | ||
| 11599 | # some people rename them; so instead we look at the file content. | ||
| 11600 | # Grep'ing the first line is not enough: some people post-process | ||
| 11601 | # each Makefile.in and add a new line on top of each file to say so. | ||
| 11602 | # Grep'ing the whole file is not good either: AIX grep has a line | ||
| 11603 | # limit of 2048, but all sed's we know have understand at least 4000. | ||
| 11604 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | ||
| 11605 | dirpart=`AS_DIRNAME("$mf")` | ||
| 11606 | else | ||
| 11607 | continue | ||
| 11608 | fi | ||
| 11609 | # Extract the definition of DEPDIR, am__include, and am__quote | ||
| 11610 | # from the Makefile without running 'make'. | ||
| 11611 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | ||
| 11612 | test -z "$DEPDIR" && continue | ||
| 11613 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | ||
| 11614 | test -z "$am__include" && continue | ||
| 11615 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | ||
| 11616 | # Find all dependency output files, they are included files with | ||
| 11617 | # $(DEPDIR) in their names. We invoke sed twice because it is the | ||
| 11618 | # simplest approach to changing $(DEPDIR) to its actual value in the | ||
| 11619 | # expansion. | ||
| 11620 | for file in `sed -n " | ||
| 11621 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | ||
| 11622 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do | ||
| 11623 | # Make sure the directory exists. | ||
| 11624 | test -f "$dirpart/$file" && continue | ||
| 11625 | fdir=`AS_DIRNAME(["$file"])` | ||
| 11626 | AS_MKDIR_P([$dirpart/$fdir]) | ||
| 11627 | # echo "creating $dirpart/$file" | ||
| 11628 | echo '# dummy' > "$dirpart/$file" | ||
| 11629 | done | ||
| 11630 | done | ||
| 11631 | } | ||
| 11632 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS | ||
| 11633 | |||
| 11634 | |||
| 11635 | # AM_OUTPUT_DEPENDENCY_COMMANDS | ||
| 11636 | # ----------------------------- | ||
| 11637 | # This macro should only be invoked once -- use via AC_REQUIRE. | ||
| 11638 | # | ||
| 11639 | # This code is only required when automatic dependency tracking | ||
| 11640 | # is enabled. FIXME. This creates each '.P' file that we will | ||
| 11641 | # need in order to bootstrap the dependency handling code. | ||
| 11642 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], | ||
| 11643 | [AC_CONFIG_COMMANDS([depfiles], | ||
| 11644 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], | ||
| 11645 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) | ||
| 11646 | ]) | ||
| 11647 | |||
| 11648 | # Do all the work for Automake. -*- Autoconf -*- | ||
| 11649 | |||
| 11650 | # Copyright (C) 1996-2013 Free Software Foundation, Inc. | ||
| 11651 | # | ||
| 11652 | # This file is free software; the Free Software Foundation | ||
| 11653 | # gives unlimited permission to copy and/or distribute it, | ||
| 11654 | # with or without modifications, as long as this notice is preserved. | ||
| 11655 | |||
| 11656 | # This macro actually does too much. Some checks are only needed if | ||
| 11657 | # your package does certain things. But this isn't really a big deal. | ||
| 11658 | |||
| 11659 | dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. | ||
| 11660 | m4_define([AC_PROG_CC], | ||
| 11661 | m4_defn([AC_PROG_CC]) | ||
| 11662 | [_AM_PROG_CC_C_O | ||
| 11663 | ]) | ||
| 11664 | |||
| 11665 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) | ||
| 11666 | # AM_INIT_AUTOMAKE([OPTIONS]) | ||
| 11667 | # ----------------------------------------------- | ||
| 11668 | # The call with PACKAGE and VERSION arguments is the old style | ||
| 11669 | # call (pre autoconf-2.50), which is being phased out. PACKAGE | ||
| 11670 | # and VERSION should now be passed to AC_INIT and removed from | ||
| 11671 | # the call to AM_INIT_AUTOMAKE. | ||
| 11672 | # We support both call styles for the transition. After | ||
| 11673 | # the next Automake release, Autoconf can make the AC_INIT | ||
| 11674 | # arguments mandatory, and then we can depend on a new Autoconf | ||
| 11675 | # release and drop the old call support. | ||
| 11676 | AC_DEFUN([AM_INIT_AUTOMAKE], | ||
| 11677 | [AC_PREREQ([2.65])dnl | ||
| 11678 | dnl Autoconf wants to disallow AM_ names. We explicitly allow | ||
| 11679 | dnl the ones we care about. | ||
| 11680 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl | ||
| 11681 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl | ||
| 11682 | AC_REQUIRE([AC_PROG_INSTALL])dnl | ||
| 11683 | if test "`cd $srcdir && pwd`" != "`pwd`"; then | ||
| 11684 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | ||
| 11685 | # is not polluted with repeated "-I." | ||
| 11686 | AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl | ||
| 11687 | # test to see if srcdir already configured | ||
| 11688 | if test -f $srcdir/config.status; then | ||
| 11689 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) | ||
| 11690 | fi | ||
| 11691 | fi | ||
| 11692 | |||
| 11693 | # test whether we have cygpath | ||
| 11694 | if test -z "$CYGPATH_W"; then | ||
| 11695 | if (cygpath --version) >/dev/null 2>/dev/null; then | ||
| 11696 | CYGPATH_W='cygpath -w' | ||
| 11697 | else | ||
| 11698 | CYGPATH_W=echo | ||
| 11699 | fi | ||
| 11700 | fi | ||
| 11701 | AC_SUBST([CYGPATH_W]) | ||
| 11702 | |||
| 11703 | # Define the identity of the package. | ||
| 11704 | dnl Distinguish between old-style and new-style calls. | ||
| 11705 | m4_ifval([$2], | ||
| 11706 | [AC_DIAGNOSE([obsolete], | ||
| 11707 | [$0: two- and three-arguments forms are deprecated.]) | ||
| 11708 | m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl | ||
| 11709 | AC_SUBST([PACKAGE], [$1])dnl | ||
| 11710 | AC_SUBST([VERSION], [$2])], | ||
| 11711 | [_AM_SET_OPTIONS([$1])dnl | ||
| 11712 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. | ||
| 11713 | m4_if( | ||
| 11714 | m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), | ||
| 11715 | [ok:ok],, | ||
| 11716 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl | ||
| 11717 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl | ||
| 11718 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl | ||
| 11719 | |||
| 11720 | _AM_IF_OPTION([no-define],, | ||
| 11721 | [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) | ||
| 11722 | AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl | ||
| 11723 | |||
| 11724 | # Some tools Automake needs. | ||
| 11725 | AC_REQUIRE([AM_SANITY_CHECK])dnl | ||
| 11726 | AC_REQUIRE([AC_ARG_PROGRAM])dnl | ||
| 11727 | AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) | ||
| 11728 | AM_MISSING_PROG([AUTOCONF], [autoconf]) | ||
| 11729 | AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) | ||
| 11730 | AM_MISSING_PROG([AUTOHEADER], [autoheader]) | ||
| 11731 | AM_MISSING_PROG([MAKEINFO], [makeinfo]) | ||
| 11732 | AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | ||
| 11733 | AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl | ||
| 11734 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl | ||
| 11735 | # For better backward compatibility. To be removed once Automake 1.9.x | ||
| 11736 | # dies out for good. For more background, see: | ||
| 11737 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | ||
| 11738 | # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | ||
| 11739 | AC_SUBST([mkdir_p], ['$(MKDIR_P)']) | ||
| 11740 | # We need awk for the "check" target. The system "awk" is bad on | ||
| 11741 | # some platforms. | ||
| 11742 | AC_REQUIRE([AC_PROG_AWK])dnl | ||
| 11743 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl | ||
| 11744 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl | ||
| 11745 | _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], | ||
| 11746 | [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], | ||
| 11747 | [_AM_PROG_TAR([v7])])]) | ||
| 11748 | _AM_IF_OPTION([no-dependencies],, | ||
| 11749 | [AC_PROVIDE_IFELSE([AC_PROG_CC], | ||
| 11750 | [_AM_DEPENDENCIES([CC])], | ||
| 11751 | [m4_define([AC_PROG_CC], | ||
| 11752 | m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl | ||
| 11753 | AC_PROVIDE_IFELSE([AC_PROG_CXX], | ||
| 11754 | [_AM_DEPENDENCIES([CXX])], | ||
| 11755 | [m4_define([AC_PROG_CXX], | ||
| 11756 | m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl | ||
| 11757 | AC_PROVIDE_IFELSE([AC_PROG_OBJC], | ||
| 11758 | [_AM_DEPENDENCIES([OBJC])], | ||
| 11759 | [m4_define([AC_PROG_OBJC], | ||
| 11760 | m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl | ||
| 11761 | AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], | ||
| 11762 | [_AM_DEPENDENCIES([OBJCXX])], | ||
| 11763 | [m4_define([AC_PROG_OBJCXX], | ||
| 11764 | m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl | ||
| 11765 | ]) | ||
| 11766 | AC_REQUIRE([AM_SILENT_RULES])dnl | ||
| 11767 | dnl The testsuite driver may need to know about EXEEXT, so add the | ||
| 11768 | dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This | ||
| 11769 | dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. | ||
| 11770 | AC_CONFIG_COMMANDS_PRE(dnl | ||
| 11771 | [m4_provide_if([_AM_COMPILER_EXEEXT], | ||
| 11772 | [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl | ||
| 11773 | |||
| 11774 | # POSIX will say in a future version that running "rm -f" with no argument | ||
| 11775 | # is OK; and we want to be able to make that assumption in our Makefile | ||
| 11776 | # recipes. So use an aggressive probe to check that the usage we want is | ||
| 11777 | # actually supported "in the wild" to an acceptable degree. | ||
| 11778 | # See automake bug#10828. | ||
| 11779 | # To make any issue more visible, cause the running configure to be aborted | ||
| 11780 | # by default if the 'rm' program in use doesn't match our expectations; the | ||
| 11781 | # user can still override this though. | ||
| 11782 | if rm -f && rm -fr && rm -rf; then : OK; else | ||
| 11783 | cat >&2 <<'END' | ||
| 11784 | Oops! | ||
| 11785 | |||
| 11786 | Your 'rm' program seems unable to run without file operands specified | ||
| 11787 | on the command line, even when the '-f' option is present. This is contrary | ||
| 11788 | to the behaviour of most rm programs out there, and not conforming with | ||
| 11789 | the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> | ||
| 11790 | |||
| 11791 | Please tell bug-automake@gnu.org about your system, including the value | ||
| 11792 | of your $PATH and any error possibly output before this message. This | ||
| 11793 | can help us improve future automake versions. | ||
| 11794 | |||
| 11795 | END | ||
| 11796 | if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then | ||
| 11797 | echo 'Configuration will proceed anyway, since you have set the' >&2 | ||
| 11798 | echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 | ||
| 11799 | echo >&2 | ||
| 11800 | else | ||
| 11801 | cat >&2 <<'END' | ||
| 11802 | Aborting the configuration process, to ensure you take notice of the issue. | ||
| 11803 | |||
| 11804 | You can download and install GNU coreutils to get an 'rm' implementation | ||
| 11805 | that behaves properly: <http://www.gnu.org/software/coreutils/>. | ||
| 11806 | |||
| 11807 | If you want to complete the configuration process using your problematic | ||
| 11808 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM | ||
| 11809 | to "yes", and re-run configure. | ||
| 11810 | |||
| 11811 | END | ||
| 11812 | AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) | ||
| 11813 | fi | ||
| 11814 | fi]) | ||
| 11815 | |||
| 11816 | dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not | ||
| 11817 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further | ||
| 11818 | dnl mangled by Autoconf and run in a shell conditional statement. | ||
| 11819 | m4_define([_AC_COMPILER_EXEEXT], | ||
| 11820 | m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) | ||
| 11821 | |||
| 11822 | # When config.status generates a header, we must update the stamp-h file. | ||
| 11823 | # This file resides in the same directory as the config header | ||
| 11824 | # that is generated. The stamp files are numbered to have different names. | ||
| 11825 | |||
| 11826 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the | ||
| 11827 | # loop where config.status creates the headers, so we can generate | ||
| 11828 | # our stamp files there. | ||
| 11829 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], | ||
| 11830 | [# Compute $1's index in $config_headers. | ||
| 11831 | _am_arg=$1 | ||
| 11832 | _am_stamp_count=1 | ||
| 11833 | for _am_header in $config_headers :; do | ||
| 11834 | case $_am_header in | ||
| 11835 | $_am_arg | $_am_arg:* ) | ||
| 11836 | break ;; | ||
| 11837 | * ) | ||
| 11838 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | ||
| 11839 | esac | ||
| 11840 | done | ||
| 11841 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) | ||
| 11842 | |||
| 11843 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. | ||
| 11844 | # | ||
| 11845 | # This file is free software; the Free Software Foundation | ||
| 11846 | # gives unlimited permission to copy and/or distribute it, | ||
| 11847 | # with or without modifications, as long as this notice is preserved. | ||
| 11848 | |||
| 11849 | # AM_PROG_INSTALL_SH | ||
| 11850 | # ------------------ | ||
| 11851 | # Define $install_sh. | ||
| 11852 | AC_DEFUN([AM_PROG_INSTALL_SH], | ||
| 11853 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | ||
| 11854 | if test x"${install_sh}" != xset; then | ||
| 11855 | case $am_aux_dir in | ||
| 11856 | *\ * | *\ *) | ||
| 11857 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | ||
| 11858 | *) | ||
| 11859 | install_sh="\${SHELL} $am_aux_dir/install-sh" | ||
| 11860 | esac | ||
| 11861 | fi | ||
| 11862 | AC_SUBST([install_sh])]) | ||
| 11863 | |||
| 11864 | # Copyright (C) 2003-2013 Free Software Foundation, Inc. | ||
| 11865 | # | ||
| 11866 | # This file is free software; the Free Software Foundation | ||
| 11867 | # gives unlimited permission to copy and/or distribute it, | ||
| 11868 | # with or without modifications, as long as this notice is preserved. | ||
| 11869 | |||
| 11870 | # Check whether the underlying file-system supports filenames | ||
| 11871 | # with a leading dot. For instance MS-DOS doesn't. | ||
| 11872 | AC_DEFUN([AM_SET_LEADING_DOT], | ||
| 11873 | [rm -rf .tst 2>/dev/null | ||
| 11874 | mkdir .tst 2>/dev/null | ||
| 11875 | if test -d .tst; then | ||
| 11876 | am__leading_dot=. | ||
| 11877 | else | ||
| 11878 | am__leading_dot=_ | ||
| 11879 | fi | ||
| 11880 | rmdir .tst 2>/dev/null | ||
| 11881 | AC_SUBST([am__leading_dot])]) | ||
| 11882 | |||
| 11883 | # Copyright (C) 1998-2013 Free Software Foundation, Inc. | ||
| 11884 | # | ||
| 11885 | # This file is free software; the Free Software Foundation | ||
| 11886 | # gives unlimited permission to copy and/or distribute it, | ||
| 11887 | # with or without modifications, as long as this notice is preserved. | ||
| 11888 | |||
| 11889 | # AM_PROG_LEX | ||
| 11890 | # ----------- | ||
| 11891 | # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a | ||
| 11892 | # "missing" invocation, for better error output. | ||
| 11893 | AC_DEFUN([AM_PROG_LEX], | ||
| 11894 | [AC_PREREQ([2.50])dnl | ||
| 11895 | AC_REQUIRE([AM_MISSING_HAS_RUN])dnl | ||
| 11896 | AC_REQUIRE([AC_PROG_LEX])dnl | ||
| 11897 | if test "$LEX" = :; then | ||
| 11898 | LEX=${am_missing_run}flex | ||
| 11899 | fi]) | ||
| 11900 | |||
| 11901 | # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- | ||
| 11902 | # From Jim Meyering | ||
| 11903 | |||
| 11904 | # Copyright (C) 1996-2013 Free Software Foundation, Inc. | ||
| 11905 | # | ||
| 11906 | # This file is free software; the Free Software Foundation | ||
| 11907 | # gives unlimited permission to copy and/or distribute it, | ||
| 11908 | # with or without modifications, as long as this notice is preserved. | ||
| 11909 | |||
| 11910 | # AM_MAINTAINER_MODE([DEFAULT-MODE]) | ||
| 11911 | # ---------------------------------- | ||
| 11912 | # Control maintainer-specific portions of Makefiles. | ||
| 11913 | # Default is to disable them, unless 'enable' is passed literally. | ||
| 11914 | # For symmetry, 'disable' may be passed as well. Anyway, the user | ||
| 11915 | # can override the default with the --enable/--disable switch. | ||
| 11916 | AC_DEFUN([AM_MAINTAINER_MODE], | ||
| 11917 | [m4_case(m4_default([$1], [disable]), | ||
| 11918 | [enable], [m4_define([am_maintainer_other], [disable])], | ||
| 11919 | [disable], [m4_define([am_maintainer_other], [enable])], | ||
| 11920 | [m4_define([am_maintainer_other], [enable]) | ||
| 11921 | m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) | ||
| 11922 | AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) | ||
| 11923 | dnl maintainer-mode's default is 'disable' unless 'enable' is passed | ||
| 11924 | AC_ARG_ENABLE([maintainer-mode], | ||
| 11925 | [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], | ||
| 11926 | am_maintainer_other[ make rules and dependencies not useful | ||
| 11927 | (and sometimes confusing) to the casual installer])], | ||
| 11928 | [USE_MAINTAINER_MODE=$enableval], | ||
| 11929 | [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) | ||
| 11930 | AC_MSG_RESULT([$USE_MAINTAINER_MODE]) | ||
| 11931 | AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) | ||
| 11932 | MAINT=$MAINTAINER_MODE_TRUE | ||
| 11933 | AC_SUBST([MAINT])dnl | ||
| 11934 | ] | ||
| 11935 | ) | ||
| 11936 | |||
| 11937 | # Check to see how 'make' treats includes. -*- Autoconf -*- | ||
| 11938 | |||
| 11939 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. | ||
| 11940 | # | ||
| 11941 | # This file is free software; the Free Software Foundation | ||
| 11942 | # gives unlimited permission to copy and/or distribute it, | ||
| 11943 | # with or without modifications, as long as this notice is preserved. | ||
| 11944 | |||
| 11945 | # AM_MAKE_INCLUDE() | ||
| 11946 | # ----------------- | ||
| 11947 | # Check to see how make treats includes. | ||
| 11948 | AC_DEFUN([AM_MAKE_INCLUDE], | ||
| 11949 | [am_make=${MAKE-make} | ||
| 11950 | cat > confinc << 'END' | ||
| 11951 | am__doit: | ||
| 11952 | @echo this is the am__doit target | ||
| 11953 | .PHONY: am__doit | ||
| 11954 | END | ||
| 11955 | # If we don't find an include directive, just comment out the code. | ||
| 11956 | AC_MSG_CHECKING([for style of include used by $am_make]) | ||
| 11957 | am__include="#" | ||
| 11958 | am__quote= | ||
| 11959 | _am_result=none | ||
| 11960 | # First try GNU make style include. | ||
| 11961 | echo "include confinc" > confmf | ||
| 11962 | # Ignore all kinds of additional output from 'make'. | ||
| 11963 | case `$am_make -s -f confmf 2> /dev/null` in #( | ||
| 11964 | *the\ am__doit\ target*) | ||
| 11965 | am__include=include | ||
| 11966 | am__quote= | ||
| 11967 | _am_result=GNU | ||
| 11968 | ;; | ||
| 11969 | esac | ||
| 11970 | # Now try BSD make style include. | ||
| 11971 | if test "$am__include" = "#"; then | ||
| 11972 | echo '.include "confinc"' > confmf | ||
| 11973 | case `$am_make -s -f confmf 2> /dev/null` in #( | ||
| 11974 | *the\ am__doit\ target*) | ||
| 11975 | am__include=.include | ||
| 11976 | am__quote="\"" | ||
| 11977 | _am_result=BSD | ||
| 11978 | ;; | ||
| 11979 | esac | ||
| 11980 | fi | ||
| 11981 | AC_SUBST([am__include]) | ||
| 11982 | AC_SUBST([am__quote]) | ||
| 11983 | AC_MSG_RESULT([$_am_result]) | ||
| 11984 | rm -f confinc confmf | ||
| 11985 | ]) | ||
| 11986 | |||
| 11987 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- | ||
| 11988 | |||
| 11989 | # Copyright (C) 1997-2013 Free Software Foundation, Inc. | ||
| 11990 | # | ||
| 11991 | # This file is free software; the Free Software Foundation | ||
| 11992 | # gives unlimited permission to copy and/or distribute it, | ||
| 11993 | # with or without modifications, as long as this notice is preserved. | ||
| 11994 | |||
| 11995 | # AM_MISSING_PROG(NAME, PROGRAM) | ||
| 11996 | # ------------------------------ | ||
| 11997 | AC_DEFUN([AM_MISSING_PROG], | ||
| 11998 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) | ||
| 11999 | $1=${$1-"${am_missing_run}$2"} | ||
| 12000 | AC_SUBST($1)]) | ||
| 12001 | |||
| 12002 | # AM_MISSING_HAS_RUN | ||
| 12003 | # ------------------ | ||
| 12004 | # Define MISSING if not defined so far and test if it is modern enough. | ||
| 12005 | # If it is, set am_missing_run to use it, otherwise, to nothing. | ||
| 12006 | AC_DEFUN([AM_MISSING_HAS_RUN], | ||
| 12007 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | ||
| 12008 | AC_REQUIRE_AUX_FILE([missing])dnl | ||
| 12009 | if test x"${MISSING+set}" != xset; then | ||
| 12010 | case $am_aux_dir in | ||
| 12011 | *\ * | *\ *) | ||
| 12012 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | ||
| 12013 | *) | ||
| 12014 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | ||
| 12015 | esac | ||
| 12016 | fi | ||
| 12017 | # Use eval to expand $SHELL | ||
| 12018 | if eval "$MISSING --is-lightweight"; then | ||
| 12019 | am_missing_run="$MISSING " | ||
| 12020 | else | ||
| 12021 | am_missing_run= | ||
| 12022 | AC_MSG_WARN(['missing' script is too old or missing]) | ||
| 12023 | fi | ||
| 12024 | ]) | ||
| 12025 | |||
| 12026 | # -*- Autoconf -*- | ||
| 12027 | # Obsolete and "removed" macros, that must however still report explicit | ||
| 12028 | # error messages when used, to smooth transition. | ||
| 12029 | # | ||
| 12030 | # Copyright (C) 1996-2013 Free Software Foundation, Inc. | ||
| 12031 | # | ||
| 12032 | # This file is free software; the Free Software Foundation | ||
| 12033 | # gives unlimited permission to copy and/or distribute it, | ||
| 12034 | # with or without modifications, as long as this notice is preserved. | ||
| 12035 | |||
| 12036 | AC_DEFUN([AM_CONFIG_HEADER], | ||
| 12037 | [AC_DIAGNOSE([obsolete], | ||
| 12038 | ['$0': this macro is obsolete. | ||
| 12039 | You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl | ||
| 12040 | AC_CONFIG_HEADERS($@)]) | ||
| 12041 | |||
| 12042 | AC_DEFUN([AM_PROG_CC_STDC], | ||
| 12043 | [AC_PROG_CC | ||
| 12044 | am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc | ||
| 12045 | AC_DIAGNOSE([obsolete], | ||
| 12046 | ['$0': this macro is obsolete. | ||
| 12047 | You should simply use the 'AC][_PROG_CC' macro instead. | ||
| 12048 | Also, your code should no longer depend upon 'am_cv_prog_cc_stdc', | ||
| 12049 | but upon 'ac_cv_prog_cc_stdc'.])]) | ||
| 12050 | |||
| 12051 | AC_DEFUN([AM_C_PROTOTYPES], | ||
| 12052 | [AC_FATAL([automatic de-ANSI-fication support has been removed])]) | ||
| 12053 | AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) | ||
| 12054 | |||
| 12055 | # Helper functions for option handling. -*- Autoconf -*- | ||
| 12056 | |||
| 12057 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. | ||
| 12058 | # | ||
| 12059 | # This file is free software; the Free Software Foundation | ||
| 12060 | # gives unlimited permission to copy and/or distribute it, | ||
| 12061 | # with or without modifications, as long as this notice is preserved. | ||
| 12062 | |||
| 12063 | # _AM_MANGLE_OPTION(NAME) | ||
| 12064 | # ----------------------- | ||
| 12065 | AC_DEFUN([_AM_MANGLE_OPTION], | ||
| 12066 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) | ||
| 12067 | |||
| 12068 | # _AM_SET_OPTION(NAME) | ||
| 12069 | # -------------------- | ||
| 12070 | # Set option NAME. Presently that only means defining a flag for this option. | ||
| 12071 | AC_DEFUN([_AM_SET_OPTION], | ||
| 12072 | [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) | ||
| 12073 | |||
| 12074 | # _AM_SET_OPTIONS(OPTIONS) | ||
| 12075 | # ------------------------ | ||
| 12076 | # OPTIONS is a space-separated list of Automake options. | ||
| 12077 | AC_DEFUN([_AM_SET_OPTIONS], | ||
| 12078 | [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) | ||
| 12079 | |||
| 12080 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) | ||
| 12081 | # ------------------------------------------- | ||
| 12082 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. | ||
| 12083 | AC_DEFUN([_AM_IF_OPTION], | ||
| 12084 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) | ||
| 12085 | |||
| 12086 | # Copyright (C) 1999-2013 Free Software Foundation, Inc. | ||
| 12087 | # | ||
| 12088 | # This file is free software; the Free Software Foundation | ||
| 12089 | # gives unlimited permission to copy and/or distribute it, | ||
| 12090 | # with or without modifications, as long as this notice is preserved. | ||
| 12091 | |||
| 12092 | # _AM_PROG_CC_C_O | ||
| 12093 | # --------------- | ||
| 12094 | # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC | ||
| 12095 | # to automatically call this. | ||
| 12096 | AC_DEFUN([_AM_PROG_CC_C_O], | ||
| 12097 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | ||
| 12098 | AC_REQUIRE_AUX_FILE([compile])dnl | ||
| 12099 | AC_LANG_PUSH([C])dnl | ||
| 12100 | AC_CACHE_CHECK( | ||
| 12101 | [whether $CC understands -c and -o together], | ||
| 12102 | [am_cv_prog_cc_c_o], | ||
| 12103 | [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) | ||
| 12104 | # Make sure it works both with $CC and with simple cc. | ||
| 12105 | # Following AC_PROG_CC_C_O, we do the test twice because some | ||
| 12106 | # compilers refuse to overwrite an existing .o file with -o, | ||
| 12107 | # though they will create one. | ||
| 12108 | am_cv_prog_cc_c_o=yes | ||
| 12109 | for am_i in 1 2; do | ||
| 12110 | if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ | ||
| 12111 | && test -f conftest2.$ac_objext; then | ||
| 12112 | : OK | ||
| 12113 | else | ||
| 12114 | am_cv_prog_cc_c_o=no | ||
| 12115 | break | ||
| 12116 | fi | ||
| 12117 | done | ||
| 12118 | rm -f core conftest* | ||
| 12119 | unset am_i]) | ||
| 12120 | if test "$am_cv_prog_cc_c_o" != yes; then | ||
| 12121 | # Losing compiler, so override with the script. | ||
| 12122 | # FIXME: It is wrong to rewrite CC. | ||
| 12123 | # But if we don't then we get into trouble of one sort or another. | ||
| 12124 | # A longer-term fix would be to have automake use am__CC in this case, | ||
| 12125 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | ||
| 12126 | CC="$am_aux_dir/compile $CC" | ||
| 12127 | fi | ||
| 12128 | AC_LANG_POP([C])]) | ||
| 12129 | |||
| 12130 | # For backward compatibility. | ||
| 12131 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) | ||
| 12132 | |||
| 12133 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. | ||
| 12134 | # | ||
| 12135 | # This file is free software; the Free Software Foundation | ||
| 12136 | # gives unlimited permission to copy and/or distribute it, | ||
| 12137 | # with or without modifications, as long as this notice is preserved. | ||
| 12138 | |||
| 12139 | # AM_RUN_LOG(COMMAND) | ||
| 12140 | # ------------------- | ||
| 12141 | # Run COMMAND, save the exit status in ac_status, and log it. | ||
| 12142 | # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) | ||
| 12143 | AC_DEFUN([AM_RUN_LOG], | ||
| 12144 | [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD | ||
| 12145 | ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD | ||
| 12146 | ac_status=$? | ||
| 12147 | echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | ||
| 12148 | (exit $ac_status); }]) | ||
| 12149 | |||
| 12150 | # Check to make sure that the build environment is sane. -*- Autoconf -*- | ||
| 12151 | |||
| 12152 | # Copyright (C) 1996-2013 Free Software Foundation, Inc. | ||
| 12153 | # | ||
| 12154 | # This file is free software; the Free Software Foundation | ||
| 12155 | # gives unlimited permission to copy and/or distribute it, | ||
| 12156 | # with or without modifications, as long as this notice is preserved. | ||
| 12157 | |||
| 12158 | # AM_SANITY_CHECK | ||
| 12159 | # --------------- | ||
| 12160 | AC_DEFUN([AM_SANITY_CHECK], | ||
| 12161 | [AC_MSG_CHECKING([whether build environment is sane]) | ||
| 12162 | # Reject unsafe characters in $srcdir or the absolute working directory | ||
| 12163 | # name. Accept space and tab only in the latter. | ||
| 12164 | am_lf=' | ||
| 12165 | ' | ||
| 12166 | case `pwd` in | ||
| 12167 | *[[\\\"\#\$\&\'\`$am_lf]]*) | ||
| 12168 | AC_MSG_ERROR([unsafe absolute working directory name]);; | ||
| 12169 | esac | ||
| 12170 | case $srcdir in | ||
| 12171 | *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) | ||
| 12172 | AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; | ||
| 12173 | esac | ||
| 12174 | |||
| 12175 | # Do 'set' in a subshell so we don't clobber the current shell's | ||
| 12176 | # arguments. Must try -L first in case configure is actually a | ||
| 12177 | # symlink; some systems play weird games with the mod time of symlinks | ||
| 12178 | # (eg FreeBSD returns the mod time of the symlink's containing | ||
| 12179 | # directory). | ||
| 12180 | if ( | ||
| 12181 | am_has_slept=no | ||
| 12182 | for am_try in 1 2; do | ||
| 12183 | echo "timestamp, slept: $am_has_slept" > conftest.file | ||
| 12184 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | ||
| 12185 | if test "$[*]" = "X"; then | ||
| 12186 | # -L didn't work. | ||
| 12187 | set X `ls -t "$srcdir/configure" conftest.file` | ||
| 12188 | fi | ||
| 12189 | if test "$[*]" != "X $srcdir/configure conftest.file" \ | ||
| 12190 | && test "$[*]" != "X conftest.file $srcdir/configure"; then | ||
| 12191 | |||
| 12192 | # If neither matched, then we have a broken ls. This can happen | ||
| 12193 | # if, for instance, CONFIG_SHELL is bash and it inherits a | ||
| 12194 | # broken ls alias from the environment. This has actually | ||
| 12195 | # happened. Such a system could not be considered "sane". | ||
| 12196 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken | ||
| 12197 | alias in your environment]) | ||
| 12198 | fi | ||
| 12199 | if test "$[2]" = conftest.file || test $am_try -eq 2; then | ||
| 12200 | break | ||
| 12201 | fi | ||
| 12202 | # Just in case. | ||
| 12203 | sleep 1 | ||
| 12204 | am_has_slept=yes | ||
| 12205 | done | ||
| 12206 | test "$[2]" = conftest.file | ||
| 12207 | ) | ||
| 12208 | then | ||
| 12209 | # Ok. | ||
| 12210 | : | ||
| 12211 | else | ||
| 12212 | AC_MSG_ERROR([newly created file is older than distributed files! | ||
| 12213 | Check your system clock]) | ||
| 12214 | fi | ||
| 12215 | AC_MSG_RESULT([yes]) | ||
| 12216 | # If we didn't sleep, we still need to ensure time stamps of config.status and | ||
| 12217 | # generated files are strictly newer. | ||
| 12218 | am_sleep_pid= | ||
| 12219 | if grep 'slept: no' conftest.file >/dev/null 2>&1; then | ||
| 12220 | ( sleep 1 ) & | ||
| 12221 | am_sleep_pid=$! | ||
| 12222 | fi | ||
| 12223 | AC_CONFIG_COMMANDS_PRE( | ||
| 12224 | [AC_MSG_CHECKING([that generated files are newer than configure]) | ||
| 12225 | if test -n "$am_sleep_pid"; then | ||
| 12226 | # Hide warnings about reused PIDs. | ||
| 12227 | wait $am_sleep_pid 2>/dev/null | ||
| 12228 | fi | ||
| 12229 | AC_MSG_RESULT([done])]) | ||
| 12230 | rm -f conftest.file | ||
| 12231 | ]) | ||
| 12232 | |||
| 12233 | # Copyright (C) 2009-2013 Free Software Foundation, Inc. | ||
| 12234 | # | ||
| 12235 | # This file is free software; the Free Software Foundation | ||
| 12236 | # gives unlimited permission to copy and/or distribute it, | ||
| 12237 | # with or without modifications, as long as this notice is preserved. | ||
| 12238 | |||
| 12239 | # AM_SILENT_RULES([DEFAULT]) | ||
| 12240 | # -------------------------- | ||
| 12241 | # Enable less verbose build rules; with the default set to DEFAULT | ||
| 12242 | # ("yes" being less verbose, "no" or empty being verbose). | ||
| 12243 | AC_DEFUN([AM_SILENT_RULES], | ||
| 12244 | [AC_ARG_ENABLE([silent-rules], [dnl | ||
| 12245 | AS_HELP_STRING( | ||
| 12246 | [--enable-silent-rules], | ||
| 12247 | [less verbose build output (undo: "make V=1")]) | ||
| 12248 | AS_HELP_STRING( | ||
| 12249 | [--disable-silent-rules], | ||
| 12250 | [verbose build output (undo: "make V=0")])dnl | ||
| 12251 | ]) | ||
| 12252 | case $enable_silent_rules in @%:@ ((( | ||
| 12253 | yes) AM_DEFAULT_VERBOSITY=0;; | ||
| 12254 | no) AM_DEFAULT_VERBOSITY=1;; | ||
| 12255 | *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; | ||
| 12256 | esac | ||
| 12257 | dnl | ||
| 12258 | dnl A few 'make' implementations (e.g., NonStop OS and NextStep) | ||
| 12259 | dnl do not support nested variable expansions. | ||
| 12260 | dnl See automake bug#9928 and bug#10237. | ||
| 12261 | am_make=${MAKE-make} | ||
| 12262 | AC_CACHE_CHECK([whether $am_make supports nested variables], | ||
| 12263 | [am_cv_make_support_nested_variables], | ||
| 12264 | [if AS_ECHO([['TRUE=$(BAR$(V)) | ||
| 12265 | BAR0=false | ||
| 12266 | BAR1=true | ||
| 12267 | V=1 | ||
| 12268 | am__doit: | ||
| 12269 | @$(TRUE) | ||
| 12270 | .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then | ||
| 12271 | am_cv_make_support_nested_variables=yes | ||
| 12272 | else | ||
| 12273 | am_cv_make_support_nested_variables=no | ||
| 12274 | fi]) | ||
| 12275 | if test $am_cv_make_support_nested_variables = yes; then | ||
| 12276 | dnl Using '$V' instead of '$(V)' breaks IRIX make. | ||
| 12277 | AM_V='$(V)' | ||
| 12278 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | ||
| 12279 | else | ||
| 12280 | AM_V=$AM_DEFAULT_VERBOSITY | ||
| 12281 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY | ||
| 12282 | fi | ||
| 12283 | AC_SUBST([AM_V])dnl | ||
| 12284 | AM_SUBST_NOTMAKE([AM_V])dnl | ||
| 12285 | AC_SUBST([AM_DEFAULT_V])dnl | ||
| 12286 | AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl | ||
| 12287 | AC_SUBST([AM_DEFAULT_VERBOSITY])dnl | ||
| 12288 | AM_BACKSLASH='\' | ||
| 12289 | AC_SUBST([AM_BACKSLASH])dnl | ||
| 12290 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl | ||
| 12291 | ]) | ||
| 12292 | |||
| 12293 | # Copyright (C) 2001-2013 Free Software Foundation, Inc. | ||
| 12294 | # | ||
| 12295 | # This file is free software; the Free Software Foundation | ||
| 12296 | # gives unlimited permission to copy and/or distribute it, | ||
| 12297 | # with or without modifications, as long as this notice is preserved. | ||
| 12298 | |||
| 12299 | # AM_PROG_INSTALL_STRIP | ||
| 12300 | # --------------------- | ||
| 12301 | # One issue with vendor 'install' (even GNU) is that you can't | ||
| 12302 | # specify the program used to strip binaries. This is especially | ||
| 12303 | # annoying in cross-compiling environments, where the build's strip | ||
| 12304 | # is unlikely to handle the host's binaries. | ||
| 12305 | # Fortunately install-sh will honor a STRIPPROG variable, so we | ||
| 12306 | # always use install-sh in "make install-strip", and initialize | ||
| 12307 | # STRIPPROG with the value of the STRIP variable (set by the user). | ||
| 12308 | AC_DEFUN([AM_PROG_INSTALL_STRIP], | ||
| 12309 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | ||
| 12310 | # Installed binaries are usually stripped using 'strip' when the user | ||
| 12311 | # run "make install-strip". However 'strip' might not be the right | ||
| 12312 | # tool to use in cross-compilation environments, therefore Automake | ||
| 12313 | # will honor the 'STRIP' environment variable to overrule this program. | ||
| 12314 | dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. | ||
| 12315 | if test "$cross_compiling" != no; then | ||
| 12316 | AC_CHECK_TOOL([STRIP], [strip], :) | ||
| 12317 | fi | ||
| 12318 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | ||
| 12319 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) | ||
| 12320 | |||
| 12321 | # Copyright (C) 2006-2013 Free Software Foundation, Inc. | ||
| 12322 | # | ||
| 12323 | # This file is free software; the Free Software Foundation | ||
| 12324 | # gives unlimited permission to copy and/or distribute it, | ||
| 12325 | # with or without modifications, as long as this notice is preserved. | ||
| 12326 | |||
| 12327 | # _AM_SUBST_NOTMAKE(VARIABLE) | ||
| 12328 | # --------------------------- | ||
| 12329 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. | ||
| 12330 | # This macro is traced by Automake. | ||
| 12331 | AC_DEFUN([_AM_SUBST_NOTMAKE]) | ||
| 12332 | |||
| 12333 | # AM_SUBST_NOTMAKE(VARIABLE) | ||
| 12334 | # -------------------------- | ||
| 12335 | # Public sister of _AM_SUBST_NOTMAKE. | ||
| 12336 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) | ||
| 12337 | |||
| 12338 | # Check how to create a tarball. -*- Autoconf -*- | ||
| 12339 | |||
| 12340 | # Copyright (C) 2004-2013 Free Software Foundation, Inc. | ||
| 12341 | # | ||
| 12342 | # This file is free software; the Free Software Foundation | ||
| 12343 | # gives unlimited permission to copy and/or distribute it, | ||
| 12344 | # with or without modifications, as long as this notice is preserved. | ||
| 12345 | |||
| 12346 | # _AM_PROG_TAR(FORMAT) | ||
| 12347 | # -------------------- | ||
| 12348 | # Check how to create a tarball in format FORMAT. | ||
| 12349 | # FORMAT should be one of 'v7', 'ustar', or 'pax'. | ||
| 12350 | # | ||
| 12351 | # Substitute a variable $(am__tar) that is a command | ||
| 12352 | # writing to stdout a FORMAT-tarball containing the directory | ||
| 12353 | # $tardir. | ||
| 12354 | # tardir=directory && $(am__tar) > result.tar | ||
| 12355 | # | ||
| 12356 | # Substitute a variable $(am__untar) that extract such | ||
| 12357 | # a tarball read from stdin. | ||
| 12358 | # $(am__untar) < result.tar | ||
| 12359 | # | ||
| 12360 | AC_DEFUN([_AM_PROG_TAR], | ||
| 12361 | [# Always define AMTAR for backward compatibility. Yes, it's still used | ||
| 12362 | # in the wild :-( We should find a proper way to deprecate it ... | ||
| 12363 | AC_SUBST([AMTAR], ['$${TAR-tar}']) | ||
| 12364 | |||
| 12365 | # We'll loop over all known methods to create a tar archive until one works. | ||
| 12366 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' | ||
| 12367 | |||
| 12368 | m4_if([$1], [v7], | ||
| 12369 | [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], | ||
| 12370 | |||
| 12371 | [m4_case([$1], | ||
| 12372 | [ustar], | ||
| 12373 | [# The POSIX 1988 'ustar' format is defined with fixed-size fields. | ||
| 12374 | # There is notably a 21 bits limit for the UID and the GID. In fact, | ||
| 12375 | # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 | ||
| 12376 | # and bug#13588). | ||
| 12377 | am_max_uid=2097151 # 2^21 - 1 | ||
| 12378 | am_max_gid=$am_max_uid | ||
| 12379 | # The $UID and $GID variables are not portable, so we need to resort | ||
| 12380 | # to the POSIX-mandated id(1) utility. Errors in the 'id' calls | ||
| 12381 | # below are definitely unexpected, so allow the users to see them | ||
| 12382 | # (that is, avoid stderr redirection). | ||
| 12383 | am_uid=`id -u || echo unknown` | ||
| 12384 | am_gid=`id -g || echo unknown` | ||
| 12385 | AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) | ||
| 12386 | if test $am_uid -le $am_max_uid; then | ||
| 12387 | AC_MSG_RESULT([yes]) | ||
| 12388 | else | ||
| 12389 | AC_MSG_RESULT([no]) | ||
| 12390 | _am_tools=none | ||
| 12391 | fi | ||
| 12392 | AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) | ||
| 12393 | if test $am_gid -le $am_max_gid; then | ||
| 12394 | AC_MSG_RESULT([yes]) | ||
| 12395 | else | ||
| 12396 | AC_MSG_RESULT([no]) | ||
| 12397 | _am_tools=none | ||
| 12398 | fi], | ||
| 12399 | |||
| 12400 | [pax], | ||
| 12401 | [], | ||
| 12402 | |||
| 12403 | [m4_fatal([Unknown tar format])]) | ||
| 12404 | |||
| 12405 | AC_MSG_CHECKING([how to create a $1 tar archive]) | ||
| 12406 | |||
| 12407 | # Go ahead even if we have the value already cached. We do so because we | ||
| 12408 | # need to set the values for the 'am__tar' and 'am__untar' variables. | ||
| 12409 | _am_tools=${am_cv_prog_tar_$1-$_am_tools} | ||
| 12410 | |||
| 12411 | for _am_tool in $_am_tools; do | ||
| 12412 | case $_am_tool in | ||
| 12413 | gnutar) | ||
| 12414 | for _am_tar in tar gnutar gtar; do | ||
| 12415 | AM_RUN_LOG([$_am_tar --version]) && break | ||
| 12416 | done | ||
| 12417 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' | ||
| 12418 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' | ||
| 12419 | am__untar="$_am_tar -xf -" | ||
| 12420 | ;; | ||
| 12421 | plaintar) | ||
| 12422 | # Must skip GNU tar: if it does not support --format= it doesn't create | ||
| 12423 | # ustar tarball either. | ||
| 12424 | (tar --version) >/dev/null 2>&1 && continue | ||
| 12425 | am__tar='tar chf - "$$tardir"' | ||
| 12426 | am__tar_='tar chf - "$tardir"' | ||
| 12427 | am__untar='tar xf -' | ||
| 12428 | ;; | ||
| 12429 | pax) | ||
| 12430 | am__tar='pax -L -x $1 -w "$$tardir"' | ||
| 12431 | am__tar_='pax -L -x $1 -w "$tardir"' | ||
| 12432 | am__untar='pax -r' | ||
| 12433 | ;; | ||
| 12434 | cpio) | ||
| 12435 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L' | ||
| 12436 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L' | ||
| 12437 | am__untar='cpio -i -H $1 -d' | ||
| 12438 | ;; | ||
| 12439 | none) | ||
| 12440 | am__tar=false | ||
| 12441 | am__tar_=false | ||
| 12442 | am__untar=false | ||
| 12443 | ;; | ||
| 12444 | esac | ||
| 12445 | |||
| 12446 | # If the value was cached, stop now. We just wanted to have am__tar | ||
| 12447 | # and am__untar set. | ||
| 12448 | test -n "${am_cv_prog_tar_$1}" && break | ||
| 12449 | |||
| 12450 | # tar/untar a dummy directory, and stop if the command works. | ||
| 12451 | rm -rf conftest.dir | ||
| 12452 | mkdir conftest.dir | ||
| 12453 | echo GrepMe > conftest.dir/file | ||
| 12454 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) | ||
| 12455 | rm -rf conftest.dir | ||
| 12456 | if test -s conftest.tar; then | ||
| 12457 | AM_RUN_LOG([$am__untar <conftest.tar]) | ||
| 12458 | AM_RUN_LOG([cat conftest.dir/file]) | ||
| 12459 | grep GrepMe conftest.dir/file >/dev/null 2>&1 && break | ||
| 12460 | fi | ||
| 12461 | done | ||
| 12462 | rm -rf conftest.dir | ||
| 12463 | |||
| 12464 | AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) | ||
| 12465 | AC_MSG_RESULT([$am_cv_prog_tar_$1])]) | ||
| 12466 | |||
| 12467 | AC_SUBST([am__tar]) | ||
| 12468 | AC_SUBST([am__untar]) | ||
| 12469 | ]) # _AM_PROG_TAR | ||
| 12470 | |||
| 12471 | m4_include([ac/aclocal-include.m4]) | ||
| 12472 | m4_include([ac/gnupg-check-typedef.m4]) | ||
