1## -*- autoconf -*- 2 3dnl This file is part of the KDE libraries/packages 4dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu) 5dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org) 6 7dnl This file is free software; you can redistribute it and/or 8dnl modify it under the terms of the GNU Library General Public 9dnl License as published by the Free Software Foundation; either 10dnl version 2 of the License, or (at your option) any later version. 11 12dnl This library is distributed in the hope that it will be useful, 13dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 14dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15dnl Library General Public License for more details. 16 17dnl You should have received a copy of the GNU Library General Public License 18dnl along with this library; see the file COPYING.LIB. If not, write to 19dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20dnl Boston, MA 02111-1307, USA. 21 22dnl IMPORTANT NOTE: 23dnl Please do not modify this file unless you expect your modifications to be 24dnl carried into every other module in the repository. 25dnl 26dnl Single-module modifications are best placed in configure.in for kdelibs 27dnl and kdebase or configure.in.in if present. 28 29dnl ------------------------------------------------------------------------ 30dnl Forward compatibility macros (make autoconf 2.13 look like 2.50), 31dnl thanks to Raja R Harinath. 32dnl ------------------------------------------------------------------------ 33dnl 34 35dnl START FILE SDL.m4 36 37# Configure paths for SDL 38# Sam Lantinga 9/21/99 39# stolen from Manish Singh 40# stolen back from Frank Belew 41# stolen from Manish Singh 42# Shamelessly stolen from Owen Taylor 43 44dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) 45dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS 46dnl 47AC_DEFUN(AM_PATH_SDL, 48[dnl 49dnl Get the cflags and libraries from the sdl-config script 50dnl 51AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], 52 sdl_prefix="$withval", sdl_prefix="") 53AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], 54 sdl_exec_prefix="$withval", sdl_exec_prefix="") 55AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], 56 , enable_sdltest=yes) 57 58 if test x$sdl_exec_prefix != x ; then 59 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" 60 if test x${SDL_CONFIG+set} != xset ; then 61 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config 62 fi 63 fi 64 if test x$sdl_prefix != x ; then 65 sdl_args="$sdl_args --prefix=$sdl_prefix" 66 if test x${SDL_CONFIG+set} != xset ; then 67 SDL_CONFIG=$sdl_prefix/bin/sdl-config 68 fi 69 fi 70 71 AC_REQUIRE([AC_CANONICAL_TARGET]) 72 PATH="$prefix/bin:$prefix/usr/bin:$PATH" 73 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) 74 min_sdl_version=ifelse([$1], ,0.11.0,$1) 75 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) 76 no_sdl="" 77 if test "$SDL_CONFIG" = "no" ; then 78 no_sdl=yes 79 else 80 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` 81 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` 82 83 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ 84 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 85 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ 86 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 87 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ 88 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 89 if test "x$enable_sdltest" = "xyes" ; then 90 ac_save_CFLAGS="$CFLAGS" 91 ac_save_CXXFLAGS="$CXXFLAGS" 92 ac_save_LIBS="$LIBS" 93 CFLAGS="$CFLAGS $SDL_CFLAGS" 94 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 95 LIBS="$LIBS $SDL_LIBS" 96dnl 97dnl Now check if the installed SDL is sufficiently new. (Also sanity 98dnl checks the results of sdl-config to some extent 99dnl 100 rm -f conf.sdltest 101 AC_TRY_RUN([ 102#include <stdio.h> 103#include <stdlib.h> 104#include <string.h> 105#include "SDL.h" 106 107char* 108my_strdup (char *str) 109{ 110 char *new_str; 111 112 if (str) 113 { 114 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); 115 strcpy (new_str, str); 116 } 117 else 118 new_str = NULL; 119 120 return new_str; 121} 122 123int main (int argc, char *argv[]) 124{ 125 int major, minor, micro; 126 char *tmp_version; 127 128 /* This hangs on some systems (?) 129 system ("touch conf.sdltest"); 130 */ 131 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } 132 133 /* HP/UX 9 (%@#!) writes to sscanf strings */ 134 tmp_version = my_strdup("$min_sdl_version"); 135 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { 136 printf("%s, bad version string\n", "$min_sdl_version"); 137 exit(1); 138 } 139 140 if (($sdl_major_version > major) || 141 (($sdl_major_version == major) && ($sdl_minor_version > minor)) || 142 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) 143 { 144 return 0; 145 } 146 else 147 { 148 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); 149 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); 150 printf("*** best to upgrade to the required version.\n"); 151 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); 152 printf("*** to point to the correct copy of sdl-config, and remove the file\n"); 153 printf("*** config.cache before re-running configure\n"); 154 return 1; 155 } 156} 157 158],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) 159 CFLAGS="$ac_save_CFLAGS" 160 CXXFLAGS="$ac_save_CXXFLAGS" 161 LIBS="$ac_save_LIBS" 162 fi 163 fi 164 if test "x$no_sdl" = x ; then 165 AC_MSG_RESULT(yes) 166 ifelse([$2], , :, [$2]) 167 else 168 AC_MSG_RESULT(no) 169 if test "$SDL_CONFIG" = "no" ; then 170 echo "*** The sdl-config script installed by SDL could not be found" 171 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" 172 echo "*** your path, or set the SDL_CONFIG environment variable to the" 173 echo "*** full path to sdl-config." 174 else 175 if test -f conf.sdltest ; then 176 : 177 else 178 echo "*** Could not run SDL test program, checking why..." 179 CFLAGS="$CFLAGS $SDL_CFLAGS" 180 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 181 LIBS="$LIBS $SDL_LIBS" 182 AC_TRY_LINK([ 183#include <stdio.h> 184#include "SDL.h" 185 186int main(int argc, char *argv[]) 187{ return 0; } 188#undef main 189#define main K_and_R_C_main 190], [ return 0; ], 191 [ echo "*** The test program compiled, but did not run. This usually means" 192 echo "*** that the run-time linker is not finding SDL or finding the wrong" 193 echo "*** version of SDL. If it is not finding SDL, you'll need to set your" 194 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" 195 echo "*** to the installed location Also, make sure you have run ldconfig if that" 196 echo "*** is required on your system" 197 echo "***" 198 echo "*** If you have an old version installed, it is best to remove it, although" 199 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], 200 [ echo "*** The test program failed to compile or link. See the file config.log for the" 201 echo "*** exact error that occured. This usually means SDL was incorrectly installed" 202 echo "*** or that you have moved SDL since it was installed. In the latter case, you" 203 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) 204 CFLAGS="$ac_save_CFLAGS" 205 CXXFLAGS="$ac_save_CXXFLAGS" 206 LIBS="$ac_save_LIBS" 207 fi 208 fi 209 SDL_CFLAGS="" 210 SDL_LIBS="" 211 ifelse([$3], , :, [$3]) 212 fi 213 AC_SUBST(SDL_CFLAGS) 214 AC_SUBST(SDL_LIBS) 215 rm -f conf.sdltest 216]) 217 218dnl END FILE SDL.m4 219 220ifdef([_AC_PATH_X_XMKMF],[], 221 [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])]) 222ifdef([AC_OUTPUT_SUBDIRS],[], 223 [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])]) 224 225# KDE_PATH_X_DIRECT 226dnl Internal subroutine of AC_PATH_X. 227dnl Set ac_x_includes and/or ac_x_libraries. 228AC_DEFUN(KDE_PATH_X_DIRECT, 229[ 230AC_REQUIRE([KDE_CHECK_LIB64]) 231 232if test "$ac_x_includes" = NO; then 233 # Guess where to find include files, by looking for this one X11 .h file. 234 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h 235 236 # First, try using that file with no special directory specified. 237AC_TRY_CPP([#include <$x_direct_test_include>], 238[# We can compile using X headers with no special include directory. 239ac_x_includes=], 240[# Look for the header file in a standard set of common directories. 241# Check X11 before X11Rn because it is often a symlink to the current release. 242 for ac_dir in \ 243 /usr/X11/include \ 244 /usr/X11R6/include \ 245 /usr/X11R5/include \ 246 /usr/X11R4/include \ 247 \ 248 /usr/include/X11 \ 249 /usr/include/X11R6 \ 250 /usr/include/X11R5 \ 251 /usr/include/X11R4 \ 252 \ 253 /usr/local/X11/include \ 254 /usr/local/X11R6/include \ 255 /usr/local/X11R5/include \ 256 /usr/local/X11R4/include \ 257 \ 258 /usr/local/include/X11 \ 259 /usr/local/include/X11R6 \ 260 /usr/local/include/X11R5 \ 261 /usr/local/include/X11R4 \ 262 \ 263 /usr/X386/include \ 264 /usr/x386/include \ 265 /usr/XFree86/include/X11 \ 266 \ 267 /usr/include \ 268 /usr/local/include \ 269 /usr/unsupported/include \ 270 /usr/athena/include \ 271 /usr/local/x11r5/include \ 272 /usr/lpp/Xamples/include \ 273 \ 274 /usr/openwin/include \ 275 /usr/openwin/share/include \ 276 ; \ 277 do 278 if test -r "$ac_dir/$x_direct_test_include"; then 279 ac_x_includes=$ac_dir 280 break 281 fi 282 done]) 283fi # $ac_x_includes = NO 284 285if test "$ac_x_libraries" = NO; then 286 # Check for the libraries. 287 288 test -z "$x_direct_test_library" && x_direct_test_library=Xt 289 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc 290 291 # See if we find them without any special options. 292 # Don't add to $LIBS permanently. 293 ac_save_LIBS="$LIBS" 294 LIBS="-l$x_direct_test_library $LIBS" 295AC_TRY_LINK(, [${x_direct_test_function}()], 296[LIBS="$ac_save_LIBS" 297# We can link X programs with no special library path. 298ac_x_libraries=], 299[LIBS="$ac_save_LIBS" 300# First see if replacing the include by lib works. 301# Check X11 before X11Rn because it is often a symlink to the current release. 302for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \ 303 /usr/X11/lib${kdelibsuff} \ 304 /usr/X11R6/lib${kdelibsuff} \ 305 /usr/X11R5/lib${kdelibsuff} \ 306 /usr/X11R4/lib${kdelibsuff} \ 307 \ 308 /usr/lib${kdelibsuff}/X11 \ 309 /usr/lib${kdelibsuff}/X11R6 \ 310 /usr/lib${kdelibsuff}/X11R5 \ 311 /usr/lib${kdelibsuff}/X11R4 \ 312 \ 313 /usr/local/X11/lib${kdelibsuff} \ 314 /usr/local/X11R6/lib${kdelibsuff} \ 315 /usr/local/X11R5/lib${kdelibsuff} \ 316 /usr/local/X11R4/lib${kdelibsuff} \ 317 \ 318 /usr/local/lib${kdelibsuff}/X11 \ 319 /usr/local/lib${kdelibsuff}/X11R6 \ 320 /usr/local/lib${kdelibsuff}/X11R5 \ 321 /usr/local/lib${kdelibsuff}/X11R4 \ 322 \ 323 /usr/X386/lib${kdelibsuff} \ 324 /usr/x386/lib${kdelibsuff} \ 325 /usr/XFree86/lib${kdelibsuff}/X11 \ 326 \ 327 /usr/lib${kdelibsuff} \ 328 /usr/local/lib${kdelibsuff} \ 329 /usr/unsupported/lib${kdelibsuff} \ 330 /usr/athena/lib${kdelibsuff} \ 331 /usr/local/x11r5/lib${kdelibsuff} \ 332 /usr/lpp/Xamples/lib${kdelibsuff} \ 333 /lib/usr/lib${kdelibsuff}/X11 \ 334 \ 335 /usr/openwin/lib${kdelibsuff} \ 336 /usr/openwin/share/lib${kdelibsuff} \ 337 ; \ 338do 339dnl Don't even attempt the hair of trying to link an X program! 340 for ac_extension in a so sl; do 341 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then 342 ac_x_libraries=$ac_dir 343 break 2 344 fi 345 done 346done]) 347fi # $ac_x_libraries = NO 348]) 349 350 351dnl ------------------------------------------------------------------------ 352dnl Find a file (or one of more files in a list of dirs) 353dnl ------------------------------------------------------------------------ 354dnl 355AC_DEFUN(AC_FIND_FILE, 356[ 357$3=NO 358for i in $2; 359do 360 for j in $1; 361 do 362 echo "configure: __oline__: $i/$j" >&AC_FD_CC 363 if test -r "$i/$j"; then 364 echo "taking that" >&AC_FD_CC 365 $3=$i 366 break 2 367 fi 368 done 369done 370]) 371 372dnl KDE_FIND_PATH(programm-name, variable-name, list of directories, 373dnl if-not-found, test-parameter) 374AC_DEFUN(KDE_FIND_PATH, 375[ 376 AC_MSG_CHECKING([for $1]) 377 if test -n "$$2"; then 378 kde_cv_path="$$2"; 379 else 380 kde_cache=`echo $1 | sed 'y%./+-%__p_%'` 381 382 AC_CACHE_VAL(kde_cv_path_$kde_cache, 383 [ 384 kde_cv_path="NONE" 385 dirs="$3" 386 kde_save_IFS=$IFS 387 IFS=':' 388 for dir in $PATH; do 389 dirs="$dirs $dir" 390 done 391 IFS=$kde_save_IFS 392 393 for dir in $dirs; do 394 if test -x "$dir/$1"; then 395 if test -n "$5" 396 then 397 evalstr="$dir/$1 $5 2>&1 " 398 if eval $evalstr; then 399 kde_cv_path="$dir/$1" 400 break 401 fi 402 else 403 kde_cv_path="$dir/$1" 404 break 405 fi 406 fi 407 done 408 409 eval "kde_cv_path_$kde_cache=$kde_cv_path" 410 411 ]) 412 413 eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\"" 414 415 fi 416 417 if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then 418 AC_MSG_RESULT(not found) 419 $4 420 else 421 AC_MSG_RESULT($kde_cv_path) 422 $2=$kde_cv_path 423 424 fi 425]) 426 427AC_DEFUN(KDE_MOC_ERROR_MESSAGE, 428[ 429 AC_MSG_ERROR([No Qt meta object compiler (moc) found! 430Please check whether you installed Qt correctly. 431You need to have a running moc binary. 432configure tried to run $ac_cv_path_moc and the test didn't 433succeed. If configure shouldn't have tried this one, set 434the environment variable MOC to the right one before running 435configure. 436]) 437]) 438 439AC_DEFUN(KDE_UIC_ERROR_MESSAGE, 440[ 441 AC_MSG_WARN([No Qt ui compiler (uic) found! 442Please check whether you installed Qt correctly. 443You need to have a running uic binary. 444configure tried to run $ac_cv_path_uic and the test didn't 445succeed. If configure shouldn't have tried this one, set 446the environment variable UIC to the right one before running 447configure. 448]) 449]) 450 451 452AC_DEFUN(KDE_CHECK_UIC_FLAG, 453[ 454 AC_MSG_CHECKING([whether uic supports -$1 ]) 455 kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'` 456 AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache, 457 [ 458 cat >conftest.ui <<EOT 459 <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI> 460EOT 461 ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null" 462 if AC_TRY_EVAL(ac_uic_testrun); then 463 eval "kde_cv_prog_uic_$kde_cache=yes" 464 else 465 eval "kde_cv_prog_uic_$kde_cache=no" 466 fi 467 rm -f conftest* 468 ]) 469 470 if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then 471 AC_MSG_RESULT([yes]) 472 : 473 $3 474 else 475 AC_MSG_RESULT([no]) 476 : 477 $4 478 fi 479]) 480 481 482dnl ------------------------------------------------------------------------ 483dnl Find the meta object compiler and the ui compiler in the PATH, 484dnl in $QTDIR/bin, and some more usual places 485dnl ------------------------------------------------------------------------ 486dnl 487AC_DEFUN(AC_PATH_QT_MOC_UIC, 488[ 489 qt_bindirs="" 490 for dir in $kde_qt_dirs; do 491 qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc" 492 done 493 qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin" 494 if test ! "$ac_qt_bindir" = "NO"; then 495 qt_bindirs="$ac_qt_bindir $qt_bindirs" 496 fi 497 498 KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE]) 499 if test -z "$UIC_NOT_NEEDED"; then 500 KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""]) 501 if test -z "$UIC_PATH" ; then 502 KDE_UIC_ERROR_MESSAGE 503 exit 1 504 elif test $kde_qtver = 3; then 505 KDE_CHECK_UIC_FLAG(L,[/nonexistant],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no) 506 KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no) 507 508 UIC=$UIC_PATH 509 if test x$ac_uic_supports_libpath = xyes; then 510 UIC="$UIC -L \$(kde_widgetdir)" 511 fi 512 if test x$ac_uic_supports_nounload = xyes; then 513 UIC="$UIC -nounload" 514 fi 515 fi 516 else 517 UIC="echo uic not available: " 518 fi 519 520 AC_SUBST(MOC) 521 AC_SUBST(UIC) 522 523 UIC_TR="i18n" 524 if test $kde_qtver = 3; then 525 UIC_TR="tr2i18n" 526 fi 527 528 AC_SUBST(UIC_TR) 529]) 530 531AC_DEFUN(KDE_1_CHECK_PATHS, 532[ 533 KDE_1_CHECK_PATH_HEADERS 534 535 KDE_TEST_RPATH= 536 537 if test -n "$USE_RPATH"; then 538 539 if test -n "$kde_libraries"; then 540 KDE_TEST_RPATH="-R $kde_libraries" 541 fi 542 543 if test -n "$qt_libraries"; then 544 KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries" 545 fi 546 547 if test -n "$x_libraries"; then 548 KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries" 549 fi 550 551 KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH" 552 fi 553 554AC_MSG_CHECKING([for KDE libraries installed]) 555ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5' 556 557if AC_TRY_EVAL(ac_link) && test -s conftest; then 558 AC_MSG_RESULT(yes) 559else 560 AC_MSG_ERROR([your system fails at linking a small KDE application! 561Check, if your compiler is installed correctly and if you have used the 562same compiler to compile Qt and kdelibs as you did use now. 563For more details about this problem, look at the end of config.log.]) 564fi 565 566if eval `KDEDIR= ./conftest 2>&5`; then 567 kde_result=done 568else 569 kde_result=problems 570fi 571 572KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log 573kde_have_all_paths=yes 574 575KDE_SET_PATHS($kde_result) 576 577]) 578 579AC_DEFUN(KDE_SET_PATHS, 580[ 581 kde_cv_all_paths="kde_have_all_paths=\"yes\" \ 582 kde_htmldir=\"$kde_htmldir\" \ 583 kde_appsdir=\"$kde_appsdir\" \ 584 kde_icondir=\"$kde_icondir\" \ 585 kde_sounddir=\"$kde_sounddir\" \ 586 kde_datadir=\"$kde_datadir\" \ 587 kde_locale=\"$kde_locale\" \ 588 kde_cgidir=\"$kde_cgidir\" \ 589 kde_confdir=\"$kde_confdir\" \ 590 kde_mimedir=\"$kde_mimedir\" \ 591 kde_toolbardir=\"$kde_toolbardir\" \ 592 kde_wallpaperdir=\"$kde_wallpaperdir\" \ 593 kde_templatesdir=\"$kde_templatesdir\" \ 594 kde_bindir=\"$kde_bindir\" \ 595 kde_servicesdir=\"$kde_servicesdir\" \ 596 kde_servicetypesdir=\"$kde_servicetypesdir\" \ 597 kde_moduledir=\"$kde_moduledir\" \ 598 kde_styledir=\"$kde_styledir\" \ 599 kde_widgetdir=\"$kde_widgetdir\" \ 600 kde_result=$1" 601]) 602 603AC_DEFUN(KDE_SET_DEFAULT_PATHS, 604[ 605if test "$1" = "default"; then 606 607 if test -z "$kde_htmldir"; then 608 kde_htmldir='\${prefix}/share/doc/HTML' 609 fi 610 if test -z "$kde_appsdir"; then 611 kde_appsdir='\${prefix}/share/applnk' 612 fi 613 if test -z "$kde_icondir"; then 614 kde_icondir='\${prefix}/share/icons' 615 fi 616 if test -z "$kde_sounddir"; then 617 kde_sounddir='\${prefix}/share/sounds' 618 fi 619 if test -z "$kde_datadir"; then 620 kde_datadir='\${prefix}/share/apps' 621 fi 622 if test -z "$kde_locale"; then 623 kde_locale='\${prefix}/share/locale' 624 fi 625 if test -z "$kde_cgidir"; then 626 kde_cgidir='\${exec_prefix}/cgi-bin' 627 fi 628 if test -z "$kde_confdir"; then 629 kde_confdir='\${prefix}/share/config' 630 fi 631 if test -z "$kde_mimedir"; then 632 kde_mimedir='\${prefix}/share/mimelnk' 633 fi 634 if test -z "$kde_toolbardir"; then 635 kde_toolbardir='\${prefix}/share/toolbar' 636 fi 637 if test -z "$kde_wallpaperdir"; then 638 kde_wallpaperdir='\${prefix}/share/wallpapers' 639 fi 640 if test -z "$kde_templatesdir"; then 641 kde_templatesdir='\${prefix}/share/templates' 642 fi 643 if test -z "$kde_bindir"; then 644 kde_bindir='\${exec_prefix}/bin' 645 fi 646 if test -z "$kde_servicesdir"; then 647 kde_servicesdir='\${prefix}/share/services' 648 fi 649 if test -z "$kde_servicetypesdir"; then 650 kde_servicetypesdir='\${prefix}/share/servicetypes' 651 fi 652 if test -z "$kde_moduledir"; then 653 if test "$kde_qtver" = "2"; then 654 kde_moduledir='\${libdir}/kde2' 655 else 656 kde_moduledir='\${libdir}/kde3' 657 fi 658 fi 659 if test -z "$kde_styledir"; then 660 kde_styledir='\${libdir}/kde3/plugins/styles' 661 fi 662 if test -z "$kde_widgetdir"; then 663 kde_widgetdir='\${libdir}/kde3/plugins/designer' 664 fi 665 666 KDE_SET_PATHS(defaults) 667 668else 669 670 if test $kde_qtver = 1; then 671 AC_MSG_RESULT([compiling]) 672 KDE_1_CHECK_PATHS 673 else 674 AC_MSG_ERROR([path checking not yet supported for KDE 2]) 675 fi 676 677fi 678]) 679 680AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS, 681[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" || 682 test -z "$kde_icondir" || test -z "$kde_sounddir" || 683 test -z "$kde_datadir" || test -z "$kde_locale" || 684 test -z "$kde_cgidir" || test -z "$kde_confdir" || 685 test -z "$kde_mimedir" || test -z "$kde_toolbardir" || 686 test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" || 687 test -z "$kde_bindir" || test -z "$kde_servicesdir" || 688 test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" || 689 test -z "$kde_styledir" || test -z "kde_widgetdir" 690 test "x$kde_have_all_paths" != "xyes"; then 691 kde_have_all_paths=no 692 fi 693]) 694 695AC_DEFUN(KDE_MISSING_PROG_ERROR, 696[ 697 AC_MSG_ERROR([The important program $1 was not found! 698Please check whether you installed KDE correctly. 699]) 700]) 701 702AC_DEFUN(KDE_MISSING_ARTS_ERROR, 703[ 704 AC_MSG_ERROR([The important program $1 was not found! 705Please check whether you installed aRts correctly. 706]) 707]) 708 709AC_DEFUN(KDE_SUBST_PROGRAMS, 710[ 711 712 kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin" 713 test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs" 714 if test -n "$KDEDIRS"; then 715 kde_save_IFS=$IFS 716 IFS=: 717 for dir in $KDEDIRS; do 718 kde_default_bindirs="$dir/bin $kde_default_bindirs " 719 done 720 IFS=$kde_save_IFS 721 fi 722 kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs" 723 KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)]) 724 KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)]) 725 KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)]) 726 KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)]) 727 KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs]) 728 KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs]) 729 730 if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then 731 kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share" 732 test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs" 733 AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET) 734 if test "$KDE_XSL_STYLESHEET" = "NO"; then 735 KDE_XSL_STYLESHEET="" 736 else 737 KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl" 738 fi 739 fi 740 741 DCOP_DEPENDENCIES='$(DCOPIDL)' 742 AC_SUBST(DCOPIDL) 743 AC_SUBST(DCOPIDL2CPP) 744 AC_SUBST(DCOP_DEPENDENCIES) 745 AC_SUBST(MCOPIDL) 746 AC_SUBST(ARTSCCONFIG) 747 AC_SUBST(KDECONFIG) 748 AC_SUBST(MEINPROC) 749 AC_SUBST(KDE_XSL_STYLESHEET) 750 751 if test -x "$KDECONFIG"; then # it can be "compiled" 752 kde_libs_prefix=`$KDECONFIG --prefix` 753 if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then 754 AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs. 755 This means it has been moved since you installed it. 756 This won't work. Please recompile kdelibs for the new prefix. 757 ]) 758 fi 759 kde_libs_htmldir=`$KDECONFIG --install html --expandvars` 760 else 761 kde_libs_prefix='$(prefix)' 762 kde_libs_htmldir='$(kde_htmldir)' 763 fi 764 AC_SUBST(kde_libs_prefix) 765 AC_SUBST(kde_libs_htmldir) 766])dnl 767 768AC_DEFUN(AC_CREATE_KFSSTND, 769[ 770AC_REQUIRE([AC_CHECK_RPATH]) 771 772AC_MSG_CHECKING([for KDE paths]) 773kde_result="" 774kde_cached_paths=yes 775AC_CACHE_VAL(kde_cv_all_paths, 776[ 777 KDE_SET_DEFAULT_PATHS($1) 778 kde_cached_paths=no 779]) 780eval "$kde_cv_all_paths" 781KDE_CHECK_PATHS_FOR_COMPLETENESS 782if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then 783 # wrong values were cached, may be, we can set better ones 784 kde_result= 785 kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir= 786 kde_datadir= kde_locale= kde_cgidir= kde_confdir= 787 kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir= 788 kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir= 789 kde_have_all_paths= 790 kde_styledir= 791 kde_widgetdir= 792 KDE_SET_DEFAULT_PATHS($1) 793 eval "$kde_cv_all_paths" 794 KDE_CHECK_PATHS_FOR_COMPLETENESS 795 kde_result="$kde_result (cache overridden)" 796fi 797if test "$kde_have_all_paths" = "no"; then 798 AC_MSG_ERROR([configure could not run a little KDE program to test the environment. 799Since it had compiled and linked before, it must be a strange problem on your system. 800Look at config.log for details. If you are not able to fix this, look at 801http://www.kde.org/faq/installation.html or any www.kde.org mirror. 802(If you're using an egcs version on Linux, you may update binutils!) 803]) 804else 805 rm -f conftest* 806 AC_MSG_RESULT($kde_result) 807fi 808 809bindir=$kde_bindir 810 811KDE_SUBST_PROGRAMS 812 813]) 814 815AC_DEFUN(AC_SUBST_KFSSTND, 816[ 817AC_SUBST(kde_htmldir) 818AC_SUBST(kde_appsdir) 819AC_SUBST(kde_icondir) 820AC_SUBST(kde_sounddir) 821AC_SUBST(kde_datadir) 822AC_SUBST(kde_locale) 823AC_SUBST(kde_confdir) 824AC_SUBST(kde_mimedir) 825AC_SUBST(kde_wallpaperdir) 826AC_SUBST(kde_bindir) 827dnl for KDE 2 828AC_SUBST(kde_templatesdir) 829AC_SUBST(kde_servicesdir) 830AC_SUBST(kde_servicetypesdir) 831AC_SUBST(kde_moduledir) 832AC_SUBST(kde_styledir) 833AC_SUBST(kde_widgetdir) 834if test "$kde_qtver" = 1; then 835 kde_minidir="$kde_icondir/mini" 836else 837# for KDE 1 - this breaks KDE2 apps using minidir, but 838# that's the plan ;-/ 839 kde_minidir="/dev/null" 840fi 841dnl AC_SUBST(kde_minidir) 842dnl AC_SUBST(kde_cgidir) 843dnl AC_SUBST(kde_toolbardir) 844]) 845 846AC_DEFUN(KDE_MISC_TESTS, 847[ 848 AC_LANG_C 849 dnl Checks for libraries. 850 AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 851 AC_SUBST(LIBUTIL) 852 AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD 853 AC_SUBST(LIBCOMPAT) 854 kde_have_crypt= 855 AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes], 856 AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [ 857 AC_MSG_WARN([you have no crypt in either libcrypt or libc. 858You should install libcrypt from another source or configure with PAM 859support]) 860 kde_have_crypt=no 861 ])) 862 AC_SUBST(LIBCRYPT) 863 if test $kde_have_crypt = yes; then 864 AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function]) 865 fi 866 AC_CHECK_SOCKLEN_T 867 AC_LANG_C 868 AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"]) 869 if test $ac_cv_lib_dnet_dnet_ntoa = no; then 870 AC_CHECK_LIB(dnet_stub, dnet_ntoa, 871 [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) 872 fi 873 AC_CHECK_FUNC(inet_ntoa) 874 if test $ac_cv_func_inet_ntoa = no; then 875 AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl") 876 fi 877 AC_CHECK_FUNC(connect) 878 if test $ac_cv_func_connect = no; then 879 AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", , 880 $X_EXTRA_LIBS) 881 fi 882 883 AC_CHECK_FUNC(remove) 884 if test $ac_cv_func_remove = no; then 885 AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix") 886 fi 887 888 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. 889 AC_CHECK_FUNC(shmat, , 890 AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc")) 891 892 # darwin needs this to initialize the environment 893 AC_CHECK_HEADERS(crt_externs.h) 894 AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])]) 895 896 # more headers that need to be explicitly included on darwin 897 AC_CHECK_HEADERS(sys/types.h stdint.h) 898 899 # darwin requires a poll emulation library 900 AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll") 901 902 # CoreAudio framework 903 AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [ 904 AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API]) 905 FRAMEWORK_COREAUDIO="-framework CoreAudio" 906 ]) 907 908 AC_CHECK_RES_INIT 909 AC_SUBST(LIB_POLL) 910 AC_SUBST(FRAMEWORK_COREAUDIO) 911 LIBSOCKET="$X_EXTRA_LIBS" 912 AC_SUBST(LIBSOCKET) 913 AC_SUBST(X_EXTRA_LIBS) 914 AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4 915 AC_SUBST(LIBUCB) 916 917 case $host in dnl this *is* LynxOS specific 918 *-*-lynxos* ) 919 AC_MSG_CHECKING([LynxOS header file wrappers]) 920 [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"] 921 AC_MSG_RESULT(disabled) 922 AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS 923 ;; 924 esac 925 926 KDE_CHECK_TYPES 927 KDE_CHECK_LIBDL 928 929AH_VERBATIM(_AIX_STRINGS_H_BZERO, 930[ 931/* 932 * AIX defines FD_SET in terms of bzero, but fails to include <strings.h> 933 * that defines bzero. 934 */ 935 936#if defined(_AIX) 937#include <strings.h> 938#endif 939]) 940 941AC_CHECK_FUNCS([vsnprintf snprintf]) 942 943AH_VERBATIM(_TRU64,[ 944/* 945 * On HP-UX, the declaration of vsnprintf() is needed every time ! 946 */ 947 948#if !defined(HAVE_VSNPRINTF) || defined(hpux) 949#if __STDC__ 950#include <stdarg.h> 951#include <stdlib.h> 952#else 953#include <varargs.h> 954#endif 955#ifdef __cplusplus 956extern "C" 957#endif 958int vsnprintf(char *str, size_t n, char const *fmt, va_list ap); 959#ifdef __cplusplus 960extern "C" 961#endif 962int snprintf(char *str, size_t n, char const *fmt, ...); 963#endif 964]) 965 966]) 967 968dnl ------------------------------------------------------------------------ 969dnl Find the header files and libraries for X-Windows. Extended the 970dnl macro AC_PATH_X 971dnl ------------------------------------------------------------------------ 972dnl 973AC_DEFUN(K_PATH_X, 974[ 975AC_REQUIRE([KDE_MISC_TESTS])dnl 976AC_REQUIRE([KDE_CHECK_LIB64]) 977 978AC_ARG_ENABLE( 979 embedded, 980 [ --enable-embedded link to Qt-embedded, don't use X], 981 kde_use_qt_emb=$enableval, 982 kde_use_qt_emb=no 983) 984 985AC_ARG_ENABLE( 986 qtopia, 987 [ --enable-qtopia link to Qt-embedded, link to the Qtopia Environment], 988 kde_use_qt_emb_palm=$enableval, 989 kde_use_qt_emb_palm=no 990) 991 992if test "$kde_use_qt_emb" = "no"; then 993 994AC_MSG_CHECKING(for X) 995AC_LANG_SAVE 996AC_LANG_C 997AC_CACHE_VAL(kde_cv_have_x, 998[# One or both of the vars are not set, and there is no cached value. 999if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then 1000 kde_x_includes=NO 1001else 1002 kde_x_includes=$x_includes 1003fi 1004if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then 1005 kde_x_libraries=NO 1006else 1007 kde_x_libraries=$x_libraries 1008fi 1009 1010# below we use the standard autoconf calls 1011ac_x_libraries=$kde_x_libraries 1012ac_x_includes=$kde_x_includes 1013 1014KDE_PATH_X_DIRECT 1015dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries. 1016dnl Unfortunately, if compiling with the N32 ABI, this is not the correct 1017dnl location. The correct location is /usr/lib32 or an undefined value 1018dnl (the linker is smart enough to pick the correct default library). 1019dnl Things work just fine if you use just AC_PATH_X_DIRECT. 1020dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to 1021dnl /usr/openwin/include, which doesn't work. /usr/include does work, so 1022dnl x_includes should be left alone. 1023case "$host" in 1024mips-sgi-irix6*) 1025 ;; 1026*-*-solaris*) 1027 ;; 1028*) 1029 _AC_PATH_X_XMKMF 1030 if test -z "$ac_x_includes"; then 1031 ac_x_includes="." 1032 fi 1033 if test -z "$ac_x_libraries"; then 1034 ac_x_libraries="/usr/lib${kdelibsuff}" 1035 fi 1036esac 1037#from now on we use our own again 1038 1039# when the user already gave --x-includes, we ignore 1040# what the standard autoconf macros told us. 1041if test "$kde_x_includes" = NO; then 1042 kde_x_includes=$ac_x_includes 1043fi 1044 1045# for --x-libraries too 1046if test "$kde_x_libraries" = NO; then 1047 kde_x_libraries=$ac_x_libraries 1048fi 1049 1050if test "$kde_x_includes" = NO; then 1051 AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!]) 1052fi 1053 1054if test "$kde_x_libraries" = NO; then 1055 AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!]) 1056fi 1057 1058# Record where we found X for the cache. 1059kde_cv_have_x="have_x=yes \ 1060 kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries" 1061])dnl 1062 1063eval "$kde_cv_have_x" 1064 1065if test "$have_x" != yes; then 1066 AC_MSG_RESULT($have_x) 1067 no_x=yes 1068else 1069 AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes]) 1070fi 1071 1072if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then 1073 X_INCLUDES="" 1074 x_includes="."; dnl better than nothing :- 1075 else 1076 x_includes=$kde_x_includes 1077 X_INCLUDES="-I$x_includes" 1078fi 1079 1080if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then 1081 X_LDFLAGS="" 1082 x_libraries="/usr/lib"; dnl better than nothing :- 1083 else 1084 x_libraries=$kde_x_libraries 1085 X_LDFLAGS="-L$x_libraries" 1086fi 1087all_includes="$X_INCLUDES" 1088all_libraries="$X_LDFLAGS" 1089 1090AC_SUBST(X_INCLUDES) 1091AC_SUBST(X_LDFLAGS) 1092AC_SUBST(x_libraries) 1093AC_SUBST(x_includes) 1094 1095# Check for libraries that X11R6 Xt/Xaw programs need. 1096ac_save_LDFLAGS="$LDFLAGS" 1097LDFLAGS="$LDFLAGS $X_LDFLAGS" 1098# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to 1099# check for ICE first), but we must link in the order -lSM -lICE or 1100# we get undefined symbols. So assume we have SM if we have ICE. 1101# These have to be linked with before -lX11, unlike the other 1102# libraries we check for below, so use a different variable. 1103# --interran@uluru.Stanford.EDU, kb@cs.umb.edu. 1104AC_CHECK_LIB(ICE, IceConnectionNumber, 1105 [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS) 1106AC_SUBST(LIBSM) 1107LDFLAGS="$ac_save_LDFLAGS" 1108 1109AC_SUBST(X_PRE_LIBS) 1110 1111LIB_X11='-lX11 $(LIBSOCKET)' 1112AC_SUBST(LIB_X11) 1113 1114AC_MSG_CHECKING(for libXext) 1115AC_CACHE_VAL(kde_cv_have_libXext, 1116[ 1117kde_ldflags_safe="$LDFLAGS" 1118kde_libs_safe="$LIBS" 1119 1120LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS" 1121LIBS="-lXext -lX11 $LIBSOCKET" 1122 1123AC_TRY_LINK([ 1124#include <stdio.h> 1125#ifdef STDC_HEADERS 1126# include <stdlib.h> 1127#endif 1128], 1129[ 1130printf("hello Xext\n"); 1131], 1132kde_cv_have_libXext=yes, 1133kde_cv_have_libXext=no 1134 ) 1135 1136LDFLAGS=$kde_ldflags_safe 1137LIBS=$kde_libs_safe 1138 ]) 1139 1140AC_MSG_RESULT($kde_cv_have_libXext) 1141 1142if test "$kde_cv_have_libXext" = "no"; then 1143 AC_MSG_ERROR([We need a working libXext to proceed. Since configure 1144can't find it itself, we stop here assuming that make wouldn't find 1145them either.]) 1146fi 1147 1148AC_MSG_CHECKING(for Xinerama) 1149 1150 AC_ARG_WITH(xinerama, 1151 [ --with-xinerama enable support for Xinerama ], 1152 [ 1153 no_xinerama=no 1154 ], [ 1155 no_xinerama=yes 1156 ] 1157) 1158 1159kde_save_LDFLAGS="$LDFLAGS" 1160kde_save_CFLAGS="$CFLAGS" 1161kde_save_LIBS="$LIBS" 1162LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS" 1163CFLAGS="$CFLAGS -I$x_includes" 1164LIBS="-lXinerama -lXext" 1165 1166if test "x$no_xinerama" = "xno"; then 1167 1168 AC_CACHE_VAL(ac_cv_have_xinerama, 1169 [ 1170 AC_TRY_LINK([#include <X11/Xlib.h> 1171 #include <X11/extensions/Xinerama.h>], 1172 [XineramaIsActive(NULL);], 1173 [ac_cv_have_xinerama="yes"], 1174 [ac_cv_have_xinerama="no"]) 1175 ]) 1176else 1177 ac_cv_have_xinerama=no; 1178fi 1179 1180AC_MSG_RESULT($ac_cv_have_xinerama) 1181 1182LIBXINERAMA="" 1183 1184if test "$ac_cv_have_xinerama" = "yes"; then 1185 AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support]) 1186 LIBXINERAMA="-lXinerama" 1187fi 1188 1189AC_SUBST(LIBXINERAMA) 1190 1191LDFLAGS="$kde_save_LDFLAGS" 1192CFLAGS="$kde_save_CFLAGS" 1193LIBS="$kde_save_LIBS" 1194 1195LIB_XEXT="-lXext" 1196QTE_NORTTI="" 1197 1198else 1199 dnl We're using QT Embedded 1200 CPPFLAGS=-DQWS 1201 CXXFLAGS="$CXXFLAGS -fno-rtti" 1202 QTE_NORTTI="-fno-rtti -DQWS" 1203 X_PRE_LIBS="" 1204 LIB_X11="" 1205 LIB_XEXT="" 1206 LIBSM="" 1207 X_INCLUDES="" 1208 X_LDFLAGS="" 1209 x_includes="" 1210 x_libraries="" 1211 AC_SUBST(X_PRE_LIBS) 1212 AC_SUBST(LIB_X11) 1213 AC_SUBST(LIBSM) 1214 AC_SUBST(X_INCLUDES) 1215 AC_SUBST(X_LDFLAGS) 1216 AC_SUBST(x_includes) 1217 AC_SUBST(x_libraries) 1218fi 1219AC_SUBST(QTE_NORTTI) 1220AC_SUBST(LIB_XEXT) 1221 1222 1223AC_LANG_RESTORE 1224 1225]) 1226 1227AC_DEFUN(KDE_PRINT_QT_PROGRAM, 1228[ 1229AC_REQUIRE([KDE_USE_QT]) 1230cat > conftest.$ac_ext <<EOF 1231#include "confdefs.h" 1232#include <qglobal.h> 1233#include <qapplication.h> 1234EOF 1235if test "$kde_qtver" = "2"; then 1236cat >> conftest.$ac_ext <<EOF 1237#include <qevent.h> 1238#include <qstring.h> 1239#include <qstyle.h> 1240EOF 1241 1242if test $kde_qtsubver -gt 0; then 1243cat >> conftest.$ac_ext <<EOF 1244#if QT_VERSION < 210 1245#error 1 1246#endif 1247EOF 1248fi 1249fi 1250 1251if test "$kde_qtver" = "3"; then 1252cat >> conftest.$ac_ext <<EOF 1253#include <qcursor.h> 1254#include <qstylefactory.h> 1255#include <private/qucomextra_p.h> 1256EOF 1257fi 1258 1259echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext 1260cat >> conftest.$ac_ext <<EOF 1261#error 1 1262#endif 1263 1264int main() { 1265EOF 1266if test "$kde_qtver" = "2"; then 1267cat >> conftest.$ac_ext <<EOF 1268 QStringList *t = new QStringList(); 1269 Q_UNUSED(t); 1270EOF 1271if test $kde_qtsubver -gt 0; then 1272cat >> conftest.$ac_ext <<EOF 1273 QString s; 1274 s.setLatin1("Elvis is alive", 14); 1275EOF 1276fi 1277fi 1278if test "$kde_qtver" = "3"; then 1279cat >> conftest.$ac_ext <<EOF 1280 (void)QStyleFactory::create(QString::null); 1281 QCursor c(Qt::WhatsThisCursor); 1282EOF 1283fi 1284cat >> conftest.$ac_ext <<EOF 1285 return 0; 1286} 1287EOF 1288]) 1289 1290AC_DEFUN(KDE_USE_QT, 1291[ 1292if test -z "$1"; then 1293 # Current default Qt version: 3.1 1294 kde_qtver=3 1295 kde_qtsubver=1 1296else 1297 kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'` 1298 # following is the check if subversion isnt found in passed argument 1299 if test "$kde_qtsubver" = "$1"; then 1300 kde_qtsubver=1 1301 fi 1302 kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'` 1303 if test "$kde_qtver" = "1"; then 1304 kde_qtsubver=42 1305 fi 1306fi 1307 1308if test -z "$2"; then 1309 if test "$kde_qtver" = "2"; then 1310 if test $kde_qtsubver -gt 0; then 1311 kde_qt_minversion=">= Qt 2.2.2" 1312 else 1313 kde_qt_minversion=">= Qt 2.0.2" 1314 fi 1315 fi 1316 if test "$kde_qtver" = "3"; then 1317 if test $kde_qtsubver -gt 0; then 1318 kde_qt_minversion=">= Qt 3.1 (20021021)" 1319 else 1320 kde_qt_minversion=">= Qt 3.0" 1321 fi 1322 fi 1323 if test "$kde_qtver" = "1"; then 1324 kde_qt_minversion=">= 1.42 and < 2.0" 1325 fi 1326else 1327 kde_qt_minversion=$2 1328fi 1329 1330if test -z "$3"; then 1331 if test $kde_qtver = 3; then 1332 if test $kde_qtsubver -gt 0; then 1333 kde_qt_verstring="QT_VERSION >= 0x030100" 1334 else 1335 kde_qt_verstring="QT_VERSION >= 300" 1336 fi 1337 fi 1338 if test $kde_qtver = 2; then 1339 if test $kde_qtsubver -gt 0; then 1340 kde_qt_verstring="QT_VERSION >= 222" 1341 else 1342 kde_qt_verstring="QT_VERSION >= 200" 1343 fi 1344 fi 1345 if test $kde_qtver = 1; then 1346 kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" 1347 fi 1348else 1349 kde_qt_verstring=$3 1350fi 1351 1352if test $kde_qtver = 3; then 1353 kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt" 1354fi 1355if test $kde_qtver = 2; then 1356 kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt" 1357fi 1358if test $kde_qtver = 1; then 1359 kde_qt_dirs="$QTDIR /usr/lib/qt" 1360fi 1361]) 1362 1363AC_DEFUN(KDE_CHECK_QT_DIRECT, 1364[ 1365AC_REQUIRE([KDE_USE_QT]) 1366AC_MSG_CHECKING([if Qt compiles without flags]) 1367AC_CACHE_VAL(kde_cv_qt_direct, 1368[ 1369AC_LANG_SAVE 1370AC_LANG_CPLUSPLUS 1371ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH 1372ac_LIBRARY_PATH="$LIBRARY_PATH" 1373ac_cxxflags_safe="$CXXFLAGS" 1374ac_ldflags_safe="$LDFLAGS" 1375ac_libs_safe="$LIBS" 1376 1377CXXFLAGS="$CXXFLAGS -I$qt_includes" 1378LDFLAGS="$LDFLAGS $X_LDFLAGS" 1379if test "x$kde_use_qt_emb" != "xyes"; then 1380LIBS="$LIBQT -lXext -lX11 $LIBSOCKET" 1381else 1382LIBS="$LIBQT $LIBSOCKET" 1383fi 1384LD_LIBRARY_PATH= 1385export LD_LIBRARY_PATH 1386LIBRARY_PATH= 1387export LIBRARY_PATH 1388 1389KDE_PRINT_QT_PROGRAM 1390 1391if AC_TRY_EVAL(ac_link) && test -s conftest; then 1392 kde_cv_qt_direct="yes" 1393else 1394 kde_cv_qt_direct="no" 1395 echo "configure: failed program was:" >&AC_FD_CC 1396 cat conftest.$ac_ext >&AC_FD_CC 1397fi 1398 1399rm -f conftest* 1400CXXFLAGS="$ac_cxxflags_safe" 1401LDFLAGS="$ac_ldflags_safe" 1402LIBS="$ac_libs_safe" 1403 1404LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe" 1405export LD_LIBRARY_PATH 1406LIBRARY_PATH="$ac_LIBRARY_PATH" 1407export LIBRARY_PATH 1408AC_LANG_RESTORE 1409]) 1410 1411if test "$kde_cv_qt_direct" = "yes"; then 1412 AC_MSG_RESULT(yes) 1413 $1 1414else 1415 AC_MSG_RESULT(no) 1416 $2 1417fi 1418]) 1419 1420dnl ------------------------------------------------------------------------ 1421dnl Try to find the Qt headers and libraries. 1422dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed) 1423dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed) 1424dnl ------------------------------------------------------------------------ 1425dnl 1426AC_DEFUN(AC_PATH_QT_1_3, 1427[ 1428AC_REQUIRE([K_PATH_X]) 1429AC_REQUIRE([KDE_USE_QT]) 1430AC_REQUIRE([KDE_CHECK_LIB64]) 1431 1432dnl ------------------------------------------------------------------------ 1433dnl Add configure flag to enable linking to MT version of Qt library. 1434dnl ------------------------------------------------------------------------ 1435 1436AC_ARG_ENABLE( 1437 mt, 1438 [ --disable-mt link to non-threaded Qt (deprecated)], 1439 kde_use_qt_mt=$enableval, 1440 [ 1441 if test $kde_qtver = 3; then 1442 kde_use_qt_mt=yes 1443 else 1444 kde_use_qt_mt=no 1445 fi 1446 ] 1447) 1448 1449USING_QT_MT="" 1450 1451dnl ------------------------------------------------------------------------ 1452dnl If we not get --disable-qt-mt then adjust some vars for the host. 1453dnl ------------------------------------------------------------------------ 1454 1455KDE_MT_LDFLAGS= 1456KDE_MT_LIBS= 1457if test "x$kde_use_qt_mt" = "xyes"; then 1458 KDE_CHECK_THREADING 1459 if test "x$kde_use_threading" = "xyes"; then 1460 CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS" 1461 KDE_MT_LDFLAGS="$USE_THREADS" 1462 KDE_MT_LIBS="$LIBPTHREAD" 1463 else 1464 kde_use_qt_mt=no 1465 fi 1466fi 1467AC_SUBST(KDE_MT_LDFLAGS) 1468AC_SUBST(KDE_MT_LIBS) 1469 1470kde_qt_was_given=yes 1471 1472dnl ------------------------------------------------------------------------ 1473dnl If we haven't been told how to link to Qt, we work it out for ourselves. 1474dnl ------------------------------------------------------------------------ 1475if test -z "$LIBQT_GLOB"; then 1476 if test "x$kde_use_qt_emb" = "xyes"; then 1477 LIBQT_GLOB="libqte.*" 1478 else 1479 LIBQT_GLOB="libqt.*" 1480 fi 1481fi 1482 1483if test -z "$LIBQT"; then 1484dnl ------------------------------------------------------------ 1485dnl If we got --enable-embedded then adjust the Qt library name. 1486dnl ------------------------------------------------------------ 1487 if test "x$kde_use_qt_emb" = "xyes"; then 1488 qtlib="qte" 1489 else 1490 qtlib="qt" 1491 fi 1492 1493 kde_int_qt="-l$qtlib" 1494else 1495 kde_int_qt="$LIBQT" 1496 kde_lib_qt_set=yes 1497fi 1498 1499if test -z "$LIBQPE"; then 1500dnl ------------------------------------------------------------ 1501dnl If we got --enable-palmtop then add -lqpe to the link line 1502dnl ------------------------------------------------------------ 1503 if test "x$kde_use_qt_emb" = "xyes"; then 1504 if test "x$kde_use_qt_emb_palm" = "xyes"; then 1505 LIB_QPE="-lqpe" 1506 else 1507 LIB_QPE="" 1508 fi 1509 else 1510 LIB_QPE="" 1511 fi 1512fi 1513 1514dnl ------------------------------------------------------------------------ 1515dnl If we got --enable-qt-mt then adjust the Qt library name for the host. 1516dnl ------------------------------------------------------------------------ 1517 1518if test "x$kde_use_qt_mt" = "xyes"; then 1519 if test -z "$LIBQT"; then 1520 LIBQT="-l$qtlib-mt" 1521 kde_int_qt="-l$qtlib-mt" 1522 else 1523 LIBQT="$qtlib-mt" 1524 kde_int_qt="$qtlib-mt" 1525 fi 1526 LIBQT_GLOB="lib$qtlib-mt.*" 1527 USING_QT_MT="using -mt" 1528else 1529 LIBQT="-l$qtlib" 1530fi 1531 1532if test $kde_qtver != 1; then 1533 1534 AC_REQUIRE([AC_FIND_PNG]) 1535 AC_REQUIRE([AC_FIND_JPEG]) 1536 LIBQT="$LIBQT $LIBPNG $LIBJPEG" 1537fi 1538 1539if test $kde_qtver = 3; then 1540 AC_REQUIRE([KDE_CHECK_LIBDL]) 1541 LIBQT="$LIBQT $LIBDL" 1542fi 1543 1544AC_MSG_CHECKING([for Qt]) 1545 1546if test "x$kde_use_qt_emb" != "xyes"; then 1547LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET" 1548fi 1549ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO 1550qt_libraries="" 1551qt_includes="" 1552AC_ARG_WITH(qt-dir, 1553 [ --with-qt-dir=DIR where the root of Qt is installed ], 1554 [ ac_qt_includes="$withval"/include 1555 ac_qt_libraries="$withval"/lib${kdelibsuff} 1556 ac_qt_bindir="$withval"/bin 1557 ]) 1558 1559AC_ARG_WITH(qt-includes, 1560 [ --with-qt-includes=DIR where the Qt includes are. ], 1561 [ 1562 ac_qt_includes="$withval" 1563 ]) 1564 1565kde_qt_libs_given=no 1566 1567AC_ARG_WITH(qt-libraries, 1568 [ --with-qt-libraries=DIR where the Qt library is installed.], 1569 [ ac_qt_libraries="$withval" 1570 kde_qt_libs_given=yes 1571 ]) 1572 1573AC_CACHE_VAL(ac_cv_have_qt, 1574[#try to guess Qt locations 1575 1576qt_incdirs="" 1577for dir in $kde_qt_dirs; do 1578 qt_incdirs="$qt_incdirs $dir/include $dir" 1579done 1580qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes" 1581if test ! "$ac_qt_includes" = "NO"; then 1582 qt_incdirs="$ac_qt_includes $qt_incdirs" 1583fi 1584 1585if test "$kde_qtver" != "1"; then 1586 kde_qt_header=qstyle.h 1587else 1588 kde_qt_header=qglobal.h 1589fi 1590 1591AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) 1592ac_qt_includes="$qt_incdir" 1593 1594qt_libdirs="" 1595for dir in $kde_qt_dirs; do 1596 qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir" 1597done 1598qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries" 1599if test ! "$ac_qt_libraries" = "NO"; then 1600 qt_libdir=$ac_qt_libraries 1601else 1602 qt_libdirs="$ac_qt_libraries $qt_libdirs" 1603 # if the Qt was given, the chance is too big that libqt.* doesn't exist 1604 qt_libdir=NONE 1605 for dir in $qt_libdirs; do 1606 try="ls -1 $dir/${LIBQT_GLOB}" 1607 if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi 1608 done 1609fi 1610 1611ac_qt_libraries="$qt_libdir" 1612 1613AC_LANG_SAVE 1614AC_LANG_CPLUSPLUS 1615 1616ac_cxxflags_safe="$CXXFLAGS" 1617ac_ldflags_safe="$LDFLAGS" 1618ac_libs_safe="$LIBS" 1619 1620CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" 1621LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS" 1622LIBS="$LIBS $LIBQT $KDE_MT_LIBS" 1623 1624KDE_PRINT_QT_PROGRAM 1625 1626if AC_TRY_EVAL(ac_link) && test -s conftest; then 1627 rm -f conftest* 1628else 1629 echo "configure: failed program was:" >&AC_FD_CC 1630 cat conftest.$ac_ext >&AC_FD_CC 1631 ac_qt_libraries="NO" 1632fi 1633rm -f conftest* 1634CXXFLAGS="$ac_cxxflags_safe" 1635LDFLAGS="$ac_ldflags_safe" 1636LIBS="$ac_libs_safe" 1637 1638AC_LANG_RESTORE 1639if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then 1640 ac_cv_have_qt="have_qt=no" 1641 ac_qt_notfound="" 1642 missing_qt_mt="" 1643 if test "$ac_qt_includes" = NO; then 1644 if test "$ac_qt_libraries" = NO; then 1645 ac_qt_notfound="(headers and libraries)"; 1646 else 1647 ac_qt_notfound="(headers)"; 1648 fi 1649 else 1650 if test "x$kde_use_qt_mt" = "xyes"; then 1651 missing_qt_mt=" 1652Make sure that you have compiled Qt with thread support!" 1653 ac_qt_notfound="(library $qtlib-mt)"; 1654 else 1655 ac_qt_notfound="(library $qtlib)"; 1656 fi 1657 fi 1658 1659 AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation! 1660For more details about this problem, look at the end of config.log.$missing_qt_mt]) 1661else 1662 have_qt="yes" 1663fi 1664]) 1665 1666eval "$ac_cv_have_qt" 1667 1668if test "$have_qt" != yes; then 1669 AC_MSG_RESULT([$have_qt]); 1670else 1671 ac_cv_have_qt="have_qt=yes \ 1672 ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries" 1673 AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT]) 1674 1675 qt_libraries="$ac_qt_libraries" 1676 qt_includes="$ac_qt_includes" 1677fi 1678 1679if test ! "$kde_qt_libs_given" = "yes"; then 1680KDE_CHECK_QT_DIRECT(qt_libraries= ,[]) 1681fi 1682 1683AC_SUBST(qt_libraries) 1684AC_SUBST(qt_includes) 1685 1686if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then 1687 QT_INCLUDES="" 1688else 1689 QT_INCLUDES="-I$qt_includes" 1690 all_includes="$QT_INCLUDES $all_includes" 1691fi 1692 1693if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then 1694 QT_LDFLAGS="" 1695else 1696 QT_LDFLAGS="-L$qt_libraries" 1697 all_libraries="$all_libraries $QT_LDFLAGS" 1698fi 1699test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS" 1700 1701AC_SUBST(QT_INCLUDES) 1702AC_SUBST(QT_LDFLAGS) 1703AC_PATH_QT_MOC_UIC 1704 1705KDE_CHECK_QT_JPEG 1706 1707if test "x$kde_use_qt_emb" != "xyes"; then 1708LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)' 1709else 1710LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)' 1711fi 1712test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS" 1713 1714AC_SUBST(LIB_QT) 1715AC_SUBST(LIB_QPE) 1716 1717AC_SUBST(kde_qtver) 1718]) 1719 1720AC_DEFUN(AC_PATH_QT, 1721[ 1722AC_PATH_QT_1_3 1723]) 1724 1725AC_DEFUN(KDE_CHECK_UIC_PLUGINS, 1726[ 1727AC_REQUIRE([AC_PATH_QT_MOC_UIC]) 1728 1729if test x$ac_uic_supports_libpath = xyes; then 1730 1731AC_MSG_CHECKING([if UIC has KDE plugins available]) 1732AC_CACHE_VAL(kde_cv_uic_plugins, 1733[ 1734cat > actest.ui << EOF 1735<!DOCTYPE UI><UI version="3.0" stdsetdef="1"> 1736<class>NewConnectionDialog</class> 1737<widget class="QDialog"> 1738 <widget class="KLineEdit"> 1739 <property name="name"> 1740 <cstring>testInput</cstring> 1741 </property> 1742 </widget> 1743</widget> 1744</UI> 1745EOF 1746 1747 1748 1749kde_cv_uic_plugins=no 1750kde_line="$UIC_PATH -L $kde_widgetdir" 1751if test x$ac_uic_supports_nounload = xyes; then 1752 kde_line="$kde_line -nounload" 1753fi 1754kde_line="$kde_line -impl actest.h actest.ui > actest.cpp" 1755if AC_TRY_EVAL(kde_line); then 1756 if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then 1757 kde_cv_uic_plugins=yes 1758 fi 1759fi 1760rm -f actest.ui actest.cpp 1761]) 1762 1763if test "$kde_cv_uic_plugins" = yes; then 1764 AC_MSG_RESULT([yes]) 1765else 1766 AC_MSG_ERROR([not found - you need to install kdelibs first.]) 1767fi 1768fi 1769]) 1770 1771AC_DEFUN(KDE_CHECK_FINAL, 1772[ 1773 AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (experimental - needs lots of memory)], 1774 kde_use_final=$enableval, kde_use_final=no) 1775 1776 KDE_COMPILER_REPO 1777 if test "x$kde_use_final" = "xyes"; then 1778 KDE_USE_FINAL_TRUE="" 1779 KDE_USE_FINAL_FALSE="#" 1780 else 1781 KDE_USE_FINAL_TRUE="#" 1782 KDE_USE_FINAL_FALSE="" 1783 fi 1784 AC_SUBST(KDE_USE_FINAL_TRUE) 1785 AC_SUBST(KDE_USE_FINAL_FALSE) 1786 1787 AC_ARG_ENABLE(closure, [ --disable-closure don't delay template instantiation], 1788 kde_use_closure=$enableval, kde_use_closure=yes) 1789 1790 if test "x$kde_use_closure" = "xyes"; then 1791 KDE_USE_CLOSURE_TRUE="" 1792 KDE_USE_CLOSURE_FALSE="#" 1793# CXXFLAGS="$CXXFLAGS $REPO" 1794 else 1795 KDE_USE_CLOSURE_TRUE="#" 1796 KDE_USE_CLOSURE_FALSE="" 1797 fi 1798 AC_SUBST(KDE_USE_CLOSURE_TRUE) 1799 AC_SUBST(KDE_USE_CLOSURE_FALSE) 1800]) 1801 1802dnl ------------------------------------------------------------------------ 1803dnl Now, the same with KDE 1804dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed) 1805dnl and $(kde_includes) will be the kdehdrlocation (if needed) 1806dnl ------------------------------------------------------------------------ 1807dnl 1808AC_DEFUN(AC_BASE_PATH_KDE, 1809[ 1810AC_PREREQ([2.13]) 1811AC_REQUIRE([AC_PATH_QT])dnl 1812AC_REQUIRE([KDE_CHECK_LIB64]) 1813 1814AC_CHECK_RPATH 1815AC_MSG_CHECKING([for KDE]) 1816 1817if test "${prefix}" != NONE; then 1818 kde_includes=${prefix}/include 1819 ac_kde_includes=$prefix/include 1820 1821 if test "${exec_prefix}" != NONE; then 1822 kde_libraries=${libdir} 1823 ac_kde_libraries=$libdir 1824 if test "$ac_kde_libraries" = '${exec_prefix}/lib'${kdelibsuff}; then 1825 ac_kde_libraries=$exec_prefix/lib${kdelibsuff} 1826 fi 1827 else 1828 kde_libraries=${prefix}/lib${kdelibsuff} 1829 ac_kde_libraries=$prefix/lib${kdelibsuff} 1830 fi 1831else 1832 ac_kde_includes= 1833 ac_kde_libraries= 1834 kde_libraries="" 1835 kde_includes="" 1836fi 1837 1838AC_CACHE_VAL(ac_cv_have_kde, 1839[#try to guess kde locations 1840 1841if test "$kde_qtver" = 1; then 1842 kde_check_header="ksock.h" 1843 kde_check_lib="libkdecore.la" 1844else 1845 kde_check_header="ksharedptr.h" 1846 kde_check_lib="libkio.la" 1847fi 1848 1849if test -z "$1"; then 1850 1851kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes" 1852test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs" 1853kde_incdirs="$ac_kde_includes $kde_incdirs" 1854AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir) 1855ac_kde_includes="$kde_incdir" 1856 1857if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then 1858 AC_MSG_ERROR([ 1859in the prefix, you've chosen, are no KDE headers installed. This will fail. 1860So, check this please and use another prefix!]) 1861fi 1862 1863kde_libdirs="/usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}" 1864test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs" 1865kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs" 1866AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir) 1867ac_kde_libraries="$kde_libdir" 1868 1869kde_widgetdir=NO 1870dnl this might be somewhere else 1871AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir) 1872 1873if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then 1874AC_MSG_ERROR([ 1875in the prefix, you've chosen, are no KDE libraries installed. This will fail. 1876So, check this please and use another prefix!]) 1877fi 1878 1879if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then 1880AC_MSG_ERROR([ 1881I can't find the designer plugins. These are required and should have been installed 1882by kdelibs]) 1883fi 1884 1885if test -n "$kde_widgetdir"; then 1886 kde_widgetdir="$kde_widgetdir/kde3/plugins/designer" 1887fi 1888 1889 1890if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then 1891 ac_cv_have_kde="have_kde=no" 1892else 1893 ac_cv_have_kde="have_kde=yes \ 1894 ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries" 1895fi 1896 1897else dnl test -z $1 1898 1899 ac_cv_have_kde="have_kde=no" 1900 1901fi 1902])dnl 1903 1904eval "$ac_cv_have_kde" 1905 1906if test "$have_kde" != "yes"; then 1907 if test "${prefix}" = NONE; then 1908 ac_kde_prefix="$ac_default_prefix" 1909 else 1910 ac_kde_prefix="$prefix" 1911 fi 1912 if test "$exec_prefix" = NONE; then 1913 ac_kde_exec_prefix="$ac_kde_prefix" 1914 AC_MSG_RESULT([will be installed in $ac_kde_prefix]) 1915 else 1916 ac_kde_exec_prefix="$exec_prefix" 1917 AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix]) 1918 fi 1919 1920 kde_libraries="${libdir}" 1921 kde_includes=${ac_kde_prefix}/include 1922 1923else 1924 ac_cv_have_kde="have_kde=yes \ 1925 ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries" 1926 AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes]) 1927 1928 kde_libraries="$ac_kde_libraries" 1929 kde_includes="$ac_kde_includes" 1930fi 1931AC_SUBST(kde_libraries) 1932AC_SUBST(kde_includes) 1933 1934if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then 1935 KDE_INCLUDES="" 1936else 1937 KDE_INCLUDES="-I$kde_includes" 1938 all_includes="$KDE_INCLUDES $all_includes" 1939fi 1940 1941KDE_LDFLAGS="-L$kde_libraries" 1942if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 1943 all_libraries="$all_libraries $KDE_LDFLAGS" 1944fi 1945 1946AC_SUBST(KDE_LDFLAGS) 1947AC_SUBST(KDE_INCLUDES) 1948 1949AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) 1950 1951all_libraries="$all_libraries $USER_LDFLAGS" 1952all_includes="$all_includes $USER_INCLUDES" 1953AC_SUBST(all_includes) 1954AC_SUBST(all_libraries) 1955 1956if test -z "$1"; then 1957KDE_CHECK_UIC_PLUGINS 1958fi 1959 1960ac_kde_libraries="$kde_libdir" 1961 1962AC_SUBST(AUTODIRS) 1963 1964 1965]) 1966 1967AC_DEFUN(KDE_CHECK_EXTRA_LIBS, 1968[ 1969AC_MSG_CHECKING(for extra includes) 1970AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR 1971 adds non standard include paths], 1972 kde_use_extra_includes="$withval", 1973 kde_use_extra_includes=NONE 1974) 1975kde_extra_includes= 1976if test -n "$kde_use_extra_includes" && \ 1977 test "$kde_use_extra_includes" != "NONE"; then 1978 1979 ac_save_ifs=$IFS 1980 IFS=':' 1981 for dir in $kde_use_extra_includes; do 1982 kde_extra_includes="$kde_extra_includes $dir" 1983 USER_INCLUDES="$USER_INCLUDES -I$dir" 1984 done 1985 IFS=$ac_save_ifs 1986 kde_use_extra_includes="added" 1987else 1988 kde_use_extra_includes="no" 1989fi 1990AC_SUBST(USER_INCLUDES) 1991 1992AC_MSG_RESULT($kde_use_extra_includes) 1993 1994kde_extra_libs= 1995AC_MSG_CHECKING(for extra libs) 1996AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths], 1997 kde_use_extra_libs=$withval, 1998 kde_use_extra_libs=NONE 1999) 2000if test -n "$kde_use_extra_libs" && \ 2001 test "$kde_use_extra_libs" != "NONE"; then 2002 2003 ac_save_ifs=$IFS 2004 IFS=':' 2005 for dir in $kde_use_extra_libs; do 2006 kde_extra_libs="$kde_extra_libs $dir" 2007 KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir" 2008 USER_LDFLAGS="$USER_LDFLAGS -L$dir" 2009 done 2010 IFS=$ac_save_ifs 2011 kde_use_extra_libs="added" 2012else 2013 kde_use_extra_libs="no" 2014fi 2015 2016AC_SUBST(USER_LDFLAGS) 2017 2018AC_MSG_RESULT($kde_use_extra_libs) 2019 2020]) 2021 2022AC_DEFUN(KDE_1_CHECK_PATH_HEADERS, 2023[ 2024 AC_MSG_CHECKING([for KDE headers installed]) 2025 AC_LANG_SAVE 2026 AC_LANG_CPLUSPLUS 2027cat > conftest.$ac_ext <<EOF 2028#ifdef STDC_HEADERS 2029# include <stdlib.h> 2030#endif 2031#include <stdio.h> 2032#include "confdefs.h" 2033#include <kapp.h> 2034 2035int main() { 2036 printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data()); 2037 printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data()); 2038 printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data()); 2039 printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data()); 2040 printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data()); 2041 printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data()); 2042 printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data()); 2043 printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data()); 2044 printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data()); 2045 printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data()); 2046 printf("kde_wallpaperdir=\\"%s\\"\n", 2047 KApplication::kde_wallpaperdir().data()); 2048 printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data()); 2049 printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data()); 2050 printf("kde_servicesdir=\\"/tmp/dummy\\"\n"); 2051 printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n"); 2052 printf("kde_moduledir=\\"/tmp/dummy\\"\n"); 2053 printf("kde_styledir=\\"/tmp/dummy\\"\n"); 2054 printf("kde_widgetdir=\\"/tmp/dummy\\"\n"); 2055 return 0; 2056 } 2057EOF 2058 2059 ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext' 2060 if AC_TRY_EVAL(ac_compile); then 2061 AC_MSG_RESULT(yes) 2062 else 2063 AC_MSG_ERROR([your system is not able to compile a small KDE application! 2064Check, if you installed the KDE header files correctly. 2065For more details about this problem, look at the end of config.log.]) 2066 fi 2067 2068 AC_LANG_RESTORE 2069]) 2070 2071AC_DEFUN(KDE_CHECK_KDEQTADDON, 2072[ 2073AC_MSG_CHECKING(for kde-qt-addon) 2074AC_CACHE_VAL(kde_cv_have_kdeqtaddon, 2075[ 2076 kde_ldflags_safe="$LDFLAGS" 2077 kde_libs_safe="$LIBS" 2078 kde_cxxflags_safe="$CXXFLAGS" 2079 2080 LIBS="-lkde-qt-addon $LIBQT $LIBS" 2081 CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes" 2082 LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS" 2083 2084 AC_TRY_LINK([ 2085 #include <qdom.h> 2086 ], 2087 [ 2088 QDomDocument doc; 2089 ], 2090 kde_cv_have_kdeqtaddon=yes, 2091 kde_cv_have_kdeqtaddon=no 2092 ) 2093 2094 LDFLAGS=$kde_ldflags_safe 2095 LIBS=$kde_libs_safe 2096 CXXFLAGS=$kde_cxxflags_safe 2097]) 2098 2099AC_MSG_RESULT($kde_cv_have_kdeqtaddon) 2100 2101if test "$kde_cv_have_kdeqtaddon" = "no"; then 2102 AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first. 2103It is a separate package (and CVS module) named kde-qt-addon.]) 2104fi 2105]) 2106 2107AC_DEFUN(KDE_CHECK_KIMGIO, 2108[ 2109 AC_REQUIRE([AC_BASE_PATH_KDE]) 2110 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) 2111 AC_REQUIRE([AC_FIND_TIFF]) 2112 AC_REQUIRE([AC_FIND_JPEG]) 2113 AC_REQUIRE([AC_FIND_PNG]) 2114 AC_REQUIRE([KDE_CREATE_LIBS_ALIASES]) 2115 2116 if test "$1" = "existance"; then 2117 AC_LANG_SAVE 2118 AC_LANG_CPLUSPLUS 2119 kde_save_LIBS="$LIBS" 2120 LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm" 2121 AC_CHECK_LIB(kimgio, kimgioRegister, [ 2122 LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no) 2123 LIBS="$kde_save_LIBS" 2124 AC_LANG_RESTORE 2125 else 2126 LIBKIMGIO_EXISTS=yes 2127 fi 2128 2129 if test "$LIBKIMGIO_EXISTS" = "yes"; then 2130 LIB_KIMGIO='-lkimgio' 2131 else 2132 LIB_KIMGIO='' 2133 fi 2134 AC_SUBST(LIB_KIMGIO) 2135]) 2136 2137AC_DEFUN(KDE_CREATE_LIBS_ALIASES, 2138[ 2139 AC_REQUIRE([KDE_MISC_TESTS]) 2140 AC_REQUIRE([KDE_CHECK_LIBDL]) 2141 AC_REQUIRE([K_PATH_X]) 2142 2143if test $kde_qtver = 3; then 2144 AC_SUBST(LIB_KDECORE, "-lkdecore") 2145 AC_SUBST(LIB_KDEUI, "-lkdeui") 2146 AC_SUBST(LIB_KIO, "-lkio") 2147 AC_SUBST(LIB_SMB, "-lsmb") 2148 AC_SUBST(LIB_KAB, "-lkab") 2149 AC_SUBST(LIB_KABC, "-lkabc") 2150 AC_SUBST(LIB_KHTML, "-lkhtml") 2151 AC_SUBST(LIB_KSPELL, "-lkspell") 2152 AC_SUBST(LIB_KPARTS, "-lkparts") 2153 AC_SUBST(LIB_KDEPRINT, "-lkdeprint") 2154# these are for backward compatibility 2155 AC_SUBST(LIB_KSYCOCA, "-lkio") 2156 AC_SUBST(LIB_KFILE, "-lkio") 2157elif test $kde_qtver = 2; then 2158 AC_SUBST(LIB_KDECORE, "-lkdecore") 2159 AC_SUBST(LIB_KDEUI, "-lkdeui") 2160 AC_SUBST(LIB_KIO, "-lkio") 2161 AC_SUBST(LIB_KSYCOCA, "-lksycoca") 2162 AC_SUBST(LIB_SMB, "-lsmb") 2163 AC_SUBST(LIB_KFILE, "-lkfile") 2164 AC_SUBST(LIB_KAB, "-lkab") 2165 AC_SUBST(LIB_KHTML, "-lkhtml") 2166 AC_SUBST(LIB_KSPELL, "-lkspell") 2167 AC_SUBST(LIB_KPARTS, "-lkparts") 2168 AC_SUBST(LIB_KDEPRINT, "-lkdeprint") 2169else 2170 AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)") 2171 AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)") 2172 AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)") 2173 AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)") 2174 AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)") 2175fi 2176]) 2177 2178AC_DEFUN(AC_PATH_KDE, 2179[ 2180 AC_BASE_PATH_KDE 2181 AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install], 2182 [ 2183 if test "$enableval" = "no"; 2184 then ac_use_path_checking="default" 2185 else ac_use_path_checking="" 2186 fi 2187 ], 2188 [ 2189 if test "$kde_qtver" = 1; 2190 then ac_use_path_checking="" 2191 else ac_use_path_checking="default" 2192 fi 2193 ] 2194 ) 2195 2196 AC_CREATE_KFSSTND($ac_use_path_checking) 2197 2198 AC_SUBST_KFSSTND 2199 KDE_CREATE_LIBS_ALIASES 2200]) 2201 2202dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found]) 2203AC_DEFUN(KDE_CHECK_FUNC_EXT, 2204[ 2205AC_MSG_CHECKING(for $1) 2206AC_CACHE_VAL(kde_cv_func_$1, 2207[ 2208AC_LANG_SAVE 2209AC_LANG_CPLUSPLUS 2210save_CXXFLAGS="$CXXFLAGS" 2211kde_safe_LIBS="$LIBS" 2212LIBS="$LIBS $X_EXTRA_LIBS" 2213if test "$GXX" = "yes"; then 2214 CXXFLAGS="$CXXFLAGS -pedantic-errors" 2215fi 2216AC_TRY_COMPILE([ 2217$2 2218], 2219[ 2220$3 2221], 2222kde_cv_func_$1=yes, 2223kde_cv_func_$1=no) 2224CXXFLAGS="$save_CXXFLAGS" 2225LIBS=$kde_safe_LIBS 2226AC_LANG_RESTORE 2227]) 2228 2229AC_MSG_RESULT($kde_cv_func_$1) 2230 2231AC_MSG_CHECKING([if $1 needs custom prototype]) 2232AC_CACHE_VAL(kde_cv_proto_$1, 2233[ 2234if test "x$kde_cv_func_$1" = xyes; then 2235 kde_cv_proto_$1=no 2236else 2237 case "$1" in 2238 setenv|unsetenv|usleep|getdomainname|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat) 2239 kde_cv_proto_$1="yes - in libkdefakes" 2240 ;; 2241 *) 2242 kde_cv_proto_$1=unknown 2243 ;; 2244 esac 2245fi 2246 2247if test "x$kde_cv_proto_$1" = xunknown; then 2248 2249AC_LANG_SAVE 2250AC_LANG_CPLUSPLUS 2251 kde_safe_libs=$LIBS 2252 LIBS="$LIBS $X_EXTRA_LIBS" 2253 AC_TRY_LINK([ 2254$2 2255 2256extern "C" $4; 2257], 2258[ 2259$3 2260], 2261[ kde_cv_func_$1=yes 2262 kde_cv_proto_$1=yes ], 2263 [kde_cv_proto_$1="$1 unavailable"] 2264) 2265LIBS=$kde_safe_libs 2266AC_LANG_RESTORE 2267fi 2268]) 2269AC_MSG_RESULT($kde_cv_proto_$1) 2270 2271if test "x$kde_cv_func_$1" = xyes; then 2272 AC_DEFINE(HAVE_$5, 1, [Define if you have $1]) 2273 $6 2274fi 2275if test "x$kde_cv_proto_$1" = xno; then 2276 AC_DEFINE(HAVE_$5_PROTO, 1, 2277 [Define if you have the $1 prototype]) 2278fi 2279 2280AH_VERBATIM([_HAVE_$5_PROTO], 2281[ 2282#if !defined(HAVE_$5_PROTO) 2283#ifdef __cplusplus 2284extern "C" 2285#endif 2286$4; 2287#endif 2288]) 2289]) 2290 2291AC_DEFUN(AC_CHECK_SETENV, 2292[ 2293 KDE_CHECK_FUNC_EXT(setenv, [ 2294#include <stdlib.h> 2295], 2296 [setenv("VAR", "VALUE", 1);], 2297 [int setenv (const char *, const char *, int)], 2298 [SETENV]) 2299]) 2300 2301AC_DEFUN(AC_CHECK_UNSETENV, 2302[ 2303 KDE_CHECK_FUNC_EXT(unsetenv, [ 2304#include <stdlib.h> 2305], 2306 [unsetenv("VAR");], 2307 [void unsetenv (const char *)], 2308 [UNSETENV]) 2309]) 2310 2311AC_DEFUN(AC_CHECK_GETDOMAINNAME, 2312[ 2313 KDE_CHECK_FUNC_EXT(getdomainname, [ 2314#include <stdlib.h> 2315#include <unistd.h> 2316], 2317 [ 2318char buffer[200]; 2319getdomainname(buffer, 200); 2320], 2321 [int getdomainname (char *, unsigned int)], 2322 [GETDOMAINNAME]) 2323]) 2324 2325AC_DEFUN(AC_CHECK_GETHOSTNAME, 2326[ 2327 KDE_CHECK_FUNC_EXT(gethostname, [ 2328#include <stdlib.h> 2329#include <unistd.h> 2330], 2331 [ 2332char buffer[200]; 2333gethostname(buffer, 200); 2334], 2335 [int gethostname (char *, unsigned int)], 2336 [GETHOSTNAME]) 2337]) 2338 2339AC_DEFUN(AC_CHECK_USLEEP, 2340[ 2341 KDE_CHECK_FUNC_EXT(usleep, [ 2342#include <unistd.h> 2343], 2344 [ 2345usleep(200); 2346], 2347 [int usleep (unsigned int)], 2348 [USLEEP]) 2349]) 2350 2351 2352AC_DEFUN(AC_CHECK_RANDOM, 2353[ 2354 KDE_CHECK_FUNC_EXT(random, [ 2355#include <stdlib.h> 2356], 2357 [ 2358random(); 2359], 2360 [long int random(void)], 2361 [RANDOM]) 2362 2363 KDE_CHECK_FUNC_EXT(srandom, [ 2364#include <stdlib.h> 2365], 2366 [ 2367srandom(27); 2368], 2369 [void srandom(unsigned int)], 2370 [SRANDOM]) 2371 2372]) 2373 2374AC_DEFUN(AC_CHECK_INITGROUPS, 2375[ 2376 KDE_CHECK_FUNC_EXT(initgroups, [ 2377#include <sys/types.h> 2378#include <unistd.h> 2379#include <grp.h> 2380], 2381 [ 2382char buffer[200]; 2383initgroups(buffer, 27); 2384], 2385 [int initgroups(const char *, gid_t)], 2386 [INITGROUPS]) 2387]) 2388 2389AC_DEFUN(AC_CHECK_MKSTEMP, 2390[ 2391 KDE_CHECK_FUNC_EXT(mkstemp, [ 2392#include <stdlib.h> 2393], 2394 [ 2395mkstemp("/tmp/aaaXXXXXX"); 2396], 2397 [int mkstemp(char *)], 2398 [MKSTEMP]) 2399]) 2400 2401AC_DEFUN(AC_CHECK_MKSTEMPS, 2402[ 2403 KDE_CHECK_FUNC_EXT(mkstemps, [ 2404#include <stdlib.h> 2405#include <unistd.h> 2406], 2407 [ 2408mkstemps("/tmp/aaaXXXXXX", 6); 2409], 2410 [int mkstemps(char *, int)], 2411 [MKSTEMPS]) 2412]) 2413 2414AC_DEFUN(AC_CHECK_RES_INIT, 2415[ 2416 AC_MSG_CHECKING([if res_init needs -lresolv]) 2417 kde_libs_safe="$LIBS" 2418 LIBS="$LIBS $X_EXTRA_LIBS -lresolv" 2419 AC_TRY_LINK( 2420 [ 2421#include <sys/types.h> 2422#include <netinet/in.h> 2423#include <arpa/nameser.h> 2424#include <resolv.h> 2425 ], 2426 [ 2427 res_init(); 2428 ], 2429 [ 2430 LIBRESOLV="-lresolv" 2431 AC_MSG_RESULT(yes) 2432 AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function]) 2433 ], 2434 [ AC_MSG_RESULT(no) ] 2435 ) 2436 LIBS=$kde_libs_safe 2437 AC_SUBST(LIBRESOLV) 2438 2439 AC_MSG_CHECKING([if res_init is available]) 2440 AC_TRY_COMPILE( 2441 [ 2442#include <sys/types.h> 2443#include <netinet/in.h> 2444#include <arpa/nameser.h> 2445#include <resolv.h> 2446 ], 2447 [ 2448 res_init(); 2449 ], 2450 [ 2451 AC_MSG_RESULT(yes) 2452 AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function]) 2453 ], 2454 [ AC_MSG_RESULT(no) ] 2455 ) 2456]) 2457 2458AC_DEFUN(AC_CHECK_STRLCPY, 2459[ 2460 KDE_CHECK_FUNC_EXT(strlcpy, [ 2461#include <string.h> 2462], 2463[ char buf[20]; 2464 strlcpy(buf, "KDE function test", sizeof(buf)); 2465], 2466 [unsigned long strlcpy(char*, const char*, unsigned long)], 2467 [STRLCPY]) 2468]) 2469 2470AC_DEFUN(AC_CHECK_STRLCAT, 2471[ 2472 KDE_CHECK_FUNC_EXT(strlcat, [ 2473#include <string.h> 2474], 2475[ char buf[20]; 2476 buf[0]='\0'; 2477 strlcat(buf, "KDE function test", sizeof(buf)); 2478], 2479 [unsigned long strlcat(char*, const char*, unsigned long)], 2480 [STRLCAT]) 2481]) 2482 2483AC_DEFUN(AC_FIND_GIF, 2484 [AC_MSG_CHECKING([for giflib]) 2485AC_CACHE_VAL(ac_cv_lib_gif, 2486[ac_save_LIBS="$LIBS" 2487if test "x$kde_use_qt_emb" != "xyes"; then 2488LIBS="$all_libraries -lgif -lX11 $LIBSOCKET" 2489else 2490LIBS="$all_libraries -lgif" 2491fi 2492AC_TRY_LINK(dnl 2493[ 2494#ifdef __cplusplus 2495extern "C" { 2496#endif 2497int GifLastError(void); 2498#ifdef __cplusplus 2499} 2500#endif 2501/* We use char because int might match the return type of a gcc2 2502 builtin and then its argument prototype would still apply. */ 2503], 2504 [return GifLastError();], 2505 eval "ac_cv_lib_gif=yes", 2506 eval "ac_cv_lib_gif=no") 2507LIBS="$ac_save_LIBS" 2508])dnl 2509if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then 2510 AC_MSG_RESULT(yes) 2511 AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif]) 2512else 2513 AC_MSG_ERROR(You need giflib30. Please install the kdesupport package) 2514fi 2515]) 2516 2517AC_DEFUN(KDE_FIND_JPEG_HELPER, 2518[ 2519AC_MSG_CHECKING([for libjpeg$2]) 2520AC_CACHE_VAL(ac_cv_lib_jpeg_$1, 2521[ 2522AC_LANG_C 2523ac_save_LIBS="$LIBS" 2524LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm" 2525ac_save_CFLAGS="$CFLAGS" 2526CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" 2527AC_TRY_LINK( 2528[/* Override any gcc2 internal prototype to avoid an error. */ 2529struct jpeg_decompress_struct; 2530typedef struct jpeg_decompress_struct * j_decompress_ptr; 2531typedef int size_t; 2532#ifdef __cplusplus 2533extern "C" { 2534#endif 2535 void jpeg_CreateDecompress(j_decompress_ptr cinfo, 2536 int version, size_t structsize); 2537#ifdef __cplusplus 2538} 2539#endif 2540/* We use char because int might match the return type of a gcc2 2541 builtin and then its argument prototype would still apply. */ 2542], 2543 [jpeg_CreateDecompress(0L, 0, 0);], 2544 eval "ac_cv_lib_jpeg_$1=-ljpeg$2", 2545 eval "ac_cv_lib_jpeg_$1=no") 2546LIBS="$ac_save_LIBS" 2547CFLAGS="$ac_save_CFLAGS" 2548]) 2549 2550if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then 2551 LIBJPEG="$ac_cv_lib_jpeg_$1" 2552 AC_MSG_RESULT($ac_cv_lib_jpeg_$1) 2553else 2554 AC_MSG_RESULT(no) 2555 $3 2556fi 2557 2558]) 2559 2560AC_DEFUN(AC_FIND_JPEG, 2561[ 2562dnl first look for libraries 2563KDE_FIND_JPEG_HELPER(6b, 6b, 2564 KDE_FIND_JPEG_HELPER(normal, [], 2565 [ 2566 LIBJPEG= 2567 ] 2568 ) 2569) 2570 2571dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h 2572dnl requires system dependent includes loaded before it) 2573jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes" 2574AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir) 2575test "x$jpeg_incdir" = xNO && jpeg_incdir= 2576 2577dnl if headers _and_ libraries are missing, this is no error, and we 2578dnl continue with a warning (the user will get no jpeg support in khtml) 2579dnl if only one is missing, it means a configuration error, but we still 2580dnl only warn 2581if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then 2582 AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg]) 2583else 2584 if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then 2585 AC_MSG_WARN([ 2586There is an installation error in jpeg support. You seem to have only one 2587of either the headers _or_ the libraries installed. You may need to either 2588provide correct --with-extra-... options, or the development package of 2589libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/ 2590Disabling JPEG support. 2591]) 2592 else 2593 AC_MSG_WARN([libjpeg not found. disable JPEG support.]) 2594 fi 2595 jpeg_incdir= 2596 LIBJPEG= 2597fi 2598 2599AC_SUBST(LIBJPEG) 2600AH_VERBATIM(_AC_CHECK_JPEG, 2601[/* 2602 * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system 2603 * headers and I'm too lazy to write a configure test as long as only 2604 * unixware is related 2605 */ 2606#ifdef _UNIXWARE 2607#define HAVE_BOOLEAN 2608#endif 2609]) 2610]) 2611 2612AC_DEFUN(KDE_CHECK_QT_JPEG, 2613[ 2614AC_MSG_CHECKING([if Qt needs $LIBJPEG]) 2615AC_CACHE_VAL(kde_cv_qt_jpeg, 2616[ 2617AC_LANG_SAVE 2618AC_LANG_CPLUSPLUS 2619ac_save_LIBS="$LIBS" 2620LIBS="$all_libraries $USER_LDFLAGS $LIBQT" 2621LIBS=`echo $LIBS | sed "s/$LIBJPEG//"` 2622ac_save_CXXFLAGS="$CXXFLAGS" 2623CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" 2624AC_TRY_LINK( 2625[#include <qapplication.h>], 2626 [ 2627 int argc; 2628 char** argv; 2629 QApplication app(argc, argv);], 2630 eval "kde_cv_qt_jpeg=no", 2631 eval "kde_cv_qt_jpeg=yes") 2632LIBS="$ac_save_LIBS" 2633CXXFLAGS="$ac_save_CXXFLAGS" 2634AC_LANG_RESTORE 2635]) 2636 2637if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then 2638 AC_MSG_RESULT(yes) 2639 LIBJPEG_QT='$(LIBJPEG)' 2640else 2641 AC_MSG_RESULT(no) 2642 LIBJPEG_QT= 2643fi 2644 2645]) 2646 2647AC_DEFUN(AC_FIND_ZLIB, 2648[ 2649AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) 2650AC_MSG_CHECKING([for libz]) 2651AC_CACHE_VAL(ac_cv_lib_z, 2652[ 2653AC_LANG_C 2654kde_save_LIBS="$LIBS" 2655LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET" 2656kde_save_CFLAGS="$CFLAGS" 2657CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" 2658AC_TRY_LINK(dnl 2659[ 2660#include<zlib.h> 2661], 2662 [return (zlibVersion() == ZLIB_VERSION); ], 2663 eval "ac_cv_lib_z='-lz'", 2664 eval "ac_cv_lib_z=no") 2665LIBS="$kde_save_LIBS" 2666CFLAGS="$kde_save_CFLAGS" 2667])dnl 2668if test ! "$ac_cv_lib_z" = no; then 2669 AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz]) 2670 LIBZ="$ac_cv_lib_z" 2671 AC_SUBST(LIBZ) 2672 AC_MSG_RESULT($ac_cv_lib_z) 2673else 2674 AC_MSG_ERROR(not found. Check your installation and look into config.log) 2675 LIBZ="" 2676 AC_SUBST(LIBZ) 2677fi 2678]) 2679 2680AC_DEFUN(KDE_TRY_TIFFLIB, 2681[ 2682AC_MSG_CHECKING([for libtiff $1]) 2683 2684AC_CACHE_VAL(kde_cv_libtiff_$1, 2685[ 2686AC_LANG_SAVE 2687AC_LANG_CPLUSPLUS 2688kde_save_LIBS="$LIBS" 2689if test "x$kde_use_qt_emb" != "xyes"; then 2690LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm" 2691else 2692LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm" 2693fi 2694kde_save_CXXFLAGS="$CXXFLAGS" 2695CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" 2696 2697AC_TRY_LINK(dnl 2698[ 2699#include<tiffio.h> 2700], 2701 [return (TIFFOpen( "", "r") == 0); ], 2702[ 2703 kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ" 2704], [ 2705 kde_cv_libtiff_$1=no 2706]) 2707 2708LIBS="$kde_save_LIBS" 2709CXXFLAGS="$kde_save_CXXFLAGS" 2710AC_LANG_RESTORE 2711]) 2712 2713if test "$kde_cv_libtiff_$1" = "no"; then 2714 AC_MSG_RESULT(no) 2715 LIBTIFF="" 2716 $3 2717else 2718 LIBTIFF="$kde_cv_libtiff_$1" 2719 AC_MSG_RESULT(yes) 2720 AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff]) 2721 $2 2722fi 2723 2724]) 2725 2726AC_DEFUN(AC_FIND_TIFF, 2727[ 2728AC_REQUIRE([K_PATH_X]) 2729AC_REQUIRE([AC_FIND_ZLIB]) 2730AC_REQUIRE([AC_FIND_JPEG]) 2731AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) 2732 2733KDE_TRY_TIFFLIB(tiff, [], 2734 KDE_TRY_TIFFLIB(tiff34)) 2735 2736AC_SUBST(LIBTIFF) 2737]) 2738 2739 2740AC_DEFUN(AC_FIND_PNG, 2741[ 2742AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) 2743AC_REQUIRE([AC_FIND_ZLIB]) 2744AC_MSG_CHECKING([for libpng]) 2745AC_CACHE_VAL(ac_cv_lib_png, 2746[ 2747kde_save_LIBS="$LIBS" 2748if test "x$kde_use_qt_emb" != "xyes"; then 2749LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET" 2750else 2751LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm" 2752fi 2753kde_save_CFLAGS="$CFLAGS" 2754CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" 2755AC_LANG_C 2756AC_TRY_LINK(dnl 2757 [ 2758 #include<png.h> 2759 ], 2760 [ 2761 png_structp png_ptr = png_create_read_struct( /* image ptr */ 2762 PNG_LIBPNG_VER_STRING, 0, 0, 0 ); 2763 return( png_ptr != 0 ); 2764 ], 2765 eval "ac_cv_lib_png='-lpng $LIBZ -lm'", 2766 eval "ac_cv_lib_png=no" 2767) 2768LIBS="$kde_save_LIBS" 2769CFLAGS="$kde_save_CFLAGS" 2770])dnl 2771if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then 2772 AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng]) 2773 LIBPNG="$ac_cv_lib_png" 2774 AC_SUBST(LIBPNG) 2775 AC_MSG_RESULT($ac_cv_lib_png) 2776else 2777 AC_MSG_RESULT(no) 2778 LIBPNG="" 2779 AC_SUBST(LIBPNG) 2780fi 2781]) 2782 2783AC_DEFUN(AC_CHECK_BOOL, 2784[ 2785 AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool]) 2786]) 2787 2788AC_DEFUN(AC_CHECK_GNU_EXTENSIONS, 2789[ 2790AC_MSG_CHECKING(if you need GNU extensions) 2791AC_CACHE_VAL(ac_cv_gnu_extensions, 2792[ 2793cat > conftest.c << EOF 2794#include <features.h> 2795 2796#ifdef __GNU_LIBRARY__ 2797yes 2798#endif 2799EOF 2800 2801if (eval "$ac_cpp conftest.c") 2>&5 | 2802 egrep "yes" >/dev/null 2>&1; then 2803 rm -rf conftest* 2804 ac_cv_gnu_extensions=yes 2805else 2806 ac_cv_gnu_extensions=no 2807fi 2808]) 2809 2810AC_MSG_RESULT($ac_cv_gnu_extensions) 2811if test "$ac_cv_gnu_extensions" = "yes"; then 2812 AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions]) 2813fi 2814]) 2815 2816AC_DEFUN(KDE_CHECK_COMPILER_FLAG, 2817[ 2818AC_MSG_CHECKING(whether $CXX supports -$1) 2819kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'` 2820AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache, 2821[ 2822 AC_LANG_SAVE 2823 AC_LANG_CPLUSPLUS 2824 save_CXXFLAGS="$CXXFLAGS" 2825 CXXFLAGS="$CXXFLAGS -$1" 2826 AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], []) 2827 CXXFLAGS="$save_CXXFLAGS" 2828 AC_LANG_RESTORE 2829]) 2830if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then 2831 AC_MSG_RESULT(yes) 2832 : 2833 $2 2834else 2835 AC_MSG_RESULT(no) 2836 : 2837 $3 2838fi 2839]) 2840 2841dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables 2842dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever]) 2843dnl it's all white-space separated 2844AC_DEFUN(AC_REMOVE_FORBIDDEN, 2845[ __val=$$1 2846 __forbid=" $2 " 2847 if test -n "$__val"; then 2848 __new="" 2849 ac_save_IFS=$IFS 2850 IFS=" " 2851 for i in $__val; do 2852 case "$__forbid" in 2853 *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;; 2854 *) # Careful to not add spaces, where there were none, because otherwise 2855 # libtool gets confused, if we change e.g. CXX 2856 if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;; 2857 esac 2858 done 2859 IFS=$ac_save_IFS 2860 $1=$__new 2861 fi 2862]) 2863 2864dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given 2865AC_DEFUN(AC_VALIDIFY_CXXFLAGS, 2866[dnl 2867if test "x$kde_use_qt_emb" != "xyes"; then 2868 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath]) 2869 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath]) 2870else 2871 AC_REMOVE_FORBIDDEN(CXX, [-rpath]) 2872 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath]) 2873fi 2874]) 2875 2876AC_DEFUN(AC_CHECK_COMPILERS, 2877[ 2878 AC_ARG_ENABLE(debug,[ --enable-debug[=ARG] enables debug symbols (yes|no|full) [default=no]], 2879 [ 2880 case $enableval in 2881 yes) 2882 kde_use_debug_code="yes" 2883 kde_use_debug_define=no 2884 ;; 2885 full) 2886 kde_use_debug_code="full" 2887 kde_use_debug_define=no 2888 ;; 2889 *) 2890 kde_use_debug_code="no" 2891 kde_use_debug_define=yes 2892 ;; 2893 esac 2894 ], 2895 [kde_use_debug_code="no" 2896 kde_use_debug_define=no 2897 ]) 2898 2899 dnl Just for configure --help 2900 AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[]) 2901 2902 AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)], 2903 [ 2904 if test $enableval = "no"; then 2905 kde_use_strict_options="no" 2906 else 2907 kde_use_strict_options="yes" 2908 fi 2909 ], [kde_use_strict_options="no"]) 2910 2911 AC_ARG_ENABLE(warnings,[ --disable-warnings disables compilation with -Wall and similiar], 2912 [ 2913 if test $enableval = "no"; then 2914 kde_use_warnings="no" 2915 else 2916 kde_use_warnings="yes" 2917 fi 2918 ], [kde_use_warnings="yes"]) 2919 2920 dnl enable warnings for debug build 2921 if test "$kde_use_debug_code" != "no"; then 2922 kde_use_warnings=yes 2923 fi 2924 2925 AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]], 2926 [kde_use_profiling=$enableval], 2927 [kde_use_profiling="no"] 2928 ) 2929 2930 dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS 2931 CFLAGS=" $CFLAGS" 2932 2933 AC_PROG_CC 2934 2935 AC_PROG_CPP 2936 2937 if test "$GCC" = "yes"; then 2938 if test "$kde_use_debug_code" != "no"; then 2939 if test $kde_use_debug_code = "full"; then 2940 CFLAGS="-g3 $CFLAGS" 2941 else 2942 CFLAGS="-g -O2 $CFLAGS" 2943 fi 2944 else 2945 CFLAGS="-O2 $CFLAGS" 2946 fi 2947 fi 2948 2949 if test "$kde_use_debug_define" = "yes"; then 2950 CFLAGS="-DNDEBUG $CFLAGS" 2951 fi 2952 2953 2954 case "$host" in 2955 *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";; 2956 *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";; 2957 esac 2958 2959 if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then 2960 LDFLAGS="" 2961 fi 2962 2963 CXXFLAGS=" $CXXFLAGS" 2964 2965 AC_PROG_CXX 2966 2967 if test "$GXX" = "yes" || test "$CXX" = "KCC"; then 2968 if test "$kde_use_debug_code" != "no"; then 2969 if test "$CXX" = "KCC"; then 2970 CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS" 2971 else 2972 if test "$kde_use_debug_code" = "full"; then 2973 CXXFLAGS="-g3 $CXXFLAGS" 2974 else 2975 CXXFLAGS="-g -O2 $CXXFLAGS" 2976 fi 2977 fi 2978 KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"]) 2979 2980 dnl convenience compiler flags 2981 KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""]) 2982 AC_SUBST(WOVERLOADED_VIRTUAL) 2983 else 2984 if test "$CXX" = "KCC"; then 2985 CXXFLAGS="+K3 $CXXFLAGS" 2986 else 2987 CXXFLAGS="-O2 $CXXFLAGS" 2988 fi 2989 fi 2990 fi 2991 2992 if test "$kde_use_debug_define" = "yes"; then 2993 CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS" 2994 fi 2995 2996 if test "$kde_use_profiling" = "yes"; then 2997 KDE_CHECK_COMPILER_FLAG(pg, 2998 [ 2999 CFLAGS="-pg $CFLAGS" 3000 CXXFLAGS="-pg $CXXFLAGS" 3001 ]) 3002 fi 3003 3004 if test "$kde_use_warnings" = "yes"; then 3005 if test "$GCC" = "yes"; then 3006 case $host in 3007 *-*-linux-gnu) 3008 CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS" 3009 CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS" 3010 ;; 3011 esac 3012 CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS" 3013 KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"]) 3014 KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"]) 3015 KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"]) 3016 fi 3017 fi 3018 3019 if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then 3020 CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS" 3021 fi 3022 3023 if test "$GXX" = "yes"; then 3024 KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"]) 3025 KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"]) 3026 KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= ) 3027 fi 3028 if test "$CXX" = "KCC"; then 3029 dnl unfortunately we currently cannot disable exception support in KCC 3030 dnl because doing so is binary incompatible and Qt by default links with exceptions :-( 3031 dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"]) 3032 dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= ) 3033 3034 AC_ARG_ENABLE(pch,[ --enable-pch enables precompiled header support (currently only KCC) [default=no]], 3035 [ 3036 kde_use_pch=$enableval 3037 ],[kde_use_pch=no]) 3038 3039 if test "$kde_use_pch" = "yes"; then 3040 dnl TODO: support --pch-dir! 3041 KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"]) 3042 dnl the below works (but the dir must exist), but it's 3043 dnl useless for a whole package. 3044 dnl The are precompiled headers for each source file, so when compiling 3045 dnl from scratch, it doesn't make a difference, and they take up 3046 dnl around ~5Mb _per_ sourcefile. 3047 dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp, 3048 dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"]) 3049 fi 3050 dnl this flag controls inlining. by default KCC inlines in optimisation mode 3051 dnl all implementations that are defined inside the class {} declaration. 3052 dnl because of templates-compatibility with broken gcc compilers, this 3053 dnl can cause excessive inlining. This flag limits it to a sane level 3054 KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"]) 3055 KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"]) 3056 KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"]) 3057 KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"]) 3058 dnl Some source files are shared between multiple executables 3059 dnl (or libraries) and some of those need template instantiations. 3060 dnl In that case KCC needs to compile those sources with 3061 dnl --one_instantiation_per_object. To make it easy for us we compile 3062 dnl _all_ objects with that flag (--one_per is a shorthand). 3063 KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"]) 3064 fi 3065 AC_SUBST(USE_EXCEPTIONS) 3066 dnl obsolete macro - provided to keep things going 3067 USE_RTTI= 3068 AC_SUBST(USE_RTTI) 3069 3070 case "$host" in 3071 *-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;; 3072 *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";; 3073 *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";; 3074 *-*-solaris*) 3075 if test "$GXX" = yes; then 3076 libstdcpp=`$CXX -print-file-name=libstdc++.so` 3077 if test ! -f $libstdcpp; then 3078 AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so]) 3079 fi 3080 fi 3081 ;; 3082 esac 3083 3084 AC_VALIDIFY_CXXFLAGS 3085 3086 AC_PROG_CXXCPP 3087 3088 if test "$GCC" = yes; then 3089 NOOPT_CXXFLAGS=-O0 3090 NOOPT_CFLAGS=-O0 3091 fi 3092 3093 AC_SUBST(NOOPT_CXXFLAGS) 3094 AC_SUBST(NOOPT_CFLAGS) 3095 3096 KDE_CHECK_FINAL 3097 3098 ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), []) 3099]) 3100 3101AC_DEFUN(KDE_ADD_DEPENDENCIES, 3102[ 3103 [A]M_DEPENDENCIES(CC) 3104 [A]M_DEPENDENCIES(CXX) 3105]) 3106 3107dnl just a wrapper to clean up configure.in 3108AC_DEFUN(KDE_PROG_LIBTOOL, 3109[ 3110AC_REQUIRE([AC_CHECK_COMPILERS]) 3111AC_REQUIRE([AC_ENABLE_SHARED]) 3112AC_REQUIRE([AC_ENABLE_STATIC]) 3113 3114AC_REQUIRE([AC_LIBTOOL_DLOPEN]) 3115AC_REQUIRE([KDE_CHECK_LIB64]) 3116 3117AC_LANG_SAVE 3118AC_LANG_C 3119AC_OBJEXT 3120AC_EXEEXT 3121AC_LANG_RESTORE 3122 3123AM_PROG_LIBTOOL 3124AC_LIBTOOL_CXX 3125 3126LIBTOOL_SHELL="/bin/sh ./libtool" 3127# LIBTOOL="$LIBTOOL --silent" 3128KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)" 3129AC_SUBST(KDE_PLUGIN) 3130 3131AC_ARG_ENABLE(objprelink, [ --enable-objprelink prelink apps using objprelink (obsolete)], 3132 kde_use_objprelink=$enableval, kde_use_objprelink=no) 3133 if test "x$kde_use_objprelink" = "xyes"; then 3134 AC_MSG_WARN([ 3135------------------------------------------------------------ 3136Configuration option --enable-objprelink is no longer useful. 3137See http:://objprelink.sourceforge.net for details: 31381- Recent binutils are fast enough to do without objprelink. 31392- Newer versions of objprelink do not need this option. 3140------------------------------------------------------------ 3141]) 3142 fi 3143]) 3144 3145AC_DEFUN(KDE_CHECK_LIB64, 3146[ 3147 kdelibsuff=none 3148 AC_ARG_ENABLE(libsuffix, 3149 AC_HELP_STRING([--enable-libsuffix], 3150 [/lib directory suffix (64,32,none)]), 3151 kdelibsuff=$enableval) 3152 if test "$kdelibsuff" = "none"; then 3153 if test -d /lib64 ; then 3154 kdelibsuff=64 3155 else 3156 kdelibsuff= 3157 fi 3158 fi 3159 if test -z "$kdelibsuff"; then 3160 AC_MSG_RESULT([not using lib directory suffix]) 3161 AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories) 3162 else 3163 if test "$libdir" = '${exec_prefix}/lib'; then 3164 libdir="$libdir${kdelibsuff}" 3165 AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms 3166 fi 3167 AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories) 3168 AC_MSG_RESULT([using lib directory suffix $kdelibsuff]) 3169 fi 3170]) 3171 3172AC_DEFUN(KDE_CHECK_TYPES, 3173[ AC_CHECK_SIZEOF(int, 4)dnl 3174 AC_CHECK_SIZEOF(long, 4)dnl 3175 AC_CHECK_SIZEOF(char *, 4)dnl 3176 AC_CHECK_SIZEOF(char, 1)dnl 3177])dnl 3178 3179AC_DEFUN(KDE_DO_IT_ALL, 3180[ 3181AC_CANONICAL_SYSTEM 3182AC_ARG_PROGRAM 3183AM_INIT_AUTOMAKE($1, $2) 3184AM_DISABLE_LIBRARIES 3185AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde}) 3186AC_CHECK_COMPILERS 3187KDE_PROG_LIBTOOL 3188AM_KDE_WITH_NLS 3189AC_PATH_KDE 3190]) 3191 3192AC_DEFUN(AC_CHECK_RPATH, 3193[ 3194AC_MSG_CHECKING(for rpath) 3195AC_ARG_ENABLE(rpath, 3196 [ --disable-rpath do not use the rpath feature of ld], 3197 USE_RPATH=$enableval, USE_RPATH=yes) 3198 3199if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then 3200 3201 KDE_RPATH="-R \$(kde_libraries)" 3202 3203 if test -n "$qt_libraries"; then 3204 KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)" 3205 fi 3206 dnl $x_libraries is set to /usr/lib in case 3207 if test -n "$X_LDFLAGS"; then 3208 KDE_RPATH="$KDE_RPATH -R \$(x_libraries)" 3209 fi 3210 if test -n "$KDE_EXTRA_RPATH"; then 3211 KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)" 3212 fi 3213fi 3214AC_SUBST(KDE_EXTRA_RPATH) 3215AC_SUBST(KDE_RPATH) 3216AC_MSG_RESULT($USE_RPATH) 3217]) 3218 3219dnl Check for the type of the third argument of getsockname 3220AC_DEFUN(AC_CHECK_SOCKLEN_T, [ 3221 AC_MSG_CHECKING(for socklen_t) 3222 AC_CACHE_VAL(ac_cv_socklen_t, [ 3223 AC_LANG_SAVE 3224 AC_LANG_CPLUSPLUS 3225 AC_TRY_COMPILE([ 3226#include <sys/types.h> 3227#include <sys/socket.h> 3228 ],[ 3229socklen_t a=0; 3230getsockname(0,(struct sockaddr*)0, &a); 3231 ], 3232 ac_cv_socklen_t=socklen_t, 3233 AC_TRY_COMPILE([ 3234#include <sys/types.h> 3235#include <sys/socket.h> 3236 ],[ 3237int a=0; 3238getsockname(0,(struct sockaddr*)0, &a); 3239 ], 3240 ac_cv_socklen_t=int, 3241 ac_cv_socklen_t=size_t 3242 ) 3243 ) 3244 AC_LANG_RESTORE 3245 ]) 3246 3247 AC_MSG_RESULT($ac_cv_socklen_t) 3248 if test "$ac_cv_socklen_t" != "socklen_t"; then 3249 AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t, 3250 [Define the real type of socklen_t]) 3251 fi 3252 AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define]) 3253 3254]) 3255 3256dnl This is a merge of some macros out of the gettext aclocal.m4 3257dnl since we don't need anything, I took the things we need 3258dnl the copyright for them is: 3259dnl > 3260dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. 3261dnl This Makefile.in is free software; the Free Software Foundation 3262dnl gives unlimited permission to copy and/or distribute it, 3263dnl with or without modifications, as long as this notice is preserved. 3264 3265dnl This program is distributed in the hope that it will be useful, 3266dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without 3267dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A 3268dnl PARTICULAR PURPOSE. 3269dnl > 3270dnl for this file it is relicensed under LGPL 3271 3272AC_DEFUN(AM_KDE_WITH_NLS, 3273 [ 3274 dnl If we use NLS figure out what method 3275 3276 AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt, 3277 [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt) 3278 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 3279 3280 if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then 3281 AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it]) 3282 GMSGFMT=":" 3283 fi 3284 MSGFMT=$GMSGFMT 3285 AC_SUBST(GMSGFMT) 3286 AC_SUBST(MSGFMT) 3287 3288 AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext, 3289 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) 3290 3291 dnl Test whether we really found GNU xgettext. 3292 if test "$XGETTEXT" != ":"; then 3293 dnl If it is no GNU xgettext we define it as : so that the 3294 dnl Makefiles still can work. 3295 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then 3296 : ; 3297 else 3298 AC_MSG_RESULT( 3299 [found xgettext programs is not GNU xgettext; ignore it]) 3300 XGETTEXT=":" 3301 fi 3302 fi 3303 AC_SUBST(XGETTEXT) 3304 3305 ]) 3306 3307# Search path for a program which passes the given test. 3308# Ulrich Drepper <drepper@cygnus.com>, 1996. 3309 3310# serial 1 3311# Stephan Kulow: I appended a _KDE against name conflicts 3312 3313dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR, 3314dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) 3315AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE, 3316[# Extract the first word of "$2", so it can be a program name with args. 3317set dummy $2; ac_word=[$]2 3318AC_MSG_CHECKING([for $ac_word]) 3319AC_CACHE_VAL(ac_cv_path_$1, 3320[case "[$]$1" in 3321 /*) 3322 ac_cv_path_$1="[$]$1" # Let the user override the test with a path. 3323 ;; 3324 *) 3325 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 3326 for ac_dir in ifelse([$5], , $PATH, [$5]); do 3327 test -z "$ac_dir" && ac_dir=. 3328 if test -f $ac_dir/$ac_word; then 3329 if [$3]; then 3330 ac_cv_path_$1="$ac_dir/$ac_word" 3331 break 3332 fi 3333 fi 3334 done 3335 IFS="$ac_save_ifs" 3336dnl If no 4th arg is given, leave the cache variable unset, 3337dnl so AC_PATH_PROGS will keep looking. 3338ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" 3339])dnl 3340 ;; 3341esac])dnl 3342$1="$ac_cv_path_$1" 3343if test -n "[$]$1"; then 3344 AC_MSG_RESULT([$]$1) 3345else 3346 AC_MSG_RESULT(no) 3347fi 3348AC_SUBST($1)dnl 3349]) 3350 3351 3352# Check whether LC_MESSAGES is available in <locale.h>. 3353# Ulrich Drepper <drepper@cygnus.com>, 1995. 3354 3355# serial 1 3356 3357AC_DEFUN(AM_LC_MESSAGES, 3358 [if test $ac_cv_header_locale_h = yes; then 3359 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, 3360 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], 3361 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) 3362 if test $am_cv_val_LC_MESSAGES = yes; then 3363 AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES]) 3364 fi 3365 fi]) 3366 3367dnl From Jim Meyering. 3368dnl FIXME: migrate into libit. 3369 3370AC_DEFUN([AM_FUNC_OBSTACK], 3371[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack, 3372 [AC_TRY_LINK([#include "obstack.h"], 3373 [struct obstack *mem;obstack_free(mem,(char *) 0)], 3374 am_cv_func_obstack=yes, 3375 am_cv_func_obstack=no)]) 3376 if test $am_cv_func_obstack = yes; then 3377 AC_DEFINE(HAVE_OBSTACK) 3378 else 3379 LIBOBJS="$LIBOBJS obstack.o" 3380 fi 3381]) 3382 3383dnl From Jim Meyering. Use this if you use the GNU error.[ch]. 3384dnl FIXME: Migrate into libit 3385 3386AC_DEFUN([AM_FUNC_ERROR_AT_LINE], 3387[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line, 3388 [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");], 3389 am_cv_lib_error_at_line=yes, 3390 am_cv_lib_error_at_line=no)]) 3391 if test $am_cv_lib_error_at_line = no; then 3392 LIBOBJS="$LIBOBJS error.o" 3393 fi 3394 AC_SUBST(LIBOBJS)dnl 3395]) 3396 3397# Macro to add for using GNU gettext. 3398# Ulrich Drepper <drepper@cygnus.com>, 1995. 3399 3400# serial 1 3401# Stephan Kulow: I put a KDE in it to avoid name conflicts 3402 3403AC_DEFUN(AM_KDE_GNU_GETTEXT, 3404 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl 3405 AC_REQUIRE([AC_PROG_RANLIB])dnl 3406 AC_REQUIRE([AC_HEADER_STDC])dnl 3407 AC_REQUIRE([AC_TYPE_OFF_T])dnl 3408 AC_REQUIRE([AC_TYPE_SIZE_T])dnl 3409 AC_REQUIRE([AC_FUNC_ALLOCA])dnl 3410 AC_REQUIRE([AC_FUNC_MMAP])dnl 3411 AC_REQUIRE([AM_KDE_WITH_NLS])dnl 3412 AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h]) 3413 AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \ 3414__argz_count __argz_stringify __argz_next]) 3415 3416 AC_MSG_CHECKING(for stpcpy) 3417 AC_CACHE_VAL(kde_cv_func_stpcpy, 3418 [ 3419 kde_safe_cxxflags=$CXXFLAGS 3420 CXXFLAGS="-Wmissing-prototypes -Werror" 3421 AC_LANG_SAVE 3422 AC_LANG_CPLUSPLUS 3423 AC_TRY_COMPILE([ 3424 #include <string.h> 3425 ], 3426 [ 3427 char buffer[200]; 3428 stpcpy(buffer, buffer); 3429 ], 3430 kde_cv_func_stpcpy=yes, 3431 kde_cv_func_stpcpy=no) 3432 AC_LANG_RESTORE 3433 CXXFLAGS=$kde_safe_cxxflags 3434 ]) 3435 AC_MSG_RESULT($kde_cv_func_stpcpy) 3436 if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then 3437 AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy]) 3438 fi 3439 3440 AM_LC_MESSAGES 3441 3442 if test "x$CATOBJEXT" != "x"; then 3443 if test "x$ALL_LINGUAS" = "x"; then 3444 LINGUAS= 3445 else 3446 AC_MSG_CHECKING(for catalogs to be installed) 3447 NEW_LINGUAS= 3448 for lang in ${LINGUAS=$ALL_LINGUAS}; do 3449 case "$ALL_LINGUAS" in 3450 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; 3451 esac 3452 done 3453 LINGUAS=$NEW_LINGUAS 3454 AC_MSG_RESULT($LINGUAS) 3455 fi 3456 3457 dnl Construct list of names of catalog files to be constructed. 3458 if test -n "$LINGUAS"; then 3459 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done 3460 fi 3461 fi 3462 3463 ]) 3464 3465AC_DEFUN(AC_HAVE_XPM, 3466 [AC_REQUIRE_CPP()dnl 3467 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) 3468 3469 test -z "$XPM_LDFLAGS" && XPM_LDFLAGS= 3470 test -z "$XPM_INCLUDE" && XPM_INCLUDE= 3471 3472 AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM tests], 3473 xpm_test=$withval, xpm_test="yes") 3474 if test "x$xpm_test" = xno; then 3475 ac_cv_have_xpm=no 3476 else 3477 AC_MSG_CHECKING(for XPM) 3478 AC_CACHE_VAL(ac_cv_have_xpm, 3479 [ 3480 AC_LANG_C 3481 ac_save_ldflags="$LDFLAGS" 3482 ac_save_cflags="$CFLAGS" 3483 if test "x$kde_use_qt_emb" != "xyes"; then 3484 LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET" 3485 else 3486 LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET" 3487 fi 3488 CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES" 3489 test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS" 3490 AC_TRY_LINK([#include <X11/xpm.h>],[], 3491 ac_cv_have_xpm="yes",ac_cv_have_xpm="no") 3492 LDFLAGS="$ac_save_ldflags" 3493 CFLAGS="$ac_save_cflags" 3494 ])dnl 3495 3496 if test "$ac_cv_have_xpm" = no; then 3497 AC_MSG_RESULT(no) 3498 XPM_LDFLAGS="" 3499 XPMINC="" 3500 $2 3501 else 3502 AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support]) 3503 if test "$XPM_LDFLAGS" = ""; then 3504 XPMLIB='-lXpm $(LIB_X11)' 3505 else 3506 XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)' 3507 fi 3508 if test "$XPM_INCLUDE" = ""; then 3509 XPMINC="" 3510 else 3511 XPMINC="-I$XPM_INCLUDE" 3512 fi 3513 AC_MSG_RESULT(yes) 3514 $1 3515 fi 3516 fi 3517 AC_SUBST(XPMINC) 3518 AC_SUBST(XPMLIB) 3519]) 3520 3521AC_DEFUN(AC_HAVE_DPMS, 3522 [AC_REQUIRE_CPP()dnl 3523 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) 3524 3525 test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS= 3526 test -z "$DPMS_INCLUDE" && DPMS_INCLUDE= 3527 DPMS_LIB= 3528 3529 AC_ARG_WITH(dpms, [ --without-dpms disable DPMS power saving], 3530 dpms_test=$withval, dpms_test="yes") 3531 if test "x$dpms_test" = xno; then 3532 ac_cv_have_dpms=no 3533 else 3534 AC_MSG_CHECKING(for DPMS) 3535 dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms. 3536 dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms". 3537 AC_CACHE_VAL(ac_cv_have_dpms, 3538 [ 3539 if test "x$kde_use_qt_emb" = "xyes"; then 3540 AC_MSG_RESULT(no) 3541 ac_cv_have_dpms="no" 3542 else 3543 AC_LANG_C 3544 ac_save_ldflags="$LDFLAGS" 3545 ac_save_cflags="$CFLAGS" 3546 ac_save_libs="$LIBS" 3547 LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET" 3548 CFLAGS="$CFLAGS $X_INCLUDES" 3549 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS" 3550 AC_TRY_LINK([ 3551 #include <X11/Xproto.h> 3552 #include <X11/X.h> 3553 #include <X11/Xlib.h> 3554 #include <X11/extensions/dpms.h> 3555 int foo_test_dpms() 3556 { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[], 3557 ac_cv_have_dpms="yes", [ 3558 LDFLAGS="$ac_save_ldflags" 3559 CFLAGS="$ac_save_cflags" 3560 LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET" 3561 LIBS="$LIBS -lXdpms" 3562 CFLAGS="$CFLAGS $X_INCLUDES" 3563 test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS" 3564 AC_TRY_LINK([ 3565 #include <X11/Xproto.h> 3566 #include <X11/X.h> 3567 #include <X11/Xlib.h> 3568 #include <X11/extensions/dpms.h> 3569 int foo_test_dpms() 3570 { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[], 3571 [ 3572 ac_cv_have_dpms="-lXdpms" 3573 ],ac_cv_have_dpms="no") 3574 ]) 3575 LDFLAGS="$ac_save_ldflags" 3576 CFLAGS="$ac_save_cflags" 3577 LIBS="$ac_save_libs" 3578 fi 3579 ])dnl 3580 3581 if test "$ac_cv_have_dpms" = no; then 3582 AC_MSG_RESULT(no) 3583 DPMS_LDFLAGS="" 3584 DPMSINC="" 3585 $2 3586 else 3587 AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support]) 3588 if test "$ac_cv_have_dpms" = "-lXdpms"; then 3589 DPMS_LIB="-lXdpms" 3590 fi 3591 if test "$DPMS_LDFLAGS" = ""; then 3592 DPMSLIB="$DPMS_LIB "'$(LIB_X11)' 3593 else 3594 DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)' 3595 fi 3596 if test "$DPMS_INCLUDE" = ""; then 3597 DPMSINC="" 3598 else 3599 DPMSINC="-I$DPMS_INCLUDE" 3600 fi 3601 AC_MSG_RESULT(yes) 3602 $1 3603 fi 3604 fi 3605 AC_SUBST(DPMSINC) 3606 AC_SUBST(DPMSLIB) 3607]) 3608 3609AC_DEFUN(AC_HAVE_GL, 3610 [AC_REQUIRE_CPP()dnl 3611 AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) 3612 3613 test -z "$GL_LDFLAGS" && GL_LDFLAGS= 3614 test -z "$GL_INCLUDE" && GL_INCLUDE= 3615 3616 AC_ARG_WITH(gl, [ --without-gl disable 3D GL modes], 3617 gl_test=$withval, gl_test="yes") 3618 if test "x$kde_use_qt_emb" = "xyes"; then 3619 # GL and Qt Embedded is a no-go for now. 3620 ac_cv_have_gl=no 3621 elif test "x$gl_test" = xno; then 3622 ac_cv_have_gl=no 3623 else 3624 AC_MSG_CHECKING(for GL) 3625 AC_CACHE_VAL(ac_cv_have_gl, 3626 [ 3627 AC_LANG_SAVE 3628 AC_LANG_CPLUSPLUS 3629 ac_save_ldflags="$LDFLAGS" 3630 ac_save_cxxflags="$CXXFLAGS" 3631 LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU" 3632 test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11" 3633 LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET" 3634 CXXFLAGS="$CFLAGS $X_INCLUDES" 3635 test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS" 3636 AC_TRY_LINK([#include <GL/gl.h> 3637#include <GL/glu.h> 3638], [], 3639 ac_cv_have_gl="mesa", ac_cv_have_gl="no") 3640 if test "x$ac_cv_have_gl" = "xno"; then 3641 LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL" 3642 test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11" 3643 LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET" 3644 CXXFLAGS="$ac_save_cflags $X_INCLUDES" 3645 test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS" 3646 AC_TRY_LINK([#include <GL/gl.h> 3647#include <GL/glu.h> 3648], [], 3649 ac_cv_have_gl="yes", ac_cv_have_gl="no") 3650 fi 3651 AC_LANG_RESTORE 3652 LDFLAGS="$ac_save_ldflags" 3653 CXXFLAGS="$ac_save_cxxflags" 3654 ])dnl 3655 3656 if test "$ac_cv_have_gl" = "no"; then 3657 AC_MSG_RESULT(no) 3658 GL_LDFLAGS="" 3659 GLINC="" 3660 $2 3661 else 3662 AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)]) 3663 if test "$GL_LDFLAGS" = ""; then 3664 if test "$ac_cv_have_gl" = "mesa"; then 3665 GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)' 3666 else 3667 GLLIB='-lGLU -lGL $(LIB_X11)' 3668 fi 3669 else 3670 if test "$ac_cv_have_gl" = "mesa"; then 3671 GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)' 3672 else 3673 GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)' 3674 fi 3675 fi 3676 if test "$GL_INCLUDE" = ""; then 3677 GLINC="" 3678 else 3679 GLINC="-I$GL_INCLUDE" 3680 fi 3681 AC_MSG_RESULT($ac_cv_have_gl) 3682 $1 3683 fi 3684 fi 3685 AC_SUBST(GLINC) 3686 AC_SUBST(GLLIB) 3687]) 3688 3689 3690 dnl shadow password and PAM magic - maintained by ossi@kde.org 3691 3692AC_DEFUN(KDE_PAM, [ 3693 AC_REQUIRE([KDE_CHECK_LIBDL]) 3694 3695 AC_ARG_WITH(pam, 3696 [ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]], 3697 [ if test "x$withval" = "xyes"; then 3698 use_pam=yes 3699 pam_service=kde 3700 elif test "x$withval" = "xno"; then 3701 use_pam=no 3702 else 3703 use_pam=yes 3704 pam_service=$withval 3705 fi 3706 ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service" 3707 ], [ 3708 AC_CACHE_VAL(ac_cv_path_pam, 3709 [ use_pam=no 3710 AC_CHECK_LIB(pam, pam_start, 3711 [ AC_CHECK_HEADER(security/pam_appl.h, 3712 [ use_pam=yes 3713 pam_service=kde ]) 3714 ], , $LIBDL) 3715 ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service" 3716 ]) 3717 ]) 3718 eval "$ac_cv_path_pam" 3719 3720 AC_MSG_CHECKING(for PAM) 3721 if test "x$use_pam" = xno; then 3722 AC_MSG_RESULT(no) 3723 PAMLIBS="" 3724 else 3725 AC_MSG_RESULT(yes) 3726 AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)]) 3727 PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL" 3728 3729 dnl test whether struct pam_message is const (Linux) or not (Sun) 3730 AC_MSG_CHECKING(for const pam_message) 3731 AC_EGREP_HEADER([struct pam_message], security/pam_appl.h, 3732 [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h, 3733 [AC_MSG_RESULT([const: Linux-type PAM])], 3734 [AC_MSG_RESULT([nonconst: Sun-type PAM]) 3735 AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])] 3736 )], 3737 [AC_MSG_RESULT([not found - assume const, Linux-type PAM])]) 3738 fi 3739 3740 AC_SUBST(PAMLIBS) 3741]) 3742 3743dnl DEF_PAM_SERVICE(arg name, full name, define name) 3744AC_DEFUN(DEF_PAM_SERVICE, [ 3745 AC_ARG_WITH($1-pam, 3746 [ --with-$1-pam=[val] override PAM service from --with-pam for $2], 3747 [ if test "x$use_pam" = xyes; then 3748 $3_PAM_SERVICE="$withval" 3749 else 3750 AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected. 3751You may want to enforce it by using --with-pam.]) 3752 fi 3753 ], 3754 [ if test "x$use_pam" = xyes; then 3755 $3_PAM_SERVICE="$pam_service" 3756 fi 3757 ]) 3758 if test -n "$$3_PAM_SERVICE"; then 3759 AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE]) 3760 AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2]) 3761 fi 3762 AC_SUBST($3_PAM_SERVICE) 3763]) 3764 3765AC_DEFUN(KDE_SHADOWPASSWD, [ 3766 AC_REQUIRE([KDE_PAM]) 3767 3768 AC_CHECK_LIB(shadow, getspent, 3769 [ LIBSHADOW="-lshadow" 3770 ac_use_shadow=yes 3771 ], 3772 [ dnl for UnixWare 3773 AC_CHECK_LIB(gen, getspent, 3774 [ LIBGEN="-lgen" 3775 ac_use_shadow=yes 3776 ], 3777 [ AC_CHECK_FUNC(getspent, 3778 [ ac_use_shadow=yes ], 3779 [ ac_use_shadow=no ]) 3780 ]) 3781 ]) 3782 AC_SUBST(LIBSHADOW) 3783 AC_SUBST(LIBGEN) 3784 3785 AC_MSG_CHECKING([for shadow passwords]) 3786 3787 AC_ARG_WITH(shadow, 3788 [ --with-shadow If you want shadow password support ], 3789 [ if test "x$withval" != "xno"; then 3790 use_shadow=yes 3791 else 3792 use_shadow=no 3793 fi 3794 ], [ 3795 use_shadow="$ac_use_shadow" 3796 ]) 3797 3798 if test "x$use_shadow" = xyes; then 3799 AC_MSG_RESULT(yes) 3800 AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords]) 3801 else 3802 AC_MSG_RESULT(no) 3803 LIBSHADOW= 3804 LIBGEN= 3805 fi 3806 3807 dnl finally make the relevant binaries setuid root, if we have shadow passwds. 3808 dnl this still applies, if we could use it indirectly through pam. 3809 if test "x$use_shadow" = xyes || 3810 ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then 3811 case $host in 3812 *-*-freebsd* | *-*-netbsd* | *-*-openbsd*) 3813 SETUIDFLAGS="-m 4755 -o root";; 3814 *) 3815 SETUIDFLAGS="-m 4755";; 3816 esac 3817 fi 3818 AC_SUBST(SETUIDFLAGS) 3819 3820]) 3821 3822AC_DEFUN(KDE_PASSWDLIBS, [ 3823 AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT 3824 AC_REQUIRE([KDE_PAM]) 3825 AC_REQUIRE([KDE_SHADOWPASSWD]) 3826 3827 if test "x$use_pam" = "xyes"; then 3828 PASSWDLIBS="$PAMLIBS" 3829 else 3830 PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN" 3831 fi 3832 3833 dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but 3834 dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires 3835 dnl root to read, so kcheckpass needs to be root (even when using pam, since pam 3836 dnl may need to read /etc/master.passwd). 3837 case $host in 3838 *-*-freebsd*) 3839 SETUIDFLAGS="-m 4755 -o root" 3840 ;; 3841 *) 3842 ;; 3843 esac 3844 3845 AC_SUBST(PASSWDLIBS) 3846]) 3847 3848AC_DEFUN(KDE_CHECK_LIBDL, 3849[ 3850AC_CHECK_LIB(dl, dlopen, [ 3851LIBDL="-ldl" 3852ac_cv_have_dlfcn=yes 3853]) 3854 3855AC_CHECK_LIB(dld, shl_unload, [ 3856LIBDL="-ldld" 3857ac_cv_have_shload=yes 3858]) 3859 3860AC_SUBST(LIBDL) 3861]) 3862 3863AC_DEFUN(KDE_CHECK_DLOPEN, 3864[ 3865KDE_CHECK_LIBDL 3866AC_CHECK_HEADERS(dlfcn.h dl.h) 3867if test "$ac_cv_header_dlfcn_h" = "no"; then 3868 ac_cv_have_dlfcn=no 3869fi 3870 3871if test "$ac_cv_header_dl_h" = "no"; then 3872 ac_cv_have_shload=no 3873fi 3874 3875dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE 3876dnl (MM) 3877AC_ARG_ENABLE(dlopen, 3878[ --disable-dlopen link statically [default=no]] , 3879enable_dlopen=$enableval, 3880enable_dlopen=yes) 3881 3882# override the user's opinion, if we know it better ;) 3883if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then 3884 enable_dlopen=no 3885fi 3886 3887if test "$ac_cv_have_dlfcn" = "yes"; then 3888 AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn]) 3889fi 3890 3891if test "$ac_cv_have_shload" = "yes"; then 3892 AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload]) 3893fi 3894 3895if test "$enable_dlopen" = no ; then 3896 test -n "$1" && eval $1 3897else 3898 test -n "$2" && eval $2 3899fi 3900 3901]) 3902 3903AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING, 3904[ 3905KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no) 3906KDE_PROG_LIBTOOL 3907AC_MSG_CHECKING([dynamic loading]) 3908eval "`egrep '^build_libtool_libs=' libtool`" 3909if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then 3910 dynamic_loading=yes 3911 AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING) 3912else 3913 dynamic_loading=no 3914fi 3915AC_MSG_RESULT($dynamic_loading) 3916if test "$dynamic_loading" = "yes"; then 3917 $1 3918else 3919 $2 3920fi 3921]) 3922 3923AC_DEFUN(KDE_ADD_INCLUDES, 3924[ 3925if test -z "$1"; then 3926 test_include="Pix.h" 3927else 3928 test_include="$1" 3929fi 3930 3931AC_MSG_CHECKING([for libg++ ($test_include)]) 3932 3933AC_CACHE_VAL(kde_cv_libgpp_includes, 3934[ 3935kde_cv_libgpp_includes=no 3936 3937 for ac_dir in \ 3938 \ 3939 /usr/include/g++ \ 3940 /usr/include \ 3941 /usr/unsupported/include \ 3942 /opt/include \ 3943 $extra_include \ 3944 ; \ 3945 do 3946 if test -r "$ac_dir/$test_include"; then 3947 kde_cv_libgpp_includes=$ac_dir 3948 break 3949 fi 3950 done 3951]) 3952 3953AC_MSG_RESULT($kde_cv_libgpp_includes) 3954if test "$kde_cv_libgpp_includes" != "no"; then 3955 all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES" 3956fi 3957]) 3958]) 3959 3960 3961AC_DEFUN(KDE_CHECK_MICO, 3962[ 3963AC_REQUIRE([KDE_CHECK_LIBDL]) 3964AC_REQUIRE([KDE_MISC_TESTS]) 3965AC_MSG_CHECKING(for MICO) 3966 3967if test -z "$MICODIR"; then 3968 kde_micodir=/usr/local 3969 else 3970 kde_micodir="$MICODIR" 3971fi 3972 3973AC_ARG_WITH(micodir, 3974 [ --with-micodir=micodir where mico is installed ], 3975 kde_micodir=$withval, 3976 kde_micodir=$kde_micodir 3977) 3978 3979AC_CACHE_VAL(kde_cv_mico_incdir, 3980[ 3981 mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes" 3982AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir) 3983 3984]) 3985kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'` 3986 3987if test ! -r $kde_micodir/include/CORBA.h; then 3988 AC_MSG_ERROR([No CORBA.h found, specify another micodir]) 3989fi 3990 3991AC_MSG_RESULT($kde_micodir) 3992 3993MICO_INCLUDES=-I$kde_micodir/include 3994AC_SUBST(MICO_INCLUDES) 3995MICO_LDFLAGS=-L$kde_micodir/lib 3996AC_SUBST(MICO_LDFLAGS) 3997micodir=$kde_micodir 3998AC_SUBST(micodir) 3999 4000AC_MSG_CHECKING([for MICO version]) 4001AC_CACHE_VAL(kde_cv_mico_version, 4002[ 4003AC_LANG_C 4004cat >conftest.$ac_ext <<EOF 4005#include <stdio.h> 4006#include <mico/version.h> 4007int main() { 4008 4009 printf("MICO_VERSION=%s\n",MICO_VERSION); 4010 return (0); 4011} 4012EOF 4013ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest' 4014if AC_TRY_EVAL(ac_compile); then 4015 if eval `./conftest 2>&5`; then 4016 kde_cv_mico_version=$MICO_VERSION 4017 else 4018 AC_MSG_ERROR([your system is not able to execute a small application to 4019 find MICO version! Check $kde_micodir/include/mico/version.h]) 4020 fi 4021else 4022 AC_MSG_ERROR([your system is not able to compile a small application to 4023 find MICO version! Check $kde_micodir/include/mico/version.h]) 4024fi 4025]) 4026 4027dnl installed MICO version 4028mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'` 4029mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'` 4030mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'` 4031 4032if test "x$1" = "x"; then 4033 req_version="2.3.0" 4034else 4035 req_version=$1 4036fi 4037 4038dnl required MICO version 4039req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'` 4040req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'` 4041req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'` 4042 4043if test "$mico_v_maj" -lt "$req_v_maj" || \ 4044 ( test "$mico_v_maj" -eq "$req_v_maj" && \ 4045 test "$mico_v_mid" -lt "$req_v_mid" ) || \ 4046 ( test "$mico_v_mid" -eq "$req_v_mid" && \ 4047 test "$mico_v_min" -lt "$req_v_min" ) 4048 4049then 4050 AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \ 4051at least is required. You should upgrade MICO.]) 4052else 4053 AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)]) 4054fi 4055 4056LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL" 4057AC_SUBST(LIBMICO) 4058if test -z "$IDL"; then 4059 IDL='$(kde_bindir)/cuteidl' 4060fi 4061AC_SUBST(IDL) 4062IDL_DEPENDENCIES='$(kde_includes)/CUTE.h' 4063AC_SUBST(IDL_DEPENDENCIES) 4064 4065idldir="\$(includedir)/idl" 4066AC_SUBST(idldir) 4067 4068]) 4069 4070AC_DEFUN(KDE_CHECK_MINI_STL, 4071[ 4072AC_REQUIRE([KDE_CHECK_MICO]) 4073 4074AC_MSG_CHECKING(if we use mico's mini-STL) 4075AC_CACHE_VAL(kde_cv_have_mini_stl, 4076[ 4077AC_LANG_SAVE 4078AC_LANG_CPLUSPLUS 4079kde_save_cxxflags="$CXXFLAGS" 4080CXXFLAGS="$CXXFLAGS $MICO_INCLUDES" 4081AC_TRY_COMPILE( 4082[ 4083#include <mico/config.h> 4084], 4085[ 4086#ifdef HAVE_MINI_STL 4087#error "nothing" 4088#endif 4089], 4090kde_cv_have_mini_stl=no, 4091kde_cv_have_mini_stl=yes) 4092CXXFLAGS="$kde_save_cxxflags" 4093AC_LANG_RESTORE 4094]) 4095 4096if test "x$kde_cv_have_mini_stl" = "xyes"; then 4097 AC_MSG_RESULT(yes) 4098 $1 4099else 4100 AC_MSG_RESULT(no) 4101 $2 4102fi 4103]) 4104 4105]) 4106 4107 4108AC_DEFUN(KDE_CHECK_LIBPTHREAD, 4109[ 4110AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] ) 4111AC_SUBST(LIBPTHREAD) 4112]) 4113 4114AC_DEFUN(KDE_CHECK_PTHREAD_OPTION, 4115[ 4116 AC_ARG_ENABLE(kernel-threads, [ --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.], 4117 kde_use_kernthreads=$enableval, kde_use_kernthreads=no) 4118 4119 if test "$kde_use_kernthreads" = "yes"; then 4120 ac_save_CXXFLAGS="$CXXFLAGS" 4121 ac_save_CFLAGS="$CFLAGS" 4122 CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS" 4123 CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS" 4124 AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h) 4125 CXXFLAGS="$ac_save_CXXFLAGS" 4126 CFLAGS="$ac_save_CFLAGS" 4127 if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then 4128 kde_use_kernthreads=no 4129 else 4130 dnl Add proper -I and -l statements 4131 AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD 4132 if test "x$LIBPTHREAD" = "x"; then 4133 kde_use_kernthreads=no 4134 else 4135 USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads" 4136 fi 4137 fi 4138 else 4139 USE_THREADS="" 4140 if test -z "$LIBPTHREAD"; then 4141 KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] ) 4142 fi 4143 fi 4144 4145 AH_VERBATIM(__svr_define, [ 4146#if defined(__SVR4) && !defined(__svr4__) 4147#define __svr4__ 1 4148#endif 4149]) 4150 case $host_os in 4151 solaris*) 4152 KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"]) 4153 CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4" 4154 ;; 4155 freebsd*) 4156 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" 4157 ;; 4158 aix*) 4159 CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" 4160 LIBPTHREAD="$LIBPTHREAD -lc_r" 4161 ;; 4162 linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" 4163 if test "$CXX" = "KCC"; then 4164 CXXFLAGS="$CXXFLAGS --thread_safe" 4165 NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe" 4166 fi 4167 ;; 4168 *) 4169 ;; 4170 esac 4171 AC_SUBST(USE_THREADS) 4172 AC_SUBST(LIBPTHREAD) 4173]) 4174 4175AC_DEFUN(KDE_CHECK_THREADING, 4176[ 4177 AC_REQUIRE([KDE_CHECK_LIBPTHREAD]) 4178 AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION]) 4179 dnl default is yes if libpthread is found and no if no libpthread is available 4180 if test -z "$LIBPTHREAD"; then 4181 if test -z "$USE_THREADS"; then 4182 kde_check_threading_default=no 4183 else 4184 kde_check_threading_default=yes 4185 fi 4186 else 4187 kde_check_threading_default=yes 4188 fi 4189 AC_ARG_ENABLE(threading, [ --disable-threading disables threading even if libpthread found ], 4190 kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default) 4191 if test "x$kde_use_threading" = "xyes"; then 4192 AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)]) 4193 fi 4194]) 4195 4196AC_DEFUN(KDE_TRY_LINK_PYTHON, 4197[ 4198if test "$kde_python_link_found" = no; then 4199 4200if test "$1" = normal; then 4201 AC_MSG_CHECKING(if a Python application links) 4202else 4203 AC_MSG_CHECKING(if Python depends on $2) 4204fi 4205 4206AC_CACHE_VAL(kde_cv_try_link_python_$1, 4207[ 4208AC_LANG_SAVE 4209AC_LANG_C 4210kde_save_cflags="$CFLAGS" 4211CFLAGS="$CFLAGS $PYTHONINC" 4212kde_save_libs="$LIBS" 4213LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET" 4214kde_save_ldflags="$LDFLAGS" 4215LDFLAGS="$LDFLAGS $PYTHONLIB" 4216 4217AC_TRY_LINK( 4218[ 4219#include <Python.h> 4220],[ 4221 PySys_SetArgv(1, 0); 4222], 4223 [kde_cv_try_link_python_$1=yes], 4224 [kde_cv_try_link_python_$1=no] 4225) 4226CFLAGS="$kde_save_cflags" 4227LIBS="$kde_save_libs" 4228LDFLAGS="$kde_save_ldflags" 4229]) 4230 4231if test "$kde_cv_try_link_python_$1" = "yes"; then 4232 AC_MSG_RESULT(yes) 4233 kde_python_link_found=yes 4234 if test ! "$1" = normal; then 4235 LIBPYTHON="$LIBPYTHON $2" 4236 fi 4237 $3 4238else 4239 AC_MSG_RESULT(no) 4240 $4 4241fi 4242AC_LANG_RESTORE 4243 4244fi 4245 4246]) 4247 4248AC_DEFUN(KDE_CHECK_PYTHON_DIR, 4249[ 4250AC_MSG_CHECKING([for Python directory]) 4251 4252AC_CACHE_VAL(kde_cv_pythondir, 4253[ 4254 if test -z "$PYTHONDIR"; then 4255 kde_cv_pythondir=/usr/local 4256 else 4257 kde_cv_pythondir="$PYTHONDIR" 4258 fi 4259]) 4260 4261AC_ARG_WITH(pythondir, 4262[ --with-pythondir=pythondir use python installed in pythondir ], 4263[ 4264 ac_python_dir=$withval 4265], ac_python_dir=$kde_cv_pythondir 4266) 4267 4268AC_MSG_RESULT($ac_python_dir) 4269]) 4270 4271AC_DEFUN(KDE_CHECK_PYTHON_INTERN, 4272[ 4273AC_REQUIRE([KDE_CHECK_LIBDL]) 4274AC_REQUIRE([KDE_CHECK_LIBPTHREAD]) 4275AC_REQUIRE([KDE_CHECK_PYTHON_DIR]) 4276 4277if test -z "$1"; then 4278 version="1.5" 4279else 4280 version="$1" 4281fi 4282 4283AC_MSG_CHECKING([for Python$version]) 4284 4285python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes" 4286AC_FIND_FILE(Python.h, $python_incdirs, python_incdir) 4287if test ! -r $python_incdir/Python.h; then 4288 AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir) 4289 python_incdir=$python_incdir/python$version 4290 if test ! -r $python_incdir/Python.h; then 4291 python_incdir=no 4292 fi 4293fi 4294 4295PYTHONINC=-I$python_incdir 4296 4297python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs" 4298AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir) 4299if test ! -r $python_libdir/libpython$version.a; then 4300 AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir) 4301 python_libdir=$python_libdir/python$version/config 4302 if test ! -r $python_libdir/libpython$version.a; then 4303 python_libdir=no 4304 fi 4305fi 4306 4307PYTHONLIB=-L$python_libdir 4308kde_orig_LIBPYTHON=$LIBPYTHON 4309if test -z "$LIBPYTHON"; then 4310 LIBPYTHON=-lpython$version 4311fi 4312 4313python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs" 4314AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir) 4315python_moddir=$python_moddir/python$version 4316if test ! -r $python_moddir/copy.py; then 4317 python_moddir=no 4318fi 4319 4320PYTHONMODDIR=$python_moddir 4321 4322AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir) 4323 4324if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then 4325 LIBPYTHON=$kde_orig_LIBPYTHON 4326 test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB="" 4327 test "x$PYTHONINC" = "x-Ino" && PYTHONINC="" 4328 $2 4329else 4330 dnl Note: this test is very weak 4331 kde_python_link_found=no 4332 KDE_TRY_LINK_PYTHON(normal) 4333 KDE_TRY_LINK_PYTHON(m, -lm) 4334 KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD) 4335 KDE_TRY_LINK_PYTHON(tcl, -ltcl) 4336 KDE_TRY_LINK_PYTHON(db2, -ldb2) 4337 KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm]) 4338 KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil]) 4339 KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil]) 4340 KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3]) 4341 KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil]) 4342 KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm]) 4343 KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [], 4344 [AC_MSG_WARN([it seems, Python depends on another library. 4345 Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this 4346 and contact the authors to let them know about this problem]) 4347 ]) 4348 4349 LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET" 4350 AC_SUBST(PYTHONINC) 4351 AC_SUBST(PYTHONLIB) 4352 AC_SUBST(LIBPYTHON) 4353 AC_SUBST(PYTHONMODDIR) 4354 AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python]) 4355fi 4356 4357]) 4358 4359 4360AC_DEFUN(KDE_CHECK_PYTHON, 4361[ 4362 KDE_CHECK_PYTHON_INTERN("2.2", 4363 [KDE_CHECK_PYTHON_INTERN("2.1", 4364 [KDE_CHECK_PYTHON_INTERN("2.0", [ KDE_CHECK_PYTHON_INTERN($1, $2) ]) 4365 ])]) 4366]) 4367 4368AC_DEFUN(KDE_CHECK_STL_SGI, 4369[ 4370 AC_MSG_CHECKING([if STL implementation is SGI like]) 4371 AC_CACHE_VAL(kde_cv_stl_type_sgi, 4372 [ 4373 AC_TRY_COMPILE([ 4374#include <string> 4375using namespace std; 4376],[ 4377 string astring="Hallo Welt."; 4378 astring.erase(0, 6); // now astring is "Welt" 4379 return 0; 4380], kde_cv_stl_type_sgi=yes, 4381 kde_cv_stl_type_sgi=no) 4382]) 4383 4384 AC_MSG_RESULT($kde_cv_stl_type_sgi) 4385 4386 if test "$kde_cv_stl_type_sgi" = "yes"; then 4387 AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI]) 4388 fi 4389]) 4390 4391AC_DEFUN(KDE_CHECK_STL_HP, 4392[ 4393 AC_MSG_CHECKING([if STL implementation is HP like]) 4394 AC_CACHE_VAL(kde_cv_stl_type_hp, 4395 [ 4396 AC_TRY_COMPILE([ 4397#include <string> 4398using namespace std; 4399],[ 4400 string astring="Hello World"; 4401 astring.remove(0, 6); // now astring is "World" 4402 return 0; 4403], kde_cv_stl_type_hp=yes, 4404 kde_cv_stl_type_hp=no) 4405]) 4406 AC_MSG_RESULT($kde_cv_stl_type_hp) 4407 4408 if test "$kde_cv_stl_type_hp" = "yes"; then 4409 AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP]) 4410 fi 4411]) 4412 4413AC_DEFUN(KDE_CHECK_STL, 4414[ 4415 AC_LANG_SAVE 4416 AC_LANG_CPLUSPLUS 4417 ac_save_CXXFLAGS="$CXXFLAGS" 4418 CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`" 4419 KDE_CHECK_STL_SGI 4420 4421 if test "$kde_cv_stl_type_sgi" = "no"; then 4422 KDE_CHECK_STL_HP 4423 4424 if test "$kde_cv_stl_type_hp" = "no"; then 4425 AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?") 4426 fi 4427 fi 4428 4429 CXXFLAGS="$ac_save_CXXFLAGS" 4430 AC_LANG_RESTORE 4431]) 4432 4433AC_DEFUN(AC_FIND_QIMGIO, 4434 [AC_REQUIRE([AC_FIND_JPEG]) 4435AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) 4436AC_MSG_CHECKING([for qimgio]) 4437AC_CACHE_VAL(ac_cv_lib_qimgio, 4438[ 4439AC_LANG_SAVE 4440AC_LANG_CPLUSPLUS 4441ac_save_LIBS="$LIBS" 4442ac_save_CXXFLAGS="$CXXFLAGS" 4443LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT" 4444CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" 4445AC_TRY_RUN(dnl 4446[ 4447#include <qimageio.h> 4448#include <qstring.h> 4449int main() { 4450 QString t = "hallo"; 4451 t.fill('t'); 4452 qInitImageIO(); 4453} 4454], 4455 ac_cv_lib_qimgio=yes, 4456 ac_cv_lib_qimgio=no, 4457 ac_cv_lib_qimgio=no) 4458LIBS="$ac_save_LIBS" 4459CXXFLAGS="$ac_save_CXXFLAGS" 4460AC_LANG_RESTORE 4461])dnl 4462if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then 4463 LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG" 4464 AC_MSG_RESULT(yes) 4465 AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available]) 4466 AC_SUBST(LIBQIMGIO) 4467else 4468 AC_MSG_RESULT(not found) 4469fi 4470]) 4471 4472AC_DEFUN(KDE_CHECK_ANSI, 4473[ 4474]) 4475 4476AC_DEFUN(KDE_CHECK_INSURE, 4477[ 4478 AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]], 4479 [ 4480 if test $enableval = "no"; dnl 4481 then ac_use_insure="no" 4482 else ac_use_insure="yes" 4483 fi 4484 ], [ac_use_insure="no"]) 4485 4486 AC_MSG_CHECKING(if we will use Insure++ to debug) 4487 AC_MSG_RESULT($ac_use_insure) 4488 if test "$ac_use_insure" = "yes"; dnl 4489 then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "???? 4490 fi 4491]) 4492 4493AC_DEFUN(AM_DISABLE_LIBRARIES, 4494[ 4495 AC_PROVIDE([AM_ENABLE_STATIC]) 4496 AC_PROVIDE([AM_ENABLE_SHARED]) 4497 enable_static=no 4498 enable_shared=yes 4499]) 4500 4501 4502AC_DEFUN(AC_CHECK_UTMP_FILE, 4503[ 4504 AC_MSG_CHECKING([for utmp file]) 4505 4506 AC_CACHE_VAL(kde_cv_utmp_file, 4507 [ 4508 kde_cv_utmp_file=no 4509 4510 for ac_file in \ 4511 \ 4512 /var/run/utmp \ 4513 /var/adm/utmp \ 4514 /etc/utmp \ 4515 ; \ 4516 do 4517 if test -r "$ac_file"; then 4518 kde_cv_utmp_file=$ac_file 4519 break 4520 fi 4521 done 4522 ]) 4523 4524 if test "$kde_cv_utmp_file" != "no"; then 4525 AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries]) 4526 $1 4527 AC_MSG_RESULT($kde_cv_utmp_file) 4528 else 4529 $2 4530 AC_MSG_RESULT([non found]) 4531 fi 4532]) 4533 4534 4535AC_DEFUN(KDE_CREATE_SUBDIRSLIST, 4536[ 4537 4538DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin" 4539 4540if test ! -s $srcdir/subdirs; then 4541 dnl Note: Makefile.common creates subdirs, so this is just a fallback 4542 TOPSUBDIRS="" 4543 files=`cd $srcdir && ls -1` 4544 dirs=`for i in $files; do if test -d $i; then echo $i; fi; done` 4545 for i in $dirs; do 4546 echo $i >> $srcdir/subdirs 4547 done 4548fi 4549 4550if test -s $srcdir/inst-apps; then 4551 ac_topsubdirs="`cat $srcdir/inst-apps`" 4552else 4553 ac_topsubdirs="`cat $srcdir/subdirs`" 4554fi 4555 4556for i in $ac_topsubdirs; do 4557 AC_MSG_CHECKING([if $i should be compiled]) 4558 if test -d $srcdir/$i; then 4559 install_it="yes" 4560 for j in $DO_NOT_COMPILE; do 4561 if test $i = $j; then 4562 install_it="no" 4563 fi 4564 done 4565 else 4566 install_it="no" 4567 fi 4568 AC_MSG_RESULT($install_it) 4569 vari=`echo $i | sed -e 's,[[-+.]],_,g'` 4570 if test $install_it = "yes"; then 4571 TOPSUBDIRS="$TOPSUBDIRS $i" 4572 eval "$vari""_SUBDIR_included=yes" 4573 else 4574 eval "$vari""_SUBDIR_included=no" 4575 fi 4576done 4577 4578AC_SUBST(TOPSUBDIRS) 4579]) 4580 4581AC_DEFUN(KDE_CHECK_NAMESPACES, 4582[ 4583AC_MSG_CHECKING(whether C++ compiler supports namespaces) 4584AC_LANG_SAVE 4585AC_LANG_CPLUSPLUS 4586AC_TRY_COMPILE([ 4587], 4588[ 4589namespace Foo { 4590 extern int i; 4591 namespace Bar { 4592 extern int i; 4593 } 4594} 4595 4596int Foo::i = 0; 4597int Foo::Bar::i = 1; 4598],[ 4599 AC_MSG_RESULT(yes) 4600 AC_DEFINE(HAVE_NAMESPACES) 4601], [ 4602AC_MSG_RESULT(no) 4603]) 4604AC_LANG_RESTORE 4605]) 4606 4607AC_DEFUN(KDE_CHECK_NEWLIBS, 4608[ 4609 4610]) 4611 4612dnl ------------------------------------------------------------------------ 4613dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org 4614dnl ------------------------------------------------------------------------ 4615dnl 4616AC_DEFUN(AC_CHECK_S_ISSOCK, 4617[ 4618AC_MSG_CHECKING(for S_ISSOCK) 4619AC_CACHE_VAL(ac_cv_have_s_issock, 4620[ 4621AC_LANG_SAVE 4622AC_LANG_C 4623AC_TRY_LINK( 4624[ 4625#include <sys/stat.h> 4626], 4627[ 4628struct stat buff; 4629int b = S_ISSOCK( buff.st_mode ); 4630], 4631ac_cv_have_s_issock=yes, 4632ac_cv_have_s_issock=no) 4633AC_LANG_RESTORE 4634]) 4635AC_MSG_RESULT($ac_cv_have_s_issock) 4636if test "$ac_cv_have_s_issock" = "yes"; then 4637 AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.]) 4638fi 4639 4640AH_VERBATIM(_ISSOCK, 4641[ 4642#ifndef HAVE_S_ISSOCK 4643#define HAVE_S_ISSOCK 4644#define S_ISSOCK(mode) (1==0) 4645#endif 4646]) 4647 4648]) 4649 4650dnl ------------------------------------------------------------------------ 4651dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org 4652dnl ------------------------------------------------------------------------ 4653dnl 4654AC_DEFUN(AC_CHECK_KDEMAXPATHLEN, 4655[ 4656AC_MSG_CHECKING(for MAXPATHLEN) 4657AC_CACHE_VAL(ac_cv_maxpathlen, 4658[ 4659AC_LANG_C 4660cat > conftest.$ac_ext <<EOF 4661#ifdef STDC_HEADERS 4662# include <stdlib.h> 4663#endif 4664#include <stdio.h> 4665#include <sys/param.h> 4666#ifndef MAXPATHLEN 4667#define MAXPATHLEN 1024 4668#endif 4669 4670KDE_HELLO MAXPATHLEN 4671 4672EOF 4673 4674ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out" 4675 4676if AC_TRY_EVAL(ac_try) && test -s conftest.out; then 4677 ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out` 4678else 4679 ac_cv_maxpathlen=1024 4680fi 4681 4682rm conftest.* 4683 4684]) 4685AC_MSG_RESULT($ac_cv_maxpathlen) 4686AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] ) 4687]) 4688 4689dnl ------------------------------------------------------------------------- 4690dnl See if the compiler supports a template repository bero@redhat.de 4691dnl ------------------------------------------------------------------------- 4692AC_DEFUN(KDE_COMPILER_REPO, 4693[ 4694 REPO="" 4695 NOREPO="" 4696 4697 KDE_CHECK_COMPILER_FLAG(frepo, 4698 [ 4699 REPO="-frepo" 4700 NOREPO="-fno-repo" 4701 ]) 4702 4703 if test -z "$REPO"; then 4704 KDE_CHECK_COMPILER_FLAG(instances=explicit, 4705 [ 4706 REPO="-instances=explicit" 4707 NOREPO="-instances=extern" 4708 ]) 4709 fi 4710 4711 if test -n "$REPO"; then 4712 AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1, 4713 [C++ compiler supports template repository]) 4714 $1 4715 fi 4716 4717 AC_SUBST(REPO) 4718 AC_SUBST(NOREPO) 4719]) 4720 4721AC_DEFUN(KDE_CHECK_HEADER, 4722[ 4723 AC_LANG_SAVE 4724 kde_safe_cppflags=$CPPFLAGS 4725 CPPFLAGS="$CPPFLAGS $all_includes" 4726 AC_LANG_CPLUSPLUS 4727 AC_CHECK_HEADER($1, $2, $3) 4728 CPPFLAGS=$kde_safe_cppflags 4729 AC_LANG_RESTORE 4730]) 4731 4732AC_DEFUN(KDE_CHECK_HEADERS, 4733[ 4734 AH_CHECK_HEADERS([$1]) 4735 AC_LANG_SAVE 4736 kde_safe_cppflags=$CPPFLAGS 4737 CPPFLAGS="$CPPFLAGS $all_includes" 4738 AC_LANG_CPLUSPLUS 4739 AC_CHECK_HEADERS([$1], [$2], [$3], [$4]) 4740 CPPFLAGS=$kde_safe_cppflags 4741 AC_LANG_RESTORE 4742]) 4743 4744AC_DEFUN(KDE_FAST_CONFIGURE, 4745[ 4746 dnl makes configure fast (needs perl) 4747 AC_ARG_ENABLE(fast-perl, [ --disable-fast-perl disable fast Makefile generation (needs perl)], 4748 with_fast_perl=$enableval, with_fast_perl=yes) 4749]) 4750 4751AC_DEFUN(KDE_CONF_FILES, 4752[ 4753 val= 4754 if test -f $srcdir/configure.files ; then 4755 val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files` 4756 fi 4757 CONF_FILES= 4758 if test -n "$val" ; then 4759 for i in $val ; do 4760 CONF_FILES="$CONF_FILES $i" 4761 done 4762 fi 4763 AC_SUBST(CONF_FILES) 4764])dnl 4765 4766AC_DEFUN(KDE_SET_PREFIX, 4767[ 4768 unset CDPATH 4769 dnl make $KDEDIR the default for the installation 4770 AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde}) 4771 4772 if test "x$prefix" = "xNONE"; then 4773 prefix=$ac_default_prefix 4774 ac_configure_args="$ac_configure_args --prefix=$prefix" 4775 fi 4776 # And delete superflous '/' to make compares easier 4777 prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'` 4778 exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'` 4779 KDE_FAST_CONFIGURE 4780 KDE_CONF_FILES 4781]) 4782 4783pushdef([AC_PROG_INSTALL], 4784[ 4785 dnl our own version, testing for a -p flag 4786 popdef([AC_PROG_INSTALL]) 4787 dnl as AC_PROG_INSTALL works as it works we first have 4788 dnl to save if the user didn't specify INSTALL, as the 4789 dnl autoconf one overwrites INSTALL and we have no chance to find 4790 dnl out afterwards 4791 test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL 4792 test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM 4793 test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT 4794 AC_PROG_INSTALL 4795 4796 if test -z "$kde_save_INSTALL_given" ; then 4797 # OK, user hasn't given any INSTALL, autoconf found one for us 4798 # now we test, if it supports the -p flag 4799 AC_MSG_CHECKING(for -p flag to install) 4800 rm -f confinst.$$.* > /dev/null 2>&1 4801 echo "Testtest" > confinst.$$.orig 4802 ac_res=no 4803 if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then 4804 if test -f confinst.$$.new ; then 4805 # OK, -p seems to do no harm to install 4806 INSTALL="${INSTALL} -p" 4807 ac_res=yes 4808 fi 4809 fi 4810 rm -f confinst.$$.* 4811 AC_MSG_RESULT($ac_res) 4812 fi 4813 dnl the following tries to resolve some signs and wonders coming up 4814 dnl with different autoconf/automake versions 4815 dnl e.g.: 4816 dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s 4817 dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS) 4818 dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s 4819 dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has 4820 dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the 4821 dnl install-@DIR@PROGRAMS targets to explicitly use that flag 4822 dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as 4823 dnl INSTALL_SCRIPT, which breaks with automake <= 1.4 4824 dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure 4825 dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from 4826 dnl automake (due to broken Makefile.am or whatever) to install programs, 4827 dnl and so does not see the -s flag in automake > 1.4 4828 dnl to clean up that mess we: 4829 dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG 4830 dnl which cleans KDE's program with automake > 1.4; 4831 dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems 4832 dnl with automake<=1.4 4833 dnl note that dues to this sometimes two '-s' flags are used (if KDE 4834 dnl properly uses install-@DIR@PROGRAMS, but I don't care 4835 dnl 4836 dnl And to all this comes, that I even can't write in comments variable 4837 dnl names used by automake, because it is so stupid to think I wanted to 4838 dnl _use_ them, therefor I have written A_M_... instead of AM_ 4839 dnl hmm, I wanted to say something ... ahh yes: Arghhh. 4840 4841 if test -z "$kde_save_INSTALL_PROGRAM_given" ; then 4842 INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)' 4843 fi 4844 if test -z "$kde_save_INSTALL_SCRIPT_given" ; then 4845 INSTALL_SCRIPT='${INSTALL}' 4846 fi 4847])dnl 4848 4849AC_DEFUN(KDE_LANG_CPLUSPLUS, 4850[AC_LANG_CPLUSPLUS 4851ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' 4852pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS]) 4853]) 4854 4855pushdef([AC_LANG_CPLUSPLUS], 4856[popdef([AC_LANG_CPLUSPLUS]) 4857KDE_LANG_CPLUSPLUS 4858]) 4859 4860AC_DEFUN(KDE_CHECK_LONG_LONG, 4861[ 4862AC_MSG_CHECKING(for long long) 4863AC_CACHE_VAL(kde_cv_c_long_long, 4864[ 4865 AC_LANG_SAVE 4866 AC_LANG_CPLUSPLUS 4867 AC_TRY_LINK([], [ 4868 long long foo = 0; 4869 foo = foo+1; 4870 ], 4871 kde_cv_c_long_long=yes, kde_cv_c_long_long=no) 4872 AC_LANG_RESTORE 4873]) 4874AC_MSG_RESULT($kde_cv_c_long_long) 4875if test "$kde_cv_c_long_long" = yes; then 4876 AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype]) 4877fi 4878]) 4879 4880AC_DEFUN(KDE_CHECK_LIB, 4881[ 4882 kde_save_LDFLAGS="$LDFLAGS" 4883 dnl AC_CHECK_LIB modifies LIBS, so save it here 4884 kde_save_LIBS="$LIBS" 4885 LDFLAGS="$LDFLAGS $all_libraries" 4886 case $host_os in 4887 aix*) LDFLAGS="-brtl $LDFLAGS" 4888 test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS" 4889 ;; 4890 esac 4891 AC_CHECK_LIB($1, $2, $3, $4, $5) 4892 LDFLAGS="$kde_save_LDFLAGS" 4893 LIBS="$kde_save_LIBS" 4894]) 4895 4896AC_DEFUN(KDE_JAVA_PREFIX, 4897[ 4898 dir=`dirname "$1"` 4899 base=`basename "$1"` 4900 list=`ls -1 $dir 2> /dev/null` 4901 for entry in $list; do 4902 if test -d $dir/$entry/bin; then 4903 case $entry in 4904 $base) 4905 javadirs="$javadirs $dir/$entry/bin" 4906 ;; 4907 esac 4908 elif test -d $dir/$entry/jre/bin; then 4909 case $entry in 4910 $base) 4911 javadirs="$javadirs $dir/$entry/jre/bin" 4912 ;; 4913 esac 4914 fi 4915 done 4916]) 4917 4918dnl KDE_CHEC_JAVA_DIR(onlyjre) 4919AC_DEFUN(KDE_CHECK_JAVA_DIR, 4920[ 4921 4922AC_ARG_WITH(java, 4923[ --with-java=javadir use java installed in javadir, --without-java disables ], 4924[ ac_java_dir=$withval 4925], ac_java_dir="" 4926) 4927 4928AC_MSG_CHECKING([for Java]) 4929 4930dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH 4931if test "x$ac_java_dir" = "xno"; then 4932 kde_java_bindir=no 4933 kde_java_includedir=no 4934 kde_java_libjvmdir=no 4935 kde_java_libhpidir=no 4936else 4937 if test "x$ac_java_dir" = "x"; then 4938 4939 4940 dnl No option set -> look in $PATH 4941 KDE_JAVA_PREFIX(/usr/j2se) 4942 KDE_JAVA_PREFIX(/usr/j*dk*) 4943 KDE_JAVA_PREFIX(/usr/lib/j*dk*) 4944 KDE_JAVA_PREFIX(/opt/j*sdk*) 4945 KDE_JAVA_PREFIX(/usr/lib/java*) 4946 KDE_JAVA_PREFIX(/usr/java*) 4947 KDE_JAVA_PREFIX(/usr/lib/SunJava2*) 4948 KDE_JAVA_PREFIX(/usr/lib/SunJava*) 4949 KDE_JAVA_PREFIX(/usr/lib/IBMJava2*) 4950 KDE_JAVA_PREFIX(/usr/lib/IBMJava*) 4951 KDE_JAVA_PREFIX(/opt/java*) 4952 4953 kde_cv_path="NONE" 4954 kde_save_IFS=$IFS 4955 IFS=':' 4956 for dir in $PATH; do 4957 javadirs="$javadirs $dir" 4958 done 4959 IFS=$kde_save_IFS 4960 jredirs= 4961 4962 for dir in $javadirs; do 4963 if test ! -d $dir; then break; fi 4964 if test -x "$dir/java"; then 4965 libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1` 4966 if test ! -f $libjvmdir/libjvm.so; then continue; fi 4967 jredirs="$jredirs $dir" 4968 fi 4969 done 4970 4971 JAVAC= 4972 JAVA= 4973 kde_java_bindir=no 4974 for dir in $jredirs; do 4975 JAVA="$dir/java" 4976 kde_java_bindir=$dir 4977 if test -x "$dir/javac"; then 4978 JAVAC="$dir/javac" 4979 break 4980 fi 4981 done 4982 4983 if test -n "$JAVAC"; then 4984 dnl this substitution might not work - well, we test for jni.h below 4985 kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'` 4986 else 4987 kde_java_includedir=no 4988 fi 4989 else 4990 dnl config option set 4991 kde_java_bindir=$ac_java_dir/bin 4992 if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then 4993 kde_java_includedir=no 4994 else 4995 kde_java_includedir=$ac_java_dir/include 4996 fi 4997 fi 4998fi 4999 5000dnl At this point kde_java_bindir and kde_java_includedir are either set or "no" 5001if test "x$kde_java_bindir" != "xno"; then 5002 5003 dnl Look for libjvm.so 5004 kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1` 5005 dnl Look for libhpi.so and avoid green threads 5006 kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1` 5007 5008 dnl Now check everything's fine under there 5009 dnl the include dir is our flag for having the JDK 5010 if test -d "$kde_java_includedir"; then 5011 if test ! -x "$kde_java_bindir/javac"; then 5012 AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.]) 5013 fi 5014 if test ! -x "$kde_java_bindir/javah"; then 5015 AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.]) 5016 fi 5017 if test ! -x "$kde_java_bindir/jar"; then 5018 AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.]) 5019 fi 5020 if test ! -r "$kde_java_includedir/jni.h"; then 5021 AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.]) 5022 fi 5023 5024 jni_includes="-I$kde_java_includedir" 5025 dnl Strange thing, jni.h requires jni_md.h which is under genunix here.. 5026 dnl and under linux here.. 5027 test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux" 5028 test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris" 5029 test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix" 5030 5031 else 5032 JAVAC= 5033 jni_includes= 5034 fi 5035 5036 if test ! -r "$kde_java_libjvmdir/libjvm.so"; then 5037 AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.]) 5038 fi 5039 5040 if test ! -x "$kde_java_bindir/java"; then 5041 AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.]) 5042 fi 5043 5044 if test ! -r "$kde_java_libhpidir/libhpi.so"; then 5045 AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.]) 5046 fi 5047 5048 if test -n "$jni_includes"; then 5049 dnl Check for JNI version 5050 AC_LANG_SAVE 5051 AC_LANG_CPLUSPLUS 5052 ac_cxxflags_safe="$CXXFLAGS" 5053 CXXFLAGS="$CXXFLAGS $all_includes $jni_includes" 5054 5055 AC_TRY_COMPILE([ 5056 #include <jni.h> 5057 ], 5058 [ 5059 #ifndef JNI_VERSION_1_2 5060 Syntax Error 5061 #endif 5062 ],[ kde_jni_works=yes ], 5063 [ kde_jni_works=no ]) 5064 5065 if test $kde_jni_works = no; then 5066 AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h. 5067 You need to have Java Development Kit (JDK) version 1.2. 5068 5069 Use --with-java to specify another location. 5070 Use --without-java to configure without java support. 5071 Or download a newer JDK and try again. 5072 See e.g. http://java.sun.com/products/jdk/1.2 ]) 5073 fi 5074 5075 CXXFLAGS="$ac_cxxflags_safe" 5076 AC_LANG_RESTORE 5077 5078 dnl All tests ok, inform and subst the variables 5079 5080 JAVAC=$kde_java_bindir/javac 5081 JAVAH=$kde_java_bindir/javah 5082 JAR=$kde_java_bindir/jar 5083 AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is]) 5084 JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi" 5085 AC_MSG_RESULT([java JDK in $kde_java_bindir]) 5086 5087 else 5088 AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is]) 5089 AC_MSG_RESULT([java JRE in $kde_java_bindir]) 5090 fi 5091else # no 5092 AC_MSG_RESULT([none found]) 5093fi 5094 5095AC_SUBST(JAVAC) 5096AC_SUBST(JAVAH) 5097AC_SUBST(JAR) 5098AC_SUBST(JVMLIBS) 5099AC_SUBST(jni_includes) 5100 5101# for backward compat 5102kde_cv_java_includedir=$kde_java_includedir 5103kde_cv_java_bindir=$kde_java_bindir 5104]) 5105 5106dnl this is a redefinition of autoconf 2.5x's AC_FOREACH. 5107dnl When the argument list becomes big, as in KDE for AC_OUTPUT in 5108dnl big packages, m4_foreach is dog-slow. So use our own version of 5109dnl it. (matz@kde.org) 5110m4_define([mm_foreach], 5111[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])]) 5112m4_define([mm_car], [[$1]]) 5113m4_define([mm_car2], [[$@]]) 5114m4_define([_mm_foreach], 5115[m4_if(m4_quote($2), [], [], 5116 [m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1], 5117 mm_car2(m4_shift($2)), 5118 [$3])])]) 5119m4_define([AC_FOREACH], 5120[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])]) 5121 5122AC_DEFUN(KDE_NEED_FLEX, 5123[ 5124kde_libs_safe=$LIBS 5125LIBS="$LIBS $USER_LDFLAGS" 5126AM_PROG_LEX 5127LIBS=$kde_libs_safe 5128if test -z "$LEXLIB"; then 5129 AC_MSG_ERROR([You need to have flex installed.]) 5130fi 5131AC_SUBST(LEXLIB) 5132]) 5133 5134AC_DEFUN(AC_PATH_QTOPIA, 5135[ 5136 dnl TODO: use AC_CACHE_VAL 5137 5138 if test -z "$1"; then 5139 qtopia_minver_maj=1 5140 qtopia_minver_min=5 5141 qtopia_minver_pat=0 5142 else 5143 qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"` 5144 qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"` 5145 qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"` 5146 fi 5147 5148 qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat" 5149 qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat" 5150 5151 AC_REQUIRE([AC_PATH_QT]) 5152 5153 AC_MSG_CHECKING([for Qtopia]) 5154 5155 LIB_QTOPIA="-lqpe" 5156 AC_SUBST(LIB_QTOPIA) 5157 5158 kde_qtopia_dirs="$QPEDIR /opt/Qtopia" 5159 5160 ac_qtopia_incdir=NO 5161 5162 AC_ARG_WITH(qtopia-dir, 5163 [ --with-qtopia-dir=DIR where the root of Qtopia is installed ], 5164 [ ac_qtopia_incdir="$withval"/include] ) 5165 5166 qtopia_incdirs="" 5167 for dir in $kde_qtopia_dirs; do 5168 qtopia_incdirs="$qtopia_incdirs $dir/include" 5169 done 5170 5171 if test ! "$ac_qtopia_incdir" = "NO"; then 5172 qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs" 5173 fi 5174 5175 qtopia_incdir="" 5176 AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir) 5177 ac_qtopia_incdir="$qtopia_incdir" 5178 5179 if test -z "$qtopia_incdir"; then 5180 AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.]) 5181 fi 5182 5183 qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`; 5184 qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`; 5185 qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`; 5186 5187 qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat" 5188 qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat" 5189 if test "$qtopia_ver" -lt "$qtopia_minver"; then 5190 AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr 5191is required.]) 5192 fi 5193 5194 AC_LANG_SAVE 5195 AC_LANG_CPLUSPLUS 5196 5197 ac_cxxflags_safe="$CXXFLAGS" 5198 ac_ldflags_safe="$LDFLAGS" 5199 ac_libs_safe="$LIBS" 5200 5201 CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes" 5202 LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS" 5203 LIBS="$LIBS $LIB_QTOPIA $LIBQT" 5204 5205 cat > conftest.$ac_ext <<EOF 5206#include "confdefs.h" 5207#include <qpe/qpeapplication.h> 5208#include <qpe/version.h> 5209 5210int main( int argc, char **argv ) 5211{ 5212 QPEApplication app( argc, argv ); 5213 return 0; 5214} 5215EOF 5216 5217 if AC_TRY_EVAL(ac_link) && test -s conftest; then 5218 rm -f conftest* 5219 else 5220 rm -f conftest* 5221 AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at 5222the end of config.log]) 5223 fi 5224 5225 CXXFLAGS="$ac_cxxflags_safe" 5226 LDFLAGS="$ac_ldflags_safe" 5227 LIBS="$ac_libs_safe" 5228 5229 AC_LANG_RESTORE 5230 5231 QTOPIA_INCLUDES="-I$qtopia_incdir" 5232 AC_SUBST(QTOPIA_INCLUDES) 5233 5234 AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir]) 5235]) 5236 5237 5238AC_DEFUN(KDE_INIT_DOXYGEN, 5239[ 5240AC_MSG_CHECKING([for Qt docs]) 5241kde_qtdir= 5242if test "${with_qt_dir+set}" = set; then 5243 kde_qtdir="$with_qt_dir" 5244fi 5245 5246AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc], QTDOCDIR) 5247AC_MSG_RESULT($QTDOCDIR) 5248 5249AC_SUBST(QTDOCDIR) 5250 5251KDE_FIND_PATH(dot, DOT, [], []) 5252if test -n "$DOT"; then 5253 KDE_HAVE_DOT="YES" 5254else 5255 KDE_HAVE_DOT="NO" 5256fi 5257AC_SUBST(KDE_HAVE_DOT) 5258KDE_FIND_PATH(doxygen, DOXYGEN, [], []) 5259AC_SUBST(DOXYGEN) 5260 5261DOXYGEN_PROJECT_NAME="$1" 5262DOXYGEN_PROJECT_NUMBER="$2" 5263AC_SUBST(DOXYGEN_PROJECT_NAME) 5264AC_SUBST(DOXYGEN_PROJECT_NUMBER) 5265 5266KDE_HAS_DOXYGEN=no 5267if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then 5268 KDE_HAS_DOXYGEN=yes 5269fi 5270AC_SUBST(KDE_HAS_DOXYGEN) 5271 5272]) 5273 5274 5275AC_DEFUN(AC_FIND_BZIP2, 5276[ 5277AC_MSG_CHECKING([for bzDecompress in libbz2]) 5278AC_CACHE_VAL(ac_cv_lib_bzip2, 5279[ 5280AC_LANG_C 5281kde_save_LIBS="$LIBS" 5282LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET" 5283kde_save_CFLAGS="$CFLAGS" 5284CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" 5285AC_TRY_LINK(dnl 5286[ 5287#define BZ_NO_STDIO 5288#include<bzlib.h> 5289], 5290 [ bz_stream s; (void) bzDecompress(&s); ], 5291 eval "ac_cv_lib_bzip2='-lbz2'", 5292 eval "ac_cv_lib_bzip2=no") 5293LIBS="$kde_save_LIBS" 5294CFLAGS="$kde_save_CFLAGS" 5295])dnl 5296AC_MSG_RESULT($ac_cv_lib_bzip2) 5297 5298if test ! "$ac_cv_lib_bzip2" = no; then 5299 BZIP2DIR=bzip2 5300 5301 LIBBZ2="$ac_cv_lib_bzip2" 5302 AC_SUBST(LIBBZ2) 5303 5304else 5305 5306 cxx_shared_flags= 5307 KDE_CHECK_COMPILER_FLAG(shared, [ 5308 cxx_shared_flag="-shared" 5309 ]) 5310 5311 AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2]) 5312 AC_CACHE_VAL(ac_cv_lib_bzip2_prefix, 5313 [ 5314 AC_LANG_C 5315 kde_save_LIBS="$LIBS" 5316 LIBS="$all_libraries $USER_LDFLAGS $cxx_shared_flag -lbz2 $LIBSOCKET" 5317 kde_save_CFLAGS="$CFLAGS" 5318 CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" 5319 5320 AC_TRY_LINK(dnl 5321 [ 5322 #define BZ_NO_STDIO 5323 #include<bzlib.h> 5324 ], 5325 [ bz_stream s; (void) BZ2_bzDecompress(&s); ], 5326 eval "ac_cv_lib_bzip2_prefix='-lbz2'", 5327 eval "ac_cv_lib_bzip2_prefix=no") 5328 LIBS="$kde_save_LIBS" 5329 CFLAGS="$kde_save_CFLAGS" 5330 ])dnl 5331 5332 AC_MSG_RESULT($ac_cv_lib_bzip2_prefix) 5333 5334 5335 5336 if test ! "$ac_cv_lib_bzip2_prefix" = no; then 5337 BZIP2DIR=bzip2 5338 5339 LIBBZ2="$ac_cv_lib_bzip2_prefix" 5340 AC_SUBST(LIBBZ2) 5341 5342 AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix]) 5343 dnl else, we just ignore this 5344 fi 5345 5346fi 5347AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR") 5348]) 5349 5350dnl ------------------------------------------------------------------------ 5351dnl Try to find the SSL headers and libraries. 5352dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed) 5353dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed) 5354dnl ------------------------------------------------------------------------ 5355dnl 5356AC_DEFUN(KDE_CHECK_SSL, 5357[ 5358LIBSSL="-lssl -lcrypto" 5359AC_REQUIRE([KDE_CHECK_LIB64]) 5360 5361ac_ssl_includes=NO ac_ssl_libraries=NO 5362ssl_libraries="" 5363ssl_includes="" 5364AC_ARG_WITH(ssl-dir, 5365 [ --with-ssl-dir=DIR where the root of OpenSSL is installed], 5366 [ ac_ssl_includes="$withval"/include 5367 ac_ssl_libraries="$withval"/lib$kdelibsuff 5368 ]) 5369 5370want_ssl=yes 5371AC_ARG_WITH(ssl, 5372 [ --without-ssl disable SSL checks], 5373 [want_ssl=$withval]) 5374 5375if test $want_ssl = yes; then 5376 5377AC_MSG_CHECKING(for OpenSSL) 5378 5379AC_CACHE_VAL(ac_cv_have_ssl, 5380[#try to guess OpenSSL locations 5381 5382 ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes" 5383 ssl_incdirs="$ac_ssl_includes $ssl_incdirs" 5384 AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir) 5385 ac_ssl_includes="$ssl_incdir" 5386 5387 ssl_libdirs="/usr/lib$kdelibsuff /usr/local/lib$kdelibsuff /usr/ssl/lib$kdelibsuff /usr/local/ssl/lib$kdelibsuff $libdir $prefix/lib$kdelibsuff $exec_prefix/lib$kdelibsuff $kde_extra_libs" 5388 if test ! "$ac_ssl_libraries" = "NO"; then 5389 ssl_libdirs="$ac_ssl_libraries $ssl_libdirs" 5390 fi 5391 5392 test=NONE 5393 ssl_libdir=NONE 5394 for dir in $ssl_libdirs; do 5395 try="ls -1 $dir/libssl*" 5396 if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi 5397 done 5398 5399 ac_ssl_libraries="$ssl_libdir" 5400 5401 AC_LANG_SAVE 5402 AC_LANG_C 5403 5404 ac_cflags_safe="$CFLAGS" 5405 ac_ldflags_safe="$LDFLAGS" 5406 ac_libs_safe="$LIBS" 5407 5408 CFLAGS="$CFLAGS -I$ssl_incdir $all_includes" 5409 LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries" 5410 LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref" 5411 5412 AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();, 5413 ac_ssl_rsaref="yes" 5414 , 5415 ac_ssl_rsaref="no" 5416 ) 5417 5418 CFLAGS="$ac_cflags_safe" 5419 LDFLAGS="$ac_ldflags_safe" 5420 LIBS="$ac_libs_safe" 5421 5422 AC_LANG_RESTORE 5423 5424 if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then 5425 have_ssl=no 5426 else 5427 have_ssl=yes; 5428 fi 5429 5430 ]) 5431 5432 eval "$ac_cv_have_ssl" 5433 5434 AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes]) 5435 5436 AC_MSG_CHECKING([whether OpenSSL uses rsaref]) 5437 AC_MSG_RESULT($ac_ssl_rsaref) 5438 5439 AC_MSG_CHECKING([for easter eggs]) 5440 AC_MSG_RESULT([none found]) 5441 5442else 5443 have_ssl=no 5444fi 5445 5446if test "$have_ssl" = yes; then 5447 AC_MSG_CHECKING(for OpenSSL version) 5448 dnl Check for SSL version 5449 AC_CACHE_VAL(ac_cv_ssl_version, 5450 [ 5451 AC_LANG_SAVE 5452 AC_LANG_C 5453 5454 cat >conftest.$ac_ext <<EOF 5455#include <openssl/opensslv.h> 5456#include <stdio.h> 5457 int main() { 5458 5459#ifndef OPENSSL_VERSION_NUMBER 5460 printf("ssl_version=\\"error\\"\n"); 5461#else 5462 if (OPENSSL_VERSION_NUMBER < 0x00906000) 5463 printf("ssl_version=\\"old\\"\n"); 5464 else 5465 printf("ssl_version=\\"ok\\"\n"); 5466#endif 5467 return (0); 5468 } 5469EOF 5470 5471 ac_compile='${CC-gcc} $CFLAGS -I$ac_ssl_includes conftest.$ac_ext -o conftest' 5472 if AC_TRY_EVAL(ac_compile); then 5473 5474 if eval `./conftest 2>&5`; then 5475 if test $ssl_version = error; then 5476 AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !]) 5477 else 5478 if test $ssl_version = old; then 5479 AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.]) 5480 have_ssl=no 5481 fi 5482 fi 5483 ac_cv_ssl_version="ssl_version=$ssl_version" 5484 else 5485 AC_MSG_ERROR([Your system couldn't run a small SSL test program. 5486 Check config.log, and if you can't figure it out, send a mail to 5487 David Faure <faure@kde.org>, attaching your config.log]) 5488 fi 5489 5490 else 5491 AC_MSG_ERROR([Your system couldn't link a small SSL test program. 5492 Check config.log, and if you can't figure it out, send a mail to 5493 David Faure <faure@kde.org>, attaching your config.log]) 5494 fi 5495 5496 AC_LANG_RESTORE 5497 5498 ]) 5499 5500 eval "$ac_cv_ssl_version" 5501 AC_MSG_RESULT($ssl_version) 5502fi 5503 5504if test "$have_ssl" != yes; then 5505 LIBSSL=""; 5506else 5507 AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL]) 5508 ac_cv_have_ssl="have_ssl=yes \ 5509 ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref" 5510 5511 5512 ssl_libraries="$ac_ssl_libraries" 5513 ssl_includes="$ac_ssl_includes" 5514 5515 if test "$ac_ssl_rsaref" = yes; then 5516 LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 5517 fi 5518 5519 if test $ssl_version = "old"; then 5520 AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6]) 5521 fi 5522fi 5523 5524if test "$ssl_includes" = "/usr/include" || test "$ssl_includes" = "/usr/local/include" || test -z "$ssl_includes"; then 5525 SSL_INCLUDES=""; 5526else 5527 SSL_INCLUDES="-I$ssl_includes" 5528fi 5529 5530if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries"; then 5531 SSL_LDFLAGS="" 5532else 5533 SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries" 5534fi 5535 5536AC_SUBST(SSL_INCLUDES) 5537AC_SUBST(SSL_LDFLAGS) 5538AC_SUBST(LIBSSL) 5539]) 5540 5541AC_DEFUN(KDE_CHECK_STRLCPY, 5542[ 5543 AC_CHECK_STRLCPY 5544 AC_CHECK_STRLCAT 5545 AC_CHECK_SIZEOF(size_t) 5546 AC_CHECK_SIZEOF(unsigned long) 5547 5548 AC_MSG_CHECKING([sizeof(size_t) == sizeof(unsigned long)]) 5549 AC_TRY_COMPILE(,[ 5550 #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG 5551 choke me 5552 #endif 5553 ],[AC_MSG_RESULT([yes])],[ 5554 AC_MSG_RESULT([no]) 5555 AC_MSG_ERROR([ 5556 Apparently on your system our assumption sizeof(size_t) == sizeof(unsigned long) 5557 does not apply. Please mail kde-devel@kde.org with a description of your system! 5558 ]) 5559 ]) 5560]) 5561 5562# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 5563## Copyright 1996, 1997, 1998, 1999, 2000, 2001 5564## Free Software Foundation, Inc. 5565## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 5566## 5567## This program is free software; you can redistribute it and/or modify 5568## it under the terms of the GNU General Public License as published by 5569## the Free Software Foundation; either version 2 of the License, or 5570## (at your option) any later version. 5571## 5572## This program is distributed in the hope that it will be useful, but 5573## WITHOUT ANY WARRANTY; without even the implied warranty of 5574## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5575## General Public License for more details. 5576## 5577## You should have received a copy of the GNU General Public License 5578## along with this program; if not, write to the Free Software 5579## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 5580## 5581## As a special exception to the GNU General Public License, if you 5582## distribute this file as part of a program that contains a 5583## configuration script generated by Autoconf, you may include it under 5584## the same distribution terms that you use for the rest of that program. 5585 5586# serial 47 AC_PROG_LIBTOOL 5587 5588# AC_PROG_LIBTOOL 5589# --------------- 5590AC_DEFUN([AC_PROG_LIBTOOL], 5591[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 5592dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 5593dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 5594 AC_PROVIDE_IFELSE([AC_PROG_CXX], 5595 [AC_LIBTOOL_CXX], 5596 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 5597 ])]) 5598 5599dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 5600dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 5601dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 5602 AC_PROVIDE_IFELSE([AC_PROG_GCJ], 5603 [AC_LIBTOOL_GCJ], 5604 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 5605 [AC_LIBTOOL_GCJ], 5606 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 5607 [AC_LIBTOOL_GCJ], 5608 [ifdef([AC_PROG_GCJ], 5609 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 5610 ifdef([A][M_PROG_GCJ], 5611 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 5612 ifdef([LT_AC_PROG_GCJ], 5613 [define([LT_AC_PROG_GCJ], 5614 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 5615])])# AC_PROG_LIBTOOL 5616 5617 5618# _AC_PROG_LIBTOOL 5619# ---------------- 5620AC_DEFUN([_AC_PROG_LIBTOOL], 5621[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 5622AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 5623AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 5624 5625# This can be used to rebuild libtool when needed 5626LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 5627 5628# Always use our own libtool. 5629LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent' 5630AC_SUBST(LIBTOOL)dnl 5631 5632# Prevent multiple expansion 5633define([AC_PROG_LIBTOOL], []) 5634])# _AC_PROG_LIBTOOL 5635 5636 5637# AC_LIBTOOL_SETUP 5638# ---------------- 5639AC_DEFUN([AC_LIBTOOL_SETUP], 5640[AC_PREREQ(2.50)dnl 5641AC_REQUIRE([AC_ENABLE_SHARED])dnl 5642AC_REQUIRE([AC_ENABLE_STATIC])dnl 5643AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 5644AC_REQUIRE([AC_CANONICAL_HOST])dnl 5645AC_REQUIRE([AC_CANONICAL_BUILD])dnl 5646AC_REQUIRE([AC_PROG_CC])dnl 5647AC_REQUIRE([AC_PROG_LD])dnl 5648AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 5649AC_REQUIRE([AC_PROG_NM])dnl 5650AC_REQUIRE([LT_AC_PROG_SED])dnl 5651 5652AC_REQUIRE([AC_PROG_LN_S])dnl 5653AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 5654# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 5655AC_REQUIRE([AC_OBJEXT])dnl 5656AC_REQUIRE([AC_EXEEXT])dnl 5657dnl 5658 5659AC_LIBTOOL_SYS_MAX_CMD_LEN 5660AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 5661AC_LIBTOOL_OBJDIR 5662 5663AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 5664_LT_AC_PROG_ECHO_BACKSLASH 5665 5666case $host_os in 5667aix3*) 5668 # AIX sometimes has problems with the GCC collect2 program. For some 5669 # reason, if we set the COLLECT_NAMES environment variable, the problems 5670 # vanish in a puff of smoke. 5671 if test "X${COLLECT_NAMES+set}" != Xset; then 5672 COLLECT_NAMES= 5673 export COLLECT_NAMES 5674 fi 5675 ;; 5676esac 5677 5678# Sed substitution that helps us do robust quoting. It backslashifies 5679# metacharacters that are still active within double-quoted strings. 5680Xsed='sed -e s/^X//' 5681[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 5682 5683# Same as above, but do not quote variable references. 5684[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 5685 5686# Sed substitution to delay expansion of an escaped shell variable in a 5687# double_quote_subst'ed string. 5688delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 5689 5690# Sed substitution to avoid accidental globbing in evaled expressions 5691no_glob_subst='s/\*/\\\*/g' 5692 5693# Constants: 5694rm="rm -f" 5695 5696# Global variables: 5697default_ofile=libtool 5698can_build_shared=yes 5699 5700# All known linkers require a `.a' archive for static linking (except M$VC, 5701# which needs '.lib'). 5702libext=a 5703ltmain="$ac_aux_dir/ltmain.sh" 5704ofile="$default_ofile" 5705with_gnu_ld="$lt_cv_prog_gnu_ld" 5706 5707AC_CHECK_TOOL(RANLIB, ranlib, :) 5708AC_CHECK_TOOL(STRIP, strip, :) 5709 5710old_CC="$CC" 5711old_CFLAGS="$CFLAGS" 5712 5713# Set sane defaults for various variables 5714test -z "$AR" && AR=ar 5715test -z "$AR_FLAGS" && AR_FLAGS=cru 5716test -z "$AS" && AS=as 5717test -z "$CC" && CC=cc 5718test -z "$LTCC" && LTCC=$CC 5719test -z "$DLLTOOL" && DLLTOOL=dlltool 5720test -z "$LD" && LD=ld 5721test -z "$LN_S" && LN_S="ln -s" 5722test -z "$MAGIC_CMD" && MAGIC_CMD=file 5723test -z "$NM" && NM=nm 5724test -z "$SED" && SED=sed 5725test -z "$OBJDUMP" && OBJDUMP=objdump 5726test -z "$RANLIB" && RANLIB=: 5727test -z "$STRIP" && STRIP=: 5728test -z "$ac_objext" && ac_objext=o 5729 5730# Determine commands to create old-style static archives. 5731old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' 5732old_postinstall_cmds='chmod 644 $oldlib' 5733old_postuninstall_cmds= 5734 5735if test -n "$RANLIB"; then 5736 case $host_os in 5737 openbsd*) 5738 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" 5739 ;; 5740 *) 5741 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" 5742 ;; 5743 esac 5744 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 5745fi 5746 5747# Only perform the check for file, if the check method requires it 5748case $deplibs_check_method in 5749file_magic*) 5750 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 5751 AC_PATH_MAGIC 5752 fi 5753 ;; 5754esac 5755 5756ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 5757ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], 5758enable_win32_dll=yes, enable_win32_dll=no) 5759 5760AC_ARG_ENABLE([libtool-lock], 5761 [AC_HELP_STRING([--disable-libtool-lock], 5762 [avoid locking (might break parallel builds)])]) 5763test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 5764 5765AC_ARG_WITH([pic], 5766 [AC_HELP_STRING([--with-pic], 5767 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 5768 [pic_mode="$withval"], 5769 [pic_mode=default]) 5770test -z "$pic_mode" && pic_mode=default 5771 5772# Use C for the default configuration in the libtool script 5773tagname= 5774AC_LIBTOOL_LANG_C_CONFIG 5775_LT_AC_TAGCONFIG 5776])# AC_LIBTOOL_SETUP 5777 5778 5779# _LT_AC_SYS_COMPILER 5780# ------------------- 5781AC_DEFUN([_LT_AC_SYS_COMPILER], 5782[AC_REQUIRE([AC_PROG_CC])dnl 5783 5784# If no C compiler was specified, use CC. 5785LTCC=${LTCC-"$CC"} 5786 5787# Allow CC to be a program name with arguments. 5788set dummy $CC 5789compiler="[$]2" 5790])# _LT_AC_SYS_COMPILER 5791 5792 5793# _LT_AC_SYS_LIBPATH_AIX 5794# ---------------------- 5795# Links a minimal program and checks the executable 5796# for the system default hardcoded library path. In most cases, 5797# this is /usr/lib:/lib, but when the MPI compilers are used 5798# the location of the communication and MPI libs are included too. 5799# If we don't find anything, use the default library path according 5800# to the aix ld manual. 5801AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 5802[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ 5803aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 5804}'` 5805# Check for a 64-bit object if we didn't find anything. 5806if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 5807}'`; fi],[]) 5808if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 5809])# _LT_AC_SYS_LIBPATH_AIX 5810 5811 5812# _LT_AC_PROG_ECHO_BACKSLASH 5813# -------------------------- 5814# Add some code to the start of the generated configure script which 5815# will find an echo command which doesn't interpret backslashes. 5816AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 5817[ifdef([AC_DIVERSION_NOTICE], 5818 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 5819 [AC_DIVERT_PUSH(NOTICE)]) 5820 5821# Check that we are running under the correct shell. 5822SHELL=${CONFIG_SHELL-/bin/sh} 5823 5824case X$ECHO in 5825X*--fallback-echo) 5826 # Remove one level of quotation (which was required for Make). 5827 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 5828 ;; 5829esac 5830 5831echo=${ECHO-echo} 5832if test "X[$]1" = X--no-reexec; then 5833 # Discard the --no-reexec flag, and continue. 5834 shift 5835elif test "X[$]1" = X--fallback-echo; then 5836 # Avoid inline document here, it may be left over 5837 : 5838elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then 5839 # Yippee, $echo works! 5840 : 5841else 5842 # Restart under the correct shell. 5843 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 5844fi 5845 5846if test "X[$]1" = X--fallback-echo; then 5847 # used as fallback echo 5848 shift 5849 cat <<EOF 5850[$]* 5851EOF 5852 exit 0 5853fi 5854 5855# The HP-UX ksh and POSIX shell print the target directory to stdout 5856# if CDPATH is set. 5857if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi 5858 5859if test -z "$ECHO"; then 5860if test "X${echo_test_string+set}" != Xset; then 5861# find a string as large as possible, as long as the shell can cope with it 5862 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 5863 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 5864 if (echo_test_string="`eval $cmd`") 2>/dev/null && 5865 echo_test_string="`eval $cmd`" && 5866 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 5867 then 5868 break 5869 fi 5870 done 5871fi 5872 5873if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 5874 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 5875 test "X$echo_testing_string" = "X$echo_test_string"; then 5876 : 5877else 5878 # The Solaris, AIX, and Digital Unix default echo programs unquote 5879 # backslashes. This makes it impossible to quote backslashes using 5880 # echo "$something" | sed 's/\\/\\\\/g' 5881 # 5882 # So, first we look for a working echo in the user's PATH. 5883 5884 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5885 for dir in $PATH /usr/ucb; do 5886 IFS="$lt_save_ifs" 5887 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 5888 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 5889 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 5890 test "X$echo_testing_string" = "X$echo_test_string"; then 5891 echo="$dir/echo" 5892 break 5893 fi 5894 done 5895 IFS="$lt_save_ifs" 5896 5897 if test "X$echo" = Xecho; then 5898 # We didn't find a better echo, so look for alternatives. 5899 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 5900 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 5901 test "X$echo_testing_string" = "X$echo_test_string"; then 5902 # This shell has a builtin print -r that does the trick. 5903 echo='print -r' 5904 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 5905 test "X$CONFIG_SHELL" != X/bin/ksh; then 5906 # If we have ksh, try running configure again with it. 5907 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 5908 export ORIGINAL_CONFIG_SHELL 5909 CONFIG_SHELL=/bin/ksh 5910 export CONFIG_SHELL 5911 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 5912 else 5913 # Try using printf. 5914 echo='printf %s\n' 5915 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 5916 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 5917 test "X$echo_testing_string" = "X$echo_test_string"; then 5918 # Cool, printf works 5919 : 5920 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 5921 test "X$echo_testing_string" = 'X\t' && 5922 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 5923 test "X$echo_testing_string" = "X$echo_test_string"; then 5924 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 5925 export CONFIG_SHELL 5926 SHELL="$CONFIG_SHELL" 5927 export SHELL 5928 echo="$CONFIG_SHELL [$]0 --fallback-echo" 5929 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 5930 test "X$echo_testing_string" = 'X\t' && 5931 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 5932 test "X$echo_testing_string" = "X$echo_test_string"; then 5933 echo="$CONFIG_SHELL [$]0 --fallback-echo" 5934 else 5935 # maybe with a smaller string... 5936 prev=: 5937 5938 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 5939 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 5940 then 5941 break 5942 fi 5943 prev="$cmd" 5944 done 5945 5946 if test "$prev" != 'sed 50q "[$]0"'; then 5947 echo_test_string=`eval $prev` 5948 export echo_test_string 5949 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 5950 else 5951 # Oops. We lost completely, so just stick with echo. 5952 echo=echo 5953 fi 5954 fi 5955 fi 5956 fi 5957fi 5958fi 5959 5960# Copy echo and quote the copy suitably for passing to libtool from 5961# the Makefile, instead of quoting the original, which is used later. 5962ECHO=$echo 5963if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 5964 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 5965fi 5966 5967AC_SUBST(ECHO) 5968AC_DIVERT_POP 5969])# _LT_AC_PROG_ECHO_BACKSLASH 5970 5971 5972# _LT_AC_LOCK 5973# ----------- 5974AC_DEFUN([_LT_AC_LOCK], 5975[AC_ARG_ENABLE([libtool-lock], 5976 [AC_HELP_STRING([--disable-libtool-lock], 5977 [avoid locking (might break parallel builds)])]) 5978test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 5979 5980# Some flags need to be propagated to the compiler or linker for good 5981# libtool support. 5982case $host in 5983ia64-*-hpux*) 5984 # Find out which ABI we are using. 5985 echo 'int i;' > conftest.$ac_ext 5986 if AC_TRY_EVAL(ac_compile); then 5987 case `/usr/bin/file conftest.$ac_objext` in 5988 *ELF-32*) 5989 HPUX_IA64_MODE="32" 5990 ;; 5991 *ELF-64*) 5992 HPUX_IA64_MODE="64" 5993 ;; 5994 esac 5995 fi 5996 rm -rf conftest* 5997 ;; 5998*-*-irix6*) 5999 # Find out which ABI we are using. 6000 echo '[#]line __oline__ "configure"' > conftest.$ac_ext 6001 if AC_TRY_EVAL(ac_compile); then 6002 case `/usr/bin/file conftest.$ac_objext` in 6003 *32-bit*) 6004 LD="${LD-ld} -32" 6005 ;; 6006 *N32*) 6007 LD="${LD-ld} -n32" 6008 ;; 6009 *64-bit*) 6010 LD="${LD-ld} -64" 6011 ;; 6012 esac 6013 fi 6014 rm -rf conftest* 6015 ;; 6016 6017*-*-linux*) 6018 # Test if the compiler is 64bit 6019 echo 'int i;' > conftest.$ac_ext 6020 if AC_TRY_EVAL(ac_compile); then 6021 case `/usr/bin/file conftest.$ac_objext` in 6022 *"ELF 32"*) 6023 LINUX_64_MODE="32" 6024 ;; 6025 *"ELF 64"*) 6026 LINUX_64_MODE="64" 6027 ;; 6028 esac 6029 fi 6030 rm -rf conftest* 6031 ;; 6032 6033*-*-sco3.2v5*) 6034 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 6035 SAVE_CFLAGS="$CFLAGS" 6036 CFLAGS="$CFLAGS -belf" 6037 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 6038 [AC_LANG_PUSH(C) 6039 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 6040 AC_LANG_POP]) 6041 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 6042 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 6043 CFLAGS="$SAVE_CFLAGS" 6044 fi 6045 ;; 6046ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], 6047[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 6048 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 6049 AC_CHECK_TOOL(AS, as, false) 6050 AC_CHECK_TOOL(OBJDUMP, objdump, false) 6051 6052 # recent cygwin and mingw systems supply a stub DllMain which the user 6053 # can override, but on older systems we have to supply one 6054 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, 6055 [AC_TRY_LINK([], 6056 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); 6057 DllMain (0, 0, 0);], 6058 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) 6059 6060 case $host/$CC in 6061 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) 6062 # old mingw systems require "-dll" to link a DLL, while more recent ones 6063 # require "-mdll" 6064 SAVE_CFLAGS="$CFLAGS" 6065 CFLAGS="$CFLAGS -mdll" 6066 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, 6067 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) 6068 CFLAGS="$SAVE_CFLAGS" ;; 6069 *-*-cygwin* | *-*-pw32*) 6070 # cygwin systems need to pass --dll to the linker, and not link 6071 # crt.o which will require a WinMain@16 definition. 6072 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; 6073 esac 6074 ;; 6075 ]) 6076esac 6077 6078need_locks="$enable_libtool_lock" 6079 6080])# _LT_AC_LOCK 6081 6082 6083# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 6084# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 6085# ---------------------------------------------------------------- 6086# Check whether the given compiler option works 6087AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 6088[AC_CACHE_CHECK([$1], [$2], 6089 [$2=no 6090 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 6091 save_CFLAGS="$CFLAGS" 6092 CFLAGS="$CFLAGS $3" 6093 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6094 if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then 6095 # The compiler can only warn and ignore the option if not recognized 6096 # So say no if there are warnings 6097 if test -s conftest.err; then 6098 # Append any errors to the config.log. 6099 cat conftest.err 1>&AS_MESSAGE_LOG_FD 6100 else 6101 $2=yes 6102 fi 6103 fi 6104 $rm conftest* 6105 CFLAGS="$save_CFLAGS" 6106]) 6107 6108if test x"[$]$2" = xyes; then 6109 ifelse([$5], , :, [$5]) 6110else 6111 ifelse([$6], , :, [$6]) 6112fi 6113])# AC_LIBTOOL_COMPILER_OPTION 6114 6115 6116# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 6117# [ACTION-SUCCESS], [ACTION-FAILURE]) 6118# ------------------------------------------------------------ 6119# Check whether the given compiler option works 6120AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 6121[AC_CACHE_CHECK([$1], [$2], 6122 [$2=no 6123 save_LDFLAGS="$LDFLAGS" 6124 LDFLAGS="$LDFLAGS $3" 6125 echo "$lt_simple_link_test_code" > conftest.$ac_ext 6126 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 6127 # The compiler can only warn and ignore the option if not recognized 6128 # So say no if there are warnings 6129 if test -s conftest.err; then 6130 # Append any errors to the config.log. 6131 cat conftest.err 1>&AS_MESSAGE_LOG_FD 6132 else 6133 $2=yes 6134 fi 6135 fi 6136 $rm conftest* 6137 LDFLAGS="$save_LDFLAGS" 6138]) 6139 6140if test x"[$]$2" = xyes; then 6141 ifelse([$4], , :, [$4]) 6142else 6143 ifelse([$5], , :, [$5]) 6144fi 6145])# AC_LIBTOOL_LINKER_OPTION 6146 6147 6148# AC_LIBTOOL_SYS_MAX_CMD_LEN 6149# -------------------------- 6150AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 6151[# find the maximum length of command line arguments 6152AC_MSG_CHECKING([the maximum length of command line arguments]) 6153AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 6154 i=0 6155 testring="ABCD" 6156 6157 case $host_os in 6158 msdosdjgpp*) 6159 # On DJGPP, this test can blow up pretty badly due to problems in libc 6160 # (any single argument exceeding 2000 bytes causes a buffer overrun 6161 # during glob expansion). Even if it were fixed, the result of this 6162 # check would be larger than it should be. 6163 lt_cv_sys_max_cmd_len=12288; # 12K is about right 6164 ;; 6165 6166 gnu*) 6167 # Under GNU Hurd, this test is not required because there is 6168 # no limit to the length of command line arguments. 6169 # Libtool will interpret -1 as no limit whatsoever 6170 lt_cv_sys_max_cmd_len=-1; 6171 ;; 6172 6173 *) 6174 # If test is not a shell built-in, we'll probably end up computing a 6175 # maximum length that is only half of the actual maximum length, but 6176 # we can't tell. 6177 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \ 6178 = "XX$testring") >/dev/null 2>&1 && 6179 new_result=`expr "X$testring" : ".*" 2>&1` && 6180 lt_cv_sys_max_cmd_len=$new_result && 6181 test $i != 17 # 1/2 MB should be enough 6182 do 6183 i=`expr $i + 1` 6184 testring=$testring$testring 6185 done 6186 testring= 6187 # Add a significant safety factor because C++ compilers can tack on massive 6188 # amounts of additional arguments before passing them to the linker. 6189 # It appears as though 1/2 is a usable value. 6190 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 6191 ;; 6192 esac 6193]) 6194if test -n $lt_cv_sys_max_cmd_len ; then 6195 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 6196else 6197 AC_MSG_RESULT(none) 6198fi 6199])# AC_LIBTOOL_SYS_MAX_CMD_LEN 6200 6201 6202# _LT_AC_CHECK_DLFCN 6203# -------------------- 6204AC_DEFUN([_LT_AC_CHECK_DLFCN], 6205[AC_CHECK_HEADERS(dlfcn.h)dnl 6206])# _LT_AC_CHECK_DLFCN 6207 6208 6209# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 6210# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 6211# ------------------------------------------------------------------ 6212AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 6213[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 6214if test "$cross_compiling" = yes; then : 6215 [$4] 6216else 6217 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 6218 lt_status=$lt_dlunknown 6219 cat > conftest.$ac_ext <<EOF 6220[#line __oline__ "configure" 6221#include "confdefs.h" 6222 6223#if HAVE_DLFCN_H 6224#include <dlfcn.h> 6225#endif 6226 6227#include <stdio.h> 6228 6229#ifdef RTLD_GLOBAL 6230# define LT_DLGLOBAL RTLD_GLOBAL 6231#else 6232# ifdef DL_GLOBAL 6233# define LT_DLGLOBAL DL_GLOBAL 6234# else 6235# define LT_DLGLOBAL 0 6236# endif 6237#endif 6238 6239/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 6240 find out it does not work in some platform. */ 6241#ifndef LT_DLLAZY_OR_NOW 6242# ifdef RTLD_LAZY 6243# define LT_DLLAZY_OR_NOW RTLD_LAZY 6244# else 6245# ifdef DL_LAZY 6246# define LT_DLLAZY_OR_NOW DL_LAZY 6247# else 6248# ifdef RTLD_NOW 6249# define LT_DLLAZY_OR_NOW RTLD_NOW 6250# else 6251# ifdef DL_NOW 6252# define LT_DLLAZY_OR_NOW DL_NOW 6253# else 6254# define LT_DLLAZY_OR_NOW 0 6255# endif 6256# endif 6257# endif 6258# endif 6259#endif 6260 6261#ifdef __cplusplus 6262extern "C" void exit (int); 6263#endif 6264 6265void fnord() { int i=42;} 6266int main () 6267{ 6268 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 6269 int status = $lt_dlunknown; 6270 6271 if (self) 6272 { 6273 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 6274 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 6275 /* dlclose (self); */ 6276 } 6277 6278 exit (status); 6279}] 6280EOF 6281 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 6282 (./conftest; exit; ) 2>/dev/null 6283 lt_status=$? 6284 case x$lt_status in 6285 x$lt_dlno_uscore) $1 ;; 6286 x$lt_dlneed_uscore) $2 ;; 6287 x$lt_unknown|x*) $3 ;; 6288 esac 6289 else : 6290 # compilation failed 6291 $3 6292 fi 6293fi 6294rm -fr conftest* 6295])# _LT_AC_TRY_DLOPEN_SELF 6296 6297 6298# AC_LIBTOOL_DLOPEN_SELF 6299# ------------------- 6300AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 6301[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 6302if test "x$enable_dlopen" != xyes; then 6303 enable_dlopen=unknown 6304 enable_dlopen_self=unknown 6305 enable_dlopen_self_static=unknown 6306else 6307 lt_cv_dlopen=no 6308 lt_cv_dlopen_libs= 6309 6310 case $host_os in 6311 beos*) 6312 lt_cv_dlopen="load_add_on" 6313 lt_cv_dlopen_libs= 6314 lt_cv_dlopen_self=yes 6315 ;; 6316 6317 cygwin* | mingw* | pw32*) 6318 lt_cv_dlopen="LoadLibrary" 6319 lt_cv_dlopen_libs= 6320 ;; 6321 6322 *) 6323 AC_CHECK_FUNC([shl_load], 6324 [lt_cv_dlopen="shl_load"], 6325 [AC_CHECK_LIB([dld], [shl_load], 6326 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], 6327 [AC_CHECK_FUNC([dlopen], 6328 [lt_cv_dlopen="dlopen"], 6329 [AC_CHECK_LIB([dl], [dlopen], 6330 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 6331 [AC_CHECK_LIB([svld], [dlopen], 6332 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 6333 [AC_CHECK_LIB([dld], [dld_link], 6334 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) 6335 ]) 6336 ]) 6337 ]) 6338 ]) 6339 ]) 6340 ;; 6341 esac 6342 6343 if test "x$lt_cv_dlopen" != xno; then 6344 enable_dlopen=yes 6345 else 6346 enable_dlopen=no 6347 fi 6348 6349 case $lt_cv_dlopen in 6350 dlopen) 6351 save_CPPFLAGS="$CPPFLAGS" 6352 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 6353 6354 save_LDFLAGS="$LDFLAGS" 6355 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 6356 6357 save_LIBS="$LIBS" 6358 LIBS="$lt_cv_dlopen_libs $LIBS" 6359 6360 AC_CACHE_CHECK([whether a program can dlopen itself], 6361 lt_cv_dlopen_self, [dnl 6362 _LT_AC_TRY_DLOPEN_SELF( 6363 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 6364 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 6365 ]) 6366 6367 if test "x$lt_cv_dlopen_self" = xyes; then 6368 LDFLAGS="$LDFLAGS $link_static_flag" 6369 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 6370 lt_cv_dlopen_self_static, [dnl 6371 _LT_AC_TRY_DLOPEN_SELF( 6372 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 6373 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 6374 ]) 6375 fi 6376 6377 CPPFLAGS="$save_CPPFLAGS" 6378 LDFLAGS="$save_LDFLAGS" 6379 LIBS="$save_LIBS" 6380 ;; 6381 esac 6382 6383 case $lt_cv_dlopen_self in 6384 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 6385 *) enable_dlopen_self=unknown ;; 6386 esac 6387 6388 case $lt_cv_dlopen_self_static in 6389 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 6390 *) enable_dlopen_self_static=unknown ;; 6391 esac 6392fi 6393])# AC_LIBTOOL_DLOPEN_SELF 6394 6395 6396# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 6397# --------------------------------- 6398# Check to see if options -c and -o are simultaneously supported by compiler 6399AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 6400[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 6401AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 6402 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 6403 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 6404 $rm -r conftest 2>/dev/null 6405 mkdir conftest 6406 cd conftest 6407 mkdir out 6408 ifelse([$1],[],[save_CFLAGS="$CFLAGS" 6409 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"], 6410 [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS" 6411 CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"], 6412 [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS" 6413 GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"]) 6414 echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6415 6416 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers 6417 # that will create temporary files in the current directory regardless of 6418 # the output directory. Thus, making CWD read-only will cause this test 6419 # to fail, enabling locking or at least warning the user not to do parallel 6420 # builds. 6421 chmod -w . 6422 6423 if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext 6424 then 6425 # The compiler can only warn and ignore the option if not recognized 6426 # So say no if there are warnings 6427 if test -s out/conftest.err; then 6428 # Append any errors to the config.log. 6429 cat out/conftest.err 1>&AS_MESSAGE_LOG_FD 6430 else 6431 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 6432 fi 6433 fi 6434 ifelse([$1],[],[CFLAGS="$save_CFLAGS"], 6435 [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"], 6436 [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"]) 6437 chmod u+w . 6438 $rm conftest* out/* 6439 rmdir out 6440 cd .. 6441 rmdir conftest 6442 $rm conftest* 6443]) 6444])# AC_LIBTOOL_PROG_CC_C_O 6445 6446 6447# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 6448# ----------------------------------------- 6449# Check to see if we can do hard links to lock some files if needed 6450AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 6451[AC_REQUIRE([_LT_AC_LOCK])dnl 6452 6453hard_links="nottested" 6454if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 6455 # do not overwrite the value of need_locks provided by the user 6456 AC_MSG_CHECKING([if we can lock with hard links]) 6457 hard_links=yes 6458 $rm conftest* 6459 ln conftest.a conftest.b 2>/dev/null && hard_links=no 6460 touch conftest.a 6461 ln conftest.a conftest.b 2>&5 || hard_links=no 6462 ln conftest.a conftest.b 2>/dev/null && hard_links=no 6463 AC_MSG_RESULT([$hard_links]) 6464 if test "$hard_links" = no; then 6465 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 6466 need_locks=warn 6467 fi 6468else 6469 need_locks=no 6470fi 6471])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 6472 6473 6474# AC_LIBTOOL_OBJDIR 6475# ----------------- 6476AC_DEFUN([AC_LIBTOOL_OBJDIR], 6477[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 6478[rm -f .libs 2>/dev/null 6479mkdir .libs 2>/dev/null 6480if test -d .libs; then 6481 lt_cv_objdir=.libs 6482else 6483 # MS-DOS does not allow filenames that begin with a dot. 6484 lt_cv_objdir=_libs 6485fi 6486rmdir .libs 2>/dev/null]) 6487objdir=$lt_cv_objdir 6488])# AC_LIBTOOL_OBJDIR 6489 6490 6491# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 6492# ---------------------------------------------- 6493# Check hardcoding attributes. 6494AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 6495[AC_MSG_CHECKING([how to hardcode library paths into programs]) 6496_LT_AC_TAGVAR(hardcode_action, $1)= 6497if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 6498 test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then 6499 6500 # We can hardcode non-existant directories. 6501 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 6502 # If the only mechanism to avoid hardcoding is shlibpath_var, we 6503 # have to relink, otherwise we might link with an installed library 6504 # when we should be linking with a yet-to-be-installed one 6505 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 6506 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 6507 # Linking always hardcodes the temporary library directory. 6508 _LT_AC_TAGVAR(hardcode_action, $1)=relink 6509 else 6510 # We can link without hardcoding, and we can hardcode nonexisting dirs. 6511 _LT_AC_TAGVAR(hardcode_action, $1)=immediate 6512 fi 6513else 6514 # We cannot hardcode anything, or else we can only hardcode existing 6515 # directories. 6516 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 6517fi 6518AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 6519 6520if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 6521 # Fast installation is not supported 6522 enable_fast_install=no 6523elif test "$shlibpath_overrides_runpath" = yes || 6524 test "$enable_shared" = no; then 6525 # Fast installation is not necessary 6526 enable_fast_install=needless 6527fi 6528])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 6529 6530 6531# AC_LIBTOOL_SYS_LIB_STRIP 6532# ------------------------ 6533AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 6534[striplib= 6535old_striplib= 6536AC_MSG_CHECKING([whether stripping libraries is possible]) 6537if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 6538 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 6539 test -z "$striplib" && striplib="$STRIP --strip-unneeded" 6540 AC_MSG_RESULT([yes]) 6541else 6542 AC_MSG_RESULT([no]) 6543fi 6544])# AC_LIBTOOL_SYS_LIB_STRIP 6545 6546 6547# AC_LIBTOOL_SYS_DYNAMIC_LINKER 6548# ----------------------------- 6549# PORTME Fill in your ld.so characteristics 6550AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 6551[AC_MSG_CHECKING([dynamic linker characteristics]) 6552library_names_spec= 6553libname_spec='lib$name' 6554soname_spec= 6555postinstall_cmds= 6556postuninstall_cmds= 6557finish_cmds= 6558finish_eval= 6559shlibpath_var= 6560shlibpath_overrides_runpath=unknown 6561version_type=none 6562dynamic_linker="$host_os ld.so" 6563sys_lib_dlsearch_path_spec="/lib /usr/lib" 6564sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6565need_lib_prefix=unknown 6566hardcode_into_libs=no 6567 6568# when you set need_version to no, make sure it does not cause -set_version 6569# flags to be left without arguments 6570need_version=unknown 6571 6572case $host_os in 6573aix3*) 6574 version_type=linux 6575 library_names_spec='${libname}${release}.so$versuffix $libname.a' 6576 shlibpath_var=LIBPATH 6577 6578 # AIX 3 has no versioning support, so we append a major version to the name. 6579 soname_spec='${libname}${release}.so$major' 6580 ;; 6581 6582aix4* | aix5*) 6583 version_type=linux 6584 if test "$host_cpu" = ia64; then 6585 # AIX 5 supports IA64 6586 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' 6587 shlibpath_var=LD_LIBRARY_PATH 6588 else 6589 # With GCC up to 2.95.x, collect2 would create an import file 6590 # for dependence libraries. The import file would start with 6591 # the line `#! .'. This would cause the generated library to 6592 # depend on `.', always an invalid library. This was fixed in 6593 # development snapshots of GCC prior to 3.0. 6594 case $host_os in 6595 aix4 | aix4.[[01]] | aix4.[[01]].*) 6596 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 6597 echo ' yes ' 6598 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 6599 : 6600 else 6601 can_build_shared=no 6602 fi 6603 ;; 6604 esac 6605 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 6606 # soname into executable. Probably we can add versioning support to 6607 # collect2, so additional links can be useful in future. 6608 if test "$aix_use_runtimelinking" = yes; then 6609 # If using run time linking (on AIX 4.2 or later) use lib<name>.so 6610 # instead of lib<name>.a to let people know that these are not 6611 # typical AIX shared libraries. 6612 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 6613 else 6614 # We preserve .a as extension for shared libraries through AIX4.2 6615 # and later when we are not doing run time linking. 6616 library_names_spec='${libname}${release}.a $libname.a' 6617 soname_spec='${libname}${release}.so$major' 6618 fi 6619 shlibpath_var=LIBPATH 6620 fi 6621 ;; 6622 6623amigaos*) 6624 library_names_spec='$libname.ixlibrary $libname.a' 6625 # Create ${libname}_ixlibrary.a entries in /sys/libs. 6626 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' 6627 ;; 6628 6629beos*) 6630 library_names_spec='${libname}.so' 6631 dynamic_linker="$host_os ld.so" 6632 shlibpath_var=LIBRARY_PATH 6633 ;; 6634 6635bsdi4*) 6636 version_type=linux 6637 need_version=no 6638 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 6639 soname_spec='${libname}${release}.so$major' 6640 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 6641 shlibpath_var=LD_LIBRARY_PATH 6642 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 6643 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 6644 # the default ld.so.conf also contains /usr/contrib/lib and 6645 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 6646 # libtool to hard-code these into programs 6647 ;; 6648 6649cygwin* | mingw* | pw32*) 6650 version_type=windows 6651 need_version=no 6652 need_lib_prefix=no 6653 case $GCC,$host_os in 6654 yes,cygwin*) 6655 library_names_spec='$libname.dll.a' 6656 sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" 6657 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' 6658 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ 6659 dldir=$destdir/`dirname \$dlpath`~ 6660 test -d \$dldir || mkdir -p \$dldir~ 6661 $install_prog .libs/$dlname \$dldir/$dlname' 6662 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6663 dlpath=$dir/\$dldll~ 6664 $rm \$dlpath' 6665 ;; 6666 yes,mingw*) 6667 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' 6668 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"` 6669 if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then 6670 # It is most probably a Windows format PATH printed by 6671 # mingw gcc, but we are running on Cygwin. Gcc prints its search 6672 # path with ; separators, and with drive letters. We can handle the 6673 # drive letters (cygwin fileutils understands them), so leave them, 6674 # especially as we might pass files found there to a mingw objdump, 6675 # which wouldn't understand a cygwinified path. Ahh. 6676 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'` 6677 else 6678 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"` 6679 fi 6680 ;; 6681 yes,pw32*) 6682 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' 6683 ;; 6684 *) 6685 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' 6686 ;; 6687 esac 6688 dynamic_linker='Win32 ld.exe' 6689 # FIXME: first we should search . and the directory the executable is in 6690 shlibpath_var=PATH 6691 ;; 6692 6693darwin* | rhapsody*) 6694 dynamic_linker="$host_os dyld" 6695 version_type=darwin 6696 need_lib_prefix=no 6697 need_version=no 6698 # FIXME: Relying on posixy $() will cause problems for 6699 # cross-compilation, but unfortunately the echo tests do not 6700 # yet detect zsh echo's removal of \ escapes. 6701 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' 6702 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' 6703 shlibpath_overrides_runpath=yes 6704 shlibpath_var=DYLD_LIBRARY_PATH 6705 ;; 6706 6707dgux*) 6708 version_type=linux 6709 need_lib_prefix=no 6710 need_version=no 6711 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 6712 soname_spec='${libname}${release}.so$major' 6713 shlibpath_var=LD_LIBRARY_PATH 6714 ;; 6715 6716freebsd1*) 6717 dynamic_linker=no 6718 ;; 6719 6720freebsd*) 6721 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 6722 version_type=freebsd-$objformat 6723 case $version_type in 6724 freebsd-elf*) 6725 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' 6726 need_version=no 6727 need_lib_prefix=no 6728 ;; 6729 freebsd-*) 6730 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' 6731 need_version=yes 6732 ;; 6733 esac 6734 shlibpath_var=LD_LIBRARY_PATH 6735 case $host_os in 6736 freebsd2*) 6737 shlibpath_overrides_runpath=yes 6738 ;; 6739 freebsd3.[01]* | freebsdelf3.[01]*) 6740 shlibpath_overrides_runpath=yes 6741 hardcode_into_libs=yes 6742 ;; 6743 *) # from 3.2 on 6744 shlibpath_overrides_runpath=no 6745 hardcode_into_libs=yes 6746 ;; 6747 esac 6748 ;; 6749 6750gnu*) 6751 version_type=linux 6752 need_lib_prefix=no 6753 need_version=no 6754 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' 6755 soname_spec='${libname}${release}.so$major' 6756 shlibpath_var=LD_LIBRARY_PATH 6757 hardcode_into_libs=yes 6758 ;; 6759 6760hpux9* | hpux10* | hpux11*) 6761 # Give a soname corresponding to the major version so that dld.sl refuses to 6762 # link against other versions. 6763 version_type=sunos 6764 need_lib_prefix=no 6765 need_version=no 6766 if test "$host_cpu" = ia64; then 6767 hardcode_into_libs=yes 6768 dynamic_linker="$host_os dld.so" 6769 shlibpath_var=LD_LIBRARY_PATH 6770 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6771 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 6772 soname_spec='${libname}${release}.so$major' 6773 if test "X$HPUX_IA64_MODE" = X32; then 6774 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6775 else 6776 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6777 fi 6778 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6779 else 6780 dynamic_linker="$host_os dld.sl" 6781 shlibpath_var=SHLIB_PATH 6782 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6783 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' 6784 soname_spec='${libname}${release}.sl$major' 6785 fi 6786 # HP-UX runs *really* slowly unless shared libraries are mode 555. 6787 postinstall_cmds='chmod 555 $lib' 6788 ;; 6789 6790irix5* | irix6* | nonstopux*) 6791 case $host_os in 6792 nonstopux*) version_type=nonstopux ;; 6793 *) version_type=irix ;; 6794 esac 6795 need_lib_prefix=no 6796 need_version=no 6797 soname_spec='${libname}${release}.so$major' 6798 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' 6799 case $host_os in 6800 irix5* | nonstopux*) 6801 libsuff= shlibsuff= 6802 ;; 6803 *) 6804 case $LD in # libtool.m4 will add one of these switches to LD 6805 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; 6806 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; 6807 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; 6808 *) libsuff= shlibsuff= libmagic=never-match;; 6809 esac 6810 ;; 6811 esac 6812 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6813 shlibpath_overrides_runpath=no 6814 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 6815 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 6816 ;; 6817 6818# No shared lib support for Linux oldld, aout, or coff. 6819linux*oldld* | linux*aout* | linux*coff*) 6820 dynamic_linker=no 6821 ;; 6822 6823# This must be Linux ELF. 6824linux*) 6825 version_type=linux 6826 need_lib_prefix=no 6827 need_version=no 6828 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 6829 soname_spec='${libname}${release}.so$major' 6830 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6831 libsuff= 6832 if test "x$LINUX_64_MODE" = x64; then 6833 # Some platforms are per default 64-bit, so there's no /lib64 6834 if test -d /lib64; then 6835 libsuff=64 6836 fi 6837 fi 6838 shlibpath_var=LD_LIBRARY_PATH 6839 shlibpath_overrides_runpath=no 6840 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" 6841 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" 6842 # This implies no fast_install, which is unacceptable. 6843 # Some rework will be needed to allow for fast_install 6844 # before this can be enabled. 6845 hardcode_into_libs=yes 6846 6847 # We used to test for /lib/ld.so.1 and disable shared libraries on 6848 # powerpc, because MkLinux only supported shared libraries with the 6849 # GNU dynamic linker. Since this was broken with cross compilers, 6850 # most powerpc-linux boxes support dynamic linking these days and 6851 # people can always --disable-shared, the test was removed, and we 6852 # assume the GNU/Linux dynamic linker is in use. 6853 dynamic_linker='GNU/Linux ld.so' 6854 ;; 6855 6856netbsd*) 6857 version_type=sunos 6858 need_lib_prefix=no 6859 need_version=no 6860 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 6861 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' 6862 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6863 dynamic_linker='NetBSD (a.out) ld.so' 6864 else 6865 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' 6866 soname_spec='${libname}${release}.so$major' 6867 dynamic_linker='NetBSD ld.elf_so' 6868 fi 6869 shlibpath_var=LD_LIBRARY_PATH 6870 shlibpath_overrides_runpath=yes 6871 hardcode_into_libs=yes 6872 ;; 6873 6874newsos6) 6875 version_type=linux 6876 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 6877 shlibpath_var=LD_LIBRARY_PATH 6878 shlibpath_overrides_runpath=yes 6879 ;; 6880 6881nto-qnx) 6882 version_type=linux 6883 need_lib_prefix=no 6884 need_version=no 6885 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 6886 soname_spec='${libname}${release}.so$major' 6887 shlibpath_var=LD_LIBRARY_PATH 6888 shlibpath_overrides_runpath=yes 6889 ;; 6890 6891openbsd*) 6892 version_type=sunos 6893 need_lib_prefix=no 6894 need_version=no 6895 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' 6896 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 6897 shlibpath_var=LD_LIBRARY_PATH 6898 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6899 case $host_os in 6900 openbsd2.[[89]] | openbsd2.[[89]].*) 6901 shlibpath_overrides_runpath=no 6902 ;; 6903 *) 6904 shlibpath_overrides_runpath=yes 6905 ;; 6906 esac 6907 else 6908 shlibpath_overrides_runpath=yes 6909 fi 6910 ;; 6911 6912os2*) 6913 libname_spec='$name' 6914 need_lib_prefix=no 6915 library_names_spec='$libname.dll $libname.a' 6916 dynamic_linker='OS/2 ld.exe' 6917 shlibpath_var=LIBPATH 6918 ;; 6919 6920osf3* | osf4* | osf5*) 6921 version_type=osf 6922 need_lib_prefix=no 6923 need_version=no 6924 soname_spec='${libname}${release}.so' 6925 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' 6926 shlibpath_var=LD_LIBRARY_PATH 6927 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 6928 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 6929 ;; 6930 6931sco3.2v5*) 6932 version_type=osf 6933 soname_spec='${libname}${release}.so$major' 6934 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 6935 shlibpath_var=LD_LIBRARY_PATH 6936 ;; 6937 6938solaris*) 6939 version_type=linux 6940 need_lib_prefix=no 6941 need_version=no 6942 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 6943 soname_spec='${libname}${release}.so$major' 6944 shlibpath_var=LD_LIBRARY_PATH 6945 shlibpath_overrides_runpath=yes 6946 hardcode_into_libs=yes 6947 # ldd complains unless libraries are executable 6948 postinstall_cmds='chmod +x $lib' 6949 ;; 6950 6951sunos4*) 6952 version_type=sunos 6953 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' 6954 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 6955 shlibpath_var=LD_LIBRARY_PATH 6956 shlibpath_overrides_runpath=yes 6957 if test "$with_gnu_ld" = yes; then 6958 need_lib_prefix=no 6959 fi 6960 need_version=yes 6961 ;; 6962 6963sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6964 version_type=linux 6965 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 6966 soname_spec='${libname}${release}.so$major' 6967 shlibpath_var=LD_LIBRARY_PATH 6968 case $host_vendor in 6969 sni) 6970 shlibpath_overrides_runpath=no 6971 ;; 6972 motorola) 6973 need_lib_prefix=no 6974 need_version=no 6975 shlibpath_overrides_runpath=no 6976 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 6977 ;; 6978 esac 6979 ;; 6980 6981sysv4*MP*) 6982 if test -d /usr/nec ;then 6983 version_type=linux 6984 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' 6985 soname_spec='$libname.so.$major' 6986 shlibpath_var=LD_LIBRARY_PATH 6987 fi 6988 ;; 6989 6990uts4*) 6991 version_type=linux 6992 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' 6993 soname_spec='${libname}${release}.so$major' 6994 shlibpath_var=LD_LIBRARY_PATH 6995 ;; 6996 6997*) 6998 dynamic_linker=no 6999 ;; 7000esac 7001AC_MSG_RESULT([$dynamic_linker]) 7002test "$dynamic_linker" = no && can_build_shared=no 7003])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 7004 7005 7006# _LT_AC_TAGCONFIG 7007# ---------------- 7008AC_DEFUN([_LT_AC_TAGCONFIG], 7009[AC_ARG_WITH([tags], 7010 [AC_HELP_STRING([--with-tags=TAGS], 7011 [include additional configurations @<:@CXX,GCJ@:>@])], 7012 [tagnames="$withval"], 7013 [tagnames="CXX,GCJ" 7014 case $host_os in 7015 mingw*|cygwin*) tagnames="$tagnames,RC" ;; 7016 esac]) 7017 7018if test -f "$ltmain" && test -n "$tagnames"; then 7019 if test ! -f "${ofile}"; then 7020 AC_MSG_WARN([output file `$ofile' does not exist]) 7021 fi 7022 7023 if test -z "$LTCC"; then 7024 eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 7025 if test -z "$LTCC"; then 7026 AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 7027 else 7028 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 7029 fi 7030 fi 7031 7032 # Extract list of available tagged configurations in $ofile. 7033 # Note that this assumes the entire list is on one line. 7034 available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 7035 7036 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7037 for tagname in $tagnames; do 7038 IFS="$lt_save_ifs" 7039 # Check whether tagname contains only valid characters 7040 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 7041 "") ;; 7042 *) AC_MSG_ERROR([invalid tag name: $tagname]) 7043 ;; 7044 esac 7045 7046 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 7047 then 7048 AC_MSG_ERROR([tag name \"$tagname\" already exists]) 7049 fi 7050 7051 # Update the list of available tags. 7052 if test -n "$tagname"; then 7053 echo appending configuration tag \"$tagname\" to $ofile 7054 7055 case $tagname in 7056 CXX) 7057 AC_LIBTOOL_LANG_CXX_CONFIG 7058 ;; 7059 7060 GCJ) 7061 AC_LIBTOOL_LANG_GCJ_CONFIG 7062 ;; 7063 7064 RC) 7065 AC_LIBTOOL_LANG_RC_CONFIG 7066 ;; 7067 7068 *) 7069 AC_MSG_ERROR([Unsupported tag name: $tagname]) 7070 ;; 7071 esac 7072 7073 # Append the new tag name to the list of available tags. 7074 available_tags="$available_tags $tagname" 7075 fi 7076 done 7077 IFS="$lt_save_ifs" 7078 7079 # Now substitute the updated list of available tags. 7080 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 7081 mv "${ofile}T" "$ofile" 7082 chmod +x "$ofile" 7083 else 7084 rm -f "${ofile}T" 7085 AC_MSG_ERROR([unable to update list of available tagged configurations.]) 7086 fi 7087fi 7088])# _LT_AC_TAGCONFIG 7089 7090 7091# AC_LIBTOOL_DLOPEN 7092# ----------------- 7093# enable checks for dlopen support 7094AC_DEFUN([AC_LIBTOOL_DLOPEN], 7095 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 7096])# AC_LIBTOOL_DLOPEN 7097 7098 7099# AC_LIBTOOL_WIN32_DLL 7100# -------------------- 7101# declare package support for building win32 dll's 7102AC_DEFUN([AC_LIBTOOL_WIN32_DLL], 7103[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 7104])# AC_LIBTOOL_WIN32_DLL 7105 7106 7107# AC_ENABLE_SHARED([DEFAULT]) 7108# --------------------------- 7109# implement the --enable-shared flag 7110# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7111AC_DEFUN([AC_ENABLE_SHARED], 7112[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 7113AC_ARG_ENABLE([shared], 7114 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 7115 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 7116 [p=${PACKAGE-default} 7117 case $enableval in 7118 yes) enable_shared=yes ;; 7119 no) enable_shared=no ;; 7120 *) 7121 enable_shared=no 7122 # Look at the argument we got. We use all the common list separators. 7123 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7124 for pkg in $enableval; do 7125 IFS="$lt_save_ifs" 7126 if test "X$pkg" = "X$p"; then 7127 enable_shared=yes 7128 fi 7129 done 7130 IFS="$lt_save_ifs" 7131 ;; 7132 esac], 7133 [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 7134])# AC_ENABLE_SHARED 7135 7136 7137# AC_DISABLE_SHARED 7138# ----------------- 7139#- set the default shared flag to --disable-shared 7140AC_DEFUN([AC_DISABLE_SHARED], 7141[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 7142AC_ENABLE_SHARED(no) 7143])# AC_DISABLE_SHARED 7144 7145 7146# AC_ENABLE_STATIC([DEFAULT]) 7147# --------------------------- 7148# implement the --enable-static flag 7149# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7150AC_DEFUN([AC_ENABLE_STATIC], 7151[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 7152AC_ARG_ENABLE([static], 7153 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 7154 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 7155 [p=${PACKAGE-default} 7156 case $enableval in 7157 yes) enable_static=yes ;; 7158 no) enable_static=no ;; 7159 *) 7160 enable_static=no 7161 # Look at the argument we got. We use all the common list separators. 7162 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7163 for pkg in $enableval; do 7164 IFS="$lt_save_ifs" 7165 if test "X$pkg" = "X$p"; then 7166 enable_static=yes 7167 fi 7168 done 7169 IFS="$lt_save_ifs" 7170 ;; 7171 esac], 7172 [enable_static=]AC_ENABLE_STATIC_DEFAULT) 7173])# AC_ENABLE_STATIC 7174 7175 7176# AC_DISABLE_STATIC 7177# ----------------- 7178# set the default static flag to --disable-static 7179AC_DEFUN([AC_DISABLE_STATIC], 7180[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 7181AC_ENABLE_STATIC(no) 7182])# AC_DISABLE_STATIC 7183 7184 7185# AC_ENABLE_FAST_INSTALL([DEFAULT]) 7186# --------------------------------- 7187# implement the --enable-fast-install flag 7188# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7189AC_DEFUN([AC_ENABLE_FAST_INSTALL], 7190[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 7191AC_ARG_ENABLE([fast-install], 7192 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 7193 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 7194 [p=${PACKAGE-default} 7195 case $enableval in 7196 yes) enable_fast_install=yes ;; 7197 no) enable_fast_install=no ;; 7198 *) 7199 enable_fast_install=no 7200 # Look at the argument we got. We use all the common list separators. 7201 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7202 for pkg in $enableval; do 7203 IFS="$lt_save_ifs" 7204 if test "X$pkg" = "X$p"; then 7205 enable_fast_install=yes 7206 fi 7207 done 7208 IFS="$lt_save_ifs" 7209 ;; 7210 esac], 7211 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 7212])# AC_ENABLE_FAST_INSTALL 7213 7214 7215# AC_DISABLE_FAST_INSTALL 7216# ----------------------- 7217# set the default to --disable-fast-install 7218AC_DEFUN([AC_DISABLE_FAST_INSTALL], 7219[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 7220AC_ENABLE_FAST_INSTALL(no) 7221])# AC_DISABLE_FAST_INSTALL 7222 7223 7224# AC_LIBTOOL_PICMODE([MODE]) 7225# -------------------------- 7226# implement the --with-pic flag 7227# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 7228AC_DEFUN([AC_LIBTOOL_PICMODE], 7229[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 7230pic_mode=ifelse($#,1,$1,default) 7231])# AC_LIBTOOL_PICMODE 7232 7233 7234# AC_PATH_TOOL_PREFIX 7235# ------------------- 7236# find a file program which can recognise shared library 7237AC_DEFUN([AC_PATH_TOOL_PREFIX], 7238[AC_MSG_CHECKING([for $1]) 7239AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 7240[case $MAGIC_CMD in 7241[[\\/*] | ?:[\\/]*]) 7242 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 7243 ;; 7244*) 7245 lt_save_MAGIC_CMD="$MAGIC_CMD" 7246 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 7247dnl $ac_dummy forces splitting on constant user-supplied paths. 7248dnl POSIX.2 word splitting is done only on the output of word expansions, 7249dnl not every word. This closes a longstanding sh security hole. 7250 ac_dummy="ifelse([$2], , $PATH, [$2])" 7251 for ac_dir in $ac_dummy; do 7252 IFS="$lt_save_ifs" 7253 test -z "$ac_dir" && ac_dir=. 7254 if test -f $ac_dir/$1; then 7255 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 7256 if test -n "$file_magic_test_file"; then 7257 case $deplibs_check_method in 7258 "file_magic "*) 7259 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" 7260 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 7261 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 7262 egrep "$file_magic_regex" > /dev/null; then 7263 : 7264 else 7265 cat <<EOF 1>&2 7266 7267*** Warning: the command libtool uses to detect shared libraries, 7268*** $file_magic_cmd, produces output that libtool cannot recognize. 7269*** The result is that libtool may fail to recognize shared libraries 7270*** as such. This will affect the creation of libtool libraries that 7271*** depend on shared libraries, but programs linked with such libtool 7272*** libraries will work regardless of this problem. Nevertheless, you 7273*** may want to report the problem to your system manager and/or to 7274*** bug-libtool@gnu.org 7275 7276EOF 7277 fi ;; 7278 esac 7279 fi 7280 break 7281 fi 7282 done 7283 IFS="$lt_save_ifs" 7284 MAGIC_CMD="$lt_save_MAGIC_CMD" 7285 ;; 7286esac]) 7287MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 7288if test -n "$MAGIC_CMD"; then 7289 AC_MSG_RESULT($MAGIC_CMD) 7290else 7291 AC_MSG_RESULT(no) 7292fi 7293])# AC_PATH_TOOL_PREFIX 7294 7295 7296# AC_PATH_MAGIC 7297# ------------- 7298# find a file program which can recognise a shared library 7299AC_DEFUN([AC_PATH_MAGIC], 7300[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 7301if test -z "$lt_cv_path_MAGIC_CMD"; then 7302 if test -n "$ac_tool_prefix"; then 7303 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 7304 else 7305 MAGIC_CMD=: 7306 fi 7307fi 7308])# AC_PATH_MAGIC 7309 7310 7311# AC_PROG_LD 7312# ---------- 7313# find the path to the GNU or non-GNU linker 7314AC_DEFUN([AC_PROG_LD], 7315[AC_ARG_WITH([gnu-ld], 7316 [AC_HELP_STRING([--with-gnu-ld], 7317 [assume the C compiler uses GNU ld @<:@default=no@:>@])], 7318 [test "$withval" = no || with_gnu_ld=yes], 7319 [with_gnu_ld=no]) 7320AC_REQUIRE([AC_PROG_CC])dnl 7321AC_REQUIRE([AC_CANONICAL_HOST])dnl 7322AC_REQUIRE([AC_CANONICAL_BUILD])dnl 7323ac_prog=ld 7324if test "$GCC" = yes; then 7325 # Check if gcc -print-prog-name=ld gives a path. 7326 AC_MSG_CHECKING([for ld used by GCC]) 7327 case $host in 7328 *-*-mingw*) 7329 # gcc leaves a trailing carriage return which upsets mingw 7330 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 7331 *) 7332 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 7333 esac 7334 case $ac_prog in 7335 # Accept absolute paths. 7336 [[\\/]]* | ?:[[\\/]]*) 7337 re_direlt='/[[^/]][[^/]]*/\.\./' 7338 # Canonicalize the path of ld 7339 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 7340 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 7341 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 7342 done 7343 test -z "$LD" && LD="$ac_prog" 7344 ;; 7345 "") 7346 # If it fails, then pretend we aren't using GCC. 7347 ac_prog=ld 7348 ;; 7349 *) 7350 # If it is relative, then search for the first ld in PATH. 7351 with_gnu_ld=unknown 7352 ;; 7353 esac 7354elif test "$with_gnu_ld" = yes; then 7355 AC_MSG_CHECKING([for GNU ld]) 7356else 7357 AC_MSG_CHECKING([for non-GNU ld]) 7358fi 7359AC_CACHE_VAL(lt_cv_path_LD, 7360[if test -z "$LD"; then 7361 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 7362 for ac_dir in $PATH; do 7363 IFS="$lt_save_ifs" 7364 test -z "$ac_dir" && ac_dir=. 7365 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 7366 lt_cv_path_LD="$ac_dir/$ac_prog" 7367 # Check to see if the program is GNU ld. I'd rather use --version, 7368 # but apparently some GNU ld's only accept -v. 7369 # Break only if it was the GNU/non-GNU ld that we prefer. 7370 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then 7371 test "$with_gnu_ld" != no && break 7372 else 7373 test "$with_gnu_ld" != yes && break 7374 fi 7375 fi 7376 done 7377 IFS="$lt_save_ifs" 7378else 7379 lt_cv_path_LD="$LD" # Let the user override the test with a path. 7380fi]) 7381LD="$lt_cv_path_LD" 7382if test -n "$LD"; then 7383 AC_MSG_RESULT($LD) 7384else 7385 AC_MSG_RESULT(no) 7386fi 7387test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 7388AC_PROG_LD_GNU 7389])# AC_PROG_LD 7390 7391 7392# AC_PROG_LD_GNU 7393# -------------- 7394AC_DEFUN([AC_PROG_LD_GNU], 7395[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 7396[# I'd rather use --version here, but apparently some GNU ld's only accept -v. 7397if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then 7398 lt_cv_prog_gnu_ld=yes 7399else 7400 lt_cv_prog_gnu_ld=no 7401fi]) 7402with_gnu_ld=$lt_cv_prog_gnu_ld 7403])# AC_PROG_LD_GNU 7404 7405 7406# AC_PROG_LD_RELOAD_FLAG 7407# ---------------------- 7408# find reload flag for linker 7409# -- PORTME Some linkers may need a different reload flag. 7410AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 7411[AC_CACHE_CHECK([for $LD option to reload object files], 7412 lt_cv_ld_reload_flag, 7413 [lt_cv_ld_reload_flag='-r']) 7414reload_flag=$lt_cv_ld_reload_flag 7415case $reload_flag in 7416"" | " "*) ;; 7417*) reload_flag=" $reload_flag" ;; 7418esac 7419reload_cmds='$LD$reload_flag -o $output$reload_objs' 7420])# AC_PROG_LD_RELOAD_FLAG 7421 7422 7423# AC_DEPLIBS_CHECK_METHOD 7424# ----------------------- 7425# how to check for library dependencies 7426# -- PORTME fill in with the dynamic library characteristics 7427AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 7428[AC_CACHE_CHECK([how to recognise dependant libraries], 7429lt_cv_deplibs_check_method, 7430[lt_cv_file_magic_cmd='$MAGIC_CMD' 7431lt_cv_file_magic_test_file= 7432lt_cv_deplibs_check_method='unknown' 7433# Need to set the preceding variable on all platforms that support 7434# interlibrary dependencies. 7435# 'none' -- dependencies not supported. 7436# `unknown' -- same as none, but documents that we really don't know. 7437# 'pass_all' -- all dependencies passed with no checks. 7438# 'test_compile' -- check by making test program. 7439# 'file_magic [[regex]]' -- check by looking for files in library path 7440# which responds to the $file_magic_cmd with a given egrep regex. 7441# If you have `file' or equivalent on your system and you're not sure 7442# whether `pass_all' will *always* work, you probably want this one. 7443 7444case $host_os in 7445aix4* | aix5*) 7446 lt_cv_deplibs_check_method=pass_all 7447 ;; 7448 7449beos*) 7450 lt_cv_deplibs_check_method=pass_all 7451 ;; 7452 7453bsdi4*) 7454 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 7455 lt_cv_file_magic_cmd='/usr/bin/file -L' 7456 lt_cv_file_magic_test_file=/shlib/libc.so 7457 ;; 7458 7459cygwin* | mingw* | pw32*) 7460 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 7461 lt_cv_file_magic_cmd='$OBJDUMP -f' 7462 ;; 7463 7464darwin* | rhapsody*) 7465 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' 7466 lt_cv_file_magic_cmd='/usr/bin/file -L' 7467 case "$host_os" in 7468 rhapsody* | darwin1.[[012]]) 7469 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System` 7470 ;; 7471 *) # Darwin 1.3 on 7472 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' 7473 ;; 7474 esac 7475 ;; 7476 7477freebsd*) 7478 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 7479 case $host_cpu in 7480 i*86 ) 7481 # Not sure whether the presence of OpenBSD here was a mistake. 7482 # Let's accept both of them until this is cleared up. 7483 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' 7484 lt_cv_file_magic_cmd=/usr/bin/file 7485 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 7486 ;; 7487 esac 7488 else 7489 lt_cv_deplibs_check_method=pass_all 7490 fi 7491 ;; 7492 7493gnu*) 7494 lt_cv_deplibs_check_method=pass_all 7495 ;; 7496 7497hpux10.20* | hpux11*) 7498 lt_cv_file_magic_cmd=/usr/bin/file 7499 if test "$host_cpu" = ia64; then 7500 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 7501 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 7502 else 7503 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 7504 lt_cv_file_magic_test_file=/usr/lib/libc.sl 7505 fi 7506 ;; 7507 7508irix5* | irix6* | nonstopux*) 7509 case $host_os in 7510 irix5* | nonstopux*) 7511 # this will be overridden with pass_all, but let us keep it just in case 7512 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" 7513 ;; 7514 *) 7515 case $LD in 7516 *-32|*"-32 ") libmagic=32-bit;; 7517 *-n32|*"-n32 ") libmagic=N32;; 7518 *-64|*"-64 ") libmagic=64-bit;; 7519 *) libmagic=never-match;; 7520 esac 7521 # this will be overridden with pass_all, but let us keep it just in case 7522 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" 7523 ;; 7524 esac 7525 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` 7526 lt_cv_deplibs_check_method=pass_all 7527 ;; 7528 7529# This must be Linux ELF. 7530linux*) 7531 case $host_cpu in 7532 alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* ) 7533 lt_cv_deplibs_check_method=pass_all ;; 7534 *) 7535 # glibc up to 2.1.1 does not perform some relocations on ARM 7536 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; 7537 esac 7538 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` 7539 ;; 7540 7541netbsd*) 7542 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 7543 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' 7544 else 7545 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' 7546 fi 7547 ;; 7548 7549newos6*) 7550 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 7551 lt_cv_file_magic_cmd=/usr/bin/file 7552 lt_cv_file_magic_test_file=/usr/lib/libnls.so 7553 ;; 7554 7555nto-qnx) 7556 lt_cv_deplibs_check_method=unknown 7557 ;; 7558 7559openbsd*) 7560 lt_cv_file_magic_cmd=/usr/bin/file 7561 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 7562 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7563 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' 7564 else 7565 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' 7566 fi 7567 ;; 7568 7569osf3* | osf4* | osf5*) 7570 # this will be overridden with pass_all, but let us keep it just in case 7571 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' 7572 lt_cv_file_magic_test_file=/shlib/libc.so 7573 lt_cv_deplibs_check_method=pass_all 7574 ;; 7575 7576sco3.2v5*) 7577 lt_cv_deplibs_check_method=pass_all 7578 ;; 7579 7580solaris*) 7581 lt_cv_deplibs_check_method=pass_all 7582 lt_cv_file_magic_test_file=/lib/libc.so 7583 ;; 7584 7585sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 7586 case $host_vendor in 7587 motorola) 7588 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]]' 7589 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 7590 ;; 7591 ncr) 7592 lt_cv_deplibs_check_method=pass_all 7593 ;; 7594 sequent) 7595 lt_cv_file_magic_cmd='/bin/file' 7596 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 7597 ;; 7598 sni) 7599 lt_cv_file_magic_cmd='/bin/file' 7600 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 7601 lt_cv_file_magic_test_file=/lib/libc.so 7602 ;; 7603 esac 7604 ;; 7605 7606sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) 7607 lt_cv_deplibs_check_method=pass_all 7608 ;; 7609esac 7610]) 7611file_magic_cmd=$lt_cv_file_magic_cmd 7612deplibs_check_method=$lt_cv_deplibs_check_method 7613test -z "$deplibs_check_method" && deplibs_check_method=unknown 7614])# AC_DEPLIBS_CHECK_METHOD 7615 7616 7617# AC_PROG_NM 7618# ---------- 7619# find the path to a BSD-compatible name lister 7620AC_DEFUN([AC_PROG_NM], 7621[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 7622[if test -n "$NM"; then 7623 # Let the user override the test. 7624 lt_cv_path_NM="$NM" 7625else 7626 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 7627 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do 7628 IFS="$lt_save_ifs" 7629 test -z "$ac_dir" && ac_dir=. 7630 tmp_nm="$ac_dir/${ac_tool_prefix}nm" 7631 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 7632 # Check to see if the nm accepts a BSD-compat flag. 7633 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 7634 # nm: unknown option "B" ignored 7635 # Tru64's nm complains that /dev/null is an invalid object file 7636 if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then 7637 lt_cv_path_NM="$tmp_nm -B" 7638 break 7639 elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then 7640 lt_cv_path_NM="$tmp_nm -p" 7641 break 7642 else 7643 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7644 continue # so that we can try to find one that supports BSD flags 7645 fi 7646 fi 7647 done 7648 IFS="$lt_save_ifs" 7649 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 7650fi]) 7651NM="$lt_cv_path_NM" 7652])# AC_PROG_NM 7653 7654 7655# AC_CHECK_LIBM 7656# ------------- 7657# check for math library 7658AC_DEFUN([AC_CHECK_LIBM], 7659[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7660LIBM= 7661case $host in 7662*-*-beos* | *-*-cygwin* | *-*-pw32*) 7663 # These system don't have libm 7664 ;; 7665*-ncr-sysv4.3*) 7666 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 7667 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") 7668 ;; 7669*) 7670 AC_CHECK_LIB(m, main, LIBM="-lm") 7671 ;; 7672esac 7673])# AC_CHECK_LIBM 7674 7675 7676# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 7677# ----------------------------------- 7678# sets LIBLTDL to the link flags for the libltdl convenience library and 7679# LTDLINCL to the include flags for the libltdl header and adds 7680# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL 7681# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If 7682# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will 7683# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with 7684# '${top_srcdir}/' (note the single quotes!). If your package is not 7685# flat and you're not using automake, define top_builddir and 7686# top_srcdir appropriately in the Makefiles. 7687AC_DEFUN([AC_LIBLTDL_CONVENIENCE], 7688[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 7689 case $enable_ltdl_convenience in 7690 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 7691 "") enable_ltdl_convenience=yes 7692 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 7693 esac 7694 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 7695 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 7696 # For backwards non-gettext consistent compatibility... 7697 INCLTDL="$LTDLINCL" 7698])# AC_LIBLTDL_CONVENIENCE 7699 7700 7701# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 7702# ----------------------------------- 7703# sets LIBLTDL to the link flags for the libltdl installable library and 7704# LTDLINCL to the include flags for the libltdl header and adds 7705# --enable-ltdl-install to the configure arguments. Note that LIBLTDL 7706# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If 7707# DIRECTORY is not provided and an installed libltdl is not found, it is 7708# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' 7709# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single 7710# quotes!). If your package is not flat and you're not using automake, 7711# define top_builddir and top_srcdir appropriately in the Makefiles. 7712# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 7713AC_DEFUN([AC_LIBLTDL_INSTALLABLE], 7714[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 7715 AC_CHECK_LIB(ltdl, main, 7716 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 7717 [if test x"$enable_ltdl_install" = xno; then 7718 AC_MSG_WARN([libltdl not installed, but installation disabled]) 7719 else 7720 enable_ltdl_install=yes 7721 fi 7722 ]) 7723 if test x"$enable_ltdl_install" = x"yes"; then 7724 ac_configure_args="$ac_configure_args --enable-ltdl-install" 7725 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 7726 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 7727 else 7728 ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 7729 LIBLTDL="-lltdl" 7730 LTDLINCL= 7731 fi 7732 # For backwards non-gettext consistent compatibility... 7733 INCLTDL="$LTDLINCL" 7734])# AC_LIBLTDL_INSTALLABLE 7735 7736 7737# If this macro is not defined by Autoconf, define it here. 7738ifdef([AC_PROVIDE_IFELSE], 7739 [], 7740 [define([AC_PROVIDE_IFELSE], 7741 [ifdef([AC_PROVIDE_$1], 7742 [$2], [$3])])]) 7743 7744 7745# AC_LIBTOOL_CXX 7746# -------------- 7747# enable support for C++ libraries 7748AC_DEFUN([AC_LIBTOOL_CXX], 7749[AC_REQUIRE([_LT_AC_LANG_CXX]) 7750])# AC_LIBTOOL_CXX 7751 7752 7753# _LT_AC_LANG_CXX 7754# --------------- 7755AC_DEFUN([_LT_AC_LANG_CXX], 7756[AC_REQUIRE([AC_PROG_CXX]) 7757AC_REQUIRE([AC_PROG_CXXCPP]) 7758])# _LT_AC_LANG_CXX 7759 7760 7761# AC_LIBTOOL_GCJ 7762# -------------- 7763# enable support for GCJ libraries 7764AC_DEFUN([AC_LIBTOOL_GCJ], 7765[AC_REQUIRE([_LT_AC_LANG_GCJ]) 7766])# AC_LIBTOOL_GCJ 7767 7768 7769# _LT_AC_LANG_GCJ 7770# --------------- 7771AC_DEFUN([_LT_AC_LANG_GCJ], 7772[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 7773 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 7774 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 7775 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 7776 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 7777 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 7778])# _LT_AC_LANG_GCJ 7779 7780 7781# AC_LIBTOOL_RC 7782# -------------- 7783# enable support for Windows resource files 7784AC_DEFUN([AC_LIBTOOL_RC], 7785[AC_REQUIRE([AC_PROG_RC]) 7786])# AC_LIBTOOL_RC 7787 7788 7789# AC_LIBTOOL_LANG_C_CONFIG 7790# ------------------------ 7791# Ensure that the configuration vars for the C compiler are 7792# suitably defined. Those variables are subsequently used by 7793# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 7794AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 7795AC_DEFUN([_LT_AC_LANG_C_CONFIG], 7796[lt_save_CC="$CC" 7797AC_LANG_PUSH(C) 7798 7799# Source file extension for C test sources. 7800ac_ext=c 7801 7802# Object file extension for compiled C test sources. 7803objext=o 7804_LT_AC_TAGVAR(objext, $1)=$objext 7805 7806# Code to be used in simple compile tests 7807lt_simple_compile_test_code="int some_variable = 0;" 7808 7809# Code to be used in simple link tests 7810lt_simple_link_test_code='main(){return(0);}' 7811 7812_LT_AC_SYS_COMPILER 7813 7814# 7815# Check for any special shared library compilation flags. 7816# 7817_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= 7818if test "$GCC" = no; then 7819 case $host_os in 7820 sco3.2v5*) 7821 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' 7822 ;; 7823 esac 7824fi 7825if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then 7826 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) 7827 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then : 7828 else 7829 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) 7830 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no 7831 fi 7832fi 7833 7834 7835# 7836# Check to make sure the static flag actually works. 7837# 7838AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], 7839 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), 7840 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), 7841 [], 7842 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 7843 7844 7845## CAVEAT EMPTOR: 7846## There is no encapsulation within the following macros, do not change 7847## the running order or otherwise move them around unless you know exactly 7848## what you are doing... 7849AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 7850AC_LIBTOOL_PROG_COMPILER_PIC($1) 7851AC_LIBTOOL_PROG_CC_C_O($1) 7852AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 7853AC_LIBTOOL_PROG_LD_SHLIBS($1) 7854AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 7855AC_LIBTOOL_SYS_LIB_STRIP 7856AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 7857AC_LIBTOOL_DLOPEN_SELF($1) 7858 7859# Report which librarie types wil actually be built 7860AC_MSG_CHECKING([if libtool supports shared libraries]) 7861AC_MSG_RESULT([$can_build_shared]) 7862 7863AC_MSG_CHECKING([whether to build shared libraries]) 7864test "$can_build_shared" = "no" && enable_shared=no 7865 7866# On AIX, shared libraries and static libraries use the same namespace, and 7867# are all built from PIC. 7868case "$host_os" in 7869aix3*) 7870 test "$enable_shared" = yes && enable_static=no 7871 if test -n "$RANLIB"; then 7872 archive_cmds="$archive_cmds~\$RANLIB \$lib" 7873 postinstall_cmds='$RANLIB $lib' 7874 fi 7875 ;; 7876 7877aix4*) 7878 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7879 test "$enable_shared" = yes && enable_static=no 7880 fi 7881 ;; 7882esac 7883AC_MSG_RESULT([$enable_shared]) 7884 7885AC_MSG_CHECKING([whether to build static libraries]) 7886# Make sure either enable_shared or enable_static is yes. 7887test "$enable_shared" = yes || enable_static=yes 7888AC_MSG_RESULT([$enable_static]) 7889 7890AC_LIBTOOL_CONFIG($1) 7891 7892AC_LANG_POP 7893CC="$lt_save_CC" 7894])# AC_LIBTOOL_LANG_C_CONFIG 7895 7896 7897# AC_LIBTOOL_LANG_CXX_CONFIG 7898# -------------------------- 7899# Ensure that the configuration vars for the C compiler are 7900# suitably defined. Those variables are subsequently used by 7901# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 7902AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 7903AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 7904[AC_LANG_PUSH(C++) 7905AC_REQUIRE([AC_PROG_CXX]) 7906AC_REQUIRE([AC_PROG_CXXCPP]) 7907 7908_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 7909_LT_AC_TAGVAR(allow_undefined_flag, $1)= 7910_LT_AC_TAGVAR(always_export_symbols, $1)=no 7911_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 7912_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 7913_LT_AC_TAGVAR(hardcode_direct, $1)=no 7914_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 7915_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 7916_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 7917_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 7918_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7919_LT_AC_TAGVAR(no_undefined_flag, $1)= 7920_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 7921 7922# Dependencies to place before and after the object being linked: 7923_LT_AC_TAGVAR(predep_objects, $1)= 7924_LT_AC_TAGVAR(postdep_objects, $1)= 7925_LT_AC_TAGVAR(predeps, $1)= 7926_LT_AC_TAGVAR(postdeps, $1)= 7927_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 7928 7929# Source file extension for C test sources. 7930ac_ext=cc 7931 7932# Object file extension for compiled C test sources. 7933objext=o 7934_LT_AC_TAGVAR(objext, $1)=$objext 7935 7936# Code to be used in simple compile tests 7937lt_simple_compile_test_code="int some_variable = 0;" 7938 7939# Code to be used in simple link tests 7940lt_simple_link_test_code='int main(int char *[]) { return(0); }' 7941 7942# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7943_LT_AC_SYS_COMPILER 7944 7945# Allow CC to be a program name with arguments. 7946lt_save_CC="$CC" 7947CC=${CXX-"c++"} 7948set dummy $CC 7949compiler="[$]2" 7950_LT_AC_TAGVAR(compiler, $1)=$CC 7951cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` 7952 7953# We don't want -fno-exception wen compiling C++ code, so set the 7954# no_builtin_flag separately 7955if test "$GXX" = yes; then 7956 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 7957else 7958 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7959fi 7960 7961if test "$GXX" = yes; then 7962 # Set up default GNU C++ configuration 7963 7964 # Check if GNU C++ uses GNU ld as the underlying linker, since the 7965 # archiving commands below assume that GNU ld is being used. 7966 if eval "`$CC -print-prog-name=ld` --version 2>&1" | \ 7967 egrep 'GNU ld' > /dev/null; then 7968 with_gnu_ld=yes 7969 7970 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 7971 _LT_AC_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' 7972 7973 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 7974 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7975 7976 # If archive_cmds runs LD, not CC, wlarc should be empty 7977 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 7978 # investigate it a little bit more. (MM) 7979 wlarc='${wl}' 7980 7981 # ancient GNU ld didn't support --whole-archive et. al. 7982 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 7983 egrep 'no-whole-archive' > /dev/null; then 7984 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 7985 else 7986 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 7987 fi 7988 else 7989 with_gnu_ld=no 7990 wlarc= 7991 7992 # A generic and very simple default shared library creation 7993 # command for GNU C++ for the case where it uses the native 7994 # linker, instead of GNU ld. If possible, this setting should 7995 # overridden to take advantage of the native linker features on 7996 # the platform it is being used on. 7997 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7998 fi 7999 8000 # Commands to make compiler produce verbose output that lists 8001 # what "hidden" libraries, object files and flags are used when 8002 # linking a shared library. 8003 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' 8004 8005else 8006 GXX=no 8007 with_gnu_ld=no 8008 wlarc= 8009fi 8010 8011# PORTME: fill in a description of your system's C++ link characteristics 8012AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8013_LT_AC_TAGVAR(ld_shlibs, $1)=yes 8014case $host_os in 8015 aix3*) 8016 # FIXME: insert proper C++ library support 8017 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8018 ;; 8019 aix4* | aix5*) 8020 if test "$host_cpu" = ia64; then 8021 # On IA64, the linker does run time linking by default, so we don't 8022 # have to do anything special. 8023 aix_use_runtimelinking=no 8024 exp_sym_flag='-Bexport' 8025 no_entry_flag="" 8026 else 8027 # KDE requires run time linking. Make it the default. 8028 aix_use_runtimelinking=yes 8029 exp_sym_flag='-bexport' 8030 no_entry_flag='-bnoentry' 8031 fi 8032 8033 # When large executables or shared objects are built, AIX ld can 8034 # have problems creating the table of contents. If linking a library 8035 # or program results in "error TOC overflow" add -mminimal-toc to 8036 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8037 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8038 8039 _LT_AC_TAGVAR(archive_cmds, $1)='' 8040 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8041 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 8042 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 8043 8044 if test "$GXX" = yes; then 8045 case $host_os in aix4.[012]|aix4.[012].*) 8046 # We only want to do this on AIX 4.2 and lower, the check 8047 # below for broken collect2 doesn't work under 4.3+ 8048 collect2name=`${CC} -print-prog-name=collect2` 8049 if test -f "$collect2name" && \ 8050 strings "$collect2name" | grep resolve_lib_name >/dev/null 8051 then 8052 # We have reworked collect2 8053 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8054 else 8055 # We have old collect2 8056 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 8057 # It fails to find uninstalled libraries when the uninstalled 8058 # path is not listed in the libpath. Setting hardcode_minus_L 8059 # to unsupported forces relinking 8060 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 8061 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8062 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 8063 fi 8064 esac 8065 shared_flag='-shared' 8066 else 8067 # not using gcc 8068 if test "$host_cpu" = ia64; then 8069 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8070 # chokes on -Wl,-G. The following line is correct: 8071 shared_flag='-G' 8072 else 8073 if test "$aix_use_runtimelinking" = yes; then 8074 shared_flag='-qmkshrobj ${wl}-G' 8075 else 8076 shared_flag='-qmkshrobj' 8077 fi 8078 fi 8079 fi 8080 8081 # Let the compiler handle the export list. 8082 _LT_AC_TAGVAR(always_export_symbols, $1)=no 8083 if test "$aix_use_runtimelinking" = yes; then 8084 # Warning - without using the other runtime loading flags (-brtl), 8085 # -berok will link without error, but may produce a broken library. 8086 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 8087 # Determine the default libpath from the value encoded in an empty executable. 8088 _LT_AC_SYS_LIBPATH_AIX 8089 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 8090 8091 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag" 8092 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 8093 else 8094 if test "$host_cpu" = ia64; then 8095 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 8096 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8097 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" 8098 else 8099 # Determine the default libpath from the value encoded in an empty executable. 8100 _LT_AC_SYS_LIBPATH_AIX 8101 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 8102 # Warning - without using the other run time loading flags, 8103 # -berok will link without error, but may produce a broken library. 8104 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 8105 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 8106 # -bexpall does not export symbols beginning with underscore (_) 8107 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 8108 # Exported symbols can be pulled into shared objects from archives 8109 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' 8110 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 8111 # This is similar to how AIX traditionally builds it's shared libraries. 8112 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 8113 fi 8114 fi 8115 ;; 8116 chorus*) 8117 case $cc_basename in 8118 *) 8119 # FIXME: insert proper C++ library support 8120 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8121 ;; 8122 esac 8123 ;; 8124 dgux*) 8125 case $cc_basename in 8126 ec++) 8127 # FIXME: insert proper C++ library support 8128 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8129 ;; 8130 ghcx) 8131 # Green Hills C++ Compiler 8132 # FIXME: insert proper C++ library support 8133 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8134 ;; 8135 *) 8136 # FIXME: insert proper C++ library support 8137 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8138 ;; 8139 esac 8140 ;; 8141 freebsd[12]*) 8142 # C++ shared libraries reported to be fairly broken before switch to ELF 8143 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8144 ;; 8145 freebsd-elf*) 8146 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 8147 ;; 8148 freebsd*) 8149 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 8150 # conventions 8151 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 8152 ;; 8153 gnu*) 8154 ;; 8155 hpux*) 8156 if test $with_gnu_ld = no; then 8157 if test "$host_cpu" = ia64; then 8158 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8159 else 8160 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8161 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8162 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8163 fi 8164 fi 8165 if test "$host_cpu" = ia64; then 8166 _LT_AC_TAGVAR(hardcode_direct, $1)=no 8167 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8168 else 8169 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 8170 fi 8171 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8172 # but as the default 8173 # location of the library. 8174 8175 case $cc_basename in 8176 CC) 8177 # FIXME: insert proper C++ library support 8178 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8179 ;; 8180 aCC) 8181 case $host_os in 8182 hpux9*) 8183 _LT_AC_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' 8184 ;; 8185 *) 8186 if test "$host_cpu" = ia64; then 8187 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' 8188 else 8189 _LT_AC_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' 8190 fi 8191 ;; 8192 esac 8193 # Commands to make compiler produce verbose output that lists 8194 # what "hidden" libraries, object files and flags are used when 8195 # linking a shared library. 8196 # 8197 # There doesn't appear to be a way to prevent this compiler from 8198 # explicitly linking system object files so we need to strip them 8199 # from the output so that they don't get included in the library 8200 # dependencies. 8201 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; echo $list' 8202 ;; 8203 *) 8204 if test "$GXX" = yes; then 8205 if test $with_gnu_ld = no; then 8206 case $host_os in 8207 hpux9*) 8208 _LT_AC_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' 8209 ;; 8210 *) 8211 if test "$host_cpu" = ia64; then 8212 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' 8213 else 8214 _LT_AC_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' 8215 fi 8216 ;; 8217 esac 8218 fi 8219 else 8220 # FIXME: insert proper C++ library support 8221 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8222 fi 8223 ;; 8224 esac 8225 ;; 8226 irix5* | irix6*) 8227 case $cc_basename in 8228 CC) 8229 # SGI C++ 8230 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' 8231 8232 # Archives containing C++ object files must be created using 8233 # "CC -ar", where "CC" is the IRIX C++ compiler. This is 8234 # necessary to make sure instantiated templates are included 8235 # in the archive. 8236 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 8237 ;; 8238 *) 8239 if test "$GXX" = yes; then 8240 if test "$with_gnu_ld" = no; then 8241 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 8242 else 8243 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib' 8244 fi 8245 fi 8246 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 8247 ;; 8248 esac 8249 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8250 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8251 ;; 8252 linux*) 8253 case $cc_basename in 8254 KCC) 8255 # Kuck and Associates, Inc. (KAI) C++ Compiler 8256 8257 # KCC will only create a shared library if the output file 8258 # ends with ".so" (or ".sl" for HP-UX), so rename the library 8259 # to its proper name (with version) after linking. 8260 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 8261 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' 8262 8263 # Commands to make compiler produce verbose output that lists 8264 # what "hidden" libraries, object files and flags are used when 8265 # linking a shared library. 8266 # 8267 # There doesn't appear to be a way to prevent this compiler from 8268 # explicitly linking system object files so we need to strip them 8269 # from the output so that they don't get included in the library 8270 # dependencies. 8271 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 8272 8273 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 8274 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8275 8276 # Archives containing C++ object files must be created using 8277 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 8278 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 8279 ;; 8280 cxx) 8281 # Compaq C++ 8282 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8283 _LT_AC_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' 8284 8285 runpath_var=LD_RUN_PATH 8286 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8287 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8288 8289 # Commands to make compiler produce verbose output that lists 8290 # what "hidden" libraries, object files and flags are used when 8291 # linking a shared library. 8292 # 8293 # There doesn't appear to be a way to prevent this compiler from 8294 # explicitly linking system object files so we need to strip them 8295 # from the output so that they don't get included in the library 8296 # dependencies. 8297 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list' 8298 ;; 8299 esac 8300 ;; 8301 lynxos*) 8302 # FIXME: insert proper C++ library support 8303 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8304 ;; 8305 m88k*) 8306 # FIXME: insert proper C++ library support 8307 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8308 ;; 8309 mvs*) 8310 case $cc_basename in 8311 cxx) 8312 # FIXME: insert proper C++ library support 8313 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8314 ;; 8315 *) 8316 # FIXME: insert proper C++ library support 8317 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8318 ;; 8319 esac 8320 ;; 8321 netbsd*) 8322 # NetBSD uses g++ - do we need to do anything? 8323 ;; 8324 osf3*) 8325 case $cc_basename in 8326 KCC) 8327 # Kuck and Associates, Inc. (KAI) C++ Compiler 8328 8329 # KCC will only create a shared library if the output file 8330 # ends with ".so" (or ".sl" for HP-UX), so rename the library 8331 # to its proper name (with version) after linking. 8332 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 8333 8334 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8335 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8336 8337 # Archives containing C++ object files must be created using 8338 # "CC -Bstatic", where "CC" is the KAI C++ compiler. 8339 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 8340 8341 ;; 8342 RCC) 8343 # Rational C++ 2.4.1 8344 # FIXME: insert proper C++ library support 8345 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8346 ;; 8347 cxx) 8348 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8349 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' 8350 8351 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8352 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8353 8354 # Commands to make compiler produce verbose output that lists 8355 # what "hidden" libraries, object files and flags are used when 8356 # linking a shared library. 8357 # 8358 # There doesn't appear to be a way to prevent this compiler from 8359 # explicitly linking system object files so we need to strip them 8360 # from the output so that they don't get included in the library 8361 # dependencies. 8362 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' 8363 ;; 8364 *) 8365 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8366 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8367 _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 8368 8369 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8370 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8371 8372 # Commands to make compiler produce verbose output that lists 8373 # what "hidden" libraries, object files and flags are used when 8374 # linking a shared library. 8375 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' 8376 8377 else 8378 # FIXME: insert proper C++ library support 8379 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8380 fi 8381 ;; 8382 esac 8383 ;; 8384 osf4* | osf5*) 8385 case $cc_basename in 8386 KCC) 8387 # Kuck and Associates, Inc. (KAI) C++ Compiler 8388 8389 # KCC will only create a shared library if the output file 8390 # ends with ".so" (or ".sl" for HP-UX), so rename the library 8391 # to its proper name (with version) after linking. 8392 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 8393 8394 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8395 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8396 8397 # Archives containing C++ object files must be created using 8398 # the KAI C++ compiler. 8399 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 8400 ;; 8401 RCC) 8402 # Rational C++ 2.4.1 8403 # FIXME: insert proper C++ library support 8404 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8405 ;; 8406 cxx) 8407 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 8408 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' 8409 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~ 8410 echo "-hidden">> $lib.exp~ 8411 $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 $objdir/so_locations -o $lib~ 8412 $rm $lib.exp' 8413 8414 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8415 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8416 8417 # Commands to make compiler produce verbose output that lists 8418 # what "hidden" libraries, object files and flags are used when 8419 # linking a shared library. 8420 # 8421 # There doesn't appear to be a way to prevent this compiler from 8422 # explicitly linking system object files so we need to strip them 8423 # from the output so that they don't get included in the library 8424 # dependencies. 8425 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' 8426 ;; 8427 *) 8428 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8429 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8430 _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' 8431 8432 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8433 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 8434 8435 # Commands to make compiler produce verbose output that lists 8436 # what "hidden" libraries, object files and flags are used when 8437 # linking a shared library. 8438 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' 8439 8440 else 8441 # FIXME: insert proper C++ library support 8442 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8443 fi 8444 ;; 8445 esac 8446 ;; 8447 psos*) 8448 # FIXME: insert proper C++ library support 8449 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8450 ;; 8451 sco*) 8452 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 8453 case $cc_basename in 8454 CC) 8455 # FIXME: insert proper C++ library support 8456 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8457 ;; 8458 *) 8459 # FIXME: insert proper C++ library support 8460 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8461 ;; 8462 esac 8463 ;; 8464 sunos4*) 8465 case $cc_basename in 8466 CC) 8467 # Sun C++ 4.x 8468 # FIXME: insert proper C++ library support 8469 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8470 ;; 8471 lcc) 8472 # Lucid 8473 # FIXME: insert proper C++ library support 8474 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8475 ;; 8476 *) 8477 # FIXME: insert proper C++ library support 8478 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8479 ;; 8480 esac 8481 ;; 8482 solaris*) 8483 case $cc_basename in 8484 CC) 8485 # Sun C++ 4.2, 5.x and Centerline C++ 8486 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8487 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8488 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 8489 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 8490 8491 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8492 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 8493 case $host_os in 8494 solaris2.[0-5] | solaris2.[0-5].*) ;; 8495 *) 8496 # The C++ compiler is used as linker so we must use $wl 8497 # flag to pass the commands to the underlying system 8498 # linker. 8499 # Supported since Solaris 2.6 (maybe 2.5.1?) 8500 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 8501 ;; 8502 esac 8503 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 8504 8505 # Commands to make compiler produce verbose output that lists 8506 # what "hidden" libraries, object files and flags are used when 8507 # linking a shared library. 8508 # 8509 # There doesn't appear to be a way to prevent this compiler from 8510 # explicitly linking system object files so we need to strip them 8511 # from the output so that they don't get included in the library 8512 # dependencies. 8513 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' 8514 8515 # Archives containing C++ object files must be created using 8516 # "CC -xar", where "CC" is the Sun C++ compiler. This is 8517 # necessary to make sure instantiated templates are included 8518 # in the archive. 8519 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8520 ;; 8521 gcx) 8522 # Green Hills C++ Compiler 8523 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8524 8525 # The C++ compiler must be used to create the archive. 8526 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 8527 ;; 8528 *) 8529 # GNU C++ compiler with Solaris linker 8530 if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8531 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 8532 if $CC --version | egrep -v '^2\.7' > /dev/null; then 8533 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib' 8534 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 8535 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp' 8536 8537 # Commands to make compiler produce verbose output that lists 8538 # what "hidden" libraries, object files and flags are used when 8539 # linking a shared library. 8540 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" 8541 else 8542 # g++ 2.7 appears to require `-G' NOT `-shared' on this 8543 # platform. 8544 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib' 8545 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 8546 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp' 8547 8548 # Commands to make compiler produce verbose output that lists 8549 # what "hidden" libraries, object files and flags are used when 8550 # linking a shared library. 8551 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" 8552 fi 8553 8554 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 8555 fi 8556 ;; 8557 esac 8558 ;; 8559 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) 8560 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 8561 ;; 8562 tandem*) 8563 case $cc_basename in 8564 NCC) 8565 # NonStop-UX NCC 3.20 8566 # FIXME: insert proper C++ library support 8567 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8568 ;; 8569 *) 8570 # FIXME: insert proper C++ library support 8571 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8572 ;; 8573 esac 8574 ;; 8575 vxworks*) 8576 # FIXME: insert proper C++ library support 8577 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8578 ;; 8579 *) 8580 # FIXME: insert proper C++ library support 8581 _LT_AC_TAGVAR(ld_shlibs, $1)=no 8582 ;; 8583esac 8584AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 8585test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 8586 8587# Figure out "hidden" C++ library dependencies from verbose 8588# compiler output whening linking a shared library. 8589cat > conftest.$ac_ext <<EOF 8590class Foo 8591{ 8592public: 8593 Foo (void) { a = 0; } 8594private: 8595 int a; 8596}; 8597EOF 8598 8599 8600if AC_TRY_EVAL(ac_compile); then 8601 # Parse the compiler output and extract the necessary 8602 # objects, libraries and library flags. 8603 8604 # Sentinel used to keep track of whether or not we are before 8605 # the conftest object file. 8606 pre_test_object_deps_done=no 8607 8608 # The `*' in the case matches for architectures that use `case' in 8609 # $output_verbose_cmd can trigger glob expansion during the loop 8610 # eval without this substitution. 8611 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" 8612 8613 for p in `eval $output_verbose_link_cmd`; do 8614 case $p in 8615 8616 -L* | -R* | -l*) 8617 # Some compilers place space between "-{L,R}" and the path. 8618 # Remove the space. 8619 if test $p = "-L" \ 8620 || test $p = "-R"; then 8621 prev=$p 8622 continue 8623 else 8624 prev= 8625 fi 8626 8627 if test "$pre_test_object_deps_done" = no; then 8628 case $p in 8629 -L* | -R*) 8630 # Internal compiler library paths should come after those 8631 # provided the user. The postdeps already come after the 8632 # user supplied libs so there is no need to process them. 8633 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 8634 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 8635 else 8636 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 8637 fi 8638 ;; 8639 # The "-l" case would never come before the object being 8640 # linked, so don't bother handling this case. 8641 esac 8642 else 8643 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 8644 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 8645 else 8646 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 8647 fi 8648 fi 8649 ;; 8650 8651 *.$objext|*.$libext) 8652 # This assumes that the test object file only shows up 8653 # once in the compiler output. 8654 if test "$p" = "conftest.$objext"; then 8655 pre_test_object_deps_done=yes 8656 continue 8657 fi 8658 8659 if test "$pre_test_object_deps_done" = no; then 8660 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 8661 _LT_AC_TAGVAR(predep_objects, $1)="$p" 8662 else 8663 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 8664 fi 8665 else 8666 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 8667 _LT_AC_TAGVAR(postdep_objects, $1)="$p" 8668 else 8669 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 8670 fi 8671 fi 8672 ;; 8673 8674 *) ;; # Ignore the rest. 8675 8676 esac 8677 done 8678 8679 # Clean up. 8680 rm -f a.out 8681else 8682 echo "libtool.m4: error: problem compiling C++ test program" 8683fi 8684 8685$rm -f confest.$objext 8686 8687case " $_LT_AC_TAGVAR(postdeps, $1) " in 8688*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 8689*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;; 8690esac 8691 8692_LT_AC_TAGVAR(GCC, $1)="$GXX" 8693_LT_AC_TAGVAR(LD, $1)="$LD" 8694 8695## CAVEAT EMPTOR: 8696## There is no encapsulation within the following macros, do not change 8697## the running order or otherwise move them around unless you know exactly 8698## what you are doing... 8699AC_LIBTOOL_PROG_COMPILER_PIC($1) 8700AC_LIBTOOL_PROG_CC_C_O($1) 8701AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 8702AC_LIBTOOL_PROG_LD_SHLIBS($1) 8703AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 8704AC_LIBTOOL_SYS_LIB_STRIP 8705AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 8706AC_LIBTOOL_DLOPEN_SELF($1) 8707 8708AC_LIBTOOL_CONFIG($1) 8709 8710AC_LANG_POP 8711CC="$lt_save_CC" 8712])# AC_LIBTOOL_LANG_CXX_CONFIG 8713 8714 8715# AC_LIBTOOL_LANG_GCJ_CONFIG 8716# -------------------------- 8717# Ensure that the configuration vars for the C compiler are 8718# suitably defined. Those variables are subsequently used by 8719# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 8720AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 8721AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 8722[AC_LANG_SAVE 8723 8724# Source file extension for C test sources. 8725ac_ext=java 8726 8727# Object file extension for compiled C test sources. 8728objext=o 8729_LT_AC_TAGVAR(objext, $1)=$objext 8730 8731# Code to be used in simple compile tests 8732lt_simple_compile_test_code="class foo {}" 8733 8734# Code to be used in simple link tests 8735lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' 8736 8737# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8738_LT_AC_SYS_COMPILER 8739 8740# Allow CC to be a program name with arguments. 8741lt_save_CC="$CC" 8742CC=${GCJ-"gcj"} 8743set dummy $CC 8744compiler="[$]2" 8745_LT_AC_TAGVAR(compiler, $1)=$CC 8746 8747# GCJ did not exist at the time GCC didn't implicitly link libc in. 8748_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 8749 8750## CAVEAT EMPTOR: 8751## There is no encapsulation within the following macros, do not change 8752## the running order or otherwise move them around unless you know exactly 8753## what you are doing... 8754AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 8755AC_LIBTOOL_PROG_COMPILER_PIC($1) 8756AC_LIBTOOL_PROG_CC_C_O($1) 8757AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 8758AC_LIBTOOL_PROG_LD_SHLIBS($1) 8759AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 8760AC_LIBTOOL_SYS_LIB_STRIP 8761AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 8762AC_LIBTOOL_DLOPEN_SELF($1) 8763 8764AC_LIBTOOL_CONFIG($1) 8765 8766AC_LANG_RESTORE 8767CC="$lt_save_CC" 8768])# AC_LIBTOOL_LANG_GCJ_CONFIG 8769 8770 8771# AC_LIBTOOL_LANG_RC_CONFIG 8772# -------------------------- 8773# Ensure that the configuration vars for the Windows resource compiler are 8774# suitably defined. Those variables are subsequently used by 8775# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 8776AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 8777AC_DEFUN([_LT_AC_LANG_RC_CONFIG], 8778[AC_LANG_SAVE 8779 8780# Source file extension for RC test sources. 8781ac_ext=rc 8782 8783# Object file extension for compiled RC test sources. 8784objext=o 8785_LT_AC_TAGVAR(objext, $1)=$objext 8786 8787# Code to be used in simple compile tests 8788lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8789 8790# Code to be used in simple link tests 8791lt_simple_link_test_code="$lt_simple_compile_test_code" 8792 8793# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8794_LT_AC_SYS_COMPILER 8795 8796# Allow CC to be a program name with arguments. 8797lt_save_CC="$CC" 8798CC=${RC-"windres"} 8799set dummy $CC 8800compiler="[$]2" 8801_LT_AC_TAGVAR(compiler, $1)=$CC 8802_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8803 8804AC_LIBTOOL_CONFIG($1) 8805 8806AC_LANG_RESTORE 8807CC="$lt_save_CC" 8808])# AC_LIBTOOL_LANG_RC_CONFIG 8809 8810 8811# AC_LIBTOOL_CONFIG([TAGNAME]) 8812# ---------------------------- 8813# If TAGNAME is not passed, then create an initial libtool script 8814# with a default configuration from the untagged config vars. Otherwise 8815# add code to config.status for appending the configuration named by 8816# TAGNAME from the matching tagged config vars. 8817AC_DEFUN([AC_LIBTOOL_CONFIG], 8818[# The else clause should only fire when bootstrapping the 8819# libtool distribution, otherwise you forgot to ship ltmain.sh 8820# with your package, and you will get complaints that there are 8821# no rules to generate ltmain.sh. 8822if test -f "$ltmain"; then 8823 # Now quote all the things that may contain metacharacters while being 8824 # careful not to overquote the AC_SUBSTed values. We take copies of the 8825 # variables and quote the copies for generation of the libtool script. 8826 for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \ 8827 libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 8828 old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 8829 deplibs_check_method reload_flag reload_cmds need_locks \ 8830 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 8831 lt_cv_sys_global_symbol_to_c_name_address \ 8832 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 8833 old_postinstall_cmds old_postuninstall_cmds \ 8834 _LT_AC_TAGVAR(compiler, $1) \ 8835 _LT_AC_TAGVAR(CC, $1) \ 8836 _LT_AC_TAGVAR(LD, $1) \ 8837 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 8838 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 8839 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 8840 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 8841 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 8842 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 8843 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 8844 _LT_AC_TAGVAR(old_archive_cmds, $1) \ 8845 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 8846 _LT_AC_TAGVAR(predep_objects, $1) \ 8847 _LT_AC_TAGVAR(postdep_objects, $1) \ 8848 _LT_AC_TAGVAR(predeps, $1) \ 8849 _LT_AC_TAGVAR(postdeps, $1) \ 8850 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 8851 _LT_AC_TAGVAR(archive_cmds, $1) \ 8852 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 8853 _LT_AC_TAGVAR(postinstall_cmds, $1) \ 8854 _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 8855 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 8856 _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 8857 _LT_AC_TAGVAR(no_undefined_flag, $1) \ 8858 _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 8859 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 8860 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 8861 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 8862 _LT_AC_TAGVAR(exclude_expsyms, $1) \ 8863 _LT_AC_TAGVAR(include_expsyms, $1); do 8864 8865 case $var in 8866 _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 8867 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 8868 _LT_AC_TAGVAR(archive_cmds, $1) | \ 8869 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 8870 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 8871 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 8872 extract_expsyms_cmds | reload_cmds | finish_cmds | \ 8873 postinstall_cmds | postuninstall_cmds | \ 8874 old_postinstall_cmds | old_postuninstall_cmds | \ 8875 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 8876 # Double-quote double-evaled strings. 8877 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 8878 ;; 8879 *) 8880 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 8881 ;; 8882 esac 8883 done 8884 8885 case $lt_echo in 8886 *'\[$]0 --fallback-echo"') 8887 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 8888 ;; 8889 esac 8890 8891ifelse([$1], [], 8892 [cfgfile="${ofile}T" 8893 trap "$rm \"$cfgfile\"; exit 1" 1 2 15 8894 $rm -f "$cfgfile" 8895 AC_MSG_NOTICE([creating $ofile])], 8896 [cfgfile="$ofile"]) 8897 8898 cat <<__EOF__ >> "$cfgfile" 8899ifelse([$1], [], 8900[#! $SHELL 8901 8902# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 8903# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 8904# NOTE: Changes made to this file will be lost: look at ltmain.sh. 8905# 8906# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 8907# Free Software Foundation, Inc. 8908# 8909# This file is part of GNU Libtool: 8910# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 8911# 8912# This program is free software; you can redistribute it and/or modify 8913# it under the terms of the GNU General Public License as published by 8914# the Free Software Foundation; either version 2 of the License, or 8915# (at your option) any later version. 8916# 8917# This program is distributed in the hope that it will be useful, but 8918# WITHOUT ANY WARRANTY; without even the implied warranty of 8919# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8920# General Public License for more details. 8921# 8922# You should have received a copy of the GNU General Public License 8923# along with this program; if not, write to the Free Software 8924# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 8925# 8926# As a special exception to the GNU General Public License, if you 8927# distribute this file as part of a program that contains a 8928# configuration script generated by Autoconf, you may include it under 8929# the same distribution terms that you use for the rest of that program. 8930 8931# Sed that helps us avoid accidentally triggering echo(1) options like -n. 8932Xsed="sed -e s/^X//" 8933 8934# The HP-UX ksh and POSIX shell print the target directory to stdout 8935# if CDPATH is set. 8936if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi 8937 8938# The names of the tagged configurations supported by this script. 8939available_tags= 8940 8941# ### BEGIN LIBTOOL CONFIG], 8942[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 8943 8944# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 8945 8946# Shell to use when invoking shell scripts. 8947SHELL=$lt_SHELL 8948 8949# Whether or not to build shared libraries. 8950build_libtool_libs=$enable_shared 8951 8952# Whether or not to build static libraries. 8953build_old_libs=$enable_static 8954 8955# Whether or not to add -lc for building shared libraries. 8956build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 8957 8958# Whether or not to optimize for fast installation. 8959fast_install=$enable_fast_install 8960 8961# The host system. 8962host_alias=$host_alias 8963host=$host 8964 8965# An echo program that does not interpret backslashes. 8966echo=$lt_echo 8967 8968# The archiver. 8969AR=$lt_AR 8970AR_FLAGS=$lt_AR_FLAGS 8971 8972# A C compiler. 8973LTCC=$lt_LTCC 8974 8975# A language-specific compiler. 8976CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 8977 8978# Is the compiler the GNU C compiler? 8979with_gcc=$_LT_AC_TAGVAR(GCC, $1) 8980 8981# The linker used to build libraries. 8982LD=$lt_[]_LT_AC_TAGVAR(LD, $1) 8983 8984# Whether we need hard or soft links. 8985LN_S=$lt_LN_S 8986 8987# A BSD-compatible nm program. 8988NM=$lt_NM 8989 8990# A sed program that does not truncate output. 8991SED=$lt_SED 8992 8993# A symbol stripping program 8994STRIP=$STRIP 8995 8996# Used to examine libraries when file_magic_cmd begins "file" 8997MAGIC_CMD=$MAGIC_CMD 8998 8999# Used on cygwin: DLL creation program. 9000DLLTOOL="$DLLTOOL" 9001 9002# Used on cygwin: object dumper. 9003OBJDUMP="$OBJDUMP" 9004 9005# Used on cygwin: assembler. 9006AS="$AS" 9007 9008# The name of the directory that contains temporary libtool files. 9009objdir=$objdir 9010 9011# How to create reloadable object files. 9012reload_flag=$lt_reload_flag 9013reload_cmds=$lt_reload_cmds 9014 9015# How to pass a linker flag through the compiler. 9016wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 9017 9018# Object file suffix (normally "o"). 9019objext="$ac_objext" 9020 9021# Old archive suffix (normally "a"). 9022libext="$libext" 9023 9024# Executable file suffix (normally ""). 9025exeext="$exeext" 9026 9027# Additional compiler flags for building library objects. 9028pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 9029pic_mode=$pic_mode 9030 9031# What is the maximum length of a command? 9032max_cmd_len=$lt_cv_sys_max_cmd_len 9033 9034# Does compiler simultaneously support -c and -o options? 9035compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 9036 9037# Must we lock files when doing compilation ? 9038need_locks=$lt_need_locks 9039 9040# Do we need the lib prefix for modules? 9041need_lib_prefix=$need_lib_prefix 9042 9043# Do we need a version for libraries? 9044need_version=$need_version 9045 9046# Whether dlopen is supported. 9047dlopen_support=$enable_dlopen 9048 9049# Whether dlopen of programs is supported. 9050dlopen_self=$enable_dlopen_self 9051 9052# Whether dlopen of statically linked programs is supported. 9053dlopen_self_static=$enable_dlopen_self_static 9054 9055# Compiler flag to prevent dynamic linking. 9056link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 9057 9058# Compiler flag to turn off builtin functions. 9059no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 9060 9061# Compiler flag to allow reflexive dlopens. 9062export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 9063 9064# Compiler flag to generate shared objects directly from archives. 9065whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 9066 9067# Compiler flag to generate thread-safe objects. 9068thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 9069 9070# Library versioning type. 9071version_type=$version_type 9072 9073# Format of library name prefix. 9074libname_spec=$lt_libname_spec 9075 9076# List of archive names. First name is the real one, the rest are links. 9077# The last name is the one that the linker finds with -lNAME. 9078library_names_spec=$lt_library_names_spec 9079 9080# The coded name of the library, if different from the real name. 9081soname_spec=$lt_soname_spec 9082 9083# Commands used to build and install an old-style archive. 9084RANLIB=$lt_RANLIB 9085old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 9086old_postinstall_cmds=$lt_old_postinstall_cmds 9087old_postuninstall_cmds=$lt_old_postuninstall_cmds 9088 9089# Create an old-style archive from a shared archive. 9090old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 9091 9092# Create a temporary old-style archive to link instead of a shared archive. 9093old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 9094 9095# Commands used to build and install a shared archive. 9096archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 9097archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 9098postinstall_cmds=$lt_postinstall_cmds 9099postuninstall_cmds=$lt_postuninstall_cmds 9100 9101# Commands to strip libraries. 9102old_striplib=$lt_old_striplib 9103striplib=$lt_striplib 9104 9105# Dependencies to place before the objects being linked to create a 9106# shared library. 9107predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 9108 9109# Dependencies to place after the objects being linked to create a 9110# shared library. 9111postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 9112 9113# Dependencies to place before the objects being linked to create a 9114# shared library. 9115predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 9116 9117# Dependencies to place after the objects being linked to create a 9118# shared library. 9119postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 9120 9121# The library search path used internally by the compiler when linking 9122# a shared library. 9123compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 9124 9125# Method to check whether dependent libraries are shared objects. 9126deplibs_check_method=$lt_deplibs_check_method 9127 9128# Command to use when deplibs_check_method == file_magic. 9129file_magic_cmd=$lt_file_magic_cmd 9130 9131# Flag that allows shared libraries with undefined symbols to be built. 9132allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 9133 9134# Flag that forces no undefined symbols. 9135no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 9136 9137# Commands used to finish a libtool library installation in a directory. 9138finish_cmds=$lt_finish_cmds 9139 9140# Same as above, but a single script fragment to be evaled but not shown. 9141finish_eval=$lt_finish_eval 9142 9143# Take the output of nm and produce a listing of raw symbols and C names. 9144global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 9145 9146# Transform the output of nm in a proper C declaration 9147global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 9148 9149# Transform the output of nm in a C name address pair 9150global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 9151 9152# This is the shared library runtime path variable. 9153runpath_var=$runpath_var 9154 9155# This is the shared library path variable. 9156shlibpath_var=$shlibpath_var 9157 9158# Is shlibpath searched before the hard-coded library search path? 9159shlibpath_overrides_runpath=$shlibpath_overrides_runpath 9160 9161# How to hardcode a shared library path into an executable. 9162hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 9163 9164# Whether we should hardcode library paths into libraries. 9165hardcode_into_libs=$hardcode_into_libs 9166 9167# Flag to hardcode \$libdir into a binary during linking. 9168# This must work even if \$libdir does not exist. 9169hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 9170 9171# Whether we need a single -rpath flag with a separated argument. 9172hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 9173 9174# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the 9175# resulting binary. 9176hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 9177 9178# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 9179# resulting binary. 9180hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 9181 9182# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 9183# the resulting binary. 9184hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 9185 9186# Variables whose values should be saved in libtool wrapper scripts and 9187# restored at relink time. 9188variables_saved_for_relink="$variables_saved_for_relink" 9189 9190# Whether libtool must link a program against all its dependency libraries. 9191link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 9192 9193# Compile-time system search path for libraries 9194sys_lib_search_path_spec=$lt_sys_lib_search_path_spec 9195 9196# Run-time system search path for libraries 9197sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 9198 9199# Fix the shell variable \$srcfile for the compiler. 9200fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" 9201 9202# Set to yes if exported symbols are required. 9203always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 9204 9205# The commands to list exported symbols. 9206export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 9207 9208# The commands to extract the exported symbol list from a shared archive. 9209extract_expsyms_cmds=$lt_extract_expsyms_cmds 9210 9211# Symbols that should not be listed in the preloaded symbols. 9212exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 9213 9214# Symbols that must always be exported. 9215include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 9216 9217ifelse([$1],[], 9218[# ### END LIBTOOL CONFIG], 9219[# ### END LIBTOOL TAG CONFIG: $tagname]) 9220 9221__EOF__ 9222 9223ifelse([$1],[], [ 9224 case $host_os in 9225 aix3*) 9226 cat <<\EOF >> "$cfgfile" 9227 9228# AIX sometimes has problems with the GCC collect2 program. For some 9229# reason, if we set the COLLECT_NAMES environment variable, the problems 9230# vanish in a puff of smoke. 9231if test "X${COLLECT_NAMES+set}" != Xset; then 9232 COLLECT_NAMES= 9233 export COLLECT_NAMES 9234fi 9235EOF 9236 ;; 9237 9238 cygwin* | mingw* | pw32* | os2*) 9239 cat <<'EOF' >> "$cfgfile" 9240 # This is a source program that is used to create dlls on Windows 9241 # Don't remove nor modify the starting and closing comments 9242 _LT_AC_FILE_LTDLL_C 9243 # This is a source program that is used to create import libraries 9244 # on Windows for dlls which lack them. Don't remove nor modify the 9245 # starting and closing comments 9246 _LT_AC_FILE_IMPGEN_C 9247EOF 9248 ;; 9249 esac 9250 9251 # We use sed instead of cat because bash on DJGPP gets confused if 9252 # if finds mixed CR/LF and LF-only lines. Since sed operates in 9253 # text mode, it properly converts lines to CR/LF. This bash problem 9254 # is reportedly fixed, but why not run on old versions too? 9255 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 9256 9257 mv -f "$cfgfile" "$ofile" || \ 9258 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 9259 chmod +x "$ofile" 9260]) 9261else 9262 # If there is no Makefile yet, we rely on a make rule to execute 9263 # `config.status --recheck' to rerun these tests and create the 9264 # libtool script then. 9265 test -f Makefile && make "$ltmain" 9266fi 9267])# AC_LIBTOOL_CONFIG 9268 9269 9270# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 9271# ------------------------------------------- 9272AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 9273[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 9274 9275_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 9276 9277if test "$GCC" = yes; then 9278 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 9279 9280 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 9281 lt_cv_prog_compiler_rtti_exceptions, 9282 [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [], 9283 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 9284fi 9285])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 9286 9287 9288# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 9289# --------------------------------- 9290AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 9291[AC_REQUIRE([AC_CANONICAL_HOST]) 9292AC_REQUIRE([AC_PROG_NM]) 9293AC_REQUIRE([AC_OBJEXT]) 9294# Check for command to grab the raw symbol name followed by C symbol from nm. 9295AC_MSG_CHECKING([command to parse $NM output from $compiler object]) 9296AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 9297[ 9298# These are sane defaults that work on at least a few old systems. 9299# [They come from Ultrix. What could be older than Ultrix?!! ;)] 9300 9301# Character class describing NM global symbol codes. 9302symcode='[[BCDEGRST]]' 9303 9304# Regexp to match symbols that can be accessed directly from C. 9305sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 9306 9307# Transform the above into a raw symbol and a C symbol. 9308symxfrm='\1 \2\3 \3' 9309 9310# Transform an extracted symbol line into a proper C declaration 9311lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 9312 9313# Transform an extracted symbol line into symbol name and symbol address 9314lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 9315 9316# Define system-specific variables. 9317case $host_os in 9318aix*) 9319 symcode='[[BCDT]]' 9320 ;; 9321cygwin* | mingw* | pw32*) 9322 symcode='[[ABCDGISTW]]' 9323 ;; 9324hpux*) # Its linker distinguishes data from code symbols 9325 if test "$host_cpu" = ia64; then 9326 symcode='[[ABCDEGRST]]' 9327 fi 9328 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 9329 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 9330 ;; 9331irix* | nonstopux*) 9332 symcode='[[BCDEGRST]]' 9333 ;; 9334solaris* | sysv5*) 9335 symcode='[[BDT]]' 9336 ;; 9337sysv4) 9338 symcode='[[DFNSTU]]' 9339 ;; 9340esac 9341 9342# Handle CRLF in mingw tool chain 9343opt_cr= 9344case $host_os in 9345mingw*) 9346 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 9347 ;; 9348esac 9349 9350# If we're using GNU nm, then use its standard symbol codes. 9351if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then 9352 symcode='[[ABCDGISTW]]' 9353fi 9354 9355# Try without a prefix undercore, then with it. 9356for ac_symprfx in "" "_"; do 9357 9358 # Write the raw and C identifiers. 9359 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" 9360 9361 # Check to see that the pipe works correctly. 9362 pipe_works=no 9363 9364 rm -f conftest* 9365 cat > conftest.$ac_ext <<EOF 9366#ifdef __cplusplus 9367extern "C" { 9368#endif 9369char nm_test_var; 9370void nm_test_func(){} 9371#ifdef __cplusplus 9372} 9373#endif 9374int main(){nm_test_var='a';nm_test_func();return(0);} 9375EOF 9376 9377 if AC_TRY_EVAL(ac_compile); then 9378 # Now try to grab the symbols. 9379 nlist=conftest.nm 9380 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 9381 # Try sorting and uniquifying the output. 9382 if sort "$nlist" | uniq > "$nlist"T; then 9383 mv -f "$nlist"T "$nlist" 9384 else 9385 rm -f "$nlist"T 9386 fi 9387 9388 # Make sure that we snagged all the symbols we need. 9389 if egrep ' nm_test_var$' "$nlist" >/dev/null; then 9390 if egrep ' nm_test_func$' "$nlist" >/dev/null; then 9391 cat <<EOF > conftest.$ac_ext 9392#ifdef __cplusplus 9393extern "C" { 9394#endif 9395 9396EOF 9397 # Now generate the symbol file. 9398 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 9399 9400 cat <<EOF >> conftest.$ac_ext 9401#if defined (__STDC__) && __STDC__ 9402# define lt_ptr_t void * 9403#else 9404# define lt_ptr_t char * 9405# define const 9406#endif 9407 9408/* The mapping between symbol names and symbols. */ 9409const struct { 9410 const char *name; 9411 lt_ptr_t address; 9412} 9413lt_preloaded_symbols[[]] = 9414{ 9415EOF 9416 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 9417 cat <<\EOF >> conftest.$ac_ext 9418 {0, (lt_ptr_t) 0} 9419}; 9420 9421#ifdef __cplusplus 9422} 9423#endif 9424EOF 9425 # Now try linking the two files. 9426 mv conftest.$ac_objext conftstm.$ac_objext 9427 lt_save_LIBS="$LIBS" 9428 lt_save_CFLAGS="$CFLAGS" 9429 LIBS="conftstm.$ac_objext" 9430 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 9431 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 9432 pipe_works=yes 9433 fi 9434 LIBS="$lt_save_LIBS" 9435 CFLAGS="$lt_save_CFLAGS" 9436 else 9437 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 9438 fi 9439 else 9440 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 9441 fi 9442 else 9443 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 9444 fi 9445 else 9446 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 9447 cat conftest.$ac_ext >&5 9448 fi 9449 rm -f conftest* conftst* 9450 9451 # Do not use the global_symbol_pipe unless it works. 9452 if test "$pipe_works" = yes; then 9453 break 9454 else 9455 lt_cv_sys_global_symbol_pipe= 9456 fi 9457done 9458]) 9459if test -z "$lt_cv_sys_global_symbol_pipe"; then 9460 lt_cv_sys_global_symbol_to_cdecl= 9461fi 9462if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 9463 AC_MSG_RESULT(failed) 9464else 9465 AC_MSG_RESULT(ok) 9466fi 9467]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 9468 9469 9470# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 9471# --------------------------------------- 9472AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 9473[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 9474_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 9475_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 9476 9477AC_MSG_CHECKING([for $compiler option to produce PIC]) 9478 ifelse([$1],[CXX],[ 9479 # C++ specific cases for pic, static, wl, etc. 9480 if test "$GXX" = yes; then 9481 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 9482 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 9483 9484 case $host_os in 9485 aix*) 9486 # All AIX code is PIC. 9487 if test "$host_cpu" = ia64; then 9488 # AIX 5 now supports IA64 processor 9489 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 9490 fi 9491 ;; 9492 amigaos*) 9493 # FIXME: we need at least 68020 code to build shared libraries, but 9494 # adding the `-m68020' flag to GCC prevents building anything better, 9495 # like `-m68040'. 9496 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 9497 ;; 9498 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 9499 # PIC is the default for these OSes. 9500 ;; 9501 cygwin* | mingw* | os2*) 9502 # This hack is so that the source file can tell whether it is being 9503 # built for inclusion in a dll (and should export symbols for example). 9504 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 9505 ;; 9506 darwin* | rhapsody*) 9507 # PIC is the default on this platform 9508 # Common symbols not allowed in MH_DYLIB files 9509 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 9510 ;; 9511 *djgpp*) 9512 # DJGPP does not support shared libraries at all 9513 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 9514 ;; 9515 sysv4*MP*) 9516 if test -d /usr/nec; then 9517 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 9518 fi 9519 ;; 9520 hpux*) 9521 # PIC is the default for IA64 HP-UX, but not for PA HP-UX. 9522 if test "$host_cpu" != ia64; then 9523 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 9524 fi 9525 ;; 9526 *) 9527 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 9528 ;; 9529 esac 9530 else 9531 case $host_os in 9532 aix4* | aix5*) 9533 # All AIX code is PIC. 9534 if test "$host_cpu" = ia64; then 9535 # AIX 5 now supports IA64 processor 9536 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 9537 else 9538 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 9539 fi 9540 ;; 9541 chorus*) 9542 case $cc_basename in 9543 cxch68) 9544 # Green Hills C++ Compiler 9545 # _LT_AC_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" 9546 ;; 9547 esac 9548 ;; 9549 dgux*) 9550 case $cc_basename in 9551 ec++) 9552 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 9553 ;; 9554 ghcx) 9555 # Green Hills C++ Compiler 9556 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 9557 ;; 9558 *) 9559 ;; 9560 esac 9561 ;; 9562 freebsd*) 9563 # FreeBSD uses GNU C++ 9564 ;; 9565 hpux9* | hpux10* | hpux11*) 9566 case $cc_basename in 9567 CC) 9568 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 9569 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" 9570 if test "$host_cpu" != ia64; then 9571 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 9572 fi 9573 ;; 9574 aCC) 9575 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 9576 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" 9577 if test "$host_cpu" != ia64; then 9578 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 9579 fi 9580 ;; 9581 *) 9582 ;; 9583 esac 9584 ;; 9585 irix5* | irix6* | nonstopux*) 9586 case $cc_basename in 9587 CC) 9588 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 9589 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 9590 # CC pic flag -KPIC is the default. 9591 ;; 9592 *) 9593 ;; 9594 esac 9595 ;; 9596 linux*) 9597 case $cc_basename in 9598 KCC) 9599 # KAI C++ Compiler 9600 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 9601 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 9602 ;; 9603 cxx) 9604 # Compaq C++ 9605 # Make sure the PIC flag is empty. It appears that all Alpha 9606 # Linux and Compaq Tru64 Unix objects are PIC. 9607 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 9608 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 9609 ;; 9610 *) 9611 ;; 9612 esac 9613 ;; 9614 lynxos*) 9615 ;; 9616 m88k*) 9617 ;; 9618 mvs*) 9619 case $cc_basename in 9620 cxx) 9621 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 9622 ;; 9623 *) 9624 ;; 9625 esac 9626 ;; 9627 netbsd*) 9628 ;; 9629 osf3* | osf4* | osf5*) 9630 case $cc_basename in 9631 KCC) 9632 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 9633 ;; 9634 RCC) 9635 # Rational C++ 2.4.1 9636 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 9637 ;; 9638 cxx) 9639 # Digital/Compaq C++ 9640 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 9641 # Make sure the PIC flag is empty. It appears that all Alpha 9642 # Linux and Compaq Tru64 Unix objects are PIC. 9643 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 9644 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 9645 ;; 9646 *) 9647 ;; 9648 esac 9649 ;; 9650 psos*) 9651 ;; 9652 sco*) 9653 case $cc_basename in 9654 CC) 9655 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 9656 ;; 9657 *) 9658 ;; 9659 esac 9660 ;; 9661 solaris*) 9662 case $cc_basename in 9663 CC) 9664 # Sun C++ 4.2, 5.x and Centerline C++ 9665 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 9666 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 9667 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 9668 ;; 9669 gcx) 9670 # Green Hills C++ Compiler 9671 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 9672 ;; 9673 *) 9674 ;; 9675 esac 9676 ;; 9677 sunos4*) 9678 case $cc_basename in 9679 CC) 9680 # Sun C++ 4.x 9681 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 9682 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 9683 ;; 9684 lcc) 9685 # Lucid 9686 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 9687 ;; 9688 *) 9689 ;; 9690 esac 9691 ;; 9692 tandem*) 9693 case $cc_basename in 9694 NCC) 9695 # NonStop-UX NCC 3.20 9696 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 9697 ;; 9698 *) 9699 ;; 9700 esac 9701 ;; 9702 unixware*) 9703 ;; 9704 vxworks*) 9705 ;; 9706 *) 9707 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 9708 ;; 9709 esac 9710 fi 9711], 9712[ 9713 if test "$GCC" = yes; then 9714 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 9715 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 9716 9717 case $host_os in 9718 aix*) 9719 # All AIX code is PIC. 9720 if test "$host_cpu" = ia64; then 9721 # AIX 5 now supports IA64 processor 9722 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 9723 fi 9724 ;; 9725 9726 amigaos*) 9727 # FIXME: we need at least 68020 code to build shared libraries, but 9728 # adding the `-m68020' flag to GCC prevents building anything better, 9729 # like `-m68040'. 9730 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 9731 ;; 9732 9733 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 9734 # PIC is the default for these OSes. 9735 ;; 9736 9737 cygwin* | mingw* | pw32* | os2*) 9738 # This hack is so that the source file can tell whether it is being 9739 # built for inclusion in a dll (and should export symbols for example). 9740 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 9741 ;; 9742 9743 darwin* | rhapsody*) 9744 # PIC is the default on this platform 9745 # Common symbols not allowed in MH_DYLIB files 9746 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 9747 ;; 9748 9749 msdosdjgpp*) 9750 # Just because we use GCC doesn't mean we suddenly get shared libraries 9751 # on systems that don't support them. 9752 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 9753 enable_shared=no 9754 ;; 9755 9756 sysv4*MP*) 9757 if test -d /usr/nec; then 9758 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 9759 fi 9760 ;; 9761 9762 hpux*) 9763 # PIC is the default for IA64 HP-UX, but not for PA HP-UX. 9764 if test "$host_cpu" != ia64; then 9765 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 9766 fi 9767 ;; 9768 9769 *) 9770 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 9771 ;; 9772 esac 9773 else 9774 # PORTME Check for flag to pass linker flags through the system compiler. 9775 case $host_os in 9776 aix*) 9777 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 9778 if test "$host_cpu" = ia64; then 9779 # AIX 5 now supports IA64 processor 9780 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 9781 else 9782 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 9783 fi 9784 ;; 9785 9786 cygwin* | mingw* | pw32* | os2*) 9787 # This hack is so that the source file can tell whether it is being 9788 # built for inclusion in a dll (and should export symbols for example). 9789 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' 9790 ;; 9791 9792 hpux9* | hpux10* | hpux11*) 9793 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 9794 if test "$host_cpu" != ia64; then 9795 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 9796 fi 9797 # Is there a better lt_prog_compiler_static that works with the bundled CC? 9798 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 9799 ;; 9800 9801 irix5* | irix6* | nonstopux*) 9802 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 9803 # PIC (with -KPIC) is the default. 9804 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 9805 ;; 9806 9807 newsos6) 9808 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 9809 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 9810 ;; 9811 9812 osf3* | osf4* | osf5*) 9813 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 9814 # All OSF/1 code is PIC. 9815 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 9816 ;; 9817 9818 sco3.2v5*) 9819 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' 9820 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' 9821 ;; 9822 9823 solaris*) 9824 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 9825 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 9826 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 9827 ;; 9828 9829 sunos4*) 9830 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 9831 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 9832 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 9833 ;; 9834 9835 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 9836 if test "x$host_vendor" = xsni; then 9837 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD' 9838 else 9839 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 9840 fi 9841 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 9842 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 9843 ;; 9844 9845 sysv4*MP*) 9846 if test -d /usr/nec ;then 9847 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 9848 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 9849 fi 9850 ;; 9851 9852 uts4*) 9853 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 9854 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 9855 ;; 9856 9857 *) 9858 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 9859 ;; 9860 esac 9861 fi 9862]) 9863AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 9864 9865# 9866# Check to make sure the PIC flag actually works. 9867# 9868if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 9869 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 9870 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), 9871 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [], 9872 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 9873 "" | " "*) ;; 9874 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 9875 esac], 9876 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 9877 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 9878fi 9879case "$host_os" in 9880 # For platforms which do not support PIC, -DPIC is meaningless: 9881 *djgpp*) 9882 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 9883 ;; 9884 *) 9885 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC" 9886 ;; 9887esac 9888]) 9889 9890 9891# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 9892# ------------------------------------ 9893# See if the linker supports building shared libraries. 9894AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 9895[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9896ifelse([$1],[CXX],[ 9897 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' 9898 case $host_os in 9899 aix4* | aix5*) 9900 # If we're using GNU nm, then we don't want the "-C" option. 9901 # -C means demangle to AIX nm, but means don't demangle with GNU nm 9902 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then 9903 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 9904 else 9905 _LT_AC_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' 9906 fi 9907 ;; 9908 cygwin* | mingw* | pw32*) 9909 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 9910 ;; 9911 *) 9912 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' 9913 ;; 9914 esac 9915],[ 9916 runpath_var= 9917 _LT_AC_TAGVAR(allow_undefined_flag, $1)= 9918 9919 _LT_AC_TAGVAR(archive_cmds, $1)= 9920 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)= 9921 _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 9922 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 9923 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 9924 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 9925 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 9926 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 9927 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 9928 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 9929 _LT_AC_TAGVAR(hardcode_direct, $1)=no 9930 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 9931 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9932 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 9933 _LT_AC_TAGVAR(always_export_symbols, $1)=no 9934 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' 9935 # include_expsyms should be a list of space-separated symbols to be *always* 9936 # included in the symbol list 9937 _LT_AC_TAGVAR(include_expsyms, $1)= 9938 # exclude_expsyms can be an egrep regular expression of symbols to exclude 9939 # it will be wrapped by ` (' and `)$', so one must not match beginning or 9940 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 9941 # as well as any symbol that contains `d'. 9942 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" 9943 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 9944 # platforms (ab)use it in PIC code, but their linkers get confused if 9945 # the symbol is explicitly referenced. Since portable code cannot 9946 # rely on this symbol name, it's probably fine to never include it in 9947 # preloaded symbol tables. 9948 extract_expsyms_cmds= 9949 9950 case $host_os in 9951 cygwin* | mingw* | pw32*) 9952 # FIXME: the MSVC++ port hasn't been tested in a loooong time 9953 # When not using gcc, we currently assume that we are using 9954 # Microsoft Visual C++. 9955 if test "$GCC" != yes; then 9956 with_gnu_ld=no 9957 fi 9958 ;; 9959 openbsd*) 9960 with_gnu_ld=no 9961 ;; 9962 esac 9963 9964 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 9965 if test "$with_gnu_ld" = yes; then 9966 # If archive_cmds runs LD, not CC, wlarc should be empty 9967 wlarc='${wl}' 9968 9969 # See if GNU ld supports shared libraries. 9970 case $host_os in 9971 aix3* | aix4* | aix5*) 9972 # On AIX/PPC, the GNU linker is very broken 9973 if test "$host_cpu" != ia64; then 9974 _LT_AC_TAGVAR(ld_shlibs, $1)=no 9975 cat <<EOF 1>&2 9976 9977*** Warning: the GNU linker, at least up to release 2.9.1, is reported 9978*** to be unable to reliably create shared libraries on AIX. 9979*** Therefore, libtool is disabling shared libraries support. If you 9980*** really care for shared libraries, you may want to modify your PATH 9981*** so that a non-GNU linker is found, and then restart. 9982 9983EOF 9984 fi 9985 ;; 9986 9987 amigaos*) 9988 _LT_AC_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)' 9989 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9990 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 9991 9992 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 9993 # that the semantics of dynamic libraries on AmigaOS, at least up 9994 # to version 4, is to share data among multiple programs linked 9995 # with the same dynamic library. Since this doesn't match the 9996 # behavior of shared libraries on other platforms, we can't use 9997 # them. 9998 _LT_AC_TAGVAR(ld_shlibs, $1)=no 9999 ;; 10000 10001 beos*) 10002 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then 10003 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 10004 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 10005 # support --undefined. This deserves some investigation. FIXME 10006 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 10007 else 10008 _LT_AC_TAGVAR(ld_shlibs, $1)=no 10009 fi 10010 ;; 10011 10012 cygwin* | mingw* | pw32*) 10013 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is 10014 # no search path for DLLs. 10015 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10016 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 10017 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 10018 10019 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ 10020 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ 10021 test -f $output_objdir/impgen.exe || (cd $output_objdir && \ 10022 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ 10023 else $CC -o impgen impgen.c ; fi)~ 10024 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' 10025 10026 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' 10027 10028 # cygwin and mingw dlls have different entry points and sets of symbols 10029 # to exclude. 10030 # FIXME: what about values for MSVC? 10031 dll_entry=__cygwin_dll_entry@12 10032 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ 10033 case $host_os in 10034 mingw*) 10035 # mingw values 10036 dll_entry=_DllMainCRTStartup@12 10037 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ 10038 ;; 10039 esac 10040 10041 # mingw and cygwin differ, and it's simplest to just exclude the union 10042 # of the two symbol sets. 10043 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 10044 10045 # recent cygwin and mingw systems supply a stub DllMain which the user 10046 # can override, but on older systems we have to supply one (in ltdll.c) 10047 if test "x$lt_cv_need_dllmain" = "xyes"; then 10048 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " 10049 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ 10050 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' 10051 else 10052 ltdll_obj= 10053 ltdll_cmds= 10054 fi 10055 10056 # Extract the symbol export list from an `--export-all' def file, 10057 # then regenerate the def file from the symbol export list, so that 10058 # the compiled dll only exports the symbol export list. 10059 # Be careful not to strip the DATA tag left by newer dlltools. 10060 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"' 10061 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ 10062 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' 10063 10064 # If the export-symbols file already is a .def file (1st line 10065 # is EXPORTS), use it as is. 10066 # If DATA tags from a recent dlltool are present, honour them! 10067 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then 10068 cp $export_symbols $output_objdir/$soname-def; 10069 else 10070 echo EXPORTS > $output_objdir/$soname-def; 10071 _lt_hint=1; 10072 cat $export_symbols | while read symbol; do 10073 set dummy \$symbol; 10074 case \[$]# in 10075 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; 10076 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; 10077 esac; 10078 _lt_hint=`expr 1 + \$_lt_hint`; 10079 done; 10080 fi~ 10081 '"$ltdll_cmds"' 10082 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ 10083 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ 10084 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ 10085 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ 10086 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' 10087 ;; 10088 10089 netbsd*) 10090 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 10091 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 10092 wlarc= 10093 else 10094 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 10095 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 10096 fi 10097 ;; 10098 10099 solaris* | sysv5*) 10100 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then 10101 _LT_AC_TAGVAR(ld_shlibs, $1)=no 10102 cat <<EOF 1>&2 10103 10104*** Warning: The releases 2.8.* of the GNU linker cannot reliably 10105*** create shared libraries on Solaris systems. Therefore, libtool 10106*** is disabling shared libraries support. We urge you to upgrade GNU 10107*** binutils to release 2.9.1 or newer. Another option is to modify 10108*** your PATH or compiler configuration so that the native linker is 10109*** used, and then restart. 10110 10111EOF 10112 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then 10113 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 10114 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 10115 else 10116 _LT_AC_TAGVAR(ld_shlibs, $1)=no 10117 fi 10118 ;; 10119 10120 sunos4*) 10121 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 10122 wlarc= 10123 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 10124 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10125 ;; 10126 10127 *) 10128 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then 10129 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 10130 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 10131 else 10132 _LT_AC_TAGVAR(ld_shlibs, $1)=no 10133 fi 10134 ;; 10135 esac 10136 10137 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then 10138 runpath_var=LD_RUN_PATH 10139 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 10140 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 10141 case $host_os in 10142 cygwin* | mingw* | pw32*) 10143 # dlltool doesn't understand --whole-archive et. al. 10144 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 10145 ;; 10146 *) 10147 # ancient GNU ld didn't support --whole-archive et. al. 10148 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then 10149 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 10150 else 10151 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 10152 fi 10153 ;; 10154 esac 10155 fi 10156 else 10157 # PORTME fill in a description of your system's linker (not GNU ld) 10158 case $host_os in 10159 aix3*) 10160 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 10161 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 10162 _LT_AC_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' 10163 # Note: this linker hardcodes the directories in LIBPATH if there 10164 # are no directories specified by -L. 10165 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 10166 if test "$GCC" = yes && test -z "$link_static_flag"; then 10167 # Neither direct hardcoding nor static linking is supported with a 10168 # broken collect2. 10169 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 10170 fi 10171 ;; 10172 10173 aix4* | aix5*) 10174 if test "$host_cpu" = ia64; then 10175 # On IA64, the linker does run time linking by default, so we don't 10176 # have to do anything special. 10177 aix_use_runtimelinking=no 10178 exp_sym_flag='-Bexport' 10179 no_entry_flag="" 10180 else 10181 # If we're using GNU nm, then we don't want the "-C" option. 10182 # -C means demangle to AIX nm, but means don't demangle with GNU nm 10183 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then 10184 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 10185 else 10186 _LT_AC_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' 10187 fi 10188 10189 # KDE requires run time linking. Make it the default. 10190 aix_use_runtimelinking=yes 10191 exp_sym_flag='-bexport' 10192 no_entry_flag='-bnoentry' 10193 fi 10194 10195 # When large executables or shared objects are built, AIX ld can 10196 # have problems creating the table of contents. If linking a library 10197 # or program results in "error TOC overflow" add -mminimal-toc to 10198 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 10199 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 10200 10201 _LT_AC_TAGVAR(archive_cmds, $1)='' 10202 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 10203 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 10204 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 10205 10206 if test "$GCC" = yes; then 10207 case $host_os in aix4.[012]|aix4.[012].*) 10208 # We only want to do this on AIX 4.2 and lower, the check 10209 # below for broken collect2 doesn't work under 4.3+ 10210 collect2name=`${CC} -print-prog-name=collect2` 10211 if test -f "$collect2name" && \ 10212 strings "$collect2name" | grep resolve_lib_name >/dev/null 10213 then 10214 # We have reworked collect2 10215 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 10216 else 10217 # We have old collect2 10218 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 10219 # It fails to find uninstalled libraries when the uninstalled 10220 # path is not listed in the libpath. Setting hardcode_minus_L 10221 # to unsupported forces relinking 10222 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 10223 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10224 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 10225 fi 10226 esac 10227 shared_flag='-shared' 10228 else 10229 # not using gcc 10230 if test "$host_cpu" = ia64; then 10231 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 10232 # chokes on -Wl,-G. The following line is correct: 10233 shared_flag='-G' 10234 else 10235 if test "$aix_use_runtimelinking" = yes; then 10236 shared_flag='-qmkshrobj ${wl}-G' 10237 else 10238 shared_flag='-qmkshrobj' 10239 fi 10240 fi 10241 fi 10242 10243 # Let the compiler handle the export list. 10244 _LT_AC_TAGVAR(always_export_symbols, $1)=no 10245 if test "$aix_use_runtimelinking" = yes; then 10246 # Warning - without using the other runtime loading flags (-brtl), 10247 # -berok will link without error, but may produce a broken library. 10248 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 10249 # Determine the default libpath from the value encoded in an empty executable. 10250 _LT_AC_SYS_LIBPATH_AIX 10251 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 10252 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag" 10253 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 10254 else 10255 if test "$host_cpu" = ia64; then 10256 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 10257 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 10258 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" 10259 else 10260 # Determine the default libpath from the value encoded in an empty executable. 10261 _LT_AC_SYS_LIBPATH_AIX 10262 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 10263 # Warning - without using the other run time loading flags, 10264 # -berok will link without error, but may produce a broken library. 10265 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 10266 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 10267 # -bexpall does not export symbols beginning with underscore (_) 10268 _LT_AC_TAGVAR(always_export_symbols, $1)=yes 10269 # Exported symbols can be pulled into shared objects from archives 10270 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' 10271 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 10272 # This is similar to how AIX traditionally builds it's shared libraries. 10273 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 10274 fi 10275 fi 10276 ;; 10277 10278 amigaos*) 10279 _LT_AC_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)' 10280 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10281 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 10282 # see comment about different semantics on the GNU ld section 10283 _LT_AC_TAGVAR(ld_shlibs, $1)=no 10284 ;; 10285 10286 bsdi4*) 10287 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 10288 ;; 10289 10290 cygwin* | mingw* | pw32*) 10291 # When not using gcc, we currently assume that we are using 10292 # Microsoft Visual C++. 10293 # hardcode_libdir_flag_spec is actually meaningless, as there is 10294 # no search path for DLLs. 10295 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 10296 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 10297 # Tell ltmain to make .lib files, not .a files. 10298 libext=lib 10299 # FIXME: Setting linknames here is a bad hack. 10300 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 10301 # The linker will automatically build a .lib file if we build a DLL. 10302 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 10303 # FIXME: Should let the user specify the lib program. 10304 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' 10305 fix_srcfile_path='`cygpath -w "$srcfile"`' 10306 ;; 10307 10308 darwin* | rhapsody*) 10309 case "$host_os" in 10310 rhapsody* | darwin1.[[012]]) 10311 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' 10312 ;; 10313 *) # Darwin 1.3 on 10314 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' 10315 ;; 10316 esac 10317 10318 # FIXME: Relying on posixy $() will cause problems for 10319 # cross-compilation, but unfortunately the echo tests do not 10320 # yet detect zsh echo's removal of \ escapes. Also zsh mangles 10321 # `"' quotes if we put them in here... so don't! 10322 _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' 10323 # We need to add '_' to the symbols in $export_symbols first 10324 #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols' 10325 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 10326 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10327 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' 10328 ;; 10329 10330 dgux*) 10331 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 10332 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10333 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10334 ;; 10335 10336 freebsd1*) 10337 _LT_AC_TAGVAR(ld_shlibs, $1)=no 10338 ;; 10339 10340 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 10341 # support. Future versions do this automatically, but an explicit c++rt0.o 10342 # does not break anything, and helps significantly (at the cost of a little 10343 # extra space). 10344 freebsd2.2*) 10345 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 10346 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10347 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 10348 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10349 ;; 10350 10351 # Unfortunately, older versions of FreeBSD 2 do not have this feature. 10352 freebsd2*) 10353 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 10354 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 10355 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 10356 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10357 ;; 10358 10359 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 10360 freebsd*) 10361 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 10362 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10363 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 10364 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10365 ;; 10366 10367 hpux9* | hpux10* | hpux11*) 10368 if test "$GCC" = yes; then 10369 case $host_os in 10370 hpux9*) 10371 _LT_AC_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' 10372 ;; 10373 *) 10374 if test "$host_cpu" = ia64; then 10375 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 10376 else 10377 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 10378 fi 10379 ;; 10380 esac 10381 else 10382 case $host_os in 10383 hpux9*) 10384 _LT_AC_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' 10385 ;; 10386 *) 10387 if test "$host_cpu" = ia64; then 10388 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' 10389 else 10390 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 10391 fi 10392 ;; 10393 esac 10394 fi 10395 if test "$host_cpu" = ia64; then 10396 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10397 _LT_AC_TAGVAR(hardcode_direct, $1)=no 10398 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10399 else 10400 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 10401 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 10402 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 10403 fi 10404 # hardcode_minus_L: Not really in the search PATH, 10405 # but as the default location of the library. 10406 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 10407 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 10408 ;; 10409 10410 irix5* | irix6* | nonstopux*) 10411 if test "$GCC" = yes; then 10412 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 10413 else 10414 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 10415 fi 10416 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 10417 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 10418 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 10419 ;; 10420 10421 netbsd*) 10422 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 10423 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 10424 else 10425 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 10426 fi 10427 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10428 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 10429 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10430 ;; 10431 10432 newsos6) 10433 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 10434 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 10435 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 10436 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 10437 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10438 ;; 10439 10440 openbsd*) 10441 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 10442 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10443 10444 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 10445 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' 10446 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 10447 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 10448 else 10449 case $host_os in 10450 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 10451 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 10452 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10453 ;; 10454 *) 10455 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' 10456 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 10457 ;; 10458 esac 10459 fi 10460 ;; 10461 10462 os2*) 10463 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10464 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 10465 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 10466 _LT_AC_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' 10467 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 10468 ;; 10469 10470 osf3*) 10471 if test "$GCC" = yes; then 10472 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 10473 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 10474 else 10475 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10476 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 10477 fi 10478 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 10479 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 10480 ;; 10481 10482 osf4* | osf5*) # as osf3* with the addition of -msym flag 10483 if test "$GCC" = yes; then 10484 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 10485 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 10486 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 10487 else 10488 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10489 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 10490 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ 10491 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' 10492 10493 # Both c and cxx compiler support -rpath directly 10494 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10495 fi 10496 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 10497 ;; 10498 10499 sco3.2v5*) 10500 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 10501 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10502 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 10503 runpath_var=LD_RUN_PATH 10504 hardcode_runpath_var=yes 10505 ;; 10506 10507 solaris*) 10508 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 10509 if test "$GCC" = yes; then 10510 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 10511 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 10512 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 10513 else 10514 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 10515 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 10516 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 10517 fi 10518 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10519 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10520 case $host_os in 10521 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10522 *) # Supported since Solaris 2.6 (maybe 2.5.1?) 10523 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; 10524 esac 10525 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 10526 ;; 10527 10528 sunos4*) 10529 if test "x$host_vendor" = xsequent; then 10530 # Use $CC to link under sequent, because it throws in some extra .o 10531 # files that make .init and .fini sections work. 10532 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 10533 else 10534 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 10535 fi 10536 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10537 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 10538 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 10539 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10540 ;; 10541 10542 sysv4) 10543 if test "x$host_vendor" = xsni; then 10544 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' 10545 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 10546 else 10547 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 10548 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 10549 fi 10550 runpath_var='LD_RUN_PATH' 10551 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10552 ;; 10553 10554 sysv4.3*) 10555 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 10556 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10557 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 10558 ;; 10559 10560 sysv4*MP*) 10561 if test -d /usr/nec; then 10562 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 10563 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10564 runpath_var=LD_RUN_PATH 10565 hardcode_runpath_var=yes 10566 _LT_AC_TAGVAR(ld_shlibs, $1)=yes 10567 fi 10568 ;; 10569 10570 sysv4.2uw2*) 10571 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 10572 _LT_AC_TAGVAR(hardcode_direct, $1)=yes 10573 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 10574 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10575 hardcode_runpath_var=yes 10576 runpath_var=LD_RUN_PATH 10577 ;; 10578 10579 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) 10580 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' 10581 if test "$GCC" = yes; then 10582 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 10583 else 10584 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 10585 fi 10586 runpath_var='LD_RUN_PATH' 10587 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10588 ;; 10589 10590 sysv5*) 10591 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 10592 # $CC -shared without GNU ld will not create a library from C++ 10593 # object files and a static libstdc++, better avoid it by now 10594 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 10595 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 10596 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 10597 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 10598 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10599 runpath_var='LD_RUN_PATH' 10600 ;; 10601 10602 uts4*) 10603 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 10604 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10605 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 10606 ;; 10607 10608 *) 10609 _LT_AC_TAGVAR(ld_shlibs, $1)=no 10610 ;; 10611 esac 10612 fi 10613]) 10614AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 10615test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 10616 10617variables_saved_for_relink="PATH $shlibpath_var $runpath_var" 10618if test "$GCC" = yes; then 10619 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 10620fi 10621 10622# 10623# Do we need to explicitly link libc? 10624# 10625_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 10626if test "$enable_shared" = yes && test "$GCC" = yes; then 10627 case $_LT_AC_TAGVAR(archive_cmds, $1) in 10628 *'~'*) 10629 # FIXME: we may have to deal with multi-command sequences. 10630 ;; 10631 '$CC '*) 10632 # Test whether the compiler implicitly links with -lc since on some 10633 # systems, -lgcc has to come before -lc. If gcc already passes -lc 10634 # to ld, don't add -lc before -lgcc. 10635 AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 10636 $rm conftest* 10637 echo 'static int dummy;' > conftest.$ac_ext 10638 10639 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 10640 soname=conftest 10641 lib=conftest 10642 libobjs=conftest.$ac_objext 10643 deplibs= 10644 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 10645 compiler_flags=-v 10646 linker_flags=-v 10647 verstring= 10648 output_objdir=. 10649 libname=conftest 10650 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 10651 _LT_AC_TAGVAR(allow_undefined_flag, $1)= 10652 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 10653 then 10654 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 10655 else 10656 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 10657 fi 10658 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 10659 else 10660 cat conftest.err 1>&5 10661 fi 10662 $rm conftest* 10663 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 10664 ;; 10665 esac 10666fi 10667])# AC_LIBTOOL_PROG_LD_SHLIBS 10668 10669 10670# _LT_AC_FILE_LTDLL_C 10671# ------------------- 10672# Be careful that the start marker always follows a newline. 10673AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 10674# /* ltdll.c starts here */ 10675# #define WIN32_LEAN_AND_MEAN 10676# #include <windows.h> 10677# #undef WIN32_LEAN_AND_MEAN 10678# #include <stdio.h> 10679# 10680# #ifndef __CYGWIN__ 10681# # ifdef __CYGWIN32__ 10682# # define __CYGWIN__ __CYGWIN32__ 10683# # endif 10684# #endif 10685# 10686# #ifdef __cplusplus 10687# extern "C" { 10688# #endif 10689# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 10690# #ifdef __cplusplus 10691# } 10692# #endif 10693# 10694# #ifdef __CYGWIN__ 10695# #include <cygwin/cygwin_dll.h> 10696# DECLARE_CYGWIN_DLL( DllMain ); 10697# #endif 10698# HINSTANCE __hDllInstance_base; 10699# 10700# BOOL APIENTRY 10701# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 10702# { 10703# __hDllInstance_base = hInst; 10704# return TRUE; 10705# } 10706# /* ltdll.c ends here */ 10707])# _LT_AC_FILE_LTDLL_C 10708 10709 10710# _LT_AC_FILE_IMPGEN_C 10711# -------------------- 10712# Be careful that the start marker always follows a newline. 10713AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [ 10714# /* impgen.c starts here */ 10715# /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 10716# 10717# This file is part of GNU libtool. 10718# 10719# This program is free software; you can redistribute it and/or modify 10720# it under the terms of the GNU General Public License as published by 10721# the Free Software Foundation; either version 2 of the License, or 10722# (at your option) any later version. 10723# 10724# This program is distributed in the hope that it will be useful, 10725# but WITHOUT ANY WARRANTY; without even the implied warranty of 10726# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10727# GNU General Public License for more details. 10728# 10729# You should have received a copy of the GNU General Public License 10730# along with this program; if not, write to the Free Software 10731# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 10732# */ 10733# 10734# #include <stdio.h> /* for printf() */ 10735# #include <unistd.h> /* for open(), lseek(), read() */ 10736# #include <fcntl.h> /* for O_RDONLY, O_BINARY */ 10737# #include <string.h> /* for strdup() */ 10738# 10739# /* O_BINARY isn't required (or even defined sometimes) under Unix */ 10740# #ifndef O_BINARY 10741# #define O_BINARY 0 10742# #endif 10743# 10744# static unsigned int 10745# pe_get16 (fd, offset) 10746# int fd; 10747# int offset; 10748# { 10749# unsigned char b[2]; 10750# lseek (fd, offset, SEEK_SET); 10751# read (fd, b, 2); 10752# return b[0] + (b[1]<<8); 10753# } 10754# 10755# static unsigned int 10756# pe_get32 (fd, offset) 10757# int fd; 10758# int offset; 10759# { 10760# unsigned char b[4]; 10761# lseek (fd, offset, SEEK_SET); 10762# read (fd, b, 4); 10763# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); 10764# } 10765# 10766# static unsigned int 10767# pe_as32 (ptr) 10768# void *ptr; 10769# { 10770# unsigned char *b = ptr; 10771# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); 10772# } 10773# 10774# int 10775# main (argc, argv) 10776# int argc; 10777# char *argv[]; 10778# { 10779# int dll; 10780# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; 10781# unsigned long export_rva, export_size, nsections, secptr, expptr; 10782# unsigned long name_rvas, nexp; 10783# unsigned char *expdata, *erva; 10784# char *filename, *dll_name; 10785# 10786# filename = argv[1]; 10787# 10788# dll = open(filename, O_RDONLY|O_BINARY); 10789# if (dll < 1) 10790# return 1; 10791# 10792# dll_name = filename; 10793# 10794# for (i=0; filename[i]; i++) 10795# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') 10796# dll_name = filename + i +1; 10797# 10798# pe_header_offset = pe_get32 (dll, 0x3c); 10799# opthdr_ofs = pe_header_offset + 4 + 20; 10800# num_entries = pe_get32 (dll, opthdr_ofs + 92); 10801# 10802# if (num_entries < 1) /* no exports */ 10803# return 1; 10804# 10805# export_rva = pe_get32 (dll, opthdr_ofs + 96); 10806# export_size = pe_get32 (dll, opthdr_ofs + 100); 10807# nsections = pe_get16 (dll, pe_header_offset + 4 +2); 10808# secptr = (pe_header_offset + 4 + 20 + 10809# pe_get16 (dll, pe_header_offset + 4 + 16)); 10810# 10811# expptr = 0; 10812# for (i = 0; i < nsections; i++) 10813# { 10814# char sname[8]; 10815# unsigned long secptr1 = secptr + 40 * i; 10816# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); 10817# unsigned long vsize = pe_get32 (dll, secptr1 + 16); 10818# unsigned long fptr = pe_get32 (dll, secptr1 + 20); 10819# lseek(dll, secptr1, SEEK_SET); 10820# read(dll, sname, 8); 10821# if (vaddr <= export_rva && vaddr+vsize > export_rva) 10822# { 10823# expptr = fptr + (export_rva - vaddr); 10824# if (export_rva + export_size > vaddr + vsize) 10825# export_size = vsize - (export_rva - vaddr); 10826# break; 10827# } 10828# } 10829# 10830# expdata = (unsigned char*)malloc(export_size); 10831# lseek (dll, expptr, SEEK_SET); 10832# read (dll, expdata, export_size); 10833# erva = expdata - export_rva; 10834# 10835# nexp = pe_as32 (expdata+24); 10836# name_rvas = pe_as32 (expdata+32); 10837# 10838# printf ("EXPORTS\n"); 10839# for (i = 0; i<nexp; i++) 10840# { 10841# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); 10842# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); 10843# } 10844# 10845# return 0; 10846# } 10847# /* impgen.c ends here */ 10848])# _LT_AC_FILE_IMPGEN_C 10849 10850# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 10851# --------------------------------- 10852AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 10853 10854 10855# old names 10856AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 10857AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 10858AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 10859AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 10860AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 10861AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 10862AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 10863 10864# This is just to silence aclocal about the macro not being used 10865ifelse([AC_DISABLE_FAST_INSTALL]) 10866 10867AC_DEFUN([LT_AC_PROG_GCJ], 10868[AC_CHECK_TOOL(GCJ, gcj, no) 10869 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 10870 AC_SUBST(GCJFLAGS) 10871]) 10872 10873AC_DEFUN([LT_AC_PROG_RC], 10874[AC_CHECK_TOOL(RC, windres, no) 10875]) 10876 10877############################################################ 10878# NOTE: This macro has been submitted for inclusion into # 10879# GNU Autoconf as AC_PROG_SED. When it is available in # 10880# a released version of Autoconf we should remove this # 10881# macro and use it instead. # 10882############################################################ 10883# LT_AC_PROG_SED 10884# -------------- 10885# Check for a fully-functional sed program, that truncates 10886# as few characters as possible. Prefer GNU sed if found. 10887AC_DEFUN([LT_AC_PROG_SED], 10888[AC_MSG_CHECKING([for a sed that does not truncate output]) 10889AC_CACHE_VAL(lt_cv_path_SED, 10890[# Loop through the user's path and test for sed and gsed. 10891# Then use that list of sed's as ones to test for truncation. 10892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10893for as_dir in $PATH 10894do 10895 IFS=$as_save_IFS 10896 test -z "$as_dir" && as_dir=. 10897 for ac_prog in sed gsed; do 10898 for ac_exec_ext in '' $ac_executable_extensions; do 10899 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then 10900 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" 10901 fi 10902 done 10903 done 10904done 10905 10906 # Create a temporary directory, and hook for its removal unless debugging. 10907$debug || 10908{ 10909 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 10910 trap '{ (exit 1); exit 1; }' 1 2 13 15 10911} 10912 10913# Create a (secure) tmp directory for tmp files. 10914: ${TMPDIR=/tmp} 10915{ 10916 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && 10917 test -n "$tmp" && test -d "$tmp" 10918} || 10919{ 10920 tmp=$TMPDIR/sed$$-$RANDOM 10921 (umask 077 && mkdir $tmp) 10922} || 10923{ 10924 echo "$me: cannot create a temporary directory in $TMPDIR" >&2 10925 { (exit 1); exit 1; } 10926} 10927 _max=0 10928 _count=0 10929 # Add /usr/xpg4/bin/sed as it is typically found on Solaris 10930 # along with /bin/sed that truncates output. 10931 for _sed in $_sed_list /usr/xpg4/bin/sed; do 10932 test ! -f ${_sed} && break 10933 cat /dev/null > "$tmp/sed.in" 10934 _count=0 10935 echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in" 10936 # Check for GNU sed and select it if it is found. 10937 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then 10938 lt_cv_path_SED=${_sed} 10939 break; 10940 fi 10941 while true; do 10942 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" 10943 mv "$tmp/sed.tmp" "$tmp/sed.in" 10944 cp "$tmp/sed.in" "$tmp/sed.nl" 10945 echo >>"$tmp/sed.nl" 10946 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break 10947 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break 10948 # 10000 chars as input seems more than enough 10949 test $_count -gt 10 && break 10950 _count=`expr $_count + 1` 10951 if test $_count -gt $_max; then 10952 _max=$_count 10953 lt_cv_path_SED=$_sed 10954 fi 10955 done 10956 done 10957 rm -rf "$tmp" 10958]) 10959AC_MSG_RESULT([$SED]) 10960]) 10961