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