1dnl 2dnl $Id: acinclude.m4 308352 2011-02-15 08:28:22Z pajoye $ 3dnl 4dnl This file contains local autoconf functions. 5dnl 6 7dnl ------------------------------------------------------------------------- 8dnl Output stylize macros for configure (help/runtime) 9dnl ------------------------------------------------------------------------- 10 11dnl 12dnl PHP_HELP_SEPARATOR(title) 13dnl 14dnl Adds separator title into the configure --help display. 15dnl 16AC_DEFUN([PHP_HELP_SEPARATOR],[ 17AC_ARG_ENABLE([],[ 18$1 19],[]) 20]) 21 22dnl 23dnl PHP_CONFIGURE_PART(title) 24dnl 25dnl Adds separator title configure output (idea borrowed from mm) 26dnl 27AC_DEFUN([PHP_CONFIGURE_PART],[ 28 AC_MSG_RESULT() 29 AC_MSG_RESULT([${T_MD}$1${T_ME}]) 30]) 31 32dnl ------------------------------------------------------------------------- 33dnl Build system helper macros 34dnl ------------------------------------------------------------------------- 35 36dnl 37dnl PHP_DEF_HAVE(what) 38dnl 39dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [ ])' 40dnl 41AC_DEFUN([PHP_DEF_HAVE],[AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___), 1, [ ])]) 42 43dnl 44dnl PHP_RUN_ONCE(namespace, variable, code) 45dnl 46dnl execute code, if variable is not set in namespace 47dnl 48AC_DEFUN([PHP_RUN_ONCE],[ 49 changequote({,}) 50 unique=`echo $2|$SED 's/[^a-zA-Z0-9]/_/g'` 51 changequote([,]) 52 cmd="echo $ac_n \"\$$1$unique$ac_c\"" 53 if test -n "$unique" && test "`eval $cmd`" = "" ; then 54 eval "$1$unique=set" 55 $3 56 fi 57]) 58 59dnl 60dnl PHP_EXPAND_PATH(path, variable) 61dnl 62dnl expands path to an absolute path and assigns it to variable 63dnl 64AC_DEFUN([PHP_EXPAND_PATH],[ 65 if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then 66 $2=$1 67 else 68 changequote({,}) 69 ep_dir="`echo $1|$SED 's%/*[^/][^/]*/*$%%'`" 70 changequote([,]) 71 ep_realdir="`(cd \"$ep_dir\" && pwd)`" 72 $2="$ep_realdir/`basename \"$1\"`" 73 fi 74]) 75 76dnl 77dnl PHP_DEFINE(WHAT [, value[, directory]]) 78dnl 79dnl Creates builddir/include/what.h and in there #define WHAT value 80dnl 81AC_DEFUN([PHP_DEFINE],[ 82 [echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h] 83]) 84 85dnl 86dnl PHP_SUBST(varname) 87dnl 88dnl Adds variable with it's value into Makefile, e.g.: 89dnl CC = gcc 90dnl 91AC_DEFUN([PHP_SUBST],[ 92 PHP_VAR_SUBST="$PHP_VAR_SUBST $1" 93]) 94 95dnl 96dnl PHP_SUBST_OLD(varname) 97dnl 98dnl Same as PHP_SUBST() but also substitutes all @VARNAME@ 99dnl instances in every file passed to AC_OUTPUT() 100dnl 101AC_DEFUN([PHP_SUBST_OLD],[ 102 PHP_SUBST($1) 103 AC_SUBST($1) 104]) 105 106dnl 107dnl PHP_OUTPUT(file) 108dnl 109dnl Adds "file" to the list of files generated by AC_OUTPUT 110dnl This macro can be used several times. 111dnl 112AC_DEFUN([PHP_OUTPUT],[ 113 PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1" 114]) 115 116 117dnl ------------------------------------------------------------------------- 118dnl Build system base macros 119dnl ------------------------------------------------------------------------- 120 121dnl 122dnl PHP_CANONICAL_HOST_TARGET 123dnl 124AC_DEFUN([PHP_CANONICAL_HOST_TARGET],[ 125 AC_REQUIRE([AC_CANONICAL_HOST])dnl 126 AC_REQUIRE([AC_CANONICAL_TARGET])dnl 127 dnl Make sure we do not continue if host_alias is empty. 128 if test -z "$host_alias" && test -n "$host"; then 129 host_alias=$host 130 fi 131 if test -z "$host_alias"; then 132 AC_MSG_ERROR([host_alias is not set!]) 133 fi 134]) 135 136dnl 137dnl PHP_INIT_BUILD_SYSTEM 138dnl 139AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[ 140AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl 141test -d include || $php_shtool mkdir include 142> Makefile.objects 143> Makefile.fragments 144dnl We need to play tricks here to avoid matching the grep line itself 145pattern=define 146$EGREP $pattern'.*include/php' $srcdir/configure|$SED 's/.*>//'|xargs touch 2>/dev/null 147]) 148 149dnl 150dnl PHP_GEN_GLOBAL_MAKEFILE 151dnl 152dnl Generates the global makefile. 153dnl 154AC_DEFUN([PHP_GEN_GLOBAL_MAKEFILE],[ 155 cat >Makefile <<EOF 156srcdir = $abs_srcdir 157builddir = $abs_builddir 158top_srcdir = $abs_srcdir 159top_builddir = $abs_builddir 160EOF 161 for i in $PHP_VAR_SUBST; do 162 eval echo "$i = \$$i" >> Makefile 163 done 164 165 cat $abs_srcdir/Makefile.global Makefile.fragments Makefile.objects >> Makefile 166]) 167 168dnl 169dnl PHP_ADD_MAKEFILE_FRAGMENT([srcfile [, ext_srcdir [, ext_builddir]]]) 170dnl 171dnl Processes a file called Makefile.frag in the source directory 172dnl of the most recently added extension. $(srcdir) and $(builddir) 173dnl are substituted with the proper paths. Can be used to supply 174dnl custom rules and/or additional targets. 175dnl 176AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[ 177 ifelse($1,,src=$ext_srcdir/Makefile.frag,src=$1) 178 ifelse($2,,ac_srcdir=$ext_srcdir,ac_srcdir=$2) 179 ifelse($3,,ac_builddir=$ext_builddir,ac_builddir=$3) 180 test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments 181]) 182 183dnl 184dnl PHP_ADD_SOURCES(source-path, sources [, special-flags [, type]]) 185dnl 186dnl Adds sources which are located relative to source-path to the 187dnl array of type type. Sources are processed with optional 188dnl special-flags which are passed to the compiler. Sources 189dnl can be either written in C or C++ (filenames shall end in .c 190dnl or .cpp, respectively). 191dnl 192dnl Note: If source-path begins with a "/", the "/" is removed and 193dnl the path is interpreted relative to the top build-directory. 194dnl 195dnl which array to append to? 196AC_DEFUN([PHP_ADD_SOURCES],[ 197 PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS))) 198]) 199 200dnl 201dnl _PHP_ASSIGN_BUILD_VARS(type) 202dnl internal, don't use 203AC_DEFUN([_PHP_ASSIGN_BUILD_VARS],[ 204ifelse($1,shared,[ 205 b_c_pre=$shared_c_pre 206 b_cxx_pre=$shared_cxx_pre 207 b_c_meta=$shared_c_meta 208 b_cxx_meta=$shared_cxx_meta 209 b_c_post=$shared_c_post 210 b_cxx_post=$shared_cxx_post 211],[ 212 b_c_pre=$php_c_pre 213 b_cxx_pre=$php_cxx_pre 214 b_c_meta=$php_c_meta 215 b_cxx_meta=$php_cxx_meta 216 b_c_post=$php_c_post 217 b_cxx_post=$php_cxx_post 218])dnl 219 b_lo=[$]$1_lo 220]) 221 222dnl 223dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]]) 224dnl 225dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the 226dnl name of the array target-var directly, as well as whether 227dnl shared objects will be built from the sources. 228dnl 229dnl Should not be used directly. 230dnl 231AC_DEFUN([PHP_ADD_SOURCES_X],[ 232dnl relative to source- or build-directory? 233dnl ac_srcdir/ac_bdir include trailing slash 234 case $1 in 235 ""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; 236 /*[)] ac_srcdir=`echo "$1"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; 237 *[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; 238 esac 239 240dnl how to build .. shared or static? 241 ifelse($5,yes,_PHP_ASSIGN_BUILD_VARS(shared),_PHP_ASSIGN_BUILD_VARS(php)) 242 243dnl iterate over the sources 244 old_IFS=[$]IFS 245 for ac_src in $2; do 246 247dnl remove the suffix 248 IFS=. 249 set $ac_src 250 ac_obj=[$]1 251 IFS=$old_IFS 252 253dnl append to the array which has been dynamically chosen at m4 time 254 $4="[$]$4 [$]ac_bdir[$]ac_obj.lo" 255 256dnl choose the right compiler/flags/etc. for the source-file 257 case $ac_src in 258 *.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; 259 *.s[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; 260 *.S[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; 261 *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;; 262 esac 263 264dnl create a rule for the object/source combo 265 cat >>Makefile.objects<<EOF 266$ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src 267 $ac_comp 268EOF 269 done 270]) 271 272dnl ------------------------------------------------------------------------- 273dnl Compiler characteristics checks 274dnl ------------------------------------------------------------------------- 275 276dnl 277dnl PHP_TARGET_RDYNAMIC 278dnl 279dnl Checks whether -rdynamic is supported by the compiler. This 280dnl is necessary for some targets to populate the global symbol 281dnl table. Otherwise, dynamic modules would not be able to resolve 282dnl PHP-related symbols. 283dnl 284dnl If successful, adds -rdynamic to PHP_LDFLAGS. 285dnl 286AC_DEFUN([PHP_TARGET_RDYNAMIC],[ 287 if test -n "$GCC"; then 288 dnl we should use a PHP-specific macro here 289 PHP_CHECK_GCC_ARG(-rdynamic, gcc_rdynamic=yes) 290 if test "$gcc_rdynamic" = "yes"; then 291 PHP_LDFLAGS="$PHP_LDFLAGS -rdynamic" 292 fi 293 fi 294]) 295 296dnl 297dnl PHP_RUNPATH_SWITCH 298dnl 299dnl Checks for -R, etc. switch 300dnl 301AC_DEFUN([PHP_RUNPATH_SWITCH],[ 302AC_MSG_CHECKING([if compiler supports -R]) 303AC_CACHE_VAL(php_cv_cc_dashr,[ 304 SAVE_LIBS=$LIBS 305 LIBS="-R /usr/$PHP_LIBDIR $LIBS" 306 AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no) 307 LIBS=$SAVE_LIBS]) 308AC_MSG_RESULT([$php_cv_cc_dashr]) 309if test $php_cv_cc_dashr = "yes"; then 310 ld_runpath_switch=-R 311else 312 AC_MSG_CHECKING([if compiler supports -Wl,-rpath,]) 313 AC_CACHE_VAL(php_cv_cc_rpath,[ 314 SAVE_LIBS=$LIBS 315 LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS" 316 AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no) 317 LIBS=$SAVE_LIBS]) 318 AC_MSG_RESULT([$php_cv_cc_rpath]) 319 if test $php_cv_cc_rpath = "yes"; then 320 ld_runpath_switch=-Wl,-rpath, 321 else 322 dnl something innocuous 323 ld_runpath_switch=-L 324 fi 325fi 326if test "$PHP_RPATH" = "no"; then 327 ld_runpath_switch= 328fi 329]) 330 331dnl 332dnl PHP_CHECK_GCC_ARG(arg, action-if-found, action-if-not-found) 333dnl 334AC_DEFUN([PHP_CHECK_GCC_ARG],[ 335 gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_) 336 AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [ 337 echo 'void somefunc() { };' > conftest.c 338 cmd='$CC $1 -c conftest.c' 339 if eval $cmd 2>&1 | $EGREP -e $1 >/dev/null ; then 340 ac_result=no 341 else 342 ac_result=yes 343 fi 344 eval $gcc_arg_name=$ac_result 345 rm -f conftest.* 346 ]) 347 if eval test "\$$gcc_arg_name" = "yes"; then 348 $2 349 else 350 : 351 $3 352 fi 353]) 354 355dnl 356dnl PHP_LIBGCC_LIBPATH(gcc) 357dnl 358dnl Stores the location of libgcc in libgcc_libpath 359dnl 360AC_DEFUN([PHP_LIBGCC_LIBPATH],[ 361 changequote({,}) 362 libgcc_libpath=`$1 --print-libgcc-file-name|$SED 's%/*[^/][^/]*$%%'` 363 changequote([,]) 364]) 365 366dnl ------------------------------------------------------------------------- 367dnl Macros to modify LIBS, INCLUDES, etc. variables 368dnl ------------------------------------------------------------------------- 369 370dnl 371dnl PHP_REMOVE_USR_LIB(NAME) 372dnl 373dnl Removes all -L/usr/$PHP_LIBDIR entries from variable NAME 374dnl 375AC_DEFUN([PHP_REMOVE_USR_LIB],[ 376 unset ac_new_flags 377 for i in [$]$1; do 378 case [$]i in 379 -L/usr/$PHP_LIBDIR|-L/usr/$PHP_LIBDIR/[)] ;; 380 *[)] ac_new_flags="[$]ac_new_flags [$]i" ;; 381 esac 382 done 383 $1=[$]ac_new_flags 384]) 385 386dnl 387dnl PHP_EVAL_LIBLINE(libline, SHARED-LIBADD) 388dnl 389dnl Use this macro, if you need to add libraries and or library search 390dnl paths to the PHP build system which are only given in compiler 391dnl notation. 392dnl 393AC_DEFUN([PHP_EVAL_LIBLINE],[ 394 for ac_i in $1; do 395 case $ac_i in 396 -pthread[)] 397 if test "$ext_shared" = "yes"; then 398 $2="[$]$2 -pthread" 399 else 400 PHP_RUN_ONCE(EXTRA_LDFLAGS, [$ac_i], [EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"]) 401 fi 402 ;; 403 -l*[)] 404 ac_ii=`echo $ac_i|cut -c 3-` 405 PHP_ADD_LIBRARY($ac_ii,1,$2) 406 ;; 407 -L*[)] 408 ac_ii=`echo $ac_i|cut -c 3-` 409 PHP_ADD_LIBPATH($ac_ii,$2) 410 ;; 411 esac 412 done 413]) 414 415dnl 416dnl PHP_EVAL_INCLINE(headerline) 417dnl 418dnl Use this macro, if you need to add header search paths to the PHP 419dnl build system which are only given in compiler notation. 420dnl 421AC_DEFUN([PHP_EVAL_INCLINE],[ 422 for ac_i in $1; do 423 case $ac_i in 424 -I*[)] 425 ac_ii=`echo $ac_i|cut -c 3-` 426 PHP_ADD_INCLUDE($ac_ii) 427 ;; 428 esac 429 done 430]) 431 432dnl internal, don't use 433AC_DEFUN([_PHP_ADD_LIBPATH_GLOBAL],[ 434 PHP_RUN_ONCE(LIBPATH, $1, [ 435 test "x$PHP_RPATH" != "xno" && 436 test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$1" 437 LDFLAGS="$LDFLAGS -L$1" 438 PHP_RPATHS="$PHP_RPATHS $1" 439 ]) 440])dnl 441dnl 442dnl 443dnl PHP_ADD_LIBPATH(path [, SHARED-LIBADD]) 444dnl 445dnl Adds a path to linkpath/runpath (LDFLAGS) 446dnl 447AC_DEFUN([PHP_ADD_LIBPATH],[ 448 if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then 449 PHP_EXPAND_PATH($1, ai_p) 450 ifelse([$2],,[ 451 _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) 452 ],[ 453 if test "$ext_shared" = "yes"; then 454 $2="-L$ai_p [$]$2" 455 test "x$PHP_RPATH" != "xno" && \ 456 test -n "$ld_runpath_switch" && $2="$ld_runpath_switch$ai_p [$]$2" 457 else 458 _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) 459 fi 460 ]) 461 fi 462]) 463 464dnl 465dnl PHP_UTILIZE_RPATHS() 466dnl 467dnl builds RPATHS/LDFLAGS from PHP_RPATHS 468dnl 469AC_DEFUN([PHP_UTILIZE_RPATHS],[ 470 OLD_RPATHS=$PHP_RPATHS 471 unset PHP_RPATHS 472 473 for i in $OLD_RPATHS; do 474dnl Can be passed to native cc/libtool 475 PHP_LDFLAGS="$PHP_LDFLAGS -L$i" 476dnl Libtool-specific 477 PHP_RPATHS="$PHP_RPATHS -R $i" 478dnl cc-specific 479 NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i" 480 done 481 482 if test "$PHP_RPATH" = "no"; then 483 unset PHP_RPATHS 484 unset NATIVE_RPATHS 485 fi 486]) 487 488dnl 489dnl PHP_ADD_INCLUDE(path [,before]) 490dnl 491dnl add an include path. 492dnl if before is 1, add in the beginning of INCLUDES. 493dnl 494AC_DEFUN([PHP_ADD_INCLUDE],[ 495 if test "$1" != "/usr/include"; then 496 PHP_EXPAND_PATH($1, ai_p) 497 PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [ 498 if test "$2"; then 499 INCLUDES="-I$ai_p $INCLUDES" 500 else 501 INCLUDES="$INCLUDES -I$ai_p" 502 fi 503 ]) 504 fi 505]) 506 507dnl internal, don't use 508AC_DEFUN([_PHP_X_ADD_LIBRARY],[dnl 509 ifelse([$2],,$3="-l$1 [$]$3", $3="[$]$3 -l$1") dnl 510])dnl 511dnl 512dnl internal, don't use 513AC_DEFUN([_PHP_ADD_LIBRARY_SKELETON],[ 514 case $1 in 515 c|c_r|pthread*[)] ;; 516 *[)] ifelse($3,,[ 517 _PHP_X_ADD_LIBRARY($1,$2,$5) 518 ],[ 519 if test "$ext_shared" = "yes"; then 520 _PHP_X_ADD_LIBRARY($1,$2,$3) 521 else 522 $4($1,$2) 523 fi 524 ]) ;; 525 esac 526])dnl 527dnl 528dnl 529dnl PHP_ADD_LIBRARY(library[, append[, shared-libadd]]) 530dnl 531dnl add a library to the link line 532dnl 533AC_DEFUN([PHP_ADD_LIBRARY],[ 534 _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY],[LIBS]) 535]) 536 537dnl 538dnl PHP_ADD_LIBRARY_DEFER(library[, append[, shared-libadd]]) 539dnl 540dnl add a library to the link line (deferred, not used during configure) 541dnl 542AC_DEFUN([PHP_ADD_LIBRARY_DEFER],[ 543 _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY_DEFER],[DLIBS]) 544]) 545 546dnl 547dnl PHP_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd]) 548dnl 549dnl add a library to the link line and path to linkpath/runpath. 550dnl if shared-libadd is not empty and $ext_shared is yes, 551dnl shared-libadd will be assigned the library information 552dnl 553AC_DEFUN([PHP_ADD_LIBRARY_WITH_PATH],[ 554ifelse($3,,[ 555 if test -n "$2"; then 556 PHP_ADD_LIBPATH($2) 557 fi 558 PHP_ADD_LIBRARY($1) 559],[ 560 if test "$ext_shared" = "yes"; then 561 $3="-l$1 [$]$3" 562 if test -n "$2"; then 563 PHP_ADD_LIBPATH($2,$3) 564 fi 565 else 566 PHP_ADD_LIBRARY_WITH_PATH($1,$2) 567 fi 568]) 569]) 570 571dnl 572dnl PHP_ADD_LIBRARY_DEFER_WITH_PATH(library, path[, shared-libadd]) 573dnl 574dnl add a library to the link line (deferred) 575dnl and path to linkpath/runpath (not deferred) 576dnl if shared-libadd is not empty and $ext_shared is yes, 577dnl shared-libadd will be assigned the library information 578dnl 579AC_DEFUN([PHP_ADD_LIBRARY_DEFER_WITH_PATH],[ 580ifelse($3,,[ 581 if test -n "$2"; then 582 PHP_ADD_LIBPATH($2) 583 fi 584 PHP_ADD_LIBRARY_DEFER($1) 585],[ 586 if test "$ext_shared" = "yes"; then 587 $3="-l$1 [$]$3" 588 if test -n "$2"; then 589 PHP_ADD_LIBPATH($2,$3) 590 fi 591 else 592 PHP_ADD_LIBRARY_DEFER_WITH_PATH($1,$2) 593 fi 594]) 595]) 596 597dnl 598dnl PHP_ADD_FRAMEWORK(framework [,before]) 599dnl 600dnl add a (Darwin / Mac OS X) framework to the link 601dnl line. if before is 1, the framework is added 602dnl to the beginning of the line. 603dnl 604AC_DEFUN([PHP_ADD_FRAMEWORK], [ 605 PHP_RUN_ONCE(FRAMEWORKS, $1, [ 606 if test "$2"; then 607 PHP_FRAMEWORKS="-framework $1 $PHP_FRAMEWORKS" 608 else 609 PHP_FRAMEWORKS="$PHP_FRAMEWORKS -framework $1" 610 fi 611 ]) 612]) 613 614dnl 615dnl PHP_ADD_FRAMEWORKPATH(path [,before]) 616dnl 617dnl add a (Darwin / Mac OS X) framework path to the link 618dnl and include lines. default paths include (but are 619dnl not limited to) /Local/Library/Frameworks and 620dnl /System/Library/Frameworks, so these don't need 621dnl to be specifically added. if before is 1, the 622dnl framework path is added to the beginning of the 623dnl relevant lines. 624dnl 625AC_DEFUN([PHP_ADD_FRAMEWORKPATH], [ 626 PHP_EXPAND_PATH($1, ai_p) 627 PHP_RUN_ONCE(FRAMEWORKPATH, $ai_p, [ 628 if test "$2"; then 629 PHP_FRAMEWORKPATH="-F$ai_p $PHP_FRAMEWORKPATH" 630 else 631 PHP_FRAMEWORKPATH="$PHP_FRAMEWORKPATH -F$ai_p" 632 fi 633 ]) 634]) 635 636dnl 637dnl PHP_ADD_FRAMEWORK_WITH_PATH(framework, path) 638dnl 639dnl Adds a (Darwin / Mac OS X) framework path and the 640dnl framework itself to the link and include lines. 641dnl 642AC_DEFUN([PHP_ADD_FRAMEWORK_WITH_PATH], [ 643 PHP_ADD_FRAMEWORKPATH($2) 644 PHP_ADD_FRAMEWORK($1) 645]) 646 647dnl 648dnl PHP_SET_LIBTOOL_VARIABLE(var) 649dnl 650dnl Set libtool variable 651dnl 652AC_DEFUN([PHP_SET_LIBTOOL_VARIABLE],[ 653 if test -z "$LIBTOOL"; then 654 LIBTOOL='$(SHELL) $(top_builddir)/libtool $1' 655 else 656 LIBTOOL="$LIBTOOL $1" 657 fi 658]) 659 660dnl ------------------------------------------------------------------------- 661dnl Wrapper macros for AC_ARG_WITH / AC_ARG_ENABLE 662dnl ------------------------------------------------------------------------- 663 664dnl PHP_ARG_ANALYZE_EX 665dnl internal 666AC_DEFUN([PHP_ARG_ANALYZE_EX],[ 667ext_output="yes, shared" 668ext_shared=yes 669case [$]$1 in 670shared,*[)] 671 $1=`echo "[$]$1"|$SED 's/^shared,//'` 672 ;; 673shared[)] 674 $1=yes 675 ;; 676no[)] 677 ext_output=no 678 ext_shared=no 679 ;; 680*[)] 681 ext_output=yes 682 ext_shared=no 683 ;; 684esac 685 686PHP_ALWAYS_SHARED([$1]) 687]) 688 689dnl PHP_ARG_ANALYZE 690dnl internal 691AC_DEFUN([PHP_ARG_ANALYZE],[ 692ifelse([$3],yes,[PHP_ARG_ANALYZE_EX([$1])],[ext_output=ifelse([$]$1,,no,[$]$1)]) 693ifelse([$2],,,[AC_MSG_RESULT([$ext_output])]) 694]) 695 696dnl 697dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val[, extension-or-not]]) 698dnl Sets PHP_ARG_NAME either to the user value or to the default value. 699dnl default-val defaults to no. This will also set the variable ext_shared, 700dnl and will overwrite any previous variable of that name. 701dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run 702dnl the PHP_ARG_ANALYZE_EX. 703dnl 704AC_DEFUN([PHP_ARG_WITH],[ 705php_with_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4) 706PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)]) 707]) 708 709dnl PHP_REAL_ARG_WITH 710dnl internal 711AC_DEFUN([PHP_REAL_ARG_WITH],[ 712ifelse([$2],,,[AC_MSG_CHECKING([$2])]) 713AC_ARG_WITH($1,[$3],$5=[$]withval, 714[ 715 $5=ifelse($4,,no,$4) 716 ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL]) 717]) 718PHP_ARG_ANALYZE($5,[$2],$6) 719]) 720 721dnl 722dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val[, extension-or-not]]) 723dnl Sets PHP_ARG_NAME either to the user value or to the default value. 724dnl default-val defaults to no. This will also set the variable ext_shared, 725dnl and will overwrite any previous variable of that name. 726dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run 727dnl the PHP_ARG_ANALYZE_EX. 728dnl 729AC_DEFUN([PHP_ARG_ENABLE],[ 730php_enable_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4) 731PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)]) 732]) 733 734dnl PHP_REAL_ARG_ENABLE 735dnl internal 736AC_DEFUN([PHP_REAL_ARG_ENABLE],[ 737ifelse([$2],,,[AC_MSG_CHECKING([$2])]) 738AC_ARG_ENABLE($1,[$3],$5=[$]enableval, 739[ 740 $5=ifelse($4,,no,$4) 741 ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL]) 742]) 743PHP_ARG_ANALYZE($5,[$2],$6) 744]) 745 746dnl ------------------------------------------------------------------------- 747dnl Build macros 748dnl ------------------------------------------------------------------------- 749 750dnl 751dnl PHP_BUILD_THREAD_SAFE 752dnl 753AC_DEFUN([PHP_BUILD_THREAD_SAFE],[ 754 enable_maintainer_zts=yes 755 if test "$pthreads_working" != "yes"; then 756 AC_MSG_ERROR([ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads.]) 757 fi 758]) 759 760dnl 761dnl PHP_REQUIRE_CXX 762dnl 763AC_DEFUN([PHP_REQUIRE_CXX],[ 764 if test -z "$php_cxx_done"; then 765 AC_PROG_CXX 766 AC_PROG_CXXCPP 767 php_cxx_done=yes 768 fi 769]) 770 771dnl 772dnl PHP_BUILD_SHARED 773dnl 774AC_DEFUN([PHP_BUILD_SHARED],[ 775 PHP_BUILD_PROGRAM 776 OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la] 777 php_build_target=shared 778 779 php_c_pre=$shared_c_pre 780 php_c_meta=$shared_c_meta 781 php_c_post=$shared_c_post 782 php_cxx_pre=$shared_cxx_pre 783 php_cxx_meta=$shared_cxx_meta 784 php_cxx_post=$shared_cxx_post 785 php_lo=$shared_lo 786]) 787 788dnl 789dnl PHP_BUILD_STATIC 790dnl 791AC_DEFUN([PHP_BUILD_STATIC],[ 792 PHP_BUILD_PROGRAM 793 OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la] 794 php_build_target=static 795]) 796 797dnl 798dnl PHP_BUILD_BUNDLE 799dnl 800AC_DEFUN([PHP_BUILD_BUNDLE],[ 801 PHP_BUILD_PROGRAM 802 OVERALL_TARGET=libs/libphp[]$PHP_MAJOR_VERSION[.bundle] 803 php_build_target=static 804]) 805 806dnl 807dnl PHP_BUILD_PROGRAM 808dnl 809AC_DEFUN([PHP_BUILD_PROGRAM],[ 810 OVERALL_TARGET=[]ifelse($1,,php,$1) 811 php_c_pre='$(LIBTOOL) --mode=compile $(CC)' 812 php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' 813 php_c_post= 814 php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' 815 php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' 816 php_cxx_post= 817 php_lo=lo 818 819 case $with_pic in 820 yes) pic_setting='-prefer-pic';; 821 no) pic_setting='-prefer-non-pic';; 822 esac 823 824 shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' 825 shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting 826 shared_c_post= 827 shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' 828 shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting 829 shared_cxx_post= 830 shared_lo=lo 831 832 php_build_target=program 833]) 834 835dnl 836dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx, zend_ext) 837dnl 838dnl Basically sets up the link-stage for building module-name 839dnl from object_var in build-dir. 840dnl 841AC_DEFUN([PHP_SHARED_MODULE],[ 842 install_modules="install-modules" 843 844 case $host_alias in 845 *aix*[)] 846 suffix=so 847 link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$3'/$1.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) && mv -f '$3'/.libs/$1.so '$3'/$1.so' 848 ;; 849 *netware*[)] 850 suffix=nlm 851 link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) ifelse($1, php5lib, , -L$(top_builddir)/netware -lphp5lib) $(translit(ifelse($1, php5lib, $1, m4_substr($1, 3)),a-z_-,A-Z__)_SHARED_LIBADD)' 852 ;; 853 *[)] 854 suffix=la 855 link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)' 856 ;; 857 esac 858 859 if test "x$5" = "xyes"; then 860 PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/$1.$suffix" 861 else 862 PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.$suffix" 863 fi 864 PHP_SUBST($2) 865 cat >>Makefile.objects<<EOF 866\$(phplibdir)/$1.$suffix: $3/$1.$suffix 867 \$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir) 868 869$3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES) 870 $link_cmd 871 872EOF 873]) 874 875dnl 876dnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags [, build-target]]]) 877dnl 878dnl Selects the SAPI name and type (static, shared, programm) 879dnl and optionally also the source-files for the SAPI-specific 880dnl objects. 881dnl 882AC_DEFUN([PHP_SELECT_SAPI],[ 883 if test "$PHP_SAPI" != "default"; then 884AC_MSG_ERROR([ 885+--------------------------------------------------------------------+ 886| *** ATTENTION *** | 887| | 888| You've configured multiple SAPIs to be build. You can build only | 889| one SAPI module and CLI binary at the same time. | 890+--------------------------------------------------------------------+ 891]) 892 fi 893 894 PHP_SAPI=$1 895 896 case "$2" in 897 static[)] PHP_BUILD_STATIC;; 898 shared[)] PHP_BUILD_SHARED;; 899 bundle[)] PHP_BUILD_BUNDLE;; 900 program[)] PHP_BUILD_PROGRAM($5);; 901 esac 902 903 ifelse($3,,,[PHP_ADD_SOURCES([sapi/$1],[$3],[$4],[sapi])]) 904]) 905 906dnl deprecated 907AC_DEFUN([PHP_EXTENSION],[ 908 sources=`$AWK -f $abs_srcdir/build/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in` 909 910 PHP_NEW_EXTENSION($1, $sources, $2, $3) 911 912 if test -r "$ext_srcdir/Makefile.frag"; then 913 PHP_ADD_MAKEFILE_FRAGMENT 914 fi 915]) 916 917AC_DEFUN([PHP_ADD_BUILD_DIR],[ 918 ifelse($2,,[ 919 BUILD_DIR="$BUILD_DIR $1" 920 ], [ 921 $php_shtool mkdir -p $1 922 ]) 923]) 924 925AC_DEFUN([PHP_GEN_BUILD_DIRS],[ 926 $php_shtool mkdir -p $BUILD_DIR 927]) 928 929dnl 930dnl PHP_NEW_EXTENSION(extname, sources [, shared [, sapi_class [, extra-cflags [, cxx [, zend_ext]]]]]) 931dnl 932dnl Includes an extension in the build. 933dnl 934dnl "extname" is the name of the ext/ subdir where the extension resides. 935dnl "sources" is a list of files relative to the subdir which are used 936dnl to build the extension. 937dnl "shared" can be set to "shared" or "yes" to build the extension as 938dnl a dynamically loadable library. Optional parameter "sapi_class" can 939dnl be set to "cli" to mark extension build only with CLI or CGI sapi's. 940dnl "extra-cflags" are passed to the compiler, with 941dnl @ext_srcdir@ and @ext_builddir@ being substituted. 942dnl "cxx" can be used to indicate that a C++ shared module is desired. 943dnl "zend_ext" indicates a zend extension. 944AC_DEFUN([PHP_NEW_EXTENSION],[ 945 ext_builddir=[]PHP_EXT_BUILDDIR($1) 946 ext_srcdir=[]PHP_EXT_SRCDIR($1) 947 948 ifelse($5,,ac_extra=,[ac_extra=`echo "$5"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`]) 949 950 if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then 951dnl ---------------------------------------------- Static module 952 [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no 953 PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,) 954 EXT_STATIC="$EXT_STATIC $1" 955 if test "$3" != "nocli"; then 956 EXT_CLI_STATIC="$EXT_CLI_STATIC $1" 957 fi 958 else 959 if test "$3" = "shared" || test "$3" = "yes"; then 960dnl ---------------------------------------------- Shared module 961 [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=yes 962 PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes) 963 case $host_alias in 964 *netware*[)] 965 PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6, $7) 966 ;; 967 *[)] 968 PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6, $7) 969 ;; 970 esac 971 AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module) 972 fi 973 fi 974 975 if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then 976dnl ---------------------------------------------- CLI static module 977 [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no 978 case "$PHP_SAPI" in 979 cgi|embed[)] 980 PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,) 981 EXT_STATIC="$EXT_STATIC $1" 982 ;; 983 *[)] 984 PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli) 985 ;; 986 esac 987 EXT_CLI_STATIC="$EXT_CLI_STATIC $1" 988 fi 989 PHP_ADD_BUILD_DIR($ext_builddir) 990 991dnl Set for phpize builds only 992dnl --------------------------- 993 if test "$ext_builddir" = "."; then 994 PHP_PECL_EXTENSION=$1 995 PHP_SUBST(PHP_PECL_EXTENSION) 996 fi 997]) 998 999dnl 1000dnl PHP_WITH_SHARED 1001dnl 1002dnl Checks whether $withval is "shared" or starts with "shared,XXX" 1003dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff 1004dnl from $withval. 1005dnl 1006AC_DEFUN([PHP_WITH_SHARED],[ 1007 PHP_ARG_ANALYZE_EX(withval) 1008 shared=$ext_shared 1009 unset ext_shared ext_output 1010]) 1011 1012dnl 1013dnl PHP_ADD_EXTENSION_DEP(extname, depends [, depconf]) 1014dnl 1015dnl This macro is scanned by genif.sh when it builds the internal functions 1016dnl list, so that modules can be init'd in the correct order 1017dnl $1 = name of extension, $2 = extension upon which it depends 1018dnl $3 = optional: if true, it's ok for $2 to have not been configured 1019dnl default is false and should halt the build. 1020dnl To be effective, this macro must be invoked *after* PHP_NEW_EXTENSION. 1021dnl The extension on which it depends must also have been configured. 1022dnl See ADD_EXTENSION_DEP in win32 build 1023dnl 1024AC_DEFUN([PHP_ADD_EXTENSION_DEP], [ 1025 am_i_shared=$[PHP_]translit($1,a-z_-,A-Z__)[_SHARED] 1026 is_it_shared=$[PHP_]translit($2,a-z_-,A-Z__)[_SHARED] 1027 is_it_enabled=$[PHP_]translit($2,a-z_-,A-Z__) 1028 if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then 1029 AC_MSG_ERROR([ 1030You've configured extension $1 to build statically, but it 1031depends on extension $2, which you've configured to build shared. 1032You either need to build $1 shared or build $2 statically for the 1033build to be successful. 1034]) 1035 fi 1036 if test "x$is_it_enabled" = "xno" && test "x$3" != "xtrue"; then 1037 AC_MSG_ERROR([ 1038You've configured extension $1, which depends on extension $2, 1039but you've either not enabled $2, or have disabled it. 1040]) 1041 fi 1042 dnl Some systems require that we link $2 to $1 when building 1043]) 1044 1045dnl ------------------------------------------------------------------------- 1046dnl Checks for structures, typedefs, broken functions, etc. 1047dnl ------------------------------------------------------------------------- 1048 1049dnl Internal helper macros 1050dnl 1051dnl _PHP_DEF_HAVE_FILE(what, filename) 1052AC_DEFUN([_PHP_DEF_HAVE_FILE], [ 1053 php_def_have_what=HAVE_[]`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_' ` 1054 echo "#define $php_def_have_what 1" >> $2 1055]) 1056dnl 1057dnl _PHP_CHECK_SIZEOF(type, cross-value, extra-headers [, found-action [, not-found-action]]) 1058dnl 1059AC_DEFUN([_PHP_CHECK_SIZEOF], [ 1060 php_cache_value=php_cv_sizeof_[]$1 1061 AC_CACHE_VAL(php_cv_sizeof_[]$1, [ 1062 old_LIBS=$LIBS 1063 LIBS= 1064 old_LDFLAGS=$LDFLAGS 1065 LDFLAGS= 1066 AC_TRY_RUN([#include <stdio.h> 1067#if STDC_HEADERS 1068#include <stdlib.h> 1069#include <stddef.h> 1070#endif 1071#ifdef HAVE_INTTYPES_H 1072#include <inttypes.h> 1073#endif 1074#ifdef HAVE_UNISTD_H 1075#include <unistd.h> 1076#endif 1077$3 1078 1079int main() 1080{ 1081 FILE *fp = fopen("conftestval", "w"); 1082 if (!fp) return(1); 1083 fprintf(fp, "%d\n", sizeof($1)); 1084 return(0); 1085} 1086 ], [ 1087 eval $php_cache_value=`cat conftestval` 1088 ], [ 1089 eval $php_cache_value=0 1090 ], [ 1091 ifelse([$2],,[eval $php_cache_value=0], [eval $php_cache_value=$2]) 1092]) 1093 LDFLAGS=$old_LDFLAGS 1094 LIBS=$old_LIBS 1095]) 1096 if eval test "\$$php_cache_value" != "0"; then 1097ifelse([$4],[],:,[$4]) 1098ifelse([$5],[],,[else $5]) 1099 fi 1100]) 1101 1102dnl 1103dnl PHP_CHECK_SIZEOF(type, cross-value, extra-headers) 1104dnl 1105AC_DEFUN([PHP_CHECK_SIZEOF], [ 1106 AC_MSG_CHECKING([size of $1]) 1107 _PHP_CHECK_SIZEOF($1, $2, $3, [ 1108 AC_DEFINE_UNQUOTED([SIZEOF_]translit($1,a-z,A-Z_), [$]php_cv_sizeof_[]$1, [Size of $1]) 1109 AC_DEFINE_UNQUOTED([HAVE_]translit($1,a-z,A-Z_), 1, [Whether $1 is available]) 1110 ]) 1111 AC_MSG_RESULT([[$][php_cv_sizeof_]translit($1, ,_)]) 1112]) 1113 1114dnl 1115dnl PHP_CHECK_TYPES(type-list, include-file [, extra-headers]) 1116dnl 1117AC_DEFUN([PHP_CHECK_TYPES], [ 1118 for php_typename in $1; do 1119 AC_MSG_CHECKING([whether $php_typename exists]) 1120 _PHP_CHECK_SIZEOF($php_typename, 0, $3, [ 1121 _PHP_DEF_HAVE_FILE($php_typename, $2) 1122 AC_MSG_RESULT([yes]) 1123 ], [ 1124 AC_MSG_RESULT([no]) 1125 ]) 1126 done 1127]) 1128 1129dnl 1130dnl PHP_CHECK_IN_ADDR_T 1131dnl 1132AC_DEFUN([PHP_CHECK_IN_ADDR_T], [ 1133dnl AIX keeps in_addr_t in /usr/include/netinet/in.h 1134AC_MSG_CHECKING([for in_addr_t]) 1135AC_CACHE_VAL(ac_cv_type_in_addr_t, 1136[AC_EGREP_CPP(dnl 1137changequote(<<,>>)dnl 1138<<in_addr_t[^a-zA-Z_0-9]>>dnl 1139changequote([,]), [#include <sys/types.h> 1140#if STDC_HEADERS 1141#include <stdlib.h> 1142#include <stddef.h> 1143#endif 1144#ifdef HAVE_NETINET_IN_H 1145#include <netinet/in.h> 1146#endif], ac_cv_type_in_addr_t=yes, ac_cv_type_in_addr_t=no)])dnl 1147AC_MSG_RESULT([$ac_cv_type_in_addr_t]) 1148if test $ac_cv_type_in_addr_t = no; then 1149 AC_DEFINE(in_addr_t, u_int, [ ]) 1150fi 1151]) 1152 1153dnl 1154dnl PHP_TIME_R_TYPE 1155dnl 1156dnl Check type of reentrant time-related functions 1157dnl Type can be: irix, hpux or POSIX 1158dnl 1159AC_DEFUN([PHP_TIME_R_TYPE],[ 1160AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[ 1161AC_TRY_RUN([ 1162#include <time.h> 1163 1164main() { 1165char buf[27]; 1166struct tm t; 1167time_t old = 0; 1168int r, s; 1169 1170s = gmtime_r(&old, &t); 1171r = (int) asctime_r(&t, buf, 26); 1172if (r == s && s == 0) return (0); 1173return (1); 1174} 1175],[ 1176 ac_cv_time_r_type=hpux 1177],[ 1178 AC_TRY_RUN([ 1179#include <time.h> 1180main() { 1181 struct tm t, *s; 1182 time_t old = 0; 1183 char buf[27], *p; 1184 1185 s = gmtime_r(&old, &t); 1186 p = asctime_r(&t, buf, 26); 1187 if (p == buf && s == &t) return (0); 1188 return (1); 1189} 1190 ],[ 1191 ac_cv_time_r_type=irix 1192 ],[ 1193 ac_cv_time_r_type=POSIX 1194 ],[ 1195 ac_cv_time_r_type=POSIX 1196 ]) 1197],[ 1198 ac_cv_time_r_type=POSIX 1199]) 1200]) 1201 case $ac_cv_time_r_type in 1202 hpux[)] AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x]) ;; 1203 irix[)] AC_DEFINE(PHP_IRIX_TIME_R,1,[Whether you have IRIX-style functions]) ;; 1204 esac 1205]) 1206 1207dnl 1208dnl PHP_DOES_PWRITE_WORK 1209dnl internal 1210AC_DEFUN([PHP_DOES_PWRITE_WORK],[ 1211 AC_TRY_RUN([ 1212#include <sys/types.h> 1213#include <sys/stat.h> 1214#include <fcntl.h> 1215#include <unistd.h> 1216#include <errno.h> 1217$1 1218 main() { 1219 int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600); 1220 1221 if (fd < 0) exit(1); 1222 if (pwrite(fd, "text", 4, 0) != 4) exit(1); 1223 /* Linux glibc breakage until 2.2.5 */ 1224 if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1); 1225 exit(0); 1226 } 1227 1228 ],[ 1229 ac_cv_pwrite=yes 1230 ],[ 1231 ac_cv_pwrite=no 1232 ],[ 1233 ac_cv_pwrite=no 1234 ]) 1235]) 1236 1237dnl PHP_DOES_PREAD_WORK 1238dnl internal 1239AC_DEFUN([PHP_DOES_PREAD_WORK],[ 1240 echo test > conftest_in 1241 AC_TRY_RUN([ 1242#include <sys/types.h> 1243#include <sys/stat.h> 1244#include <fcntl.h> 1245#include <unistd.h> 1246#include <errno.h> 1247$1 1248 main() { 1249 char buf[3]; 1250 int fd = open("conftest_in", O_RDONLY); 1251 if (fd < 0) exit(1); 1252 if (pread(fd, buf, 2, 0) != 2) exit(1); 1253 /* Linux glibc breakage until 2.2.5 */ 1254 if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1); 1255 exit(0); 1256 } 1257 ],[ 1258 ac_cv_pread=yes 1259 ],[ 1260 ac_cv_pread=no 1261 ],[ 1262 ac_cv_pread=no 1263 ]) 1264 rm -f conftest_in 1265]) 1266 1267dnl 1268dnl PHP_PWRITE_TEST 1269dnl 1270AC_DEFUN([PHP_PWRITE_TEST],[ 1271 AC_CACHE_CHECK(whether pwrite works,ac_cv_pwrite,[ 1272 PHP_DOES_PWRITE_WORK 1273 if test "$ac_cv_pwrite" = "no"; then 1274 PHP_DOES_PWRITE_WORK([ssize_t pwrite(int, void *, size_t, off64_t);]) 1275 if test "$ac_cv_pwrite" = "yes"; then 1276 ac_cv_pwrite=64 1277 fi 1278 fi 1279 ]) 1280 1281 if test "$ac_cv_pwrite" != "no"; then 1282 AC_DEFINE(HAVE_PWRITE, 1, [ ]) 1283 if test "$ac_cv_pwrite" = "64"; then 1284 AC_DEFINE(PHP_PWRITE_64, 1, [whether pwrite64 is default]) 1285 fi 1286 fi 1287]) 1288 1289dnl 1290dnl PHP_PREAD_TEST 1291dnl 1292AC_DEFUN([PHP_PREAD_TEST],[ 1293 AC_CACHE_CHECK(whether pread works,ac_cv_pread,[ 1294 PHP_DOES_PREAD_WORK 1295 if test "$ac_cv_pread" = "no"; then 1296 PHP_DOES_PREAD_WORK([ssize_t pread(int, void *, size_t, off64_t);]) 1297 if test "$ac_cv_pread" = "yes"; then 1298 ac_cv_pread=64 1299 fi 1300 fi 1301 ]) 1302 1303 if test "$ac_cv_pread" != "no"; then 1304 AC_DEFINE(HAVE_PREAD, 1, [ ]) 1305 if test "$ac_cv_pread" = "64"; then 1306 AC_DEFINE(PHP_PREAD_64, 1, [whether pread64 is default]) 1307 fi 1308 fi 1309]) 1310 1311dnl 1312dnl PHP_MISSING_TIME_R_DECL 1313dnl 1314AC_DEFUN([PHP_MISSING_TIME_R_DECL],[ 1315 AC_MSG_CHECKING([for missing declarations of reentrant functions]) 1316 AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = localtime_r],[ 1317 : 1318 ],[ 1319 AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared]) 1320 ]) 1321 AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = gmtime_r],[ 1322 : 1323 ],[ 1324 AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared]) 1325 ]) 1326 AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = asctime_r],[ 1327 : 1328 ],[ 1329 AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared]) 1330 ]) 1331 AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = ctime_r],[ 1332 : 1333 ],[ 1334 AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared]) 1335 ]) 1336 AC_TRY_COMPILE([#include <string.h>],[char *(*func)() = strtok_r],[ 1337 : 1338 ],[ 1339 AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared]) 1340 ]) 1341 AC_MSG_RESULT([done]) 1342]) 1343 1344dnl 1345dnl PHP_READDIR_R_TYPE 1346dnl 1347AC_DEFUN([PHP_READDIR_R_TYPE],[ 1348 dnl HAVE_READDIR_R is also defined by libmysql 1349 AC_CHECK_FUNC(readdir_r,ac_cv_func_readdir_r=yes,ac_cv_func_readdir=no) 1350 if test "$ac_cv_func_readdir_r" = "yes"; then 1351 AC_CACHE_CHECK(for type of readdir_r, ac_cv_what_readdir_r,[ 1352 AC_TRY_RUN([ 1353#define _REENTRANT 1354#include <sys/types.h> 1355#include <dirent.h> 1356 1357#ifndef PATH_MAX 1358#define PATH_MAX 1024 1359#endif 1360 1361main() { 1362 DIR *dir; 1363 char entry[sizeof(struct dirent)+PATH_MAX]; 1364 struct dirent *pentry = (struct dirent *) &entry; 1365 1366 dir = opendir("/"); 1367 if (!dir) 1368 exit(1); 1369 if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0) 1370 exit(0); 1371 exit(1); 1372} 1373 ],[ 1374 ac_cv_what_readdir_r=POSIX 1375 ],[ 1376 AC_TRY_CPP([ 1377#define _REENTRANT 1378#include <sys/types.h> 1379#include <dirent.h> 1380int readdir_r(DIR *, struct dirent *); 1381 ],[ 1382 ac_cv_what_readdir_r=old-style 1383 ],[ 1384 ac_cv_what_readdir_r=none 1385 ]) 1386 ],[ 1387 ac_cv_what_readdir_r=none 1388 ]) 1389 ]) 1390 case $ac_cv_what_readdir_r in 1391 POSIX) 1392 AC_DEFINE(HAVE_POSIX_READDIR_R,1,[whether you have POSIX readdir_r]);; 1393 old-style) 1394 AC_DEFINE(HAVE_OLD_READDIR_R,1,[whether you have old-style readdir_r]);; 1395 esac 1396 fi 1397]) 1398 1399dnl 1400dnl PHP_TM_GMTOFF 1401dnl 1402AC_DEFUN([PHP_TM_GMTOFF],[ 1403AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, 1404[AC_TRY_COMPILE([#include <sys/types.h> 1405#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;], 1406 ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)]) 1407 1408if test "$ac_cv_struct_tm_gmtoff" = yes; then 1409 AC_DEFINE(HAVE_TM_GMTOFF,1,[whether you have tm_gmtoff in struct tm]) 1410fi 1411]) 1412 1413dnl 1414dnl PHP_STRUCT_FLOCK 1415dnl 1416AC_DEFUN([PHP_STRUCT_FLOCK],[ 1417AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock, 1418 AC_TRY_COMPILE([ 1419#include <unistd.h> 1420#include <fcntl.h> 1421 ], 1422 [struct flock x;], 1423 [ 1424 ac_cv_struct_flock=yes 1425 ],[ 1426 ac_cv_struct_flock=no 1427 ]) 1428) 1429if test "$ac_cv_struct_flock" = "yes" ; then 1430 AC_DEFINE(HAVE_STRUCT_FLOCK, 1,[whether you have struct flock]) 1431fi 1432]) 1433 1434dnl 1435dnl PHP_SOCKLEN_T 1436dnl 1437AC_DEFUN([PHP_SOCKLEN_T],[ 1438AC_CACHE_CHECK(for socklen_t,ac_cv_socklen_t, 1439 AC_TRY_COMPILE([ 1440#include <sys/types.h> 1441#include <sys/socket.h> 1442],[ 1443socklen_t x; 1444],[ 1445 ac_cv_socklen_t=yes 1446],[ 1447 ac_cv_socklen_t=no 1448])) 1449if test "$ac_cv_socklen_t" = "yes"; then 1450 AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t]) 1451fi 1452]) 1453 1454dnl 1455dnl PHP_MISSING_FCLOSE_DECL 1456dnl 1457dnl See if we have broken header files like SunOS has. 1458dnl 1459AC_DEFUN([PHP_MISSING_FCLOSE_DECL],[ 1460 AC_MSG_CHECKING([for fclose declaration]) 1461 AC_TRY_COMPILE([#include <stdio.h>],[int (*func)() = fclose],[ 1462 AC_DEFINE(MISSING_FCLOSE_DECL,0,[ ]) 1463 AC_MSG_RESULT([ok]) 1464 ],[ 1465 AC_DEFINE(MISSING_FCLOSE_DECL,1,[ ]) 1466 AC_MSG_RESULT([missing]) 1467 ]) 1468]) 1469 1470dnl 1471dnl PHP_AC_BROKEN_SPRINTF 1472dnl 1473dnl Check for broken sprintf(), C99 conformance 1474dnl 1475AC_DEFUN([PHP_AC_BROKEN_SPRINTF],[ 1476 AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[ 1477 AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[ 1478 ac_cv_broken_sprintf=no 1479 ],[ 1480 ac_cv_broken_sprintf=yes 1481 ],[ 1482 ac_cv_broken_sprintf=no 1483 ]) 1484 ]) 1485 if test "$ac_cv_broken_sprintf" = "yes"; then 1486 AC_DEFINE(PHP_BROKEN_SPRINTF, 1, [Whether sprintf is C99 conform]) 1487 else 1488 AC_DEFINE(PHP_BROKEN_SPRINTF, 0, [Whether sprintf is C99 conform]) 1489 fi 1490]) 1491 1492dnl 1493dnl PHP_AC_BROKEN_SNPRINTF 1494dnl 1495dnl Check for broken snprintf(), C99 conformance 1496dnl 1497AC_DEFUN([PHP_AC_BROKEN_SNPRINTF],[ 1498 AC_CACHE_CHECK(whether snprintf is broken, ac_cv_broken_snprintf,[ 1499 AC_TRY_RUN([ 1500#define NULL (0L) 1501main() { 1502 char buf[20]; 1503 int res = 0; 1504 res = res || (snprintf(buf, 2, "marcus") != 6); 1505 res = res || (buf[1] != '\0'); 1506 /* Implementations may consider this as an encoding error */ 1507 snprintf(buf, 0, "boerger"); 1508 /* However, they MUST ignore the pointer */ 1509 res = res || (buf[0] != 'm'); 1510 res = res || (snprintf(NULL, 0, "boerger") != 7); 1511 res = res || (snprintf(buf, sizeof(buf), "%f", 0.12345678) != 8); 1512 exit(res); 1513} 1514 ],[ 1515 ac_cv_broken_snprintf=no 1516 ],[ 1517 ac_cv_broken_snprintf=yes 1518 ],[ 1519 ac_cv_broken_snprintf=no 1520 ]) 1521 ]) 1522 if test "$ac_cv_broken_snprintf" = "yes"; then 1523 AC_DEFINE(PHP_BROKEN_SNPRINTF, 1, [Whether snprintf is C99 conform]) 1524 else 1525 AC_DEFINE(PHP_BROKEN_SNPRINTF, 0, [Whether snprintf is C99 conform]) 1526 fi 1527]) 1528 1529dnl 1530dnl PHP_SOLARIS_PIC_WEIRDNESS 1531dnl 1532dnl Solaris requires main code to be position independent in order 1533dnl to let shared objects find symbols. Weird. Ugly. 1534dnl 1535dnl Must be run after all --with-NN options that let the user 1536dnl choose dynamic extensions, and after the gcc test. 1537dnl 1538AC_DEFUN([PHP_SOLARIS_PIC_WEIRDNESS],[ 1539 AC_MSG_CHECKING([whether -fPIC is required]) 1540 if test -n "$EXT_SHARED"; then 1541 os=`uname -sr 2>/dev/null` 1542 case $os in 1543 "SunOS 5.6"|"SunOS 5.7"[)] 1544 case $CC in 1545 gcc*|egcs*) 1546 CFLAGS="$CFLAGS -fPIC";; 1547 *[)] 1548 CFLAGS="$CFLAGS -fpic";; 1549 esac 1550 AC_MSG_RESULT([yes]);; 1551 *[)] 1552 AC_MSG_RESULT([no]);; 1553 esac 1554 else 1555 AC_MSG_RESULT([no]) 1556 fi 1557]) 1558 1559dnl 1560dnl PHP_SYS_LFS 1561dnl 1562dnl The problem is that the default compilation flags in Solaris 2.6 won't 1563dnl let programs access large files; you need to tell the compiler that 1564dnl you actually want your programs to work on large files. For more 1565dnl details about this brain damage please see: 1566dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html 1567dnl 1568dnl Written by Paul Eggert <eggert@twinsun.com>. 1569dnl 1570AC_DEFUN([PHP_SYS_LFS], 1571[dnl 1572 # If available, prefer support for large files unless the user specified 1573 # one of the CPPFLAGS, LDFLAGS, or LIBS variables. 1574 AC_MSG_CHECKING([whether large file support needs explicit enabling]) 1575 ac_getconfs='' 1576 ac_result=yes 1577 ac_set='' 1578 ac_shellvars='CPPFLAGS LDFLAGS LIBS' 1579 for ac_shellvar in $ac_shellvars; do 1580 case $ac_shellvar in 1581 CPPFLAGS[)] ac_lfsvar=LFS_CFLAGS ;; 1582 *[)] ac_lfsvar=LFS_$ac_shellvar ;; 1583 esac 1584 eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar 1585 (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; } 1586 ac_getconf=`getconf $ac_lfsvar` 1587 ac_getconfs=$ac_getconfs$ac_getconf 1588 eval ac_test_$ac_shellvar=\$ac_getconf 1589 done 1590 case "$ac_result$ac_getconfs" in 1591 yes[)] ac_result=no ;; 1592 esac 1593 case "$ac_result$ac_set" in 1594 yes?*[)] ac_result="yes, but $ac_set is already set, so use its settings" 1595 esac 1596 AC_MSG_RESULT([$ac_result]) 1597 case $ac_result in 1598 yes[)] 1599 for ac_shellvar in $ac_shellvars; do 1600 eval $ac_shellvar=\$ac_test_$ac_shellvar 1601 done ;; 1602 esac 1603]) 1604 1605dnl 1606dnl PHP_SOCKADDR_CHECKS 1607dnl 1608AC_DEFUN([PHP_SOCKADDR_CHECKS], [ 1609 dnl Check for struct sockaddr_storage exists 1610 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_sockaddr_storage, 1611 [AC_TRY_COMPILE([#include <sys/types.h> 1612#include <sys/socket.h>], 1613 [struct sockaddr_storage s; s], 1614 [ac_cv_sockaddr_storage=yes], [ac_cv_sockaddr_storage=no]) 1615 ]) 1616 if test "$ac_cv_sockaddr_storage" = "yes"; then 1617 AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [Whether you have struct sockaddr_storage]) 1618 fi 1619 dnl Check if field sa_len exists in struct sockaddr 1620 AC_CACHE_CHECK([for field sa_len in struct sockaddr],ac_cv_sockaddr_sa_len,[ 1621 AC_TRY_COMPILE([#include <sys/types.h> 1622#include <sys/socket.h>], 1623 [static struct sockaddr sa; int n = (int) sa.sa_len; return n;], 1624 [ac_cv_sockaddr_sa_len=yes], [ac_cv_sockaddr_sa_len=no]) 1625 ]) 1626 if test "$ac_cv_sockaddr_sa_len" = "yes"; then 1627 AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Whether struct sockaddr has field sa_len]) 1628 fi 1629]) 1630 1631dnl 1632dnl PHP_DECLARED_TIMEZONE 1633dnl 1634AC_DEFUN([PHP_DECLARED_TIMEZONE],[ 1635 AC_CACHE_CHECK(for declared timezone, ac_cv_declared_timezone,[ 1636 AC_TRY_COMPILE([ 1637#include <sys/types.h> 1638#include <time.h> 1639#ifdef HAVE_SYS_TIME_H 1640#include <sys/time.h> 1641#endif 1642],[ 1643 time_t foo = (time_t) timezone; 1644],[ 1645 ac_cv_declared_timezone=yes 1646],[ 1647 ac_cv_declared_timezone=no 1648])]) 1649 if test "$ac_cv_declared_timezone" = "yes"; then 1650 AC_DEFINE(HAVE_DECLARED_TIMEZONE, 1, [Whether system headers declare timezone]) 1651 fi 1652]) 1653 1654dnl 1655dnl PHP_EBCDIC 1656dnl 1657AC_DEFUN([PHP_EBCDIC], [ 1658 AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[ 1659 AC_TRY_RUN( [ 1660int main(void) { 1661 return (unsigned char)'A' != (unsigned char)0xC1; 1662} 1663],[ 1664 ac_cv_ebcdic=yes 1665],[ 1666 ac_cv_ebcdic=no 1667],[ 1668 ac_cv_ebcdic=no 1669])]) 1670 if test "$ac_cv_ebcdic" = "yes"; then 1671 AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC]) 1672 fi 1673]) 1674 1675dnl 1676dnl PHP_BROKEN_GETCWD 1677dnl 1678dnl Some systems, notably Solaris, cause getcwd() or realpath to fail if a 1679dnl component of the path has execute but not read permissions 1680dnl 1681AC_DEFUN([PHP_BROKEN_GETCWD],[ 1682 AC_MSG_CHECKING([for broken getcwd]) 1683 os=`uname -sr 2>/dev/null` 1684 case $os in 1685 SunOS*[)] 1686 AC_DEFINE(HAVE_BROKEN_GETCWD,1, [Define if system has broken getcwd]) 1687 AC_MSG_RESULT([yes]);; 1688 *[)] 1689 AC_MSG_RESULT([no]);; 1690 esac 1691]) 1692 1693dnl 1694dnl PHP_BROKEN_GLIBC_FOPEN_APPEND 1695dnl 1696AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND], [ 1697 AC_MSG_CHECKING([for broken libc stdio]) 1698 AC_CACHE_VAL(_cv_have_broken_glibc_fopen_append,[ 1699 AC_TRY_RUN([ 1700#include <stdio.h> 1701int main(int argc, char *argv[]) 1702{ 1703 FILE *fp; 1704 long position; 1705 char *filename = "/tmp/phpglibccheck"; 1706 1707 fp = fopen(filename, "w"); 1708 if (fp == NULL) { 1709 perror("fopen"); 1710 exit(2); 1711 } 1712 fputs("foobar", fp); 1713 fclose(fp); 1714 1715 fp = fopen(filename, "a+"); 1716 position = ftell(fp); 1717 fclose(fp); 1718 unlink(filename); 1719 if (position == 0) 1720 return 1; 1721 return 0; 1722} 1723], 1724[_cv_have_broken_glibc_fopen_append=no], 1725[_cv_have_broken_glibc_fopen_append=yes ], 1726AC_TRY_COMPILE([ 1727#include <features.h> 1728],[ 1729#if !__GLIBC_PREREQ(2,2) 1730choke me 1731#endif 1732], 1733[_cv_have_broken_glibc_fopen_append=yes], 1734[_cv_have_broken_glibc_fopen_append=no ]) 1735)]) 1736 1737 if test "$_cv_have_broken_glibc_fopen_append" = "yes"; then 1738 AC_MSG_RESULT(yes) 1739 AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+]) 1740 else 1741 AC_MSG_RESULT(no) 1742 fi 1743]) 1744 1745dnl 1746dnl PHP_FOPENCOOKIE 1747dnl 1748AC_DEFUN([PHP_FOPENCOOKIE], [ 1749 AC_CHECK_FUNC(fopencookie, [have_glibc_fopencookie=yes]) 1750 1751 if test "$have_glibc_fopencookie" = "yes"; then 1752dnl this comes in two flavors: 1753dnl newer glibcs (since 2.1.2 ? ) 1754dnl have a type called cookie_io_functions_t 1755AC_TRY_COMPILE([ 1756#define _GNU_SOURCE 1757#include <stdio.h> 1758], [cookie_io_functions_t cookie;], [have_cookie_io_functions_t=yes], []) 1759 1760 if test "$have_cookie_io_functions_t" = "yes"; then 1761 cookie_io_functions_t=cookie_io_functions_t 1762 have_fopen_cookie=yes 1763 1764dnl even newer glibcs have a different seeker definition... 1765AC_TRY_RUN([ 1766#define _GNU_SOURCE 1767#include <stdio.h> 1768 1769struct cookiedata { 1770 __off64_t pos; 1771}; 1772 1773__ssize_t reader(void *cookie, char *buffer, size_t size) 1774{ return size; } 1775__ssize_t writer(void *cookie, const char *buffer, size_t size) 1776{ return size; } 1777int closer(void *cookie) 1778{ return 0; } 1779int seeker(void *cookie, __off64_t *position, int whence) 1780{ ((struct cookiedata*)cookie)->pos = *position; return 0; } 1781 1782cookie_io_functions_t funcs = {reader, writer, seeker, closer}; 1783 1784main() { 1785 struct cookiedata g = { 0 }; 1786 FILE *fp = fopencookie(&g, "r", funcs); 1787 1788 if (fp && fseek(fp, 8192, SEEK_SET) == 0 && g.pos == 8192) 1789 exit(0); 1790 exit(1); 1791} 1792 1793], [ 1794 cookie_io_functions_use_off64_t=yes 1795], [ 1796 cookie_io_functions_use_off64_t=no 1797], [ 1798 cookie_io_functions_use_off64_t=no 1799]) 1800 1801 else 1802 1803dnl older glibc versions (up to 2.1.2 ?) 1804dnl call it _IO_cookie_io_functions_t 1805AC_TRY_COMPILE([ 1806#define _GNU_SOURCE 1807#include <stdio.h> 1808], [ _IO_cookie_io_functions_t cookie; ], [have_IO_cookie_io_functions_t=yes], []) 1809 if test "$have_cookie_io_functions_t" = "yes" ; then 1810 cookie_io_functions_t=_IO_cookie_io_functions_t 1811 have_fopen_cookie=yes 1812 fi 1813 fi 1814 1815 if test "$have_fopen_cookie" = "yes" ; then 1816 AC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ]) 1817 AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ]) 1818 if test "$cookie_io_functions_use_off64_t" = "yes" ; then 1819 AC_DEFINE(COOKIE_SEEKER_USES_OFF64_T, 1, [ ]) 1820 fi 1821 fi 1822 fi 1823]) 1824 1825dnl ------------------------------------------------------------------------- 1826dnl Library/function existance and build sanity checks 1827dnl ------------------------------------------------------------------------- 1828 1829dnl 1830dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-libs]]]) 1831dnl 1832dnl Wrapper for AC_CHECK_LIB 1833dnl 1834AC_DEFUN([PHP_CHECK_LIBRARY], [ 1835 save_old_LDFLAGS=$LDFLAGS 1836 ac_stuff="$5" 1837 1838 save_ext_shared=$ext_shared 1839 ext_shared=yes 1840 PHP_EVAL_LIBLINE([$]ac_stuff, LDFLAGS) 1841 AC_CHECK_LIB([$1],[$2],[ 1842 LDFLAGS=$save_old_LDFLAGS 1843 ext_shared=$save_ext_shared 1844 $3 1845 ],[ 1846 LDFLAGS=$save_old_LDFLAGS 1847 ext_shared=$save_ext_shared 1848 unset ac_cv_lib_$1[]_$2 1849 $4 1850 ])dnl 1851]) 1852 1853dnl 1854dnl PHP_CHECK_FRAMEWORK(framework, function [, action-found [, action-not-found ]]) 1855dnl 1856dnl El cheapo wrapper for AC_CHECK_LIB 1857dnl 1858AC_DEFUN([PHP_CHECK_FRAMEWORK], [ 1859 save_old_LDFLAGS=$LDFLAGS 1860 LDFLAGS="-framework $1 $LDFLAGS" 1861 dnl supplying "c" to AC_CHECK_LIB is technically cheating, but 1862 dnl rewriting AC_CHECK_LIB is overkill and this only affects 1863 dnl the "checking.." output anyway. 1864 AC_CHECK_LIB(c,[$2],[ 1865 LDFLAGS=$save_old_LDFLAGS 1866 $3 1867 ],[ 1868 LDFLAGS=$save_old_LDFLAGS 1869 $4 1870 ]) 1871]) 1872 1873dnl 1874dnl PHP_CHECK_FUNC_LIB(func, libs) 1875dnl 1876dnl This macro checks whether 'func' or '__func' exists 1877dnl in the specified library. 1878dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS. 1879dnl This should be called in the ACTION-IF-NOT-FOUND part of PHP_CHECK_FUNC 1880dnl 1881dnl 1882dnl autoconf undefines the builtin "shift" :-( 1883dnl If possible, we use the builtin shift anyway, otherwise we use 1884dnl the ubercool definition I have tested so far with FreeBSD/GNU m4 1885ifdef([builtin],[builtin(define, phpshift, [builtin(shift, $@)])],[ 1886define([phpshift],[ifelse(index([$@],[,]),-1,,[substr([$@],incr(index([$@],[,])))])]) 1887]) 1888dnl 1889AC_DEFUN([PHP_CHECK_FUNC_LIB],[ 1890 ifelse($2,,:,[ 1891 unset ac_cv_lib_$2[]_$1 1892 unset ac_cv_lib_$2[]___$1 1893 unset found 1894 AC_CHECK_LIB($2, $1, [found=yes], [ 1895 AC_CHECK_LIB($2, __$1, [found=yes], [found=no]) 1896 ]) 1897 1898 if test "$found" = "yes"; then 1899 ac_libs=$LIBS 1900 LIBS="$LIBS -l$2" 1901 AC_TRY_RUN([main() { return (0); }],[found=yes],[found=no],[found=no]) 1902 LIBS=$ac_libs 1903 fi 1904 1905 if test "$found" = "yes"; then 1906 PHP_ADD_LIBRARY($2) 1907 PHP_DEF_HAVE($1) 1908 PHP_DEF_HAVE(lib$2) 1909 ac_cv_func_$1=yes 1910 else 1911 PHP_CHECK_FUNC_LIB($1,phpshift(phpshift($@))) 1912 fi 1913 ]) 1914]) 1915 1916dnl 1917dnl PHP_CHECK_FUNC(func, ...) 1918dnl 1919dnl This macro checks whether 'func' or '__func' exists 1920dnl in the default libraries and as a fall back in the specified library. 1921dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS. 1922dnl 1923AC_DEFUN([PHP_CHECK_FUNC],[ 1924 unset ac_cv_func_$1 1925 unset ac_cv_func___$1 1926 unset found 1927 1928 AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ]) 1929 1930 case $found in 1931 yes[)] 1932 PHP_DEF_HAVE($1) 1933 ac_cv_func_$1=yes 1934 ;; 1935 ifelse($#,1,,[ 1936 *[)] PHP_CHECK_FUNC_LIB($@) ;; 1937 ]) 1938 esac 1939]) 1940 1941dnl 1942dnl PHP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs [, extra-source]]) 1943dnl 1944dnl This macro checks whether build works and given function exists. 1945dnl 1946AC_DEFUN([PHP_TEST_BUILD], [ 1947 old_LIBS=$LIBS 1948 LIBS="$4 $LIBS" 1949 AC_TRY_RUN([ 1950 $5 1951 char $1(); 1952 int main() { 1953 $1(); 1954 return 0; 1955 } 1956 ], [ 1957 LIBS=$old_LIBS 1958 $2 1959 ],[ 1960 LIBS=$old_LIBS 1961 $3 1962 ],[ 1963 LIBS=$old_LIBS 1964 ]) 1965]) 1966 1967dnl ------------------------------------------------------------------------- 1968dnl Platform characteristics checks 1969dnl ------------------------------------------------------------------------- 1970 1971dnl 1972dnl PHP_SHLIB_SUFFIX_NAMES 1973dnl 1974dnl Determines link library suffix SHLIB_SUFFIX_NAME 1975dnl which can be: .so, .sl or .dylib 1976dnl 1977dnl Determines shared library suffix SHLIB_DL_SUFFIX_NAME 1978dnl suffix can be: .so or .sl 1979dnl 1980AC_DEFUN([PHP_SHLIB_SUFFIX_NAMES],[ 1981 AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl 1982 PHP_SUBST_OLD(SHLIB_SUFFIX_NAME) 1983 PHP_SUBST_OLD(SHLIB_DL_SUFFIX_NAME) 1984 SHLIB_SUFFIX_NAME=so 1985 SHLIB_DL_SUFFIX_NAME=$SHLIB_SUFFIX_NAME 1986 case $host_alias in 1987 *hpux*[)] 1988 SHLIB_SUFFIX_NAME=sl 1989 SHLIB_DL_SUFFIX_NAME=sl 1990 ;; 1991 *darwin*[)] 1992 SHLIB_SUFFIX_NAME=dylib 1993 SHLIB_DL_SUFFIX_NAME=so 1994 ;; 1995 esac 1996]) 1997 1998dnl 1999dnl PHP_CHECK_64BIT([do if 32], [do if 64]) 2000dnl 2001dnl This macro is used to detect if we're at 64-bit platform or not. 2002dnl It could be useful for those external libs, that have different precompiled 2003dnl versions in different directories. 2004dnl 2005AC_DEFUN([PHP_CHECK_64BIT],[ 2006 AC_CHECK_SIZEOF(long int, 4) 2007 AC_MSG_CHECKING([checking if we're at 64-bit platform]) 2008 if test "$ac_cv_sizeof_long_int" = "4" ; then 2009 AC_MSG_RESULT([no]) 2010 $1 2011 else 2012 AC_MSG_RESULT([yes]) 2013 $2 2014 fi 2015]) 2016 2017dnl 2018dnl PHP_C_BIGENDIAN 2019dnl 2020dnl Replacement macro for AC_C_BIGENDIAN 2021dnl 2022AC_DEFUN([PHP_C_BIGENDIAN], 2023[AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php, 2024 [ 2025 ac_cv_c_bigendian_php=unknown 2026 AC_TRY_RUN( 2027 [ 2028int main(void) 2029{ 2030 short one = 1; 2031 char *cp = (char *)&one; 2032 2033 if (*cp == 0) { 2034 return(0); 2035 } else { 2036 return(1); 2037 } 2038} 2039 ], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown]) 2040 ]) 2041 if test $ac_cv_c_bigendian_php = yes; then 2042 AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word]) 2043 fi 2044]) 2045 2046dnl ------------------------------------------------------------------------- 2047dnl Checks for programs: PHP_PROG_<program> 2048dnl ------------------------------------------------------------------------- 2049 2050dnl 2051dnl PHP_PROG_SENDMAIL 2052dnl 2053dnl Search for the sendmail binary 2054dnl 2055AC_DEFUN([PHP_PROG_SENDMAIL], [ 2056 PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib 2057 AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH) 2058 PHP_SUBST(PROG_SENDMAIL) 2059]) 2060 2061dnl 2062dnl PHP_PROG_AWK 2063dnl 2064dnl Some vendors force mawk before gawk; mawk is broken so we don't like that 2065dnl 2066AC_DEFUN([PHP_PROG_AWK], [ 2067 AC_CHECK_PROGS(AWK, gawk nawk awk mawk, bork, /usr/xpg4/bin/:$PATH) 2068 case "$AWK" in 2069 *mawk) 2070 AC_MSG_WARN([mawk is known to have problems on some systems. You should install GNU awk]) 2071 ;; 2072 *gawk) 2073 ;; 2074 bork) 2075 AC_MSG_ERROR([Could not find awk; Install GNU awk]) 2076 ;; 2077 *) 2078 AC_MSG_CHECKING([if $AWK is broken]) 2079 if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then 2080 AC_MSG_RESULT([yes]) 2081 AC_MSG_ERROR([You should install GNU awk]) 2082 else 2083 AC_MSG_RESULT([no]) 2084 fi 2085 ;; 2086 esac 2087 PHP_SUBST(AWK) 2088]) 2089 2090dnl 2091dnl PHP_PROG_BISON 2092dnl 2093dnl Search for bison and check it's version 2094dnl 2095AC_DEFUN([PHP_PROG_BISON], [ 2096 AC_PROG_YACC 2097 LIBZEND_BISON_CHECK 2098 PHP_SUBST(YACC) 2099]) 2100 2101dnl 2102dnl PHP_PROG_LEX 2103dnl 2104dnl Search for (f)lex and check it's version 2105dnl 2106AC_DEFUN([PHP_PROG_LEX], [ 2107dnl we only support certain flex versions 2108 flex_version_list="2.5.4" 2109 2110 AC_PROG_LEX 2111 if test "$LEX" = "flex"; then 2112dnl AC_DECL_YYTEXT is obsolete since autoconf 2.50 and merged into AC_PROG_LEX 2113dnl this is what causes that annoying "PHP_PROG_LEX is expanded from" warning with autoconf 2.50+ 2114dnl it should be removed once we drop support of autoconf 2.13 (if ever) 2115 AC_DECL_YYTEXT 2116 : 2117 fi 2118 dnl ## Make flex scanners use const if they can, even if __STDC__ is not 2119 dnl ## true, for compilers like Sun's that only set __STDC__ true in 2120 dnl ## "limit-to-ANSI-standard" mode, not in "ANSI-compatible" mode 2121 AC_C_CONST 2122 if test "$ac_cv_c_const" = "yes" ; then 2123 LEX_CFLAGS="-DYY_USE_CONST" 2124 fi 2125 2126 if test "$LEX" = "flex"; then 2127 AC_CACHE_CHECK([for flex version], php_cv_flex_version, [ 2128 flex_version=`$LEX -V -v --version 2>/dev/null | $SED -e 's/^.* //'` 2129 php_cv_flex_version=invalid 2130 for flex_check_version in $flex_version_list; do 2131 if test "$flex_version" = "$flex_check_version"; then 2132 php_cv_flex_version="$flex_check_version (ok)" 2133 fi 2134 done 2135 ]) 2136 else 2137 flex_version=none 2138 fi 2139 2140 case $php_cv_flex_version in 2141 ""|invalid[)] 2142 if test -f "$abs_srcdir/Zend/zend_language_scanner.c" && test -f "$abs_srcdir/Zend/zend_ini_scanner.c"; then 2143 AC_MSG_WARN([flex versions supported for regeneration of the Zend/PHP parsers: $flex_version_list (found: $flex_version)]) 2144 else 2145 flex_msg="Supported flex versions are: $flex_version_list" 2146 if test "$flex_version" = "none"; then 2147 flex_msg="flex not found. flex is required to generate the Zend/PHP parsers! $flex_msg" 2148 else 2149 flex_msg="Found invalid flex version: $flex_version. $flex_msg" 2150 fi 2151 AC_MSG_ERROR([$flex_msg]) 2152 fi 2153 LEX="exit 0;" 2154 ;; 2155 esac 2156 PHP_SUBST(LEX) 2157]) 2158 2159dnl 2160dnl PHP_PROG_RE2C 2161dnl 2162dnl Search for the re2c binary and check the version 2163dnl 2164AC_DEFUN([PHP_PROG_RE2C],[ 2165 AC_CHECK_PROG(RE2C, re2c, re2c) 2166 if test -n "$RE2C"; then 2167 AC_CACHE_CHECK([for re2c version], php_cv_re2c_version, [ 2168 re2c_vernum=`$RE2C --vernum 2>/dev/null` 2169 if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1304"; then 2170 php_cv_re2c_version=invalid 2171 else 2172 php_cv_re2c_version="`$RE2C --version | cut -d ' ' -f 2 2>/dev/null` (ok)" 2173 fi 2174 ]) 2175 fi 2176 case $php_cv_re2c_version in 2177 ""|invalid[)] 2178 AC_MSG_WARN([You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.]) 2179 RE2C="exit 0;" 2180 ;; 2181 esac 2182 PHP_SUBST(RE2C) 2183]) 2184 2185dnl ------------------------------------------------------------------------- 2186dnl Common setup macros: PHP_SETUP_<what> 2187dnl ------------------------------------------------------------------------- 2188 2189dnl 2190dnl PHP_SETUP_ICU([shared-add]) 2191dnl 2192dnl Common setup macro for ICU 2193dnl 2194AC_DEFUN([PHP_SETUP_ICU],[ 2195 PHP_ARG_WITH(icu-dir,, 2196 [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no) 2197 2198 if test "$PHP_ICU_DIR" = "no"; then 2199 PHP_ICU_DIR=DEFAULT 2200 fi 2201 2202 if test "$PHP_ICU_DIR" = "DEFAULT"; then 2203 dnl Try to find icu-config 2204 AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin]) 2205 else 2206 ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config" 2207 fi 2208 2209 AC_MSG_CHECKING([for location of ICU headers and libraries]) 2210 2211 dnl Trust icu-config to know better what the install prefix is.. 2212 icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null` 2213 if test "$?" != "0" || test -z "$icu_install_prefix"; then 2214 AC_MSG_RESULT([not found]) 2215 AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.]) 2216 else 2217 AC_MSG_RESULT([$icu_install_prefix]) 2218 2219 dnl Check ICU version 2220 AC_MSG_CHECKING([for ICU 3.4 or greater]) 2221 icu_version_full=`$ICU_CONFIG --version` 2222 ac_IFS=$IFS 2223 IFS="." 2224 set $icu_version_full 2225 IFS=$ac_IFS 2226 icu_version=`expr [$]1 \* 1000 + [$]2` 2227 AC_MSG_RESULT([found $icu_version_full]) 2228 2229 if test "$icu_version" -lt "3004"; then 2230 AC_MSG_ERROR([ICU version 3.4 or later is required]) 2231 fi 2232 2233 ICU_VERSION=$icu_version 2234 ICU_INCS=`$ICU_CONFIG --cppflags-searchpath` 2235 ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio` 2236 PHP_EVAL_INCLINE($ICU_INCS) 2237 PHP_EVAL_LIBLINE($ICU_LIBS, $1) 2238 fi 2239]) 2240 2241dnl 2242dnl PHP_SETUP_KERBEROS(shared-add [, action-found [, action-not-found]]) 2243dnl 2244dnl Common setup macro for kerberos 2245dnl 2246AC_DEFUN([PHP_SETUP_KERBEROS],[ 2247 found_kerberos=no 2248 unset KERBEROS_CFLAGS 2249 unset KERBEROS_LIBS 2250 2251 dnl First try to find krb5-config 2252 if test -z "$KRB5_CONFIG"; then 2253 AC_PATH_PROG(KRB5_CONFIG, krb5-config, no, [$PATH:/usr/kerberos/bin:/usr/local/bin]) 2254 fi 2255 2256 dnl If krb5-config is found try using it 2257 if test "$PHP_KERBEROS" = "yes" && test -x "$KRB5_CONFIG"; then 2258 KERBEROS_LIBS=`$KRB5_CONFIG --libs gssapi` 2259 KERBEROS_CFLAGS=`$KRB5_CONFIG --cflags gssapi` 2260 2261 if test -n "$KERBEROS_LIBS" && test -n "$KERBEROS_CFLAGS"; then 2262 found_kerberos=yes 2263 PHP_EVAL_LIBLINE($KERBEROS_LIBS, $1) 2264 PHP_EVAL_INCLINE($KERBEROS_CFLAGS) 2265 fi 2266 fi 2267 2268 dnl If still not found use old skool method 2269 if test "$found_kerberos" = "no"; then 2270 2271 if test "$PHP_KERBEROS" = "yes"; then 2272 PHP_KERBEROS="/usr/kerberos /usr/local /usr" 2273 fi 2274 2275 for i in $PHP_KERBEROS; do 2276 if test -f $i/$PHP_LIBDIR/libkrb5.a || test -f $i/$PHP_LIBDIR/libkrb5.$SHLIB_SUFFIX_NAME; then 2277 PHP_KERBEROS_DIR=$i 2278 break 2279 fi 2280 done 2281 2282 if test "$PHP_KERBEROS_DIR"; then 2283 found_kerberos=yes 2284 PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/$PHP_LIBDIR, $1) 2285 PHP_ADD_LIBRARY(gssapi_krb5, 1, $1) 2286 PHP_ADD_LIBRARY(krb5, 1, $1) 2287 PHP_ADD_LIBRARY(k5crypto, 1, $1) 2288 PHP_ADD_LIBRARY(com_err, 1, $1) 2289 PHP_ADD_INCLUDE($PHP_KERBEROS_DIR/include) 2290 fi 2291 fi 2292 2293 if test "$found_kerberos" = "yes"; then 2294ifelse([$2],[],:,[$2]) 2295ifelse([$3],[],,[else $3]) 2296 fi 2297]) 2298 2299dnl 2300dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]]) 2301dnl 2302dnl Common setup macro for openssl 2303dnl 2304AC_DEFUN([PHP_SETUP_OPENSSL],[ 2305 found_openssl=no 2306 unset OPENSSL_INCDIR 2307 unset OPENSSL_LIBDIR 2308 2309 dnl Empty variable means 'no' 2310 test -z "$PHP_OPENSSL" && PHP_OPENSSL=no 2311 test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no 2312 2313 dnl Fallbacks for different configure options 2314 if test "$PHP_OPENSSL" != "no"; then 2315 PHP_OPENSSL_DIR=$PHP_OPENSSL 2316 elif test "$PHP_IMAP_SSL" != "no"; then 2317 PHP_OPENSSL_DIR=$PHP_IMAP_SSL 2318 fi 2319 2320 dnl First try to find pkg-config 2321 if test -z "$PKG_CONFIG"; then 2322 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 2323 fi 2324 2325 dnl If pkg-config is found try using it 2326 if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then 2327 if $PKG_CONFIG --atleast-version=0.9.6 openssl; then 2328 found_openssl=yes 2329 OPENSSL_LIBS=`$PKG_CONFIG --libs openssl` 2330 OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl` 2331 OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl` 2332 else 2333 AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.]) 2334 fi 2335 2336 if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then 2337 PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1) 2338 PHP_EVAL_INCLINE($OPENSSL_INCS) 2339 fi 2340 fi 2341 2342 dnl If pkg-config fails for some reason, revert to the old method 2343 if test "$found_openssl" = "no"; then 2344 2345 if test "$PHP_OPENSSL_DIR" = "yes"; then 2346 PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl" 2347 fi 2348 2349 for i in $PHP_OPENSSL_DIR; do 2350 if test -r $i/include/openssl/evp.h; then 2351 OPENSSL_INCDIR=$i/include 2352 fi 2353 if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then 2354 OPENSSL_LIBDIR=$i/$PHP_LIBDIR 2355 fi 2356 test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break 2357 done 2358 2359 if test -z "$OPENSSL_INCDIR"; then 2360 AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>]) 2361 fi 2362 2363 if test -z "$OPENSSL_LIBDIR"; then 2364 AC_MSG_ERROR([Cannot find OpenSSL's libraries]) 2365 fi 2366 2367 old_CPPFLAGS=$CPPFLAGS 2368 CPPFLAGS=-I$OPENSSL_INCDIR 2369 AC_MSG_CHECKING([for OpenSSL version]) 2370 AC_EGREP_CPP(yes,[ 2371#include <openssl/opensslv.h> 2372#if OPENSSL_VERSION_NUMBER >= 0x0090600fL 2373 yes 2374#endif 2375 ],[ 2376 AC_MSG_RESULT([>= 0.9.6]) 2377 ],[ 2378 AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.]) 2379 ]) 2380 CPPFLAGS=$old_CPPFLAGS 2381 2382 PHP_ADD_INCLUDE($OPENSSL_INCDIR) 2383 2384 PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [ 2385 PHP_ADD_LIBRARY(crypto,,$1) 2386 ],[ 2387 AC_MSG_ERROR([libcrypto not found!]) 2388 ],[ 2389 -L$OPENSSL_LIBDIR 2390 ]) 2391 2392 old_LIBS=$LIBS 2393 LIBS="$LIBS -lcrypto" 2394 PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [ 2395 found_openssl=yes 2396 ],[ 2397 AC_MSG_ERROR([libssl not found!]) 2398 ],[ 2399 -L$OPENSSL_LIBDIR 2400 ]) 2401 LIBS=$old_LIBS 2402 PHP_ADD_LIBRARY(ssl,,$1) 2403 2404 PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1) 2405 fi 2406 2407 if test "$found_openssl" = "yes"; then 2408 dnl For apache 1.3.x static build 2409 OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR 2410 AC_SUBST(OPENSSL_INCDIR_OPT) 2411 2412ifelse([$2],[],:,[$2]) 2413ifelse([$3],[],,[else $3]) 2414 fi 2415]) 2416 2417dnl 2418dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]]) 2419dnl 2420dnl Common setup macro for iconv 2421dnl 2422AC_DEFUN([PHP_SETUP_ICONV], [ 2423 found_iconv=no 2424 unset ICONV_DIR 2425 2426 # Create the directories for a VPATH build: 2427 $php_shtool mkdir -p ext/iconv 2428 2429 echo > ext/iconv/php_have_bsd_iconv.h 2430 echo > ext/iconv/php_have_ibm_iconv.h 2431 echo > ext/iconv/php_have_glibc_iconv.h 2432 echo > ext/iconv/php_have_libiconv.h 2433 echo > ext/iconv/php_have_iconv.h 2434 echo > ext/iconv/php_php_iconv_impl.h 2435 echo > ext/iconv/php_iconv_aliased_libiconv.h 2436 echo > ext/iconv/php_php_iconv_h_path.h 2437 echo > ext/iconv/php_iconv_supports_errno.h 2438 2439 dnl 2440 dnl Check libc first if no path is provided in --with-iconv 2441 dnl 2442 if test "$PHP_ICONV" = "yes"; then 2443 AC_CHECK_FUNC(iconv, [ 2444 found_iconv=yes 2445 ],[ 2446 AC_CHECK_FUNC(libiconv,[ 2447 PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv]) 2448 AC_DEFINE(HAVE_LIBICONV, 1, [ ]) 2449 found_iconv=yes 2450 ]) 2451 ]) 2452 fi 2453 2454 dnl 2455 dnl Check external libs for iconv funcs 2456 dnl 2457 if test "$found_iconv" = "no"; then 2458 2459 for i in $PHP_ICONV /usr/local /usr; do 2460 if test -r $i/include/giconv.h; then 2461 AC_DEFINE(HAVE_GICONV_H, 1, [ ]) 2462 ICONV_DIR=$i 2463 iconv_lib_name=giconv 2464 break 2465 elif test -r $i/include/iconv.h; then 2466 ICONV_DIR=$i 2467 iconv_lib_name=iconv 2468 break 2469 fi 2470 done 2471 2472 if test -z "$ICONV_DIR"; then 2473 AC_MSG_ERROR([Please specify the install prefix of iconv with --with-iconv=<DIR>]) 2474 fi 2475 2476 if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a || 2477 test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME 2478 then 2479 PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [ 2480 found_iconv=yes 2481 PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv]) 2482 AC_DEFINE(HAVE_LIBICONV,1,[ ]) 2483 PHP_DEFINE([ICONV_ALIASED_LIBICONV],1,[ext/iconv]) 2484 AC_DEFINE([ICONV_ALIASED_LIBICONV],1,[iconv() is aliased to libiconv() in -liconv]) 2485 ], [ 2486 PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [ 2487 found_iconv=yes 2488 ], [], [ 2489 -L$ICONV_DIR/$PHP_LIBDIR 2490 ]) 2491 ], [ 2492 -L$ICONV_DIR/$PHP_LIBDIR 2493 ]) 2494 fi 2495 fi 2496 2497 if test "$found_iconv" = "yes"; then 2498 PHP_DEFINE(HAVE_ICONV,1,[ext/iconv]) 2499 AC_DEFINE(HAVE_ICONV,1,[ ]) 2500 if test -n "$ICONV_DIR"; then 2501 PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/$PHP_LIBDIR, $1) 2502 PHP_ADD_INCLUDE($ICONV_DIR/include) 2503 fi 2504 $2 2505ifelse([$3],[],,[else $3]) 2506 fi 2507]) 2508 2509dnl 2510dnl PHP_SETUP_LIBXML(shared-add [, action-found [, action-not-found]]) 2511dnl 2512dnl Common setup macro for libxml 2513dnl 2514AC_DEFUN([PHP_SETUP_LIBXML], [ 2515AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path, 2516[ 2517 for i in $PHP_LIBXML_DIR /usr/local /usr; do 2518 if test -x "$i/bin/xml2-config"; then 2519 ac_cv_php_xml2_config_path="$i/bin/xml2-config" 2520 break 2521 fi 2522 done 2523]) 2524 2525 if test -x "$ac_cv_php_xml2_config_path"; then 2526 XML2_CONFIG="$ac_cv_php_xml2_config_path" 2527 libxml_full_version=`$XML2_CONFIG --version` 2528 ac_IFS=$IFS 2529 IFS="." 2530 set $libxml_full_version 2531 IFS=$ac_IFS 2532 LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3` 2533 if test "$LIBXML_VERSION" -ge "2006011"; then 2534 LIBXML_LIBS=`$XML2_CONFIG --libs` 2535 LIBXML_INCS=`$XML2_CONFIG --cflags` 2536 PHP_EVAL_LIBLINE($LIBXML_LIBS, $1) 2537 PHP_EVAL_INCLINE($LIBXML_INCS) 2538 2539 dnl Check that build works with given libs 2540 AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [ 2541 PHP_TEST_BUILD(xmlInitParser, 2542 [ 2543 php_cv_libxml_build_works=yes 2544 ], [ 2545 AC_MSG_RESULT(no) 2546 AC_MSG_ERROR([build test failed. Please check the config.log for details.]) 2547 ], [ 2548 [$]$1 2549 ]) 2550 ]) 2551 if test "$php_cv_libxml_build_works" = "yes"; then 2552 AC_DEFINE(HAVE_LIBXML, 1, [ ]) 2553 fi 2554 $2 2555 else 2556 AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.]) 2557 fi 2558ifelse([$3],[],,[else $3]) 2559 fi 2560]) 2561 2562dnl ------------------------------------------------------------------------- 2563dnl Misc. macros 2564dnl ------------------------------------------------------------------------- 2565 2566dnl 2567dnl PHP_INSTALL_HEADERS(path [, file ...]) 2568dnl 2569dnl PHP header files to be installed 2570dnl 2571AC_DEFUN([PHP_INSTALL_HEADERS],[ 2572 ifelse([$2],[],[ 2573 for header_file in $1; do 2574 PHP_RUN_ONCE(INSTALLHEADERS, $header_file, [ 2575 INSTALL_HEADERS="$INSTALL_HEADERS $header_file" 2576 ]) 2577 done 2578 ], [ 2579 header_path=$1 2580 for header_file in $2; do 2581 hp_hf="$header_path/$header_file" 2582 PHP_RUN_ONCE(INSTALLHEADERS, $hp_hf, [ 2583 INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf" 2584 ]) 2585 done 2586 ]) 2587]) 2588 2589dnl 2590dnl PHP_AP_EXTRACT_VERSION(/path/httpd) 2591dnl 2592dnl This macro is used to get a comparable 2593dnl version for apache1/2. 2594dnl 2595AC_DEFUN([PHP_AP_EXTRACT_VERSION],[ 2596 ac_output=`$1 -v 2>&1 | grep version` 2597 ac_IFS=$IFS 2598IFS="- /. 2599" 2600 set $ac_output 2601 IFS=$ac_IFS 2602 2603 APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6` 2604]) 2605 2606dnl 2607dnl PHP_DEBUG_MACRO(filename) 2608dnl 2609AC_DEFUN([PHP_DEBUG_MACRO],[ 2610 DEBUG_LOG=$1 2611 cat >$1 <<X 2612CONFIGURE: $CONFIGURE_COMMAND 2613CC: $CC 2614CFLAGS: $CFLAGS 2615CPPFLAGS: $CPPFLAGS 2616CXX: $CXX 2617CXXFLAGS: $CXXFLAGS 2618INCLUDES: $INCLUDES 2619LDFLAGS: $LDFLAGS 2620LIBS: $LIBS 2621DLIBS: $DLIBS 2622SAPI: $PHP_SAPI 2623PHP_RPATHS: $PHP_RPATHS 2624uname -a: `uname -a` 2625 2626X 2627 cat >conftest.$ac_ext <<X 2628main() 2629{ 2630 exit(0); 2631} 2632X 2633 (eval echo \"$ac_link\"; eval $ac_link && ./conftest) >>$1 2>&1 2634 rm -fr conftest* 2635]) 2636 2637dnl 2638dnl PHP_CONFIG_NICE(filename) 2639dnl 2640dnl Generates the config.nice file 2641dnl 2642AC_DEFUN([PHP_CONFIG_NICE],[ 2643 AC_REQUIRE([AC_PROG_EGREP]) 2644 AC_REQUIRE([LT_AC_PROG_SED]) 2645 PHP_SUBST_OLD(EGREP) 2646 PHP_SUBST_OLD(SED) 2647 test -f $1 && mv $1 $1.old 2648 rm -f $1.old 2649 cat >$1<<EOF 2650#! /bin/sh 2651# 2652# Created by configure 2653 2654EOF 2655 2656 for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS EXTRA_LDFLAGS_PROGRAM LIBS CC CXX; do 2657 eval val=\$$var 2658 if test -n "$val"; then 2659 echo "$var='$val' \\" >> $1 2660 fi 2661 done 2662 2663 echo "'[$]0' \\" >> $1 2664 if test `expr -- [$]0 : "'.*"` = 0; then 2665 CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'" 2666 else 2667 CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0" 2668 fi 2669 for arg in $ac_configure_args; do 2670 if test `expr -- $arg : "'.*"` = 0; then 2671 if test `expr -- $arg : "--.*"` = 0; then 2672 break; 2673 fi 2674 echo "'[$]arg' \\" >> $1 2675 CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'" 2676 else 2677 if test `expr -- $arg : "'--.*"` = 0; then 2678 break; 2679 fi 2680 echo "[$]arg \\" >> $1 2681 CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg" 2682 fi 2683 done 2684 echo '"[$]@"' >> $1 2685 chmod +x $1 2686 CONFIGURE_COMMAND="$CONFIGURE_COMMAND $CONFIGURE_OPTIONS" 2687 PHP_SUBST_OLD(CONFIGURE_COMMAND) 2688 PHP_SUBST_OLD(CONFIGURE_OPTIONS) 2689]) 2690 2691dnl 2692dnl PHP_CHECK_CONFIGURE_OPTIONS 2693dnl 2694AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[ 2695 for arg in $ac_configure_args; do 2696 case $arg in 2697 --with-*[)] 2698 arg_name="`echo [$]arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`" 2699 ;; 2700 --without-*[)] 2701 arg_name="`echo [$]arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`" 2702 ;; 2703 --enable-*[)] 2704 arg_name="`echo [$]arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`" 2705 ;; 2706 --disable-*[)] 2707 arg_name="`echo [$]arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`" 2708 ;; 2709 *[)] 2710 continue 2711 ;; 2712 esac 2713 case $arg_name in 2714 # Allow --disable-all / --enable-all 2715 enable-all[)];; 2716 2717 # Allow certain libtool options 2718 enable-libtool-lock | with-pic | with-tags | enable-shared | enable-static | enable-fast-install | with-gnu-ld[)];; 2719 2720 # Allow certain TSRM options 2721 with-tsrm-pth | with-tsrm-st | with-tsrm-pthreads[)];; 2722 2723 # Allow certain Zend options 2724 with-zend-vm | enable-maintainer-zts | enable-inline-optimization[)];; 2725 2726 # All the rest must be set using the PHP_ARG_* macros 2727 # PHP_ARG_* macros set php_enable_<arg_name> or php_with_<arg_name> 2728 *[)] 2729 # Options that exist before PHP 6 2730 if test "$PHP_MAJOR_VERSION" -lt "6"; then 2731 case $arg_name in 2732 enable-zend-multibyte[)] continue;; 2733 esac 2734 fi 2735 2736 is_arg_set=php_[]`echo [$]arg_name | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ-' 'abcdefghijklmnopqrstuvwxyz_'` 2737 if eval test "x\$$is_arg_set" = "x"; then 2738 PHP_UNKNOWN_CONFIGURE_OPTIONS="$PHP_UNKNOWN_CONFIGURE_OPTIONS 2739[$]arg" 2740 fi 2741 ;; 2742 esac 2743 done 2744]) 2745 2746dnl 2747dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]]) 2748dnl 2749AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[ 2750 AC_CACHE_CHECK([for PDO includes], pdo_inc_path, [ 2751 AC_MSG_CHECKING([for PDO includes]) 2752 if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then 2753 pdo_inc_path=$abs_srcdir/ext 2754 elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then 2755 pdo_inc_path=$abs_srcdir/ext 2756 elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then 2757 pdo_inc_path=$prefix/include/php/ext 2758 fi 2759 ]) 2760 if test -n "$pdo_inc_path"; then 2761ifelse([$1],[],:,[$1]) 2762 else 2763ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2]) 2764 fi 2765]) 2766 2767dnl 2768dnl PHP_DETECT_ICC 2769dnl Detect Intel C++ Compiler and unset $GCC if ICC found 2770AC_DEFUN([PHP_DETECT_ICC], 2771[ 2772 ICC="no" 2773 AC_MSG_CHECKING([for icc]) 2774 AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER], 2775 ICC="no" 2776 AC_MSG_RESULT([no]), 2777 ICC="yes" 2778 GCC="no" 2779 AC_MSG_RESULT([yes]) 2780 ) 2781]) 2782 2783dnl PHP_DETECT_SUNCC 2784dnl Detect if the systems default compiler is suncc. 2785dnl We also set some usefull CFLAGS if the user didn't set any 2786AC_DEFUN([PHP_DETECT_SUNCC],[ 2787 SUNCC="no" 2788 AC_MSG_CHECKING([for suncc]) 2789 AC_EGREP_CPP([^__SUNPRO_C], [__SUNPRO_C], 2790 SUNCC="no" 2791 AC_MSG_RESULT([no]), 2792 SUNCC="yes" 2793 GCC="no" 2794 test -n "$auto_cflags" && CFLAGS="-O -xs -xstrconst -zlazyload" 2795 GCC="" 2796 AC_MSG_RESULT([yes]) 2797 ) 2798]) 2799 2800dnl 2801dnl PHP_CRYPT_R_STYLE 2802dnl detect the style of crypt_r() is any is available 2803dnl see APR_CHECK_CRYPT_R_STYLE() for original version 2804dnl 2805AC_DEFUN([PHP_CRYPT_R_STYLE], 2806[ 2807 AC_CACHE_CHECK([which data struct is used by crypt_r], php_cv_crypt_r_style,[ 2808 php_cv_crypt_r_style=none 2809 AC_TRY_COMPILE([ 2810#define _REENTRANT 1 2811#include <crypt.h> 2812],[ 2813CRYPTD buffer; 2814crypt_r("passwd", "hash", &buffer); 2815], 2816php_cv_crypt_r_style=cryptd) 2817 2818 if test "$php_cv_crypt_r_style" = "none"; then 2819 AC_TRY_COMPILE([ 2820#define _REENTRANT 1 2821#include <crypt.h> 2822],[ 2823struct crypt_data buffer; 2824crypt_r("passwd", "hash", &buffer); 2825], 2826php_cv_crypt_r_style=struct_crypt_data) 2827 fi 2828 2829 if test "$php_cv_crypt_r_style" = "none"; then 2830 AC_TRY_COMPILE([ 2831#define _REENTRANT 1 2832#define _GNU_SOURCE 2833#include <crypt.h> 2834],[ 2835struct crypt_data buffer; 2836crypt_r("passwd", "hash", &buffer); 2837], 2838php_cv_crypt_r_style=struct_crypt_data_gnu_source) 2839 fi 2840 ]) 2841 2842 if test "$php_cv_crypt_r_style" = "cryptd"; then 2843 AC_DEFINE(CRYPT_R_CRYPTD, 1, [Define if crypt_r has uses CRYPTD]) 2844 fi 2845 if test "$php_cv_crypt_r_style" = "struct_crypt_data" -o "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then 2846 AC_DEFINE(CRYPT_R_STRUCT_CRYPT_DATA, 1, [Define if crypt_r uses struct crypt_data]) 2847 fi 2848 if test "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then 2849 AC_DEFINE(CRYPT_R_GNU_SOURCE, 1, [Define if struct crypt_data requires _GNU_SOURCE]) 2850 fi 2851 if test "$php_cv_crypt_r_style" = "none"; then 2852 AC_MSG_ERROR([Unable to detect data struct used by crypt_r]) 2853 fi 2854]) 2855 2856dnl 2857dnl PHP_TEST_WRITE_STDOUT 2858dnl 2859AC_DEFUN([PHP_TEST_WRITE_STDOUT],[ 2860 AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[ 2861 AC_TRY_RUN([ 2862#ifdef HAVE_UNISTD_H 2863#include <unistd.h> 2864#endif 2865 2866#define TEXT "This is the test message -- " 2867 2868main() 2869{ 2870 int n; 2871 2872 n = write(1, TEXT, sizeof(TEXT)-1); 2873 return (!(n == sizeof(TEXT)-1)); 2874} 2875 ],[ 2876 ac_cv_write_stdout=yes 2877 ],[ 2878 ac_cv_write_stdout=no 2879 ],[ 2880 ac_cv_write_stdout=no 2881 ]) 2882 ]) 2883 if test "$ac_cv_write_stdout" = "yes"; then 2884 AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works]) 2885 fi 2886]) 2887 2888# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2889# 2890# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2891# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 2892# Inc. 2893# Written by Gordon Matzigkeit, 1996 2894# 2895# This file is free software; the Free Software Foundation gives 2896# unlimited permission to copy and/or distribute it, with or without 2897# modifications, as long as this notice is preserved. 2898 2899m4_define([_LT_COPYING], [dnl 2900# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2901# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 2902# Inc. 2903# Written by Gordon Matzigkeit, 1996 2904# 2905# This file is part of GNU Libtool. 2906# 2907# GNU Libtool is free software; you can redistribute it and/or 2908# modify it under the terms of the GNU General Public License as 2909# published by the Free Software Foundation; either version 2 of 2910# the License, or (at your option) any later version. 2911# 2912# As a special exception to the GNU General Public License, 2913# if you distribute this file as part of a program or library that 2914# is built using GNU Libtool, you may include this file under the 2915# same distribution terms that you use for the rest of that program. 2916# 2917# GNU Libtool is distributed in the hope that it will be useful, 2918# but WITHOUT ANY WARRANTY; without even the implied warranty of 2919# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2920# GNU General Public License for more details. 2921# 2922# You should have received a copy of the GNU General Public License 2923# along with GNU Libtool; see the file COPYING. If not, a copy 2924# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 2925# obtained by writing to the Free Software Foundation, Inc., 2926# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 2927]) 2928 2929# serial 57 LT_INIT 2930 2931 2932# LT_PREREQ(VERSION) 2933# ------------------ 2934# Complain and exit if this libtool version is less that VERSION. 2935m4_defun([LT_PREREQ], 2936[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 2937 [m4_default([$3], 2938 [m4_fatal([Libtool version $1 or higher is required], 2939 63)])], 2940 [$2])]) 2941 2942 2943# _LT_CHECK_BUILDDIR 2944# ------------------ 2945# Complain if the absolute build directory name contains unusual characters 2946m4_defun([_LT_CHECK_BUILDDIR], 2947[case `pwd` in 2948 *\ * | *\ *) 2949 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 2950esac 2951]) 2952 2953 2954# LT_INIT([OPTIONS]) 2955# ------------------ 2956AC_DEFUN([LT_INIT], 2957[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 2958AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 2959AC_BEFORE([$0], [LT_LANG])dnl 2960AC_BEFORE([$0], [LT_OUTPUT])dnl 2961AC_BEFORE([$0], [LTDL_INIT])dnl 2962m4_require([_LT_CHECK_BUILDDIR])dnl 2963 2964dnl Autoconf doesn't catch unexpanded LT_ macros by default: 2965m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 2966m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 2967dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 2968dnl unless we require an AC_DEFUNed macro: 2969AC_REQUIRE([LTOPTIONS_VERSION])dnl 2970AC_REQUIRE([LTSUGAR_VERSION])dnl 2971AC_REQUIRE([LTVERSION_VERSION])dnl 2972AC_REQUIRE([LTOBSOLETE_VERSION])dnl 2973m4_require([_LT_PROG_LTMAIN])dnl 2974 2975_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 2976 2977dnl Parse OPTIONS 2978_LT_SET_OPTIONS([$0], [$1]) 2979 2980# This can be used to rebuild libtool when needed 2981LIBTOOL_DEPS="$ltmain" 2982 2983# Always use our own libtool. 2984LIBTOOL='$(SHELL) $(top_builddir)/libtool' 2985AC_SUBST(LIBTOOL)dnl 2986 2987_LT_SETUP 2988 2989# Only expand once: 2990m4_define([LT_INIT]) 2991])# LT_INIT 2992 2993# Old names: 2994AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 2995AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 2996dnl aclocal-1.4 backwards compatibility: 2997dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 2998dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 2999 3000 3001# _LT_CC_BASENAME(CC) 3002# ------------------- 3003# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 3004m4_defun([_LT_CC_BASENAME], 3005[for cc_temp in $1""; do 3006 case $cc_temp in 3007 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 3008 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 3009 \-*) ;; 3010 *) break;; 3011 esac 3012done 3013cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 3014]) 3015 3016 3017# _LT_FILEUTILS_DEFAULTS 3018# ---------------------- 3019# It is okay to use these file commands and assume they have been set 3020# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 3021m4_defun([_LT_FILEUTILS_DEFAULTS], 3022[: ${CP="cp -f"} 3023: ${MV="mv -f"} 3024: ${RM="rm -f"} 3025])# _LT_FILEUTILS_DEFAULTS 3026 3027 3028# _LT_SETUP 3029# --------- 3030m4_defun([_LT_SETUP], 3031[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3032AC_REQUIRE([AC_CANONICAL_BUILD])dnl 3033AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 3034AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3035 3036_LT_DECL([], [host_alias], [0], [The host system])dnl 3037_LT_DECL([], [host], [0])dnl 3038_LT_DECL([], [host_os], [0])dnl 3039dnl 3040_LT_DECL([], [build_alias], [0], [The build system])dnl 3041_LT_DECL([], [build], [0])dnl 3042_LT_DECL([], [build_os], [0])dnl 3043dnl 3044AC_REQUIRE([AC_PROG_CC])dnl 3045AC_REQUIRE([LT_PATH_LD])dnl 3046AC_REQUIRE([LT_PATH_NM])dnl 3047dnl 3048AC_REQUIRE([AC_PROG_LN_S])dnl 3049test -z "$LN_S" && LN_S="ln -s" 3050_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 3051dnl 3052AC_REQUIRE([LT_CMD_MAX_LEN])dnl 3053_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 3054_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 3055dnl 3056m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3057m4_require([_LT_CHECK_SHELL_FEATURES])dnl 3058m4_require([_LT_CMD_RELOAD])dnl 3059m4_require([_LT_CHECK_MAGIC_METHOD])dnl 3060m4_require([_LT_CMD_OLD_ARCHIVE])dnl 3061m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 3062 3063_LT_CONFIG_LIBTOOL_INIT([ 3064# See if we are running on zsh, and set the options which allow our 3065# commands through without removal of \ escapes INIT. 3066if test -n "\${ZSH_VERSION+set}" ; then 3067 setopt NO_GLOB_SUBST 3068fi 3069]) 3070if test -n "${ZSH_VERSION+set}" ; then 3071 setopt NO_GLOB_SUBST 3072fi 3073 3074_LT_CHECK_OBJDIR 3075 3076m4_require([_LT_TAG_COMPILER])dnl 3077 3078case $host_os in 3079aix3*) 3080 # AIX sometimes has problems with the GCC collect2 program. For some 3081 # reason, if we set the COLLECT_NAMES environment variable, the problems 3082 # vanish in a puff of smoke. 3083 if test "X${COLLECT_NAMES+set}" != Xset; then 3084 COLLECT_NAMES= 3085 export COLLECT_NAMES 3086 fi 3087 ;; 3088esac 3089 3090# Global variables: 3091ofile=libtool 3092can_build_shared=yes 3093 3094# All known linkers require a `.a' archive for static linking (except MSVC, 3095# which needs '.lib'). 3096libext=a 3097 3098with_gnu_ld="$lt_cv_prog_gnu_ld" 3099 3100old_CC="$CC" 3101old_CFLAGS="$CFLAGS" 3102 3103# Set sane defaults for various variables 3104test -z "$CC" && CC=cc 3105test -z "$LTCC" && LTCC=$CC 3106test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 3107test -z "$LD" && LD=ld 3108test -z "$ac_objext" && ac_objext=o 3109 3110_LT_CC_BASENAME([$compiler]) 3111 3112# Only perform the check for file, if the check method requires it 3113test -z "$MAGIC_CMD" && MAGIC_CMD=file 3114case $deplibs_check_method in 3115file_magic*) 3116 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 3117 _LT_PATH_MAGIC 3118 fi 3119 ;; 3120esac 3121 3122# Use C for the default configuration in the libtool script 3123LT_SUPPORTED_TAG([CC]) 3124_LT_LANG_C_CONFIG 3125_LT_LANG_DEFAULT_CONFIG 3126_LT_CONFIG_COMMANDS 3127])# _LT_SETUP 3128 3129 3130# _LT_PREPARE_SED_QUOTE_VARS 3131# -------------------------- 3132# Define a few sed substitution that help us do robust quoting. 3133m4_defun([_LT_PREPARE_SED_QUOTE_VARS], 3134[# Backslashify metacharacters that are still active within 3135# double-quoted strings. 3136sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 3137 3138# Same as above, but do not quote variable references. 3139double_quote_subst='s/\([["`\\]]\)/\\\1/g' 3140 3141# Sed substitution to delay expansion of an escaped shell variable in a 3142# double_quote_subst'ed string. 3143delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 3144 3145# Sed substitution to delay expansion of an escaped single quote. 3146delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 3147 3148# Sed substitution to avoid accidental globbing in evaled expressions 3149no_glob_subst='s/\*/\\\*/g' 3150]) 3151 3152# _LT_PROG_LTMAIN 3153# --------------- 3154# Note that this code is called both from `configure', and `config.status' 3155# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3156# `config.status' has no value for ac_aux_dir unless we are using Automake, 3157# so we pass a copy along to make sure it has a sensible value anyway. 3158m4_defun([_LT_PROG_LTMAIN], 3159[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3160_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3161ltmain="$ac_aux_dir/ltmain.sh" 3162])# _LT_PROG_LTMAIN 3163 3164 3165## ------------------------------------- ## 3166## Accumulate code for creating libtool. ## 3167## ------------------------------------- ## 3168 3169# So that we can recreate a full libtool script including additional 3170# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3171# in macros and then make a single call at the end using the `libtool' 3172# label. 3173 3174 3175# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3176# ---------------------------------------- 3177# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3178m4_define([_LT_CONFIG_LIBTOOL_INIT], 3179[m4_ifval([$1], 3180 [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3181 [$1 3182])])]) 3183 3184# Initialize. 3185m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3186 3187 3188# _LT_CONFIG_LIBTOOL([COMMANDS]) 3189# ------------------------------ 3190# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3191m4_define([_LT_CONFIG_LIBTOOL], 3192[m4_ifval([$1], 3193 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3194 [$1 3195])])]) 3196 3197# Initialize. 3198m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3199 3200 3201# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3202# ----------------------------------------------------- 3203m4_defun([_LT_CONFIG_SAVE_COMMANDS], 3204[_LT_CONFIG_LIBTOOL([$1]) 3205_LT_CONFIG_LIBTOOL_INIT([$2]) 3206]) 3207 3208 3209# _LT_FORMAT_COMMENT([COMMENT]) 3210# ----------------------------- 3211# Add leading comment marks to the start of each line, and a trailing 3212# full-stop to the whole comment if one is not present already. 3213m4_define([_LT_FORMAT_COMMENT], 3214[m4_ifval([$1], [ 3215m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3216 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3217)]) 3218 3219 3220 3221## ------------------------ ## 3222## FIXME: Eliminate VARNAME ## 3223## ------------------------ ## 3224 3225 3226# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3227# ------------------------------------------------------------------- 3228# CONFIGNAME is the name given to the value in the libtool script. 3229# VARNAME is the (base) name used in the configure script. 3230# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3231# VARNAME. Any other value will be used directly. 3232m4_define([_LT_DECL], 3233[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3234 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3235 [m4_ifval([$1], [$1], [$2])]) 3236 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3237 m4_ifval([$4], 3238 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3239 lt_dict_add_subkey([lt_decl_dict], [$2], 3240 [tagged?], [m4_ifval([$5], [yes], [no])])]) 3241]) 3242 3243 3244# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3245# -------------------------------------------------------- 3246m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3247 3248 3249# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3250# ------------------------------------------------ 3251m4_define([lt_decl_tag_varnames], 3252[_lt_decl_filter([tagged?], [yes], $@)]) 3253 3254 3255# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3256# --------------------------------------------------------- 3257m4_define([_lt_decl_filter], 3258[m4_case([$#], 3259 [0], [m4_fatal([$0: too few arguments: $#])], 3260 [1], [m4_fatal([$0: too few arguments: $#: $1])], 3261 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3262 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3263 [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3264]) 3265 3266 3267# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3268# -------------------------------------------------- 3269m4_define([lt_decl_quote_varnames], 3270[_lt_decl_filter([value], [1], $@)]) 3271 3272 3273# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3274# --------------------------------------------------- 3275m4_define([lt_decl_dquote_varnames], 3276[_lt_decl_filter([value], [2], $@)]) 3277 3278 3279# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3280# --------------------------------------------------- 3281m4_define([lt_decl_varnames_tagged], 3282[m4_assert([$# <= 2])dnl 3283_$0(m4_quote(m4_default([$1], [[, ]])), 3284 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 3285 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 3286m4_define([_lt_decl_varnames_tagged], 3287[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3288 3289 3290# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 3291# ------------------------------------------------ 3292m4_define([lt_decl_all_varnames], 3293[_$0(m4_quote(m4_default([$1], [[, ]])), 3294 m4_if([$2], [], 3295 m4_quote(lt_decl_varnames), 3296 m4_quote(m4_shift($@))))[]dnl 3297]) 3298m4_define([_lt_decl_all_varnames], 3299[lt_join($@, lt_decl_varnames_tagged([$1], 3300 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 3301]) 3302 3303 3304# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 3305# ------------------------------------ 3306# Quote a variable value, and forward it to `config.status' so that its 3307# declaration there will have the same value as in `configure'. VARNAME 3308# must have a single quote delimited value for this to work. 3309m4_define([_LT_CONFIG_STATUS_DECLARE], 3310[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 3311 3312 3313# _LT_CONFIG_STATUS_DECLARATIONS 3314# ------------------------------ 3315# We delimit libtool config variables with single quotes, so when 3316# we write them to config.status, we have to be sure to quote all 3317# embedded single quotes properly. In configure, this macro expands 3318# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 3319# 3320# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 3321m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 3322[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 3323 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 3324 3325 3326# _LT_LIBTOOL_TAGS 3327# ---------------- 3328# Output comment and list of tags supported by the script 3329m4_defun([_LT_LIBTOOL_TAGS], 3330[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 3331available_tags="_LT_TAGS"dnl 3332]) 3333 3334 3335# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 3336# ----------------------------------- 3337# Extract the dictionary values for VARNAME (optionally with TAG) and 3338# expand to a commented shell variable setting: 3339# 3340# # Some comment about what VAR is for. 3341# visible_name=$lt_internal_name 3342m4_define([_LT_LIBTOOL_DECLARE], 3343[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 3344 [description])))[]dnl 3345m4_pushdef([_libtool_name], 3346 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 3347m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 3348 [0], [_libtool_name=[$]$1], 3349 [1], [_libtool_name=$lt_[]$1], 3350 [2], [_libtool_name=$lt_[]$1], 3351 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 3352m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 3353]) 3354 3355 3356# _LT_LIBTOOL_CONFIG_VARS 3357# ----------------------- 3358# Produce commented declarations of non-tagged libtool config variables 3359# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 3360# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 3361# section) are produced by _LT_LIBTOOL_TAG_VARS. 3362m4_defun([_LT_LIBTOOL_CONFIG_VARS], 3363[m4_foreach([_lt_var], 3364 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 3365 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 3366 3367 3368# _LT_LIBTOOL_TAG_VARS(TAG) 3369# ------------------------- 3370m4_define([_LT_LIBTOOL_TAG_VARS], 3371[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 3372 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 3373 3374 3375# _LT_TAGVAR(VARNAME, [TAGNAME]) 3376# ------------------------------ 3377m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 3378 3379 3380# _LT_CONFIG_COMMANDS 3381# ------------------- 3382# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3383# variables for single and double quote escaping we saved from calls 3384# to _LT_DECL, we can put quote escaped variables declarations 3385# into `config.status', and then the shell code to quote escape them in 3386# for loops in `config.status'. Finally, any additional code accumulated 3387# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3388m4_defun([_LT_CONFIG_COMMANDS], 3389[AC_PROVIDE_IFELSE([LT_OUTPUT], 3390 dnl If the libtool generation code has been placed in $CONFIG_LT, 3391 dnl instead of duplicating it all over again into config.status, 3392 dnl then we will have config.status run $CONFIG_LT later, so it 3393 dnl needs to know what name is stored there: 3394 [AC_CONFIG_COMMANDS([libtool], 3395 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3396 dnl If the libtool generation code is destined for config.status, 3397 dnl expand the accumulated commands and init code now: 3398 [AC_CONFIG_COMMANDS([libtool], 3399 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3400])#_LT_CONFIG_COMMANDS 3401 3402 3403# Initialize. 3404m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3405[ 3406 3407# The HP-UX ksh and POSIX shell print the target directory to stdout 3408# if CDPATH is set. 3409(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3410 3411sed_quote_subst='$sed_quote_subst' 3412double_quote_subst='$double_quote_subst' 3413delay_variable_subst='$delay_variable_subst' 3414_LT_CONFIG_STATUS_DECLARATIONS 3415LTCC='$LTCC' 3416LTCFLAGS='$LTCFLAGS' 3417compiler='$compiler_DEFAULT' 3418 3419# A function that is used when there is no print builtin or printf. 3420func_fallback_echo () 3421{ 3422 eval 'cat <<_LTECHO_EOF 3423\$[]1 3424_LTECHO_EOF' 3425} 3426 3427# Quote evaled strings. 3428for var in lt_decl_all_varnames([[ \ 3429]], lt_decl_quote_varnames); do 3430 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3431 *[[\\\\\\\`\\"\\\$]]*) 3432 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 3433 ;; 3434 *) 3435 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3436 ;; 3437 esac 3438done 3439 3440# Double-quote double-evaled strings. 3441for var in lt_decl_all_varnames([[ \ 3442]], lt_decl_dquote_varnames); do 3443 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3444 *[[\\\\\\\`\\"\\\$]]*) 3445 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 3446 ;; 3447 *) 3448 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3449 ;; 3450 esac 3451done 3452 3453_LT_OUTPUT_LIBTOOL_INIT 3454]) 3455 3456# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3457# ------------------------------------ 3458# Generate a child script FILE with all initialization necessary to 3459# reuse the environment learned by the parent script, and make the 3460# file executable. If COMMENT is supplied, it is inserted after the 3461# `#!' sequence but before initialization text begins. After this 3462# macro, additional text can be appended to FILE to form the body of 3463# the child script. The macro ends with non-zero status if the 3464# file could not be fully written (such as if the disk is full). 3465m4_ifdef([AS_INIT_GENERATED], 3466[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 3467[m4_defun([_LT_GENERATED_FILE_INIT], 3468[m4_require([AS_PREPARE])]dnl 3469[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 3470[lt_write_fail=0 3471cat >$1 <<_ASEOF || lt_write_fail=1 3472#! $SHELL 3473# Generated by $as_me. 3474$2 3475SHELL=\${CONFIG_SHELL-$SHELL} 3476export SHELL 3477_ASEOF 3478cat >>$1 <<\_ASEOF || lt_write_fail=1 3479AS_SHELL_SANITIZE 3480_AS_PREPARE 3481exec AS_MESSAGE_FD>&1 3482_ASEOF 3483test $lt_write_fail = 0 && chmod +x $1[]dnl 3484m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 3485 3486# LT_OUTPUT 3487# --------- 3488# This macro allows early generation of the libtool script (before 3489# AC_OUTPUT is called), incase it is used in configure for compilation 3490# tests. 3491AC_DEFUN([LT_OUTPUT], 3492[: ${CONFIG_LT=./config.lt} 3493AC_MSG_NOTICE([creating $CONFIG_LT]) 3494_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 3495[# Run this file to recreate a libtool stub with the current configuration.]) 3496 3497cat >>"$CONFIG_LT" <<\_LTEOF 3498lt_cl_silent=false 3499exec AS_MESSAGE_LOG_FD>>config.log 3500{ 3501 echo 3502 AS_BOX([Running $as_me.]) 3503} >&AS_MESSAGE_LOG_FD 3504 3505lt_cl_help="\ 3506\`$as_me' creates a local libtool stub from the current configuration, 3507for use in further configure time tests before the real libtool is 3508generated. 3509 3510Usage: $[0] [[OPTIONS]] 3511 3512 -h, --help print this help, then exit 3513 -V, --version print version number, then exit 3514 -q, --quiet do not print progress messages 3515 -d, --debug don't remove temporary files 3516 3517Report bugs to <bug-libtool@gnu.org>." 3518 3519lt_cl_version="\ 3520m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 3521m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 3522configured by $[0], generated by m4_PACKAGE_STRING. 3523 3524Copyright (C) 2010 Free Software Foundation, Inc. 3525This config.lt script is free software; the Free Software Foundation 3526gives unlimited permision to copy, distribute and modify it." 3527 3528while test $[#] != 0 3529do 3530 case $[1] in 3531 --version | --v* | -V ) 3532 echo "$lt_cl_version"; exit 0 ;; 3533 --help | --h* | -h ) 3534 echo "$lt_cl_help"; exit 0 ;; 3535 --debug | --d* | -d ) 3536 debug=: ;; 3537 --quiet | --q* | --silent | --s* | -q ) 3538 lt_cl_silent=: ;; 3539 3540 -*) AC_MSG_ERROR([unrecognized option: $[1] 3541Try \`$[0] --help' for more information.]) ;; 3542 3543 *) AC_MSG_ERROR([unrecognized argument: $[1] 3544Try \`$[0] --help' for more information.]) ;; 3545 esac 3546 shift 3547done 3548 3549if $lt_cl_silent; then 3550 exec AS_MESSAGE_FD>/dev/null 3551fi 3552_LTEOF 3553 3554cat >>"$CONFIG_LT" <<_LTEOF 3555_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 3556_LTEOF 3557 3558cat >>"$CONFIG_LT" <<\_LTEOF 3559AC_MSG_NOTICE([creating $ofile]) 3560_LT_OUTPUT_LIBTOOL_COMMANDS 3561AS_EXIT(0) 3562_LTEOF 3563chmod +x "$CONFIG_LT" 3564 3565# configure is writing to config.log, but config.lt does its own redirection, 3566# appending to config.log, which fails on DOS, as config.log is still kept 3567# open by configure. Here we exec the FD to /dev/null, effectively closing 3568# config.log, so it can be properly (re)opened and appended to by config.lt. 3569lt_cl_success=: 3570test "$silent" = yes && 3571 lt_config_lt_args="$lt_config_lt_args --quiet" 3572exec AS_MESSAGE_LOG_FD>/dev/null 3573$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 3574exec AS_MESSAGE_LOG_FD>>config.log 3575$lt_cl_success || AS_EXIT(1) 3576])# LT_OUTPUT 3577 3578 3579# _LT_CONFIG(TAG) 3580# --------------- 3581# If TAG is the built-in tag, create an initial libtool script with a 3582# default configuration from the untagged config vars. Otherwise add code 3583# to config.status for appending the configuration named by TAG from the 3584# matching tagged config vars. 3585m4_defun([_LT_CONFIG], 3586[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3587_LT_CONFIG_SAVE_COMMANDS([ 3588 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 3589 m4_if(_LT_TAG, [C], [ 3590 # See if we are running on zsh, and set the options which allow our 3591 # commands through without removal of \ escapes. 3592 if test -n "${ZSH_VERSION+set}" ; then 3593 setopt NO_GLOB_SUBST 3594 fi 3595 3596 cfgfile="${ofile}T" 3597 trap "$RM \"$cfgfile\"; exit 1" 1 2 15 3598 $RM "$cfgfile" 3599 3600 cat <<_LT_EOF >> "$cfgfile" 3601#! $SHELL 3602 3603# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 3604# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 3605# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 3606# NOTE: Changes made to this file will be lost: look at ltmain.sh. 3607# 3608_LT_COPYING 3609_LT_LIBTOOL_TAGS 3610 3611# ### BEGIN LIBTOOL CONFIG 3612_LT_LIBTOOL_CONFIG_VARS 3613_LT_LIBTOOL_TAG_VARS 3614# ### END LIBTOOL CONFIG 3615 3616_LT_EOF 3617 3618 case $host_os in 3619 aix3*) 3620 cat <<\_LT_EOF >> "$cfgfile" 3621# AIX sometimes has problems with the GCC collect2 program. For some 3622# reason, if we set the COLLECT_NAMES environment variable, the problems 3623# vanish in a puff of smoke. 3624if test "X${COLLECT_NAMES+set}" != Xset; then 3625 COLLECT_NAMES= 3626 export COLLECT_NAMES 3627fi 3628_LT_EOF 3629 ;; 3630 esac 3631 3632 _LT_PROG_LTMAIN 3633 3634 # We use sed instead of cat because bash on DJGPP gets confused if 3635 # if finds mixed CR/LF and LF-only lines. Since sed operates in 3636 # text mode, it properly converts lines to CR/LF. This bash problem 3637 # is reportedly fixed, but why not run on old versions too? 3638 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 3639 || (rm -f "$cfgfile"; exit 1) 3640 3641 _LT_PROG_XSI_SHELLFNS 3642 3643 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 3644 || (rm -f "$cfgfile"; exit 1) 3645 3646 mv -f "$cfgfile" "$ofile" || 3647 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 3648 chmod +x "$ofile" 3649], 3650[cat <<_LT_EOF >> "$ofile" 3651 3652dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 3653dnl in a comment (ie after a #). 3654# ### BEGIN LIBTOOL TAG CONFIG: $1 3655_LT_LIBTOOL_TAG_VARS(_LT_TAG) 3656# ### END LIBTOOL TAG CONFIG: $1 3657_LT_EOF 3658])dnl /m4_if 3659], 3660[m4_if([$1], [], [ 3661 PACKAGE='$PACKAGE' 3662 VERSION='$VERSION' 3663 TIMESTAMP='$TIMESTAMP' 3664 RM='$RM' 3665 ofile='$ofile'], []) 3666])dnl /_LT_CONFIG_SAVE_COMMANDS 3667])# _LT_CONFIG 3668 3669 3670# LT_SUPPORTED_TAG(TAG) 3671# --------------------- 3672# Trace this macro to discover what tags are supported by the libtool 3673# --tag option, using: 3674# autoconf --trace 'LT_SUPPORTED_TAG:$1' 3675AC_DEFUN([LT_SUPPORTED_TAG], []) 3676 3677 3678# C support is built-in for now 3679m4_define([_LT_LANG_C_enabled], []) 3680m4_define([_LT_TAGS], []) 3681 3682 3683# LT_LANG(LANG) 3684# ------------- 3685# Enable libtool support for the given language if not already enabled. 3686AC_DEFUN([LT_LANG], 3687[AC_BEFORE([$0], [LT_OUTPUT])dnl 3688m4_case([$1], 3689 [C], [_LT_LANG(C)], 3690 [C++], [_LT_LANG(CXX)], 3691 [Java], [_LT_LANG(GCJ)], 3692 [Fortran 77], [_LT_LANG(F77)], 3693 [Fortran], [_LT_LANG(FC)], 3694 [Windows Resource], [_LT_LANG(RC)], 3695 [m4_ifdef([_LT_LANG_]$1[_CONFIG], 3696 [_LT_LANG($1)], 3697 [m4_fatal([$0: unsupported language: "$1"])])])dnl 3698])# LT_LANG 3699 3700 3701# _LT_LANG(LANGNAME) 3702# ------------------ 3703m4_defun([_LT_LANG], 3704[m4_ifdef([_LT_LANG_]$1[_enabled], [], 3705 [LT_SUPPORTED_TAG([$1])dnl 3706 m4_append([_LT_TAGS], [$1 ])dnl 3707 m4_define([_LT_LANG_]$1[_enabled], [])dnl 3708 _LT_LANG_$1_CONFIG($1)])dnl 3709])# _LT_LANG 3710 3711 3712# _LT_LANG_DEFAULT_CONFIG 3713# ----------------------- 3714m4_defun([_LT_LANG_DEFAULT_CONFIG], 3715[AC_PROVIDE_IFELSE([AC_PROG_CXX], 3716 [LT_LANG(CXX)], 3717 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 3718 3719AC_PROVIDE_IFELSE([AC_PROG_F77], 3720 [LT_LANG(F77)], 3721 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 3722 3723AC_PROVIDE_IFELSE([AC_PROG_FC], 3724 [LT_LANG(FC)], 3725 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 3726 3727dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 3728dnl pulling things in needlessly. 3729AC_PROVIDE_IFELSE([AC_PROG_GCJ], 3730 [LT_LANG(GCJ)], 3731 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 3732 [LT_LANG(GCJ)], 3733 [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 3734 [LT_LANG(GCJ)], 3735 [m4_ifdef([AC_PROG_GCJ], 3736 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 3737 m4_ifdef([A][M_PROG_GCJ], 3738 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 3739 m4_ifdef([LT_PROG_GCJ], 3740 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 3741 3742AC_PROVIDE_IFELSE([LT_PROG_RC], 3743 [LT_LANG(RC)], 3744 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 3745])# _LT_LANG_DEFAULT_CONFIG 3746 3747# Obsolete macros: 3748AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 3749AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 3750AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 3751AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 3752AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 3753dnl aclocal-1.4 backwards compatibility: 3754dnl AC_DEFUN([AC_LIBTOOL_CXX], []) 3755dnl AC_DEFUN([AC_LIBTOOL_F77], []) 3756dnl AC_DEFUN([AC_LIBTOOL_FC], []) 3757dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 3758dnl AC_DEFUN([AC_LIBTOOL_RC], []) 3759 3760 3761# _LT_TAG_COMPILER 3762# ---------------- 3763m4_defun([_LT_TAG_COMPILER], 3764[AC_REQUIRE([AC_PROG_CC])dnl 3765 3766_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 3767_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 3768_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 3769_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 3770 3771# If no C compiler was specified, use CC. 3772LTCC=${LTCC-"$CC"} 3773 3774# If no C compiler flags were specified, use CFLAGS. 3775LTCFLAGS=${LTCFLAGS-"$CFLAGS"} 3776 3777# Allow CC to be a program name with arguments. 3778compiler=$CC 3779])# _LT_TAG_COMPILER 3780 3781 3782# _LT_COMPILER_BOILERPLATE 3783# ------------------------ 3784# Check for compiler boilerplate output or warnings with 3785# the simple compiler test code. 3786m4_defun([_LT_COMPILER_BOILERPLATE], 3787[m4_require([_LT_DECL_SED])dnl 3788ac_outfile=conftest.$ac_objext 3789echo "$lt_simple_compile_test_code" >conftest.$ac_ext 3790eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3791_lt_compiler_boilerplate=`cat conftest.err` 3792$RM conftest* 3793])# _LT_COMPILER_BOILERPLATE 3794 3795 3796# _LT_LINKER_BOILERPLATE 3797# ---------------------- 3798# Check for linker boilerplate output or warnings with 3799# the simple link test code. 3800m4_defun([_LT_LINKER_BOILERPLATE], 3801[m4_require([_LT_DECL_SED])dnl 3802ac_outfile=conftest.$ac_objext 3803echo "$lt_simple_link_test_code" >conftest.$ac_ext 3804eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3805_lt_linker_boilerplate=`cat conftest.err` 3806$RM -r conftest* 3807])# _LT_LINKER_BOILERPLATE 3808 3809# _LT_REQUIRED_DARWIN_CHECKS 3810# ------------------------- 3811m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 3812 case $host_os in 3813 rhapsody* | darwin*) 3814 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 3815 AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 3816 AC_CHECK_TOOL([LIPO], [lipo], [:]) 3817 AC_CHECK_TOOL([OTOOL], [otool], [:]) 3818 AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 3819 _LT_DECL([], [DSYMUTIL], [1], 3820 [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 3821 _LT_DECL([], [NMEDIT], [1], 3822 [Tool to change global to local symbols on Mac OS X]) 3823 _LT_DECL([], [LIPO], [1], 3824 [Tool to manipulate fat objects and archives on Mac OS X]) 3825 _LT_DECL([], [OTOOL], [1], 3826 [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 3827 _LT_DECL([], [OTOOL64], [1], 3828 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 3829 3830 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 3831 [lt_cv_apple_cc_single_mod=no 3832 if test -z "${LT_MULTI_MODULE}"; then 3833 # By default we will add the -single_module flag. You can override 3834 # by either setting the environment variable LT_MULTI_MODULE 3835 # non-empty at configure time, or by adding -multi_module to the 3836 # link flags. 3837 rm -rf libconftest.dylib* 3838 echo "int foo(void){return 1;}" > conftest.c 3839 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3840-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 3841 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3842 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 3843 _lt_result=$? 3844 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 3845 lt_cv_apple_cc_single_mod=yes 3846 else 3847 cat conftest.err >&AS_MESSAGE_LOG_FD 3848 fi 3849 rm -rf libconftest.dylib* 3850 rm -f conftest.* 3851 fi]) 3852 AC_CACHE_CHECK([for -exported_symbols_list linker flag], 3853 [lt_cv_ld_exported_symbols_list], 3854 [lt_cv_ld_exported_symbols_list=no 3855 save_LDFLAGS=$LDFLAGS 3856 echo "_main" > conftest.sym 3857 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 3858 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3859 [lt_cv_ld_exported_symbols_list=yes], 3860 [lt_cv_ld_exported_symbols_list=no]) 3861 LDFLAGS="$save_LDFLAGS" 3862 ]) 3863 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 3864 [lt_cv_ld_force_load=no 3865 cat > conftest.c << _LT_EOF 3866int forced_loaded() { return 2;} 3867_LT_EOF 3868 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 3869 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 3870 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 3871 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 3872 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 3873 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 3874 cat > conftest.c << _LT_EOF 3875int main() { return 0;} 3876_LT_EOF 3877 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 3878 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 3879 _lt_result=$? 3880 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 3881 lt_cv_ld_force_load=yes 3882 else 3883 cat conftest.err >&AS_MESSAGE_LOG_FD 3884 fi 3885 rm -f conftest.err libconftest.a conftest conftest.c 3886 rm -rf conftest.dSYM 3887 ]) 3888 case $host_os in 3889 rhapsody* | darwin1.[[012]]) 3890 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 3891 darwin1.*) 3892 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3893 darwin*) # darwin 5.x on 3894 # if running on 10.5 or later, the deployment target defaults 3895 # to the OS version, if on x86, and 10.4, the deployment 3896 # target defaults to 10.4. Don't you love it? 3897 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 3898 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3899 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3900 10.[[012]]*) 3901 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3902 10.*) 3903 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3904 esac 3905 ;; 3906 esac 3907 if test "$lt_cv_apple_cc_single_mod" = "yes"; then 3908 _lt_dar_single_mod='$single_module' 3909 fi 3910 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 3911 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 3912 else 3913 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 3914 fi 3915 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 3916 _lt_dsymutil='~$DSYMUTIL $lib || :' 3917 else 3918 _lt_dsymutil= 3919 fi 3920 ;; 3921 esac 3922]) 3923 3924 3925# _LT_DARWIN_LINKER_FEATURES 3926# -------------------------- 3927# Checks for linker and compiler features on darwin 3928m4_defun([_LT_DARWIN_LINKER_FEATURES], 3929[ 3930 m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 3931 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 3932 _LT_TAGVAR(hardcode_direct, $1)=no 3933 _LT_TAGVAR(hardcode_automatic, $1)=yes 3934 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3935 if test "$lt_cv_ld_force_load" = "yes"; then 3936 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 3937 else 3938 _LT_TAGVAR(whole_archive_flag_spec, $1)='' 3939 fi 3940 _LT_TAGVAR(link_all_deplibs, $1)=yes 3941 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3942 case $cc_basename in 3943 ifort*) _lt_dar_can_shared=yes ;; 3944 *) _lt_dar_can_shared=$GCC ;; 3945 esac 3946 if test "$_lt_dar_can_shared" = "yes"; then 3947 output_verbose_link_cmd=func_echo_all 3948 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" 3949 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3950 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" 3951 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" 3952 m4_if([$1], [CXX], 3953[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3954 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" 3955 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" 3956 fi 3957],[]) 3958 else 3959 _LT_TAGVAR(ld_shlibs, $1)=no 3960 fi 3961]) 3962 3963# _LT_SYS_MODULE_PATH_AIX 3964# ----------------------- 3965# Links a minimal program and checks the executable 3966# for the system default hardcoded library path. In most cases, 3967# this is /usr/lib:/lib, but when the MPI compilers are used 3968# the location of the communication and MPI libs are included too. 3969# If we don't find anything, use the default library path according 3970# to the aix ld manual. 3971m4_defun([_LT_SYS_MODULE_PATH_AIX], 3972[m4_require([_LT_DECL_SED])dnl 3973AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 3974lt_aix_libpath_sed=' 3975 /Import File Strings/,/^$/ { 3976 /^0/ { 3977 s/^0 *\(.*\)$/\1/ 3978 p 3979 } 3980 }' 3981aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3982# Check for a 64-bit object if we didn't find anything. 3983if test -z "$aix_libpath"; then 3984 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 3985fi],[]) 3986if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 3987])# _LT_SYS_MODULE_PATH_AIX 3988 3989 3990# _LT_SHELL_INIT(ARG) 3991# ------------------- 3992m4_define([_LT_SHELL_INIT], 3993[m4_divert_text([M4SH-INIT], [$1 3994])])# _LT_SHELL_INIT 3995 3996 3997 3998# _LT_PROG_ECHO_BACKSLASH 3999# ----------------------- 4000# Find how we can fake an echo command that does not interpret backslash. 4001# In particular, with Autoconf 2.60 or later we add some code to the start 4002# of the generated configure script which will find a shell with a builtin 4003# printf (which we can use as an echo command). 4004m4_defun([_LT_PROG_ECHO_BACKSLASH], 4005[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4006ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4007ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4008 4009AC_MSG_CHECKING([how to print strings]) 4010# Test print first, because it will be a builtin if present. 4011if test "X`print -r -- -n 2>/dev/null`" = X-n && \ 4012 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 4013 ECHO='print -r --' 4014elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 4015 ECHO='printf %s\n' 4016else 4017 # Use this function as a fallback that always works. 4018 func_fallback_echo () 4019 { 4020 eval 'cat <<_LTECHO_EOF 4021$[]1 4022_LTECHO_EOF' 4023 } 4024 ECHO='func_fallback_echo' 4025fi 4026 4027# func_echo_all arg... 4028# Invoke $ECHO with all args, space-separated. 4029func_echo_all () 4030{ 4031 $ECHO "$*" 4032} 4033 4034case "$ECHO" in 4035 printf*) AC_MSG_RESULT([printf]) ;; 4036 print*) AC_MSG_RESULT([print -r]) ;; 4037 *) AC_MSG_RESULT([cat]) ;; 4038esac 4039 4040m4_ifdef([_AS_DETECT_SUGGESTED], 4041[_AS_DETECT_SUGGESTED([ 4042 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 4043 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 4044 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 4045 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4046 PATH=/empty FPATH=/empty; export PATH FPATH 4047 test "X`printf %s $ECHO`" = "X$ECHO" \ 4048 || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 4049 4050_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 4051_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 4052])# _LT_PROG_ECHO_BACKSLASH 4053 4054 4055# _LT_ENABLE_LOCK 4056# --------------- 4057m4_defun([_LT_ENABLE_LOCK], 4058[AC_ARG_ENABLE([libtool-lock], 4059 [AS_HELP_STRING([--disable-libtool-lock], 4060 [avoid locking (might break parallel builds)])]) 4061test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 4062 4063# Some flags need to be propagated to the compiler or linker for good 4064# libtool support. 4065case $host in 4066ia64-*-hpux*) 4067 # Find out which ABI we are using. 4068 echo 'int i;' > conftest.$ac_ext 4069 if AC_TRY_EVAL(ac_compile); then 4070 case `/usr/bin/file conftest.$ac_objext` in 4071 *ELF-32*) 4072 HPUX_IA64_MODE="32" 4073 ;; 4074 *ELF-64*) 4075 HPUX_IA64_MODE="64" 4076 ;; 4077 esac 4078 fi 4079 rm -rf conftest* 4080 ;; 4081*-*-irix6*) 4082 # Find out which ABI we are using. 4083 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 4084 if AC_TRY_EVAL(ac_compile); then 4085 if test "$lt_cv_prog_gnu_ld" = yes; then 4086 case `/usr/bin/file conftest.$ac_objext` in 4087 *32-bit*) 4088 LD="${LD-ld} -melf32bsmip" 4089 ;; 4090 *N32*) 4091 LD="${LD-ld} -melf32bmipn32" 4092 ;; 4093 *64-bit*) 4094 LD="${LD-ld} -melf64bmip" 4095 ;; 4096 esac 4097 else 4098 case `/usr/bin/file conftest.$ac_objext` in 4099 *32-bit*) 4100 LD="${LD-ld} -32" 4101 ;; 4102 *N32*) 4103 LD="${LD-ld} -n32" 4104 ;; 4105 *64-bit*) 4106 LD="${LD-ld} -64" 4107 ;; 4108 esac 4109 fi 4110 fi 4111 rm -rf conftest* 4112 ;; 4113 4114x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 4115s390*-*linux*|s390*-*tpf*|sparc*-*linux*) 4116 # Find out which ABI we are using. 4117 echo 'int i;' > conftest.$ac_ext 4118 if AC_TRY_EVAL(ac_compile); then 4119 case `/usr/bin/file conftest.o` in 4120 *32-bit*) 4121 case $host in 4122 x86_64-*kfreebsd*-gnu) 4123 LD="${LD-ld} -m elf_i386_fbsd" 4124 ;; 4125 x86_64-*linux*) 4126 LD="${LD-ld} -m elf_i386" 4127 ;; 4128 ppc64-*linux*|powerpc64-*linux*) 4129 LD="${LD-ld} -m elf32ppclinux" 4130 ;; 4131 s390x-*linux*) 4132 LD="${LD-ld} -m elf_s390" 4133 ;; 4134 sparc64-*linux*) 4135 LD="${LD-ld} -m elf32_sparc" 4136 ;; 4137 esac 4138 ;; 4139 *64-bit*) 4140 case $host in 4141 x86_64-*kfreebsd*-gnu) 4142 LD="${LD-ld} -m elf_x86_64_fbsd" 4143 ;; 4144 x86_64-*linux*) 4145 LD="${LD-ld} -m elf_x86_64" 4146 ;; 4147 ppc*-*linux*|powerpc*-*linux*) 4148 LD="${LD-ld} -m elf64ppc" 4149 ;; 4150 s390*-*linux*|s390*-*tpf*) 4151 LD="${LD-ld} -m elf64_s390" 4152 ;; 4153 sparc*-*linux*) 4154 LD="${LD-ld} -m elf64_sparc" 4155 ;; 4156 esac 4157 ;; 4158 esac 4159 fi 4160 rm -rf conftest* 4161 ;; 4162 4163*-*-sco3.2v5*) 4164 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 4165 SAVE_CFLAGS="$CFLAGS" 4166 CFLAGS="$CFLAGS -belf" 4167 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 4168 [AC_LANG_PUSH(C) 4169 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 4170 AC_LANG_POP]) 4171 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 4172 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 4173 CFLAGS="$SAVE_CFLAGS" 4174 fi 4175 ;; 4176sparc*-*solaris*) 4177 # Find out which ABI we are using. 4178 echo 'int i;' > conftest.$ac_ext 4179 if AC_TRY_EVAL(ac_compile); then 4180 case `/usr/bin/file conftest.o` in 4181 *64-bit*) 4182 case $lt_cv_prog_gnu_ld in 4183 yes*) LD="${LD-ld} -m elf64_sparc" ;; 4184 *) 4185 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 4186 LD="${LD-ld} -64" 4187 fi 4188 ;; 4189 esac 4190 ;; 4191 esac 4192 fi 4193 rm -rf conftest* 4194 ;; 4195esac 4196 4197need_locks="$enable_libtool_lock" 4198])# _LT_ENABLE_LOCK 4199 4200 4201# _LT_CMD_OLD_ARCHIVE 4202# ------------------- 4203m4_defun([_LT_CMD_OLD_ARCHIVE], 4204[AC_CHECK_TOOL(AR, ar, false) 4205test -z "$AR" && AR=ar 4206test -z "$AR_FLAGS" && AR_FLAGS=cru 4207_LT_DECL([], [AR], [1], [The archiver]) 4208_LT_DECL([], [AR_FLAGS], [1]) 4209 4210AC_CHECK_TOOL(STRIP, strip, :) 4211test -z "$STRIP" && STRIP=: 4212_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 4213 4214AC_CHECK_TOOL(RANLIB, ranlib, :) 4215test -z "$RANLIB" && RANLIB=: 4216_LT_DECL([], [RANLIB], [1], 4217 [Commands used to install an old-style archive]) 4218 4219# Determine commands to create old-style static archives. 4220old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 4221old_postinstall_cmds='chmod 644 $oldlib' 4222old_postuninstall_cmds= 4223 4224if test -n "$RANLIB"; then 4225 case $host_os in 4226 openbsd*) 4227 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 4228 ;; 4229 *) 4230 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 4231 ;; 4232 esac 4233 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 4234fi 4235 4236case $host_os in 4237 darwin*) 4238 lock_old_archive_extraction=yes ;; 4239 *) 4240 lock_old_archive_extraction=no ;; 4241esac 4242_LT_DECL([], [old_postinstall_cmds], [2]) 4243_LT_DECL([], [old_postuninstall_cmds], [2]) 4244_LT_TAGDECL([], [old_archive_cmds], [2], 4245 [Commands used to build an old-style archive]) 4246_LT_DECL([], [lock_old_archive_extraction], [0], 4247 [Whether to use a lock for old archive extraction]) 4248])# _LT_CMD_OLD_ARCHIVE 4249 4250 4251# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4252# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 4253# ---------------------------------------------------------------- 4254# Check whether the given compiler option works 4255AC_DEFUN([_LT_COMPILER_OPTION], 4256[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4257m4_require([_LT_DECL_SED])dnl 4258AC_CACHE_CHECK([$1], [$2], 4259 [$2=no 4260 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 4261 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4262 lt_compiler_flag="$3" 4263 # Insert the option either (1) after the last *FLAGS variable, or 4264 # (2) before a word containing "conftest.", or (3) at the end. 4265 # Note that $ac_compile itself does not contain backslashes and begins 4266 # with a dollar sign (not a hyphen), so the echo should work correctly. 4267 # The option is referenced via a variable to avoid confusing sed. 4268 lt_compile=`echo "$ac_compile" | $SED \ 4269 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4270 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4271 -e 's:$: $lt_compiler_flag:'` 4272 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4273 (eval "$lt_compile" 2>conftest.err) 4274 ac_status=$? 4275 cat conftest.err >&AS_MESSAGE_LOG_FD 4276 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4277 if (exit $ac_status) && test -s "$ac_outfile"; then 4278 # The compiler can only warn and ignore the option if not recognized 4279 # So say no if there are warnings other than the usual output. 4280 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 4281 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 4282 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 4283 $2=yes 4284 fi 4285 fi 4286 $RM conftest* 4287]) 4288 4289if test x"[$]$2" = xyes; then 4290 m4_if([$5], , :, [$5]) 4291else 4292 m4_if([$6], , :, [$6]) 4293fi 4294])# _LT_COMPILER_OPTION 4295 4296# Old name: 4297AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 4298dnl aclocal-1.4 backwards compatibility: 4299dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 4300 4301 4302# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 4303# [ACTION-SUCCESS], [ACTION-FAILURE]) 4304# ---------------------------------------------------- 4305# Check whether the given linker option works 4306AC_DEFUN([_LT_LINKER_OPTION], 4307[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4308m4_require([_LT_DECL_SED])dnl 4309AC_CACHE_CHECK([$1], [$2], 4310 [$2=no 4311 save_LDFLAGS="$LDFLAGS" 4312 LDFLAGS="$LDFLAGS $3" 4313 echo "$lt_simple_link_test_code" > conftest.$ac_ext 4314 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 4315 # The linker can only warn and ignore the option if not recognized 4316 # So say no if there are warnings 4317 if test -s conftest.err; then 4318 # Append any errors to the config.log. 4319 cat conftest.err 1>&AS_MESSAGE_LOG_FD 4320 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 4321 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 4322 if diff conftest.exp conftest.er2 >/dev/null; then 4323 $2=yes 4324 fi 4325 else 4326 $2=yes 4327 fi 4328 fi 4329 $RM -r conftest* 4330 LDFLAGS="$save_LDFLAGS" 4331]) 4332 4333if test x"[$]$2" = xyes; then 4334 m4_if([$4], , :, [$4]) 4335else 4336 m4_if([$5], , :, [$5]) 4337fi 4338])# _LT_LINKER_OPTION 4339 4340# Old name: 4341AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 4342dnl aclocal-1.4 backwards compatibility: 4343dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 4344 4345 4346# LT_CMD_MAX_LEN 4347#--------------- 4348AC_DEFUN([LT_CMD_MAX_LEN], 4349[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4350# find the maximum length of command line arguments 4351AC_MSG_CHECKING([the maximum length of command line arguments]) 4352AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 4353 i=0 4354 teststring="ABCD" 4355 4356 case $build_os in 4357 msdosdjgpp*) 4358 # On DJGPP, this test can blow up pretty badly due to problems in libc 4359 # (any single argument exceeding 2000 bytes causes a buffer overrun 4360 # during glob expansion). Even if it were fixed, the result of this 4361 # check would be larger than it should be. 4362 lt_cv_sys_max_cmd_len=12288; # 12K is about right 4363 ;; 4364 4365 gnu*) 4366 # Under GNU Hurd, this test is not required because there is 4367 # no limit to the length of command line arguments. 4368 # Libtool will interpret -1 as no limit whatsoever 4369 lt_cv_sys_max_cmd_len=-1; 4370 ;; 4371 4372 cygwin* | mingw* | cegcc*) 4373 # On Win9x/ME, this test blows up -- it succeeds, but takes 4374 # about 5 minutes as the teststring grows exponentially. 4375 # Worse, since 9x/ME are not pre-emptively multitasking, 4376 # you end up with a "frozen" computer, even though with patience 4377 # the test eventually succeeds (with a max line length of 256k). 4378 # Instead, let's just punt: use the minimum linelength reported by 4379 # all of the supported platforms: 8192 (on NT/2K/XP). 4380 lt_cv_sys_max_cmd_len=8192; 4381 ;; 4382 4383 mint*) 4384 # On MiNT this can take a long time and run out of memory. 4385 lt_cv_sys_max_cmd_len=8192; 4386 ;; 4387 4388 amigaos*) 4389 # On AmigaOS with pdksh, this test takes hours, literally. 4390 # So we just punt and use a minimum line length of 8192. 4391 lt_cv_sys_max_cmd_len=8192; 4392 ;; 4393 4394 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 4395 # This has been around since 386BSD, at least. Likely further. 4396 if test -x /sbin/sysctl; then 4397 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 4398 elif test -x /usr/sbin/sysctl; then 4399 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 4400 else 4401 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 4402 fi 4403 # And add a safety zone 4404 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 4405 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 4406 ;; 4407 4408 interix*) 4409 # We know the value 262144 and hardcode it with a safety zone (like BSD) 4410 lt_cv_sys_max_cmd_len=196608 4411 ;; 4412 4413 osf*) 4414 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 4415 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 4416 # nice to cause kernel panics so lets avoid the loop below. 4417 # First set a reasonable default. 4418 lt_cv_sys_max_cmd_len=16384 4419 # 4420 if test -x /sbin/sysconfig; then 4421 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 4422 *1*) lt_cv_sys_max_cmd_len=-1 ;; 4423 esac 4424 fi 4425 ;; 4426 sco3.2v5*) 4427 lt_cv_sys_max_cmd_len=102400 4428 ;; 4429 sysv5* | sco5v6* | sysv4.2uw2*) 4430 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 4431 if test -n "$kargmax"; then 4432 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 4433 else 4434 lt_cv_sys_max_cmd_len=32768 4435 fi 4436 ;; 4437 *) 4438 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 4439 if test -n "$lt_cv_sys_max_cmd_len"; then 4440 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 4441 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 4442 else 4443 # Make teststring a little bigger before we do anything with it. 4444 # a 1K string should be a reasonable start. 4445 for i in 1 2 3 4 5 6 7 8 ; do 4446 teststring=$teststring$teststring 4447 done 4448 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 4449 # If test is not a shell built-in, we'll probably end up computing a 4450 # maximum length that is only half of the actual maximum length, but 4451 # we can't tell. 4452 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 4453 = "X$teststring$teststring"; } >/dev/null 2>&1 && 4454 test $i != 17 # 1/2 MB should be enough 4455 do 4456 i=`expr $i + 1` 4457 teststring=$teststring$teststring 4458 done 4459 # Only check the string length outside the loop. 4460 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 4461 teststring= 4462 # Add a significant safety factor because C++ compilers can tack on 4463 # massive amounts of additional arguments before passing them to the 4464 # linker. It appears as though 1/2 is a usable value. 4465 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 4466 fi 4467 ;; 4468 esac 4469]) 4470if test -n $lt_cv_sys_max_cmd_len ; then 4471 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 4472else 4473 AC_MSG_RESULT(none) 4474fi 4475max_cmd_len=$lt_cv_sys_max_cmd_len 4476_LT_DECL([], [max_cmd_len], [0], 4477 [What is the maximum length of a command?]) 4478])# LT_CMD_MAX_LEN 4479 4480# Old name: 4481AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 4482dnl aclocal-1.4 backwards compatibility: 4483dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 4484 4485 4486# _LT_HEADER_DLFCN 4487# ---------------- 4488m4_defun([_LT_HEADER_DLFCN], 4489[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 4490])# _LT_HEADER_DLFCN 4491 4492 4493# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 4494# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 4495# ---------------------------------------------------------------- 4496m4_defun([_LT_TRY_DLOPEN_SELF], 4497[m4_require([_LT_HEADER_DLFCN])dnl 4498if test "$cross_compiling" = yes; then : 4499 [$4] 4500else 4501 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 4502 lt_status=$lt_dlunknown 4503 cat > conftest.$ac_ext <<_LT_EOF 4504[#line $LINENO "configure" 4505#include "confdefs.h" 4506 4507#if HAVE_DLFCN_H 4508#include <dlfcn.h> 4509#endif 4510 4511#include <stdio.h> 4512 4513#ifdef RTLD_GLOBAL 4514# define LT_DLGLOBAL RTLD_GLOBAL 4515#else 4516# ifdef DL_GLOBAL 4517# define LT_DLGLOBAL DL_GLOBAL 4518# else 4519# define LT_DLGLOBAL 0 4520# endif 4521#endif 4522 4523/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 4524 find out it does not work in some platform. */ 4525#ifndef LT_DLLAZY_OR_NOW 4526# ifdef RTLD_LAZY 4527# define LT_DLLAZY_OR_NOW RTLD_LAZY 4528# else 4529# ifdef DL_LAZY 4530# define LT_DLLAZY_OR_NOW DL_LAZY 4531# else 4532# ifdef RTLD_NOW 4533# define LT_DLLAZY_OR_NOW RTLD_NOW 4534# else 4535# ifdef DL_NOW 4536# define LT_DLLAZY_OR_NOW DL_NOW 4537# else 4538# define LT_DLLAZY_OR_NOW 0 4539# endif 4540# endif 4541# endif 4542# endif 4543#endif 4544 4545/* When -fvisbility=hidden is used, assume the code has been annotated 4546 correspondingly for the symbols needed. */ 4547#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 4548void fnord () __attribute__((visibility("default"))); 4549#endif 4550 4551void fnord () { int i=42; } 4552int main () 4553{ 4554 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 4555 int status = $lt_dlunknown; 4556 4557 if (self) 4558 { 4559 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 4560 else 4561 { 4562 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 4563 else puts (dlerror ()); 4564 } 4565 /* dlclose (self); */ 4566 } 4567 else 4568 puts (dlerror ()); 4569 4570 return status; 4571}] 4572_LT_EOF 4573 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 4574 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 4575 lt_status=$? 4576 case x$lt_status in 4577 x$lt_dlno_uscore) $1 ;; 4578 x$lt_dlneed_uscore) $2 ;; 4579 x$lt_dlunknown|x*) $3 ;; 4580 esac 4581 else : 4582 # compilation failed 4583 $3 4584 fi 4585fi 4586rm -fr conftest* 4587])# _LT_TRY_DLOPEN_SELF 4588 4589 4590# LT_SYS_DLOPEN_SELF 4591# ------------------ 4592AC_DEFUN([LT_SYS_DLOPEN_SELF], 4593[m4_require([_LT_HEADER_DLFCN])dnl 4594if test "x$enable_dlopen" != xyes; then 4595 enable_dlopen=unknown 4596 enable_dlopen_self=unknown 4597 enable_dlopen_self_static=unknown 4598else 4599 lt_cv_dlopen=no 4600 lt_cv_dlopen_libs= 4601 4602 case $host_os in 4603 beos*) 4604 lt_cv_dlopen="load_add_on" 4605 lt_cv_dlopen_libs= 4606 lt_cv_dlopen_self=yes 4607 ;; 4608 4609 mingw* | pw32* | cegcc*) 4610 lt_cv_dlopen="LoadLibrary" 4611 lt_cv_dlopen_libs= 4612 ;; 4613 4614 cygwin*) 4615 lt_cv_dlopen="dlopen" 4616 lt_cv_dlopen_libs= 4617 ;; 4618 4619 darwin*) 4620 # if libdl is installed we need to link against it 4621 AC_CHECK_LIB([dl], [dlopen], 4622 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 4623 lt_cv_dlopen="dyld" 4624 lt_cv_dlopen_libs= 4625 lt_cv_dlopen_self=yes 4626 ]) 4627 ;; 4628 4629 *) 4630 AC_CHECK_FUNC([shl_load], 4631 [lt_cv_dlopen="shl_load"], 4632 [AC_CHECK_LIB([dld], [shl_load], 4633 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 4634 [AC_CHECK_FUNC([dlopen], 4635 [lt_cv_dlopen="dlopen"], 4636 [AC_CHECK_LIB([dl], [dlopen], 4637 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 4638 [AC_CHECK_LIB([svld], [dlopen], 4639 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 4640 [AC_CHECK_LIB([dld], [dld_link], 4641 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 4642 ]) 4643 ]) 4644 ]) 4645 ]) 4646 ]) 4647 ;; 4648 esac 4649 4650 if test "x$lt_cv_dlopen" != xno; then 4651 enable_dlopen=yes 4652 else 4653 enable_dlopen=no 4654 fi 4655 4656 case $lt_cv_dlopen in 4657 dlopen) 4658 save_CPPFLAGS="$CPPFLAGS" 4659 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 4660 4661 save_LDFLAGS="$LDFLAGS" 4662 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 4663 4664 save_LIBS="$LIBS" 4665 LIBS="$lt_cv_dlopen_libs $LIBS" 4666 4667 AC_CACHE_CHECK([whether a program can dlopen itself], 4668 lt_cv_dlopen_self, [dnl 4669 _LT_TRY_DLOPEN_SELF( 4670 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 4671 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 4672 ]) 4673 4674 if test "x$lt_cv_dlopen_self" = xyes; then 4675 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 4676 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 4677 lt_cv_dlopen_self_static, [dnl 4678 _LT_TRY_DLOPEN_SELF( 4679 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 4680 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 4681 ]) 4682 fi 4683 4684 CPPFLAGS="$save_CPPFLAGS" 4685 LDFLAGS="$save_LDFLAGS" 4686 LIBS="$save_LIBS" 4687 ;; 4688 esac 4689 4690 case $lt_cv_dlopen_self in 4691 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 4692 *) enable_dlopen_self=unknown ;; 4693 esac 4694 4695 case $lt_cv_dlopen_self_static in 4696 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 4697 *) enable_dlopen_self_static=unknown ;; 4698 esac 4699fi 4700_LT_DECL([dlopen_support], [enable_dlopen], [0], 4701 [Whether dlopen is supported]) 4702_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 4703 [Whether dlopen of programs is supported]) 4704_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 4705 [Whether dlopen of statically linked programs is supported]) 4706])# LT_SYS_DLOPEN_SELF 4707 4708# Old name: 4709AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 4710dnl aclocal-1.4 backwards compatibility: 4711dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 4712 4713 4714# _LT_COMPILER_C_O([TAGNAME]) 4715# --------------------------- 4716# Check to see if options -c and -o are simultaneously supported by compiler. 4717# This macro does not hard code the compiler like AC_PROG_CC_C_O. 4718m4_defun([_LT_COMPILER_C_O], 4719[m4_require([_LT_DECL_SED])dnl 4720m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4721m4_require([_LT_TAG_COMPILER])dnl 4722AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 4723 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 4724 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 4725 $RM -r conftest 2>/dev/null 4726 mkdir conftest 4727 cd conftest 4728 mkdir out 4729 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 4730 4731 lt_compiler_flag="-o out/conftest2.$ac_objext" 4732 # Insert the option either (1) after the last *FLAGS variable, or 4733 # (2) before a word containing "conftest.", or (3) at the end. 4734 # Note that $ac_compile itself does not contain backslashes and begins 4735 # with a dollar sign (not a hyphen), so the echo should work correctly. 4736 lt_compile=`echo "$ac_compile" | $SED \ 4737 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 4738 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 4739 -e 's:$: $lt_compiler_flag:'` 4740 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 4741 (eval "$lt_compile" 2>out/conftest.err) 4742 ac_status=$? 4743 cat out/conftest.err >&AS_MESSAGE_LOG_FD 4744 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 4745 if (exit $ac_status) && test -s out/conftest2.$ac_objext 4746 then 4747 # The compiler can only warn and ignore the option if not recognized 4748 # So say no if there are warnings 4749 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 4750 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 4751 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 4752 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 4753 fi 4754 fi 4755 chmod u+w . 2>&AS_MESSAGE_LOG_FD 4756 $RM conftest* 4757 # SGI C++ compiler will create directory out/ii_files/ for 4758 # template instantiation 4759 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 4760 $RM out/* && rmdir out 4761 cd .. 4762 $RM -r conftest 4763 $RM conftest* 4764]) 4765_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 4766 [Does compiler simultaneously support -c and -o options?]) 4767])# _LT_COMPILER_C_O 4768 4769 4770# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 4771# ---------------------------------- 4772# Check to see if we can do hard links to lock some files if needed 4773m4_defun([_LT_COMPILER_FILE_LOCKS], 4774[m4_require([_LT_ENABLE_LOCK])dnl 4775m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4776_LT_COMPILER_C_O([$1]) 4777 4778hard_links="nottested" 4779if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 4780 # do not overwrite the value of need_locks provided by the user 4781 AC_MSG_CHECKING([if we can lock with hard links]) 4782 hard_links=yes 4783 $RM conftest* 4784 ln conftest.a conftest.b 2>/dev/null && hard_links=no 4785 touch conftest.a 4786 ln conftest.a conftest.b 2>&5 || hard_links=no 4787 ln conftest.a conftest.b 2>/dev/null && hard_links=no 4788 AC_MSG_RESULT([$hard_links]) 4789 if test "$hard_links" = no; then 4790 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 4791 need_locks=warn 4792 fi 4793else 4794 need_locks=no 4795fi 4796_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 4797])# _LT_COMPILER_FILE_LOCKS 4798 4799 4800# _LT_CHECK_OBJDIR 4801# ---------------- 4802m4_defun([_LT_CHECK_OBJDIR], 4803[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 4804[rm -f .libs 2>/dev/null 4805mkdir .libs 2>/dev/null 4806if test -d .libs; then 4807 lt_cv_objdir=.libs 4808else 4809 # MS-DOS does not allow filenames that begin with a dot. 4810 lt_cv_objdir=_libs 4811fi 4812rmdir .libs 2>/dev/null]) 4813objdir=$lt_cv_objdir 4814_LT_DECL([], [objdir], [0], 4815 [The name of the directory that contains temporary libtool files])dnl 4816m4_pattern_allow([LT_OBJDIR])dnl 4817AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 4818 [Define to the sub-directory in which libtool stores uninstalled libraries.]) 4819])# _LT_CHECK_OBJDIR 4820 4821 4822# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 4823# -------------------------------------- 4824# Check hardcoding attributes. 4825m4_defun([_LT_LINKER_HARDCODE_LIBPATH], 4826[AC_MSG_CHECKING([how to hardcode library paths into programs]) 4827_LT_TAGVAR(hardcode_action, $1)= 4828if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 4829 test -n "$_LT_TAGVAR(runpath_var, $1)" || 4830 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 4831 4832 # We can hardcode non-existent directories. 4833 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 4834 # If the only mechanism to avoid hardcoding is shlibpath_var, we 4835 # have to relink, otherwise we might link with an installed library 4836 # when we should be linking with a yet-to-be-installed one 4837 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 4838 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 4839 # Linking always hardcodes the temporary library directory. 4840 _LT_TAGVAR(hardcode_action, $1)=relink 4841 else 4842 # We can link without hardcoding, and we can hardcode nonexisting dirs. 4843 _LT_TAGVAR(hardcode_action, $1)=immediate 4844 fi 4845else 4846 # We cannot hardcode anything, or else we can only hardcode existing 4847 # directories. 4848 _LT_TAGVAR(hardcode_action, $1)=unsupported 4849fi 4850AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 4851 4852if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 4853 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 4854 # Fast installation is not supported 4855 enable_fast_install=no 4856elif test "$shlibpath_overrides_runpath" = yes || 4857 test "$enable_shared" = no; then 4858 # Fast installation is not necessary 4859 enable_fast_install=needless 4860fi 4861_LT_TAGDECL([], [hardcode_action], [0], 4862 [How to hardcode a shared library path into an executable]) 4863])# _LT_LINKER_HARDCODE_LIBPATH 4864 4865 4866# _LT_CMD_STRIPLIB 4867# ---------------- 4868m4_defun([_LT_CMD_STRIPLIB], 4869[m4_require([_LT_DECL_EGREP]) 4870striplib= 4871old_striplib= 4872AC_MSG_CHECKING([whether stripping libraries is possible]) 4873if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 4874 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 4875 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 4876 AC_MSG_RESULT([yes]) 4877else 4878# FIXME - insert some real tests, host_os isn't really good enough 4879 case $host_os in 4880 darwin*) 4881 if test -n "$STRIP" ; then 4882 striplib="$STRIP -x" 4883 old_striplib="$STRIP -S" 4884 AC_MSG_RESULT([yes]) 4885 else 4886 AC_MSG_RESULT([no]) 4887 fi 4888 ;; 4889 *) 4890 AC_MSG_RESULT([no]) 4891 ;; 4892 esac 4893fi 4894_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 4895_LT_DECL([], [striplib], [1]) 4896])# _LT_CMD_STRIPLIB 4897 4898 4899# _LT_SYS_DYNAMIC_LINKER([TAG]) 4900# ----------------------------- 4901# PORTME Fill in your ld.so characteristics 4902m4_defun([_LT_SYS_DYNAMIC_LINKER], 4903[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4904m4_require([_LT_DECL_EGREP])dnl 4905m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4906m4_require([_LT_DECL_OBJDUMP])dnl 4907m4_require([_LT_DECL_SED])dnl 4908m4_require([_LT_CHECK_SHELL_FEATURES])dnl 4909AC_MSG_CHECKING([dynamic linker characteristics]) 4910m4_if([$1], 4911 [], [ 4912if test "$GCC" = yes; then 4913 case $host_os in 4914 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 4915 *) lt_awk_arg="/^libraries:/" ;; 4916 esac 4917 case $host_os in 4918 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 4919 *) lt_sed_strip_eq="s,=/,/,g" ;; 4920 esac 4921 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 4922 case $lt_search_path_spec in 4923 *\;*) 4924 # if the path contains ";" then we assume it to be the separator 4925 # otherwise default to the standard path separator (i.e. ":") - it is 4926 # assumed that no part of a normal pathname contains ";" but that should 4927 # okay in the real world where ";" in dirpaths is itself problematic. 4928 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 4929 ;; 4930 *) 4931 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 4932 ;; 4933 esac 4934 # Ok, now we have the path, separated by spaces, we can step through it 4935 # and add multilib dir if necessary. 4936 lt_tmp_lt_search_path_spec= 4937 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 4938 for lt_sys_path in $lt_search_path_spec; do 4939 if test -d "$lt_sys_path/$lt_multi_os_dir"; then 4940 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 4941 else 4942 test -d "$lt_sys_path" && \ 4943 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 4944 fi 4945 done 4946 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 4947BEGIN {RS=" "; FS="/|\n";} { 4948 lt_foo=""; 4949 lt_count=0; 4950 for (lt_i = NF; lt_i > 0; lt_i--) { 4951 if ($lt_i != "" && $lt_i != ".") { 4952 if ($lt_i == "..") { 4953 lt_count++; 4954 } else { 4955 if (lt_count == 0) { 4956 lt_foo="/" $lt_i lt_foo; 4957 } else { 4958 lt_count--; 4959 } 4960 } 4961 } 4962 } 4963 if (lt_foo != "") { lt_freq[[lt_foo]]++; } 4964 if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 4965}'` 4966 # AWK program above erroneously prepends '/' to C:/dos/paths 4967 # for these hosts. 4968 case $host_os in 4969 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 4970 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 4971 esac 4972 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 4973else 4974 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 4975fi]) 4976library_names_spec= 4977libname_spec='lib$name' 4978soname_spec= 4979shrext_cmds=".so" 4980postinstall_cmds= 4981postuninstall_cmds= 4982finish_cmds= 4983finish_eval= 4984shlibpath_var= 4985shlibpath_overrides_runpath=unknown 4986version_type=none 4987dynamic_linker="$host_os ld.so" 4988sys_lib_dlsearch_path_spec="/lib /usr/lib" 4989need_lib_prefix=unknown 4990hardcode_into_libs=no 4991 4992# when you set need_version to no, make sure it does not cause -set_version 4993# flags to be left without arguments 4994need_version=unknown 4995 4996case $host_os in 4997aix3*) 4998 version_type=linux 4999 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 5000 shlibpath_var=LIBPATH 5001 5002 # AIX 3 has no versioning support, so we append a major version to the name. 5003 soname_spec='${libname}${release}${shared_ext}$major' 5004 ;; 5005 5006aix[[4-9]]*) 5007 version_type=linux 5008 need_lib_prefix=no 5009 need_version=no 5010 hardcode_into_libs=yes 5011 if test "$host_cpu" = ia64; then 5012 # AIX 5 supports IA64 5013 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 5014 shlibpath_var=LD_LIBRARY_PATH 5015 else 5016 # With GCC up to 2.95.x, collect2 would create an import file 5017 # for dependence libraries. The import file would start with 5018 # the line `#! .'. This would cause the generated library to 5019 # depend on `.', always an invalid library. This was fixed in 5020 # development snapshots of GCC prior to 3.0. 5021 case $host_os in 5022 aix4 | aix4.[[01]] | aix4.[[01]].*) 5023 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 5024 echo ' yes ' 5025 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 5026 : 5027 else 5028 can_build_shared=no 5029 fi 5030 ;; 5031 esac 5032 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 5033 # soname into executable. Probably we can add versioning support to 5034 # collect2, so additional links can be useful in future. 5035 if test "$aix_use_runtimelinking" = yes; then 5036 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 5037 # instead of lib<name>.a to let people know that these are not 5038 # typical AIX shared libraries. 5039 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5040 else 5041 # We preserve .a as extension for shared libraries through AIX4.2 5042 # and later when we are not doing run time linking. 5043 library_names_spec='${libname}${release}.a $libname.a' 5044 soname_spec='${libname}${release}${shared_ext}$major' 5045 fi 5046 shlibpath_var=LIBPATH 5047 fi 5048 ;; 5049 5050amigaos*) 5051 case $host_cpu in 5052 powerpc) 5053 # Since July 2007 AmigaOS4 officially supports .so libraries. 5054 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 5055 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5056 ;; 5057 m68k) 5058 library_names_spec='$libname.ixlibrary $libname.a' 5059 # Create ${libname}_ixlibrary.a entries in /sys/libs. 5060 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 5061 ;; 5062 esac 5063 ;; 5064 5065beos*) 5066 library_names_spec='${libname}${shared_ext}' 5067 dynamic_linker="$host_os ld.so" 5068 shlibpath_var=LIBRARY_PATH 5069 ;; 5070 5071bsdi[[45]]*) 5072 version_type=linux 5073 need_version=no 5074 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5075 soname_spec='${libname}${release}${shared_ext}$major' 5076 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 5077 shlibpath_var=LD_LIBRARY_PATH 5078 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 5079 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 5080 # the default ld.so.conf also contains /usr/contrib/lib and 5081 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 5082 # libtool to hard-code these into programs 5083 ;; 5084 5085cygwin* | mingw* | pw32* | cegcc*) 5086 version_type=windows 5087 shrext_cmds=".dll" 5088 need_version=no 5089 need_lib_prefix=no 5090 5091 case $GCC,$host_os in 5092 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 5093 library_names_spec='$libname.dll.a' 5094 # DLL is installed to $(libdir)/../bin by postinstall_cmds 5095 postinstall_cmds='base_file=`basename \${file}`~ 5096 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 5097 dldir=$destdir/`dirname \$dlpath`~ 5098 test -d \$dldir || mkdir -p \$dldir~ 5099 $install_prog $dir/$dlname \$dldir/$dlname~ 5100 chmod a+x \$dldir/$dlname~ 5101 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 5102 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 5103 fi' 5104 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 5105 dlpath=$dir/\$dldll~ 5106 $RM \$dlpath' 5107 shlibpath_overrides_runpath=yes 5108 5109 case $host_os in 5110 cygwin*) 5111 # Cygwin DLLs use 'cyg' prefix rather than 'lib' 5112 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 5113m4_if([$1], [],[ 5114 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 5115 ;; 5116 mingw* | cegcc*) 5117 # MinGW DLLs use traditional 'lib' prefix 5118 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 5119 ;; 5120 pw32*) 5121 # pw32 DLLs use 'pw' prefix rather than 'lib' 5122 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 5123 ;; 5124 esac 5125 ;; 5126 5127 *) 5128 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 5129 ;; 5130 esac 5131 dynamic_linker='Win32 ld.exe' 5132 # FIXME: first we should search . and the directory the executable is in 5133 shlibpath_var=PATH 5134 ;; 5135 5136darwin* | rhapsody*) 5137 dynamic_linker="$host_os dyld" 5138 version_type=darwin 5139 need_lib_prefix=no 5140 need_version=no 5141 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 5142 soname_spec='${libname}${release}${major}$shared_ext' 5143 shlibpath_overrides_runpath=yes 5144 shlibpath_var=DYLD_LIBRARY_PATH 5145 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 5146m4_if([$1], [],[ 5147 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 5148 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 5149 ;; 5150 5151dgux*) 5152 version_type=linux 5153 need_lib_prefix=no 5154 need_version=no 5155 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 5156 soname_spec='${libname}${release}${shared_ext}$major' 5157 shlibpath_var=LD_LIBRARY_PATH 5158 ;; 5159 5160freebsd1*) 5161 dynamic_linker=no 5162 ;; 5163 5164freebsd* | dragonfly*) 5165 # DragonFly does not have aout. When/if they implement a new 5166 # versioning mechanism, adjust this. 5167 if test -x /usr/bin/objformat; then 5168 objformat=`/usr/bin/objformat` 5169 else 5170 case $host_os in 5171 freebsd[[123]]*) objformat=aout ;; 5172 *) objformat=elf ;; 5173 esac 5174 fi 5175 version_type=freebsd-$objformat 5176 case $version_type in 5177 freebsd-elf*) 5178 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 5179 need_version=no 5180 need_lib_prefix=no 5181 ;; 5182 freebsd-*) 5183 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 5184 need_version=yes 5185 ;; 5186 esac 5187 shlibpath_var=LD_LIBRARY_PATH 5188 case $host_os in 5189 freebsd2*) 5190 shlibpath_overrides_runpath=yes 5191 ;; 5192 freebsd3.[[01]]* | freebsdelf3.[[01]]*) 5193 shlibpath_overrides_runpath=yes 5194 hardcode_into_libs=yes 5195 ;; 5196 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 5197 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 5198 shlibpath_overrides_runpath=no 5199 hardcode_into_libs=yes 5200 ;; 5201 *) # from 4.6 on, and DragonFly 5202 shlibpath_overrides_runpath=yes 5203 hardcode_into_libs=yes 5204 ;; 5205 esac 5206 ;; 5207 5208gnu*) 5209 version_type=linux 5210 need_lib_prefix=no 5211 need_version=no 5212 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 5213 soname_spec='${libname}${release}${shared_ext}$major' 5214 shlibpath_var=LD_LIBRARY_PATH 5215 hardcode_into_libs=yes 5216 ;; 5217 5218haiku*) 5219 version_type=linux 5220 need_lib_prefix=no 5221 need_version=no 5222 dynamic_linker="$host_os runtime_loader" 5223 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 5224 soname_spec='${libname}${release}${shared_ext}$major' 5225 shlibpath_var=LIBRARY_PATH 5226 shlibpath_overrides_runpath=yes 5227 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 5228 hardcode_into_libs=yes 5229 ;; 5230 5231hpux9* | hpux10* | hpux11*) 5232 # Give a soname corresponding to the major version so that dld.sl refuses to 5233 # link against other versions. 5234 version_type=sunos 5235 need_lib_prefix=no 5236 need_version=no 5237 case $host_cpu in 5238 ia64*) 5239 shrext_cmds='.so' 5240 hardcode_into_libs=yes 5241 dynamic_linker="$host_os dld.so" 5242 shlibpath_var=LD_LIBRARY_PATH 5243 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 5244 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5245 soname_spec='${libname}${release}${shared_ext}$major' 5246 if test "X$HPUX_IA64_MODE" = X32; then 5247 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 5248 else 5249 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 5250 fi 5251 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 5252 ;; 5253 hppa*64*) 5254 shrext_cmds='.sl' 5255 hardcode_into_libs=yes 5256 dynamic_linker="$host_os dld.sl" 5257 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 5258 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 5259 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5260 soname_spec='${libname}${release}${shared_ext}$major' 5261 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 5262 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 5263 ;; 5264 *) 5265 shrext_cmds='.sl' 5266 dynamic_linker="$host_os dld.sl" 5267 shlibpath_var=SHLIB_PATH 5268 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 5269 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5270 soname_spec='${libname}${release}${shared_ext}$major' 5271 ;; 5272 esac 5273 # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 5274 postinstall_cmds='chmod 555 $lib' 5275 # or fails outright, so override atomically: 5276 install_override_mode=555 5277 ;; 5278 5279interix[[3-9]]*) 5280 version_type=linux 5281 need_lib_prefix=no 5282 need_version=no 5283 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 5284 soname_spec='${libname}${release}${shared_ext}$major' 5285 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 5286 shlibpath_var=LD_LIBRARY_PATH 5287 shlibpath_overrides_runpath=no 5288 hardcode_into_libs=yes 5289 ;; 5290 5291irix5* | irix6* | nonstopux*) 5292 case $host_os in 5293 nonstopux*) version_type=nonstopux ;; 5294 *) 5295 if test "$lt_cv_prog_gnu_ld" = yes; then 5296 version_type=linux 5297 else 5298 version_type=irix 5299 fi ;; 5300 esac 5301 need_lib_prefix=no 5302 need_version=no 5303 soname_spec='${libname}${release}${shared_ext}$major' 5304 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 5305 case $host_os in 5306 irix5* | nonstopux*) 5307 libsuff= shlibsuff= 5308 ;; 5309 *) 5310 case $LD in # libtool.m4 will add one of these switches to LD 5311 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 5312 libsuff= shlibsuff= libmagic=32-bit;; 5313 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 5314 libsuff=32 shlibsuff=N32 libmagic=N32;; 5315 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 5316 libsuff=64 shlibsuff=64 libmagic=64-bit;; 5317 *) libsuff= shlibsuff= libmagic=never-match;; 5318 esac 5319 ;; 5320 esac 5321 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 5322 shlibpath_overrides_runpath=no 5323 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 5324 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 5325 hardcode_into_libs=yes 5326 ;; 5327 5328# No shared lib support for Linux oldld, aout, or coff. 5329linux*oldld* | linux*aout* | linux*coff*) 5330 dynamic_linker=no 5331 ;; 5332 5333# This must be Linux ELF. 5334linux* | k*bsd*-gnu | kopensolaris*-gnu) 5335 version_type=linux 5336 need_lib_prefix=no 5337 need_version=no 5338 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5339 soname_spec='${libname}${release}${shared_ext}$major' 5340 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 5341 shlibpath_var=LD_LIBRARY_PATH 5342 shlibpath_overrides_runpath=no 5343 5344 # Some binutils ld are patched to set DT_RUNPATH 5345 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 5346 [lt_cv_shlibpath_overrides_runpath=no 5347 save_LDFLAGS=$LDFLAGS 5348 save_libdir=$libdir 5349 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 5350 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 5351 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 5352 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 5353 [lt_cv_shlibpath_overrides_runpath=yes])]) 5354 LDFLAGS=$save_LDFLAGS 5355 libdir=$save_libdir 5356 ]) 5357 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 5358 5359 # This implies no fast_install, which is unacceptable. 5360 # Some rework will be needed to allow for fast_install 5361 # before this can be enabled. 5362 hardcode_into_libs=yes 5363 5364 # Add ABI-specific directories to the system library path. 5365 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 5366 5367 # Append ld.so.conf contents to the search path 5368 if test -f /etc/ld.so.conf; then 5369 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 5370 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 5371 5372 fi 5373 5374 # We used to test for /lib/ld.so.1 and disable shared libraries on 5375 # powerpc, because MkLinux only supported shared libraries with the 5376 # GNU dynamic linker. Since this was broken with cross compilers, 5377 # most powerpc-linux boxes support dynamic linking these days and 5378 # people can always --disable-shared, the test was removed, and we 5379 # assume the GNU/Linux dynamic linker is in use. 5380 dynamic_linker='GNU/Linux ld.so' 5381 ;; 5382 5383netbsd*) 5384 version_type=sunos 5385 need_lib_prefix=no 5386 need_version=no 5387 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5388 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 5389 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 5390 dynamic_linker='NetBSD (a.out) ld.so' 5391 else 5392 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 5393 soname_spec='${libname}${release}${shared_ext}$major' 5394 dynamic_linker='NetBSD ld.elf_so' 5395 fi 5396 shlibpath_var=LD_LIBRARY_PATH 5397 shlibpath_overrides_runpath=yes 5398 hardcode_into_libs=yes 5399 ;; 5400 5401newsos6) 5402 version_type=linux 5403 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5404 shlibpath_var=LD_LIBRARY_PATH 5405 shlibpath_overrides_runpath=yes 5406 ;; 5407 5408*nto* | *qnx*) 5409 version_type=qnx 5410 need_lib_prefix=no 5411 need_version=no 5412 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5413 soname_spec='${libname}${release}${shared_ext}$major' 5414 shlibpath_var=LD_LIBRARY_PATH 5415 shlibpath_overrides_runpath=no 5416 hardcode_into_libs=yes 5417 dynamic_linker='ldqnx.so' 5418 ;; 5419 5420openbsd*) 5421 version_type=sunos 5422 sys_lib_dlsearch_path_spec="/usr/lib" 5423 need_lib_prefix=no 5424 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 5425 case $host_os in 5426 openbsd3.3 | openbsd3.3.*) need_version=yes ;; 5427 *) need_version=no ;; 5428 esac 5429 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 5430 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 5431 shlibpath_var=LD_LIBRARY_PATH 5432 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5433 case $host_os in 5434 openbsd2.[[89]] | openbsd2.[[89]].*) 5435 shlibpath_overrides_runpath=no 5436 ;; 5437 *) 5438 shlibpath_overrides_runpath=yes 5439 ;; 5440 esac 5441 else 5442 shlibpath_overrides_runpath=yes 5443 fi 5444 ;; 5445 5446os2*) 5447 libname_spec='$name' 5448 shrext_cmds=".dll" 5449 need_lib_prefix=no 5450 library_names_spec='$libname${shared_ext} $libname.a' 5451 dynamic_linker='OS/2 ld.exe' 5452 shlibpath_var=LIBPATH 5453 ;; 5454 5455osf3* | osf4* | osf5*) 5456 version_type=osf 5457 need_lib_prefix=no 5458 need_version=no 5459 soname_spec='${libname}${release}${shared_ext}$major' 5460 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5461 shlibpath_var=LD_LIBRARY_PATH 5462 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 5463 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 5464 ;; 5465 5466rdos*) 5467 dynamic_linker=no 5468 ;; 5469 5470solaris*) 5471 version_type=linux 5472 need_lib_prefix=no 5473 need_version=no 5474 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5475 soname_spec='${libname}${release}${shared_ext}$major' 5476 shlibpath_var=LD_LIBRARY_PATH 5477 shlibpath_overrides_runpath=yes 5478 hardcode_into_libs=yes 5479 # ldd complains unless libraries are executable 5480 postinstall_cmds='chmod +x $lib' 5481 ;; 5482 5483sunos4*) 5484 version_type=sunos 5485 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 5486 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 5487 shlibpath_var=LD_LIBRARY_PATH 5488 shlibpath_overrides_runpath=yes 5489 if test "$with_gnu_ld" = yes; then 5490 need_lib_prefix=no 5491 fi 5492 need_version=yes 5493 ;; 5494 5495sysv4 | sysv4.3*) 5496 version_type=linux 5497 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5498 soname_spec='${libname}${release}${shared_ext}$major' 5499 shlibpath_var=LD_LIBRARY_PATH 5500 case $host_vendor in 5501 sni) 5502 shlibpath_overrides_runpath=no 5503 need_lib_prefix=no 5504 runpath_var=LD_RUN_PATH 5505 ;; 5506 siemens) 5507 need_lib_prefix=no 5508 ;; 5509 motorola) 5510 need_lib_prefix=no 5511 need_version=no 5512 shlibpath_overrides_runpath=no 5513 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 5514 ;; 5515 esac 5516 ;; 5517 5518sysv4*MP*) 5519 if test -d /usr/nec ;then 5520 version_type=linux 5521 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 5522 soname_spec='$libname${shared_ext}.$major' 5523 shlibpath_var=LD_LIBRARY_PATH 5524 fi 5525 ;; 5526 5527sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5528 version_type=freebsd-elf 5529 need_lib_prefix=no 5530 need_version=no 5531 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 5532 soname_spec='${libname}${release}${shared_ext}$major' 5533 shlibpath_var=LD_LIBRARY_PATH 5534 shlibpath_overrides_runpath=yes 5535 hardcode_into_libs=yes 5536 if test "$with_gnu_ld" = yes; then 5537 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 5538 else 5539 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 5540 case $host_os in 5541 sco3.2v5*) 5542 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 5543 ;; 5544 esac 5545 fi 5546 sys_lib_dlsearch_path_spec='/usr/lib' 5547 ;; 5548 5549tpf*) 5550 # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 5551 version_type=linux 5552 need_lib_prefix=no 5553 need_version=no 5554 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5555 shlibpath_var=LD_LIBRARY_PATH 5556 shlibpath_overrides_runpath=no 5557 hardcode_into_libs=yes 5558 ;; 5559 5560uts4*) 5561 version_type=linux 5562 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5563 soname_spec='${libname}${release}${shared_ext}$major' 5564 shlibpath_var=LD_LIBRARY_PATH 5565 ;; 5566 5567*) 5568 dynamic_linker=no 5569 ;; 5570esac 5571AC_MSG_RESULT([$dynamic_linker]) 5572test "$dynamic_linker" = no && can_build_shared=no 5573 5574variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 5575if test "$GCC" = yes; then 5576 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 5577fi 5578 5579if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 5580 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 5581fi 5582if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 5583 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 5584fi 5585 5586_LT_DECL([], [variables_saved_for_relink], [1], 5587 [Variables whose values should be saved in libtool wrapper scripts and 5588 restored at link time]) 5589_LT_DECL([], [need_lib_prefix], [0], 5590 [Do we need the "lib" prefix for modules?]) 5591_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 5592_LT_DECL([], [version_type], [0], [Library versioning type]) 5593_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 5594_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 5595_LT_DECL([], [shlibpath_overrides_runpath], [0], 5596 [Is shlibpath searched before the hard-coded library search path?]) 5597_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 5598_LT_DECL([], [library_names_spec], [1], 5599 [[List of archive names. First name is the real one, the rest are links. 5600 The last name is the one that the linker finds with -lNAME]]) 5601_LT_DECL([], [soname_spec], [1], 5602 [[The coded name of the library, if different from the real name]]) 5603_LT_DECL([], [install_override_mode], [1], 5604 [Permission mode override for installation of shared libraries]) 5605_LT_DECL([], [postinstall_cmds], [2], 5606 [Command to use after installation of a shared archive]) 5607_LT_DECL([], [postuninstall_cmds], [2], 5608 [Command to use after uninstallation of a shared archive]) 5609_LT_DECL([], [finish_cmds], [2], 5610 [Commands used to finish a libtool library installation in a directory]) 5611_LT_DECL([], [finish_eval], [1], 5612 [[As "finish_cmds", except a single script fragment to be evaled but 5613 not shown]]) 5614_LT_DECL([], [hardcode_into_libs], [0], 5615 [Whether we should hardcode library paths into libraries]) 5616_LT_DECL([], [sys_lib_search_path_spec], [2], 5617 [Compile-time system search path for libraries]) 5618_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 5619 [Run-time system search path for libraries]) 5620])# _LT_SYS_DYNAMIC_LINKER 5621 5622 5623# _LT_PATH_TOOL_PREFIX(TOOL) 5624# -------------------------- 5625# find a file program which can recognize shared library 5626AC_DEFUN([_LT_PATH_TOOL_PREFIX], 5627[m4_require([_LT_DECL_EGREP])dnl 5628AC_MSG_CHECKING([for $1]) 5629AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 5630[case $MAGIC_CMD in 5631[[\\/*] | ?:[\\/]*]) 5632 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 5633 ;; 5634*) 5635 lt_save_MAGIC_CMD="$MAGIC_CMD" 5636 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5637dnl $ac_dummy forces splitting on constant user-supplied paths. 5638dnl POSIX.2 word splitting is done only on the output of word expansions, 5639dnl not every word. This closes a longstanding sh security hole. 5640 ac_dummy="m4_if([$2], , $PATH, [$2])" 5641 for ac_dir in $ac_dummy; do 5642 IFS="$lt_save_ifs" 5643 test -z "$ac_dir" && ac_dir=. 5644 if test -f $ac_dir/$1; then 5645 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 5646 if test -n "$file_magic_test_file"; then 5647 case $deplibs_check_method in 5648 "file_magic "*) 5649 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 5650 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5651 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 5652 $EGREP "$file_magic_regex" > /dev/null; then 5653 : 5654 else 5655 cat <<_LT_EOF 1>&2 5656 5657*** Warning: the command libtool uses to detect shared libraries, 5658*** $file_magic_cmd, produces output that libtool cannot recognize. 5659*** The result is that libtool may fail to recognize shared libraries 5660*** as such. This will affect the creation of libtool libraries that 5661*** depend on shared libraries, but programs linked with such libtool 5662*** libraries will work regardless of this problem. Nevertheless, you 5663*** may want to report the problem to your system manager and/or to 5664*** bug-libtool@gnu.org 5665 5666_LT_EOF 5667 fi ;; 5668 esac 5669 fi 5670 break 5671 fi 5672 done 5673 IFS="$lt_save_ifs" 5674 MAGIC_CMD="$lt_save_MAGIC_CMD" 5675 ;; 5676esac]) 5677MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5678if test -n "$MAGIC_CMD"; then 5679 AC_MSG_RESULT($MAGIC_CMD) 5680else 5681 AC_MSG_RESULT(no) 5682fi 5683_LT_DECL([], [MAGIC_CMD], [0], 5684 [Used to examine libraries when file_magic_cmd begins with "file"])dnl 5685])# _LT_PATH_TOOL_PREFIX 5686 5687# Old name: 5688AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 5689dnl aclocal-1.4 backwards compatibility: 5690dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 5691 5692 5693# _LT_PATH_MAGIC 5694# -------------- 5695# find a file program which can recognize a shared library 5696m4_defun([_LT_PATH_MAGIC], 5697[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 5698if test -z "$lt_cv_path_MAGIC_CMD"; then 5699 if test -n "$ac_tool_prefix"; then 5700 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 5701 else 5702 MAGIC_CMD=: 5703 fi 5704fi 5705])# _LT_PATH_MAGIC 5706 5707 5708# LT_PATH_LD 5709# ---------- 5710# find the pathname to the GNU or non-GNU linker 5711AC_DEFUN([LT_PATH_LD], 5712[AC_REQUIRE([AC_PROG_CC])dnl 5713AC_REQUIRE([AC_CANONICAL_HOST])dnl 5714AC_REQUIRE([AC_CANONICAL_BUILD])dnl 5715m4_require([_LT_DECL_SED])dnl 5716m4_require([_LT_DECL_EGREP])dnl 5717m4_require([_LT_PROG_ECHO_BACKSLASH])dnl 5718 5719AC_ARG_WITH([gnu-ld], 5720 [AS_HELP_STRING([--with-gnu-ld], 5721 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 5722 [test "$withval" = no || with_gnu_ld=yes], 5723 [with_gnu_ld=no])dnl 5724 5725ac_prog=ld 5726if test "$GCC" = yes; then 5727 # Check if gcc -print-prog-name=ld gives a path. 5728 AC_MSG_CHECKING([for ld used by $CC]) 5729 case $host in 5730 *-*-mingw*) 5731 # gcc leaves a trailing carriage return which upsets mingw 5732 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 5733 *) 5734 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 5735 esac 5736 case $ac_prog in 5737 # Accept absolute paths. 5738 [[\\/]]* | ?:[[\\/]]*) 5739 re_direlt='/[[^/]][[^/]]*/\.\./' 5740 # Canonicalize the pathname of ld 5741 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 5742 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 5743 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 5744 done 5745 test -z "$LD" && LD="$ac_prog" 5746 ;; 5747 "") 5748 # If it fails, then pretend we aren't using GCC. 5749 ac_prog=ld 5750 ;; 5751 *) 5752 # If it is relative, then search for the first ld in PATH. 5753 with_gnu_ld=unknown 5754 ;; 5755 esac 5756elif test "$with_gnu_ld" = yes; then 5757 AC_MSG_CHECKING([for GNU ld]) 5758else 5759 AC_MSG_CHECKING([for non-GNU ld]) 5760fi 5761AC_CACHE_VAL(lt_cv_path_LD, 5762[if test -z "$LD"; then 5763 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5764 for ac_dir in $PATH; do 5765 IFS="$lt_save_ifs" 5766 test -z "$ac_dir" && ac_dir=. 5767 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 5768 lt_cv_path_LD="$ac_dir/$ac_prog" 5769 # Check to see if the program is GNU ld. I'd rather use --version, 5770 # but apparently some variants of GNU ld only accept -v. 5771 # Break only if it was the GNU/non-GNU ld that we prefer. 5772 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 5773 *GNU* | *'with BFD'*) 5774 test "$with_gnu_ld" != no && break 5775 ;; 5776 *) 5777 test "$with_gnu_ld" != yes && break 5778 ;; 5779 esac 5780 fi 5781 done 5782 IFS="$lt_save_ifs" 5783else 5784 lt_cv_path_LD="$LD" # Let the user override the test with a path. 5785fi]) 5786LD="$lt_cv_path_LD" 5787if test -n "$LD"; then 5788 AC_MSG_RESULT($LD) 5789else 5790 AC_MSG_RESULT(no) 5791fi 5792test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 5793_LT_PATH_LD_GNU 5794AC_SUBST([LD]) 5795 5796_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 5797])# LT_PATH_LD 5798 5799# Old names: 5800AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 5801AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 5802dnl aclocal-1.4 backwards compatibility: 5803dnl AC_DEFUN([AM_PROG_LD], []) 5804dnl AC_DEFUN([AC_PROG_LD], []) 5805 5806 5807# _LT_PATH_LD_GNU 5808#- -------------- 5809m4_defun([_LT_PATH_LD_GNU], 5810[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 5811[# I'd rather use --version here, but apparently some GNU lds only accept -v. 5812case `$LD -v 2>&1 </dev/null` in 5813*GNU* | *'with BFD'*) 5814 lt_cv_prog_gnu_ld=yes 5815 ;; 5816*) 5817 lt_cv_prog_gnu_ld=no 5818 ;; 5819esac]) 5820with_gnu_ld=$lt_cv_prog_gnu_ld 5821])# _LT_PATH_LD_GNU 5822 5823 5824# _LT_CMD_RELOAD 5825# -------------- 5826# find reload flag for linker 5827# -- PORTME Some linkers may need a different reload flag. 5828m4_defun([_LT_CMD_RELOAD], 5829[AC_CACHE_CHECK([for $LD option to reload object files], 5830 lt_cv_ld_reload_flag, 5831 [lt_cv_ld_reload_flag='-r']) 5832reload_flag=$lt_cv_ld_reload_flag 5833case $reload_flag in 5834"" | " "*) ;; 5835*) reload_flag=" $reload_flag" ;; 5836esac 5837reload_cmds='$LD$reload_flag -o $output$reload_objs' 5838case $host_os in 5839 darwin*) 5840 if test "$GCC" = yes; then 5841 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 5842 else 5843 reload_cmds='$LD$reload_flag -o $output$reload_objs' 5844 fi 5845 ;; 5846esac 5847_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 5848_LT_TAGDECL([], [reload_cmds], [2])dnl 5849])# _LT_CMD_RELOAD 5850 5851 5852# _LT_CHECK_MAGIC_METHOD 5853# ---------------------- 5854# how to check for library dependencies 5855# -- PORTME fill in with the dynamic library characteristics 5856m4_defun([_LT_CHECK_MAGIC_METHOD], 5857[m4_require([_LT_DECL_EGREP]) 5858m4_require([_LT_DECL_OBJDUMP]) 5859AC_CACHE_CHECK([how to recognize dependent libraries], 5860lt_cv_deplibs_check_method, 5861[lt_cv_file_magic_cmd='$MAGIC_CMD' 5862lt_cv_file_magic_test_file= 5863lt_cv_deplibs_check_method='unknown' 5864# Need to set the preceding variable on all platforms that support 5865# interlibrary dependencies. 5866# 'none' -- dependencies not supported. 5867# `unknown' -- same as none, but documents that we really don't know. 5868# 'pass_all' -- all dependencies passed with no checks. 5869# 'test_compile' -- check by making test program. 5870# 'file_magic [[regex]]' -- check by looking for files in library path 5871# which responds to the $file_magic_cmd with a given extended regex. 5872# If you have `file' or equivalent on your system and you're not sure 5873# whether `pass_all' will *always* work, you probably want this one. 5874 5875case $host_os in 5876aix[[4-9]]*) 5877 lt_cv_deplibs_check_method=pass_all 5878 ;; 5879 5880beos*) 5881 lt_cv_deplibs_check_method=pass_all 5882 ;; 5883 5884bsdi[[45]]*) 5885 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 5886 lt_cv_file_magic_cmd='/usr/bin/file -L' 5887 lt_cv_file_magic_test_file=/shlib/libc.so 5888 ;; 5889 5890cygwin*) 5891 # func_win32_libid is a shell function defined in ltmain.sh 5892 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5893 lt_cv_file_magic_cmd='func_win32_libid' 5894 ;; 5895 5896mingw* | pw32*) 5897 # Base MSYS/MinGW do not provide the 'file' command needed by 5898 # func_win32_libid shell function, so use a weaker test based on 'objdump', 5899 # unless we find 'file', for example because we are cross-compiling. 5900 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 5901 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 5902 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 5903 lt_cv_file_magic_cmd='func_win32_libid' 5904 else 5905 # Keep this pattern in sync with the one in func_win32_libid. 5906 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 5907 lt_cv_file_magic_cmd='$OBJDUMP -f' 5908 fi 5909 ;; 5910 5911cegcc*) 5912 # use the weaker test based on 'objdump'. See mingw*. 5913 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 5914 lt_cv_file_magic_cmd='$OBJDUMP -f' 5915 ;; 5916 5917darwin* | rhapsody*) 5918 lt_cv_deplibs_check_method=pass_all 5919 ;; 5920 5921freebsd* | dragonfly*) 5922 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5923 case $host_cpu in 5924 i*86 ) 5925 # Not sure whether the presence of OpenBSD here was a mistake. 5926 # Let's accept both of them until this is cleared up. 5927 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 5928 lt_cv_file_magic_cmd=/usr/bin/file 5929 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 5930 ;; 5931 esac 5932 else 5933 lt_cv_deplibs_check_method=pass_all 5934 fi 5935 ;; 5936 5937gnu*) 5938 lt_cv_deplibs_check_method=pass_all 5939 ;; 5940 5941haiku*) 5942 lt_cv_deplibs_check_method=pass_all 5943 ;; 5944 5945hpux10.20* | hpux11*) 5946 lt_cv_file_magic_cmd=/usr/bin/file 5947 case $host_cpu in 5948 ia64*) 5949 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 5950 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 5951 ;; 5952 hppa*64*) 5953 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 5954 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 5955 ;; 5956 *) 5957 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 5958 lt_cv_file_magic_test_file=/usr/lib/libc.sl 5959 ;; 5960 esac 5961 ;; 5962 5963interix[[3-9]]*) 5964 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 5965 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 5966 ;; 5967 5968irix5* | irix6* | nonstopux*) 5969 case $LD in 5970 *-32|*"-32 ") libmagic=32-bit;; 5971 *-n32|*"-n32 ") libmagic=N32;; 5972 *-64|*"-64 ") libmagic=64-bit;; 5973 *) libmagic=never-match;; 5974 esac 5975 lt_cv_deplibs_check_method=pass_all 5976 ;; 5977 5978# This must be Linux ELF. 5979linux* | k*bsd*-gnu | kopensolaris*-gnu) 5980 lt_cv_deplibs_check_method=pass_all 5981 ;; 5982 5983netbsd*) 5984 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 5985 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 5986 else 5987 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 5988 fi 5989 ;; 5990 5991newos6*) 5992 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 5993 lt_cv_file_magic_cmd=/usr/bin/file 5994 lt_cv_file_magic_test_file=/usr/lib/libnls.so 5995 ;; 5996 5997*nto* | *qnx*) 5998 lt_cv_deplibs_check_method=pass_all 5999 ;; 6000 6001openbsd*) 6002 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6003 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 6004 else 6005 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 6006 fi 6007 ;; 6008 6009osf3* | osf4* | osf5*) 6010 lt_cv_deplibs_check_method=pass_all 6011 ;; 6012 6013rdos*) 6014 lt_cv_deplibs_check_method=pass_all 6015 ;; 6016 6017solaris*) 6018 lt_cv_deplibs_check_method=pass_all 6019 ;; 6020 6021sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 6022 lt_cv_deplibs_check_method=pass_all 6023 ;; 6024 6025sysv4 | sysv4.3*) 6026 case $host_vendor in 6027 motorola) 6028 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]]' 6029 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 6030 ;; 6031 ncr) 6032 lt_cv_deplibs_check_method=pass_all 6033 ;; 6034 sequent) 6035 lt_cv_file_magic_cmd='/bin/file' 6036 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 6037 ;; 6038 sni) 6039 lt_cv_file_magic_cmd='/bin/file' 6040 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 6041 lt_cv_file_magic_test_file=/lib/libc.so 6042 ;; 6043 siemens) 6044 lt_cv_deplibs_check_method=pass_all 6045 ;; 6046 pc) 6047 lt_cv_deplibs_check_method=pass_all 6048 ;; 6049 esac 6050 ;; 6051 6052tpf*) 6053 lt_cv_deplibs_check_method=pass_all 6054 ;; 6055esac 6056]) 6057file_magic_cmd=$lt_cv_file_magic_cmd 6058deplibs_check_method=$lt_cv_deplibs_check_method 6059test -z "$deplibs_check_method" && deplibs_check_method=unknown 6060 6061_LT_DECL([], [deplibs_check_method], [1], 6062 [Method to check whether dependent libraries are shared objects]) 6063_LT_DECL([], [file_magic_cmd], [1], 6064 [Command to use when deplibs_check_method == "file_magic"]) 6065])# _LT_CHECK_MAGIC_METHOD 6066 6067 6068# LT_PATH_NM 6069# ---------- 6070# find the pathname to a BSD- or MS-compatible name lister 6071AC_DEFUN([LT_PATH_NM], 6072[AC_REQUIRE([AC_PROG_CC])dnl 6073AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 6074[if test -n "$NM"; then 6075 # Let the user override the test. 6076 lt_cv_path_NM="$NM" 6077else 6078 lt_nm_to_check="${ac_tool_prefix}nm" 6079 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 6080 lt_nm_to_check="$lt_nm_to_check nm" 6081 fi 6082 for lt_tmp_nm in $lt_nm_to_check; do 6083 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 6084 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 6085 IFS="$lt_save_ifs" 6086 test -z "$ac_dir" && ac_dir=. 6087 tmp_nm="$ac_dir/$lt_tmp_nm" 6088 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 6089 # Check to see if the nm accepts a BSD-compat flag. 6090 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 6091 # nm: unknown option "B" ignored 6092 # Tru64's nm complains that /dev/null is an invalid object file 6093 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 6094 */dev/null* | *'Invalid file or object type'*) 6095 lt_cv_path_NM="$tmp_nm -B" 6096 break 6097 ;; 6098 *) 6099 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 6100 */dev/null*) 6101 lt_cv_path_NM="$tmp_nm -p" 6102 break 6103 ;; 6104 *) 6105 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 6106 continue # so that we can try to find one that supports BSD flags 6107 ;; 6108 esac 6109 ;; 6110 esac 6111 fi 6112 done 6113 IFS="$lt_save_ifs" 6114 done 6115 : ${lt_cv_path_NM=no} 6116fi]) 6117if test "$lt_cv_path_NM" != "no"; then 6118 NM="$lt_cv_path_NM" 6119else 6120 # Didn't find any BSD compatible name lister, look for dumpbin. 6121 if test -n "$DUMPBIN"; then : 6122 # Let the user override the test. 6123 else 6124 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 6125 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 6126 *COFF*) 6127 DUMPBIN="$DUMPBIN -symbols" 6128 ;; 6129 *) 6130 DUMPBIN=: 6131 ;; 6132 esac 6133 fi 6134 AC_SUBST([DUMPBIN]) 6135 if test "$DUMPBIN" != ":"; then 6136 NM="$DUMPBIN" 6137 fi 6138fi 6139test -z "$NM" && NM=nm 6140AC_SUBST([NM]) 6141_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 6142 6143AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 6144 [lt_cv_nm_interface="BSD nm" 6145 echo "int some_variable = 0;" > conftest.$ac_ext 6146 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 6147 (eval "$ac_compile" 2>conftest.err) 6148 cat conftest.err >&AS_MESSAGE_LOG_FD 6149 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 6150 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 6151 cat conftest.err >&AS_MESSAGE_LOG_FD 6152 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 6153 cat conftest.out >&AS_MESSAGE_LOG_FD 6154 if $GREP 'External.*some_variable' conftest.out > /dev/null; then 6155 lt_cv_nm_interface="MS dumpbin" 6156 fi 6157 rm -f conftest*]) 6158])# LT_PATH_NM 6159 6160# Old names: 6161AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 6162AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 6163dnl aclocal-1.4 backwards compatibility: 6164dnl AC_DEFUN([AM_PROG_NM], []) 6165dnl AC_DEFUN([AC_PROG_NM], []) 6166 6167 6168# LT_LIB_M 6169# -------- 6170# check for math library 6171AC_DEFUN([LT_LIB_M], 6172[AC_REQUIRE([AC_CANONICAL_HOST])dnl 6173LIBM= 6174case $host in 6175*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 6176 # These system don't have libm, or don't need it 6177 ;; 6178*-ncr-sysv4.3*) 6179 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 6180 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 6181 ;; 6182*) 6183 AC_CHECK_LIB(m, cos, LIBM="-lm") 6184 ;; 6185esac 6186AC_SUBST([LIBM]) 6187])# LT_LIB_M 6188 6189# Old name: 6190AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 6191dnl aclocal-1.4 backwards compatibility: 6192dnl AC_DEFUN([AC_CHECK_LIBM], []) 6193 6194 6195# _LT_COMPILER_NO_RTTI([TAGNAME]) 6196# ------------------------------- 6197m4_defun([_LT_COMPILER_NO_RTTI], 6198[m4_require([_LT_TAG_COMPILER])dnl 6199 6200_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6201 6202if test "$GCC" = yes; then 6203 case $cc_basename in 6204 nvcc*) 6205 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 6206 *) 6207 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 6208 esac 6209 6210 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 6211 lt_cv_prog_compiler_rtti_exceptions, 6212 [-fno-rtti -fno-exceptions], [], 6213 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 6214fi 6215_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 6216 [Compiler flag to turn off builtin functions]) 6217])# _LT_COMPILER_NO_RTTI 6218 6219 6220# _LT_CMD_GLOBAL_SYMBOLS 6221# ---------------------- 6222m4_defun([_LT_CMD_GLOBAL_SYMBOLS], 6223[AC_REQUIRE([AC_CANONICAL_HOST])dnl 6224AC_REQUIRE([AC_PROG_CC])dnl 6225AC_REQUIRE([AC_PROG_AWK])dnl 6226AC_REQUIRE([LT_PATH_NM])dnl 6227AC_REQUIRE([LT_PATH_LD])dnl 6228m4_require([_LT_DECL_SED])dnl 6229m4_require([_LT_DECL_EGREP])dnl 6230m4_require([_LT_TAG_COMPILER])dnl 6231 6232# Check for command to grab the raw symbol name followed by C symbol from nm. 6233AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 6234AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 6235[ 6236# These are sane defaults that work on at least a few old systems. 6237# [They come from Ultrix. What could be older than Ultrix?!! ;)] 6238 6239# Character class describing NM global symbol codes. 6240symcode='[[BCDEGRST]]' 6241 6242# Regexp to match symbols that can be accessed directly from C. 6243sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 6244 6245# Define system-specific variables. 6246case $host_os in 6247aix*) 6248 symcode='[[BCDT]]' 6249 ;; 6250cygwin* | mingw* | pw32* | cegcc*) 6251 symcode='[[ABCDGISTW]]' 6252 ;; 6253hpux*) 6254 if test "$host_cpu" = ia64; then 6255 symcode='[[ABCDEGRST]]' 6256 fi 6257 ;; 6258irix* | nonstopux*) 6259 symcode='[[BCDEGRST]]' 6260 ;; 6261osf*) 6262 symcode='[[BCDEGQRST]]' 6263 ;; 6264solaris*) 6265 symcode='[[BDRT]]' 6266 ;; 6267sco3.2v5*) 6268 symcode='[[DT]]' 6269 ;; 6270sysv4.2uw2*) 6271 symcode='[[DT]]' 6272 ;; 6273sysv5* | sco5v6* | unixware* | OpenUNIX*) 6274 symcode='[[ABDT]]' 6275 ;; 6276sysv4) 6277 symcode='[[DFNSTU]]' 6278 ;; 6279esac 6280 6281# If we're using GNU nm, then use its standard symbol codes. 6282case `$NM -V 2>&1` in 6283*GNU* | *'with BFD'*) 6284 symcode='[[ABCDGIRSTW]]' ;; 6285esac 6286 6287# Transform an extracted symbol line into a proper C declaration. 6288# Some systems (esp. on ia64) link data and code symbols differently, 6289# so use this general approach. 6290lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 6291 6292# Transform an extracted symbol line into symbol name and symbol address 6293lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 6294lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 6295 6296# Handle CRLF in mingw tool chain 6297opt_cr= 6298case $build_os in 6299mingw*) 6300 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 6301 ;; 6302esac 6303 6304# Try without a prefix underscore, then with it. 6305for ac_symprfx in "" "_"; do 6306 6307 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 6308 symxfrm="\\1 $ac_symprfx\\2 \\2" 6309 6310 # Write the raw and C identifiers. 6311 if test "$lt_cv_nm_interface" = "MS dumpbin"; then 6312 # Fake it for dumpbin and say T for any non-static function 6313 # and D for any global variable. 6314 # Also find C++ and __fastcall symbols from MSVC++, 6315 # which start with @ or ?. 6316 lt_cv_sys_global_symbol_pipe="$AWK ['"\ 6317" {last_section=section; section=\$ 3};"\ 6318" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 6319" \$ 0!~/External *\|/{next};"\ 6320" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 6321" {if(hide[section]) next};"\ 6322" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 6323" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 6324" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 6325" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 6326" ' prfx=^$ac_symprfx]" 6327 else 6328 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 6329 fi 6330 6331 # Check to see that the pipe works correctly. 6332 pipe_works=no 6333 6334 rm -f conftest* 6335 cat > conftest.$ac_ext <<_LT_EOF 6336#ifdef __cplusplus 6337extern "C" { 6338#endif 6339char nm_test_var; 6340void nm_test_func(void); 6341void nm_test_func(void){} 6342#ifdef __cplusplus 6343} 6344#endif 6345int main(){nm_test_var='a';nm_test_func();return(0);} 6346_LT_EOF 6347 6348 if AC_TRY_EVAL(ac_compile); then 6349 # Now try to grab the symbols. 6350 nlist=conftest.nm 6351 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 6352 # Try sorting and uniquifying the output. 6353 if sort "$nlist" | uniq > "$nlist"T; then 6354 mv -f "$nlist"T "$nlist" 6355 else 6356 rm -f "$nlist"T 6357 fi 6358 6359 # Make sure that we snagged all the symbols we need. 6360 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 6361 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 6362 cat <<_LT_EOF > conftest.$ac_ext 6363#ifdef __cplusplus 6364extern "C" { 6365#endif 6366 6367_LT_EOF 6368 # Now generate the symbol file. 6369 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 6370 6371 cat <<_LT_EOF >> conftest.$ac_ext 6372 6373/* The mapping between symbol names and symbols. */ 6374const struct { 6375 const char *name; 6376 void *address; 6377} 6378lt__PROGRAM__LTX_preloaded_symbols[[]] = 6379{ 6380 { "@PROGRAM@", (void *) 0 }, 6381_LT_EOF 6382 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 6383 cat <<\_LT_EOF >> conftest.$ac_ext 6384 {0, (void *) 0} 6385}; 6386 6387/* This works around a problem in FreeBSD linker */ 6388#ifdef FREEBSD_WORKAROUND 6389static const void *lt_preloaded_setup() { 6390 return lt__PROGRAM__LTX_preloaded_symbols; 6391} 6392#endif 6393 6394#ifdef __cplusplus 6395} 6396#endif 6397_LT_EOF 6398 # Now try linking the two files. 6399 mv conftest.$ac_objext conftstm.$ac_objext 6400 lt_save_LIBS="$LIBS" 6401 lt_save_CFLAGS="$CFLAGS" 6402 LIBS="conftstm.$ac_objext" 6403 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 6404 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 6405 pipe_works=yes 6406 fi 6407 LIBS="$lt_save_LIBS" 6408 CFLAGS="$lt_save_CFLAGS" 6409 else 6410 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 6411 fi 6412 else 6413 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 6414 fi 6415 else 6416 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 6417 fi 6418 else 6419 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 6420 cat conftest.$ac_ext >&5 6421 fi 6422 rm -rf conftest* conftst* 6423 6424 # Do not use the global_symbol_pipe unless it works. 6425 if test "$pipe_works" = yes; then 6426 break 6427 else 6428 lt_cv_sys_global_symbol_pipe= 6429 fi 6430done 6431]) 6432if test -z "$lt_cv_sys_global_symbol_pipe"; then 6433 lt_cv_sys_global_symbol_to_cdecl= 6434fi 6435if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 6436 AC_MSG_RESULT(failed) 6437else 6438 AC_MSG_RESULT(ok) 6439fi 6440 6441_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 6442 [Take the output of nm and produce a listing of raw symbols and C names]) 6443_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 6444 [Transform the output of nm in a proper C declaration]) 6445_LT_DECL([global_symbol_to_c_name_address], 6446 [lt_cv_sys_global_symbol_to_c_name_address], [1], 6447 [Transform the output of nm in a C name address pair]) 6448_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 6449 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 6450 [Transform the output of nm in a C name address pair when lib prefix is needed]) 6451]) # _LT_CMD_GLOBAL_SYMBOLS 6452 6453 6454# _LT_COMPILER_PIC([TAGNAME]) 6455# --------------------------- 6456m4_defun([_LT_COMPILER_PIC], 6457[m4_require([_LT_TAG_COMPILER])dnl 6458_LT_TAGVAR(lt_prog_compiler_wl, $1)= 6459_LT_TAGVAR(lt_prog_compiler_pic, $1)= 6460_LT_TAGVAR(lt_prog_compiler_static, $1)= 6461 6462AC_MSG_CHECKING([for $compiler option to produce PIC]) 6463m4_if([$1], [CXX], [ 6464 # C++ specific cases for pic, static, wl, etc. 6465 if test "$GXX" = yes; then 6466 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6467 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6468 6469 case $host_os in 6470 aix*) 6471 # All AIX code is PIC. 6472 if test "$host_cpu" = ia64; then 6473 # AIX 5 now supports IA64 processor 6474 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6475 fi 6476 ;; 6477 6478 amigaos*) 6479 case $host_cpu in 6480 powerpc) 6481 # see comment about AmigaOS4 .so support 6482 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6483 ;; 6484 m68k) 6485 # FIXME: we need at least 68020 code to build shared libraries, but 6486 # adding the `-m68020' flag to GCC prevents building anything better, 6487 # like `-m68040'. 6488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6489 ;; 6490 esac 6491 ;; 6492 6493 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6494 # PIC is the default for these OSes. 6495 ;; 6496 mingw* | cygwin* | os2* | pw32* | cegcc*) 6497 # This hack is so that the source file can tell whether it is being 6498 # built for inclusion in a dll (and should export symbols for example). 6499 # Although the cygwin gcc ignores -fPIC, still need this for old-style 6500 # (--disable-auto-import) libraries 6501 m4_if([$1], [GCJ], [], 6502 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6503 ;; 6504 darwin* | rhapsody*) 6505 # PIC is the default on this platform 6506 # Common symbols not allowed in MH_DYLIB files 6507 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6508 ;; 6509 *djgpp*) 6510 # DJGPP does not support shared libraries at all 6511 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6512 ;; 6513 haiku*) 6514 # PIC is the default for Haiku. 6515 # The "-static" flag exists, but is broken. 6516 _LT_TAGVAR(lt_prog_compiler_static, $1)= 6517 ;; 6518 interix[[3-9]]*) 6519 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6520 # Instead, we relocate shared libraries at runtime. 6521 ;; 6522 sysv4*MP*) 6523 if test -d /usr/nec; then 6524 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6525 fi 6526 ;; 6527 hpux*) 6528 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6529 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6530 # sets the default TLS model and affects inlining. 6531 case $host_cpu in 6532 hppa*64*) 6533 ;; 6534 *) 6535 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6536 ;; 6537 esac 6538 ;; 6539 *qnx* | *nto*) 6540 # QNX uses GNU C++, but need to define -shared option too, otherwise 6541 # it will coredump. 6542 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6543 ;; 6544 *) 6545 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6546 ;; 6547 esac 6548 else 6549 case $host_os in 6550 aix[[4-9]]*) 6551 # All AIX code is PIC. 6552 if test "$host_cpu" = ia64; then 6553 # AIX 5 now supports IA64 processor 6554 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6555 else 6556 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6557 fi 6558 ;; 6559 chorus*) 6560 case $cc_basename in 6561 cxch68*) 6562 # Green Hills C++ Compiler 6563 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" 6564 ;; 6565 esac 6566 ;; 6567 dgux*) 6568 case $cc_basename in 6569 ec++*) 6570 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6571 ;; 6572 ghcx*) 6573 # Green Hills C++ Compiler 6574 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6575 ;; 6576 *) 6577 ;; 6578 esac 6579 ;; 6580 freebsd* | dragonfly*) 6581 # FreeBSD uses GNU C++ 6582 ;; 6583 hpux9* | hpux10* | hpux11*) 6584 case $cc_basename in 6585 CC*) 6586 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6587 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6588 if test "$host_cpu" != ia64; then 6589 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6590 fi 6591 ;; 6592 aCC*) 6593 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6594 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6595 case $host_cpu in 6596 hppa*64*|ia64*) 6597 # +Z the default 6598 ;; 6599 *) 6600 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6601 ;; 6602 esac 6603 ;; 6604 *) 6605 ;; 6606 esac 6607 ;; 6608 interix*) 6609 # This is c89, which is MS Visual C++ (no shared libs) 6610 # Anyone wants to do a port? 6611 ;; 6612 irix5* | irix6* | nonstopux*) 6613 case $cc_basename in 6614 CC*) 6615 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6616 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6617 # CC pic flag -KPIC is the default. 6618 ;; 6619 *) 6620 ;; 6621 esac 6622 ;; 6623 linux* | k*bsd*-gnu | kopensolaris*-gnu) 6624 case $cc_basename in 6625 KCC*) 6626 # KAI C++ Compiler 6627 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6628 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6629 ;; 6630 ecpc* ) 6631 # old Intel C++ for x86_64 which still supported -KPIC. 6632 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6633 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6634 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6635 ;; 6636 icpc* ) 6637 # Intel C++, used to be incompatible with GCC. 6638 # ICC 10 doesn't accept -KPIC any more. 6639 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6640 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6641 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6642 ;; 6643 pgCC* | pgcpp*) 6644 # Portland Group C++ compiler 6645 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6646 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6647 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6648 ;; 6649 cxx*) 6650 # Compaq C++ 6651 # Make sure the PIC flag is empty. It appears that all Alpha 6652 # Linux and Compaq Tru64 Unix objects are PIC. 6653 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6654 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6655 ;; 6656 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 6657 # IBM XL 8.0, 9.0 on PPC and BlueGene 6658 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6659 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6660 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6661 ;; 6662 *) 6663 case `$CC -V 2>&1 | sed 5q` in 6664 *Sun\ C*) 6665 # Sun C++ 5.9 6666 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6667 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6668 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6669 ;; 6670 esac 6671 ;; 6672 esac 6673 ;; 6674 lynxos*) 6675 ;; 6676 m88k*) 6677 ;; 6678 mvs*) 6679 case $cc_basename in 6680 cxx*) 6681 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 6682 ;; 6683 *) 6684 ;; 6685 esac 6686 ;; 6687 netbsd*) 6688 ;; 6689 *qnx* | *nto*) 6690 # QNX uses GNU C++, but need to define -shared option too, otherwise 6691 # it will coredump. 6692 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6693 ;; 6694 osf3* | osf4* | osf5*) 6695 case $cc_basename in 6696 KCC*) 6697 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6698 ;; 6699 RCC*) 6700 # Rational C++ 2.4.1 6701 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6702 ;; 6703 cxx*) 6704 # Digital/Compaq C++ 6705 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6706 # Make sure the PIC flag is empty. It appears that all Alpha 6707 # Linux and Compaq Tru64 Unix objects are PIC. 6708 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6709 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6710 ;; 6711 *) 6712 ;; 6713 esac 6714 ;; 6715 psos*) 6716 ;; 6717 solaris*) 6718 case $cc_basename in 6719 CC* | sunCC*) 6720 # Sun C++ 4.2, 5.x and Centerline C++ 6721 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6722 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6723 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6724 ;; 6725 gcx*) 6726 # Green Hills C++ Compiler 6727 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6728 ;; 6729 *) 6730 ;; 6731 esac 6732 ;; 6733 sunos4*) 6734 case $cc_basename in 6735 CC*) 6736 # Sun C++ 4.x 6737 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6738 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6739 ;; 6740 lcc*) 6741 # Lucid 6742 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6743 ;; 6744 *) 6745 ;; 6746 esac 6747 ;; 6748 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6749 case $cc_basename in 6750 CC*) 6751 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6752 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6753 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6754 ;; 6755 esac 6756 ;; 6757 tandem*) 6758 case $cc_basename in 6759 NCC*) 6760 # NonStop-UX NCC 3.20 6761 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6762 ;; 6763 *) 6764 ;; 6765 esac 6766 ;; 6767 vxworks*) 6768 ;; 6769 *) 6770 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6771 ;; 6772 esac 6773 fi 6774], 6775[ 6776 if test "$GCC" = yes; then 6777 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6778 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6779 6780 case $host_os in 6781 aix*) 6782 # All AIX code is PIC. 6783 if test "$host_cpu" = ia64; then 6784 # AIX 5 now supports IA64 processor 6785 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6786 fi 6787 ;; 6788 6789 amigaos*) 6790 case $host_cpu in 6791 powerpc) 6792 # see comment about AmigaOS4 .so support 6793 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6794 ;; 6795 m68k) 6796 # FIXME: we need at least 68020 code to build shared libraries, but 6797 # adding the `-m68020' flag to GCC prevents building anything better, 6798 # like `-m68040'. 6799 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6800 ;; 6801 esac 6802 ;; 6803 6804 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6805 # PIC is the default for these OSes. 6806 ;; 6807 6808 mingw* | cygwin* | pw32* | os2* | cegcc*) 6809 # This hack is so that the source file can tell whether it is being 6810 # built for inclusion in a dll (and should export symbols for example). 6811 # Although the cygwin gcc ignores -fPIC, still need this for old-style 6812 # (--disable-auto-import) libraries 6813 m4_if([$1], [GCJ], [], 6814 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6815 ;; 6816 6817 darwin* | rhapsody*) 6818 # PIC is the default on this platform 6819 # Common symbols not allowed in MH_DYLIB files 6820 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6821 ;; 6822 6823 haiku*) 6824 # PIC is the default for Haiku. 6825 # The "-static" flag exists, but is broken. 6826 _LT_TAGVAR(lt_prog_compiler_static, $1)= 6827 ;; 6828 6829 hpux*) 6830 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6831 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6832 # sets the default TLS model and affects inlining. 6833 case $host_cpu in 6834 hppa*64*) 6835 # +Z the default 6836 ;; 6837 *) 6838 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6839 ;; 6840 esac 6841 ;; 6842 6843 interix[[3-9]]*) 6844 # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6845 # Instead, we relocate shared libraries at runtime. 6846 ;; 6847 6848 msdosdjgpp*) 6849 # Just because we use GCC doesn't mean we suddenly get shared libraries 6850 # on systems that don't support them. 6851 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6852 enable_shared=no 6853 ;; 6854 6855 *nto* | *qnx*) 6856 # QNX uses GNU C++, but need to define -shared option too, otherwise 6857 # it will coredump. 6858 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6859 ;; 6860 6861 sysv4*MP*) 6862 if test -d /usr/nec; then 6863 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6864 fi 6865 ;; 6866 6867 *) 6868 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6869 ;; 6870 esac 6871 6872 case $cc_basename in 6873 nvcc*) # Cuda Compiler Driver 2.2 6874 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 6875 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 6876 ;; 6877 esac 6878 else 6879 # PORTME Check for flag to pass linker flags through the system compiler. 6880 case $host_os in 6881 aix*) 6882 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6883 if test "$host_cpu" = ia64; then 6884 # AIX 5 now supports IA64 processor 6885 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6886 else 6887 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6888 fi 6889 ;; 6890 6891 mingw* | cygwin* | pw32* | os2* | cegcc*) 6892 # This hack is so that the source file can tell whether it is being 6893 # built for inclusion in a dll (and should export symbols for example). 6894 m4_if([$1], [GCJ], [], 6895 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6896 ;; 6897 6898 hpux9* | hpux10* | hpux11*) 6899 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6900 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6901 # not for PA HP-UX. 6902 case $host_cpu in 6903 hppa*64*|ia64*) 6904 # +Z the default 6905 ;; 6906 *) 6907 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6908 ;; 6909 esac 6910 # Is there a better lt_prog_compiler_static that works with the bundled CC? 6911 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6912 ;; 6913 6914 irix5* | irix6* | nonstopux*) 6915 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6916 # PIC (with -KPIC) is the default. 6917 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6918 ;; 6919 6920 linux* | k*bsd*-gnu | kopensolaris*-gnu) 6921 case $cc_basename in 6922 # old Intel for x86_64 which still supported -KPIC. 6923 ecc*) 6924 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6925 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6926 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6927 ;; 6928 # icc used to be incompatible with GCC. 6929 # ICC 10 doesn't accept -KPIC any more. 6930 icc* | ifort*) 6931 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6932 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6933 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6934 ;; 6935 # Lahey Fortran 8.1. 6936 lf95*) 6937 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6938 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 6939 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 6940 ;; 6941 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 6942 # Portland Group compilers (*not* the Pentium gcc compiler, 6943 # which looks to be a dead project) 6944 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6945 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6946 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6947 ;; 6948 ccc*) 6949 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6950 # All Alpha code is PIC. 6951 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6952 ;; 6953 xl* | bgxl* | bgf* | mpixl*) 6954 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 6955 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6956 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6957 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6958 ;; 6959 *) 6960 case `$CC -V 2>&1 | sed 5q` in 6961 *Sun\ F* | *Sun*Fortran*) 6962 # Sun Fortran 8.3 passes all unrecognized flags to the linker 6963 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6964 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6965 _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 6966 ;; 6967 *Sun\ C*) 6968 # Sun C 5.9 6969 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6970 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6971 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6972 ;; 6973 esac 6974 ;; 6975 esac 6976 ;; 6977 6978 newsos6) 6979 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6980 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6981 ;; 6982 6983 *nto* | *qnx*) 6984 # QNX uses GNU C++, but need to define -shared option too, otherwise 6985 # it will coredump. 6986 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6987 ;; 6988 6989 osf3* | osf4* | osf5*) 6990 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6991 # All OSF/1 code is PIC. 6992 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6993 ;; 6994 6995 rdos*) 6996 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6997 ;; 6998 6999 solaris*) 7000 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7001 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7002 case $cc_basename in 7003 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 7004 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 7005 *) 7006 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 7007 esac 7008 ;; 7009 7010 sunos4*) 7011 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 7012 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 7013 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7014 ;; 7015 7016 sysv4 | sysv4.2uw2* | sysv4.3*) 7017 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7018 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7019 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7020 ;; 7021 7022 sysv4*MP*) 7023 if test -d /usr/nec ;then 7024 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 7025 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7026 fi 7027 ;; 7028 7029 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 7030 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7031 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 7032 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7033 ;; 7034 7035 unicos*) 7036 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 7037 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7038 ;; 7039 7040 uts4*) 7041 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 7042 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 7043 ;; 7044 7045 *) 7046 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 7047 ;; 7048 esac 7049 fi 7050]) 7051case $host_os in 7052 # For platforms which do not support PIC, -DPIC is meaningless: 7053 *djgpp*) 7054 _LT_TAGVAR(lt_prog_compiler_pic, $1)= 7055 ;; 7056 *) 7057 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 7058 ;; 7059esac 7060AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 7061_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 7062 [How to pass a linker flag through the compiler]) 7063 7064# 7065# Check to make sure the PIC flag actually works. 7066# 7067if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 7068 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 7069 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 7070 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 7071 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 7072 "" | " "*) ;; 7073 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 7074 esac], 7075 [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 7076 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 7077fi 7078_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 7079 [Additional compiler flags for building library objects]) 7080 7081# 7082# Check to make sure the static flag actually works. 7083# 7084wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 7085_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 7086 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 7087 $lt_tmp_static_flag, 7088 [], 7089 [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 7090_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 7091 [Compiler flag to prevent dynamic linking]) 7092])# _LT_COMPILER_PIC 7093 7094 7095# _LT_LINKER_SHLIBS([TAGNAME]) 7096# ---------------------------- 7097# See if the linker supports building shared libraries. 7098m4_defun([_LT_LINKER_SHLIBS], 7099[AC_REQUIRE([LT_PATH_LD])dnl 7100AC_REQUIRE([LT_PATH_NM])dnl 7101m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7102m4_require([_LT_DECL_EGREP])dnl 7103m4_require([_LT_DECL_SED])dnl 7104m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 7105m4_require([_LT_TAG_COMPILER])dnl 7106AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 7107m4_if([$1], [CXX], [ 7108 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7109 case $host_os in 7110 aix[[4-9]]*) 7111 # If we're using GNU nm, then we don't want the "-C" option. 7112 # -C means demangle to AIX nm, but means don't demangle with GNU nm 7113 # Also, AIX nm treats weak defined symbols like other global defined 7114 # symbols, whereas GNU nm marks them as "W". 7115 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 7116 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 7117 else 7118 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 7119 fi 7120 ;; 7121 pw32*) 7122 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 7123 ;; 7124 cygwin* | mingw* | cegcc*) 7125 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 7126 ;; 7127 *) 7128 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7129 ;; 7130 esac 7131 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 7132], [ 7133 runpath_var= 7134 _LT_TAGVAR(allow_undefined_flag, $1)= 7135 _LT_TAGVAR(always_export_symbols, $1)=no 7136 _LT_TAGVAR(archive_cmds, $1)= 7137 _LT_TAGVAR(archive_expsym_cmds, $1)= 7138 _LT_TAGVAR(compiler_needs_object, $1)=no 7139 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7140 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 7141 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 7142 _LT_TAGVAR(hardcode_automatic, $1)=no 7143 _LT_TAGVAR(hardcode_direct, $1)=no 7144 _LT_TAGVAR(hardcode_direct_absolute, $1)=no 7145 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7146 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7147 _LT_TAGVAR(hardcode_libdir_separator, $1)= 7148 _LT_TAGVAR(hardcode_minus_L, $1)=no 7149 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7150 _LT_TAGVAR(inherit_rpath, $1)=no 7151 _LT_TAGVAR(link_all_deplibs, $1)=unknown 7152 _LT_TAGVAR(module_cmds, $1)= 7153 _LT_TAGVAR(module_expsym_cmds, $1)= 7154 _LT_TAGVAR(old_archive_from_new_cmds, $1)= 7155 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 7156 _LT_TAGVAR(thread_safe_flag_spec, $1)= 7157 _LT_TAGVAR(whole_archive_flag_spec, $1)= 7158 # include_expsyms should be a list of space-separated symbols to be *always* 7159 # included in the symbol list 7160 _LT_TAGVAR(include_expsyms, $1)= 7161 # exclude_expsyms can be an extended regexp of symbols to exclude 7162 # it will be wrapped by ` (' and `)$', so one must not match beginning or 7163 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 7164 # as well as any symbol that contains `d'. 7165 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 7166 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 7167 # platforms (ab)use it in PIC code, but their linkers get confused if 7168 # the symbol is explicitly referenced. Since portable code cannot 7169 # rely on this symbol name, it's probably fine to never include it in 7170 # preloaded symbol tables. 7171 # Exclude shared library initialization/finalization symbols. 7172dnl Note also adjust exclude_expsyms for C++ above. 7173 extract_expsyms_cmds= 7174 7175 case $host_os in 7176 cygwin* | mingw* | pw32* | cegcc*) 7177 # FIXME: the MSVC++ port hasn't been tested in a loooong time 7178 # When not using gcc, we currently assume that we are using 7179 # Microsoft Visual C++. 7180 if test "$GCC" != yes; then 7181 with_gnu_ld=no 7182 fi 7183 ;; 7184 interix*) 7185 # we just hope/assume this is gcc and not c89 (= MSVC++) 7186 with_gnu_ld=yes 7187 ;; 7188 openbsd*) 7189 with_gnu_ld=no 7190 ;; 7191 esac 7192 7193 _LT_TAGVAR(ld_shlibs, $1)=yes 7194 7195 # On some targets, GNU ld is compatible enough with the native linker 7196 # that we're better off using the native interface for both. 7197 lt_use_gnu_ld_interface=no 7198 if test "$with_gnu_ld" = yes; then 7199 case $host_os in 7200 aix*) 7201 # The AIX port of GNU ld has always aspired to compatibility 7202 # with the native linker. However, as the warning in the GNU ld 7203 # block says, versions before 2.19.5* couldn't really create working 7204 # shared libraries, regardless of the interface used. 7205 case `$LD -v 2>&1` in 7206 *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 7207 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 7208 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 7209 *) 7210 lt_use_gnu_ld_interface=yes 7211 ;; 7212 esac 7213 ;; 7214 *) 7215 lt_use_gnu_ld_interface=yes 7216 ;; 7217 esac 7218 fi 7219 7220 if test "$lt_use_gnu_ld_interface" = yes; then 7221 # If archive_cmds runs LD, not CC, wlarc should be empty 7222 wlarc='${wl}' 7223 7224 # Set some defaults for GNU ld with shared library support. These 7225 # are reset later if shared libraries are not supported. Putting them 7226 # here allows them to be overridden if necessary. 7227 runpath_var=LD_RUN_PATH 7228 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7229 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7230 # ancient GNU ld didn't support --whole-archive et. al. 7231 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 7232 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7233 else 7234 _LT_TAGVAR(whole_archive_flag_spec, $1)= 7235 fi 7236 supports_anon_versioning=no 7237 case `$LD -v 2>&1` in 7238 *GNU\ gold*) supports_anon_versioning=yes ;; 7239 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 7240 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 7241 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 7242 *\ 2.11.*) ;; # other 2.11 versions 7243 *) supports_anon_versioning=yes ;; 7244 esac 7245 7246 # See if GNU ld supports shared libraries. 7247 case $host_os in 7248 aix[[3-9]]*) 7249 # On AIX/PPC, the GNU linker is very broken 7250 if test "$host_cpu" != ia64; then 7251 _LT_TAGVAR(ld_shlibs, $1)=no 7252 cat <<_LT_EOF 1>&2 7253 7254*** Warning: the GNU linker, at least up to release 2.19, is reported 7255*** to be unable to reliably create shared libraries on AIX. 7256*** Therefore, libtool is disabling shared libraries support. If you 7257*** really care for shared libraries, you may want to install binutils 7258*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 7259*** You will then need to restart the configuration process. 7260 7261_LT_EOF 7262 fi 7263 ;; 7264 7265 amigaos*) 7266 case $host_cpu in 7267 powerpc) 7268 # see comment about AmigaOS4 .so support 7269 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7270 _LT_TAGVAR(archive_expsym_cmds, $1)='' 7271 ;; 7272 m68k) 7273 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 7274 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7275 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7276 ;; 7277 esac 7278 ;; 7279 7280 beos*) 7281 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7282 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7283 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 7284 # support --undefined. This deserves some investigation. FIXME 7285 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7286 else 7287 _LT_TAGVAR(ld_shlibs, $1)=no 7288 fi 7289 ;; 7290 7291 cygwin* | mingw* | pw32* | cegcc*) 7292 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 7293 # as there is no search path for DLLs. 7294 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7295 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 7296 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7297 _LT_TAGVAR(always_export_symbols, $1)=no 7298 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7299 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 7300 7301 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 7302 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 7303 # If the export-symbols file already is a .def file (1st line 7304 # is EXPORTS), use it as is; otherwise, prepend... 7305 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 7306 cp $export_symbols $output_objdir/$soname.def; 7307 else 7308 echo EXPORTS > $output_objdir/$soname.def; 7309 cat $export_symbols >> $output_objdir/$soname.def; 7310 fi~ 7311 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 7312 else 7313 _LT_TAGVAR(ld_shlibs, $1)=no 7314 fi 7315 ;; 7316 7317 haiku*) 7318 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7319 _LT_TAGVAR(link_all_deplibs, $1)=yes 7320 ;; 7321 7322 interix[[3-9]]*) 7323 _LT_TAGVAR(hardcode_direct, $1)=no 7324 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7325 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7326 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7327 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7328 # Instead, shared libraries are loaded at an image base (0x10000000 by 7329 # default) and relocated if they conflict, which is a slow very memory 7330 # consuming and fragmenting process. To avoid this, we pick a random, 7331 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7332 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7333 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 7334 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 7335 ;; 7336 7337 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 7338 tmp_diet=no 7339 if test "$host_os" = linux-dietlibc; then 7340 case $cc_basename in 7341 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 7342 esac 7343 fi 7344 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 7345 && test "$tmp_diet" = no 7346 then 7347 tmp_addflag= 7348 tmp_sharedflag='-shared' 7349 case $cc_basename,$host_cpu in 7350 pgcc*) # Portland Group C compiler 7351 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 7352 tmp_addflag=' $pic_flag' 7353 ;; 7354 pgf77* | pgf90* | pgf95* | pgfortran*) 7355 # Portland Group f77 and f90 compilers 7356 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 7357 tmp_addflag=' $pic_flag -Mnomain' ;; 7358 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 7359 tmp_addflag=' -i_dynamic' ;; 7360 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 7361 tmp_addflag=' -i_dynamic -nofor_main' ;; 7362 ifc* | ifort*) # Intel Fortran compiler 7363 tmp_addflag=' -nofor_main' ;; 7364 lf95*) # Lahey Fortran 8.1 7365 _LT_TAGVAR(whole_archive_flag_spec, $1)= 7366 tmp_sharedflag='--shared' ;; 7367 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 7368 tmp_sharedflag='-qmkshrobj' 7369 tmp_addflag= ;; 7370 nvcc*) # Cuda Compiler Driver 2.2 7371 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 7372 _LT_TAGVAR(compiler_needs_object, $1)=yes 7373 ;; 7374 esac 7375 case `$CC -V 2>&1 | sed 5q` in 7376 *Sun\ C*) # Sun C 5.9 7377 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 7378 _LT_TAGVAR(compiler_needs_object, $1)=yes 7379 tmp_sharedflag='-G' ;; 7380 *Sun\ F*) # Sun Fortran 8.3 7381 tmp_sharedflag='-G' ;; 7382 esac 7383 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7384 7385 if test "x$supports_anon_versioning" = xyes; then 7386 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7387 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7388 echo "local: *; };" >> $output_objdir/$libname.ver~ 7389 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7390 fi 7391 7392 case $cc_basename in 7393 xlf* | bgf* | bgxlf* | mpixlf*) 7394 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 7395 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 7396 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7397 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 7398 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 7399 if test "x$supports_anon_versioning" = xyes; then 7400 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7401 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7402 echo "local: *; };" >> $output_objdir/$libname.ver~ 7403 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 7404 fi 7405 ;; 7406 esac 7407 else 7408 _LT_TAGVAR(ld_shlibs, $1)=no 7409 fi 7410 ;; 7411 7412 netbsd*) 7413 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7414 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 7415 wlarc= 7416 else 7417 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7418 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 7419 fi 7420 ;; 7421 7422 solaris*) 7423 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 7424 _LT_TAGVAR(ld_shlibs, $1)=no 7425 cat <<_LT_EOF 1>&2 7426 7427*** Warning: The releases 2.8.* of the GNU linker cannot reliably 7428*** create shared libraries on Solaris systems. Therefore, libtool 7429*** is disabling shared libraries support. We urge you to upgrade GNU 7430*** binutils to release 2.9.1 or newer. Another option is to modify 7431*** your PATH or compiler configuration so that the native linker is 7432*** used, and then restart. 7433 7434_LT_EOF 7435 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7436 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7437 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 7438 else 7439 _LT_TAGVAR(ld_shlibs, $1)=no 7440 fi 7441 ;; 7442 7443 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 7444 case `$LD -v 2>&1` in 7445 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 7446 _LT_TAGVAR(ld_shlibs, $1)=no 7447 cat <<_LT_EOF 1>&2 7448 7449*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 7450*** reliably create shared libraries on SCO systems. Therefore, libtool 7451*** is disabling shared libraries support. We urge you to upgrade GNU 7452*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 7453*** your PATH or compiler configuration so that the native linker is 7454*** used, and then restart. 7455 7456_LT_EOF 7457 ;; 7458 *) 7459 # For security reasons, it is highly recommended that you always 7460 # use absolute paths for naming shared libraries, and exclude the 7461 # DT_RUNPATH tag from executables and libraries. But doing so 7462 # requires that you compile everything twice, which is a pain. 7463 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7464 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7465 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7466 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 7467 else 7468 _LT_TAGVAR(ld_shlibs, $1)=no 7469 fi 7470 ;; 7471 esac 7472 ;; 7473 7474 sunos4*) 7475 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7476 wlarc= 7477 _LT_TAGVAR(hardcode_direct, $1)=yes 7478 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7479 ;; 7480 7481 *) 7482 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7483 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7484 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 7485 else 7486 _LT_TAGVAR(ld_shlibs, $1)=no 7487 fi 7488 ;; 7489 esac 7490 7491 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 7492 runpath_var= 7493 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7494 _LT_TAGVAR(export_dynamic_flag_spec, $1)= 7495 _LT_TAGVAR(whole_archive_flag_spec, $1)= 7496 fi 7497 else 7498 # PORTME fill in a description of your system's linker (not GNU ld) 7499 case $host_os in 7500 aix3*) 7501 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7502 _LT_TAGVAR(always_export_symbols, $1)=yes 7503 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' 7504 # Note: this linker hardcodes the directories in LIBPATH if there 7505 # are no directories specified by -L. 7506 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7507 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 7508 # Neither direct hardcoding nor static linking is supported with a 7509 # broken collect2. 7510 _LT_TAGVAR(hardcode_direct, $1)=unsupported 7511 fi 7512 ;; 7513 7514 aix[[4-9]]*) 7515 if test "$host_cpu" = ia64; then 7516 # On IA64, the linker does run time linking by default, so we don't 7517 # have to do anything special. 7518 aix_use_runtimelinking=no 7519 exp_sym_flag='-Bexport' 7520 no_entry_flag="" 7521 else 7522 # If we're using GNU nm, then we don't want the "-C" option. 7523 # -C means demangle to AIX nm, but means don't demangle with GNU nm 7524 # Also, AIX nm treats weak defined symbols like other global 7525 # defined symbols, whereas GNU nm marks them as "W". 7526 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 7527 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 7528 else 7529 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 7530 fi 7531 aix_use_runtimelinking=no 7532 7533 # Test if we are trying to use run time linking or normal 7534 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7535 # need to do runtime linking. 7536 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7537 for ld_flag in $LDFLAGS; do 7538 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 7539 aix_use_runtimelinking=yes 7540 break 7541 fi 7542 done 7543 ;; 7544 esac 7545 7546 exp_sym_flag='-bexport' 7547 no_entry_flag='-bnoentry' 7548 fi 7549 7550 # When large executables or shared objects are built, AIX ld can 7551 # have problems creating the table of contents. If linking a library 7552 # or program results in "error TOC overflow" add -mminimal-toc to 7553 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7554 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7555 7556 _LT_TAGVAR(archive_cmds, $1)='' 7557 _LT_TAGVAR(hardcode_direct, $1)=yes 7558 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7559 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7560 _LT_TAGVAR(link_all_deplibs, $1)=yes 7561 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7562 7563 if test "$GCC" = yes; then 7564 case $host_os in aix4.[[012]]|aix4.[[012]].*) 7565 # We only want to do this on AIX 4.2 and lower, the check 7566 # below for broken collect2 doesn't work under 4.3+ 7567 collect2name=`${CC} -print-prog-name=collect2` 7568 if test -f "$collect2name" && 7569 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7570 then 7571 # We have reworked collect2 7572 : 7573 else 7574 # We have old collect2 7575 _LT_TAGVAR(hardcode_direct, $1)=unsupported 7576 # It fails to find uninstalled libraries when the uninstalled 7577 # path is not listed in the libpath. Setting hardcode_minus_L 7578 # to unsupported forces relinking 7579 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7580 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7581 _LT_TAGVAR(hardcode_libdir_separator, $1)= 7582 fi 7583 ;; 7584 esac 7585 shared_flag='-shared' 7586 if test "$aix_use_runtimelinking" = yes; then 7587 shared_flag="$shared_flag "'${wl}-G' 7588 fi 7589 else 7590 # not using gcc 7591 if test "$host_cpu" = ia64; then 7592 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7593 # chokes on -Wl,-G. The following line is correct: 7594 shared_flag='-G' 7595 else 7596 if test "$aix_use_runtimelinking" = yes; then 7597 shared_flag='${wl}-G' 7598 else 7599 shared_flag='${wl}-bM:SRE' 7600 fi 7601 fi 7602 fi 7603 7604 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7605 # It seems that -bexpall does not export symbols beginning with 7606 # underscore (_), so it is better to generate a list of symbols to export. 7607 _LT_TAGVAR(always_export_symbols, $1)=yes 7608 if test "$aix_use_runtimelinking" = yes; then 7609 # Warning - without using the other runtime loading flags (-brtl), 7610 # -berok will link without error, but may produce a broken library. 7611 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7612 # Determine the default libpath from the value encoded in an 7613 # empty executable. 7614 _LT_SYS_MODULE_PATH_AIX 7615 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7616 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 7617 else 7618 if test "$host_cpu" = ia64; then 7619 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7620 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7621 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" 7622 else 7623 # Determine the default libpath from the value encoded in an 7624 # empty executable. 7625 _LT_SYS_MODULE_PATH_AIX 7626 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7627 # Warning - without using the other run time loading flags, 7628 # -berok will link without error, but may produce a broken library. 7629 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7630 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7631 if test "$with_gnu_ld" = yes; then 7632 # We only use this code for GNU lds that support --whole-archive. 7633 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7634 else 7635 # Exported symbols can be pulled into shared objects from archives 7636 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7637 fi 7638 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7639 # This is similar to how AIX traditionally builds its shared libraries. 7640 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 7641 fi 7642 fi 7643 ;; 7644 7645 amigaos*) 7646 case $host_cpu in 7647 powerpc) 7648 # see comment about AmigaOS4 .so support 7649 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7650 _LT_TAGVAR(archive_expsym_cmds, $1)='' 7651 ;; 7652 m68k) 7653 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 7654 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7655 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7656 ;; 7657 esac 7658 ;; 7659 7660 bsdi[[45]]*) 7661 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 7662 ;; 7663 7664 cygwin* | mingw* | pw32* | cegcc*) 7665 # When not using gcc, we currently assume that we are using 7666 # Microsoft Visual C++. 7667 # hardcode_libdir_flag_spec is actually meaningless, as there is 7668 # no search path for DLLs. 7669 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7670 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7671 # Tell ltmain to make .lib files, not .a files. 7672 libext=lib 7673 # Tell ltmain to make .dll files, not .so files. 7674 shrext_cmds=".dll" 7675 # FIXME: Setting linknames here is a bad hack. 7676 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 7677 # The linker will automatically build a .lib file if we build a DLL. 7678 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7679 # FIXME: Should let the user specify the lib program. 7680 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 7681 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 7682 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7683 ;; 7684 7685 darwin* | rhapsody*) 7686 _LT_DARWIN_LINKER_FEATURES($1) 7687 ;; 7688 7689 dgux*) 7690 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7691 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7692 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7693 ;; 7694 7695 freebsd1*) 7696 _LT_TAGVAR(ld_shlibs, $1)=no 7697 ;; 7698 7699 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7700 # support. Future versions do this automatically, but an explicit c++rt0.o 7701 # does not break anything, and helps significantly (at the cost of a little 7702 # extra space). 7703 freebsd2.2*) 7704 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7705 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7706 _LT_TAGVAR(hardcode_direct, $1)=yes 7707 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7708 ;; 7709 7710 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7711 freebsd2*) 7712 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7713 _LT_TAGVAR(hardcode_direct, $1)=yes 7714 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7715 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7716 ;; 7717 7718 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7719 freebsd* | dragonfly*) 7720 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 7721 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7722 _LT_TAGVAR(hardcode_direct, $1)=yes 7723 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7724 ;; 7725 7726 hpux9*) 7727 if test "$GCC" = yes; then 7728 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 7729 else 7730 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 7731 fi 7732 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7733 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7734 _LT_TAGVAR(hardcode_direct, $1)=yes 7735 7736 # hardcode_minus_L: Not really in the search PATH, 7737 # but as the default location of the library. 7738 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7739 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7740 ;; 7741 7742 hpux10*) 7743 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 7744 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7745 else 7746 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 7747 fi 7748 if test "$with_gnu_ld" = no; then 7749 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7750 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 7751 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7752 _LT_TAGVAR(hardcode_direct, $1)=yes 7753 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7754 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7755 # hardcode_minus_L: Not really in the search PATH, 7756 # but as the default location of the library. 7757 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7758 fi 7759 ;; 7760 7761 hpux11*) 7762 if test "$GCC" = yes && test "$with_gnu_ld" = no; then 7763 case $host_cpu in 7764 hppa*64*) 7765 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7766 ;; 7767 ia64*) 7768 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7769 ;; 7770 *) 7771 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7772 ;; 7773 esac 7774 else 7775 case $host_cpu in 7776 hppa*64*) 7777 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7778 ;; 7779 ia64*) 7780 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7781 ;; 7782 *) 7783 m4_if($1, [], [ 7784 # Older versions of the 11.00 compiler do not understand -b yet 7785 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 7786 _LT_LINKER_OPTION([if $CC understands -b], 7787 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 7788 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 7789 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 7790 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 7791 ;; 7792 esac 7793 fi 7794 if test "$with_gnu_ld" = no; then 7795 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7796 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7797 7798 case $host_cpu in 7799 hppa*64*|ia64*) 7800 _LT_TAGVAR(hardcode_direct, $1)=no 7801 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7802 ;; 7803 *) 7804 _LT_TAGVAR(hardcode_direct, $1)=yes 7805 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7806 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7807 7808 # hardcode_minus_L: Not really in the search PATH, 7809 # but as the default location of the library. 7810 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7811 ;; 7812 esac 7813 fi 7814 ;; 7815 7816 irix5* | irix6* | nonstopux*) 7817 if test "$GCC" = yes; then 7818 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7819 # Try to use the -exported_symbol ld option, if it does not 7820 # work, assume that -exports_file does not work either and 7821 # implicitly export all symbols. 7822 save_LDFLAGS="$LDFLAGS" 7823 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 7824 AC_LINK_IFELSE(int foo(void) {}, 7825 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 7826 ) 7827 LDFLAGS="$save_LDFLAGS" 7828 else 7829 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 7830 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 7831 fi 7832 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7833 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7834 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7835 _LT_TAGVAR(inherit_rpath, $1)=yes 7836 _LT_TAGVAR(link_all_deplibs, $1)=yes 7837 ;; 7838 7839 netbsd*) 7840 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7841 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 7842 else 7843 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 7844 fi 7845 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7846 _LT_TAGVAR(hardcode_direct, $1)=yes 7847 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7848 ;; 7849 7850 newsos6) 7851 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7852 _LT_TAGVAR(hardcode_direct, $1)=yes 7853 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7854 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7855 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7856 ;; 7857 7858 *nto* | *qnx*) 7859 ;; 7860 7861 openbsd*) 7862 if test -f /usr/libexec/ld.so; then 7863 _LT_TAGVAR(hardcode_direct, $1)=yes 7864 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7865 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7866 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7867 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7868 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 7869 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7870 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7871 else 7872 case $host_os in 7873 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 7874 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7875 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7876 ;; 7877 *) 7878 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7879 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7880 ;; 7881 esac 7882 fi 7883 else 7884 _LT_TAGVAR(ld_shlibs, $1)=no 7885 fi 7886 ;; 7887 7888 os2*) 7889 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7890 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7891 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7892 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 7893 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 7894 ;; 7895 7896 osf3*) 7897 if test "$GCC" = yes; then 7898 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7899 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7900 else 7901 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7902 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 7903 fi 7904 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7905 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7906 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7907 ;; 7908 7909 osf4* | osf5*) # as osf3* with the addition of -msym flag 7910 if test "$GCC" = yes; then 7911 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7912 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 7913 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7914 else 7915 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7916 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 7917 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ 7918 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 7919 7920 # Both c and cxx compiler support -rpath directly 7921 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7922 fi 7923 _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7924 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7925 ;; 7926 7927 solaris*) 7928 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 7929 if test "$GCC" = yes; then 7930 wlarc='${wl}' 7931 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7932 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7933 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7934 else 7935 case `$CC -V 2>&1` in 7936 *"Compilers 5.0"*) 7937 wlarc='' 7938 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 7939 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7940 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 7941 ;; 7942 *) 7943 wlarc='${wl}' 7944 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 7945 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7946 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7947 ;; 7948 esac 7949 fi 7950 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7951 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7952 case $host_os in 7953 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7954 *) 7955 # The compiler driver will combine and reorder linker options, 7956 # but understands `-z linker_flag'. GCC discards it without `$wl', 7957 # but is careful enough not to reorder. 7958 # Supported since Solaris 2.6 (maybe 2.5.1?) 7959 if test "$GCC" = yes; then 7960 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7961 else 7962 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7963 fi 7964 ;; 7965 esac 7966 _LT_TAGVAR(link_all_deplibs, $1)=yes 7967 ;; 7968 7969 sunos4*) 7970 if test "x$host_vendor" = xsequent; then 7971 # Use $CC to link under sequent, because it throws in some extra .o 7972 # files that make .init and .fini sections work. 7973 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 7974 else 7975 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 7976 fi 7977 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7978 _LT_TAGVAR(hardcode_direct, $1)=yes 7979 _LT_TAGVAR(hardcode_minus_L, $1)=yes 7980 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7981 ;; 7982 7983 sysv4) 7984 case $host_vendor in 7985 sni) 7986 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7987 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 7988 ;; 7989 siemens) 7990 ## LD is ld it makes a PLAMLIB 7991 ## CC just makes a GrossModule. 7992 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 7993 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 7994 _LT_TAGVAR(hardcode_direct, $1)=no 7995 ;; 7996 motorola) 7997 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7998 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 7999 ;; 8000 esac 8001 runpath_var='LD_RUN_PATH' 8002 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8003 ;; 8004 8005 sysv4.3*) 8006 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8007 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8008 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 8009 ;; 8010 8011 sysv4*MP*) 8012 if test -d /usr/nec; then 8013 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8014 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8015 runpath_var=LD_RUN_PATH 8016 hardcode_runpath_var=yes 8017 _LT_TAGVAR(ld_shlibs, $1)=yes 8018 fi 8019 ;; 8020 8021 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 8022 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8023 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8024 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8025 runpath_var='LD_RUN_PATH' 8026 8027 if test "$GCC" = yes; then 8028 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8029 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8030 else 8031 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8032 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8033 fi 8034 ;; 8035 8036 sysv5* | sco3.2v5* | sco5v6*) 8037 # Note: We can NOT use -z defs as we might desire, because we do not 8038 # link with -lc, and that would cause any symbols used from libc to 8039 # always be unresolved, which means just about no library would 8040 # ever link correctly. If we're not using GNU ld we use -z text 8041 # though, which does catch some bad symbols but isn't as heavy-handed 8042 # as -z defs. 8043 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8044 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 8045 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8046 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8047 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 8048 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8049 _LT_TAGVAR(link_all_deplibs, $1)=yes 8050 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 8051 runpath_var='LD_RUN_PATH' 8052 8053 if test "$GCC" = yes; then 8054 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8055 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8056 else 8057 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8058 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8059 fi 8060 ;; 8061 8062 uts4*) 8063 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 8064 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8065 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8066 ;; 8067 8068 *) 8069 _LT_TAGVAR(ld_shlibs, $1)=no 8070 ;; 8071 esac 8072 8073 if test x$host_vendor = xsni; then 8074 case $host in 8075 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 8076 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 8077 ;; 8078 esac 8079 fi 8080 fi 8081]) 8082AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 8083test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 8084 8085_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 8086 8087_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 8088_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 8089_LT_DECL([], [extract_expsyms_cmds], [2], 8090 [The commands to extract the exported symbol list from a shared archive]) 8091 8092# 8093# Do we need to explicitly link libc? 8094# 8095case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 8096x|xyes) 8097 # Assume -lc should be added 8098 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8099 8100 if test "$enable_shared" = yes && test "$GCC" = yes; then 8101 case $_LT_TAGVAR(archive_cmds, $1) in 8102 *'~'*) 8103 # FIXME: we may have to deal with multi-command sequences. 8104 ;; 8105 '$CC '*) 8106 # Test whether the compiler implicitly links with -lc since on some 8107 # systems, -lgcc has to come before -lc. If gcc already passes -lc 8108 # to ld, don't add -lc before -lgcc. 8109 AC_CACHE_CHECK([whether -lc should be explicitly linked in], 8110 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 8111 [$RM conftest* 8112 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 8113 8114 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 8115 soname=conftest 8116 lib=conftest 8117 libobjs=conftest.$ac_objext 8118 deplibs= 8119 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 8120 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 8121 compiler_flags=-v 8122 linker_flags=-v 8123 verstring= 8124 output_objdir=. 8125 libname=conftest 8126 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 8127 _LT_TAGVAR(allow_undefined_flag, $1)= 8128 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 8129 then 8130 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8131 else 8132 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8133 fi 8134 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 8135 else 8136 cat conftest.err 1>&5 8137 fi 8138 $RM conftest* 8139 ]) 8140 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 8141 ;; 8142 esac 8143 fi 8144 ;; 8145esac 8146 8147_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 8148 [Whether or not to add -lc for building shared libraries]) 8149_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 8150 [enable_shared_with_static_runtimes], [0], 8151 [Whether or not to disallow shared libs when runtime libs are static]) 8152_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 8153 [Compiler flag to allow reflexive dlopens]) 8154_LT_TAGDECL([], [whole_archive_flag_spec], [1], 8155 [Compiler flag to generate shared objects directly from archives]) 8156_LT_TAGDECL([], [compiler_needs_object], [1], 8157 [Whether the compiler copes with passing no objects directly]) 8158_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 8159 [Create an old-style archive from a shared archive]) 8160_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 8161 [Create a temporary old-style archive to link instead of a shared archive]) 8162_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 8163_LT_TAGDECL([], [archive_expsym_cmds], [2]) 8164_LT_TAGDECL([], [module_cmds], [2], 8165 [Commands used to build a loadable module if different from building 8166 a shared archive.]) 8167_LT_TAGDECL([], [module_expsym_cmds], [2]) 8168_LT_TAGDECL([], [with_gnu_ld], [1], 8169 [Whether we are building with GNU ld or not]) 8170_LT_TAGDECL([], [allow_undefined_flag], [1], 8171 [Flag that allows shared libraries with undefined symbols to be built]) 8172_LT_TAGDECL([], [no_undefined_flag], [1], 8173 [Flag that enforces no undefined symbols]) 8174_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 8175 [Flag to hardcode $libdir into a binary during linking. 8176 This must work even if $libdir does not exist]) 8177_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 8178 [[If ld is used when linking, flag to hardcode $libdir into a binary 8179 during linking. This must work even if $libdir does not exist]]) 8180_LT_TAGDECL([], [hardcode_libdir_separator], [1], 8181 [Whether we need a single "-rpath" flag with a separated argument]) 8182_LT_TAGDECL([], [hardcode_direct], [0], 8183 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 8184 DIR into the resulting binary]) 8185_LT_TAGDECL([], [hardcode_direct_absolute], [0], 8186 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 8187 DIR into the resulting binary and the resulting library dependency is 8188 "absolute", i.e impossible to change by setting ${shlibpath_var} if the 8189 library is relocated]) 8190_LT_TAGDECL([], [hardcode_minus_L], [0], 8191 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 8192 into the resulting binary]) 8193_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 8194 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 8195 into the resulting binary]) 8196_LT_TAGDECL([], [hardcode_automatic], [0], 8197 [Set to "yes" if building a shared library automatically hardcodes DIR 8198 into the library and all subsequent libraries and executables linked 8199 against it]) 8200_LT_TAGDECL([], [inherit_rpath], [0], 8201 [Set to yes if linker adds runtime paths of dependent libraries 8202 to runtime path list]) 8203_LT_TAGDECL([], [link_all_deplibs], [0], 8204 [Whether libtool must link a program against all its dependency libraries]) 8205_LT_TAGDECL([], [fix_srcfile_path], [1], 8206 [Fix the shell variable $srcfile for the compiler]) 8207_LT_TAGDECL([], [always_export_symbols], [0], 8208 [Set to "yes" if exported symbols are required]) 8209_LT_TAGDECL([], [export_symbols_cmds], [2], 8210 [The commands to list exported symbols]) 8211_LT_TAGDECL([], [exclude_expsyms], [1], 8212 [Symbols that should not be listed in the preloaded symbols]) 8213_LT_TAGDECL([], [include_expsyms], [1], 8214 [Symbols that must always be exported]) 8215_LT_TAGDECL([], [prelink_cmds], [2], 8216 [Commands necessary for linking programs (against libraries) with templates]) 8217_LT_TAGDECL([], [file_list_spec], [1], 8218 [Specify filename containing input files]) 8219dnl FIXME: Not yet implemented 8220dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 8221dnl [Compiler flag to generate thread safe objects]) 8222])# _LT_LINKER_SHLIBS 8223 8224 8225# _LT_LANG_C_CONFIG([TAG]) 8226# ------------------------ 8227# Ensure that the configuration variables for a C compiler are suitably 8228# defined. These variables are subsequently used by _LT_CONFIG to write 8229# the compiler configuration to `libtool'. 8230m4_defun([_LT_LANG_C_CONFIG], 8231[m4_require([_LT_DECL_EGREP])dnl 8232lt_save_CC="$CC" 8233AC_LANG_PUSH(C) 8234 8235# Source file extension for C test sources. 8236ac_ext=c 8237 8238# Object file extension for compiled C test sources. 8239objext=o 8240_LT_TAGVAR(objext, $1)=$objext 8241 8242# Code to be used in simple compile tests 8243lt_simple_compile_test_code="int some_variable = 0;" 8244 8245# Code to be used in simple link tests 8246lt_simple_link_test_code='int main(){return(0);}' 8247 8248_LT_TAG_COMPILER 8249# Save the default compiler, since it gets overwritten when the other 8250# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 8251compiler_DEFAULT=$CC 8252 8253# save warnings/boilerplate of simple test code 8254_LT_COMPILER_BOILERPLATE 8255_LT_LINKER_BOILERPLATE 8256 8257## CAVEAT EMPTOR: 8258## There is no encapsulation within the following macros, do not change 8259## the running order or otherwise move them around unless you know exactly 8260## what you are doing... 8261if test -n "$compiler"; then 8262 _LT_COMPILER_NO_RTTI($1) 8263 _LT_COMPILER_PIC($1) 8264 _LT_COMPILER_C_O($1) 8265 _LT_COMPILER_FILE_LOCKS($1) 8266 _LT_LINKER_SHLIBS($1) 8267 _LT_SYS_DYNAMIC_LINKER($1) 8268 _LT_LINKER_HARDCODE_LIBPATH($1) 8269 LT_SYS_DLOPEN_SELF 8270 _LT_CMD_STRIPLIB 8271 8272 # Report which library types will actually be built 8273 AC_MSG_CHECKING([if libtool supports shared libraries]) 8274 AC_MSG_RESULT([$can_build_shared]) 8275 8276 AC_MSG_CHECKING([whether to build shared libraries]) 8277 test "$can_build_shared" = "no" && enable_shared=no 8278 8279 # On AIX, shared libraries and static libraries use the same namespace, and 8280 # are all built from PIC. 8281 case $host_os in 8282 aix3*) 8283 test "$enable_shared" = yes && enable_static=no 8284 if test -n "$RANLIB"; then 8285 archive_cmds="$archive_cmds~\$RANLIB \$lib" 8286 postinstall_cmds='$RANLIB $lib' 8287 fi 8288 ;; 8289 8290 aix[[4-9]]*) 8291 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 8292 test "$enable_shared" = yes && enable_static=no 8293 fi 8294 ;; 8295 esac 8296 AC_MSG_RESULT([$enable_shared]) 8297 8298 AC_MSG_CHECKING([whether to build static libraries]) 8299 # Make sure either enable_shared or enable_static is yes. 8300 test "$enable_shared" = yes || enable_static=yes 8301 AC_MSG_RESULT([$enable_static]) 8302 8303 _LT_CONFIG($1) 8304fi 8305AC_LANG_POP 8306CC="$lt_save_CC" 8307])# _LT_LANG_C_CONFIG 8308 8309 8310# _LT_LANG_CXX_CONFIG([TAG]) 8311# -------------------------- 8312# Ensure that the configuration variables for a C++ compiler are suitably 8313# defined. These variables are subsequently used by _LT_CONFIG to write 8314# the compiler configuration to `libtool'. 8315m4_defun([_LT_LANG_CXX_CONFIG], 8316[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8317m4_require([_LT_DECL_EGREP])dnl 8318if test -n "$CXX" && ( test "X$CXX" != "Xno" && 8319 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 8320 (test "X$CXX" != "Xg++"))) ; then 8321 AC_PROG_CXXCPP 8322else 8323 _lt_caught_CXX_error=yes 8324fi 8325 8326AC_LANG_PUSH(C++) 8327_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8328_LT_TAGVAR(allow_undefined_flag, $1)= 8329_LT_TAGVAR(always_export_symbols, $1)=no 8330_LT_TAGVAR(archive_expsym_cmds, $1)= 8331_LT_TAGVAR(compiler_needs_object, $1)=no 8332_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8333_LT_TAGVAR(hardcode_direct, $1)=no 8334_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8335_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8336_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 8337_LT_TAGVAR(hardcode_libdir_separator, $1)= 8338_LT_TAGVAR(hardcode_minus_L, $1)=no 8339_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 8340_LT_TAGVAR(hardcode_automatic, $1)=no 8341_LT_TAGVAR(inherit_rpath, $1)=no 8342_LT_TAGVAR(module_cmds, $1)= 8343_LT_TAGVAR(module_expsym_cmds, $1)= 8344_LT_TAGVAR(link_all_deplibs, $1)=unknown 8345_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8346_LT_TAGVAR(reload_flag, $1)=$reload_flag 8347_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8348_LT_TAGVAR(no_undefined_flag, $1)= 8349_LT_TAGVAR(whole_archive_flag_spec, $1)= 8350_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8351 8352# Source file extension for C++ test sources. 8353ac_ext=cpp 8354 8355# Object file extension for compiled C++ test sources. 8356objext=o 8357_LT_TAGVAR(objext, $1)=$objext 8358 8359# No sense in running all these tests if we already determined that 8360# the CXX compiler isn't working. Some variables (like enable_shared) 8361# are currently assumed to apply to all compilers on this platform, 8362# and will be corrupted by setting them based on a non-working compiler. 8363if test "$_lt_caught_CXX_error" != yes; then 8364 # Code to be used in simple compile tests 8365 lt_simple_compile_test_code="int some_variable = 0;" 8366 8367 # Code to be used in simple link tests 8368 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 8369 8370 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8371 _LT_TAG_COMPILER 8372 8373 # save warnings/boilerplate of simple test code 8374 _LT_COMPILER_BOILERPLATE 8375 _LT_LINKER_BOILERPLATE 8376 8377 # Allow CC to be a program name with arguments. 8378 lt_save_CC=$CC 8379 lt_save_LD=$LD 8380 lt_save_GCC=$GCC 8381 GCC=$GXX 8382 lt_save_with_gnu_ld=$with_gnu_ld 8383 lt_save_path_LD=$lt_cv_path_LD 8384 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 8385 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 8386 else 8387 $as_unset lt_cv_prog_gnu_ld 8388 fi 8389 if test -n "${lt_cv_path_LDCXX+set}"; then 8390 lt_cv_path_LD=$lt_cv_path_LDCXX 8391 else 8392 $as_unset lt_cv_path_LD 8393 fi 8394 test -z "${LDCXX+set}" || LD=$LDCXX 8395 CC=${CXX-"c++"} 8396 compiler=$CC 8397 _LT_TAGVAR(compiler, $1)=$CC 8398 _LT_CC_BASENAME([$compiler]) 8399 8400 if test -n "$compiler"; then 8401 # We don't want -fno-exception when compiling C++ code, so set the 8402 # no_builtin_flag separately 8403 if test "$GXX" = yes; then 8404 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 8405 else 8406 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 8407 fi 8408 8409 if test "$GXX" = yes; then 8410 # Set up default GNU C++ configuration 8411 8412 LT_PATH_LD 8413 8414 # Check if GNU C++ uses GNU ld as the underlying linker, since the 8415 # archiving commands below assume that GNU ld is being used. 8416 if test "$with_gnu_ld" = yes; then 8417 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8418 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 8419 8420 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8421 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8422 8423 # If archive_cmds runs LD, not CC, wlarc should be empty 8424 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 8425 # investigate it a little bit more. (MM) 8426 wlarc='${wl}' 8427 8428 # ancient GNU ld didn't support --whole-archive et. al. 8429 if eval "`$CC -print-prog-name=ld` --help 2>&1" | 8430 $GREP 'no-whole-archive' > /dev/null; then 8431 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 8432 else 8433 _LT_TAGVAR(whole_archive_flag_spec, $1)= 8434 fi 8435 else 8436 with_gnu_ld=no 8437 wlarc= 8438 8439 # A generic and very simple default shared library creation 8440 # command for GNU C++ for the case where it uses the native 8441 # linker, instead of GNU ld. If possible, this setting should 8442 # overridden to take advantage of the native linker features on 8443 # the platform it is being used on. 8444 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 8445 fi 8446 8447 # Commands to make compiler produce verbose output that lists 8448 # what "hidden" libraries, object files and flags are used when 8449 # linking a shared library. 8450 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8451 8452 else 8453 GXX=no 8454 with_gnu_ld=no 8455 wlarc= 8456 fi 8457 8458 # PORTME: fill in a description of your system's C++ link characteristics 8459 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8460 _LT_TAGVAR(ld_shlibs, $1)=yes 8461 case $host_os in 8462 aix3*) 8463 # FIXME: insert proper C++ library support 8464 _LT_TAGVAR(ld_shlibs, $1)=no 8465 ;; 8466 aix[[4-9]]*) 8467 if test "$host_cpu" = ia64; then 8468 # On IA64, the linker does run time linking by default, so we don't 8469 # have to do anything special. 8470 aix_use_runtimelinking=no 8471 exp_sym_flag='-Bexport' 8472 no_entry_flag="" 8473 else 8474 aix_use_runtimelinking=no 8475 8476 # Test if we are trying to use run time linking or normal 8477 # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8478 # need to do runtime linking. 8479 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8480 for ld_flag in $LDFLAGS; do 8481 case $ld_flag in 8482 *-brtl*) 8483 aix_use_runtimelinking=yes 8484 break 8485 ;; 8486 esac 8487 done 8488 ;; 8489 esac 8490 8491 exp_sym_flag='-bexport' 8492 no_entry_flag='-bnoentry' 8493 fi 8494 8495 # When large executables or shared objects are built, AIX ld can 8496 # have problems creating the table of contents. If linking a library 8497 # or program results in "error TOC overflow" add -mminimal-toc to 8498 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8499 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8500 8501 _LT_TAGVAR(archive_cmds, $1)='' 8502 _LT_TAGVAR(hardcode_direct, $1)=yes 8503 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8504 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8505 _LT_TAGVAR(link_all_deplibs, $1)=yes 8506 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 8507 8508 if test "$GXX" = yes; then 8509 case $host_os in aix4.[[012]]|aix4.[[012]].*) 8510 # We only want to do this on AIX 4.2 and lower, the check 8511 # below for broken collect2 doesn't work under 4.3+ 8512 collect2name=`${CC} -print-prog-name=collect2` 8513 if test -f "$collect2name" && 8514 strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8515 then 8516 # We have reworked collect2 8517 : 8518 else 8519 # We have old collect2 8520 _LT_TAGVAR(hardcode_direct, $1)=unsupported 8521 # It fails to find uninstalled libraries when the uninstalled 8522 # path is not listed in the libpath. Setting hardcode_minus_L 8523 # to unsupported forces relinking 8524 _LT_TAGVAR(hardcode_minus_L, $1)=yes 8525 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8526 _LT_TAGVAR(hardcode_libdir_separator, $1)= 8527 fi 8528 esac 8529 shared_flag='-shared' 8530 if test "$aix_use_runtimelinking" = yes; then 8531 shared_flag="$shared_flag "'${wl}-G' 8532 fi 8533 else 8534 # not using gcc 8535 if test "$host_cpu" = ia64; then 8536 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8537 # chokes on -Wl,-G. The following line is correct: 8538 shared_flag='-G' 8539 else 8540 if test "$aix_use_runtimelinking" = yes; then 8541 shared_flag='${wl}-G' 8542 else 8543 shared_flag='${wl}-bM:SRE' 8544 fi 8545 fi 8546 fi 8547 8548 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 8549 # It seems that -bexpall does not export symbols beginning with 8550 # underscore (_), so it is better to generate a list of symbols to 8551 # export. 8552 _LT_TAGVAR(always_export_symbols, $1)=yes 8553 if test "$aix_use_runtimelinking" = yes; then 8554 # Warning - without using the other runtime loading flags (-brtl), 8555 # -berok will link without error, but may produce a broken library. 8556 _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8557 # Determine the default libpath from the value encoded in an empty 8558 # executable. 8559 _LT_SYS_MODULE_PATH_AIX 8560 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 8561 8562 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 8563 else 8564 if test "$host_cpu" = ia64; then 8565 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 8566 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8567 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" 8568 else 8569 # Determine the default libpath from the value encoded in an 8570 # empty executable. 8571 _LT_SYS_MODULE_PATH_AIX 8572 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 8573 # Warning - without using the other run time loading flags, 8574 # -berok will link without error, but may produce a broken library. 8575 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 8576 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 8577 if test "$with_gnu_ld" = yes; then 8578 # We only use this code for GNU lds that support --whole-archive. 8579 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 8580 else 8581 # Exported symbols can be pulled into shared objects from archives 8582 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8583 fi 8584 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8585 # This is similar to how AIX traditionally builds its shared 8586 # libraries. 8587 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 8588 fi 8589 fi 8590 ;; 8591 8592 beos*) 8593 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8594 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8595 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8596 # support --undefined. This deserves some investigation. FIXME 8597 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8598 else 8599 _LT_TAGVAR(ld_shlibs, $1)=no 8600 fi 8601 ;; 8602 8603 chorus*) 8604 case $cc_basename in 8605 *) 8606 # FIXME: insert proper C++ library support 8607 _LT_TAGVAR(ld_shlibs, $1)=no 8608 ;; 8609 esac 8610 ;; 8611 8612 cygwin* | mingw* | pw32* | cegcc*) 8613 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8614 # as there is no search path for DLLs. 8615 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8616 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 8617 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8618 _LT_TAGVAR(always_export_symbols, $1)=no 8619 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8620 8621 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8622 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8623 # If the export-symbols file already is a .def file (1st line 8624 # is EXPORTS), use it as is; otherwise, prepend... 8625 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 8626 cp $export_symbols $output_objdir/$soname.def; 8627 else 8628 echo EXPORTS > $output_objdir/$soname.def; 8629 cat $export_symbols >> $output_objdir/$soname.def; 8630 fi~ 8631 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 8632 else 8633 _LT_TAGVAR(ld_shlibs, $1)=no 8634 fi 8635 ;; 8636 darwin* | rhapsody*) 8637 _LT_DARWIN_LINKER_FEATURES($1) 8638 ;; 8639 8640 dgux*) 8641 case $cc_basename in 8642 ec++*) 8643 # FIXME: insert proper C++ library support 8644 _LT_TAGVAR(ld_shlibs, $1)=no 8645 ;; 8646 ghcx*) 8647 # Green Hills C++ Compiler 8648 # FIXME: insert proper C++ library support 8649 _LT_TAGVAR(ld_shlibs, $1)=no 8650 ;; 8651 *) 8652 # FIXME: insert proper C++ library support 8653 _LT_TAGVAR(ld_shlibs, $1)=no 8654 ;; 8655 esac 8656 ;; 8657 8658 freebsd[[12]]*) 8659 # C++ shared libraries reported to be fairly broken before 8660 # switch to ELF 8661 _LT_TAGVAR(ld_shlibs, $1)=no 8662 ;; 8663 8664 freebsd-elf*) 8665 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8666 ;; 8667 8668 freebsd* | dragonfly*) 8669 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 8670 # conventions 8671 _LT_TAGVAR(ld_shlibs, $1)=yes 8672 ;; 8673 8674 gnu*) 8675 ;; 8676 8677 haiku*) 8678 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8679 _LT_TAGVAR(link_all_deplibs, $1)=yes 8680 ;; 8681 8682 hpux9*) 8683 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8684 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8685 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8686 _LT_TAGVAR(hardcode_direct, $1)=yes 8687 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8688 # but as the default 8689 # location of the library. 8690 8691 case $cc_basename in 8692 CC*) 8693 # FIXME: insert proper C++ library support 8694 _LT_TAGVAR(ld_shlibs, $1)=no 8695 ;; 8696 aCC*) 8697 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 8698 # Commands to make compiler produce verbose output that lists 8699 # what "hidden" libraries, object files and flags are used when 8700 # linking a shared library. 8701 # 8702 # There doesn't appear to be a way to prevent this compiler from 8703 # explicitly linking system object files so we need to strip them 8704 # from the output so that they don't get included in the library 8705 # dependencies. 8706 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 8707 ;; 8708 *) 8709 if test "$GXX" = yes; then 8710 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 8711 else 8712 # FIXME: insert proper C++ library support 8713 _LT_TAGVAR(ld_shlibs, $1)=no 8714 fi 8715 ;; 8716 esac 8717 ;; 8718 8719 hpux10*|hpux11*) 8720 if test $with_gnu_ld = no; then 8721 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8722 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8723 8724 case $host_cpu in 8725 hppa*64*|ia64*) 8726 ;; 8727 *) 8728 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8729 ;; 8730 esac 8731 fi 8732 case $host_cpu in 8733 hppa*64*|ia64*) 8734 _LT_TAGVAR(hardcode_direct, $1)=no 8735 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8736 ;; 8737 *) 8738 _LT_TAGVAR(hardcode_direct, $1)=yes 8739 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8740 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8741 # but as the default 8742 # location of the library. 8743 ;; 8744 esac 8745 8746 case $cc_basename in 8747 CC*) 8748 # FIXME: insert proper C++ library support 8749 _LT_TAGVAR(ld_shlibs, $1)=no 8750 ;; 8751 aCC*) 8752 case $host_cpu in 8753 hppa*64*) 8754 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8755 ;; 8756 ia64*) 8757 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8758 ;; 8759 *) 8760 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8761 ;; 8762 esac 8763 # Commands to make compiler produce verbose output that lists 8764 # what "hidden" libraries, object files and flags are used when 8765 # linking a shared library. 8766 # 8767 # There doesn't appear to be a way to prevent this compiler from 8768 # explicitly linking system object files so we need to strip them 8769 # from the output so that they don't get included in the library 8770 # dependencies. 8771 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 8772 ;; 8773 *) 8774 if test "$GXX" = yes; then 8775 if test $with_gnu_ld = no; then 8776 case $host_cpu in 8777 hppa*64*) 8778 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8779 ;; 8780 ia64*) 8781 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8782 ;; 8783 *) 8784 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8785 ;; 8786 esac 8787 fi 8788 else 8789 # FIXME: insert proper C++ library support 8790 _LT_TAGVAR(ld_shlibs, $1)=no 8791 fi 8792 ;; 8793 esac 8794 ;; 8795 8796 interix[[3-9]]*) 8797 _LT_TAGVAR(hardcode_direct, $1)=no 8798 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8799 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8800 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8801 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8802 # Instead, shared libraries are loaded at an image base (0x10000000 by 8803 # default) and relocated if they conflict, which is a slow very memory 8804 # consuming and fragmenting process. To avoid this, we pick a random, 8805 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8806 # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8807 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 8808 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 8809 ;; 8810 irix5* | irix6*) 8811 case $cc_basename in 8812 CC*) 8813 # SGI C++ 8814 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 8815 8816 # Archives containing C++ object files must be created using 8817 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 8818 # necessary to make sure instantiated templates are included 8819 # in the archive. 8820 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 8821 ;; 8822 *) 8823 if test "$GXX" = yes; then 8824 if test "$with_gnu_ld" = no; then 8825 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 8826 else 8827 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' 8828 fi 8829 fi 8830 _LT_TAGVAR(link_all_deplibs, $1)=yes 8831 ;; 8832 esac 8833 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8834 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8835 _LT_TAGVAR(inherit_rpath, $1)=yes 8836 ;; 8837 8838 linux* | k*bsd*-gnu | kopensolaris*-gnu) 8839 case $cc_basename in 8840 KCC*) 8841 # Kuck and Associates, Inc. (KAI) C++ Compiler 8842 8843 # KCC will only create a shared library if the output file 8844 # ends with ".so" (or ".sl" for HP-UX), so rename the library 8845 # to its proper name (with version) after linking. 8846 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 8847 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' 8848 # Commands to make compiler produce verbose output that lists 8849 # what "hidden" libraries, object files and flags are used when 8850 # linking a shared library. 8851 # 8852 # There doesn't appear to be a way to prevent this compiler from 8853 # explicitly linking system object files so we need to strip them 8854 # from the output so that they don't get included in the library 8855 # dependencies. 8856 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 8857 8858 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8859 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8860 8861 # Archives containing C++ object files must be created using 8862 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 8863 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 8864 ;; 8865 icpc* | ecpc* ) 8866 # Intel C++ 8867 with_gnu_ld=yes 8868 # version 8.0 and above of icpc choke on multiply defined symbols 8869 # if we add $predep_objects and $postdep_objects, however 7.1 and 8870 # earlier do not add the objects themselves. 8871 case `$CC -V 2>&1` in 8872 *"Version 7."*) 8873 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8874 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 8875 ;; 8876 *) # Version 8.0 or newer 8877 tmp_idyn= 8878 case $host_cpu in 8879 ia64*) tmp_idyn=' -i_dynamic';; 8880 esac 8881 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8882 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 8883 ;; 8884 esac 8885 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8886 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8887 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8888 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 8889 ;; 8890 pgCC* | pgcpp*) 8891 # Portland Group C++ compiler 8892 case `$CC -V` in 8893 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 8894 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 8895 rm -rf $tpldir~ 8896 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 8897 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 8898 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 8899 rm -rf $tpldir~ 8900 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 8901 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 8902 $RANLIB $oldlib' 8903 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 8904 rm -rf $tpldir~ 8905 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8906 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8907 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 8908 rm -rf $tpldir~ 8909 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8910 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 8911 ;; 8912 *) # Version 6 and above use weak symbols 8913 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8914 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 8915 ;; 8916 esac 8917 8918 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 8919 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8920 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 8921 ;; 8922 cxx*) 8923 # Compaq C++ 8924 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8925 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' 8926 8927 runpath_var=LD_RUN_PATH 8928 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8929 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8930 8931 # Commands to make compiler produce verbose output that lists 8932 # what "hidden" libraries, object files and flags are used when 8933 # linking a shared library. 8934 # 8935 # There doesn't appear to be a way to prevent this compiler from 8936 # explicitly linking system object files so we need to strip them 8937 # from the output so that they don't get included in the library 8938 # dependencies. 8939 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' 8940 ;; 8941 xl* | mpixl* | bgxl*) 8942 # IBM XL 8.0 on PPC, with GNU ld 8943 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8944 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8945 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8946 if test "x$supports_anon_versioning" = xyes; then 8947 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8948 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8949 echo "local: *; };" >> $output_objdir/$libname.ver~ 8950 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 8951 fi 8952 ;; 8953 *) 8954 case `$CC -V 2>&1 | sed 5q` in 8955 *Sun\ C*) 8956 # Sun C++ 5.9 8957 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8958 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8959 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' 8960 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8961 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 8962 _LT_TAGVAR(compiler_needs_object, $1)=yes 8963 8964 # Not sure whether something based on 8965 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 8966 # would be better. 8967 output_verbose_link_cmd='func_echo_all' 8968 8969 # Archives containing C++ object files must be created using 8970 # "CC -xar", where "CC" is the Sun C++ compiler. This is 8971 # necessary to make sure instantiated templates are included 8972 # in the archive. 8973 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8974 ;; 8975 esac 8976 ;; 8977 esac 8978 ;; 8979 8980 lynxos*) 8981 # FIXME: insert proper C++ library support 8982 _LT_TAGVAR(ld_shlibs, $1)=no 8983 ;; 8984 8985 m88k*) 8986 # FIXME: insert proper C++ library support 8987 _LT_TAGVAR(ld_shlibs, $1)=no 8988 ;; 8989 8990 mvs*) 8991 case $cc_basename in 8992 cxx*) 8993 # FIXME: insert proper C++ library support 8994 _LT_TAGVAR(ld_shlibs, $1)=no 8995 ;; 8996 *) 8997 # FIXME: insert proper C++ library support 8998 _LT_TAGVAR(ld_shlibs, $1)=no 8999 ;; 9000 esac 9001 ;; 9002 9003 netbsd*) 9004 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9005 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 9006 wlarc= 9007 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9008 _LT_TAGVAR(hardcode_direct, $1)=yes 9009 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9010 fi 9011 # Workaround some broken pre-1.5 toolchains 9012 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 9013 ;; 9014 9015 *nto* | *qnx*) 9016 _LT_TAGVAR(ld_shlibs, $1)=yes 9017 ;; 9018 9019 openbsd2*) 9020 # C++ shared libraries are fairly broken 9021 _LT_TAGVAR(ld_shlibs, $1)=no 9022 ;; 9023 9024 openbsd*) 9025 if test -f /usr/libexec/ld.so; then 9026 _LT_TAGVAR(hardcode_direct, $1)=yes 9027 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9028 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9029 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 9030 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 9031 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 9032 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' 9033 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 9034 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 9035 fi 9036 output_verbose_link_cmd=func_echo_all 9037 else 9038 _LT_TAGVAR(ld_shlibs, $1)=no 9039 fi 9040 ;; 9041 9042 osf3* | osf4* | osf5*) 9043 case $cc_basename in 9044 KCC*) 9045 # Kuck and Associates, Inc. (KAI) C++ Compiler 9046 9047 # KCC will only create a shared library if the output file 9048 # ends with ".so" (or ".sl" for HP-UX), so rename the library 9049 # to its proper name (with version) after linking. 9050 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 9051 9052 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 9053 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9054 9055 # Archives containing C++ object files must be created using 9056 # the KAI C++ compiler. 9057 case $host in 9058 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 9059 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 9060 esac 9061 ;; 9062 RCC*) 9063 # Rational C++ 2.4.1 9064 # FIXME: insert proper C++ library support 9065 _LT_TAGVAR(ld_shlibs, $1)=no 9066 ;; 9067 cxx*) 9068 case $host in 9069 osf3*) 9070 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 9071 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 9072 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 9073 ;; 9074 *) 9075 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9076 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 9077 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 9078 echo "-hidden">> $lib.exp~ 9079 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ 9080 $RM $lib.exp' 9081 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 9082 ;; 9083 esac 9084 9085 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9086 9087 # Commands to make compiler produce verbose output that lists 9088 # what "hidden" libraries, object files and flags are used when 9089 # linking a shared library. 9090 # 9091 # There doesn't appear to be a way to prevent this compiler from 9092 # explicitly linking system object files so we need to strip them 9093 # from the output so that they don't get included in the library 9094 # dependencies. 9095 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 9096 ;; 9097 *) 9098 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 9099 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 9100 case $host in 9101 osf3*) 9102 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 9103 ;; 9104 *) 9105 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 9106 ;; 9107 esac 9108 9109 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 9110 _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9111 9112 # Commands to make compiler produce verbose output that lists 9113 # what "hidden" libraries, object files and flags are used when 9114 # linking a shared library. 9115 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9116 9117 else 9118 # FIXME: insert proper C++ library support 9119 _LT_TAGVAR(ld_shlibs, $1)=no 9120 fi 9121 ;; 9122 esac 9123 ;; 9124 9125 psos*) 9126 # FIXME: insert proper C++ library support 9127 _LT_TAGVAR(ld_shlibs, $1)=no 9128 ;; 9129 9130 sunos4*) 9131 case $cc_basename in 9132 CC*) 9133 # Sun C++ 4.x 9134 # FIXME: insert proper C++ library support 9135 _LT_TAGVAR(ld_shlibs, $1)=no 9136 ;; 9137 lcc*) 9138 # Lucid 9139 # FIXME: insert proper C++ library support 9140 _LT_TAGVAR(ld_shlibs, $1)=no 9141 ;; 9142 *) 9143 # FIXME: insert proper C++ library support 9144 _LT_TAGVAR(ld_shlibs, $1)=no 9145 ;; 9146 esac 9147 ;; 9148 9149 solaris*) 9150 case $cc_basename in 9151 CC* | sunCC*) 9152 # Sun C++ 4.2, 5.x and Centerline C++ 9153 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 9154 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 9155 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 9156 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9157 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 9158 9159 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9160 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9161 case $host_os in 9162 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9163 *) 9164 # The compiler driver will combine and reorder linker options, 9165 # but understands `-z linker_flag'. 9166 # Supported since Solaris 2.6 (maybe 2.5.1?) 9167 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 9168 ;; 9169 esac 9170 _LT_TAGVAR(link_all_deplibs, $1)=yes 9171 9172 output_verbose_link_cmd='func_echo_all' 9173 9174 # Archives containing C++ object files must be created using 9175 # "CC -xar", where "CC" is the Sun C++ compiler. This is 9176 # necessary to make sure instantiated templates are included 9177 # in the archive. 9178 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 9179 ;; 9180 gcx*) 9181 # Green Hills C++ Compiler 9182 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 9183 9184 # The C++ compiler must be used to create the archive. 9185 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 9186 ;; 9187 *) 9188 # GNU C++ compiler with Solaris linker 9189 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 9190 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 9191 if $CC --version | $GREP -v '^2\.7' > /dev/null; then 9192 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 9193 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9194 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 9195 9196 # Commands to make compiler produce verbose output that lists 9197 # what "hidden" libraries, object files and flags are used when 9198 # linking a shared library. 9199 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9200 else 9201 # g++ 2.7 appears to require `-G' NOT `-shared' on this 9202 # platform. 9203 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 9204 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 9205 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 9206 9207 # Commands to make compiler produce verbose output that lists 9208 # what "hidden" libraries, object files and flags are used when 9209 # linking a shared library. 9210 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9211 fi 9212 9213 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 9214 case $host_os in 9215 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 9216 *) 9217 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 9218 ;; 9219 esac 9220 fi 9221 ;; 9222 esac 9223 ;; 9224 9225 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 9226 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 9227 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9228 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9229 runpath_var='LD_RUN_PATH' 9230 9231 case $cc_basename in 9232 CC*) 9233 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9234 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9235 ;; 9236 *) 9237 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9238 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9239 ;; 9240 esac 9241 ;; 9242 9243 sysv5* | sco3.2v5* | sco5v6*) 9244 # Note: We can NOT use -z defs as we might desire, because we do not 9245 # link with -lc, and that would cause any symbols used from libc to 9246 # always be unresolved, which means just about no library would 9247 # ever link correctly. If we're not using GNU ld we use -z text 9248 # though, which does catch some bad symbols but isn't as heavy-handed 9249 # as -z defs. 9250 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 9251 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 9252 _LT_TAGVAR(archive_cmds_need_lc, $1)=no 9253 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9254 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 9255 _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9256 _LT_TAGVAR(link_all_deplibs, $1)=yes 9257 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 9258 runpath_var='LD_RUN_PATH' 9259 9260 case $cc_basename in 9261 CC*) 9262 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9263 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9264 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 9265 '"$_LT_TAGVAR(old_archive_cmds, $1)" 9266 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 9267 '"$_LT_TAGVAR(reload_cmds, $1)" 9268 ;; 9269 *) 9270 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9271 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 9272 ;; 9273 esac 9274 ;; 9275 9276 tandem*) 9277 case $cc_basename in 9278 NCC*) 9279 # NonStop-UX NCC 3.20 9280 # FIXME: insert proper C++ library support 9281 _LT_TAGVAR(ld_shlibs, $1)=no 9282 ;; 9283 *) 9284 # FIXME: insert proper C++ library support 9285 _LT_TAGVAR(ld_shlibs, $1)=no 9286 ;; 9287 esac 9288 ;; 9289 9290 vxworks*) 9291 # FIXME: insert proper C++ library support 9292 _LT_TAGVAR(ld_shlibs, $1)=no 9293 ;; 9294 9295 *) 9296 # FIXME: insert proper C++ library support 9297 _LT_TAGVAR(ld_shlibs, $1)=no 9298 ;; 9299 esac 9300 9301 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 9302 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 9303 9304 _LT_TAGVAR(GCC, $1)="$GXX" 9305 _LT_TAGVAR(LD, $1)="$LD" 9306 9307 ## CAVEAT EMPTOR: 9308 ## There is no encapsulation within the following macros, do not change 9309 ## the running order or otherwise move them around unless you know exactly 9310 ## what you are doing... 9311 _LT_SYS_HIDDEN_LIBDEPS($1) 9312 _LT_COMPILER_PIC($1) 9313 _LT_COMPILER_C_O($1) 9314 _LT_COMPILER_FILE_LOCKS($1) 9315 _LT_LINKER_SHLIBS($1) 9316 _LT_SYS_DYNAMIC_LINKER($1) 9317 _LT_LINKER_HARDCODE_LIBPATH($1) 9318 9319 _LT_CONFIG($1) 9320 fi # test -n "$compiler" 9321 9322 CC=$lt_save_CC 9323 LDCXX=$LD 9324 LD=$lt_save_LD 9325 GCC=$lt_save_GCC 9326 with_gnu_ld=$lt_save_with_gnu_ld 9327 lt_cv_path_LDCXX=$lt_cv_path_LD 9328 lt_cv_path_LD=$lt_save_path_LD 9329 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 9330 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 9331fi # test "$_lt_caught_CXX_error" != yes 9332 9333AC_LANG_POP 9334])# _LT_LANG_CXX_CONFIG 9335 9336 9337# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 9338# --------------------------------- 9339# Figure out "hidden" library dependencies from verbose 9340# compiler output when linking a shared library. 9341# Parse the compiler output and extract the necessary 9342# objects, libraries and library flags. 9343m4_defun([_LT_SYS_HIDDEN_LIBDEPS], 9344[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 9345# Dependencies to place before and after the object being linked: 9346_LT_TAGVAR(predep_objects, $1)= 9347_LT_TAGVAR(postdep_objects, $1)= 9348_LT_TAGVAR(predeps, $1)= 9349_LT_TAGVAR(postdeps, $1)= 9350_LT_TAGVAR(compiler_lib_search_path, $1)= 9351 9352dnl we can't use the lt_simple_compile_test_code here, 9353dnl because it contains code intended for an executable, 9354dnl not a library. It's possible we should let each 9355dnl tag define a new lt_????_link_test_code variable, 9356dnl but it's only used here... 9357m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 9358int a; 9359void foo (void) { a = 0; } 9360_LT_EOF 9361], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 9362class Foo 9363{ 9364public: 9365 Foo (void) { a = 0; } 9366private: 9367 int a; 9368}; 9369_LT_EOF 9370], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 9371 subroutine foo 9372 implicit none 9373 integer*4 a 9374 a=0 9375 return 9376 end 9377_LT_EOF 9378], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 9379 subroutine foo 9380 implicit none 9381 integer a 9382 a=0 9383 return 9384 end 9385_LT_EOF 9386], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 9387public class foo { 9388 private int a; 9389 public void bar (void) { 9390 a = 0; 9391 } 9392}; 9393_LT_EOF 9394]) 9395dnl Parse the compiler output and extract the necessary 9396dnl objects, libraries and library flags. 9397if AC_TRY_EVAL(ac_compile); then 9398 # Parse the compiler output and extract the necessary 9399 # objects, libraries and library flags. 9400 9401 # Sentinel used to keep track of whether or not we are before 9402 # the conftest object file. 9403 pre_test_object_deps_done=no 9404 9405 for p in `eval "$output_verbose_link_cmd"`; do 9406 case $p in 9407 9408 -L* | -R* | -l*) 9409 # Some compilers place space between "-{L,R}" and the path. 9410 # Remove the space. 9411 if test $p = "-L" || 9412 test $p = "-R"; then 9413 prev=$p 9414 continue 9415 else 9416 prev= 9417 fi 9418 9419 if test "$pre_test_object_deps_done" = no; then 9420 case $p in 9421 -L* | -R*) 9422 # Internal compiler library paths should come after those 9423 # provided the user. The postdeps already come after the 9424 # user supplied libs so there is no need to process them. 9425 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 9426 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 9427 else 9428 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 9429 fi 9430 ;; 9431 # The "-l" case would never come before the object being 9432 # linked, so don't bother handling this case. 9433 esac 9434 else 9435 if test -z "$_LT_TAGVAR(postdeps, $1)"; then 9436 _LT_TAGVAR(postdeps, $1)="${prev}${p}" 9437 else 9438 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 9439 fi 9440 fi 9441 ;; 9442 9443 *.$objext) 9444 # This assumes that the test object file only shows up 9445 # once in the compiler output. 9446 if test "$p" = "conftest.$objext"; then 9447 pre_test_object_deps_done=yes 9448 continue 9449 fi 9450 9451 if test "$pre_test_object_deps_done" = no; then 9452 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 9453 _LT_TAGVAR(predep_objects, $1)="$p" 9454 else 9455 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 9456 fi 9457 else 9458 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 9459 _LT_TAGVAR(postdep_objects, $1)="$p" 9460 else 9461 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 9462 fi 9463 fi 9464 ;; 9465 9466 *) ;; # Ignore the rest. 9467 9468 esac 9469 done 9470 9471 # Clean up. 9472 rm -f a.out a.exe 9473else 9474 echo "libtool.m4: error: problem compiling $1 test program" 9475fi 9476 9477$RM -f confest.$objext 9478 9479# PORTME: override above test on systems where it is broken 9480m4_if([$1], [CXX], 9481[case $host_os in 9482interix[[3-9]]*) 9483 # Interix 3.5 installs completely hosed .la files for C++, so rather than 9484 # hack all around it, let's just trust "g++" to DTRT. 9485 _LT_TAGVAR(predep_objects,$1)= 9486 _LT_TAGVAR(postdep_objects,$1)= 9487 _LT_TAGVAR(postdeps,$1)= 9488 ;; 9489 9490linux*) 9491 case `$CC -V 2>&1 | sed 5q` in 9492 *Sun\ C*) 9493 # Sun C++ 5.9 9494 9495 # The more standards-conforming stlport4 library is 9496 # incompatible with the Cstd library. Avoid specifying 9497 # it if it's in CXXFLAGS. Ignore libCrun as 9498 # -library=stlport4 depends on it. 9499 case " $CXX $CXXFLAGS " in 9500 *" -library=stlport4 "*) 9501 solaris_use_stlport4=yes 9502 ;; 9503 esac 9504 9505 if test "$solaris_use_stlport4" != yes; then 9506 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 9507 fi 9508 ;; 9509 esac 9510 ;; 9511 9512solaris*) 9513 case $cc_basename in 9514 CC* | sunCC*) 9515 # The more standards-conforming stlport4 library is 9516 # incompatible with the Cstd library. Avoid specifying 9517 # it if it's in CXXFLAGS. Ignore libCrun as 9518 # -library=stlport4 depends on it. 9519 case " $CXX $CXXFLAGS " in 9520 *" -library=stlport4 "*) 9521 solaris_use_stlport4=yes 9522 ;; 9523 esac 9524 9525 # Adding this requires a known-good setup of shared libraries for 9526 # Sun compiler versions before 5.6, else PIC objects from an old 9527 # archive will be linked into the output, leading to subtle bugs. 9528 if test "$solaris_use_stlport4" != yes; then 9529 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 9530 fi 9531 ;; 9532 esac 9533 ;; 9534esac 9535]) 9536 9537case " $_LT_TAGVAR(postdeps, $1) " in 9538*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 9539esac 9540 _LT_TAGVAR(compiler_lib_search_dirs, $1)= 9541if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 9542 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 9543fi 9544_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 9545 [The directories searched by this compiler when creating a shared library]) 9546_LT_TAGDECL([], [predep_objects], [1], 9547 [Dependencies to place before and after the objects being linked to 9548 create a shared library]) 9549_LT_TAGDECL([], [postdep_objects], [1]) 9550_LT_TAGDECL([], [predeps], [1]) 9551_LT_TAGDECL([], [postdeps], [1]) 9552_LT_TAGDECL([], [compiler_lib_search_path], [1], 9553 [The library search path used internally by the compiler when linking 9554 a shared library]) 9555])# _LT_SYS_HIDDEN_LIBDEPS 9556 9557 9558# _LT_LANG_F77_CONFIG([TAG]) 9559# -------------------------- 9560# Ensure that the configuration variables for a Fortran 77 compiler are 9561# suitably defined. These variables are subsequently used by _LT_CONFIG 9562# to write the compiler configuration to `libtool'. 9563m4_defun([_LT_LANG_F77_CONFIG], 9564[AC_LANG_PUSH(Fortran 77) 9565if test -z "$F77" || test "X$F77" = "Xno"; then 9566 _lt_disable_F77=yes 9567fi 9568 9569_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9570_LT_TAGVAR(allow_undefined_flag, $1)= 9571_LT_TAGVAR(always_export_symbols, $1)=no 9572_LT_TAGVAR(archive_expsym_cmds, $1)= 9573_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9574_LT_TAGVAR(hardcode_direct, $1)=no 9575_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9576_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9577_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9578_LT_TAGVAR(hardcode_libdir_separator, $1)= 9579_LT_TAGVAR(hardcode_minus_L, $1)=no 9580_LT_TAGVAR(hardcode_automatic, $1)=no 9581_LT_TAGVAR(inherit_rpath, $1)=no 9582_LT_TAGVAR(module_cmds, $1)= 9583_LT_TAGVAR(module_expsym_cmds, $1)= 9584_LT_TAGVAR(link_all_deplibs, $1)=unknown 9585_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9586_LT_TAGVAR(reload_flag, $1)=$reload_flag 9587_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9588_LT_TAGVAR(no_undefined_flag, $1)= 9589_LT_TAGVAR(whole_archive_flag_spec, $1)= 9590_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9591 9592# Source file extension for f77 test sources. 9593ac_ext=f 9594 9595# Object file extension for compiled f77 test sources. 9596objext=o 9597_LT_TAGVAR(objext, $1)=$objext 9598 9599# No sense in running all these tests if we already determined that 9600# the F77 compiler isn't working. Some variables (like enable_shared) 9601# are currently assumed to apply to all compilers on this platform, 9602# and will be corrupted by setting them based on a non-working compiler. 9603if test "$_lt_disable_F77" != yes; then 9604 # Code to be used in simple compile tests 9605 lt_simple_compile_test_code="\ 9606 subroutine t 9607 return 9608 end 9609" 9610 9611 # Code to be used in simple link tests 9612 lt_simple_link_test_code="\ 9613 program t 9614 end 9615" 9616 9617 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9618 _LT_TAG_COMPILER 9619 9620 # save warnings/boilerplate of simple test code 9621 _LT_COMPILER_BOILERPLATE 9622 _LT_LINKER_BOILERPLATE 9623 9624 # Allow CC to be a program name with arguments. 9625 lt_save_CC="$CC" 9626 lt_save_GCC=$GCC 9627 CC=${F77-"f77"} 9628 compiler=$CC 9629 _LT_TAGVAR(compiler, $1)=$CC 9630 _LT_CC_BASENAME([$compiler]) 9631 GCC=$G77 9632 if test -n "$compiler"; then 9633 AC_MSG_CHECKING([if libtool supports shared libraries]) 9634 AC_MSG_RESULT([$can_build_shared]) 9635 9636 AC_MSG_CHECKING([whether to build shared libraries]) 9637 test "$can_build_shared" = "no" && enable_shared=no 9638 9639 # On AIX, shared libraries and static libraries use the same namespace, and 9640 # are all built from PIC. 9641 case $host_os in 9642 aix3*) 9643 test "$enable_shared" = yes && enable_static=no 9644 if test -n "$RANLIB"; then 9645 archive_cmds="$archive_cmds~\$RANLIB \$lib" 9646 postinstall_cmds='$RANLIB $lib' 9647 fi 9648 ;; 9649 aix[[4-9]]*) 9650 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9651 test "$enable_shared" = yes && enable_static=no 9652 fi 9653 ;; 9654 esac 9655 AC_MSG_RESULT([$enable_shared]) 9656 9657 AC_MSG_CHECKING([whether to build static libraries]) 9658 # Make sure either enable_shared or enable_static is yes. 9659 test "$enable_shared" = yes || enable_static=yes 9660 AC_MSG_RESULT([$enable_static]) 9661 9662 _LT_TAGVAR(GCC, $1)="$G77" 9663 _LT_TAGVAR(LD, $1)="$LD" 9664 9665 ## CAVEAT EMPTOR: 9666 ## There is no encapsulation within the following macros, do not change 9667 ## the running order or otherwise move them around unless you know exactly 9668 ## what you are doing... 9669 _LT_COMPILER_PIC($1) 9670 _LT_COMPILER_C_O($1) 9671 _LT_COMPILER_FILE_LOCKS($1) 9672 _LT_LINKER_SHLIBS($1) 9673 _LT_SYS_DYNAMIC_LINKER($1) 9674 _LT_LINKER_HARDCODE_LIBPATH($1) 9675 9676 _LT_CONFIG($1) 9677 fi # test -n "$compiler" 9678 9679 GCC=$lt_save_GCC 9680 CC="$lt_save_CC" 9681fi # test "$_lt_disable_F77" != yes 9682 9683AC_LANG_POP 9684])# _LT_LANG_F77_CONFIG 9685 9686 9687# _LT_LANG_FC_CONFIG([TAG]) 9688# ------------------------- 9689# Ensure that the configuration variables for a Fortran compiler are 9690# suitably defined. These variables are subsequently used by _LT_CONFIG 9691# to write the compiler configuration to `libtool'. 9692m4_defun([_LT_LANG_FC_CONFIG], 9693[AC_LANG_PUSH(Fortran) 9694 9695if test -z "$FC" || test "X$FC" = "Xno"; then 9696 _lt_disable_FC=yes 9697fi 9698 9699_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9700_LT_TAGVAR(allow_undefined_flag, $1)= 9701_LT_TAGVAR(always_export_symbols, $1)=no 9702_LT_TAGVAR(archive_expsym_cmds, $1)= 9703_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9704_LT_TAGVAR(hardcode_direct, $1)=no 9705_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9706_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9707_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9708_LT_TAGVAR(hardcode_libdir_separator, $1)= 9709_LT_TAGVAR(hardcode_minus_L, $1)=no 9710_LT_TAGVAR(hardcode_automatic, $1)=no 9711_LT_TAGVAR(inherit_rpath, $1)=no 9712_LT_TAGVAR(module_cmds, $1)= 9713_LT_TAGVAR(module_expsym_cmds, $1)= 9714_LT_TAGVAR(link_all_deplibs, $1)=unknown 9715_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9716_LT_TAGVAR(reload_flag, $1)=$reload_flag 9717_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9718_LT_TAGVAR(no_undefined_flag, $1)= 9719_LT_TAGVAR(whole_archive_flag_spec, $1)= 9720_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9721 9722# Source file extension for fc test sources. 9723ac_ext=${ac_fc_srcext-f} 9724 9725# Object file extension for compiled fc test sources. 9726objext=o 9727_LT_TAGVAR(objext, $1)=$objext 9728 9729# No sense in running all these tests if we already determined that 9730# the FC compiler isn't working. Some variables (like enable_shared) 9731# are currently assumed to apply to all compilers on this platform, 9732# and will be corrupted by setting them based on a non-working compiler. 9733if test "$_lt_disable_FC" != yes; then 9734 # Code to be used in simple compile tests 9735 lt_simple_compile_test_code="\ 9736 subroutine t 9737 return 9738 end 9739" 9740 9741 # Code to be used in simple link tests 9742 lt_simple_link_test_code="\ 9743 program t 9744 end 9745" 9746 9747 # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9748 _LT_TAG_COMPILER 9749 9750 # save warnings/boilerplate of simple test code 9751 _LT_COMPILER_BOILERPLATE 9752 _LT_LINKER_BOILERPLATE 9753 9754 # Allow CC to be a program name with arguments. 9755 lt_save_CC="$CC" 9756 lt_save_GCC=$GCC 9757 CC=${FC-"f95"} 9758 compiler=$CC 9759 GCC=$ac_cv_fc_compiler_gnu 9760 9761 _LT_TAGVAR(compiler, $1)=$CC 9762 _LT_CC_BASENAME([$compiler]) 9763 9764 if test -n "$compiler"; then 9765 AC_MSG_CHECKING([if libtool supports shared libraries]) 9766 AC_MSG_RESULT([$can_build_shared]) 9767 9768 AC_MSG_CHECKING([whether to build shared libraries]) 9769 test "$can_build_shared" = "no" && enable_shared=no 9770 9771 # On AIX, shared libraries and static libraries use the same namespace, and 9772 # are all built from PIC. 9773 case $host_os in 9774 aix3*) 9775 test "$enable_shared" = yes && enable_static=no 9776 if test -n "$RANLIB"; then 9777 archive_cmds="$archive_cmds~\$RANLIB \$lib" 9778 postinstall_cmds='$RANLIB $lib' 9779 fi 9780 ;; 9781 aix[[4-9]]*) 9782 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9783 test "$enable_shared" = yes && enable_static=no 9784 fi 9785 ;; 9786 esac 9787 AC_MSG_RESULT([$enable_shared]) 9788 9789 AC_MSG_CHECKING([whether to build static libraries]) 9790 # Make sure either enable_shared or enable_static is yes. 9791 test "$enable_shared" = yes || enable_static=yes 9792 AC_MSG_RESULT([$enable_static]) 9793 9794 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 9795 _LT_TAGVAR(LD, $1)="$LD" 9796 9797 ## CAVEAT EMPTOR: 9798 ## There is no encapsulation within the following macros, do not change 9799 ## the running order or otherwise move them around unless you know exactly 9800 ## what you are doing... 9801 _LT_SYS_HIDDEN_LIBDEPS($1) 9802 _LT_COMPILER_PIC($1) 9803 _LT_COMPILER_C_O($1) 9804 _LT_COMPILER_FILE_LOCKS($1) 9805 _LT_LINKER_SHLIBS($1) 9806 _LT_SYS_DYNAMIC_LINKER($1) 9807 _LT_LINKER_HARDCODE_LIBPATH($1) 9808 9809 _LT_CONFIG($1) 9810 fi # test -n "$compiler" 9811 9812 GCC=$lt_save_GCC 9813 CC="$lt_save_CC" 9814fi # test "$_lt_disable_FC" != yes 9815 9816AC_LANG_POP 9817])# _LT_LANG_FC_CONFIG 9818 9819 9820# _LT_LANG_GCJ_CONFIG([TAG]) 9821# -------------------------- 9822# Ensure that the configuration variables for the GNU Java Compiler compiler 9823# are suitably defined. These variables are subsequently used by _LT_CONFIG 9824# to write the compiler configuration to `libtool'. 9825m4_defun([_LT_LANG_GCJ_CONFIG], 9826[AC_REQUIRE([LT_PROG_GCJ])dnl 9827AC_LANG_SAVE 9828 9829# Source file extension for Java test sources. 9830ac_ext=java 9831 9832# Object file extension for compiled Java test sources. 9833objext=o 9834_LT_TAGVAR(objext, $1)=$objext 9835 9836# Code to be used in simple compile tests 9837lt_simple_compile_test_code="class foo {}" 9838 9839# Code to be used in simple link tests 9840lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 9841 9842# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9843_LT_TAG_COMPILER 9844 9845# save warnings/boilerplate of simple test code 9846_LT_COMPILER_BOILERPLATE 9847_LT_LINKER_BOILERPLATE 9848 9849# Allow CC to be a program name with arguments. 9850lt_save_CC="$CC" 9851lt_save_GCC=$GCC 9852GCC=yes 9853CC=${GCJ-"gcj"} 9854compiler=$CC 9855_LT_TAGVAR(compiler, $1)=$CC 9856_LT_TAGVAR(LD, $1)="$LD" 9857_LT_CC_BASENAME([$compiler]) 9858 9859# GCJ did not exist at the time GCC didn't implicitly link libc in. 9860_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9861 9862_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9863_LT_TAGVAR(reload_flag, $1)=$reload_flag 9864_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9865 9866## CAVEAT EMPTOR: 9867## There is no encapsulation within the following macros, do not change 9868## the running order or otherwise move them around unless you know exactly 9869## what you are doing... 9870if test -n "$compiler"; then 9871 _LT_COMPILER_NO_RTTI($1) 9872 _LT_COMPILER_PIC($1) 9873 _LT_COMPILER_C_O($1) 9874 _LT_COMPILER_FILE_LOCKS($1) 9875 _LT_LINKER_SHLIBS($1) 9876 _LT_LINKER_HARDCODE_LIBPATH($1) 9877 9878 _LT_CONFIG($1) 9879fi 9880 9881AC_LANG_RESTORE 9882 9883GCC=$lt_save_GCC 9884CC="$lt_save_CC" 9885])# _LT_LANG_GCJ_CONFIG 9886 9887 9888# _LT_LANG_RC_CONFIG([TAG]) 9889# ------------------------- 9890# Ensure that the configuration variables for the Windows resource compiler 9891# are suitably defined. These variables are subsequently used by _LT_CONFIG 9892# to write the compiler configuration to `libtool'. 9893m4_defun([_LT_LANG_RC_CONFIG], 9894[AC_REQUIRE([LT_PROG_RC])dnl 9895AC_LANG_SAVE 9896 9897# Source file extension for RC test sources. 9898ac_ext=rc 9899 9900# Object file extension for compiled RC test sources. 9901objext=o 9902_LT_TAGVAR(objext, $1)=$objext 9903 9904# Code to be used in simple compile tests 9905lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 9906 9907# Code to be used in simple link tests 9908lt_simple_link_test_code="$lt_simple_compile_test_code" 9909 9910# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9911_LT_TAG_COMPILER 9912 9913# save warnings/boilerplate of simple test code 9914_LT_COMPILER_BOILERPLATE 9915_LT_LINKER_BOILERPLATE 9916 9917# Allow CC to be a program name with arguments. 9918lt_save_CC="$CC" 9919lt_save_GCC=$GCC 9920GCC= 9921CC=${RC-"windres"} 9922compiler=$CC 9923_LT_TAGVAR(compiler, $1)=$CC 9924_LT_CC_BASENAME([$compiler]) 9925_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 9926 9927if test -n "$compiler"; then 9928 : 9929 _LT_CONFIG($1) 9930fi 9931 9932GCC=$lt_save_GCC 9933AC_LANG_RESTORE 9934CC="$lt_save_CC" 9935])# _LT_LANG_RC_CONFIG 9936 9937 9938# LT_PROG_GCJ 9939# ----------- 9940AC_DEFUN([LT_PROG_GCJ], 9941[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 9942 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 9943 [AC_CHECK_TOOL(GCJ, gcj,) 9944 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 9945 AC_SUBST(GCJFLAGS)])])[]dnl 9946]) 9947 9948# Old name: 9949AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 9950dnl aclocal-1.4 backwards compatibility: 9951dnl AC_DEFUN([LT_AC_PROG_GCJ], []) 9952 9953 9954# LT_PROG_RC 9955# ---------- 9956AC_DEFUN([LT_PROG_RC], 9957[AC_CHECK_TOOL(RC, windres,) 9958]) 9959 9960# Old name: 9961AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 9962dnl aclocal-1.4 backwards compatibility: 9963dnl AC_DEFUN([LT_AC_PROG_RC], []) 9964 9965 9966# _LT_DECL_EGREP 9967# -------------- 9968# If we don't have a new enough Autoconf to choose the best grep 9969# available, choose the one first in the user's PATH. 9970m4_defun([_LT_DECL_EGREP], 9971[AC_REQUIRE([AC_PROG_EGREP])dnl 9972AC_REQUIRE([AC_PROG_FGREP])dnl 9973test -z "$GREP" && GREP=grep 9974_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 9975_LT_DECL([], [EGREP], [1], [An ERE matcher]) 9976_LT_DECL([], [FGREP], [1], [A literal string matcher]) 9977dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 9978AC_SUBST([GREP]) 9979]) 9980 9981 9982# _LT_DECL_OBJDUMP 9983# -------------- 9984# If we don't have a new enough Autoconf to choose the best objdump 9985# available, choose the one first in the user's PATH. 9986m4_defun([_LT_DECL_OBJDUMP], 9987[AC_CHECK_TOOL(OBJDUMP, objdump, false) 9988test -z "$OBJDUMP" && OBJDUMP=objdump 9989_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 9990AC_SUBST([OBJDUMP]) 9991]) 9992 9993 9994# _LT_DECL_SED 9995# ------------ 9996# Check for a fully-functional sed program, that truncates 9997# as few characters as possible. Prefer GNU sed if found. 9998m4_defun([_LT_DECL_SED], 9999[AC_PROG_SED 10000test -z "$SED" && SED=sed 10001Xsed="$SED -e 1s/^X//" 10002_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 10003_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 10004 [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 10005])# _LT_DECL_SED 10006 10007m4_ifndef([AC_PROG_SED], [ 10008############################################################ 10009# NOTE: This macro has been submitted for inclusion into # 10010# GNU Autoconf as AC_PROG_SED. When it is available in # 10011# a released version of Autoconf we should remove this # 10012# macro and use it instead. # 10013############################################################ 10014 10015m4_defun([AC_PROG_SED], 10016[AC_MSG_CHECKING([for a sed that does not truncate output]) 10017AC_CACHE_VAL(lt_cv_path_SED, 10018[# Loop through the user's path and test for sed and gsed. 10019# Then use that list of sed's as ones to test for truncation. 10020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10021for as_dir in $PATH 10022do 10023 IFS=$as_save_IFS 10024 test -z "$as_dir" && as_dir=. 10025 for lt_ac_prog in sed gsed; do 10026 for ac_exec_ext in '' $ac_executable_extensions; do 10027 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 10028 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 10029 fi 10030 done 10031 done 10032done 10033IFS=$as_save_IFS 10034lt_ac_max=0 10035lt_ac_count=0 10036# Add /usr/xpg4/bin/sed as it is typically found on Solaris 10037# along with /bin/sed that truncates output. 10038for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 10039 test ! -f $lt_ac_sed && continue 10040 cat /dev/null > conftest.in 10041 lt_ac_count=0 10042 echo $ECHO_N "0123456789$ECHO_C" >conftest.in 10043 # Check for GNU sed and select it if it is found. 10044 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 10045 lt_cv_path_SED=$lt_ac_sed 10046 break 10047 fi 10048 while true; do 10049 cat conftest.in conftest.in >conftest.tmp 10050 mv conftest.tmp conftest.in 10051 cp conftest.in conftest.nl 10052 echo >>conftest.nl 10053 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 10054 cmp -s conftest.out conftest.nl || break 10055 # 10000 chars as input seems more than enough 10056 test $lt_ac_count -gt 10 && break 10057 lt_ac_count=`expr $lt_ac_count + 1` 10058 if test $lt_ac_count -gt $lt_ac_max; then 10059 lt_ac_max=$lt_ac_count 10060 lt_cv_path_SED=$lt_ac_sed 10061 fi 10062 done 10063done 10064]) 10065SED=$lt_cv_path_SED 10066AC_SUBST([SED]) 10067AC_MSG_RESULT([$SED]) 10068])#AC_PROG_SED 10069])#m4_ifndef 10070 10071# Old name: 10072AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 10073dnl aclocal-1.4 backwards compatibility: 10074dnl AC_DEFUN([LT_AC_PROG_SED], []) 10075 10076 10077# _LT_CHECK_SHELL_FEATURES 10078# ------------------------ 10079# Find out whether the shell is Bourne or XSI compatible, 10080# or has some other useful features. 10081m4_defun([_LT_CHECK_SHELL_FEATURES], 10082[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 10083# Try some XSI features 10084xsi_shell=no 10085( _lt_dummy="a/b/c" 10086 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 10087 = c,a/b,, \ 10088 && eval 'test $(( 1 + 1 )) -eq 2 \ 10089 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 10090 && xsi_shell=yes 10091AC_MSG_RESULT([$xsi_shell]) 10092_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 10093 10094AC_MSG_CHECKING([whether the shell understands "+="]) 10095lt_shell_append=no 10096( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 10097 >/dev/null 2>&1 \ 10098 && lt_shell_append=yes 10099AC_MSG_RESULT([$lt_shell_append]) 10100_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 10101 10102if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 10103 lt_unset=unset 10104else 10105 lt_unset=false 10106fi 10107_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 10108 10109# test EBCDIC or ASCII 10110case `echo X|tr X '\101'` in 10111 A) # ASCII based system 10112 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 10113 lt_SP2NL='tr \040 \012' 10114 lt_NL2SP='tr \015\012 \040\040' 10115 ;; 10116 *) # EBCDIC based system 10117 lt_SP2NL='tr \100 \n' 10118 lt_NL2SP='tr \r\n \100\100' 10119 ;; 10120esac 10121_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 10122_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 10123])# _LT_CHECK_SHELL_FEATURES 10124 10125 10126# _LT_PROG_XSI_SHELLFNS 10127# --------------------- 10128# Bourne and XSI compatible variants of some useful shell functions. 10129m4_defun([_LT_PROG_XSI_SHELLFNS], 10130[case $xsi_shell in 10131 yes) 10132 cat << \_LT_EOF >> "$cfgfile" 10133 10134# func_dirname file append nondir_replacement 10135# Compute the dirname of FILE. If nonempty, add APPEND to the result, 10136# otherwise set result to NONDIR_REPLACEMENT. 10137func_dirname () 10138{ 10139 case ${1} in 10140 */*) func_dirname_result="${1%/*}${2}" ;; 10141 * ) func_dirname_result="${3}" ;; 10142 esac 10143} 10144 10145# func_basename file 10146func_basename () 10147{ 10148 func_basename_result="${1##*/}" 10149} 10150 10151# func_dirname_and_basename file append nondir_replacement 10152# perform func_basename and func_dirname in a single function 10153# call: 10154# dirname: Compute the dirname of FILE. If nonempty, 10155# add APPEND to the result, otherwise set result 10156# to NONDIR_REPLACEMENT. 10157# value returned in "$func_dirname_result" 10158# basename: Compute filename of FILE. 10159# value retuned in "$func_basename_result" 10160# Implementation must be kept synchronized with func_dirname 10161# and func_basename. For efficiency, we do not delegate to 10162# those functions but instead duplicate the functionality here. 10163func_dirname_and_basename () 10164{ 10165 case ${1} in 10166 */*) func_dirname_result="${1%/*}${2}" ;; 10167 * ) func_dirname_result="${3}" ;; 10168 esac 10169 func_basename_result="${1##*/}" 10170} 10171 10172# func_stripname prefix suffix name 10173# strip PREFIX and SUFFIX off of NAME. 10174# PREFIX and SUFFIX must not contain globbing or regex special 10175# characters, hashes, percent signs, but SUFFIX may contain a leading 10176# dot (in which case that matches only a dot). 10177func_stripname () 10178{ 10179 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 10180 # positional parameters, so assign one to ordinary parameter first. 10181 func_stripname_result=${3} 10182 func_stripname_result=${func_stripname_result#"${1}"} 10183 func_stripname_result=${func_stripname_result%"${2}"} 10184} 10185 10186# func_opt_split 10187func_opt_split () 10188{ 10189 func_opt_split_opt=${1%%=*} 10190 func_opt_split_arg=${1#*=} 10191} 10192 10193# func_lo2o object 10194func_lo2o () 10195{ 10196 case ${1} in 10197 *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 10198 *) func_lo2o_result=${1} ;; 10199 esac 10200} 10201 10202# func_xform libobj-or-source 10203func_xform () 10204{ 10205 func_xform_result=${1%.*}.lo 10206} 10207 10208# func_arith arithmetic-term... 10209func_arith () 10210{ 10211 func_arith_result=$(( $[*] )) 10212} 10213 10214# func_len string 10215# STRING may not start with a hyphen. 10216func_len () 10217{ 10218 func_len_result=${#1} 10219} 10220 10221_LT_EOF 10222 ;; 10223 *) # Bourne compatible functions. 10224 cat << \_LT_EOF >> "$cfgfile" 10225 10226# func_dirname file append nondir_replacement 10227# Compute the dirname of FILE. If nonempty, add APPEND to the result, 10228# otherwise set result to NONDIR_REPLACEMENT. 10229func_dirname () 10230{ 10231 # Extract subdirectory from the argument. 10232 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` 10233 if test "X$func_dirname_result" = "X${1}"; then 10234 func_dirname_result="${3}" 10235 else 10236 func_dirname_result="$func_dirname_result${2}" 10237 fi 10238} 10239 10240# func_basename file 10241func_basename () 10242{ 10243 func_basename_result=`$ECHO "${1}" | $SED "$basename"` 10244} 10245 10246dnl func_dirname_and_basename 10247dnl A portable version of this function is already defined in general.m4sh 10248dnl so there is no need for it here. 10249 10250# func_stripname prefix suffix name 10251# strip PREFIX and SUFFIX off of NAME. 10252# PREFIX and SUFFIX must not contain globbing or regex special 10253# characters, hashes, percent signs, but SUFFIX may contain a leading 10254# dot (in which case that matches only a dot). 10255# func_strip_suffix prefix name 10256func_stripname () 10257{ 10258 case ${2} in 10259 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 10260 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 10261 esac 10262} 10263 10264# sed scripts: 10265my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 10266my_sed_long_arg='1s/^-[[^=]]*=//' 10267 10268# func_opt_split 10269func_opt_split () 10270{ 10271 func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` 10272 func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` 10273} 10274 10275# func_lo2o object 10276func_lo2o () 10277{ 10278 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` 10279} 10280 10281# func_xform libobj-or-source 10282func_xform () 10283{ 10284 func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` 10285} 10286 10287# func_arith arithmetic-term... 10288func_arith () 10289{ 10290 func_arith_result=`expr "$[@]"` 10291} 10292 10293# func_len string 10294# STRING may not start with a hyphen. 10295func_len () 10296{ 10297 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 10298} 10299 10300_LT_EOF 10301esac 10302 10303case $lt_shell_append in 10304 yes) 10305 cat << \_LT_EOF >> "$cfgfile" 10306 10307# func_append var value 10308# Append VALUE to the end of shell variable VAR. 10309func_append () 10310{ 10311 eval "$[1]+=\$[2]" 10312} 10313_LT_EOF 10314 ;; 10315 *) 10316 cat << \_LT_EOF >> "$cfgfile" 10317 10318# func_append var value 10319# Append VALUE to the end of shell variable VAR. 10320func_append () 10321{ 10322 eval "$[1]=\$$[1]\$[2]" 10323} 10324 10325_LT_EOF 10326 ;; 10327 esac 10328]) 10329# Helper functions for option handling. -*- Autoconf -*- 10330# 10331# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 10332# Inc. 10333# Written by Gary V. Vaughan, 2004 10334# 10335# This file is free software; the Free Software Foundation gives 10336# unlimited permission to copy and/or distribute it, with or without 10337# modifications, as long as this notice is preserved. 10338 10339# serial 7 ltoptions.m4 10340 10341# This is to help aclocal find these macros, as it can't see m4_define. 10342AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 10343 10344 10345# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 10346# ------------------------------------------ 10347m4_define([_LT_MANGLE_OPTION], 10348[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 10349 10350 10351# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 10352# --------------------------------------- 10353# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 10354# matching handler defined, dispatch to it. Other OPTION-NAMEs are 10355# saved as a flag. 10356m4_define([_LT_SET_OPTION], 10357[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 10358m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 10359 _LT_MANGLE_DEFUN([$1], [$2]), 10360 [m4_warning([Unknown $1 option `$2'])])[]dnl 10361]) 10362 10363 10364# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 10365# ------------------------------------------------------------ 10366# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 10367m4_define([_LT_IF_OPTION], 10368[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 10369 10370 10371# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 10372# ------------------------------------------------------- 10373# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 10374# are set. 10375m4_define([_LT_UNLESS_OPTIONS], 10376[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 10377 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 10378 [m4_define([$0_found])])])[]dnl 10379m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 10380])[]dnl 10381]) 10382 10383 10384# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 10385# ---------------------------------------- 10386# OPTION-LIST is a space-separated list of Libtool options associated 10387# with MACRO-NAME. If any OPTION has a matching handler declared with 10388# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 10389# the unknown option and exit. 10390m4_defun([_LT_SET_OPTIONS], 10391[# Set options 10392m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 10393 [_LT_SET_OPTION([$1], _LT_Option)]) 10394 10395m4_if([$1],[LT_INIT],[ 10396 dnl 10397 dnl Simply set some default values (i.e off) if boolean options were not 10398 dnl specified: 10399 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 10400 ]) 10401 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 10402 ]) 10403 dnl 10404 dnl If no reference was made to various pairs of opposing options, then 10405 dnl we run the default mode handler for the pair. For example, if neither 10406 dnl `shared' nor `disable-shared' was passed, we enable building of shared 10407 dnl archives by default: 10408 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 10409 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 10410 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 10411 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 10412 [_LT_ENABLE_FAST_INSTALL]) 10413 ]) 10414])# _LT_SET_OPTIONS 10415 10416 10417## --------------------------------- ## 10418## Macros to handle LT_INIT options. ## 10419## --------------------------------- ## 10420 10421# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 10422# ----------------------------------------- 10423m4_define([_LT_MANGLE_DEFUN], 10424[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 10425 10426 10427# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 10428# ----------------------------------------------- 10429m4_define([LT_OPTION_DEFINE], 10430[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 10431])# LT_OPTION_DEFINE 10432 10433 10434# dlopen 10435# ------ 10436LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 10437]) 10438 10439AU_DEFUN([AC_LIBTOOL_DLOPEN], 10440[_LT_SET_OPTION([LT_INIT], [dlopen]) 10441AC_DIAGNOSE([obsolete], 10442[$0: Remove this warning and the call to _LT_SET_OPTION when you 10443put the `dlopen' option into LT_INIT's first parameter.]) 10444]) 10445 10446dnl aclocal-1.4 backwards compatibility: 10447dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 10448 10449 10450# win32-dll 10451# --------- 10452# Declare package support for building win32 dll's. 10453LT_OPTION_DEFINE([LT_INIT], [win32-dll], 10454[enable_win32_dll=yes 10455 10456case $host in 10457*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 10458 AC_CHECK_TOOL(AS, as, false) 10459 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 10460 AC_CHECK_TOOL(OBJDUMP, objdump, false) 10461 ;; 10462esac 10463 10464test -z "$AS" && AS=as 10465_LT_DECL([], [AS], [1], [Assembler program])dnl 10466 10467test -z "$DLLTOOL" && DLLTOOL=dlltool 10468_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 10469 10470test -z "$OBJDUMP" && OBJDUMP=objdump 10471_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 10472])# win32-dll 10473 10474AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 10475[AC_REQUIRE([AC_CANONICAL_HOST])dnl 10476_LT_SET_OPTION([LT_INIT], [win32-dll]) 10477AC_DIAGNOSE([obsolete], 10478[$0: Remove this warning and the call to _LT_SET_OPTION when you 10479put the `win32-dll' option into LT_INIT's first parameter.]) 10480]) 10481 10482dnl aclocal-1.4 backwards compatibility: 10483dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 10484 10485 10486# _LT_ENABLE_SHARED([DEFAULT]) 10487# ---------------------------- 10488# implement the --enable-shared flag, and supports the `shared' and 10489# `disable-shared' LT_INIT options. 10490# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10491m4_define([_LT_ENABLE_SHARED], 10492[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 10493AC_ARG_ENABLE([shared], 10494 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 10495 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 10496 [p=${PACKAGE-default} 10497 case $enableval in 10498 yes) enable_shared=yes ;; 10499 no) enable_shared=no ;; 10500 *) 10501 enable_shared=no 10502 # Look at the argument we got. We use all the common list separators. 10503 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10504 for pkg in $enableval; do 10505 IFS="$lt_save_ifs" 10506 if test "X$pkg" = "X$p"; then 10507 enable_shared=yes 10508 fi 10509 done 10510 IFS="$lt_save_ifs" 10511 ;; 10512 esac], 10513 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 10514 10515 _LT_DECL([build_libtool_libs], [enable_shared], [0], 10516 [Whether or not to build shared libraries]) 10517])# _LT_ENABLE_SHARED 10518 10519LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 10520LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 10521 10522# Old names: 10523AC_DEFUN([AC_ENABLE_SHARED], 10524[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 10525]) 10526 10527AC_DEFUN([AC_DISABLE_SHARED], 10528[_LT_SET_OPTION([LT_INIT], [disable-shared]) 10529]) 10530 10531AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 10532AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 10533 10534dnl aclocal-1.4 backwards compatibility: 10535dnl AC_DEFUN([AM_ENABLE_SHARED], []) 10536dnl AC_DEFUN([AM_DISABLE_SHARED], []) 10537 10538 10539 10540# _LT_ENABLE_STATIC([DEFAULT]) 10541# ---------------------------- 10542# implement the --enable-static flag, and support the `static' and 10543# `disable-static' LT_INIT options. 10544# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10545m4_define([_LT_ENABLE_STATIC], 10546[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 10547AC_ARG_ENABLE([static], 10548 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 10549 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 10550 [p=${PACKAGE-default} 10551 case $enableval in 10552 yes) enable_static=yes ;; 10553 no) enable_static=no ;; 10554 *) 10555 enable_static=no 10556 # Look at the argument we got. We use all the common list separators. 10557 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10558 for pkg in $enableval; do 10559 IFS="$lt_save_ifs" 10560 if test "X$pkg" = "X$p"; then 10561 enable_static=yes 10562 fi 10563 done 10564 IFS="$lt_save_ifs" 10565 ;; 10566 esac], 10567 [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 10568 10569 _LT_DECL([build_old_libs], [enable_static], [0], 10570 [Whether or not to build static libraries]) 10571])# _LT_ENABLE_STATIC 10572 10573LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 10574LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 10575 10576# Old names: 10577AC_DEFUN([AC_ENABLE_STATIC], 10578[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 10579]) 10580 10581AC_DEFUN([AC_DISABLE_STATIC], 10582[_LT_SET_OPTION([LT_INIT], [disable-static]) 10583]) 10584 10585AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 10586AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 10587 10588dnl aclocal-1.4 backwards compatibility: 10589dnl AC_DEFUN([AM_ENABLE_STATIC], []) 10590dnl AC_DEFUN([AM_DISABLE_STATIC], []) 10591 10592 10593 10594# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 10595# ---------------------------------- 10596# implement the --enable-fast-install flag, and support the `fast-install' 10597# and `disable-fast-install' LT_INIT options. 10598# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10599m4_define([_LT_ENABLE_FAST_INSTALL], 10600[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 10601AC_ARG_ENABLE([fast-install], 10602 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 10603 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 10604 [p=${PACKAGE-default} 10605 case $enableval in 10606 yes) enable_fast_install=yes ;; 10607 no) enable_fast_install=no ;; 10608 *) 10609 enable_fast_install=no 10610 # Look at the argument we got. We use all the common list separators. 10611 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10612 for pkg in $enableval; do 10613 IFS="$lt_save_ifs" 10614 if test "X$pkg" = "X$p"; then 10615 enable_fast_install=yes 10616 fi 10617 done 10618 IFS="$lt_save_ifs" 10619 ;; 10620 esac], 10621 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 10622 10623_LT_DECL([fast_install], [enable_fast_install], [0], 10624 [Whether or not to optimize for fast installation])dnl 10625])# _LT_ENABLE_FAST_INSTALL 10626 10627LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 10628LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 10629 10630# Old names: 10631AU_DEFUN([AC_ENABLE_FAST_INSTALL], 10632[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 10633AC_DIAGNOSE([obsolete], 10634[$0: Remove this warning and the call to _LT_SET_OPTION when you put 10635the `fast-install' option into LT_INIT's first parameter.]) 10636]) 10637 10638AU_DEFUN([AC_DISABLE_FAST_INSTALL], 10639[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 10640AC_DIAGNOSE([obsolete], 10641[$0: Remove this warning and the call to _LT_SET_OPTION when you put 10642the `disable-fast-install' option into LT_INIT's first parameter.]) 10643]) 10644 10645dnl aclocal-1.4 backwards compatibility: 10646dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 10647dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 10648 10649 10650# _LT_WITH_PIC([MODE]) 10651# -------------------- 10652# implement the --with-pic flag, and support the `pic-only' and `no-pic' 10653# LT_INIT options. 10654# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 10655m4_define([_LT_WITH_PIC], 10656[AC_ARG_WITH([pic], 10657 [AS_HELP_STRING([--with-pic], 10658 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 10659 [pic_mode="$withval"], 10660 [pic_mode=default]) 10661 10662test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 10663 10664_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 10665])# _LT_WITH_PIC 10666 10667LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 10668LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 10669 10670# Old name: 10671AU_DEFUN([AC_LIBTOOL_PICMODE], 10672[_LT_SET_OPTION([LT_INIT], [pic-only]) 10673AC_DIAGNOSE([obsolete], 10674[$0: Remove this warning and the call to _LT_SET_OPTION when you 10675put the `pic-only' option into LT_INIT's first parameter.]) 10676]) 10677 10678dnl aclocal-1.4 backwards compatibility: 10679dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 10680 10681## ----------------- ## 10682## LTDL_INIT Options ## 10683## ----------------- ## 10684 10685m4_define([_LTDL_MODE], []) 10686LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 10687 [m4_define([_LTDL_MODE], [nonrecursive])]) 10688LT_OPTION_DEFINE([LTDL_INIT], [recursive], 10689 [m4_define([_LTDL_MODE], [recursive])]) 10690LT_OPTION_DEFINE([LTDL_INIT], [subproject], 10691 [m4_define([_LTDL_MODE], [subproject])]) 10692 10693m4_define([_LTDL_TYPE], []) 10694LT_OPTION_DEFINE([LTDL_INIT], [installable], 10695 [m4_define([_LTDL_TYPE], [installable])]) 10696LT_OPTION_DEFINE([LTDL_INIT], [convenience], 10697 [m4_define([_LTDL_TYPE], [convenience])]) 10698# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 10699# 10700# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 10701# Written by Gary V. Vaughan, 2004 10702# 10703# This file is free software; the Free Software Foundation gives 10704# unlimited permission to copy and/or distribute it, with or without 10705# modifications, as long as this notice is preserved. 10706 10707# serial 6 ltsugar.m4 10708 10709# This is to help aclocal find these macros, as it can't see m4_define. 10710AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 10711 10712 10713# lt_join(SEP, ARG1, [ARG2...]) 10714# ----------------------------- 10715# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 10716# associated separator. 10717# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 10718# versions in m4sugar had bugs. 10719m4_define([lt_join], 10720[m4_if([$#], [1], [], 10721 [$#], [2], [[$2]], 10722 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 10723m4_define([_lt_join], 10724[m4_if([$#$2], [2], [], 10725 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 10726 10727 10728# lt_car(LIST) 10729# lt_cdr(LIST) 10730# ------------ 10731# Manipulate m4 lists. 10732# These macros are necessary as long as will still need to support 10733# Autoconf-2.59 which quotes differently. 10734m4_define([lt_car], [[$1]]) 10735m4_define([lt_cdr], 10736[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 10737 [$#], 1, [], 10738 [m4_dquote(m4_shift($@))])]) 10739m4_define([lt_unquote], $1) 10740 10741 10742# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 10743# ------------------------------------------ 10744# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 10745# Note that neither SEPARATOR nor STRING are expanded; they are appended 10746# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 10747# No SEPARATOR is output if MACRO-NAME was previously undefined (different 10748# than defined and empty). 10749# 10750# This macro is needed until we can rely on Autoconf 2.62, since earlier 10751# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 10752m4_define([lt_append], 10753[m4_define([$1], 10754 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 10755 10756 10757 10758# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 10759# ---------------------------------------------------------- 10760# Produce a SEP delimited list of all paired combinations of elements of 10761# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 10762# has the form PREFIXmINFIXSUFFIXn. 10763# Needed until we can rely on m4_combine added in Autoconf 2.62. 10764m4_define([lt_combine], 10765[m4_if(m4_eval([$# > 3]), [1], 10766 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 10767[[m4_foreach([_Lt_prefix], [$2], 10768 [m4_foreach([_Lt_suffix], 10769 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 10770 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 10771 10772 10773# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 10774# ----------------------------------------------------------------------- 10775# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 10776# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 10777m4_define([lt_if_append_uniq], 10778[m4_ifdef([$1], 10779 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 10780 [lt_append([$1], [$2], [$3])$4], 10781 [$5])], 10782 [lt_append([$1], [$2], [$3])$4])]) 10783 10784 10785# lt_dict_add(DICT, KEY, VALUE) 10786# ----------------------------- 10787m4_define([lt_dict_add], 10788[m4_define([$1($2)], [$3])]) 10789 10790 10791# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 10792# -------------------------------------------- 10793m4_define([lt_dict_add_subkey], 10794[m4_define([$1($2:$3)], [$4])]) 10795 10796 10797# lt_dict_fetch(DICT, KEY, [SUBKEY]) 10798# ---------------------------------- 10799m4_define([lt_dict_fetch], 10800[m4_ifval([$3], 10801 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 10802 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 10803 10804 10805# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 10806# ----------------------------------------------------------------- 10807m4_define([lt_if_dict_fetch], 10808[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 10809 [$5], 10810 [$6])]) 10811 10812 10813# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 10814# -------------------------------------------------------------- 10815m4_define([lt_dict_filter], 10816[m4_if([$5], [], [], 10817 [lt_join(m4_quote(m4_default([$4], [[, ]])), 10818 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 10819 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 10820]) 10821# ltversion.m4 -- version numbers -*- Autoconf -*- 10822# 10823# Copyright (C) 2004 Free Software Foundation, Inc. 10824# Written by Scott James Remnant, 2004 10825# 10826# This file is free software; the Free Software Foundation gives 10827# unlimited permission to copy and/or distribute it, with or without 10828# modifications, as long as this notice is preserved. 10829 10830# Generated from ltversion.in. 10831 10832# serial 3175 ltversion.m4 10833# This file is part of GNU Libtool 10834 10835m4_define([LT_PACKAGE_VERSION], [2.2.10]) 10836m4_define([LT_PACKAGE_REVISION], [1.3175]) 10837 10838AC_DEFUN([LTVERSION_VERSION], 10839[macro_version='2.2.10' 10840macro_revision='1.3175' 10841_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 10842_LT_DECL(, macro_revision, 0) 10843]) 10844# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 10845# 10846# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 10847# Written by Scott James Remnant, 2004. 10848# 10849# This file is free software; the Free Software Foundation gives 10850# unlimited permission to copy and/or distribute it, with or without 10851# modifications, as long as this notice is preserved. 10852 10853# serial 5 lt~obsolete.m4 10854 10855# These exist entirely to fool aclocal when bootstrapping libtool. 10856# 10857# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 10858# which have later been changed to m4_define as they aren't part of the 10859# exported API, or moved to Autoconf or Automake where they belong. 10860# 10861# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 10862# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 10863# using a macro with the same name in our local m4/libtool.m4 it'll 10864# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 10865# and doesn't know about Autoconf macros at all.) 10866# 10867# So we provide this file, which has a silly filename so it's always 10868# included after everything else. This provides aclocal with the 10869# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 10870# because those macros already exist, or will be overwritten later. 10871# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 10872# 10873# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 10874# Yes, that means every name once taken will need to remain here until 10875# we give up compatibility with versions before 1.7, at which point 10876# we need to keep only those names which we still refer to. 10877 10878# This is to help aclocal find these macros, as it can't see m4_define. 10879AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 10880 10881m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 10882m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 10883m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 10884m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 10885m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 10886m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 10887m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 10888m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 10889m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 10890m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 10891m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 10892m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 10893m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 10894m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 10895m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 10896m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 10897m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 10898m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 10899m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 10900m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 10901m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 10902m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 10903m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 10904m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 10905m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 10906m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 10907m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 10908m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 10909m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 10910m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 10911m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 10912m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 10913m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 10914m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 10915m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 10916m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 10917m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 10918m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 10919m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 10920m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 10921m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 10922m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 10923m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 10924m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 10925m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 10926m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 10927m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 10928m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 10929m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 10930m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 10931m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 10932m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 10933m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 10934m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 10935m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 10936m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 10937m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 10938m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 10939m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 10940m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 10941m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 10942