| 1 | dnl aclocal.m4 generated automatically by aclocal 1.4-p5 |
| 2 | |
| 3 | dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. |
| 7 | |
| 8 | dnl This program is distributed in the hope that it will be useful, |
| 9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
| 10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 11 | dnl PARTICULAR PURPOSE. |
| 12 | |
| 13 | |
| 14 | dnl This file is part of the KDE libraries/packages |
| 15 | dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu) |
| 16 | dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org) |
| 17 | |
| 18 | dnl This file is free software; you can redistribute it and/or |
| 19 | dnl modify it under the terms of the GNU Library General Public |
| 20 | dnl License as published by the Free Software Foundation; either |
| 21 | dnl version 2 of the License, or (at your option) any later version. |
| 22 | |
| 23 | dnl This library is distributed in the hope that it will be useful, |
| 24 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 25 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 26 | dnl Library General Public License for more details. |
| 27 | |
| 28 | dnl You should have received a copy of the GNU Library General Public License |
| 29 | dnl along with this library; see the file COPYING.LIB. If not, write to |
| 30 | dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 31 | dnl Boston, MA 02111-1307, USA. |
| 32 | |
| 33 | dnl IMPORTANT NOTE: |
| 34 | dnl Please do not modify this file unless you expect your modifications to be |
| 35 | dnl carried into every other module in the repository. |
| 36 | dnl |
| 37 | dnl Single-module modifications are best placed in configure.in for kdelibs |
| 38 | dnl and kdebase or configure.in.in if present. |
| 39 | |
| 40 | dnl ------------------------------------------------------------------------ |
| 41 | dnl Forward compatibility macros (make autoconf 2.13 look like 2.50), |
| 42 | dnl thanks to Raja R Harinath. |
| 43 | dnl ------------------------------------------------------------------------ |
| 44 | dnl |
| 45 | ifdef([_AC_PATH_X_XMKMF],[], |
| 46 | [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])]) |
| 47 | ifdef([AC_OUTPUT_SUBDIRS],[], |
| 48 | [AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])]) |
| 49 | |
| 50 | # KDE_PATH_X_DIRECT |
| 51 | dnl Internal subroutine of AC_PATH_X. |
| 52 | dnl Set ac_x_includes and/or ac_x_libraries. |
| 53 | AC_DEFUN(KDE_PATH_X_DIRECT, |
| 54 | [ |
| 55 | AC_REQUIRE([KDE_CHECK_LIB64]) |
| 56 | |
| 57 | if test "$ac_x_includes" = NO; then |
| 58 | # Guess where to find include files, by looking for this one X11 .h file. |
| 59 | test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h |
| 60 | |
| 61 | # First, try using that file with no special directory specified. |
| 62 | AC_TRY_CPP([#include <$x_direct_test_include>], |
| 63 | [# We can compile using X headers with no special include directory. |
| 64 | ac_x_includes=], |
| 65 | [# Look for the header file in a standard set of common directories. |
| 66 | # Check X11 before X11Rn because it is often a symlink to the current release. |
| 67 | for ac_dir in \ |
| 68 | /usr/X11/include \ |
| 69 | /usr/X11R6/include \ |
| 70 | /usr/X11R5/include \ |
| 71 | /usr/X11R4/include \ |
| 72 | \ |
| 73 | /usr/include/X11 \ |
| 74 | /usr/include/X11R6 \ |
| 75 | /usr/include/X11R5 \ |
| 76 | /usr/include/X11R4 \ |
| 77 | \ |
| 78 | /usr/local/X11/include \ |
| 79 | /usr/local/X11R6/include \ |
| 80 | /usr/local/X11R5/include \ |
| 81 | /usr/local/X11R4/include \ |
| 82 | \ |
| 83 | /usr/local/include/X11 \ |
| 84 | /usr/local/include/X11R6 \ |
| 85 | /usr/local/include/X11R5 \ |
| 86 | /usr/local/include/X11R4 \ |
| 87 | \ |
| 88 | /usr/X386/include \ |
| 89 | /usr/x386/include \ |
| 90 | /usr/XFree86/include/X11 \ |
| 91 | \ |
| 92 | /usr/include \ |
| 93 | /usr/local/include \ |
| 94 | /usr/unsupported/include \ |
| 95 | /usr/athena/include \ |
| 96 | /usr/local/x11r5/include \ |
| 97 | /usr/lpp/Xamples/include \ |
| 98 | \ |
| 99 | /usr/openwin/include \ |
| 100 | /usr/openwin/share/include \ |
| 101 | ; \ |
| 102 | do |
| 103 | if test -r "$ac_dir/$x_direct_test_include"; then |
| 104 | ac_x_includes=$ac_dir |
| 105 | break |
| 106 | fi |
| 107 | done]) |
| 108 | fi # $ac_x_includes = NO |
| 109 | |
| 110 | if test "$ac_x_libraries" = NO; then |
| 111 | # Check for the libraries. |
| 112 | |
| 113 | test -z "$x_direct_test_library" && x_direct_test_library=Xt |
| 114 | test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc |
| 115 | |
| 116 | # See if we find them without any special options. |
| 117 | # Don't add to $LIBS permanently. |
| 118 | ac_save_LIBS="$LIBS" |
| 119 | LIBS="-l$x_direct_test_library $LIBS" |
| 120 | AC_TRY_LINK(, [${x_direct_test_function}()], |
| 121 | [LIBS="$ac_save_LIBS" |
| 122 | # We can link X programs with no special library path. |
| 123 | ac_x_libraries=], |
| 124 | [LIBS="$ac_save_LIBS" |
| 125 | # First see if replacing the include by lib works. |
| 126 | # Check X11 before X11Rn because it is often a symlink to the current release. |
| 127 | for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \ |
| 128 | /usr/X11/lib${kdelibsuff} \ |
| 129 | /usr/X11R6/lib${kdelibsuff} \ |
| 130 | /usr/X11R5/lib${kdelibsuff} \ |
| 131 | /usr/X11R4/lib${kdelibsuff} \ |
| 132 | \ |
| 133 | /usr/lib${kdelibsuff}/X11 \ |
| 134 | /usr/lib${kdelibsuff}/X11R6 \ |
| 135 | /usr/lib${kdelibsuff}/X11R5 \ |
| 136 | /usr/lib${kdelibsuff}/X11R4 \ |
| 137 | \ |
| 138 | /usr/local/X11/lib${kdelibsuff} \ |
| 139 | /usr/local/X11R6/lib${kdelibsuff} \ |
| 140 | /usr/local/X11R5/lib${kdelibsuff} \ |
| 141 | /usr/local/X11R4/lib${kdelibsuff} \ |
| 142 | \ |
| 143 | /usr/local/lib${kdelibsuff}/X11 \ |
| 144 | /usr/local/lib${kdelibsuff}/X11R6 \ |
| 145 | /usr/local/lib${kdelibsuff}/X11R5 \ |
| 146 | /usr/local/lib${kdelibsuff}/X11R4 \ |
| 147 | \ |
| 148 | /usr/X386/lib${kdelibsuff} \ |
| 149 | /usr/x386/lib${kdelibsuff} \ |
| 150 | /usr/XFree86/lib${kdelibsuff}/X11 \ |
| 151 | \ |
| 152 | /usr/lib${kdelibsuff} \ |
| 153 | /usr/local/lib${kdelibsuff} \ |
| 154 | /usr/unsupported/lib${kdelibsuff} \ |
| 155 | /usr/athena/lib${kdelibsuff} \ |
| 156 | /usr/local/x11r5/lib${kdelibsuff} \ |
| 157 | /usr/lpp/Xamples/lib${kdelibsuff} \ |
| 158 | /lib/usr/lib${kdelibsuff}/X11 \ |
| 159 | \ |
| 160 | /usr/openwin/lib${kdelibsuff} \ |
| 161 | /usr/openwin/share/lib${kdelibsuff} \ |
| 162 | ; \ |
| 163 | do |
| 164 | dnl Don't even attempt the hair of trying to link an X program! |
| 165 | for ac_extension in a so sl; do |
| 166 | if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then |
| 167 | ac_x_libraries=$ac_dir |
| 168 | break 2 |
| 169 | fi |
| 170 | done |
| 171 | done]) |
| 172 | fi # $ac_x_libraries = NO |
| 173 | ]) |
| 174 | |
| 175 | |
| 176 | dnl ------------------------------------------------------------------------ |
| 177 | dnl Find a file (or one of more files in a list of dirs) |
| 178 | dnl ------------------------------------------------------------------------ |
| 179 | dnl |
| 180 | AC_DEFUN(AC_FIND_FILE, |
| 181 | [ |
| 182 | $3=NO |
| 183 | for i in $2; |
| 184 | do |
| 185 | for j in $1; |
| 186 | do |
| 187 | echo "configure: __oline__: $i/$j" >&AC_FD_CC |
| 188 | if test -r "$i/$j"; then |
| 189 | echo "taking that" >&AC_FD_CC |
| 190 | $3=$i |
| 191 | break 2 |
| 192 | fi |
| 193 | done |
| 194 | done |
| 195 | ]) |
| 196 | |
| 197 | dnl KDE_FIND_PATH(programm-name, variable-name, list of directories, |
| 198 | dnl if-not-found, test-parameter) |
| 199 | AC_DEFUN(KDE_FIND_PATH, |
| 200 | [ |
| 201 | AC_MSG_CHECKING([for $1]) |
| 202 | if test -n "$$2"; then |
| 203 | kde_cv_path="$$2"; |
| 204 | else |
| 205 | kde_cache=`echo $1 | sed 'y%./+-%__p_%'` |
| 206 | |
| 207 | AC_CACHE_VAL(kde_cv_path_$kde_cache, |
| 208 | [ |
| 209 | kde_cv_path="NONE" |
| 210 | dirs="$3" |
| 211 | kde_save_IFS=$IFS |
| 212 | IFS=':' |
| 213 | for dir in $PATH; do |
| 214 | dirs="$dirs $dir" |
| 215 | done |
| 216 | IFS=$kde_save_IFS |
| 217 | |
| 218 | for dir in $dirs; do |
| 219 | if test -x "$dir/$1"; then |
| 220 | if test -n "$5" |
| 221 | then |
| 222 | evalstr="$dir/$1 $5 2>&1 " |
| 223 | if eval $evalstr; then |
| 224 | kde_cv_path="$dir/$1" |
| 225 | break |
| 226 | fi |
| 227 | else |
| 228 | kde_cv_path="$dir/$1" |
| 229 | break |
| 230 | fi |
| 231 | fi |
| 232 | done |
| 233 | |
| 234 | eval "kde_cv_path_$kde_cache=$kde_cv_path" |
| 235 | |
| 236 | ]) |
| 237 | |
| 238 | eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\"" |
| 239 | |
| 240 | fi |
| 241 | |
| 242 | if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then |
| 243 | AC_MSG_RESULT(not found) |
| 244 | $4 |
| 245 | else |
| 246 | AC_MSG_RESULT($kde_cv_path) |
| 247 | $2=$kde_cv_path |
| 248 | |
| 249 | fi |
| 250 | ]) |
| 251 | |
| 252 | AC_DEFUN(KDE_MOC_ERROR_MESSAGE, |
| 253 | [ |
| 254 | AC_MSG_ERROR([No Qt meta object compiler (moc) found! |
| 255 | Please check whether you installed Qt correctly. |
| 256 | You need to have a running moc binary. |
| 257 | configure tried to run $ac_cv_path_moc and the test didn't |
| 258 | succeed. If configure shouldn't have tried this one, set |
| 259 | the environment variable MOC to the right one before running |
| 260 | configure. |
| 261 | ]) |
| 262 | ]) |
| 263 | |
| 264 | AC_DEFUN(KDE_UIC_ERROR_MESSAGE, |
| 265 | [ |
| 266 | AC_MSG_WARN([No Qt ui compiler (uic) found! |
| 267 | Please check whether you installed Qt correctly. |
| 268 | You need to have a running uic binary. |
| 269 | configure tried to run $ac_cv_path_uic and the test didn't |
| 270 | succeed. If configure shouldn't have tried this one, set |
| 271 | the environment variable UIC to the right one before running |
| 272 | configure. |
| 273 | ]) |
| 274 | ]) |
| 275 | |
| 276 | |
| 277 | AC_DEFUN(KDE_CHECK_UIC_FLAG, |
| 278 | [ |
| 279 | AC_MSG_CHECKING([whether uic supports -$1 ]) |
| 280 | kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'` |
| 281 | AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache, |
| 282 | [ |
| 283 | cat >conftest.ui <<EOT |
| 284 | <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI> |
| 285 | EOT |
| 286 | ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null" |
| 287 | if AC_TRY_EVAL(ac_uic_testrun); then |
| 288 | eval "kde_cv_prog_uic_$kde_cache=yes" |
| 289 | else |
| 290 | eval "kde_cv_prog_uic_$kde_cache=no" |
| 291 | fi |
| 292 | rm -f conftest* |
| 293 | ]) |
| 294 | |
| 295 | if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then |
| 296 | AC_MSG_RESULT([yes]) |
| 297 | : |
| 298 | $3 |
| 299 | else |
| 300 | AC_MSG_RESULT([no]) |
| 301 | : |
| 302 | $4 |
| 303 | fi |
| 304 | ]) |
| 305 | |
| 306 | |
| 307 | dnl ------------------------------------------------------------------------ |
| 308 | dnl Find the meta object compiler and the ui compiler in the PATH, |
| 309 | dnl in $QTDIR/bin, and some more usual places |
| 310 | dnl ------------------------------------------------------------------------ |
| 311 | dnl |
| 312 | AC_DEFUN(AC_PATH_QT_MOC_UIC, |
| 313 | [ |
| 314 | qt_bindirs="" |
| 315 | for dir in $kde_qt_dirs; do |
| 316 | qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc" |
| 317 | done |
| 318 | qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin" |
| 319 | if test ! "$ac_qt_bindir" = "NO"; then |
| 320 | qt_bindirs="$ac_qt_bindir $qt_bindirs" |
| 321 | fi |
| 322 | |
| 323 | KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE]) |
| 324 | if test -z "$UIC_NOT_NEEDED"; then |
| 325 | KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""]) |
| 326 | if test -z "$UIC_PATH" ; then |
| 327 | KDE_UIC_ERROR_MESSAGE |
| 328 | exit 1 |
| 329 | elif test $kde_qtver = 3; then |
| 330 | KDE_CHECK_UIC_FLAG(L,[/nonexistant],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no) |
| 331 | KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no) |
| 332 | |
| 333 | UIC=$UIC_PATH |
| 334 | if test x$ac_uic_supports_libpath = xyes; then |
| 335 | UIC="$UIC -L \$(kde_widgetdir)" |
| 336 | fi |
| 337 | if test x$ac_uic_supports_nounload = xyes; then |
| 338 | UIC="$UIC -nounload" |
| 339 | fi |
| 340 | fi |
| 341 | else |
| 342 | UIC="echo uic not available: " |
| 343 | fi |
| 344 | |
| 345 | AC_SUBST(MOC) |
| 346 | AC_SUBST(UIC) |
| 347 | |
| 348 | UIC_TR="i18n" |
| 349 | if test $kde_qtver = 3; then |
| 350 | UIC_TR="tr2i18n" |
| 351 | fi |
| 352 | |
| 353 | AC_SUBST(UIC_TR) |
| 354 | ]) |
| 355 | |
| 356 | AC_DEFUN(KDE_1_CHECK_PATHS, |
| 357 | [ |
| 358 | KDE_1_CHECK_PATH_HEADERS |
| 359 | |
| 360 | KDE_TEST_RPATH= |
| 361 | |
| 362 | if test -n "$USE_RPATH"; then |
| 363 | |
| 364 | if test -n "$kde_libraries"; then |
| 365 | KDE_TEST_RPATH="-R $kde_libraries" |
| 366 | fi |
| 367 | |
| 368 | if test -n "$qt_libraries"; then |
| 369 | KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries" |
| 370 | fi |
| 371 | |
| 372 | if test -n "$x_libraries"; then |
| 373 | KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries" |
| 374 | fi |
| 375 | |
| 376 | KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH" |
| 377 | fi |
| 378 | |
| 379 | AC_MSG_CHECKING([for KDE libraries installed]) |
| 380 | ac_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' |
| 381 | |
| 382 | if AC_TRY_EVAL(ac_link) && test -s conftest; then |
| 383 | AC_MSG_RESULT(yes) |
| 384 | else |
| 385 | AC_MSG_ERROR([your system fails at linking a small KDE application! |
| 386 | Check, if your compiler is installed correctly and if you have used the |
| 387 | same compiler to compile Qt and kdelibs as you did use now. |
| 388 | For more details about this problem, look at the end of config.log.]) |
| 389 | fi |
| 390 | |
| 391 | if eval `KDEDIR= ./conftest 2>&5`; then |
| 392 | kde_result=done |
| 393 | else |
| 394 | kde_result=problems |
| 395 | fi |
| 396 | |
| 397 | KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log |
| 398 | kde_have_all_paths=yes |
| 399 | |
| 400 | KDE_SET_PATHS($kde_result) |
| 401 | |
| 402 | ]) |
| 403 | |
| 404 | AC_DEFUN(KDE_SET_PATHS, |
| 405 | [ |
| 406 | kde_cv_all_paths="kde_have_all_paths=\"yes\" \ |
| 407 | kde_htmldir=\"$kde_htmldir\" \ |
| 408 | kde_appsdir=\"$kde_appsdir\" \ |
| 409 | kde_icondir=\"$kde_icondir\" \ |
| 410 | kde_sounddir=\"$kde_sounddir\" \ |
| 411 | kde_datadir=\"$kde_datadir\" \ |
| 412 | kde_locale=\"$kde_locale\" \ |
| 413 | kde_cgidir=\"$kde_cgidir\" \ |
| 414 | kde_confdir=\"$kde_confdir\" \ |
| 415 | kde_mimedir=\"$kde_mimedir\" \ |
| 416 | kde_toolbardir=\"$kde_toolbardir\" \ |
| 417 | kde_wallpaperdir=\"$kde_wallpaperdir\" \ |
| 418 | kde_templatesdir=\"$kde_templatesdir\" \ |
| 419 | kde_bindir=\"$kde_bindir\" \ |
| 420 | kde_servicesdir=\"$kde_servicesdir\" \ |
| 421 | kde_servicetypesdir=\"$kde_servicetypesdir\" \ |
| 422 | kde_moduledir=\"$kde_moduledir\" \ |
| 423 | kde_styledir=\"$kde_styledir\" \ |
| 424 | kde_widgetdir=\"$kde_widgetdir\" \ |
| 425 | kde_result=$1" |
| 426 | ]) |
| 427 | |
| 428 | AC_DEFUN(KDE_SET_DEFAULT_PATHS, |
| 429 | [ |
| 430 | if test "$1" = "default"; then |
| 431 | |
| 432 | if test -z "$kde_htmldir"; then |
| 433 | kde_htmldir='\${prefix}/share/doc/HTML' |
| 434 | fi |
| 435 | if test -z "$kde_appsdir"; then |
| 436 | kde_appsdir='\${prefix}/share/applnk' |
| 437 | fi |
| 438 | if test -z "$kde_icondir"; then |
| 439 | kde_icondir='\${prefix}/share/icons' |
| 440 | fi |
| 441 | if test -z "$kde_sounddir"; then |
| 442 | kde_sounddir='\${prefix}/share/sounds' |
| 443 | fi |
| 444 | if test -z "$kde_datadir"; then |
| 445 | kde_datadir='\${prefix}/share/apps' |
| 446 | fi |
| 447 | if test -z "$kde_locale"; then |
| 448 | kde_locale='\${prefix}/share/locale' |
| 449 | fi |
| 450 | if test -z "$kde_cgidir"; then |
| 451 | kde_cgidir='\${exec_prefix}/cgi-bin' |
| 452 | fi |
| 453 | if test -z "$kde_confdir"; then |
| 454 | kde_confdir='\${prefix}/share/config' |
| 455 | fi |
| 456 | if test -z "$kde_mimedir"; then |
| 457 | kde_mimedir='\${prefix}/share/mimelnk' |
| 458 | fi |
| 459 | if test -z "$kde_toolbardir"; then |
| 460 | kde_toolbardir='\${prefix}/share/toolbar' |
| 461 | fi |
| 462 | if test -z "$kde_wallpaperdir"; then |
| 463 | kde_wallpaperdir='\${prefix}/share/wallpapers' |
| 464 | fi |
| 465 | if test -z "$kde_templatesdir"; then |
| 466 | kde_templatesdir='\${prefix}/share/templates' |
| 467 | fi |
| 468 | if test -z "$kde_bindir"; then |
| 469 | kde_bindir='\${exec_prefix}/bin' |
| 470 | fi |
| 471 | if test -z "$kde_servicesdir"; then |
| 472 | kde_servicesdir='\${prefix}/share/services' |
| 473 | fi |
| 474 | if test -z "$kde_servicetypesdir"; then |
| 475 | kde_servicetypesdir='\${prefix}/share/servicetypes' |
| 476 | fi |
| 477 | if test -z "$kde_moduledir"; then |
| 478 | if test "$kde_qtver" = "2"; then |
| 479 | kde_moduledir='\${libdir}/kde2' |
| 480 | else |
| 481 | kde_moduledir='\${libdir}/kde3' |
| 482 | fi |
| 483 | fi |
| 484 | if test -z "$kde_styledir"; then |
| 485 | kde_styledir='\${libdir}/kde3/plugins/styles' |
| 486 | fi |
| 487 | if test -z "$kde_widgetdir"; then |
| 488 | kde_widgetdir='\${libdir}/kde3/plugins/designer' |
| 489 | fi |
| 490 | |
| 491 | KDE_SET_PATHS(defaults) |
| 492 | |
| 493 | else |
| 494 | |
| 495 | if test $kde_qtver = 1; then |
| 496 | AC_MSG_RESULT([compiling]) |
| 497 | KDE_1_CHECK_PATHS |
| 498 | else |
| 499 | AC_MSG_ERROR([path checking not yet supported for KDE 2]) |
| 500 | fi |
| 501 | |
| 502 | fi |
| 503 | ]) |
| 504 | |
| 505 | AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS, |
| 506 | [ if test -z "$kde_htmldir" || test -z "$kde_appsdir" || |
| 507 | test -z "$kde_icondir" || test -z "$kde_sounddir" || |
| 508 | test -z "$kde_datadir" || test -z "$kde_locale" || |
| 509 | test -z "$kde_cgidir" || test -z "$kde_confdir" || |
| 510 | test -z "$kde_mimedir" || test -z "$kde_toolbardir" || |
| 511 | test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" || |
| 512 | test -z "$kde_bindir" || test -z "$kde_servicesdir" || |
| 513 | test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" || |
| 514 | test -z "$kde_styledir" || test -z "kde_widgetdir" |
| 515 | test "x$kde_have_all_paths" != "xyes"; then |
| 516 | kde_have_all_paths=no |
| 517 | fi |
| 518 | ]) |
| 519 | |
| 520 | AC_DEFUN(KDE_MISSING_PROG_ERROR, |
| 521 | [ |
| 522 | AC_MSG_ERROR([The important program $1 was not found! |
| 523 | Please check whether you installed KDE correctly. |
| 524 | ]) |
| 525 | ]) |
| 526 | |
| 527 | AC_DEFUN(KDE_MISSING_ARTS_ERROR, |
| 528 | [ |
| 529 | AC_MSG_ERROR([The important program $1 was not found! |
| 530 | Please check whether you installed aRts correctly. |
| 531 | ]) |
| 532 | ]) |
| 533 | |
| 534 | AC_DEFUN(KDE_SUBST_PROGRAMS, |
| 535 | [ |
| 536 | |
| 537 | 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" |
| 538 | test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs" |
| 539 | if test -n "$KDEDIRS"; then |
| 540 | kde_save_IFS=$IFS |
| 541 | IFS=: |
| 542 | for dir in $KDEDIRS; do |
| 543 | kde_default_bindirs="$dir/bin $kde_default_bindirs " |
| 544 | done |
| 545 | IFS=$kde_save_IFS |
| 546 | fi |
| 547 | kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs" |
| 548 | KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)]) |
| 549 | KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)]) |
| 550 | KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)]) |
| 551 | KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)]) |
| 552 | KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs]) |
| 553 | KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs]) |
| 554 | |
| 555 | if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then |
| 556 | kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share" |
| 557 | test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs" |
| 558 | AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET) |
| 559 | if test "$KDE_XSL_STYLESHEET" = "NO"; then |
| 560 | KDE_XSL_STYLESHEET="" |
| 561 | else |
| 562 | KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl" |
| 563 | fi |
| 564 | fi |
| 565 | |
| 566 | DCOP_DEPENDENCIES='$(DCOPIDL)' |
| 567 | AC_SUBST(DCOPIDL) |
| 568 | AC_SUBST(DCOPIDL2CPP) |
| 569 | AC_SUBST(DCOP_DEPENDENCIES) |
| 570 | AC_SUBST(MCOPIDL) |
| 571 | AC_SUBST(ARTSCCONFIG) |
| 572 | AC_SUBST(KDECONFIG) |
| 573 | AC_SUBST(MEINPROC) |
| 574 | AC_SUBST(KDE_XSL_STYLESHEET) |
| 575 | |
| 576 | if test -x "$KDECONFIG"; then # it can be "compiled" |
| 577 | kde_libs_prefix=`$KDECONFIG --prefix` |
| 578 | if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then |
| 579 | AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs. |
| 580 | This means it has been moved since you installed it. |
| 581 | This won't work. Please recompile kdelibs for the new prefix. |
| 582 | ]) |
| 583 | fi |
| 584 | kde_libs_htmldir=`$KDECONFIG --install html --expandvars` |
| 585 | else |
| 586 | kde_libs_prefix='$(prefix)' |
| 587 | kde_libs_htmldir='$(kde_htmldir)' |
| 588 | fi |
| 589 | AC_SUBST(kde_libs_prefix) |
| 590 | AC_SUBST(kde_libs_htmldir) |
| 591 | ])dnl |
| 592 | |
| 593 | AC_DEFUN(AC_CREATE_KFSSTND, |
| 594 | [ |
| 595 | AC_REQUIRE([AC_CHECK_RPATH]) |
| 596 | |
| 597 | AC_MSG_CHECKING([for KDE paths]) |
| 598 | kde_result="" |
| 599 | kde_cached_paths=yes |
| 600 | AC_CACHE_VAL(kde_cv_all_paths, |
| 601 | [ |
| 602 | KDE_SET_DEFAULT_PATHS($1) |
| 603 | kde_cached_paths=no |
| 604 | ]) |
| 605 | eval "$kde_cv_all_paths" |
| 606 | KDE_CHECK_PATHS_FOR_COMPLETENESS |
| 607 | if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then |
| 608 | # wrong values were cached, may be, we can set better ones |
| 609 | kde_result= |
| 610 | kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir= |
| 611 | kde_datadir= kde_locale= kde_cgidir= kde_confdir= |
| 612 | kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir= |
| 613 | kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir= |
| 614 | kde_have_all_paths= |
| 615 | kde_styledir= |
| 616 | kde_widgetdir= |
| 617 | KDE_SET_DEFAULT_PATHS($1) |
| 618 | eval "$kde_cv_all_paths" |
| 619 | KDE_CHECK_PATHS_FOR_COMPLETENESS |
| 620 | kde_result="$kde_result (cache overridden)" |
| 621 | fi |
| 622 | if test "$kde_have_all_paths" = "no"; then |
| 623 | AC_MSG_ERROR([configure could not run a little KDE program to test the environment. |
| 624 | Since it had compiled and linked before, it must be a strange problem on your system. |
| 625 | Look at config.log for details. If you are not able to fix this, look at |
| 626 | http://www.kde.org/faq/installation.html or any www.kde.org mirror. |
| 627 | (If you're using an egcs version on Linux, you may update binutils!) |
| 628 | ]) |
| 629 | else |
| 630 | rm -f conftest* |
| 631 | AC_MSG_RESULT($kde_result) |
| 632 | fi |
| 633 | |
| 634 | bindir=$kde_bindir |
| 635 | |
| 636 | KDE_SUBST_PROGRAMS |
| 637 | |
| 638 | ]) |
| 639 | |
| 640 | AC_DEFUN(AC_SUBST_KFSSTND, |
| 641 | [ |
| 642 | AC_SUBST(kde_htmldir) |
| 643 | AC_SUBST(kde_appsdir) |
| 644 | AC_SUBST(kde_icondir) |
| 645 | AC_SUBST(kde_sounddir) |
| 646 | AC_SUBST(kde_datadir) |
| 647 | AC_SUBST(kde_locale) |
| 648 | AC_SUBST(kde_confdir) |
| 649 | AC_SUBST(kde_mimedir) |
| 650 | AC_SUBST(kde_wallpaperdir) |
| 651 | AC_SUBST(kde_bindir) |
| 652 | dnl for KDE 2 |
| 653 | AC_SUBST(kde_templatesdir) |
| 654 | AC_SUBST(kde_servicesdir) |
| 655 | AC_SUBST(kde_servicetypesdir) |
| 656 | AC_SUBST(kde_moduledir) |
| 657 | AC_SUBST(kde_styledir) |
| 658 | AC_SUBST(kde_widgetdir) |
| 659 | if test "$kde_qtver" = 1; then |
| 660 | kde_minidir="$kde_icondir/mini" |
| 661 | else |
| 662 | # for KDE 1 - this breaks KDE2 apps using minidir, but |
| 663 | # that's the plan ;-/ |
| 664 | kde_minidir="/dev/null" |
| 665 | fi |
| 666 | dnl AC_SUBST(kde_minidir) |
| 667 | dnl AC_SUBST(kde_cgidir) |
| 668 | dnl AC_SUBST(kde_toolbardir) |
| 669 | ]) |
| 670 | |
| 671 | AC_DEFUN(KDE_MISC_TESTS, |
| 672 | [ |
| 673 | AC_LANG_C |
| 674 | dnl Checks for libraries. |
| 675 | AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD |
| 676 | AC_SUBST(LIBUTIL) |
| 677 | AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD |
| 678 | AC_SUBST(LIBCOMPAT) |
| 679 | kde_have_crypt= |
| 680 | AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes], |
| 681 | AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [ |
| 682 | AC_MSG_WARN([you have no crypt in either libcrypt or libc. |
| 683 | You should install libcrypt from another source or configure with PAM |
| 684 | support]) |
| 685 | kde_have_crypt=no |
| 686 | ])) |
| 687 | AC_SUBST(LIBCRYPT) |
| 688 | if test $kde_have_crypt = yes; then |
| 689 | AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function]) |
| 690 | fi |
| 691 | AC_CHECK_SOCKLEN_T |
| 692 | AC_LANG_C |
| 693 | AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"]) |
| 694 | if test $ac_cv_lib_dnet_dnet_ntoa = no; then |
| 695 | AC_CHECK_LIB(dnet_stub, dnet_ntoa, |
| 696 | [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) |
| 697 | fi |
| 698 | AC_CHECK_FUNC(inet_ntoa) |
| 699 | if test $ac_cv_func_inet_ntoa = no; then |
| 700 | AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl") |
| 701 | fi |
| 702 | AC_CHECK_FUNC(connect) |
| 703 | if test $ac_cv_func_connect = no; then |
| 704 | AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", , |
| 705 | $X_EXTRA_LIBS) |
| 706 | fi |
| 707 | |
| 708 | AC_CHECK_FUNC(remove) |
| 709 | if test $ac_cv_func_remove = no; then |
| 710 | AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix") |
| 711 | fi |
| 712 | |
| 713 | # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. |
| 714 | AC_CHECK_FUNC(shmat, , |
| 715 | AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc")) |
| 716 | |
| 717 | # darwin needs this to initialize the environment |
| 718 | AC_CHECK_HEADERS(crt_externs.h) |
| 719 | AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])]) |
| 720 | |
| 721 | # more headers that need to be explicitly included on darwin |
| 722 | AC_CHECK_HEADERS(sys/types.h stdint.h) |
| 723 | |
| 724 | # darwin requires a poll emulation library |
| 725 | AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll") |
| 726 | |
| 727 | # CoreAudio framework |
| 728 | AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [ |
| 729 | AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API]) |
| 730 | FRAMEWORK_COREAUDIO="-framework CoreAudio" |
| 731 | ]) |
| 732 | |
| 733 | AC_CHECK_RES_INIT |
| 734 | AC_SUBST(LIB_POLL) |
| 735 | AC_SUBST(FRAMEWORK_COREAUDIO) |
| 736 | LIBSOCKET="$X_EXTRA_LIBS" |
| 737 | AC_SUBST(LIBSOCKET) |
| 738 | AC_SUBST(X_EXTRA_LIBS) |
| 739 | AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4 |
| 740 | AC_SUBST(LIBUCB) |
| 741 | |
| 742 | case $host in dnl this *is* LynxOS specific |
| 743 | *-*-lynxos* ) |
| 744 | AC_MSG_CHECKING([LynxOS header file wrappers]) |
| 745 | [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"] |
| 746 | AC_MSG_RESULT(disabled) |
| 747 | AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS |
| 748 | ;; |
| 749 | esac |
| 750 | |
| 751 | KDE_CHECK_TYPES |
| 752 | KDE_CHECK_LIBDL |
| 753 | |
| 754 | AH_VERBATIM(_AIX_STRINGS_H_BZERO, |
| 755 | [ |
| 756 | /* |
| 757 | * AIX defines FD_SET in terms of bzero, but fails to include <strings.h> |
| 758 | * that defines bzero. |
| 759 | */ |
| 760 | |
| 761 | #if defined(_AIX) |
| 762 | #include <strings.h> |
| 763 | #endif |
| 764 | ]) |
| 765 | |
| 766 | AC_CHECK_FUNCS([vsnprintf snprintf]) |
| 767 | |
| 768 | AH_VERBATIM(_TRU64,[ |
| 769 | /* |
| 770 | * On HP-UX, the declaration of vsnprintf() is needed every time ! |
| 771 | */ |
| 772 | |
| 773 | #if !defined(HAVE_VSNPRINTF) || defined(hpux) |
| 774 | #if __STDC__ |
| 775 | #include <stdarg.h> |
| 776 | #include <stdlib.h> |
| 777 | #else |
| 778 | #include <varargs.h> |
| 779 | #endif |
| 780 | #ifdef __cplusplus |
| 781 | extern "C" |
| 782 | #endif |
| 783 | int vsnprintf(char *str, size_t n, char const *fmt, va_list ap); |
| 784 | #ifdef __cplusplus |
| 785 | extern "C" |
| 786 | #endif |
| 787 | int snprintf(char *str, size_t n, char const *fmt, ...); |
| 788 | #endif |
| 789 | ]) |
| 790 | |
| 791 | ]) |
| 792 | |
| 793 | dnl ------------------------------------------------------------------------ |
| 794 | dnl Find the header files and libraries for X-Windows. Extended the |
| 795 | dnl macro AC_PATH_X |
| 796 | dnl ------------------------------------------------------------------------ |
| 797 | dnl |
| 798 | AC_DEFUN(K_PATH_X, |
| 799 | [ |
| 800 | AC_REQUIRE([KDE_MISC_TESTS])dnl |
| 801 | AC_REQUIRE([KDE_CHECK_LIB64]) |
| 802 | |
| 803 | AC_ARG_ENABLE( |
| 804 | embedded, |
| 805 | [ --enable-embedded link to Qt-embedded, don't use X], |
| 806 | kde_use_qt_emb=$enableval, |
| 807 | kde_use_qt_emb=no |
| 808 | ) |
| 809 | |
| 810 | AC_ARG_ENABLE( |
| 811 | qtopia, |
| 812 | [ --enable-qtopia link to Qt-embedded, link to the Qtopia Environment], |
| 813 | kde_use_qt_emb_palm=$enableval, |
| 814 | kde_use_qt_emb_palm=no |
| 815 | ) |
| 816 | |
| 817 | if test "$kde_use_qt_emb" = "no"; then |
| 818 | |
| 819 | AC_MSG_CHECKING(for X) |
| 820 | AC_LANG_SAVE |
| 821 | AC_LANG_C |
| 822 | AC_CACHE_VAL(kde_cv_have_x, |
| 823 | [# One or both of the vars are not set, and there is no cached value. |
| 824 | if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then |
| 825 | kde_x_includes=NO |
| 826 | else |
| 827 | kde_x_includes=$x_includes |
| 828 | fi |
| 829 | if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then |
| 830 | kde_x_libraries=NO |
| 831 | else |
| 832 | kde_x_libraries=$x_libraries |
| 833 | fi |
| 834 | |
| 835 | # below we use the standard autoconf calls |
| 836 | ac_x_libraries=$kde_x_libraries |
| 837 | ac_x_includes=$kde_x_includes |
| 838 | |
| 839 | KDE_PATH_X_DIRECT |
| 840 | dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries. |
| 841 | dnl Unfortunately, if compiling with the N32 ABI, this is not the correct |
| 842 | dnl location. The correct location is /usr/lib32 or an undefined value |
| 843 | dnl (the linker is smart enough to pick the correct default library). |
| 844 | dnl Things work just fine if you use just AC_PATH_X_DIRECT. |
| 845 | dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to |
| 846 | dnl /usr/openwin/include, which doesn't work. /usr/include does work, so |
| 847 | dnl x_includes should be left alone. |
| 848 | case "$host" in |
| 849 | mips-sgi-irix6*) |
| 850 | ;; |
| 851 | *-*-solaris*) |
| 852 | ;; |
| 853 | *) |
| 854 | _AC_PATH_X_XMKMF |
| 855 | if test -z "$ac_x_includes"; then |
| 856 | ac_x_includes="." |
| 857 | fi |
| 858 | if test -z "$ac_x_libraries"; then |
| 859 | ac_x_libraries="/usr/lib${kdelibsuff}" |
| 860 | fi |
| 861 | esac |
| 862 | #from now on we use our own again |
| 863 | |
| 864 | # when the user already gave --x-includes, we ignore |
| 865 | # what the standard autoconf macros told us. |
| 866 | if test "$kde_x_includes" = NO; then |
| 867 | kde_x_includes=$ac_x_includes |
| 868 | fi |
| 869 | |
| 870 | # for --x-libraries too |
| 871 | if test "$kde_x_libraries" = NO; then |
| 872 | kde_x_libraries=$ac_x_libraries |
| 873 | fi |
| 874 | |
| 875 | if test "$kde_x_includes" = NO; then |
| 876 | AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!]) |
| 877 | fi |
| 878 | |
| 879 | if test "$kde_x_libraries" = NO; then |
| 880 | AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!]) |
| 881 | fi |
| 882 | |
| 883 | # Record where we found X for the cache. |
| 884 | kde_cv_have_x="have_x=yes \ |
| 885 | kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries" |
| 886 | ])dnl |
| 887 | |
| 888 | eval "$kde_cv_have_x" |
| 889 | |
| 890 | if test "$have_x" != yes; then |
| 891 | AC_MSG_RESULT($have_x) |
| 892 | no_x=yes |
| 893 | else |
| 894 | AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes]) |
| 895 | fi |
| 896 | |
| 897 | if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then |
| 898 | X_INCLUDES="" |
| 899 | x_includes="."; dnl better than nothing :- |
| 900 | else |
| 901 | x_includes=$kde_x_includes |
| 902 | X_INCLUDES="-I$x_includes" |
| 903 | fi |
| 904 | |
| 905 | if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then |
| 906 | X_LDFLAGS="" |
| 907 | x_libraries="/usr/lib"; dnl better than nothing :- |
| 908 | else |
| 909 | x_libraries=$kde_x_libraries |
| 910 | X_LDFLAGS="-L$x_libraries" |
| 911 | fi |
| 912 | all_includes="$X_INCLUDES" |
| 913 | all_libraries="$X_LDFLAGS" |
| 914 | |
| 915 | AC_SUBST(X_INCLUDES) |
| 916 | AC_SUBST(X_LDFLAGS) |
| 917 | AC_SUBST(x_libraries) |
| 918 | AC_SUBST(x_includes) |
| 919 | |
| 920 | # Check for libraries that X11R6 Xt/Xaw programs need. |
| 921 | ac_save_LDFLAGS="$LDFLAGS" |
| 922 | LDFLAGS="$LDFLAGS $X_LDFLAGS" |
| 923 | # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to |
| 924 | # check for ICE first), but we must link in the order -lSM -lICE or |
| 925 | # we get undefined symbols. So assume we have SM if we have ICE. |
| 926 | # These have to be linked with before -lX11, unlike the other |
| 927 | # libraries we check for below, so use a different variable. |
| 928 | # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. |
| 929 | AC_CHECK_LIB(ICE, IceConnectionNumber, |
| 930 | [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS) |
| 931 | AC_SUBST(LIBSM) |
| 932 | LDFLAGS="$ac_save_LDFLAGS" |
| 933 | |
| 934 | AC_SUBST(X_PRE_LIBS) |
| 935 | |
| 936 | LIB_X11='-lX11 $(LIBSOCKET)' |
| 937 | AC_SUBST(LIB_X11) |
| 938 | |
| 939 | AC_MSG_CHECKING(for libXext) |
| 940 | AC_CACHE_VAL(kde_cv_have_libXext, |
| 941 | [ |
| 942 | kde_ldflags_safe="$LDFLAGS" |
| 943 | kde_libs_safe="$LIBS" |
| 944 | |
| 945 | LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS" |
| 946 | LIBS="-lXext -lX11 $LIBSOCKET" |
| 947 | |
| 948 | AC_TRY_LINK([ |
| 949 | #include <stdio.h> |
| 950 | #ifdef STDC_HEADERS |
| 951 | # include <stdlib.h> |
| 952 | #endif |
| 953 | ], |
| 954 | [ |
| 955 | printf("hello Xext\n"); |
| 956 | ], |
| 957 | kde_cv_have_libXext=yes, |
| 958 | kde_cv_have_libXext=no |
| 959 | ) |
| 960 | |
| 961 | LDFLAGS=$kde_ldflags_safe |
| 962 | LIBS=$kde_libs_safe |
| 963 | ]) |
| 964 | |
| 965 | AC_MSG_RESULT($kde_cv_have_libXext) |
| 966 | |
| 967 | if test "$kde_cv_have_libXext" = "no"; then |
| 968 | AC_MSG_ERROR([We need a working libXext to proceed. Since configure |
| 969 | can't find it itself, we stop here assuming that make wouldn't find |
| 970 | them either.]) |
| 971 | fi |
| 972 | |
| 973 | AC_MSG_CHECKING(for Xinerama) |
| 974 | |
| 975 | AC_ARG_WITH(xinerama, |
| 976 | [ --with-xinerama enable support for Xinerama ], |
| 977 | [ |
| 978 | no_xinerama=no |
| 979 | ], [ |
| 980 | no_xinerama=yes |
| 981 | ] |
| 982 | ) |
| 983 | |
| 984 | kde_save_LDFLAGS="$LDFLAGS" |
| 985 | kde_save_CFLAGS="$CFLAGS" |
| 986 | kde_save_LIBS="$LIBS" |
| 987 | LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS" |
| 988 | CFLAGS="$CFLAGS -I$x_includes" |
| 989 | LIBS="-lXinerama -lXext" |
| 990 | |
| 991 | if test "x$no_xinerama" = "xno"; then |
| 992 | |
| 993 | AC_CACHE_VAL(ac_cv_have_xinerama, |
| 994 | [ |
| 995 | AC_TRY_LINK([#include <X11/Xlib.h> |
| 996 | #include <X11/extensions/Xinerama.h>], |
| 997 | [XineramaIsActive(NULL);], |
| 998 | [ac_cv_have_xinerama="yes"], |
| 999 | [ac_cv_have_xinerama="no"]) |
| 1000 | ]) |
| 1001 | else |
| 1002 | ac_cv_have_xinerama=no; |
| 1003 | fi |
| 1004 | |
| 1005 | AC_MSG_RESULT($ac_cv_have_xinerama) |
| 1006 | |
| 1007 | LIBXINERAMA="" |
| 1008 | |
| 1009 | if test "$ac_cv_have_xinerama" = "yes"; then |
| 1010 | AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support]) |
| 1011 | LIBXINERAMA="-lXinerama" |
| 1012 | fi |
| 1013 | |
| 1014 | AC_SUBST(LIBXINERAMA) |
| 1015 | |
| 1016 | LDFLAGS="$kde_save_LDFLAGS" |
| 1017 | CFLAGS="$kde_save_CFLAGS" |
| 1018 | LIBS="$kde_save_LIBS" |
| 1019 | |
| 1020 | LIB_XEXT="-lXext" |
| 1021 | QTE_NORTTI="" |
| 1022 | |
| 1023 | else |
| 1024 | dnl We're using QT Embedded |
| 1025 | CPPFLAGS=-DQWS |
| 1026 | CXXFLAGS="$CXXFLAGS -fno-rtti" |
| 1027 | QTE_NORTTI="-fno-rtti -DQWS" |
| 1028 | X_PRE_LIBS="" |
| 1029 | LIB_X11="" |
| 1030 | LIB_XEXT="" |
| 1031 | LIBSM="" |
| 1032 | X_INCLUDES="" |
| 1033 | X_LDFLAGS="" |
| 1034 | x_includes="" |
| 1035 | x_libraries="" |
| 1036 | AC_SUBST(X_PRE_LIBS) |
| 1037 | AC_SUBST(LIB_X11) |
| 1038 | AC_SUBST(LIBSM) |
| 1039 | AC_SUBST(X_INCLUDES) |
| 1040 | AC_SUBST(X_LDFLAGS) |
| 1041 | AC_SUBST(x_includes) |
| 1042 | AC_SUBST(x_libraries) |
| 1043 | fi |
| 1044 | AC_SUBST(QTE_NORTTI) |
| 1045 | AC_SUBST(LIB_XEXT) |
| 1046 | |
| 1047 | |
| 1048 | AC_LANG_RESTORE |
| 1049 | |
| 1050 | ]) |
| 1051 | |
| 1052 | AC_DEFUN(KDE_PRINT_QT_PROGRAM, |
| 1053 | [ |
| 1054 | AC_REQUIRE([KDE_USE_QT]) |
| 1055 | cat > conftest.$ac_ext <<EOF |
| 1056 | #include "confdefs.h" |
| 1057 | #include <qglobal.h> |
| 1058 | #include <qapplication.h> |
| 1059 | EOF |
| 1060 | if test "$kde_qtver" = "2"; then |
| 1061 | cat >> conftest.$ac_ext <<EOF |
| 1062 | #include <qevent.h> |
| 1063 | #include <qstring.h> |
| 1064 | #include <qstyle.h> |
| 1065 | EOF |
| 1066 | |
| 1067 | if test $kde_qtsubver -gt 0; then |
| 1068 | cat >> conftest.$ac_ext <<EOF |
| 1069 | #if QT_VERSION < 210 |
| 1070 | #error 1 |
| 1071 | #endif |
| 1072 | EOF |
| 1073 | fi |
| 1074 | fi |
| 1075 | |
| 1076 | if test "$kde_qtver" = "3"; then |
| 1077 | cat >> conftest.$ac_ext <<EOF |
| 1078 | #include <qcursor.h> |
| 1079 | #include <qstylefactory.h> |
| 1080 | #include <private/qucomextra_p.h> |
| 1081 | EOF |
| 1082 | fi |
| 1083 | |
| 1084 | echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext |
| 1085 | cat >> conftest.$ac_ext <<EOF |
| 1086 | #error 1 |
| 1087 | #endif |
| 1088 | |
| 1089 | int main() { |
| 1090 | EOF |
| 1091 | if test "$kde_qtver" = "2"; then |
| 1092 | cat >> conftest.$ac_ext <<EOF |
| 1093 | QStringList *t = new QStringList(); |
| 1094 | Q_UNUSED(t); |
| 1095 | EOF |
| 1096 | if test $kde_qtsubver -gt 0; then |
| 1097 | cat >> conftest.$ac_ext <<EOF |
| 1098 | QString s; |
| 1099 | s.setLatin1("Elvis is alive", 14); |
| 1100 | EOF |
| 1101 | fi |
| 1102 | fi |
| 1103 | if test "$kde_qtver" = "3"; then |
| 1104 | cat >> conftest.$ac_ext <<EOF |
| 1105 | (void)QStyleFactory::create(QString::null); |
| 1106 | QCursor c(Qt::WhatsThisCursor); |
| 1107 | EOF |
| 1108 | fi |
| 1109 | cat >> conftest.$ac_ext <<EOF |
| 1110 | return 0; |
| 1111 | } |
| 1112 | EOF |
| 1113 | ]) |
| 1114 | |
| 1115 | AC_DEFUN(KDE_USE_QT, |
| 1116 | [ |
| 1117 | if test -z "$1"; then |
| 1118 | # Current default Qt version: 3.1 |
| 1119 | kde_qtver=3 |
| 1120 | kde_qtsubver=1 |
| 1121 | else |
| 1122 | kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'` |
| 1123 | # following is the check if subversion isnt found in passed argument |
| 1124 | if test "$kde_qtsubver" = "$1"; then |
| 1125 | kde_qtsubver=1 |
| 1126 | fi |
| 1127 | kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'` |
| 1128 | if test "$kde_qtver" = "1"; then |
| 1129 | kde_qtsubver=42 |
| 1130 | fi |
| 1131 | fi |
| 1132 | |
| 1133 | if test -z "$2"; then |
| 1134 | if test "$kde_qtver" = "2"; then |
| 1135 | if test $kde_qtsubver -gt 0; then |
| 1136 | kde_qt_minversion=">= Qt 2.2.2" |
| 1137 | else |
| 1138 | kde_qt_minversion=">= Qt 2.0.2" |
| 1139 | fi |
| 1140 | fi |
| 1141 | if test "$kde_qtver" = "3"; then |
| 1142 | if test $kde_qtsubver -gt 0; then |
| 1143 | kde_qt_minversion=">= Qt 3.1 (20021021)" |
| 1144 | else |
| 1145 | kde_qt_minversion=">= Qt 3.0" |
| 1146 | fi |
| 1147 | fi |
| 1148 | if test "$kde_qtver" = "1"; then |
| 1149 | kde_qt_minversion=">= 1.42 and < 2.0" |
| 1150 | fi |
| 1151 | else |
| 1152 | kde_qt_minversion=$2 |
| 1153 | fi |
| 1154 | |
| 1155 | if test -z "$3"; then |
| 1156 | if test $kde_qtver = 3; then |
| 1157 | if test $kde_qtsubver -gt 0; then |
| 1158 | kde_qt_verstring="QT_VERSION >= 0x030100" |
| 1159 | else |
| 1160 | kde_qt_verstring="QT_VERSION >= 300" |
| 1161 | fi |
| 1162 | fi |
| 1163 | if test $kde_qtver = 2; then |
| 1164 | if test $kde_qtsubver -gt 0; then |
| 1165 | kde_qt_verstring="QT_VERSION >= 222" |
| 1166 | else |
| 1167 | kde_qt_verstring="QT_VERSION >= 200" |
| 1168 | fi |
| 1169 | fi |
| 1170 | if test $kde_qtver = 1; then |
| 1171 | kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" |
| 1172 | fi |
| 1173 | else |
| 1174 | kde_qt_verstring=$3 |
| 1175 | fi |
| 1176 | |
| 1177 | if test $kde_qtver = 3; then |
| 1178 | kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt" |
| 1179 | fi |
| 1180 | if test $kde_qtver = 2; then |
| 1181 | kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt" |
| 1182 | fi |
| 1183 | if test $kde_qtver = 1; then |
| 1184 | kde_qt_dirs="$QTDIR /usr/lib/qt" |
| 1185 | fi |
| 1186 | ]) |
| 1187 | |
| 1188 | AC_DEFUN(KDE_CHECK_QT_DIRECT, |
| 1189 | [ |
| 1190 | AC_REQUIRE([KDE_USE_QT]) |
| 1191 | AC_MSG_CHECKING([if Qt compiles without flags]) |
| 1192 | AC_CACHE_VAL(kde_cv_qt_direct, |
| 1193 | [ |
| 1194 | AC_LANG_SAVE |
| 1195 | AC_LANG_CPLUSPLUS |
| 1196 | ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH |
| 1197 | ac_LIBRARY_PATH="$LIBRARY_PATH" |
| 1198 | ac_cxxflags_safe="$CXXFLAGS" |
| 1199 | ac_ldflags_safe="$LDFLAGS" |
| 1200 | ac_libs_safe="$LIBS" |
| 1201 | |
| 1202 | CXXFLAGS="$CXXFLAGS -I$qt_includes" |
| 1203 | LDFLAGS="$LDFLAGS $X_LDFLAGS" |
| 1204 | if test "x$kde_use_qt_emb" != "xyes"; then |
| 1205 | LIBS="$LIBQT -lXext -lX11 $LIBSOCKET" |
| 1206 | else |
| 1207 | LIBS="$LIBQT $LIBSOCKET" |
| 1208 | fi |
| 1209 | LD_LIBRARY_PATH= |
| 1210 | export LD_LIBRARY_PATH |
| 1211 | LIBRARY_PATH= |
| 1212 | export LIBRARY_PATH |
| 1213 | |
| 1214 | KDE_PRINT_QT_PROGRAM |
| 1215 | |
| 1216 | if AC_TRY_EVAL(ac_link) && test -s conftest; then |
| 1217 | kde_cv_qt_direct="yes" |
| 1218 | else |
| 1219 | kde_cv_qt_direct="no" |
| 1220 | echo "configure: failed program was:" >&AC_FD_CC |
| 1221 | cat conftest.$ac_ext >&AC_FD_CC |
| 1222 | fi |
| 1223 | |
| 1224 | rm -f conftest* |
| 1225 | CXXFLAGS="$ac_cxxflags_safe" |
| 1226 | LDFLAGS="$ac_ldflags_safe" |
| 1227 | LIBS="$ac_libs_safe" |
| 1228 | |
| 1229 | LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe" |
| 1230 | export LD_LIBRARY_PATH |
| 1231 | LIBRARY_PATH="$ac_LIBRARY_PATH" |
| 1232 | export LIBRARY_PATH |
| 1233 | AC_LANG_RESTORE |
| 1234 | ]) |
| 1235 | |
| 1236 | if test "$kde_cv_qt_direct" = "yes"; then |
| 1237 | AC_MSG_RESULT(yes) |
| 1238 | $1 |
| 1239 | else |
| 1240 | AC_MSG_RESULT(no) |
| 1241 | $2 |
| 1242 | fi |
| 1243 | ]) |
| 1244 | |
| 1245 | dnl ------------------------------------------------------------------------ |
| 1246 | dnl Try to find the Qt headers and libraries. |
| 1247 | dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed) |
| 1248 | dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed) |
| 1249 | dnl ------------------------------------------------------------------------ |
| 1250 | dnl |
| 1251 | AC_DEFUN(AC_PATH_QT_1_3, |
| 1252 | [ |
| 1253 | AC_REQUIRE([K_PATH_X]) |
| 1254 | AC_REQUIRE([KDE_USE_QT]) |
| 1255 | AC_REQUIRE([KDE_CHECK_LIB64]) |
| 1256 | |
| 1257 | dnl ------------------------------------------------------------------------ |
| 1258 | dnl Add configure flag to enable linking to MT version of Qt library. |
| 1259 | dnl ------------------------------------------------------------------------ |
| 1260 | |
| 1261 | AC_ARG_ENABLE( |
| 1262 | mt, |
| 1263 | [ --disable-mt link to non-threaded Qt (deprecated)], |
| 1264 | kde_use_qt_mt=$enableval, |
| 1265 | [ |
| 1266 | if test $kde_qtver = 3; then |
| 1267 | kde_use_qt_mt=yes |
| 1268 | else |
| 1269 | kde_use_qt_mt=no |
| 1270 | fi |
| 1271 | ] |
| 1272 | ) |
| 1273 | |
| 1274 | USING_QT_MT="" |
| 1275 | |
| 1276 | dnl ------------------------------------------------------------------------ |
| 1277 | dnl If we not get --disable-qt-mt then adjust some vars for the host. |
| 1278 | dnl ------------------------------------------------------------------------ |
| 1279 | |
| 1280 | KDE_MT_LDFLAGS= |
| 1281 | KDE_MT_LIBS= |
| 1282 | if test "x$kde_use_qt_mt" = "xyes"; then |
| 1283 | KDE_CHECK_THREADING |
| 1284 | if test "x$kde_use_threading" = "xyes"; then |
| 1285 | CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS" |
| 1286 | KDE_MT_LDFLAGS="$USE_THREADS" |
| 1287 | KDE_MT_LIBS="$LIBPTHREAD" |
| 1288 | else |
| 1289 | kde_use_qt_mt=no |
| 1290 | fi |
| 1291 | fi |
| 1292 | AC_SUBST(KDE_MT_LDFLAGS) |
| 1293 | AC_SUBST(KDE_MT_LIBS) |
| 1294 | |
| 1295 | kde_qt_was_given=yes |
| 1296 | |
| 1297 | dnl ------------------------------------------------------------------------ |
| 1298 | dnl If we haven't been told how to link to Qt, we work it out for ourselves. |
| 1299 | dnl ------------------------------------------------------------------------ |
| 1300 | if test -z "$LIBQT_GLOB"; then |
| 1301 | if test "x$kde_use_qt_emb" = "xyes"; then |
| 1302 | LIBQT_GLOB="libqte.*" |
| 1303 | else |
| 1304 | LIBQT_GLOB="libqt.*" |
| 1305 | fi |
| 1306 | fi |
| 1307 | |
| 1308 | if test -z "$LIBQT"; then |
| 1309 | dnl ------------------------------------------------------------ |
| 1310 | dnl If we got --enable-embedded then adjust the Qt library name. |
| 1311 | dnl ------------------------------------------------------------ |
| 1312 | if test "x$kde_use_qt_emb" = "xyes"; then |
| 1313 | qtlib="qte" |
| 1314 | else |
| 1315 | qtlib="qt" |
| 1316 | fi |
| 1317 | |
| 1318 | kde_int_qt="-l$qtlib" |
| 1319 | else |
| 1320 | kde_int_qt="$LIBQT" |
| 1321 | kde_lib_qt_set=yes |
| 1322 | fi |
| 1323 | |
| 1324 | if test -z "$LIBQPE"; then |
| 1325 | dnl ------------------------------------------------------------ |
| 1326 | dnl If we got --enable-palmtop then add -lqpe to the link line |
| 1327 | dnl ------------------------------------------------------------ |
| 1328 | if test "x$kde_use_qt_emb" = "xyes"; then |
| 1329 | if test "x$kde_use_qt_emb_palm" = "xyes"; then |
| 1330 | LIB_QPE="-lqpe" |
| 1331 | else |
| 1332 | LIB_QPE="" |
| 1333 | fi |
| 1334 | else |
| 1335 | LIB_QPE="" |
| 1336 | fi |
| 1337 | fi |
| 1338 | |
| 1339 | dnl ------------------------------------------------------------------------ |
| 1340 | dnl If we got --enable-qt-mt then adjust the Qt library name for the host. |
| 1341 | dnl ------------------------------------------------------------------------ |
| 1342 | |
| 1343 | if test "x$kde_use_qt_mt" = "xyes"; then |
| 1344 | if test -z "$LIBQT"; then |
| 1345 | LIBQT="-l$qtlib-mt" |
| 1346 | kde_int_qt="-l$qtlib-mt" |
| 1347 | else |
| 1348 | LIBQT="$qtlib-mt" |
| 1349 | kde_int_qt="$qtlib-mt" |
| 1350 | fi |
| 1351 | LIBQT_GLOB="lib$qtlib-mt.*" |
| 1352 | USING_QT_MT="using -mt" |
| 1353 | else |
| 1354 | LIBQT="-l$qtlib" |
| 1355 | fi |
| 1356 | |
| 1357 | if test $kde_qtver != 1; then |
| 1358 | |
| 1359 | AC_REQUIRE([AC_FIND_PNG]) |
| 1360 | AC_REQUIRE([AC_FIND_JPEG]) |
| 1361 | LIBQT="$LIBQT $LIBPNG $LIBJPEG" |
| 1362 | fi |
| 1363 | |
| 1364 | if test $kde_qtver = 3; then |
| 1365 | AC_REQUIRE([KDE_CHECK_LIBDL]) |
| 1366 | LIBQT="$LIBQT $LIBDL" |
| 1367 | fi |
| 1368 | |
| 1369 | AC_MSG_CHECKING([for Qt]) |
| 1370 | |
| 1371 | if test "x$kde_use_qt_emb" != "xyes"; then |
| 1372 | LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET" |
| 1373 | fi |
| 1374 | ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO |
| 1375 | qt_libraries="" |
| 1376 | qt_includes="" |
| 1377 | AC_ARG_WITH(qt-dir, |
| 1378 | [ --with-qt-dir=DIR where the root of Qt is installed ], |
| 1379 | [ ac_qt_includes="$withval"/include |
| 1380 | ac_qt_libraries="$withval"/lib${kdelibsuff} |
| 1381 | ac_qt_bindir="$withval"/bin |
| 1382 | ]) |
| 1383 | |
| 1384 | AC_ARG_WITH(qt-includes, |
| 1385 | [ --with-qt-includes=DIR where the Qt includes are. ], |
| 1386 | [ |
| 1387 | ac_qt_includes="$withval" |
| 1388 | ]) |
| 1389 | |
| 1390 | kde_qt_libs_given=no |
| 1391 | |
| 1392 | AC_ARG_WITH(qt-libraries, |
| 1393 | [ --with-qt-libraries=DIR where the Qt library is installed.], |
| 1394 | [ ac_qt_libraries="$withval" |
| 1395 | kde_qt_libs_given=yes |
| 1396 | ]) |
| 1397 | |
| 1398 | AC_CACHE_VAL(ac_cv_have_qt, |
| 1399 | [#try to guess Qt locations |
| 1400 | |
| 1401 | qt_incdirs="" |
| 1402 | for dir in $kde_qt_dirs; do |
| 1403 | qt_incdirs="$qt_incdirs $dir/include $dir" |
| 1404 | done |
| 1405 | qt_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" |
| 1406 | if test ! "$ac_qt_includes" = "NO"; then |
| 1407 | qt_incdirs="$ac_qt_includes $qt_incdirs" |
| 1408 | fi |
| 1409 | |
| 1410 | if test "$kde_qtver" != "1"; then |
| 1411 | kde_qt_header=qstyle.h |
| 1412 | else |
| 1413 | kde_qt_header=qglobal.h |
| 1414 | fi |
| 1415 | |
| 1416 | AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) |
| 1417 | ac_qt_includes="$qt_incdir" |
| 1418 | |
| 1419 | qt_libdirs="" |
| 1420 | for dir in $kde_qt_dirs; do |
| 1421 | qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir" |
| 1422 | done |
| 1423 | qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries" |
| 1424 | if test ! "$ac_qt_libraries" = "NO"; then |
| 1425 | qt_libdir=$ac_qt_libraries |
| 1426 | else |
| 1427 | qt_libdirs="$ac_qt_libraries $qt_libdirs" |
| 1428 | # if the Qt was given, the chance is too big that libqt.* doesn't exist |
| 1429 | qt_libdir=NONE |
| 1430 | for dir in $qt_libdirs; do |
| 1431 | try="ls -1 $dir/${LIBQT_GLOB}" |
| 1432 | if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi |
| 1433 | done |
| 1434 | fi |
| 1435 | |
| 1436 | ac_qt_libraries="$qt_libdir" |
| 1437 | |
| 1438 | AC_LANG_SAVE |
| 1439 | AC_LANG_CPLUSPLUS |
| 1440 | |
| 1441 | ac_cxxflags_safe="$CXXFLAGS" |
| 1442 | ac_ldflags_safe="$LDFLAGS" |
| 1443 | ac_libs_safe="$LIBS" |
| 1444 | |
| 1445 | CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" |
| 1446 | LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS" |
| 1447 | LIBS="$LIBS $LIBQT $KDE_MT_LIBS" |
| 1448 | |
| 1449 | KDE_PRINT_QT_PROGRAM |
| 1450 | |
| 1451 | if AC_TRY_EVAL(ac_link) && test -s conftest; then |
| 1452 | rm -f conftest* |
| 1453 | else |
| 1454 | echo "configure: failed program was:" >&AC_FD_CC |
| 1455 | cat conftest.$ac_ext >&AC_FD_CC |
| 1456 | ac_qt_libraries="NO" |
| 1457 | fi |
| 1458 | rm -f conftest* |
| 1459 | CXXFLAGS="$ac_cxxflags_safe" |
| 1460 | LDFLAGS="$ac_ldflags_safe" |
| 1461 | LIBS="$ac_libs_safe" |
| 1462 | |
| 1463 | AC_LANG_RESTORE |
| 1464 | if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then |
| 1465 | ac_cv_have_qt="have_qt=no" |
| 1466 | ac_qt_notfound="" |
| 1467 | missing_qt_mt="" |
| 1468 | if test "$ac_qt_includes" = NO; then |
| 1469 | if test "$ac_qt_libraries" = NO; then |
| 1470 | ac_qt_notfound="(headers and libraries)"; |
| 1471 | else |
| 1472 | ac_qt_notfound="(headers)"; |
| 1473 | fi |
| 1474 | else |
| 1475 | if test "x$kde_use_qt_mt" = "xyes"; then |
| 1476 | missing_qt_mt=" |
| 1477 | Make sure that you have compiled Qt with thread support!" |
| 1478 | ac_qt_notfound="(library $qtlib-mt)"; |
| 1479 | else |
| 1480 | ac_qt_notfound="(library $qtlib)"; |
| 1481 | fi |
| 1482 | fi |
| 1483 | |
| 1484 | AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation! |
| 1485 | For more details about this problem, look at the end of config.log.$missing_qt_mt]) |
| 1486 | else |
| 1487 | have_qt="yes" |
| 1488 | fi |
| 1489 | ]) |
| 1490 | |
| 1491 | eval "$ac_cv_have_qt" |
| 1492 | |
| 1493 | if test "$have_qt" != yes; then |
| 1494 | AC_MSG_RESULT([$have_qt]); |
| 1495 | else |
| 1496 | ac_cv_have_qt="have_qt=yes \ |
| 1497 | ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries" |
| 1498 | AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT]) |
| 1499 | |
| 1500 | qt_libraries="$ac_qt_libraries" |
| 1501 | qt_includes="$ac_qt_includes" |
| 1502 | fi |
| 1503 | |
| 1504 | if test ! "$kde_qt_libs_given" = "yes"; then |
| 1505 | KDE_CHECK_QT_DIRECT(qt_libraries= ,[]) |
| 1506 | fi |
| 1507 | |
| 1508 | AC_SUBST(qt_libraries) |
| 1509 | AC_SUBST(qt_includes) |
| 1510 | |
| 1511 | if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then |
| 1512 | QT_INCLUDES="" |
| 1513 | else |
| 1514 | QT_INCLUDES="-I$qt_includes" |
| 1515 | all_includes="$QT_INCLUDES $all_includes" |
| 1516 | fi |
| 1517 | |
| 1518 | if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then |
| 1519 | QT_LDFLAGS="" |
| 1520 | else |
| 1521 | QT_LDFLAGS="-L$qt_libraries" |
| 1522 | all_libraries="$all_libraries $QT_LDFLAGS" |
| 1523 | fi |
| 1524 | test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS" |
| 1525 | |
| 1526 | AC_SUBST(QT_INCLUDES) |
| 1527 | AC_SUBST(QT_LDFLAGS) |
| 1528 | AC_PATH_QT_MOC_UIC |
| 1529 | |
| 1530 | KDE_CHECK_QT_JPEG |
| 1531 | |
| 1532 | if test "x$kde_use_qt_emb" != "xyes"; then |
| 1533 | LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG) -lXext $(LIB_X11) $(LIBSM)' |
| 1534 | else |
| 1535 | LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBPNG)' |
| 1536 | fi |
| 1537 | test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS" |
| 1538 | |
| 1539 | AC_SUBST(LIB_QT) |
| 1540 | AC_SUBST(LIB_QPE) |
| 1541 | |
| 1542 | AC_SUBST(kde_qtver) |
| 1543 | ]) |
| 1544 | |
| 1545 | AC_DEFUN(AC_PATH_QT, |
| 1546 | [ |
| 1547 | AC_PATH_QT_1_3 |
| 1548 | ]) |
| 1549 | |
| 1550 | AC_DEFUN(KDE_CHECK_UIC_PLUGINS, |
| 1551 | [ |
| 1552 | AC_REQUIRE([AC_PATH_QT_MOC_UIC]) |
| 1553 | |
| 1554 | if test x$ac_uic_supports_libpath = xyes; then |
| 1555 | |
| 1556 | AC_MSG_CHECKING([if UIC has KDE plugins available]) |
| 1557 | AC_CACHE_VAL(kde_cv_uic_plugins, |
| 1558 | [ |
| 1559 | cat > actest.ui << EOF |
| 1560 | <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> |
| 1561 | <class>NewConnectionDialog</class> |
| 1562 | <widget class="QDialog"> |
| 1563 | <widget class="KLineEdit"> |
| 1564 | <property name="name"> |
| 1565 | <cstring>testInput</cstring> |
| 1566 | </property> |
| 1567 | </widget> |
| 1568 | </widget> |
| 1569 | </UI> |
| 1570 | EOF |
| 1571 | |
| 1572 | |
| 1573 | |
| 1574 | kde_cv_uic_plugins=no |
| 1575 | kde_line="$UIC_PATH -L $kde_widgetdir" |
| 1576 | if test x$ac_uic_supports_nounload = xyes; then |
| 1577 | kde_line="$kde_line -nounload" |
| 1578 | fi |
| 1579 | kde_line="$kde_line -impl actest.h actest.ui > actest.cpp" |
| 1580 | if AC_TRY_EVAL(kde_line); then |
| 1581 | if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then |
| 1582 | kde_cv_uic_plugins=yes |
| 1583 | fi |
| 1584 | fi |
| 1585 | rm -f actest.ui actest.cpp |
| 1586 | ]) |
| 1587 | |
| 1588 | if test "$kde_cv_uic_plugins" = yes; then |
| 1589 | AC_MSG_RESULT([yes]) |
| 1590 | else |
| 1591 | AC_MSG_ERROR([not found - you need to install kdelibs first.]) |
| 1592 | fi |
| 1593 | fi |
| 1594 | ]) |
| 1595 | |
| 1596 | AC_DEFUN(KDE_CHECK_FINAL, |
| 1597 | [ |
| 1598 | AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (experimental - needs lots of memory)], |
| 1599 | kde_use_final=$enableval, kde_use_final=no) |
| 1600 | |
| 1601 | KDE_COMPILER_REPO |
| 1602 | if test "x$kde_use_final" = "xyes"; then |
| 1603 | KDE_USE_FINAL_TRUE="" |
| 1604 | KDE_USE_FINAL_FALSE="#" |
| 1605 | else |
| 1606 | KDE_USE_FINAL_TRUE="#" |
| 1607 | KDE_USE_FINAL_FALSE="" |
| 1608 | fi |
| 1609 | AC_SUBST(KDE_USE_FINAL_TRUE) |
| 1610 | AC_SUBST(KDE_USE_FINAL_FALSE) |
| 1611 | |
| 1612 | AC_ARG_ENABLE(closure, [ --disable-closure don't delay template instantiation], |
| 1613 | kde_use_closure=$enableval, kde_use_closure=yes) |
| 1614 | |
| 1615 | if test "x$kde_use_closure" = "xyes"; then |
| 1616 | KDE_USE_CLOSURE_TRUE="" |
| 1617 | KDE_USE_CLOSURE_FALSE="#" |
| 1618 | # CXXFLAGS="$CXXFLAGS $REPO" |
| 1619 | else |
| 1620 | KDE_USE_CLOSURE_TRUE="#" |
| 1621 | KDE_USE_CLOSURE_FALSE="" |
| 1622 | fi |
| 1623 | AC_SUBST(KDE_USE_CLOSURE_TRUE) |
| 1624 | AC_SUBST(KDE_USE_CLOSURE_FALSE) |
| 1625 | ]) |
| 1626 | |
| 1627 | dnl ------------------------------------------------------------------------ |
| 1628 | dnl Now, the same with KDE |
| 1629 | dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed) |
| 1630 | dnl and $(kde_includes) will be the kdehdrlocation (if needed) |
| 1631 | dnl ------------------------------------------------------------------------ |
| 1632 | dnl |
| 1633 | AC_DEFUN(AC_BASE_PATH_KDE, |
| 1634 | [ |
| 1635 | AC_PREREQ([2.13]) |
| 1636 | AC_REQUIRE([AC_PATH_QT])dnl |
| 1637 | AC_REQUIRE([KDE_CHECK_LIB64]) |
| 1638 | |
| 1639 | AC_CHECK_RPATH |
| 1640 | AC_MSG_CHECKING([for KDE]) |
| 1641 | |
| 1642 | if test "${prefix}" != NONE; then |
| 1643 | kde_includes=${prefix}/include |
| 1644 | ac_kde_includes=$prefix/include |
| 1645 | |
| 1646 | if test "${exec_prefix}" != NONE; then |
| 1647 | kde_libraries=${libdir} |
| 1648 | ac_kde_libraries=$libdir |
| 1649 | if test "$ac_kde_libraries" = '${exec_prefix}/lib'${kdelibsuff}; then |
| 1650 | ac_kde_libraries=$exec_prefix/lib${kdelibsuff} |
| 1651 | fi |
| 1652 | else |
| 1653 | kde_libraries=${prefix}/lib${kdelibsuff} |
| 1654 | ac_kde_libraries=$prefix/lib${kdelibsuff} |
| 1655 | fi |
| 1656 | else |
| 1657 | ac_kde_includes= |
| 1658 | ac_kde_libraries= |
| 1659 | kde_libraries="" |
| 1660 | kde_includes="" |
| 1661 | fi |
| 1662 | |
| 1663 | AC_CACHE_VAL(ac_cv_have_kde, |
| 1664 | [#try to guess kde locations |
| 1665 | |
| 1666 | if test "$kde_qtver" = 1; then |
| 1667 | kde_check_header="ksock.h" |
| 1668 | kde_check_lib="libkdecore.la" |
| 1669 | else |
| 1670 | kde_check_header="ksharedptr.h" |
| 1671 | kde_check_lib="libkio.la" |
| 1672 | fi |
| 1673 | |
| 1674 | if test -z "$1"; then |
| 1675 | |
| 1676 | kde_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" |
| 1677 | test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs" |
| 1678 | kde_incdirs="$ac_kde_includes $kde_incdirs" |
| 1679 | AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir) |
| 1680 | ac_kde_includes="$kde_incdir" |
| 1681 | |
| 1682 | if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then |
| 1683 | AC_MSG_ERROR([ |
| 1684 | in the prefix, you've chosen, are no KDE headers installed. This will fail. |
| 1685 | So, check this please and use another prefix!]) |
| 1686 | fi |
| 1687 | |
| 1688 | kde_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}" |
| 1689 | test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs" |
| 1690 | kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs" |
| 1691 | AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir) |
| 1692 | ac_kde_libraries="$kde_libdir" |
| 1693 | |
| 1694 | kde_widgetdir=NO |
| 1695 | dnl this might be somewhere else |
| 1696 | AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir) |
| 1697 | |
| 1698 | if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then |
| 1699 | AC_MSG_ERROR([ |
| 1700 | in the prefix, you've chosen, are no KDE libraries installed. This will fail. |
| 1701 | So, check this please and use another prefix!]) |
| 1702 | fi |
| 1703 | |
| 1704 | if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then |
| 1705 | AC_MSG_ERROR([ |
| 1706 | I can't find the designer plugins. These are required and should have been installed |
| 1707 | by kdelibs]) |
| 1708 | fi |
| 1709 | |
| 1710 | if test -n "$kde_widgetdir"; then |
| 1711 | kde_widgetdir="$kde_widgetdir/kde3/plugins/designer" |
| 1712 | fi |
| 1713 | |
| 1714 | |
| 1715 | if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then |
| 1716 | ac_cv_have_kde="have_kde=no" |
| 1717 | else |
| 1718 | ac_cv_have_kde="have_kde=yes \ |
| 1719 | ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries" |
| 1720 | fi |
| 1721 | |
| 1722 | else dnl test -z $1 |
| 1723 | |
| 1724 | ac_cv_have_kde="have_kde=no" |
| 1725 | |
| 1726 | fi |
| 1727 | ])dnl |
| 1728 | |
| 1729 | eval "$ac_cv_have_kde" |
| 1730 | |
| 1731 | if test "$have_kde" != "yes"; then |
| 1732 | if test "${prefix}" = NONE; then |
| 1733 | ac_kde_prefix="$ac_default_prefix" |
| 1734 | else |
| 1735 | ac_kde_prefix="$prefix" |
| 1736 | fi |
| 1737 | if test "$exec_prefix" = NONE; then |
| 1738 | ac_kde_exec_prefix="$ac_kde_prefix" |
| 1739 | AC_MSG_RESULT([will be installed in $ac_kde_prefix]) |
| 1740 | else |
| 1741 | ac_kde_exec_prefix="$exec_prefix" |
| 1742 | AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix]) |
| 1743 | fi |
| 1744 | |
| 1745 | kde_libraries="${libdir}" |
| 1746 | kde_includes=${ac_kde_prefix}/include |
| 1747 | |
| 1748 | else |
| 1749 | ac_cv_have_kde="have_kde=yes \ |
| 1750 | ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries" |
| 1751 | AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes]) |
| 1752 | |
| 1753 | kde_libraries="$ac_kde_libraries" |
| 1754 | kde_includes="$ac_kde_includes" |
| 1755 | fi |
| 1756 | AC_SUBST(kde_libraries) |
| 1757 | AC_SUBST(kde_includes) |
| 1758 | |
| 1759 | if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then |
| 1760 | KDE_INCLUDES="" |
| 1761 | else |
| 1762 | KDE_INCLUDES="-I$kde_includes" |
| 1763 | all_includes="$KDE_INCLUDES $all_includes" |
| 1764 | fi |
| 1765 | |
| 1766 | KDE_LDFLAGS="-L$kde_libraries" |
| 1767 | if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then |
| 1768 | all_libraries="$all_libraries $KDE_LDFLAGS" |
| 1769 | fi |
| 1770 | |
| 1771 | AC_SUBST(KDE_LDFLAGS) |
| 1772 | AC_SUBST(KDE_INCLUDES) |
| 1773 | |
| 1774 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 1775 | |
| 1776 | all_libraries="$all_libraries $USER_LDFLAGS" |
| 1777 | all_includes="$all_includes $USER_INCLUDES" |
| 1778 | AC_SUBST(all_includes) |
| 1779 | AC_SUBST(all_libraries) |
| 1780 | |
| 1781 | if test -z "$1"; then |
| 1782 | KDE_CHECK_UIC_PLUGINS |
| 1783 | fi |
| 1784 | |
| 1785 | ac_kde_libraries="$kde_libdir" |
| 1786 | |
| 1787 | AC_SUBST(AUTODIRS) |
| 1788 | |
| 1789 | |
| 1790 | ]) |
| 1791 | |
| 1792 | AC_DEFUN(KDE_CHECK_EXTRA_LIBS, |
| 1793 | [ |
| 1794 | AC_MSG_CHECKING(for extra includes) |
| 1795 | AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR |
| 1796 | adds non standard include paths], |
| 1797 | kde_use_extra_includes="$withval", |
| 1798 | kde_use_extra_includes=NONE |
| 1799 | ) |
| 1800 | kde_extra_includes= |
| 1801 | if test -n "$kde_use_extra_includes" && \ |
| 1802 | test "$kde_use_extra_includes" != "NONE"; then |
| 1803 | |
| 1804 | ac_save_ifs=$IFS |
| 1805 | IFS=':' |
| 1806 | for dir in $kde_use_extra_includes; do |
| 1807 | kde_extra_includes="$kde_extra_includes $dir" |
| 1808 | USER_INCLUDES="$USER_INCLUDES -I$dir" |
| 1809 | done |
| 1810 | IFS=$ac_save_ifs |
| 1811 | kde_use_extra_includes="added" |
| 1812 | else |
| 1813 | kde_use_extra_includes="no" |
| 1814 | fi |
| 1815 | AC_SUBST(USER_INCLUDES) |
| 1816 | |
| 1817 | AC_MSG_RESULT($kde_use_extra_includes) |
| 1818 | |
| 1819 | kde_extra_libs= |
| 1820 | AC_MSG_CHECKING(for extra libs) |
| 1821 | AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths], |
| 1822 | kde_use_extra_libs=$withval, |
| 1823 | kde_use_extra_libs=NONE |
| 1824 | ) |
| 1825 | if test -n "$kde_use_extra_libs" && \ |
| 1826 | test "$kde_use_extra_libs" != "NONE"; then |
| 1827 | |
| 1828 | ac_save_ifs=$IFS |
| 1829 | IFS=':' |
| 1830 | for dir in $kde_use_extra_libs; do |
| 1831 | kde_extra_libs="$kde_extra_libs $dir" |
| 1832 | KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir" |
| 1833 | USER_LDFLAGS="$USER_LDFLAGS -L$dir" |
| 1834 | done |
| 1835 | IFS=$ac_save_ifs |
| 1836 | kde_use_extra_libs="added" |
| 1837 | else |
| 1838 | kde_use_extra_libs="no" |
| 1839 | fi |
| 1840 | |
| 1841 | AC_SUBST(USER_LDFLAGS) |
| 1842 | |
| 1843 | AC_MSG_RESULT($kde_use_extra_libs) |
| 1844 | |
| 1845 | ]) |
| 1846 | |
| 1847 | AC_DEFUN(KDE_1_CHECK_PATH_HEADERS, |
| 1848 | [ |
| 1849 | AC_MSG_CHECKING([for KDE headers installed]) |
| 1850 | AC_LANG_SAVE |
| 1851 | AC_LANG_CPLUSPLUS |
| 1852 | cat > conftest.$ac_ext <<EOF |
| 1853 | #ifdef STDC_HEADERS |
| 1854 | # include <stdlib.h> |
| 1855 | #endif |
| 1856 | #include <stdio.h> |
| 1857 | #include "confdefs.h" |
| 1858 | #include <kapp.h> |
| 1859 | |
| 1860 | int main() { |
| 1861 | printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data()); |
| 1862 | printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data()); |
| 1863 | printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data()); |
| 1864 | printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data()); |
| 1865 | printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data()); |
| 1866 | printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data()); |
| 1867 | printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data()); |
| 1868 | printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data()); |
| 1869 | printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data()); |
| 1870 | printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data()); |
| 1871 | printf("kde_wallpaperdir=\\"%s\\"\n", |
| 1872 | KApplication::kde_wallpaperdir().data()); |
| 1873 | printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data()); |
| 1874 | printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data()); |
| 1875 | printf("kde_servicesdir=\\"/tmp/dummy\\"\n"); |
| 1876 | printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n"); |
| 1877 | printf("kde_moduledir=\\"/tmp/dummy\\"\n"); |
| 1878 | printf("kde_styledir=\\"/tmp/dummy\\"\n"); |
| 1879 | printf("kde_widgetdir=\\"/tmp/dummy\\"\n"); |
| 1880 | return 0; |
| 1881 | } |
| 1882 | EOF |
| 1883 | |
| 1884 | ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext' |
| 1885 | if AC_TRY_EVAL(ac_compile); then |
| 1886 | AC_MSG_RESULT(yes) |
| 1887 | else |
| 1888 | AC_MSG_ERROR([your system is not able to compile a small KDE application! |
| 1889 | Check, if you installed the KDE header files correctly. |
| 1890 | For more details about this problem, look at the end of config.log.]) |
| 1891 | fi |
| 1892 | |
| 1893 | AC_LANG_RESTORE |
| 1894 | ]) |
| 1895 | |
| 1896 | AC_DEFUN(KDE_CHECK_KDEQTADDON, |
| 1897 | [ |
| 1898 | AC_MSG_CHECKING(for kde-qt-addon) |
| 1899 | AC_CACHE_VAL(kde_cv_have_kdeqtaddon, |
| 1900 | [ |
| 1901 | kde_ldflags_safe="$LDFLAGS" |
| 1902 | kde_libs_safe="$LIBS" |
| 1903 | kde_cxxflags_safe="$CXXFLAGS" |
| 1904 | |
| 1905 | LIBS="-lkde-qt-addon $LIBQT $LIBS" |
| 1906 | CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes" |
| 1907 | LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS" |
| 1908 | |
| 1909 | AC_TRY_LINK([ |
| 1910 | #include <qdom.h> |
| 1911 | ], |
| 1912 | [ |
| 1913 | QDomDocument doc; |
| 1914 | ], |
| 1915 | kde_cv_have_kdeqtaddon=yes, |
| 1916 | kde_cv_have_kdeqtaddon=no |
| 1917 | ) |
| 1918 | |
| 1919 | LDFLAGS=$kde_ldflags_safe |
| 1920 | LIBS=$kde_libs_safe |
| 1921 | CXXFLAGS=$kde_cxxflags_safe |
| 1922 | ]) |
| 1923 | |
| 1924 | AC_MSG_RESULT($kde_cv_have_kdeqtaddon) |
| 1925 | |
| 1926 | if test "$kde_cv_have_kdeqtaddon" = "no"; then |
| 1927 | AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first. |
| 1928 | It is a separate package (and CVS module) named kde-qt-addon.]) |
| 1929 | fi |
| 1930 | ]) |
| 1931 | |
| 1932 | AC_DEFUN(KDE_CHECK_KIMGIO, |
| 1933 | [ |
| 1934 | AC_REQUIRE([AC_BASE_PATH_KDE]) |
| 1935 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 1936 | AC_REQUIRE([AC_FIND_TIFF]) |
| 1937 | AC_REQUIRE([AC_FIND_JPEG]) |
| 1938 | AC_REQUIRE([AC_FIND_PNG]) |
| 1939 | AC_REQUIRE([KDE_CREATE_LIBS_ALIASES]) |
| 1940 | |
| 1941 | if test "$1" = "existance"; then |
| 1942 | AC_LANG_SAVE |
| 1943 | AC_LANG_CPLUSPLUS |
| 1944 | kde_save_LIBS="$LIBS" |
| 1945 | LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm" |
| 1946 | AC_CHECK_LIB(kimgio, kimgioRegister, [ |
| 1947 | LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no) |
| 1948 | LIBS="$kde_save_LIBS" |
| 1949 | AC_LANG_RESTORE |
| 1950 | else |
| 1951 | LIBKIMGIO_EXISTS=yes |
| 1952 | fi |
| 1953 | |
| 1954 | if test "$LIBKIMGIO_EXISTS" = "yes"; then |
| 1955 | LIB_KIMGIO='-lkimgio' |
| 1956 | else |
| 1957 | LIB_KIMGIO='' |
| 1958 | fi |
| 1959 | AC_SUBST(LIB_KIMGIO) |
| 1960 | ]) |
| 1961 | |
| 1962 | AC_DEFUN(KDE_CREATE_LIBS_ALIASES, |
| 1963 | [ |
| 1964 | AC_REQUIRE([KDE_MISC_TESTS]) |
| 1965 | AC_REQUIRE([KDE_CHECK_LIBDL]) |
| 1966 | AC_REQUIRE([K_PATH_X]) |
| 1967 | |
| 1968 | if test $kde_qtver = 3; then |
| 1969 | AC_SUBST(LIB_KDECORE, "-lkdecore") |
| 1970 | AC_SUBST(LIB_KDEUI, "-lkdeui") |
| 1971 | AC_SUBST(LIB_KIO, "-lkio") |
| 1972 | AC_SUBST(LIB_SMB, "-lsmb") |
| 1973 | AC_SUBST(LIB_KAB, "-lkab") |
| 1974 | AC_SUBST(LIB_KABC, "-lkabc") |
| 1975 | AC_SUBST(LIB_KHTML, "-lkhtml") |
| 1976 | AC_SUBST(LIB_KSPELL, "-lkspell") |
| 1977 | AC_SUBST(LIB_KPARTS, "-lkparts") |
| 1978 | AC_SUBST(LIB_KDEPRINT, "-lkdeprint") |
| 1979 | # these are for backward compatibility |
| 1980 | AC_SUBST(LIB_KSYCOCA, "-lkio") |
| 1981 | AC_SUBST(LIB_KFILE, "-lkio") |
| 1982 | elif test $kde_qtver = 2; then |
| 1983 | AC_SUBST(LIB_KDECORE, "-lkdecore") |
| 1984 | AC_SUBST(LIB_KDEUI, "-lkdeui") |
| 1985 | AC_SUBST(LIB_KIO, "-lkio") |
| 1986 | AC_SUBST(LIB_KSYCOCA, "-lksycoca") |
| 1987 | AC_SUBST(LIB_SMB, "-lsmb") |
| 1988 | AC_SUBST(LIB_KFILE, "-lkfile") |
| 1989 | AC_SUBST(LIB_KAB, "-lkab") |
| 1990 | AC_SUBST(LIB_KHTML, "-lkhtml") |
| 1991 | AC_SUBST(LIB_KSPELL, "-lkspell") |
| 1992 | AC_SUBST(LIB_KPARTS, "-lkparts") |
| 1993 | AC_SUBST(LIB_KDEPRINT, "-lkdeprint") |
| 1994 | else |
| 1995 | AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)") |
| 1996 | AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)") |
| 1997 | AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)") |
| 1998 | AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)") |
| 1999 | AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)") |
| 2000 | fi |
| 2001 | ]) |
| 2002 | |
| 2003 | AC_DEFUN(AC_PATH_KDE, |
| 2004 | [ |
| 2005 | AC_BASE_PATH_KDE |
| 2006 | AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install], |
| 2007 | [ |
| 2008 | if test "$enableval" = "no"; |
| 2009 | then ac_use_path_checking="default" |
| 2010 | else ac_use_path_checking="" |
| 2011 | fi |
| 2012 | ], |
| 2013 | [ |
| 2014 | if test "$kde_qtver" = 1; |
| 2015 | then ac_use_path_checking="" |
| 2016 | else ac_use_path_checking="default" |
| 2017 | fi |
| 2018 | ] |
| 2019 | ) |
| 2020 | |
| 2021 | AC_CREATE_KFSSTND($ac_use_path_checking) |
| 2022 | |
| 2023 | AC_SUBST_KFSSTND |
| 2024 | KDE_CREATE_LIBS_ALIASES |
| 2025 | ]) |
| 2026 | |
| 2027 | dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found]) |
| 2028 | AC_DEFUN(KDE_CHECK_FUNC_EXT, |
| 2029 | [ |
| 2030 | AC_MSG_CHECKING(for $1) |
| 2031 | AC_CACHE_VAL(kde_cv_func_$1, |
| 2032 | [ |
| 2033 | AC_LANG_SAVE |
| 2034 | AC_LANG_CPLUSPLUS |
| 2035 | save_CXXFLAGS="$CXXFLAGS" |
| 2036 | kde_safe_LIBS="$LIBS" |
| 2037 | LIBS="$LIBS $X_EXTRA_LIBS" |
| 2038 | if test "$GXX" = "yes"; then |
| 2039 | CXXFLAGS="$CXXFLAGS -pedantic-errors" |
| 2040 | fi |
| 2041 | AC_TRY_COMPILE([ |
| 2042 | $2 |
| 2043 | ], |
| 2044 | [ |
| 2045 | $3 |
| 2046 | ], |
| 2047 | kde_cv_func_$1=yes, |
| 2048 | kde_cv_func_$1=no) |
| 2049 | CXXFLAGS="$save_CXXFLAGS" |
| 2050 | LIBS=$kde_safe_LIBS |
| 2051 | AC_LANG_RESTORE |
| 2052 | ]) |
| 2053 | |
| 2054 | AC_MSG_RESULT($kde_cv_func_$1) |
| 2055 | |
| 2056 | AC_MSG_CHECKING([if $1 needs custom prototype]) |
| 2057 | AC_CACHE_VAL(kde_cv_proto_$1, |
| 2058 | [ |
| 2059 | if test "x$kde_cv_func_$1" = xyes; then |
| 2060 | kde_cv_proto_$1=no |
| 2061 | else |
| 2062 | case "$1" in |
| 2063 | setenv|unsetenv|usleep|getdomainname|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat) |
| 2064 | kde_cv_proto_$1="yes - in libkdefakes" |
| 2065 | ;; |
| 2066 | *) |
| 2067 | kde_cv_proto_$1=unknown |
| 2068 | ;; |
| 2069 | esac |
| 2070 | fi |
| 2071 | |
| 2072 | if test "x$kde_cv_proto_$1" = xunknown; then |
| 2073 | |
| 2074 | AC_LANG_SAVE |
| 2075 | AC_LANG_CPLUSPLUS |
| 2076 | kde_safe_libs=$LIBS |
| 2077 | LIBS="$LIBS $X_EXTRA_LIBS" |
| 2078 | AC_TRY_LINK([ |
| 2079 | $2 |
| 2080 | |
| 2081 | extern "C" $4; |
| 2082 | ], |
| 2083 | [ |
| 2084 | $3 |
| 2085 | ], |
| 2086 | [ kde_cv_func_$1=yes |
| 2087 | kde_cv_proto_$1=yes ], |
| 2088 | [kde_cv_proto_$1="$1 unavailable"] |
| 2089 | ) |
| 2090 | LIBS=$kde_safe_libs |
| 2091 | AC_LANG_RESTORE |
| 2092 | fi |
| 2093 | ]) |
| 2094 | AC_MSG_RESULT($kde_cv_proto_$1) |
| 2095 | |
| 2096 | if test "x$kde_cv_func_$1" = xyes; then |
| 2097 | AC_DEFINE(HAVE_$5, 1, [Define if you have $1]) |
| 2098 | $6 |
| 2099 | fi |
| 2100 | if test "x$kde_cv_proto_$1" = xno; then |
| 2101 | AC_DEFINE(HAVE_$5_PROTO, 1, |
| 2102 | [Define if you have the $1 prototype]) |
| 2103 | fi |
| 2104 | |
| 2105 | AH_VERBATIM([_HAVE_$5_PROTO], |
| 2106 | [ |
| 2107 | #if !defined(HAVE_$5_PROTO) |
| 2108 | #ifdef __cplusplus |
| 2109 | extern "C" |
| 2110 | #endif |
| 2111 | $4; |
| 2112 | #endif |
| 2113 | ]) |
| 2114 | ]) |
| 2115 | |
| 2116 | AC_DEFUN(AC_CHECK_SETENV, |
| 2117 | [ |
| 2118 | KDE_CHECK_FUNC_EXT(setenv, [ |
| 2119 | #include <stdlib.h> |
| 2120 | ], |
| 2121 | [setenv("VAR", "VALUE", 1);], |
| 2122 | [int setenv (const char *, const char *, int)], |
| 2123 | [SETENV]) |
| 2124 | ]) |
| 2125 | |
| 2126 | AC_DEFUN(AC_CHECK_UNSETENV, |
| 2127 | [ |
| 2128 | KDE_CHECK_FUNC_EXT(unsetenv, [ |
| 2129 | #include <stdlib.h> |
| 2130 | ], |
| 2131 | [unsetenv("VAR");], |
| 2132 | [void unsetenv (const char *)], |
| 2133 | [UNSETENV]) |
| 2134 | ]) |
| 2135 | |
| 2136 | AC_DEFUN(AC_CHECK_GETDOMAINNAME, |
| 2137 | [ |
| 2138 | KDE_CHECK_FUNC_EXT(getdomainname, [ |
| 2139 | #include <stdlib.h> |
| 2140 | #include <unistd.h> |
| 2141 | ], |
| 2142 | [ |
| 2143 | char buffer[200]; |
| 2144 | getdomainname(buffer, 200); |
| 2145 | ], |
| 2146 | [int getdomainname (char *, unsigned int)], |
| 2147 | [GETDOMAINNAME]) |
| 2148 | ]) |
| 2149 | |
| 2150 | AC_DEFUN(AC_CHECK_GETHOSTNAME, |
| 2151 | [ |
| 2152 | KDE_CHECK_FUNC_EXT(gethostname, [ |
| 2153 | #include <stdlib.h> |
| 2154 | #include <unistd.h> |
| 2155 | ], |
| 2156 | [ |
| 2157 | char buffer[200]; |
| 2158 | gethostname(buffer, 200); |
| 2159 | ], |
| 2160 | [int gethostname (char *, unsigned int)], |
| 2161 | [GETHOSTNAME]) |
| 2162 | ]) |
| 2163 | |
| 2164 | AC_DEFUN(AC_CHECK_USLEEP, |
| 2165 | [ |
| 2166 | KDE_CHECK_FUNC_EXT(usleep, [ |
| 2167 | #include <unistd.h> |
| 2168 | ], |
| 2169 | [ |
| 2170 | usleep(200); |
| 2171 | ], |
| 2172 | [int usleep (unsigned int)], |
| 2173 | [USLEEP]) |
| 2174 | ]) |
| 2175 | |
| 2176 | |
| 2177 | AC_DEFUN(AC_CHECK_RANDOM, |
| 2178 | [ |
| 2179 | KDE_CHECK_FUNC_EXT(random, [ |
| 2180 | #include <stdlib.h> |
| 2181 | ], |
| 2182 | [ |
| 2183 | random(); |
| 2184 | ], |
| 2185 | [long int random(void)], |
| 2186 | [RANDOM]) |
| 2187 | |
| 2188 | KDE_CHECK_FUNC_EXT(srandom, [ |
| 2189 | #include <stdlib.h> |
| 2190 | ], |
| 2191 | [ |
| 2192 | srandom(27); |
| 2193 | ], |
| 2194 | [void srandom(unsigned int)], |
| 2195 | [SRANDOM]) |
| 2196 | |
| 2197 | ]) |
| 2198 | |
| 2199 | AC_DEFUN(AC_CHECK_INITGROUPS, |
| 2200 | [ |
| 2201 | KDE_CHECK_FUNC_EXT(initgroups, [ |
| 2202 | #include <sys/types.h> |
| 2203 | #include <unistd.h> |
| 2204 | #include <grp.h> |
| 2205 | ], |
| 2206 | [ |
| 2207 | char buffer[200]; |
| 2208 | initgroups(buffer, 27); |
| 2209 | ], |
| 2210 | [int initgroups(const char *, gid_t)], |
| 2211 | [INITGROUPS]) |
| 2212 | ]) |
| 2213 | |
| 2214 | AC_DEFUN(AC_CHECK_MKSTEMP, |
| 2215 | [ |
| 2216 | KDE_CHECK_FUNC_EXT(mkstemp, [ |
| 2217 | #include <stdlib.h> |
| 2218 | ], |
| 2219 | [ |
| 2220 | mkstemp("/tmp/aaaXXXXXX"); |
| 2221 | ], |
| 2222 | [int mkstemp(char *)], |
| 2223 | [MKSTEMP]) |
| 2224 | ]) |
| 2225 | |
| 2226 | AC_DEFUN(AC_CHECK_MKSTEMPS, |
| 2227 | [ |
| 2228 | KDE_CHECK_FUNC_EXT(mkstemps, [ |
| 2229 | #include <stdlib.h> |
| 2230 | #include <unistd.h> |
| 2231 | ], |
| 2232 | [ |
| 2233 | mkstemps("/tmp/aaaXXXXXX", 6); |
| 2234 | ], |
| 2235 | [int mkstemps(char *, int)], |
| 2236 | [MKSTEMPS]) |
| 2237 | ]) |
| 2238 | |
| 2239 | AC_DEFUN(AC_CHECK_RES_INIT, |
| 2240 | [ |
| 2241 | AC_MSG_CHECKING([if res_init needs -lresolv]) |
| 2242 | kde_libs_safe="$LIBS" |
| 2243 | LIBS="$LIBS $X_EXTRA_LIBS -lresolv" |
| 2244 | AC_TRY_LINK( |
| 2245 | [ |
| 2246 | #include <sys/types.h> |
| 2247 | #include <netinet/in.h> |
| 2248 | #include <arpa/nameser.h> |
| 2249 | #include <resolv.h> |
| 2250 | ], |
| 2251 | [ |
| 2252 | res_init(); |
| 2253 | ], |
| 2254 | [ |
| 2255 | LIBRESOLV="-lresolv" |
| 2256 | AC_MSG_RESULT(yes) |
| 2257 | AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function]) |
| 2258 | ], |
| 2259 | [ AC_MSG_RESULT(no) ] |
| 2260 | ) |
| 2261 | LIBS=$kde_libs_safe |
| 2262 | AC_SUBST(LIBRESOLV) |
| 2263 | |
| 2264 | AC_MSG_CHECKING([if res_init is available]) |
| 2265 | AC_TRY_COMPILE( |
| 2266 | [ |
| 2267 | #include <sys/types.h> |
| 2268 | #include <netinet/in.h> |
| 2269 | #include <arpa/nameser.h> |
| 2270 | #include <resolv.h> |
| 2271 | ], |
| 2272 | [ |
| 2273 | res_init(); |
| 2274 | ], |
| 2275 | [ |
| 2276 | AC_MSG_RESULT(yes) |
| 2277 | AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function]) |
| 2278 | ], |
| 2279 | [ AC_MSG_RESULT(no) ] |
| 2280 | ) |
| 2281 | ]) |
| 2282 | |
| 2283 | AC_DEFUN(AC_CHECK_STRLCPY, |
| 2284 | [ |
| 2285 | KDE_CHECK_FUNC_EXT(strlcpy, [ |
| 2286 | #include <string.h> |
| 2287 | ], |
| 2288 | [ char buf[20]; |
| 2289 | strlcpy(buf, "KDE function test", sizeof(buf)); |
| 2290 | ], |
| 2291 | [unsigned long strlcpy(char*, const char*, unsigned long)], |
| 2292 | [STRLCPY]) |
| 2293 | ]) |
| 2294 | |
| 2295 | AC_DEFUN(AC_CHECK_STRLCAT, |
| 2296 | [ |
| 2297 | KDE_CHECK_FUNC_EXT(strlcat, [ |
| 2298 | #include <string.h> |
| 2299 | ], |
| 2300 | [ char buf[20]; |
| 2301 | buf[0]='\0'; |
| 2302 | strlcat(buf, "KDE function test", sizeof(buf)); |
| 2303 | ], |
| 2304 | [unsigned long strlcat(char*, const char*, unsigned long)], |
| 2305 | [STRLCAT]) |
| 2306 | ]) |
| 2307 | |
| 2308 | AC_DEFUN(AC_FIND_GIF, |
| 2309 | [AC_MSG_CHECKING([for giflib]) |
| 2310 | AC_CACHE_VAL(ac_cv_lib_gif, |
| 2311 | [ac_save_LIBS="$LIBS" |
| 2312 | if test "x$kde_use_qt_emb" != "xyes"; then |
| 2313 | LIBS="$all_libraries -lgif -lX11 $LIBSOCKET" |
| 2314 | else |
| 2315 | LIBS="$all_libraries -lgif" |
| 2316 | fi |
| 2317 | AC_TRY_LINK(dnl |
| 2318 | [ |
| 2319 | #ifdef __cplusplus |
| 2320 | extern "C" { |
| 2321 | #endif |
| 2322 | int GifLastError(void); |
| 2323 | #ifdef __cplusplus |
| 2324 | } |
| 2325 | #endif |
| 2326 | /* We use char because int might match the return type of a gcc2 |
| 2327 | builtin and then its argument prototype would still apply. */ |
| 2328 | ], |
| 2329 | [return GifLastError();], |
| 2330 | eval "ac_cv_lib_gif=yes", |
| 2331 | eval "ac_cv_lib_gif=no") |
| 2332 | LIBS="$ac_save_LIBS" |
| 2333 | ])dnl |
| 2334 | if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then |
| 2335 | AC_MSG_RESULT(yes) |
| 2336 | AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif]) |
| 2337 | else |
| 2338 | AC_MSG_ERROR(You need giflib30. Please install the kdesupport package) |
| 2339 | fi |
| 2340 | ]) |
| 2341 | |
| 2342 | AC_DEFUN(KDE_FIND_JPEG_HELPER, |
| 2343 | [ |
| 2344 | AC_MSG_CHECKING([for libjpeg$2]) |
| 2345 | AC_CACHE_VAL(ac_cv_lib_jpeg_$1, |
| 2346 | [ |
| 2347 | AC_LANG_C |
| 2348 | ac_save_LIBS="$LIBS" |
| 2349 | LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm" |
| 2350 | ac_save_CFLAGS="$CFLAGS" |
| 2351 | CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" |
| 2352 | AC_TRY_LINK( |
| 2353 | [/* Override any gcc2 internal prototype to avoid an error. */ |
| 2354 | struct jpeg_decompress_struct; |
| 2355 | typedef struct jpeg_decompress_struct * j_decompress_ptr; |
| 2356 | typedef int size_t; |
| 2357 | #ifdef __cplusplus |
| 2358 | extern "C" { |
| 2359 | #endif |
| 2360 | void jpeg_CreateDecompress(j_decompress_ptr cinfo, |
| 2361 | int version, size_t structsize); |
| 2362 | #ifdef __cplusplus |
| 2363 | } |
| 2364 | #endif |
| 2365 | /* We use char because int might match the return type of a gcc2 |
| 2366 | builtin and then its argument prototype would still apply. */ |
| 2367 | ], |
| 2368 | [jpeg_CreateDecompress(0L, 0, 0);], |
| 2369 | eval "ac_cv_lib_jpeg_$1=-ljpeg$2", |
| 2370 | eval "ac_cv_lib_jpeg_$1=no") |
| 2371 | LIBS="$ac_save_LIBS" |
| 2372 | CFLAGS="$ac_save_CFLAGS" |
| 2373 | ]) |
| 2374 | |
| 2375 | if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then |
| 2376 | LIBJPEG="$ac_cv_lib_jpeg_$1" |
| 2377 | AC_MSG_RESULT($ac_cv_lib_jpeg_$1) |
| 2378 | else |
| 2379 | AC_MSG_RESULT(no) |
| 2380 | $3 |
| 2381 | fi |
| 2382 | |
| 2383 | ]) |
| 2384 | |
| 2385 | AC_DEFUN(AC_FIND_JPEG, |
| 2386 | [ |
| 2387 | dnl first look for libraries |
| 2388 | KDE_FIND_JPEG_HELPER(6b, 6b, |
| 2389 | KDE_FIND_JPEG_HELPER(normal, [], |
| 2390 | [ |
| 2391 | LIBJPEG= |
| 2392 | ] |
| 2393 | ) |
| 2394 | ) |
| 2395 | |
| 2396 | dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h |
| 2397 | dnl requires system dependent includes loaded before it) |
| 2398 | jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes" |
| 2399 | AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir) |
| 2400 | test "x$jpeg_incdir" = xNO && jpeg_incdir= |
| 2401 | |
| 2402 | dnl if headers _and_ libraries are missing, this is no error, and we |
| 2403 | dnl continue with a warning (the user will get no jpeg support in khtml) |
| 2404 | dnl if only one is missing, it means a configuration error, but we still |
| 2405 | dnl only warn |
| 2406 | if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then |
| 2407 | AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg]) |
| 2408 | else |
| 2409 | if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then |
| 2410 | AC_MSG_WARN([ |
| 2411 | There is an installation error in jpeg support. You seem to have only one |
| 2412 | of either the headers _or_ the libraries installed. You may need to either |
| 2413 | provide correct --with-extra-... options, or the development package of |
| 2414 | libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/ |
| 2415 | Disabling JPEG support. |
| 2416 | ]) |
| 2417 | else |
| 2418 | AC_MSG_WARN([libjpeg not found. disable JPEG support.]) |
| 2419 | fi |
| 2420 | jpeg_incdir= |
| 2421 | LIBJPEG= |
| 2422 | fi |
| 2423 | |
| 2424 | AC_SUBST(LIBJPEG) |
| 2425 | AH_VERBATIM(_AC_CHECK_JPEG, |
| 2426 | [/* |
| 2427 | * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system |
| 2428 | * headers and I'm too lazy to write a configure test as long as only |
| 2429 | * unixware is related |
| 2430 | */ |
| 2431 | #ifdef _UNIXWARE |
| 2432 | #define HAVE_BOOLEAN |
| 2433 | #endif |
| 2434 | ]) |
| 2435 | ]) |
| 2436 | |
| 2437 | AC_DEFUN(KDE_CHECK_QT_JPEG, |
| 2438 | [ |
| 2439 | AC_MSG_CHECKING([if Qt needs $LIBJPEG]) |
| 2440 | AC_CACHE_VAL(kde_cv_qt_jpeg, |
| 2441 | [ |
| 2442 | AC_LANG_SAVE |
| 2443 | AC_LANG_CPLUSPLUS |
| 2444 | ac_save_LIBS="$LIBS" |
| 2445 | LIBS="$all_libraries $USER_LDFLAGS $LIBQT" |
| 2446 | LIBS=`echo $LIBS | sed "s/$LIBJPEG//"` |
| 2447 | ac_save_CXXFLAGS="$CXXFLAGS" |
| 2448 | CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" |
| 2449 | AC_TRY_LINK( |
| 2450 | [#include <qapplication.h>], |
| 2451 | [ |
| 2452 | int argc; |
| 2453 | char** argv; |
| 2454 | QApplication app(argc, argv);], |
| 2455 | eval "kde_cv_qt_jpeg=no", |
| 2456 | eval "kde_cv_qt_jpeg=yes") |
| 2457 | LIBS="$ac_save_LIBS" |
| 2458 | CXXFLAGS="$ac_save_CXXFLAGS" |
| 2459 | AC_LANG_RESTORE |
| 2460 | ]) |
| 2461 | |
| 2462 | if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then |
| 2463 | AC_MSG_RESULT(yes) |
| 2464 | LIBJPEG_QT='$(LIBJPEG)' |
| 2465 | else |
| 2466 | AC_MSG_RESULT(no) |
| 2467 | LIBJPEG_QT= |
| 2468 | fi |
| 2469 | |
| 2470 | ]) |
| 2471 | |
| 2472 | AC_DEFUN(AC_FIND_ZLIB, |
| 2473 | [ |
| 2474 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 2475 | AC_MSG_CHECKING([for libz]) |
| 2476 | AC_CACHE_VAL(ac_cv_lib_z, |
| 2477 | [ |
| 2478 | AC_LANG_C |
| 2479 | kde_save_LIBS="$LIBS" |
| 2480 | LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET" |
| 2481 | kde_save_CFLAGS="$CFLAGS" |
| 2482 | CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" |
| 2483 | AC_TRY_LINK(dnl |
| 2484 | [ |
| 2485 | #include<zlib.h> |
| 2486 | ], |
| 2487 | [return (zlibVersion() == ZLIB_VERSION); ], |
| 2488 | eval "ac_cv_lib_z='-lz'", |
| 2489 | eval "ac_cv_lib_z=no") |
| 2490 | LIBS="$kde_save_LIBS" |
| 2491 | CFLAGS="$kde_save_CFLAGS" |
| 2492 | ])dnl |
| 2493 | if test ! "$ac_cv_lib_z" = no; then |
| 2494 | AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz]) |
| 2495 | LIBZ="$ac_cv_lib_z" |
| 2496 | AC_SUBST(LIBZ) |
| 2497 | AC_MSG_RESULT($ac_cv_lib_z) |
| 2498 | else |
| 2499 | AC_MSG_ERROR(not found. Check your installation and look into config.log) |
| 2500 | LIBZ="" |
| 2501 | AC_SUBST(LIBZ) |
| 2502 | fi |
| 2503 | ]) |
| 2504 | |
| 2505 | AC_DEFUN(KDE_TRY_TIFFLIB, |
| 2506 | [ |
| 2507 | AC_MSG_CHECKING([for libtiff $1]) |
| 2508 | |
| 2509 | AC_CACHE_VAL(kde_cv_libtiff_$1, |
| 2510 | [ |
| 2511 | AC_LANG_SAVE |
| 2512 | AC_LANG_CPLUSPLUS |
| 2513 | kde_save_LIBS="$LIBS" |
| 2514 | if test "x$kde_use_qt_emb" != "xyes"; then |
| 2515 | LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm" |
| 2516 | else |
| 2517 | LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm" |
| 2518 | fi |
| 2519 | kde_save_CXXFLAGS="$CXXFLAGS" |
| 2520 | CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" |
| 2521 | |
| 2522 | AC_TRY_LINK(dnl |
| 2523 | [ |
| 2524 | #include<tiffio.h> |
| 2525 | ], |
| 2526 | [return (TIFFOpen( "", "r") == 0); ], |
| 2527 | [ |
| 2528 | kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ" |
| 2529 | ], [ |
| 2530 | kde_cv_libtiff_$1=no |
| 2531 | ]) |
| 2532 | |
| 2533 | LIBS="$kde_save_LIBS" |
| 2534 | CXXFLAGS="$kde_save_CXXFLAGS" |
| 2535 | AC_LANG_RESTORE |
| 2536 | ]) |
| 2537 | |
| 2538 | if test "$kde_cv_libtiff_$1" = "no"; then |
| 2539 | AC_MSG_RESULT(no) |
| 2540 | LIBTIFF="" |
| 2541 | $3 |
| 2542 | else |
| 2543 | LIBTIFF="$kde_cv_libtiff_$1" |
| 2544 | AC_MSG_RESULT(yes) |
| 2545 | AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff]) |
| 2546 | $2 |
| 2547 | fi |
| 2548 | |
| 2549 | ]) |
| 2550 | |
| 2551 | AC_DEFUN(AC_FIND_TIFF, |
| 2552 | [ |
| 2553 | AC_REQUIRE([K_PATH_X]) |
| 2554 | AC_REQUIRE([AC_FIND_ZLIB]) |
| 2555 | AC_REQUIRE([AC_FIND_JPEG]) |
| 2556 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 2557 | |
| 2558 | KDE_TRY_TIFFLIB(tiff, [], |
| 2559 | KDE_TRY_TIFFLIB(tiff34)) |
| 2560 | |
| 2561 | AC_SUBST(LIBTIFF) |
| 2562 | ]) |
| 2563 | |
| 2564 | |
| 2565 | AC_DEFUN(AC_FIND_PNG, |
| 2566 | [ |
| 2567 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 2568 | AC_REQUIRE([AC_FIND_ZLIB]) |
| 2569 | AC_MSG_CHECKING([for libpng]) |
| 2570 | AC_CACHE_VAL(ac_cv_lib_png, |
| 2571 | [ |
| 2572 | kde_save_LIBS="$LIBS" |
| 2573 | if test "x$kde_use_qt_emb" != "xyes"; then |
| 2574 | LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET" |
| 2575 | else |
| 2576 | LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm" |
| 2577 | fi |
| 2578 | kde_save_CFLAGS="$CFLAGS" |
| 2579 | CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" |
| 2580 | AC_LANG_C |
| 2581 | AC_TRY_LINK(dnl |
| 2582 | [ |
| 2583 | #include<png.h> |
| 2584 | ], |
| 2585 | [ |
| 2586 | png_structp png_ptr = png_create_read_struct( /* image ptr */ |
| 2587 | PNG_LIBPNG_VER_STRING, 0, 0, 0 ); |
| 2588 | return( png_ptr != 0 ); |
| 2589 | ], |
| 2590 | eval "ac_cv_lib_png='-lpng $LIBZ -lm'", |
| 2591 | eval "ac_cv_lib_png=no" |
| 2592 | ) |
| 2593 | LIBS="$kde_save_LIBS" |
| 2594 | CFLAGS="$kde_save_CFLAGS" |
| 2595 | ])dnl |
| 2596 | if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then |
| 2597 | AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng]) |
| 2598 | LIBPNG="$ac_cv_lib_png" |
| 2599 | AC_SUBST(LIBPNG) |
| 2600 | AC_MSG_RESULT($ac_cv_lib_png) |
| 2601 | else |
| 2602 | AC_MSG_RESULT(no) |
| 2603 | LIBPNG="" |
| 2604 | AC_SUBST(LIBPNG) |
| 2605 | fi |
| 2606 | ]) |
| 2607 | |
| 2608 | AC_DEFUN(AC_CHECK_BOOL, |
| 2609 | [ |
| 2610 | AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool]) |
| 2611 | ]) |
| 2612 | |
| 2613 | AC_DEFUN(AC_CHECK_GNU_EXTENSIONS, |
| 2614 | [ |
| 2615 | AC_MSG_CHECKING(if you need GNU extensions) |
| 2616 | AC_CACHE_VAL(ac_cv_gnu_extensions, |
| 2617 | [ |
| 2618 | cat > conftest.c << EOF |
| 2619 | #include <features.h> |
| 2620 | |
| 2621 | #ifdef __GNU_LIBRARY__ |
| 2622 | yes |
| 2623 | #endif |
| 2624 | EOF |
| 2625 | |
| 2626 | if (eval "$ac_cpp conftest.c") 2>&5 | |
| 2627 | egrep "yes" >/dev/null 2>&1; then |
| 2628 | rm -rf conftest* |
| 2629 | ac_cv_gnu_extensions=yes |
| 2630 | else |
| 2631 | ac_cv_gnu_extensions=no |
| 2632 | fi |
| 2633 | ]) |
| 2634 | |
| 2635 | AC_MSG_RESULT($ac_cv_gnu_extensions) |
| 2636 | if test "$ac_cv_gnu_extensions" = "yes"; then |
| 2637 | AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions]) |
| 2638 | fi |
| 2639 | ]) |
| 2640 | |
| 2641 | AC_DEFUN(KDE_CHECK_COMPILER_FLAG, |
| 2642 | [ |
| 2643 | AC_MSG_CHECKING(whether $CXX supports -$1) |
| 2644 | kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'` |
| 2645 | AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache, |
| 2646 | [ |
| 2647 | AC_LANG_SAVE |
| 2648 | AC_LANG_CPLUSPLUS |
| 2649 | save_CXXFLAGS="$CXXFLAGS" |
| 2650 | CXXFLAGS="$CXXFLAGS -$1" |
| 2651 | AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], []) |
| 2652 | CXXFLAGS="$save_CXXFLAGS" |
| 2653 | AC_LANG_RESTORE |
| 2654 | ]) |
| 2655 | if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then |
| 2656 | AC_MSG_RESULT(yes) |
| 2657 | : |
| 2658 | $2 |
| 2659 | else |
| 2660 | AC_MSG_RESULT(no) |
| 2661 | : |
| 2662 | $3 |
| 2663 | fi |
| 2664 | ]) |
| 2665 | |
| 2666 | dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables |
| 2667 | dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever]) |
| 2668 | dnl it's all white-space separated |
| 2669 | AC_DEFUN(AC_REMOVE_FORBIDDEN, |
| 2670 | [ __val=$$1 |
| 2671 | __forbid=" $2 " |
| 2672 | if test -n "$__val"; then |
| 2673 | __new="" |
| 2674 | ac_save_IFS=$IFS |
| 2675 | IFS=" " |
| 2676 | for i in $__val; do |
| 2677 | case "$__forbid" in |
| 2678 | *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;; |
| 2679 | *) # Careful to not add spaces, where there were none, because otherwise |
| 2680 | # libtool gets confused, if we change e.g. CXX |
| 2681 | if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;; |
| 2682 | esac |
| 2683 | done |
| 2684 | IFS=$ac_save_IFS |
| 2685 | $1=$__new |
| 2686 | fi |
| 2687 | ]) |
| 2688 | |
| 2689 | dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given |
| 2690 | AC_DEFUN(AC_VALIDIFY_CXXFLAGS, |
| 2691 | [dnl |
| 2692 | if test "x$kde_use_qt_emb" != "xyes"; then |
| 2693 | AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath]) |
| 2694 | AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath]) |
| 2695 | else |
| 2696 | AC_REMOVE_FORBIDDEN(CXX, [-rpath]) |
| 2697 | AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath]) |
| 2698 | fi |
| 2699 | ]) |
| 2700 | |
| 2701 | AC_DEFUN(AC_CHECK_COMPILERS, |
| 2702 | [ |
| 2703 | AC_ARG_ENABLE(debug,[ --enable-debug[=ARG] enables debug symbols (yes|no|full) [default=no]], |
| 2704 | [ |
| 2705 | case $enableval in |
| 2706 | yes) |
| 2707 | kde_use_debug_code="yes" |
| 2708 | kde_use_debug_define=no |
| 2709 | ;; |
| 2710 | full) |
| 2711 | kde_use_debug_code="full" |
| 2712 | kde_use_debug_define=no |
| 2713 | ;; |
| 2714 | *) |
| 2715 | kde_use_debug_code="no" |
| 2716 | kde_use_debug_define=yes |
| 2717 | ;; |
| 2718 | esac |
| 2719 | ], |
| 2720 | [kde_use_debug_code="no" |
| 2721 | kde_use_debug_define=no |
| 2722 | ]) |
| 2723 | |
| 2724 | dnl Just for configure --help |
| 2725 | AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[]) |
| 2726 | |
| 2727 | AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)], |
| 2728 | [ |
| 2729 | if test $enableval = "no"; then |
| 2730 | kde_use_strict_options="no" |
| 2731 | else |
| 2732 | kde_use_strict_options="yes" |
| 2733 | fi |
| 2734 | ], [kde_use_strict_options="no"]) |
| 2735 | |
| 2736 | AC_ARG_ENABLE(warnings,[ --disable-warnings disables compilation with -Wall and similiar], |
| 2737 | [ |
| 2738 | if test $enableval = "no"; then |
| 2739 | kde_use_warnings="no" |
| 2740 | else |
| 2741 | kde_use_warnings="yes" |
| 2742 | fi |
| 2743 | ], [kde_use_warnings="yes"]) |
| 2744 | |
| 2745 | dnl enable warnings for debug build |
| 2746 | if test "$kde_use_debug_code" != "no"; then |
| 2747 | kde_use_warnings=yes |
| 2748 | fi |
| 2749 | |
| 2750 | AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]], |
| 2751 | [kde_use_profiling=$enableval], |
| 2752 | [kde_use_profiling="no"] |
| 2753 | ) |
| 2754 | |
| 2755 | dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS |
| 2756 | CFLAGS=" $CFLAGS" |
| 2757 | |
| 2758 | AC_PROG_CC |
| 2759 | |
| 2760 | AC_PROG_CPP |
| 2761 | |
| 2762 | if test "$GCC" = "yes"; then |
| 2763 | if test "$kde_use_debug_code" != "no"; then |
| 2764 | if test $kde_use_debug_code = "full"; then |
| 2765 | CFLAGS="-g3 $CFLAGS" |
| 2766 | else |
| 2767 | CFLAGS="-g -O2 $CFLAGS" |
| 2768 | fi |
| 2769 | else |
| 2770 | CFLAGS="-O2 $CFLAGS" |
| 2771 | fi |
| 2772 | fi |
| 2773 | |
| 2774 | if test "$kde_use_debug_define" = "yes"; then |
| 2775 | CFLAGS="-DNDEBUG $CFLAGS" |
| 2776 | fi |
| 2777 | |
| 2778 | |
| 2779 | case "$host" in |
| 2780 | *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";; |
| 2781 | *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";; |
| 2782 | esac |
| 2783 | |
| 2784 | if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then |
| 2785 | LDFLAGS="" |
| 2786 | fi |
| 2787 | |
| 2788 | CXXFLAGS=" $CXXFLAGS" |
| 2789 | |
| 2790 | AC_PROG_CXX |
| 2791 | |
| 2792 | if test "$GXX" = "yes" || test "$CXX" = "KCC"; then |
| 2793 | if test "$kde_use_debug_code" != "no"; then |
| 2794 | if test "$CXX" = "KCC"; then |
| 2795 | CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS" |
| 2796 | else |
| 2797 | if test "$kde_use_debug_code" = "full"; then |
| 2798 | CXXFLAGS="-g3 $CXXFLAGS" |
| 2799 | else |
| 2800 | CXXFLAGS="-g -O2 $CXXFLAGS" |
| 2801 | fi |
| 2802 | fi |
| 2803 | KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"]) |
| 2804 | |
| 2805 | dnl convenience compiler flags |
| 2806 | KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""]) |
| 2807 | AC_SUBST(WOVERLOADED_VIRTUAL) |
| 2808 | else |
| 2809 | if test "$CXX" = "KCC"; then |
| 2810 | CXXFLAGS="+K3 $CXXFLAGS" |
| 2811 | else |
| 2812 | CXXFLAGS="-O2 $CXXFLAGS" |
| 2813 | fi |
| 2814 | fi |
| 2815 | fi |
| 2816 | |
| 2817 | if test "$kde_use_debug_define" = "yes"; then |
| 2818 | CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS" |
| 2819 | fi |
| 2820 | |
| 2821 | if test "$kde_use_profiling" = "yes"; then |
| 2822 | KDE_CHECK_COMPILER_FLAG(pg, |
| 2823 | [ |
| 2824 | CFLAGS="-pg $CFLAGS" |
| 2825 | CXXFLAGS="-pg $CXXFLAGS" |
| 2826 | ]) |
| 2827 | fi |
| 2828 | |
| 2829 | if test "$kde_use_warnings" = "yes"; then |
| 2830 | if test "$GCC" = "yes"; then |
| 2831 | case $host in |
| 2832 | *-*-linux-gnu) |
| 2833 | CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS" |
| 2834 | CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS" |
| 2835 | ;; |
| 2836 | esac |
| 2837 | CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS" |
| 2838 | KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"]) |
| 2839 | KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"]) |
| 2840 | KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"]) |
| 2841 | fi |
| 2842 | fi |
| 2843 | |
| 2844 | if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then |
| 2845 | CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS" |
| 2846 | fi |
| 2847 | |
| 2848 | if test "$GXX" = "yes"; then |
| 2849 | KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"]) |
| 2850 | KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"]) |
| 2851 | KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= ) |
| 2852 | fi |
| 2853 | if test "$CXX" = "KCC"; then |
| 2854 | dnl unfortunately we currently cannot disable exception support in KCC |
| 2855 | dnl because doing so is binary incompatible and Qt by default links with exceptions :-( |
| 2856 | dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"]) |
| 2857 | dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= ) |
| 2858 | |
| 2859 | AC_ARG_ENABLE(pch,[ --enable-pch enables precompiled header support (currently only KCC) [default=no]], |
| 2860 | [ |
| 2861 | kde_use_pch=$enableval |
| 2862 | ],[kde_use_pch=no]) |
| 2863 | |
| 2864 | if test "$kde_use_pch" = "yes"; then |
| 2865 | dnl TODO: support --pch-dir! |
| 2866 | KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"]) |
| 2867 | dnl the below works (but the dir must exist), but it's |
| 2868 | dnl useless for a whole package. |
| 2869 | dnl The are precompiled headers for each source file, so when compiling |
| 2870 | dnl from scratch, it doesn't make a difference, and they take up |
| 2871 | dnl around ~5Mb _per_ sourcefile. |
| 2872 | dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp, |
| 2873 | dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"]) |
| 2874 | fi |
| 2875 | dnl this flag controls inlining. by default KCC inlines in optimisation mode |
| 2876 | dnl all implementations that are defined inside the class {} declaration. |
| 2877 | dnl because of templates-compatibility with broken gcc compilers, this |
| 2878 | dnl can cause excessive inlining. This flag limits it to a sane level |
| 2879 | KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"]) |
| 2880 | KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"]) |
| 2881 | KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"]) |
| 2882 | KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"]) |
| 2883 | dnl Some source files are shared between multiple executables |
| 2884 | dnl (or libraries) and some of those need template instantiations. |
| 2885 | dnl In that case KCC needs to compile those sources with |
| 2886 | dnl --one_instantiation_per_object. To make it easy for us we compile |
| 2887 | dnl _all_ objects with that flag (--one_per is a shorthand). |
| 2888 | KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"]) |
| 2889 | fi |
| 2890 | AC_SUBST(USE_EXCEPTIONS) |
| 2891 | dnl obsolete macro - provided to keep things going |
| 2892 | USE_RTTI= |
| 2893 | AC_SUBST(USE_RTTI) |
| 2894 | |
| 2895 | case "$host" in |
| 2896 | *-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;; |
| 2897 | *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";; |
| 2898 | *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";; |
| 2899 | *-*-solaris*) |
| 2900 | if test "$GXX" = yes; then |
| 2901 | libstdcpp=`$CXX -print-file-name=libstdc++.so` |
| 2902 | if test ! -f $libstdcpp; then |
| 2903 | 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]) |
| 2904 | fi |
| 2905 | fi |
| 2906 | ;; |
| 2907 | esac |
| 2908 | |
| 2909 | AC_VALIDIFY_CXXFLAGS |
| 2910 | |
| 2911 | AC_PROG_CXXCPP |
| 2912 | |
| 2913 | if test "$GCC" = yes; then |
| 2914 | NOOPT_CXXFLAGS=-O0 |
| 2915 | NOOPT_CFLAGS=-O0 |
| 2916 | fi |
| 2917 | |
| 2918 | AC_SUBST(NOOPT_CXXFLAGS) |
| 2919 | AC_SUBST(NOOPT_CFLAGS) |
| 2920 | |
| 2921 | KDE_CHECK_FINAL |
| 2922 | |
| 2923 | ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), []) |
| 2924 | ]) |
| 2925 | |
| 2926 | AC_DEFUN(KDE_ADD_DEPENDENCIES, |
| 2927 | [ |
| 2928 | [A]M_DEPENDENCIES(CC) |
| 2929 | [A]M_DEPENDENCIES(CXX) |
| 2930 | ]) |
| 2931 | |
| 2932 | dnl just a wrapper to clean up configure.in |
| 2933 | AC_DEFUN(KDE_PROG_LIBTOOL, |
| 2934 | [ |
| 2935 | AC_REQUIRE([AC_CHECK_COMPILERS]) |
| 2936 | AC_REQUIRE([AC_ENABLE_SHARED]) |
| 2937 | AC_REQUIRE([AC_ENABLE_STATIC]) |
| 2938 | |
| 2939 | AC_REQUIRE([AC_LIBTOOL_DLOPEN]) |
| 2940 | AC_REQUIRE([KDE_CHECK_LIB64]) |
| 2941 | |
| 2942 | AC_LANG_SAVE |
| 2943 | AC_LANG_C |
| 2944 | AC_OBJEXT |
| 2945 | AC_EXEEXT |
| 2946 | AC_LANG_RESTORE |
| 2947 | |
| 2948 | AM_PROG_LIBTOOL |
| 2949 | AC_LIBTOOL_CXX |
| 2950 | |
| 2951 | LIBTOOL_SHELL="/bin/sh ./libtool" |
| 2952 | # LIBTOOL="$LIBTOOL --silent" |
| 2953 | KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)" |
| 2954 | AC_SUBST(KDE_PLUGIN) |
| 2955 | |
| 2956 | AC_ARG_ENABLE(objprelink, [ --enable-objprelink prelink apps using objprelink (obsolete)], |
| 2957 | kde_use_objprelink=$enableval, kde_use_objprelink=no) |
| 2958 | if test "x$kde_use_objprelink" = "xyes"; then |
| 2959 | AC_MSG_WARN([ |
| 2960 | ------------------------------------------------------------ |
| 2961 | Configuration option --enable-objprelink is no longer useful. |
| 2962 | See http:://objprelink.sourceforge.net for details: |
| 2963 | 1- Recent binutils are fast enough to do without objprelink. |
| 2964 | 2- Newer versions of objprelink do not need this option. |
| 2965 | ------------------------------------------------------------ |
| 2966 | ]) |
| 2967 | fi |
| 2968 | ]) |
| 2969 | |
| 2970 | AC_DEFUN(KDE_CHECK_LIB64, |
| 2971 | [ |
| 2972 | kdelibsuff=none |
| 2973 | AC_ARG_ENABLE(libsuffix, |
| 2974 | AC_HELP_STRING([--enable-libsuffix], |
| 2975 | [/lib directory suffix (64,32,none)]), |
| 2976 | kdelibsuff=$enableval) |
| 2977 | if test "$kdelibsuff" = "none"; then |
| 2978 | if test -d /lib64 ; then |
| 2979 | kdelibsuff=64 |
| 2980 | else |
| 2981 | kdelibsuff= |
| 2982 | fi |
| 2983 | fi |
| 2984 | if test -z "$kdelibsuff"; then |
| 2985 | AC_MSG_RESULT([not using lib directory suffix]) |
| 2986 | AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories) |
| 2987 | else |
| 2988 | if test "$libdir" = '${exec_prefix}/lib'; then |
| 2989 | libdir="$libdir${kdelibsuff}" |
| 2990 | AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms |
| 2991 | fi |
| 2992 | AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories) |
| 2993 | AC_MSG_RESULT([using lib directory suffix $kdelibsuff]) |
| 2994 | fi |
| 2995 | ]) |
| 2996 | |
| 2997 | AC_DEFUN(KDE_CHECK_TYPES, |
| 2998 | [ AC_CHECK_SIZEOF(int, 4)dnl |
| 2999 | AC_CHECK_SIZEOF(long, 4)dnl |
| 3000 | AC_CHECK_SIZEOF(char *, 4)dnl |
| 3001 | AC_CHECK_SIZEOF(char, 1)dnl |
| 3002 | ])dnl |
| 3003 | |
| 3004 | AC_DEFUN(KDE_DO_IT_ALL, |
| 3005 | [ |
| 3006 | AC_CANONICAL_SYSTEM |
| 3007 | AC_ARG_PROGRAM |
| 3008 | AM_INIT_AUTOMAKE($1, $2) |
| 3009 | AM_DISABLE_LIBRARIES |
| 3010 | AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde}) |
| 3011 | AC_CHECK_COMPILERS |
| 3012 | KDE_PROG_LIBTOOL |
| 3013 | AM_KDE_WITH_NLS |
| 3014 | AC_PATH_KDE |
| 3015 | ]) |
| 3016 | |
| 3017 | AC_DEFUN(AC_CHECK_RPATH, |
| 3018 | [ |
| 3019 | AC_MSG_CHECKING(for rpath) |
| 3020 | AC_ARG_ENABLE(rpath, |
| 3021 | [ --disable-rpath do not use the rpath feature of ld], |
| 3022 | USE_RPATH=$enableval, USE_RPATH=yes) |
| 3023 | |
| 3024 | if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then |
| 3025 | |
| 3026 | KDE_RPATH="-R \$(kde_libraries)" |
| 3027 | |
| 3028 | if test -n "$qt_libraries"; then |
| 3029 | KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)" |
| 3030 | fi |
| 3031 | dnl $x_libraries is set to /usr/lib in case |
| 3032 | if test -n "$X_LDFLAGS"; then |
| 3033 | KDE_RPATH="$KDE_RPATH -R \$(x_libraries)" |
| 3034 | fi |
| 3035 | if test -n "$KDE_EXTRA_RPATH"; then |
| 3036 | KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)" |
| 3037 | fi |
| 3038 | fi |
| 3039 | AC_SUBST(KDE_EXTRA_RPATH) |
| 3040 | AC_SUBST(KDE_RPATH) |
| 3041 | AC_MSG_RESULT($USE_RPATH) |
| 3042 | ]) |
| 3043 | |
| 3044 | dnl Check for the type of the third argument of getsockname |
| 3045 | AC_DEFUN(AC_CHECK_SOCKLEN_T, [ |
| 3046 | AC_MSG_CHECKING(for socklen_t) |
| 3047 | AC_CACHE_VAL(ac_cv_socklen_t, [ |
| 3048 | AC_LANG_SAVE |
| 3049 | AC_LANG_CPLUSPLUS |
| 3050 | AC_TRY_COMPILE([ |
| 3051 | #include <sys/types.h> |
| 3052 | #include <sys/socket.h> |
| 3053 | ],[ |
| 3054 | socklen_t a=0; |
| 3055 | getsockname(0,(struct sockaddr*)0, &a); |
| 3056 | ], |
| 3057 | ac_cv_socklen_t=socklen_t, |
| 3058 | AC_TRY_COMPILE([ |
| 3059 | #include <sys/types.h> |
| 3060 | #include <sys/socket.h> |
| 3061 | ],[ |
| 3062 | int a=0; |
| 3063 | getsockname(0,(struct sockaddr*)0, &a); |
| 3064 | ], |
| 3065 | ac_cv_socklen_t=int, |
| 3066 | ac_cv_socklen_t=size_t |
| 3067 | ) |
| 3068 | ) |
| 3069 | AC_LANG_RESTORE |
| 3070 | ]) |
| 3071 | |
| 3072 | AC_MSG_RESULT($ac_cv_socklen_t) |
| 3073 | if test "$ac_cv_socklen_t" != "socklen_t"; then |
| 3074 | AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t, |
| 3075 | [Define the real type of socklen_t]) |
| 3076 | fi |
| 3077 | AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define]) |
| 3078 | |
| 3079 | ]) |
| 3080 | |
| 3081 | dnl This is a merge of some macros out of the gettext aclocal.m4 |
| 3082 | dnl since we don't need anything, I took the things we need |
| 3083 | dnl the copyright for them is: |
| 3084 | dnl > |
| 3085 | dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. |
| 3086 | dnl This Makefile.in is free software; the Free Software Foundation |
| 3087 | dnl gives unlimited permission to copy and/or distribute it, |
| 3088 | dnl with or without modifications, as long as this notice is preserved. |
| 3089 | |
| 3090 | dnl This program is distributed in the hope that it will be useful, |
| 3091 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
| 3092 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 3093 | dnl PARTICULAR PURPOSE. |
| 3094 | dnl > |
| 3095 | dnl for this file it is relicensed under LGPL |
| 3096 | |
| 3097 | AC_DEFUN(AM_KDE_WITH_NLS, |
| 3098 | [ |
| 3099 | dnl If we use NLS figure out what method |
| 3100 | |
| 3101 | AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt, |
| 3102 | [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt) |
| 3103 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
| 3104 | |
| 3105 | if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then |
| 3106 | AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it]) |
| 3107 | GMSGFMT=":" |
| 3108 | fi |
| 3109 | MSGFMT=$GMSGFMT |
| 3110 | AC_SUBST(GMSGFMT) |
| 3111 | AC_SUBST(MSGFMT) |
| 3112 | |
| 3113 | AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext, |
| 3114 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
| 3115 | |
| 3116 | dnl Test whether we really found GNU xgettext. |
| 3117 | if test "$XGETTEXT" != ":"; then |
| 3118 | dnl If it is no GNU xgettext we define it as : so that the |
| 3119 | dnl Makefiles still can work. |
| 3120 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then |
| 3121 | : ; |
| 3122 | else |
| 3123 | AC_MSG_RESULT( |
| 3124 | [found xgettext programs is not GNU xgettext; ignore it]) |
| 3125 | XGETTEXT=":" |
| 3126 | fi |
| 3127 | fi |
| 3128 | AC_SUBST(XGETTEXT) |
| 3129 | |
| 3130 | ]) |
| 3131 | |
| 3132 | # Search path for a program which passes the given test. |
| 3133 | # Ulrich Drepper <drepper@cygnus.com>, 1996. |
| 3134 | |
| 3135 | # serial 1 |
| 3136 | # Stephan Kulow: I appended a _KDE against name conflicts |
| 3137 | |
| 3138 | dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR, |
| 3139 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) |
| 3140 | AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE, |
| 3141 | [# Extract the first word of "$2", so it can be a program name with args. |
| 3142 | set dummy $2; ac_word=[$]2 |
| 3143 | AC_MSG_CHECKING([for $ac_word]) |
| 3144 | AC_CACHE_VAL(ac_cv_path_$1, |
| 3145 | [case "[$]$1" in |
| 3146 | /*) |
| 3147 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. |
| 3148 | ;; |
| 3149 | *) |
| 3150 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
| 3151 | for ac_dir in ifelse([$5], , $PATH, [$5]); do |
| 3152 | test -z "$ac_dir" && ac_dir=. |
| 3153 | if test -f $ac_dir/$ac_word; then |
| 3154 | if [$3]; then |
| 3155 | ac_cv_path_$1="$ac_dir/$ac_word" |
| 3156 | break |
| 3157 | fi |
| 3158 | fi |
| 3159 | done |
| 3160 | IFS="$ac_save_ifs" |
| 3161 | dnl If no 4th arg is given, leave the cache variable unset, |
| 3162 | dnl so AC_PATH_PROGS will keep looking. |
| 3163 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" |
| 3164 | ])dnl |
| 3165 | ;; |
| 3166 | esac])dnl |
| 3167 | $1="$ac_cv_path_$1" |
| 3168 | if test -n "[$]$1"; then |
| 3169 | AC_MSG_RESULT([$]$1) |
| 3170 | else |
| 3171 | AC_MSG_RESULT(no) |
| 3172 | fi |
| 3173 | AC_SUBST($1)dnl |
| 3174 | ]) |
| 3175 | |
| 3176 | |
| 3177 | # Check whether LC_MESSAGES is available in <locale.h>. |
| 3178 | # Ulrich Drepper <drepper@cygnus.com>, 1995. |
| 3179 | |
| 3180 | # serial 1 |
| 3181 | |
| 3182 | AC_DEFUN(AM_LC_MESSAGES, |
| 3183 | [if test $ac_cv_header_locale_h = yes; then |
| 3184 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, |
| 3185 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], |
| 3186 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) |
| 3187 | if test $am_cv_val_LC_MESSAGES = yes; then |
| 3188 | AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES]) |
| 3189 | fi |
| 3190 | fi]) |
| 3191 | |
| 3192 | dnl From Jim Meyering. |
| 3193 | dnl FIXME: migrate into libit. |
| 3194 | |
| 3195 | AC_DEFUN([AM_FUNC_OBSTACK], |
| 3196 | [AC_CACHE_CHECK([for obstacks], am_cv_func_obstack, |
| 3197 | [AC_TRY_LINK([#include "obstack.h"], |
| 3198 | [struct obstack *mem;obstack_free(mem,(char *) 0)], |
| 3199 | am_cv_func_obstack=yes, |
| 3200 | am_cv_func_obstack=no)]) |
| 3201 | if test $am_cv_func_obstack = yes; then |
| 3202 | AC_DEFINE(HAVE_OBSTACK) |
| 3203 | else |
| 3204 | LIBOBJS="$LIBOBJS obstack.o" |
| 3205 | fi |
| 3206 | ]) |
| 3207 | |
| 3208 | dnl From Jim Meyering. Use this if you use the GNU error.[ch]. |
| 3209 | dnl FIXME: Migrate into libit |
| 3210 | |
| 3211 | AC_DEFUN([AM_FUNC_ERROR_AT_LINE], |
| 3212 | [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line, |
| 3213 | [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");], |
| 3214 | am_cv_lib_error_at_line=yes, |
| 3215 | am_cv_lib_error_at_line=no)]) |
| 3216 | if test $am_cv_lib_error_at_line = no; then |
| 3217 | LIBOBJS="$LIBOBJS error.o" |
| 3218 | fi |
| 3219 | AC_SUBST(LIBOBJS)dnl |
| 3220 | ]) |
| 3221 | |
| 3222 | # Macro to add for using GNU gettext. |
| 3223 | # Ulrich Drepper <drepper@cygnus.com>, 1995. |
| 3224 | |
| 3225 | # serial 1 |
| 3226 | # Stephan Kulow: I put a KDE in it to avoid name conflicts |
| 3227 | |
| 3228 | AC_DEFUN(AM_KDE_GNU_GETTEXT, |
| 3229 | [AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
| 3230 | AC_REQUIRE([AC_PROG_RANLIB])dnl |
| 3231 | AC_REQUIRE([AC_HEADER_STDC])dnl |
| 3232 | AC_REQUIRE([AC_TYPE_OFF_T])dnl |
| 3233 | AC_REQUIRE([AC_TYPE_SIZE_T])dnl |
| 3234 | AC_REQUIRE([AC_FUNC_ALLOCA])dnl |
| 3235 | AC_REQUIRE([AC_FUNC_MMAP])dnl |
| 3236 | AC_REQUIRE([AM_KDE_WITH_NLS])dnl |
| 3237 | AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h]) |
| 3238 | AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \ |
| 3239 | __argz_count __argz_stringify __argz_next]) |
| 3240 | |
| 3241 | AC_MSG_CHECKING(for stpcpy) |
| 3242 | AC_CACHE_VAL(kde_cv_func_stpcpy, |
| 3243 | [ |
| 3244 | kde_safe_cxxflags=$CXXFLAGS |
| 3245 | CXXFLAGS="-Wmissing-prototypes -Werror" |
| 3246 | AC_LANG_SAVE |
| 3247 | AC_LANG_CPLUSPLUS |
| 3248 | AC_TRY_COMPILE([ |
| 3249 | #include <string.h> |
| 3250 | ], |
| 3251 | [ |
| 3252 | char buffer[200]; |
| 3253 | stpcpy(buffer, buffer); |
| 3254 | ], |
| 3255 | kde_cv_func_stpcpy=yes, |
| 3256 | kde_cv_func_stpcpy=no) |
| 3257 | AC_LANG_RESTORE |
| 3258 | CXXFLAGS=$kde_safe_cxxflags |
| 3259 | ]) |
| 3260 | AC_MSG_RESULT($kde_cv_func_stpcpy) |
| 3261 | if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then |
| 3262 | AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy]) |
| 3263 | fi |
| 3264 | |
| 3265 | AM_LC_MESSAGES |
| 3266 | |
| 3267 | if test "x$CATOBJEXT" != "x"; then |
| 3268 | if test "x$ALL_LINGUAS" = "x"; then |
| 3269 | LINGUAS= |
| 3270 | else |
| 3271 | AC_MSG_CHECKING(for catalogs to be installed) |
| 3272 | NEW_LINGUAS= |
| 3273 | for lang in ${LINGUAS=$ALL_LINGUAS}; do |
| 3274 | case "$ALL_LINGUAS" in |
| 3275 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; |
| 3276 | esac |
| 3277 | done |
| 3278 | LINGUAS=$NEW_LINGUAS |
| 3279 | AC_MSG_RESULT($LINGUAS) |
| 3280 | fi |
| 3281 | |
| 3282 | dnl Construct list of names of catalog files to be constructed. |
| 3283 | if test -n "$LINGUAS"; then |
| 3284 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done |
| 3285 | fi |
| 3286 | fi |
| 3287 | |
| 3288 | ]) |
| 3289 | |
| 3290 | AC_DEFUN(AC_HAVE_XPM, |
| 3291 | [AC_REQUIRE_CPP()dnl |
| 3292 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 3293 | |
| 3294 | test -z "$XPM_LDFLAGS" && XPM_LDFLAGS= |
| 3295 | test -z "$XPM_INCLUDE" && XPM_INCLUDE= |
| 3296 | |
| 3297 | AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM tests], |
| 3298 | xpm_test=$withval, xpm_test="yes") |
| 3299 | if test "x$xpm_test" = xno; then |
| 3300 | ac_cv_have_xpm=no |
| 3301 | else |
| 3302 | AC_MSG_CHECKING(for XPM) |
| 3303 | AC_CACHE_VAL(ac_cv_have_xpm, |
| 3304 | [ |
| 3305 | AC_LANG_C |
| 3306 | ac_save_ldflags="$LDFLAGS" |
| 3307 | ac_save_cflags="$CFLAGS" |
| 3308 | if test "x$kde_use_qt_emb" != "xyes"; then |
| 3309 | LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET" |
| 3310 | else |
| 3311 | LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET" |
| 3312 | fi |
| 3313 | CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES" |
| 3314 | test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS" |
| 3315 | AC_TRY_LINK([#include <X11/xpm.h>],[], |
| 3316 | ac_cv_have_xpm="yes",ac_cv_have_xpm="no") |
| 3317 | LDFLAGS="$ac_save_ldflags" |
| 3318 | CFLAGS="$ac_save_cflags" |
| 3319 | ])dnl |
| 3320 | |
| 3321 | if test "$ac_cv_have_xpm" = no; then |
| 3322 | AC_MSG_RESULT(no) |
| 3323 | XPM_LDFLAGS="" |
| 3324 | XPMINC="" |
| 3325 | $2 |
| 3326 | else |
| 3327 | AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support]) |
| 3328 | if test "$XPM_LDFLAGS" = ""; then |
| 3329 | XPMLIB='-lXpm $(LIB_X11)' |
| 3330 | else |
| 3331 | XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)' |
| 3332 | fi |
| 3333 | if test "$XPM_INCLUDE" = ""; then |
| 3334 | XPMINC="" |
| 3335 | else |
| 3336 | XPMINC="-I$XPM_INCLUDE" |
| 3337 | fi |
| 3338 | AC_MSG_RESULT(yes) |
| 3339 | $1 |
| 3340 | fi |
| 3341 | fi |
| 3342 | AC_SUBST(XPMINC) |
| 3343 | AC_SUBST(XPMLIB) |
| 3344 | ]) |
| 3345 | |
| 3346 | AC_DEFUN(AC_HAVE_DPMS, |
| 3347 | [AC_REQUIRE_CPP()dnl |
| 3348 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 3349 | |
| 3350 | test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS= |
| 3351 | test -z "$DPMS_INCLUDE" && DPMS_INCLUDE= |
| 3352 | DPMS_LIB= |
| 3353 | |
| 3354 | AC_ARG_WITH(dpms, [ --without-dpms disable DPMS power saving], |
| 3355 | dpms_test=$withval, dpms_test="yes") |
| 3356 | if test "x$dpms_test" = xno; then |
| 3357 | ac_cv_have_dpms=no |
| 3358 | else |
| 3359 | AC_MSG_CHECKING(for DPMS) |
| 3360 | dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms. |
| 3361 | dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms". |
| 3362 | AC_CACHE_VAL(ac_cv_have_dpms, |
| 3363 | [ |
| 3364 | if test "x$kde_use_qt_emb" = "xyes"; then |
| 3365 | AC_MSG_RESULT(no) |
| 3366 | ac_cv_have_dpms="no" |
| 3367 | else |
| 3368 | AC_LANG_C |
| 3369 | ac_save_ldflags="$LDFLAGS" |
| 3370 | ac_save_cflags="$CFLAGS" |
| 3371 | ac_save_libs="$LIBS" |
| 3372 | LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET" |
| 3373 | CFLAGS="$CFLAGS $X_INCLUDES" |
| 3374 | test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS" |
| 3375 | AC_TRY_LINK([ |
| 3376 | #include <X11/Xproto.h> |
| 3377 | #include <X11/X.h> |
| 3378 | #include <X11/Xlib.h> |
| 3379 | #include <X11/extensions/dpms.h> |
| 3380 | int foo_test_dpms() |
| 3381 | { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[], |
| 3382 | ac_cv_have_dpms="yes", [ |
| 3383 | LDFLAGS="$ac_save_ldflags" |
| 3384 | CFLAGS="$ac_save_cflags" |
| 3385 | LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET" |
| 3386 | LIBS="$LIBS -lXdpms" |
| 3387 | CFLAGS="$CFLAGS $X_INCLUDES" |
| 3388 | test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS" |
| 3389 | AC_TRY_LINK([ |
| 3390 | #include <X11/Xproto.h> |
| 3391 | #include <X11/X.h> |
| 3392 | #include <X11/Xlib.h> |
| 3393 | #include <X11/extensions/dpms.h> |
| 3394 | int foo_test_dpms() |
| 3395 | { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[], |
| 3396 | [ |
| 3397 | ac_cv_have_dpms="-lXdpms" |
| 3398 | ],ac_cv_have_dpms="no") |
| 3399 | ]) |
| 3400 | LDFLAGS="$ac_save_ldflags" |
| 3401 | CFLAGS="$ac_save_cflags" |
| 3402 | LIBS="$ac_save_libs" |
| 3403 | fi |
| 3404 | ])dnl |
| 3405 | |
| 3406 | if test "$ac_cv_have_dpms" = no; then |
| 3407 | AC_MSG_RESULT(no) |
| 3408 | DPMS_LDFLAGS="" |
| 3409 | DPMSINC="" |
| 3410 | $2 |
| 3411 | else |
| 3412 | AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support]) |
| 3413 | if test "$ac_cv_have_dpms" = "-lXdpms"; then |
| 3414 | DPMS_LIB="-lXdpms" |
| 3415 | fi |
| 3416 | if test "$DPMS_LDFLAGS" = ""; then |
| 3417 | DPMSLIB="$DPMS_LIB "'$(LIB_X11)' |
| 3418 | else |
| 3419 | DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)' |
| 3420 | fi |
| 3421 | if test "$DPMS_INCLUDE" = ""; then |
| 3422 | DPMSINC="" |
| 3423 | else |
| 3424 | DPMSINC="-I$DPMS_INCLUDE" |
| 3425 | fi |
| 3426 | AC_MSG_RESULT(yes) |
| 3427 | $1 |
| 3428 | fi |
| 3429 | fi |
| 3430 | AC_SUBST(DPMSINC) |
| 3431 | AC_SUBST(DPMSLIB) |
| 3432 | ]) |
| 3433 | |
| 3434 | AC_DEFUN(AC_HAVE_GL, |
| 3435 | [AC_REQUIRE_CPP()dnl |
| 3436 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 3437 | |
| 3438 | test -z "$GL_LDFLAGS" && GL_LDFLAGS= |
| 3439 | test -z "$GL_INCLUDE" && GL_INCLUDE= |
| 3440 | |
| 3441 | AC_ARG_WITH(gl, [ --without-gl disable 3D GL modes], |
| 3442 | gl_test=$withval, gl_test="yes") |
| 3443 | if test "x$kde_use_qt_emb" = "xyes"; then |
| 3444 | # GL and Qt Embedded is a no-go for now. |
| 3445 | ac_cv_have_gl=no |
| 3446 | elif test "x$gl_test" = xno; then |
| 3447 | ac_cv_have_gl=no |
| 3448 | else |
| 3449 | AC_MSG_CHECKING(for GL) |
| 3450 | AC_CACHE_VAL(ac_cv_have_gl, |
| 3451 | [ |
| 3452 | AC_LANG_SAVE |
| 3453 | AC_LANG_CPLUSPLUS |
| 3454 | ac_save_ldflags="$LDFLAGS" |
| 3455 | ac_save_cxxflags="$CXXFLAGS" |
| 3456 | LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU" |
| 3457 | test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11" |
| 3458 | LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET" |
| 3459 | CXXFLAGS="$CFLAGS $X_INCLUDES" |
| 3460 | test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS" |
| 3461 | AC_TRY_LINK([#include <GL/gl.h> |
| 3462 | #include <GL/glu.h> |
| 3463 | ], [], |
| 3464 | ac_cv_have_gl="mesa", ac_cv_have_gl="no") |
| 3465 | if test "x$ac_cv_have_gl" = "xno"; then |
| 3466 | LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL" |
| 3467 | test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11" |
| 3468 | LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET" |
| 3469 | CXXFLAGS="$ac_save_cflags $X_INCLUDES" |
| 3470 | test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS" |
| 3471 | AC_TRY_LINK([#include <GL/gl.h> |
| 3472 | #include <GL/glu.h> |
| 3473 | ], [], |
| 3474 | ac_cv_have_gl="yes", ac_cv_have_gl="no") |
| 3475 | fi |
| 3476 | AC_LANG_RESTORE |
| 3477 | LDFLAGS="$ac_save_ldflags" |
| 3478 | CXXFLAGS="$ac_save_cxxflags" |
| 3479 | ])dnl |
| 3480 | |
| 3481 | if test "$ac_cv_have_gl" = "no"; then |
| 3482 | AC_MSG_RESULT(no) |
| 3483 | GL_LDFLAGS="" |
| 3484 | GLINC="" |
| 3485 | $2 |
| 3486 | else |
| 3487 | AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)]) |
| 3488 | if test "$GL_LDFLAGS" = ""; then |
| 3489 | if test "$ac_cv_have_gl" = "mesa"; then |
| 3490 | GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)' |
| 3491 | else |
| 3492 | GLLIB='-lGLU -lGL $(LIB_X11)' |
| 3493 | fi |
| 3494 | else |
| 3495 | if test "$ac_cv_have_gl" = "mesa"; then |
| 3496 | GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)' |
| 3497 | else |
| 3498 | GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)' |
| 3499 | fi |
| 3500 | fi |
| 3501 | if test "$GL_INCLUDE" = ""; then |
| 3502 | GLINC="" |
| 3503 | else |
| 3504 | GLINC="-I$GL_INCLUDE" |
| 3505 | fi |
| 3506 | AC_MSG_RESULT($ac_cv_have_gl) |
| 3507 | $1 |
| 3508 | fi |
| 3509 | fi |
| 3510 | AC_SUBST(GLINC) |
| 3511 | AC_SUBST(GLLIB) |
| 3512 | ]) |
| 3513 | |
| 3514 | |
| 3515 | dnl shadow password and PAM magic - maintained by ossi@kde.org |
| 3516 | |
| 3517 | AC_DEFUN(KDE_PAM, [ |
| 3518 | AC_REQUIRE([KDE_CHECK_LIBDL]) |
| 3519 | |
| 3520 | AC_ARG_WITH(pam, |
| 3521 | [ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]], |
| 3522 | [ if test "x$withval" = "xyes"; then |
| 3523 | use_pam=yes |
| 3524 | pam_service=kde |
| 3525 | elif test "x$withval" = "xno"; then |
| 3526 | use_pam=no |
| 3527 | else |
| 3528 | use_pam=yes |
| 3529 | pam_service=$withval |
| 3530 | fi |
| 3531 | ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service" |
| 3532 | ], [ |
| 3533 | AC_CACHE_VAL(ac_cv_path_pam, |
| 3534 | [ use_pam=no |
| 3535 | AC_CHECK_LIB(pam, pam_start, |
| 3536 | [ AC_CHECK_HEADER(security/pam_appl.h, |
| 3537 | [ use_pam=yes |
| 3538 | pam_service=kde ]) |
| 3539 | ], , $LIBDL) |
| 3540 | ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service" |
| 3541 | ]) |
| 3542 | ]) |
| 3543 | eval "$ac_cv_path_pam" |
| 3544 | |
| 3545 | AC_MSG_CHECKING(for PAM) |
| 3546 | if test "x$use_pam" = xno; then |
| 3547 | AC_MSG_RESULT(no) |
| 3548 | PAMLIBS="" |
| 3549 | else |
| 3550 | AC_MSG_RESULT(yes) |
| 3551 | AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)]) |
| 3552 | PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL" |
| 3553 | |
| 3554 | dnl test whether struct pam_message is const (Linux) or not (Sun) |
| 3555 | AC_MSG_CHECKING(for const pam_message) |
| 3556 | AC_EGREP_HEADER([struct pam_message], security/pam_appl.h, |
| 3557 | [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h, |
| 3558 | [AC_MSG_RESULT([const: Linux-type PAM])], |
| 3559 | [AC_MSG_RESULT([nonconst: Sun-type PAM]) |
| 3560 | AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])] |
| 3561 | )], |
| 3562 | [AC_MSG_RESULT([not found - assume const, Linux-type PAM])]) |
| 3563 | fi |
| 3564 | |
| 3565 | AC_SUBST(PAMLIBS) |
| 3566 | ]) |
| 3567 | |
| 3568 | dnl DEF_PAM_SERVICE(arg name, full name, define name) |
| 3569 | AC_DEFUN(DEF_PAM_SERVICE, [ |
| 3570 | AC_ARG_WITH($1-pam, |
| 3571 | [ --with-$1-pam=[val] override PAM service from --with-pam for $2], |
| 3572 | [ if test "x$use_pam" = xyes; then |
| 3573 | $3_PAM_SERVICE="$withval" |
| 3574 | else |
| 3575 | AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected. |
| 3576 | You may want to enforce it by using --with-pam.]) |
| 3577 | fi |
| 3578 | ], |
| 3579 | [ if test "x$use_pam" = xyes; then |
| 3580 | $3_PAM_SERVICE="$pam_service" |
| 3581 | fi |
| 3582 | ]) |
| 3583 | if test -n "$$3_PAM_SERVICE"; then |
| 3584 | AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE]) |
| 3585 | AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2]) |
| 3586 | fi |
| 3587 | AC_SUBST($3_PAM_SERVICE) |
| 3588 | ]) |
| 3589 | |
| 3590 | AC_DEFUN(KDE_SHADOWPASSWD, [ |
| 3591 | AC_REQUIRE([KDE_PAM]) |
| 3592 | |
| 3593 | AC_CHECK_LIB(shadow, getspent, |
| 3594 | [ LIBSHADOW="-lshadow" |
| 3595 | ac_use_shadow=yes |
| 3596 | ], |
| 3597 | [ dnl for UnixWare |
| 3598 | AC_CHECK_LIB(gen, getspent, |
| 3599 | [ LIBGEN="-lgen" |
| 3600 | ac_use_shadow=yes |
| 3601 | ], |
| 3602 | [ AC_CHECK_FUNC(getspent, |
| 3603 | [ ac_use_shadow=yes ], |
| 3604 | [ ac_use_shadow=no ]) |
| 3605 | ]) |
| 3606 | ]) |
| 3607 | AC_SUBST(LIBSHADOW) |
| 3608 | AC_SUBST(LIBGEN) |
| 3609 | |
| 3610 | AC_MSG_CHECKING([for shadow passwords]) |
| 3611 | |
| 3612 | AC_ARG_WITH(shadow, |
| 3613 | [ --with-shadow If you want shadow password support ], |
| 3614 | [ if test "x$withval" != "xno"; then |
| 3615 | use_shadow=yes |
| 3616 | else |
| 3617 | use_shadow=no |
| 3618 | fi |
| 3619 | ], [ |
| 3620 | use_shadow="$ac_use_shadow" |
| 3621 | ]) |
| 3622 | |
| 3623 | if test "x$use_shadow" = xyes; then |
| 3624 | AC_MSG_RESULT(yes) |
| 3625 | AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords]) |
| 3626 | else |
| 3627 | AC_MSG_RESULT(no) |
| 3628 | LIBSHADOW= |
| 3629 | LIBGEN= |
| 3630 | fi |
| 3631 | |
| 3632 | dnl finally make the relevant binaries setuid root, if we have shadow passwds. |
| 3633 | dnl this still applies, if we could use it indirectly through pam. |
| 3634 | if test "x$use_shadow" = xyes || |
| 3635 | ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then |
| 3636 | case $host in |
| 3637 | *-*-freebsd* | *-*-netbsd* | *-*-openbsd*) |
| 3638 | SETUIDFLAGS="-m 4755 -o root";; |
| 3639 | *) |
| 3640 | SETUIDFLAGS="-m 4755";; |
| 3641 | esac |
| 3642 | fi |
| 3643 | AC_SUBST(SETUIDFLAGS) |
| 3644 | |
| 3645 | ]) |
| 3646 | |
| 3647 | AC_DEFUN(KDE_PASSWDLIBS, [ |
| 3648 | AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT |
| 3649 | AC_REQUIRE([KDE_PAM]) |
| 3650 | AC_REQUIRE([KDE_SHADOWPASSWD]) |
| 3651 | |
| 3652 | if test "x$use_pam" = "xyes"; then |
| 3653 | PASSWDLIBS="$PAMLIBS" |
| 3654 | else |
| 3655 | PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN" |
| 3656 | fi |
| 3657 | |
| 3658 | dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but |
| 3659 | dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires |
| 3660 | dnl root to read, so kcheckpass needs to be root (even when using pam, since pam |
| 3661 | dnl may need to read /etc/master.passwd). |
| 3662 | case $host in |
| 3663 | *-*-freebsd*) |
| 3664 | SETUIDFLAGS="-m 4755 -o root" |
| 3665 | ;; |
| 3666 | *) |
| 3667 | ;; |
| 3668 | esac |
| 3669 | |
| 3670 | AC_SUBST(PASSWDLIBS) |
| 3671 | ]) |
| 3672 | |
| 3673 | AC_DEFUN(KDE_CHECK_LIBDL, |
| 3674 | [ |
| 3675 | AC_CHECK_LIB(dl, dlopen, [ |
| 3676 | LIBDL="-ldl" |
| 3677 | ac_cv_have_dlfcn=yes |
| 3678 | ]) |
| 3679 | |
| 3680 | AC_CHECK_LIB(dld, shl_unload, [ |
| 3681 | LIBDL="-ldld" |
| 3682 | ac_cv_have_shload=yes |
| 3683 | ]) |
| 3684 | |
| 3685 | AC_SUBST(LIBDL) |
| 3686 | ]) |
| 3687 | |
| 3688 | AC_DEFUN(KDE_CHECK_DLOPEN, |
| 3689 | [ |
| 3690 | KDE_CHECK_LIBDL |
| 3691 | AC_CHECK_HEADERS(dlfcn.h dl.h) |
| 3692 | if test "$ac_cv_header_dlfcn_h" = "no"; then |
| 3693 | ac_cv_have_dlfcn=no |
| 3694 | fi |
| 3695 | |
| 3696 | if test "$ac_cv_header_dl_h" = "no"; then |
| 3697 | ac_cv_have_shload=no |
| 3698 | fi |
| 3699 | |
| 3700 | dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE |
| 3701 | dnl (MM) |
| 3702 | AC_ARG_ENABLE(dlopen, |
| 3703 | [ --disable-dlopen link statically [default=no]] , |
| 3704 | enable_dlopen=$enableval, |
| 3705 | enable_dlopen=yes) |
| 3706 | |
| 3707 | # override the user's opinion, if we know it better ;) |
| 3708 | if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then |
| 3709 | enable_dlopen=no |
| 3710 | fi |
| 3711 | |
| 3712 | if test "$ac_cv_have_dlfcn" = "yes"; then |
| 3713 | AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn]) |
| 3714 | fi |
| 3715 | |
| 3716 | if test "$ac_cv_have_shload" = "yes"; then |
| 3717 | AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload]) |
| 3718 | fi |
| 3719 | |
| 3720 | if test "$enable_dlopen" = no ; then |
| 3721 | test -n "$1" && eval $1 |
| 3722 | else |
| 3723 | test -n "$2" && eval $2 |
| 3724 | fi |
| 3725 | |
| 3726 | ]) |
| 3727 | |
| 3728 | AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING, |
| 3729 | [ |
| 3730 | KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no) |
| 3731 | KDE_PROG_LIBTOOL |
| 3732 | AC_MSG_CHECKING([dynamic loading]) |
| 3733 | eval "`egrep '^build_libtool_libs=' libtool`" |
| 3734 | if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then |
| 3735 | dynamic_loading=yes |
| 3736 | AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING) |
| 3737 | else |
| 3738 | dynamic_loading=no |
| 3739 | fi |
| 3740 | AC_MSG_RESULT($dynamic_loading) |
| 3741 | if test "$dynamic_loading" = "yes"; then |
| 3742 | $1 |
| 3743 | else |
| 3744 | $2 |
| 3745 | fi |
| 3746 | ]) |
| 3747 | |
| 3748 | AC_DEFUN(KDE_ADD_INCLUDES, |
| 3749 | [ |
| 3750 | if test -z "$1"; then |
| 3751 | test_include="Pix.h" |
| 3752 | else |
| 3753 | test_include="$1" |
| 3754 | fi |
| 3755 | |
| 3756 | AC_MSG_CHECKING([for libg++ ($test_include)]) |
| 3757 | |
| 3758 | AC_CACHE_VAL(kde_cv_libgpp_includes, |
| 3759 | [ |
| 3760 | kde_cv_libgpp_includes=no |
| 3761 | |
| 3762 | for ac_dir in \ |
| 3763 | \ |
| 3764 | /usr/include/g++ \ |
| 3765 | /usr/include \ |
| 3766 | /usr/unsupported/include \ |
| 3767 | /opt/include \ |
| 3768 | $extra_include \ |
| 3769 | ; \ |
| 3770 | do |
| 3771 | if test -r "$ac_dir/$test_include"; then |
| 3772 | kde_cv_libgpp_includes=$ac_dir |
| 3773 | break |
| 3774 | fi |
| 3775 | done |
| 3776 | ]) |
| 3777 | |
| 3778 | AC_MSG_RESULT($kde_cv_libgpp_includes) |
| 3779 | if test "$kde_cv_libgpp_includes" != "no"; then |
| 3780 | all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES" |
| 3781 | fi |
| 3782 | ]) |
| 3783 | ]) |
| 3784 | |
| 3785 | |
| 3786 | AC_DEFUN(KDE_CHECK_MICO, |
| 3787 | [ |
| 3788 | AC_REQUIRE([KDE_CHECK_LIBDL]) |
| 3789 | AC_REQUIRE([KDE_MISC_TESTS]) |
| 3790 | AC_MSG_CHECKING(for MICO) |
| 3791 | |
| 3792 | if test -z "$MICODIR"; then |
| 3793 | kde_micodir=/usr/local |
| 3794 | else |
| 3795 | kde_micodir="$MICODIR" |
| 3796 | fi |
| 3797 | |
| 3798 | AC_ARG_WITH(micodir, |
| 3799 | [ --with-micodir=micodir where mico is installed ], |
| 3800 | kde_micodir=$withval, |
| 3801 | kde_micodir=$kde_micodir |
| 3802 | ) |
| 3803 | |
| 3804 | AC_CACHE_VAL(kde_cv_mico_incdir, |
| 3805 | [ |
| 3806 | mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes" |
| 3807 | AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir) |
| 3808 | |
| 3809 | ]) |
| 3810 | kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'` |
| 3811 | |
| 3812 | if test ! -r $kde_micodir/include/CORBA.h; then |
| 3813 | AC_MSG_ERROR([No CORBA.h found, specify another micodir]) |
| 3814 | fi |
| 3815 | |
| 3816 | AC_MSG_RESULT($kde_micodir) |
| 3817 | |
| 3818 | MICO_INCLUDES=-I$kde_micodir/include |
| 3819 | AC_SUBST(MICO_INCLUDES) |
| 3820 | MICO_LDFLAGS=-L$kde_micodir/lib |
| 3821 | AC_SUBST(MICO_LDFLAGS) |
| 3822 | micodir=$kde_micodir |
| 3823 | AC_SUBST(micodir) |
| 3824 | |
| 3825 | AC_MSG_CHECKING([for MICO version]) |
| 3826 | AC_CACHE_VAL(kde_cv_mico_version, |
| 3827 | [ |
| 3828 | AC_LANG_C |
| 3829 | cat >conftest.$ac_ext <<EOF |
| 3830 | #include <stdio.h> |
| 3831 | #include <mico/version.h> |
| 3832 | int main() { |
| 3833 | |
| 3834 | printf("MICO_VERSION=%s\n",MICO_VERSION); |
| 3835 | return (0); |
| 3836 | } |
| 3837 | EOF |
| 3838 | ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest' |
| 3839 | if AC_TRY_EVAL(ac_compile); then |
| 3840 | if eval `./conftest 2>&5`; then |
| 3841 | kde_cv_mico_version=$MICO_VERSION |
| 3842 | else |
| 3843 | AC_MSG_ERROR([your system is not able to execute a small application to |
| 3844 | find MICO version! Check $kde_micodir/include/mico/version.h]) |
| 3845 | fi |
| 3846 | else |
| 3847 | AC_MSG_ERROR([your system is not able to compile a small application to |
| 3848 | find MICO version! Check $kde_micodir/include/mico/version.h]) |
| 3849 | fi |
| 3850 | ]) |
| 3851 | |
| 3852 | dnl installed MICO version |
| 3853 | mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'` |
| 3854 | mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'` |
| 3855 | mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'` |
| 3856 | |
| 3857 | if test "x$1" = "x"; then |
| 3858 | req_version="2.3.0" |
| 3859 | else |
| 3860 | req_version=$1 |
| 3861 | fi |
| 3862 | |
| 3863 | dnl required MICO version |
| 3864 | req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'` |
| 3865 | req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'` |
| 3866 | req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'` |
| 3867 | |
| 3868 | if test "$mico_v_maj" -lt "$req_v_maj" || \ |
| 3869 | ( test "$mico_v_maj" -eq "$req_v_maj" && \ |
| 3870 | test "$mico_v_mid" -lt "$req_v_mid" ) || \ |
| 3871 | ( test "$mico_v_mid" -eq "$req_v_mid" && \ |
| 3872 | test "$mico_v_min" -lt "$req_v_min" ) |
| 3873 | |
| 3874 | then |
| 3875 | AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \ |
| 3876 | at least is required. You should upgrade MICO.]) |
| 3877 | else |
| 3878 | AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)]) |
| 3879 | fi |
| 3880 | |
| 3881 | LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL" |
| 3882 | AC_SUBST(LIBMICO) |
| 3883 | if test -z "$IDL"; then |
| 3884 | IDL='$(kde_bindir)/cuteidl' |
| 3885 | fi |
| 3886 | AC_SUBST(IDL) |
| 3887 | IDL_DEPENDENCIES='$(kde_includes)/CUTE.h' |
| 3888 | AC_SUBST(IDL_DEPENDENCIES) |
| 3889 | |
| 3890 | idldir="\$(includedir)/idl" |
| 3891 | AC_SUBST(idldir) |
| 3892 | |
| 3893 | ]) |
| 3894 | |
| 3895 | AC_DEFUN(KDE_CHECK_MINI_STL, |
| 3896 | [ |
| 3897 | AC_REQUIRE([KDE_CHECK_MICO]) |
| 3898 | |
| 3899 | AC_MSG_CHECKING(if we use mico's mini-STL) |
| 3900 | AC_CACHE_VAL(kde_cv_have_mini_stl, |
| 3901 | [ |
| 3902 | AC_LANG_SAVE |
| 3903 | AC_LANG_CPLUSPLUS |
| 3904 | kde_save_cxxflags="$CXXFLAGS" |
| 3905 | CXXFLAGS="$CXXFLAGS $MICO_INCLUDES" |
| 3906 | AC_TRY_COMPILE( |
| 3907 | [ |
| 3908 | #include <mico/config.h> |
| 3909 | ], |
| 3910 | [ |
| 3911 | #ifdef HAVE_MINI_STL |
| 3912 | #error "nothing" |
| 3913 | #endif |
| 3914 | ], |
| 3915 | kde_cv_have_mini_stl=no, |
| 3916 | kde_cv_have_mini_stl=yes) |
| 3917 | CXXFLAGS="$kde_save_cxxflags" |
| 3918 | AC_LANG_RESTORE |
| 3919 | ]) |
| 3920 | |
| 3921 | if test "x$kde_cv_have_mini_stl" = "xyes"; then |
| 3922 | AC_MSG_RESULT(yes) |
| 3923 | $1 |
| 3924 | else |
| 3925 | AC_MSG_RESULT(no) |
| 3926 | $2 |
| 3927 | fi |
| 3928 | ]) |
| 3929 | |
| 3930 | ]) |
| 3931 | |
| 3932 | |
| 3933 | AC_DEFUN(KDE_CHECK_LIBPTHREAD, |
| 3934 | [ |
| 3935 | AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] ) |
| 3936 | AC_SUBST(LIBPTHREAD) |
| 3937 | ]) |
| 3938 | |
| 3939 | AC_DEFUN(KDE_CHECK_PTHREAD_OPTION, |
| 3940 | [ |
| 3941 | AC_ARG_ENABLE(kernel-threads, [ --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.], |
| 3942 | kde_use_kernthreads=$enableval, kde_use_kernthreads=no) |
| 3943 | |
| 3944 | if test "$kde_use_kernthreads" = "yes"; then |
| 3945 | ac_save_CXXFLAGS="$CXXFLAGS" |
| 3946 | ac_save_CFLAGS="$CFLAGS" |
| 3947 | CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS" |
| 3948 | CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS" |
| 3949 | AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h) |
| 3950 | CXXFLAGS="$ac_save_CXXFLAGS" |
| 3951 | CFLAGS="$ac_save_CFLAGS" |
| 3952 | if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then |
| 3953 | kde_use_kernthreads=no |
| 3954 | else |
| 3955 | dnl Add proper -I and -l statements |
| 3956 | AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD |
| 3957 | if test "x$LIBPTHREAD" = "x"; then |
| 3958 | kde_use_kernthreads=no |
| 3959 | else |
| 3960 | USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads" |
| 3961 | fi |
| 3962 | fi |
| 3963 | else |
| 3964 | USE_THREADS="" |
| 3965 | if test -z "$LIBPTHREAD"; then |
| 3966 | KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] ) |
| 3967 | fi |
| 3968 | fi |
| 3969 | |
| 3970 | AH_VERBATIM(__svr_define, [ |
| 3971 | #if defined(__SVR4) && !defined(__svr4__) |
| 3972 | #define __svr4__ 1 |
| 3973 | #endif |
| 3974 | ]) |
| 3975 | case $host_os in |
| 3976 | solaris*) |
| 3977 | KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"]) |
| 3978 | CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4" |
| 3979 | ;; |
| 3980 | freebsd*) |
| 3981 | CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" |
| 3982 | ;; |
| 3983 | aix*) |
| 3984 | CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" |
| 3985 | LIBPTHREAD="$LIBPTHREAD -lc_r" |
| 3986 | ;; |
| 3987 | linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" |
| 3988 | if test "$CXX" = "KCC"; then |
| 3989 | CXXFLAGS="$CXXFLAGS --thread_safe" |
| 3990 | NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe" |
| 3991 | fi |
| 3992 | ;; |
| 3993 | *) |
| 3994 | ;; |
| 3995 | esac |
| 3996 | AC_SUBST(USE_THREADS) |
| 3997 | AC_SUBST(LIBPTHREAD) |
| 3998 | ]) |
| 3999 | |
| 4000 | AC_DEFUN(KDE_CHECK_THREADING, |
| 4001 | [ |
| 4002 | AC_REQUIRE([KDE_CHECK_LIBPTHREAD]) |
| 4003 | AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION]) |
| 4004 | dnl default is yes if libpthread is found and no if no libpthread is available |
| 4005 | if test -z "$LIBPTHREAD"; then |
| 4006 | if test -z "$USE_THREADS"; then |
| 4007 | kde_check_threading_default=no |
| 4008 | else |
| 4009 | kde_check_threading_default=yes |
| 4010 | fi |
| 4011 | else |
| 4012 | kde_check_threading_default=yes |
| 4013 | fi |
| 4014 | AC_ARG_ENABLE(threading, [ --disable-threading disables threading even if libpthread found ], |
| 4015 | kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default) |
| 4016 | if test "x$kde_use_threading" = "xyes"; then |
| 4017 | AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)]) |
| 4018 | fi |
| 4019 | ]) |
| 4020 | |
| 4021 | AC_DEFUN(KDE_TRY_LINK_PYTHON, |
| 4022 | [ |
| 4023 | if test "$kde_python_link_found" = no; then |
| 4024 | |
| 4025 | if test "$1" = normal; then |
| 4026 | AC_MSG_CHECKING(if a Python application links) |
| 4027 | else |
| 4028 | AC_MSG_CHECKING(if Python depends on $2) |
| 4029 | fi |
| 4030 | |
| 4031 | AC_CACHE_VAL(kde_cv_try_link_python_$1, |
| 4032 | [ |
| 4033 | AC_LANG_SAVE |
| 4034 | AC_LANG_C |
| 4035 | kde_save_cflags="$CFLAGS" |
| 4036 | CFLAGS="$CFLAGS $PYTHONINC" |
| 4037 | kde_save_libs="$LIBS" |
| 4038 | LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET" |
| 4039 | kde_save_ldflags="$LDFLAGS" |
| 4040 | LDFLAGS="$LDFLAGS $PYTHONLIB" |
| 4041 | |
| 4042 | AC_TRY_LINK( |
| 4043 | [ |
| 4044 | #include <Python.h> |
| 4045 | ],[ |
| 4046 | PySys_SetArgv(1, 0); |
| 4047 | ], |
| 4048 | [kde_cv_try_link_python_$1=yes], |
| 4049 | [kde_cv_try_link_python_$1=no] |
| 4050 | ) |
| 4051 | CFLAGS="$kde_save_cflags" |
| 4052 | LIBS="$kde_save_libs" |
| 4053 | LDFLAGS="$kde_save_ldflags" |
| 4054 | ]) |
| 4055 | |
| 4056 | if test "$kde_cv_try_link_python_$1" = "yes"; then |
| 4057 | AC_MSG_RESULT(yes) |
| 4058 | kde_python_link_found=yes |
| 4059 | if test ! "$1" = normal; then |
| 4060 | LIBPYTHON="$LIBPYTHON $2" |
| 4061 | fi |
| 4062 | $3 |
| 4063 | else |
| 4064 | AC_MSG_RESULT(no) |
| 4065 | $4 |
| 4066 | fi |
| 4067 | AC_LANG_RESTORE |
| 4068 | |
| 4069 | fi |
| 4070 | |
| 4071 | ]) |
| 4072 | |
| 4073 | AC_DEFUN(KDE_CHECK_PYTHON_DIR, |
| 4074 | [ |
| 4075 | AC_MSG_CHECKING([for Python directory]) |
| 4076 | |
| 4077 | AC_CACHE_VAL(kde_cv_pythondir, |
| 4078 | [ |
| 4079 | if test -z "$PYTHONDIR"; then |
| 4080 | kde_cv_pythondir=/usr/local |
| 4081 | else |
| 4082 | kde_cv_pythondir="$PYTHONDIR" |
| 4083 | fi |
| 4084 | ]) |
| 4085 | |
| 4086 | AC_ARG_WITH(pythondir, |
| 4087 | [ --with-pythondir=pythondir use python installed in pythondir ], |
| 4088 | [ |
| 4089 | ac_python_dir=$withval |
| 4090 | ], ac_python_dir=$kde_cv_pythondir |
| 4091 | ) |
| 4092 | |
| 4093 | AC_MSG_RESULT($ac_python_dir) |
| 4094 | ]) |
| 4095 | |
| 4096 | AC_DEFUN(KDE_CHECK_PYTHON_INTERN, |
| 4097 | [ |
| 4098 | AC_REQUIRE([KDE_CHECK_LIBDL]) |
| 4099 | AC_REQUIRE([KDE_CHECK_LIBPTHREAD]) |
| 4100 | AC_REQUIRE([KDE_CHECK_PYTHON_DIR]) |
| 4101 | |
| 4102 | if test -z "$1"; then |
| 4103 | version="1.5" |
| 4104 | else |
| 4105 | version="$1" |
| 4106 | fi |
| 4107 | |
| 4108 | AC_MSG_CHECKING([for Python$version]) |
| 4109 | |
| 4110 | python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes" |
| 4111 | AC_FIND_FILE(Python.h, $python_incdirs, python_incdir) |
| 4112 | if test ! -r $python_incdir/Python.h; then |
| 4113 | AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir) |
| 4114 | python_incdir=$python_incdir/python$version |
| 4115 | if test ! -r $python_incdir/Python.h; then |
| 4116 | python_incdir=no |
| 4117 | fi |
| 4118 | fi |
| 4119 | |
| 4120 | PYTHONINC=-I$python_incdir |
| 4121 | |
| 4122 | python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs" |
| 4123 | AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir) |
| 4124 | if test ! -r $python_libdir/libpython$version.a; then |
| 4125 | AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir) |
| 4126 | python_libdir=$python_libdir/python$version/config |
| 4127 | if test ! -r $python_libdir/libpython$version.a; then |
| 4128 | python_libdir=no |
| 4129 | fi |
| 4130 | fi |
| 4131 | |
| 4132 | PYTHONLIB=-L$python_libdir |
| 4133 | kde_orig_LIBPYTHON=$LIBPYTHON |
| 4134 | if test -z "$LIBPYTHON"; then |
| 4135 | LIBPYTHON=-lpython$version |
| 4136 | fi |
| 4137 | |
| 4138 | python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs" |
| 4139 | AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir) |
| 4140 | python_moddir=$python_moddir/python$version |
| 4141 | if test ! -r $python_moddir/copy.py; then |
| 4142 | python_moddir=no |
| 4143 | fi |
| 4144 | |
| 4145 | PYTHONMODDIR=$python_moddir |
| 4146 | |
| 4147 | AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir) |
| 4148 | |
| 4149 | if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then |
| 4150 | LIBPYTHON=$kde_orig_LIBPYTHON |
| 4151 | test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB="" |
| 4152 | test "x$PYTHONINC" = "x-Ino" && PYTHONINC="" |
| 4153 | $2 |
| 4154 | else |
| 4155 | dnl Note: this test is very weak |
| 4156 | kde_python_link_found=no |
| 4157 | KDE_TRY_LINK_PYTHON(normal) |
| 4158 | KDE_TRY_LINK_PYTHON(m, -lm) |
| 4159 | KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD) |
| 4160 | KDE_TRY_LINK_PYTHON(tcl, -ltcl) |
| 4161 | KDE_TRY_LINK_PYTHON(db2, -ldb2) |
| 4162 | KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm]) |
| 4163 | KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil]) |
| 4164 | KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil]) |
| 4165 | KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3]) |
| 4166 | KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil]) |
| 4167 | KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm]) |
| 4168 | KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [], |
| 4169 | [AC_MSG_WARN([it seems, Python depends on another library. |
| 4170 | Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this |
| 4171 | and contact the authors to let them know about this problem]) |
| 4172 | ]) |
| 4173 | |
| 4174 | LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET" |
| 4175 | AC_SUBST(PYTHONINC) |
| 4176 | AC_SUBST(PYTHONLIB) |
| 4177 | AC_SUBST(LIBPYTHON) |
| 4178 | AC_SUBST(PYTHONMODDIR) |
| 4179 | AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python]) |
| 4180 | fi |
| 4181 | |
| 4182 | ]) |
| 4183 | |
| 4184 | |
| 4185 | AC_DEFUN(KDE_CHECK_PYTHON, |
| 4186 | [ |
| 4187 | KDE_CHECK_PYTHON_INTERN("2.2", |
| 4188 | [KDE_CHECK_PYTHON_INTERN("2.1", |
| 4189 | [KDE_CHECK_PYTHON_INTERN("2.0", [ KDE_CHECK_PYTHON_INTERN($1, $2) ]) |
| 4190 | ])]) |
| 4191 | ]) |
| 4192 | |
| 4193 | AC_DEFUN(KDE_CHECK_STL_SGI, |
| 4194 | [ |
| 4195 | AC_MSG_CHECKING([if STL implementation is SGI like]) |
| 4196 | AC_CACHE_VAL(kde_cv_stl_type_sgi, |
| 4197 | [ |
| 4198 | AC_TRY_COMPILE([ |
| 4199 | #include <string> |
| 4200 | using namespace std; |
| 4201 | ],[ |
| 4202 | string astring="Hallo Welt."; |
| 4203 | astring.erase(0, 6); // now astring is "Welt" |
| 4204 | return 0; |
| 4205 | ], kde_cv_stl_type_sgi=yes, |
| 4206 | kde_cv_stl_type_sgi=no) |
| 4207 | ]) |
| 4208 | |
| 4209 | AC_MSG_RESULT($kde_cv_stl_type_sgi) |
| 4210 | |
| 4211 | if test "$kde_cv_stl_type_sgi" = "yes"; then |
| 4212 | AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI]) |
| 4213 | fi |
| 4214 | ]) |
| 4215 | |
| 4216 | AC_DEFUN(KDE_CHECK_STL_HP, |
| 4217 | [ |
| 4218 | AC_MSG_CHECKING([if STL implementation is HP like]) |
| 4219 | AC_CACHE_VAL(kde_cv_stl_type_hp, |
| 4220 | [ |
| 4221 | AC_TRY_COMPILE([ |
| 4222 | #include <string> |
| 4223 | using namespace std; |
| 4224 | ],[ |
| 4225 | string astring="Hello World"; |
| 4226 | astring.remove(0, 6); // now astring is "World" |
| 4227 | return 0; |
| 4228 | ], kde_cv_stl_type_hp=yes, |
| 4229 | kde_cv_stl_type_hp=no) |
| 4230 | ]) |
| 4231 | AC_MSG_RESULT($kde_cv_stl_type_hp) |
| 4232 | |
| 4233 | if test "$kde_cv_stl_type_hp" = "yes"; then |
| 4234 | AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP]) |
| 4235 | fi |
| 4236 | ]) |
| 4237 | |
| 4238 | AC_DEFUN(KDE_CHECK_STL, |
| 4239 | [ |
| 4240 | AC_LANG_SAVE |
| 4241 | AC_LANG_CPLUSPLUS |
| 4242 | ac_save_CXXFLAGS="$CXXFLAGS" |
| 4243 | CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`" |
| 4244 | KDE_CHECK_STL_SGI |
| 4245 | |
| 4246 | if test "$kde_cv_stl_type_sgi" = "no"; then |
| 4247 | KDE_CHECK_STL_HP |
| 4248 | |
| 4249 | if test "$kde_cv_stl_type_hp" = "no"; then |
| 4250 | AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?") |
| 4251 | fi |
| 4252 | fi |
| 4253 | |
| 4254 | CXXFLAGS="$ac_save_CXXFLAGS" |
| 4255 | AC_LANG_RESTORE |
| 4256 | ]) |
| 4257 | |
| 4258 | AC_DEFUN(AC_FIND_QIMGIO, |
| 4259 | [AC_REQUIRE([AC_FIND_JPEG]) |
| 4260 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 4261 | AC_MSG_CHECKING([for qimgio]) |
| 4262 | AC_CACHE_VAL(ac_cv_lib_qimgio, |
| 4263 | [ |
| 4264 | AC_LANG_SAVE |
| 4265 | AC_LANG_CPLUSPLUS |
| 4266 | ac_save_LIBS="$LIBS" |
| 4267 | ac_save_CXXFLAGS="$CXXFLAGS" |
| 4268 | LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT" |
| 4269 | CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" |
| 4270 | AC_TRY_RUN(dnl |
| 4271 | [ |
| 4272 | #include <qimageio.h> |
| 4273 | #include <qstring.h> |
| 4274 | int main() { |
| 4275 | QString t = "hallo"; |
| 4276 | t.fill('t'); |
| 4277 | qInitImageIO(); |
| 4278 | } |
| 4279 | ], |
| 4280 | ac_cv_lib_qimgio=yes, |
| 4281 | ac_cv_lib_qimgio=no, |
| 4282 | ac_cv_lib_qimgio=no) |
| 4283 | LIBS="$ac_save_LIBS" |
| 4284 | CXXFLAGS="$ac_save_CXXFLAGS" |
| 4285 | AC_LANG_RESTORE |
| 4286 | ])dnl |
| 4287 | if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then |
| 4288 | LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG" |
| 4289 | AC_MSG_RESULT(yes) |
| 4290 | AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available]) |
| 4291 | AC_SUBST(LIBQIMGIO) |
| 4292 | else |
| 4293 | AC_MSG_RESULT(not found) |
| 4294 | fi |
| 4295 | ]) |
| 4296 | |
| 4297 | AC_DEFUN(KDE_CHECK_ANSI, |
| 4298 | [ |
| 4299 | ]) |
| 4300 | |
| 4301 | AC_DEFUN(KDE_CHECK_INSURE, |
| 4302 | [ |
| 4303 | AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]], |
| 4304 | [ |
| 4305 | if test $enableval = "no"; dnl |
| 4306 | then ac_use_insure="no" |
| 4307 | else ac_use_insure="yes" |
| 4308 | fi |
| 4309 | ], [ac_use_insure="no"]) |
| 4310 | |
| 4311 | AC_MSG_CHECKING(if we will use Insure++ to debug) |
| 4312 | AC_MSG_RESULT($ac_use_insure) |
| 4313 | if test "$ac_use_insure" = "yes"; dnl |
| 4314 | then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "???? |
| 4315 | fi |
| 4316 | ]) |
| 4317 | |
| 4318 | AC_DEFUN(AM_DISABLE_LIBRARIES, |
| 4319 | [ |
| 4320 | AC_PROVIDE([AM_ENABLE_STATIC]) |
| 4321 | AC_PROVIDE([AM_ENABLE_SHARED]) |
| 4322 | enable_static=no |
| 4323 | enable_shared=yes |
| 4324 | ]) |
| 4325 | |
| 4326 | |
| 4327 | AC_DEFUN(AC_CHECK_UTMP_FILE, |
| 4328 | [ |
| 4329 | AC_MSG_CHECKING([for utmp file]) |
| 4330 | |
| 4331 | AC_CACHE_VAL(kde_cv_utmp_file, |
| 4332 | [ |
| 4333 | kde_cv_utmp_file=no |
| 4334 | |
| 4335 | for ac_file in \ |
| 4336 | \ |
| 4337 | /var/run/utmp \ |
| 4338 | /var/adm/utmp \ |
| 4339 | /etc/utmp \ |
| 4340 | ; \ |
| 4341 | do |
| 4342 | if test -r "$ac_file"; then |
| 4343 | kde_cv_utmp_file=$ac_file |
| 4344 | break |
| 4345 | fi |
| 4346 | done |
| 4347 | ]) |
| 4348 | |
| 4349 | if test "$kde_cv_utmp_file" != "no"; then |
| 4350 | AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries]) |
| 4351 | $1 |
| 4352 | AC_MSG_RESULT($kde_cv_utmp_file) |
| 4353 | else |
| 4354 | $2 |
| 4355 | AC_MSG_RESULT([non found]) |
| 4356 | fi |
| 4357 | ]) |
| 4358 | |
| 4359 | |
| 4360 | AC_DEFUN(KDE_CREATE_SUBDIRSLIST, |
| 4361 | [ |
| 4362 | |
| 4363 | DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin" |
| 4364 | |
| 4365 | if test ! -s $srcdir/subdirs; then |
| 4366 | dnl Note: Makefile.common creates subdirs, so this is just a fallback |
| 4367 | TOPSUBDIRS="" |
| 4368 | files=`cd $srcdir && ls -1` |
| 4369 | dirs=`for i in $files; do if test -d $i; then echo $i; fi; done` |
| 4370 | for i in $dirs; do |
| 4371 | echo $i >> $srcdir/subdirs |
| 4372 | done |
| 4373 | fi |
| 4374 | |
| 4375 | if test -s $srcdir/inst-apps; then |
| 4376 | ac_topsubdirs="`cat $srcdir/inst-apps`" |
| 4377 | else |
| 4378 | ac_topsubdirs="`cat $srcdir/subdirs`" |
| 4379 | fi |
| 4380 | |
| 4381 | for i in $ac_topsubdirs; do |
| 4382 | AC_MSG_CHECKING([if $i should be compiled]) |
| 4383 | if test -d $srcdir/$i; then |
| 4384 | install_it="yes" |
| 4385 | for j in $DO_NOT_COMPILE; do |
| 4386 | if test $i = $j; then |
| 4387 | install_it="no" |
| 4388 | fi |
| 4389 | done |
| 4390 | else |
| 4391 | install_it="no" |
| 4392 | fi |
| 4393 | AC_MSG_RESULT($install_it) |
| 4394 | vari=`echo $i | sed -e 's,[[-+.]],_,g'` |
| 4395 | if test $install_it = "yes"; then |
| 4396 | TOPSUBDIRS="$TOPSUBDIRS $i" |
| 4397 | eval "$vari""_SUBDIR_included=yes" |
| 4398 | else |
| 4399 | eval "$vari""_SUBDIR_included=no" |
| 4400 | fi |
| 4401 | done |
| 4402 | |
| 4403 | AC_SUBST(TOPSUBDIRS) |
| 4404 | ]) |
| 4405 | |
| 4406 | AC_DEFUN(KDE_CHECK_NAMESPACES, |
| 4407 | [ |
| 4408 | AC_MSG_CHECKING(whether C++ compiler supports namespaces) |
| 4409 | AC_LANG_SAVE |
| 4410 | AC_LANG_CPLUSPLUS |
| 4411 | AC_TRY_COMPILE([ |
| 4412 | ], |
| 4413 | [ |
| 4414 | namespace Foo { |
| 4415 | extern int i; |
| 4416 | namespace Bar { |
| 4417 | extern int i; |
| 4418 | } |
| 4419 | } |
| 4420 | |
| 4421 | int Foo::i = 0; |
| 4422 | int Foo::Bar::i = 1; |
| 4423 | ],[ |
| 4424 | AC_MSG_RESULT(yes) |
| 4425 | AC_DEFINE(HAVE_NAMESPACES) |
| 4426 | ], [ |
| 4427 | AC_MSG_RESULT(no) |
| 4428 | ]) |
| 4429 | AC_LANG_RESTORE |
| 4430 | ]) |
| 4431 | |
| 4432 | AC_DEFUN(KDE_CHECK_NEWLIBS, |
| 4433 | [ |
| 4434 | |
| 4435 | ]) |
| 4436 | |
| 4437 | dnl ------------------------------------------------------------------------ |
| 4438 | dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org |
| 4439 | dnl ------------------------------------------------------------------------ |
| 4440 | dnl |
| 4441 | AC_DEFUN(AC_CHECK_S_ISSOCK, |
| 4442 | [ |
| 4443 | AC_MSG_CHECKING(for S_ISSOCK) |
| 4444 | AC_CACHE_VAL(ac_cv_have_s_issock, |
| 4445 | [ |
| 4446 | AC_LANG_SAVE |
| 4447 | AC_LANG_C |
| 4448 | AC_TRY_LINK( |
| 4449 | [ |
| 4450 | #include <sys/stat.h> |
| 4451 | ], |
| 4452 | [ |
| 4453 | struct stat buff; |
| 4454 | int b = S_ISSOCK( buff.st_mode ); |
| 4455 | ], |
| 4456 | ac_cv_have_s_issock=yes, |
| 4457 | ac_cv_have_s_issock=no) |
| 4458 | AC_LANG_RESTORE |
| 4459 | ]) |
| 4460 | AC_MSG_RESULT($ac_cv_have_s_issock) |
| 4461 | if test "$ac_cv_have_s_issock" = "yes"; then |
| 4462 | AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.]) |
| 4463 | fi |
| 4464 | |
| 4465 | AH_VERBATIM(_ISSOCK, |
| 4466 | [ |
| 4467 | #ifndef HAVE_S_ISSOCK |
| 4468 | #define HAVE_S_ISSOCK |
| 4469 | #define S_ISSOCK(mode) (1==0) |
| 4470 | #endif |
| 4471 | ]) |
| 4472 | |
| 4473 | ]) |
| 4474 | |
| 4475 | dnl ------------------------------------------------------------------------ |
| 4476 | dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org |
| 4477 | dnl ------------------------------------------------------------------------ |
| 4478 | dnl |
| 4479 | AC_DEFUN(AC_CHECK_KDEMAXPATHLEN, |
| 4480 | [ |
| 4481 | AC_MSG_CHECKING(for MAXPATHLEN) |
| 4482 | AC_CACHE_VAL(ac_cv_maxpathlen, |
| 4483 | [ |
| 4484 | AC_LANG_C |
| 4485 | cat > conftest.$ac_ext <<EOF |
| 4486 | #ifdef STDC_HEADERS |
| 4487 | # include <stdlib.h> |
| 4488 | #endif |
| 4489 | #include <stdio.h> |
| 4490 | #include <sys/param.h> |
| 4491 | #ifndef MAXPATHLEN |
| 4492 | #define MAXPATHLEN 1024 |
| 4493 | #endif |
| 4494 | |
| 4495 | KDE_HELLO MAXPATHLEN |
| 4496 | |
| 4497 | EOF |
| 4498 | |
| 4499 | ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out" |
| 4500 | |
| 4501 | if AC_TRY_EVAL(ac_try) && test -s conftest.out; then |
| 4502 | ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out` |
| 4503 | else |
| 4504 | ac_cv_maxpathlen=1024 |
| 4505 | fi |
| 4506 | |
| 4507 | rm conftest.* |
| 4508 | |
| 4509 | ]) |
| 4510 | AC_MSG_RESULT($ac_cv_maxpathlen) |
| 4511 | AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] ) |
| 4512 | ]) |
| 4513 | |
| 4514 | dnl ------------------------------------------------------------------------- |
| 4515 | dnl See if the compiler supports a template repository bero@redhat.de |
| 4516 | dnl ------------------------------------------------------------------------- |
| 4517 | AC_DEFUN(KDE_COMPILER_REPO, |
| 4518 | [ |
| 4519 | REPO="" |
| 4520 | NOREPO="" |
| 4521 | |
| 4522 | KDE_CHECK_COMPILER_FLAG(frepo, |
| 4523 | [ |
| 4524 | REPO="-frepo" |
| 4525 | NOREPO="-fno-repo" |
| 4526 | ]) |
| 4527 | |
| 4528 | if test -z "$REPO"; then |
| 4529 | KDE_CHECK_COMPILER_FLAG(instances=explicit, |
| 4530 | [ |
| 4531 | REPO="-instances=explicit" |
| 4532 | NOREPO="-instances=extern" |
| 4533 | ]) |
| 4534 | fi |
| 4535 | |
| 4536 | if test -n "$REPO"; then |
| 4537 | AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1, |
| 4538 | [C++ compiler supports template repository]) |
| 4539 | $1 |
| 4540 | fi |
| 4541 | |
| 4542 | AC_SUBST(REPO) |
| 4543 | AC_SUBST(NOREPO) |
| 4544 | ]) |
| 4545 | |
| 4546 | AC_DEFUN(KDE_CHECK_HEADER, |
| 4547 | [ |
| 4548 | AC_LANG_SAVE |
| 4549 | kde_safe_cppflags=$CPPFLAGS |
| 4550 | CPPFLAGS="$CPPFLAGS $all_includes" |
| 4551 | AC_LANG_CPLUSPLUS |
| 4552 | AC_CHECK_HEADER($1, $2, $3) |
| 4553 | CPPFLAGS=$kde_safe_cppflags |
| 4554 | AC_LANG_RESTORE |
| 4555 | ]) |
| 4556 | |
| 4557 | AC_DEFUN(KDE_CHECK_HEADERS, |
| 4558 | [ |
| 4559 | AH_CHECK_HEADERS([$1]) |
| 4560 | AC_LANG_SAVE |
| 4561 | kde_safe_cppflags=$CPPFLAGS |
| 4562 | CPPFLAGS="$CPPFLAGS $all_includes" |
| 4563 | AC_LANG_CPLUSPLUS |
| 4564 | AC_CHECK_HEADERS([$1], [$2], [$3], [$4]) |
| 4565 | CPPFLAGS=$kde_safe_cppflags |
| 4566 | AC_LANG_RESTORE |
| 4567 | ]) |
| 4568 | |
| 4569 | AC_DEFUN(KDE_FAST_CONFIGURE, |
| 4570 | [ |
| 4571 | dnl makes configure fast (needs perl) |
| 4572 | AC_ARG_ENABLE(fast-perl, [ --disable-fast-perl disable fast Makefile generation (needs perl)], |
| 4573 | with_fast_perl=$enableval, with_fast_perl=yes) |
| 4574 | ]) |
| 4575 | |
| 4576 | AC_DEFUN(KDE_CONF_FILES, |
| 4577 | [ |
| 4578 | val= |
| 4579 | if test -f $srcdir/configure.files ; then |
| 4580 | val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files` |
| 4581 | fi |
| 4582 | CONF_FILES= |
| 4583 | if test -n "$val" ; then |
| 4584 | for i in $val ; do |
| 4585 | CONF_FILES="$CONF_FILES $i" |
| 4586 | done |
| 4587 | fi |
| 4588 | AC_SUBST(CONF_FILES) |
| 4589 | ])dnl |
| 4590 | |
| 4591 | AC_DEFUN(KDE_SET_PREFIX, |
| 4592 | [ |
| 4593 | unset CDPATH |
| 4594 | dnl make $KDEDIR the default for the installation |
| 4595 | AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde}) |
| 4596 | |
| 4597 | if test "x$prefix" = "xNONE"; then |
| 4598 | prefix=$ac_default_prefix |
| 4599 | ac_configure_args="$ac_configure_args --prefix=$prefix" |
| 4600 | fi |
| 4601 | # And delete superflous '/' to make compares easier |
| 4602 | prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'` |
| 4603 | exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'` |
| 4604 | KDE_FAST_CONFIGURE |
| 4605 | KDE_CONF_FILES |
| 4606 | ]) |
| 4607 | |
| 4608 | pushdef([AC_PROG_INSTALL], |
| 4609 | [ |
| 4610 | dnl our own version, testing for a -p flag |
| 4611 | popdef([AC_PROG_INSTALL]) |
| 4612 | dnl as AC_PROG_INSTALL works as it works we first have |
| 4613 | dnl to save if the user didn't specify INSTALL, as the |
| 4614 | dnl autoconf one overwrites INSTALL and we have no chance to find |
| 4615 | dnl out afterwards |
| 4616 | test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL |
| 4617 | test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM |
| 4618 | test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT |
| 4619 | AC_PROG_INSTALL |
| 4620 | |
| 4621 | if test -z "$kde_save_INSTALL_given" ; then |
| 4622 | # OK, user hasn't given any INSTALL, autoconf found one for us |
| 4623 | # now we test, if it supports the -p flag |
| 4624 | AC_MSG_CHECKING(for -p flag to install) |
| 4625 | rm -f confinst.$$.* > /dev/null 2>&1 |
| 4626 | echo "Testtest" > confinst.$$.orig |
| 4627 | ac_res=no |
| 4628 | if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then |
| 4629 | if test -f confinst.$$.new ; then |
| 4630 | # OK, -p seems to do no harm to install |
| 4631 | INSTALL="${INSTALL} -p" |
| 4632 | ac_res=yes |
| 4633 | fi |
| 4634 | fi |
| 4635 | rm -f confinst.$$.* |
| 4636 | AC_MSG_RESULT($ac_res) |
| 4637 | fi |
| 4638 | dnl the following tries to resolve some signs and wonders coming up |
| 4639 | dnl with different autoconf/automake versions |
| 4640 | dnl e.g.: |
| 4641 | dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s |
| 4642 | dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS) |
| 4643 | dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s |
| 4644 | dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has |
| 4645 | dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the |
| 4646 | dnl install-@DIR@PROGRAMS targets to explicitly use that flag |
| 4647 | dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as |
| 4648 | dnl INSTALL_SCRIPT, which breaks with automake <= 1.4 |
| 4649 | dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure |
| 4650 | dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from |
| 4651 | dnl automake (due to broken Makefile.am or whatever) to install programs, |
| 4652 | dnl and so does not see the -s flag in automake > 1.4 |
| 4653 | dnl to clean up that mess we: |
| 4654 | dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG |
| 4655 | dnl which cleans KDE's program with automake > 1.4; |
| 4656 | dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems |
| 4657 | dnl with automake<=1.4 |
| 4658 | dnl note that dues to this sometimes two '-s' flags are used (if KDE |
| 4659 | dnl properly uses install-@DIR@PROGRAMS, but I don't care |
| 4660 | dnl |
| 4661 | dnl And to all this comes, that I even can't write in comments variable |
| 4662 | dnl names used by automake, because it is so stupid to think I wanted to |
| 4663 | dnl _use_ them, therefor I have written A_M_... instead of AM_ |
| 4664 | dnl hmm, I wanted to say something ... ahh yes: Arghhh. |
| 4665 | |
| 4666 | if test -z "$kde_save_INSTALL_PROGRAM_given" ; then |
| 4667 | INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)' |
| 4668 | fi |
| 4669 | if test -z "$kde_save_INSTALL_SCRIPT_given" ; then |
| 4670 | INSTALL_SCRIPT='${INSTALL}' |
| 4671 | fi |
| 4672 | ])dnl |
| 4673 | |
| 4674 | AC_DEFUN(KDE_LANG_CPLUSPLUS, |
| 4675 | [AC_LANG_CPLUSPLUS |
| 4676 | ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' |
| 4677 | pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS]) |
| 4678 | ]) |
| 4679 | |
| 4680 | pushdef([AC_LANG_CPLUSPLUS], |
| 4681 | [popdef([AC_LANG_CPLUSPLUS]) |
| 4682 | KDE_LANG_CPLUSPLUS |
| 4683 | ]) |
| 4684 | |
| 4685 | AC_DEFUN(KDE_CHECK_LONG_LONG, |
| 4686 | [ |
| 4687 | AC_MSG_CHECKING(for long long) |
| 4688 | AC_CACHE_VAL(kde_cv_c_long_long, |
| 4689 | [ |
| 4690 | AC_LANG_SAVE |
| 4691 | AC_LANG_CPLUSPLUS |
| 4692 | AC_TRY_LINK([], [ |
| 4693 | long long foo = 0; |
| 4694 | foo = foo+1; |
| 4695 | ], |
| 4696 | kde_cv_c_long_long=yes, kde_cv_c_long_long=no) |
| 4697 | AC_LANG_RESTORE |
| 4698 | ]) |
| 4699 | AC_MSG_RESULT($kde_cv_c_long_long) |
| 4700 | if test "$kde_cv_c_long_long" = yes; then |
| 4701 | AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype]) |
| 4702 | fi |
| 4703 | ]) |
| 4704 | |
| 4705 | AC_DEFUN(KDE_CHECK_LIB, |
| 4706 | [ |
| 4707 | kde_save_LDFLAGS="$LDFLAGS" |
| 4708 | dnl AC_CHECK_LIB modifies LIBS, so save it here |
| 4709 | kde_save_LIBS="$LIBS" |
| 4710 | LDFLAGS="$LDFLAGS $all_libraries" |
| 4711 | case $host_os in |
| 4712 | aix*) LDFLAGS="-brtl $LDFLAGS" |
| 4713 | test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS" |
| 4714 | ;; |
| 4715 | esac |
| 4716 | AC_CHECK_LIB($1, $2, $3, $4, $5) |
| 4717 | LDFLAGS="$kde_save_LDFLAGS" |
| 4718 | LIBS="$kde_save_LIBS" |
| 4719 | ]) |
| 4720 | |
| 4721 | AC_DEFUN(KDE_JAVA_PREFIX, |
| 4722 | [ |
| 4723 | dir=`dirname "$1"` |
| 4724 | base=`basename "$1"` |
| 4725 | list=`ls -1 $dir 2> /dev/null` |
| 4726 | for entry in $list; do |
| 4727 | if test -d $dir/$entry/bin; then |
| 4728 | case $entry in |
| 4729 | $base) |
| 4730 | javadirs="$javadirs $dir/$entry/bin" |
| 4731 | ;; |
| 4732 | esac |
| 4733 | elif test -d $dir/$entry/jre/bin; then |
| 4734 | case $entry in |
| 4735 | $base) |
| 4736 | javadirs="$javadirs $dir/$entry/jre/bin" |
| 4737 | ;; |
| 4738 | esac |
| 4739 | fi |
| 4740 | done |
| 4741 | ]) |
| 4742 | |
| 4743 | dnl KDE_CHEC_JAVA_DIR(onlyjre) |
| 4744 | AC_DEFUN(KDE_CHECK_JAVA_DIR, |
| 4745 | [ |
| 4746 | |
| 4747 | AC_ARG_WITH(java, |
| 4748 | [ --with-java=javadir use java installed in javadir, --without-java disables ], |
| 4749 | [ ac_java_dir=$withval |
| 4750 | ], ac_java_dir="" |
| 4751 | ) |
| 4752 | |
| 4753 | AC_MSG_CHECKING([for Java]) |
| 4754 | |
| 4755 | dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH |
| 4756 | if test "x$ac_java_dir" = "xno"; then |
| 4757 | kde_java_bindir=no |
| 4758 | kde_java_includedir=no |
| 4759 | kde_java_libjvmdir=no |
| 4760 | kde_java_libhpidir=no |
| 4761 | else |
| 4762 | if test "x$ac_java_dir" = "x"; then |
| 4763 | |
| 4764 | |
| 4765 | dnl No option set -> look in $PATH |
| 4766 | KDE_JAVA_PREFIX(/usr/j2se) |
| 4767 | KDE_JAVA_PREFIX(/usr/j*dk*) |
| 4768 | KDE_JAVA_PREFIX(/usr/lib/j*dk*) |
| 4769 | KDE_JAVA_PREFIX(/opt/j*sdk*) |
| 4770 | KDE_JAVA_PREFIX(/usr/lib/java*) |
| 4771 | KDE_JAVA_PREFIX(/usr/java*) |
| 4772 | KDE_JAVA_PREFIX(/usr/lib/SunJava2*) |
| 4773 | KDE_JAVA_PREFIX(/usr/lib/SunJava*) |
| 4774 | KDE_JAVA_PREFIX(/usr/lib/IBMJava2*) |
| 4775 | KDE_JAVA_PREFIX(/usr/lib/IBMJava*) |
| 4776 | KDE_JAVA_PREFIX(/opt/java*) |
| 4777 | |
| 4778 | kde_cv_path="NONE" |
| 4779 | kde_save_IFS=$IFS |
| 4780 | IFS=':' |
| 4781 | for dir in $PATH; do |
| 4782 | javadirs="$javadirs $dir" |
| 4783 | done |
| 4784 | IFS=$kde_save_IFS |
| 4785 | jredirs= |
| 4786 | |
| 4787 | for dir in $javadirs; do |
| 4788 | if test ! -d $dir; then break; fi |
| 4789 | if test -x "$dir/java"; then |
| 4790 | libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1` |
| 4791 | if test ! -f $libjvmdir/libjvm.so; then continue; fi |
| 4792 | jredirs="$jredirs $dir" |
| 4793 | fi |
| 4794 | done |
| 4795 | |
| 4796 | JAVAC= |
| 4797 | JAVA= |
| 4798 | kde_java_bindir=no |
| 4799 | for dir in $jredirs; do |
| 4800 | JAVA="$dir/java" |
| 4801 | kde_java_bindir=$dir |
| 4802 | if test -x "$dir/javac"; then |
| 4803 | JAVAC="$dir/javac" |
| 4804 | break |
| 4805 | fi |
| 4806 | done |
| 4807 | |
| 4808 | if test -n "$JAVAC"; then |
| 4809 | dnl this substitution might not work - well, we test for jni.h below |
| 4810 | kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'` |
| 4811 | else |
| 4812 | kde_java_includedir=no |
| 4813 | fi |
| 4814 | else |
| 4815 | dnl config option set |
| 4816 | kde_java_bindir=$ac_java_dir/bin |
| 4817 | if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then |
| 4818 | kde_java_includedir=no |
| 4819 | else |
| 4820 | kde_java_includedir=$ac_java_dir/include |
| 4821 | fi |
| 4822 | fi |
| 4823 | fi |
| 4824 | |
| 4825 | dnl At this point kde_java_bindir and kde_java_includedir are either set or "no" |
| 4826 | if test "x$kde_java_bindir" != "xno"; then |
| 4827 | |
| 4828 | dnl Look for libjvm.so |
| 4829 | kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1` |
| 4830 | dnl Look for libhpi.so and avoid green threads |
| 4831 | kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1` |
| 4832 | |
| 4833 | dnl Now check everything's fine under there |
| 4834 | dnl the include dir is our flag for having the JDK |
| 4835 | if test -d "$kde_java_includedir"; then |
| 4836 | if test ! -x "$kde_java_bindir/javac"; then |
| 4837 | AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.]) |
| 4838 | fi |
| 4839 | if test ! -x "$kde_java_bindir/javah"; then |
| 4840 | AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.]) |
| 4841 | fi |
| 4842 | if test ! -x "$kde_java_bindir/jar"; then |
| 4843 | AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.]) |
| 4844 | fi |
| 4845 | if test ! -r "$kde_java_includedir/jni.h"; then |
| 4846 | AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.]) |
| 4847 | fi |
| 4848 | |
| 4849 | jni_includes="-I$kde_java_includedir" |
| 4850 | dnl Strange thing, jni.h requires jni_md.h which is under genunix here.. |
| 4851 | dnl and under linux here.. |
| 4852 | test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux" |
| 4853 | test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris" |
| 4854 | test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix" |
| 4855 | |
| 4856 | else |
| 4857 | JAVAC= |
| 4858 | jni_includes= |
| 4859 | fi |
| 4860 | |
| 4861 | if test ! -r "$kde_java_libjvmdir/libjvm.so"; then |
| 4862 | AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.]) |
| 4863 | fi |
| 4864 | |
| 4865 | if test ! -x "$kde_java_bindir/java"; then |
| 4866 | AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.]) |
| 4867 | fi |
| 4868 | |
| 4869 | if test ! -r "$kde_java_libhpidir/libhpi.so"; then |
| 4870 | AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.]) |
| 4871 | fi |
| 4872 | |
| 4873 | if test -n "$jni_includes"; then |
| 4874 | dnl Check for JNI version |
| 4875 | AC_LANG_SAVE |
| 4876 | AC_LANG_CPLUSPLUS |
| 4877 | ac_cxxflags_safe="$CXXFLAGS" |
| 4878 | CXXFLAGS="$CXXFLAGS $all_includes $jni_includes" |
| 4879 | |
| 4880 | AC_TRY_COMPILE([ |
| 4881 | #include <jni.h> |
| 4882 | ], |
| 4883 | [ |
| 4884 | #ifndef JNI_VERSION_1_2 |
| 4885 | Syntax Error |
| 4886 | #endif |
| 4887 | ],[ kde_jni_works=yes ], |
| 4888 | [ kde_jni_works=no ]) |
| 4889 | |
| 4890 | if test $kde_jni_works = no; then |
| 4891 | AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h. |
| 4892 | You need to have Java Development Kit (JDK) version 1.2. |
| 4893 | |
| 4894 | Use --with-java to specify another location. |
| 4895 | Use --without-java to configure without java support. |
| 4896 | Or download a newer JDK and try again. |
| 4897 | See e.g. http://java.sun.com/products/jdk/1.2 ]) |
| 4898 | fi |
| 4899 | |
| 4900 | CXXFLAGS="$ac_cxxflags_safe" |
| 4901 | AC_LANG_RESTORE |
| 4902 | |
| 4903 | dnl All tests ok, inform and subst the variables |
| 4904 | |
| 4905 | JAVAC=$kde_java_bindir/javac |
| 4906 | JAVAH=$kde_java_bindir/javah |
| 4907 | JAR=$kde_java_bindir/jar |
| 4908 | AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is]) |
| 4909 | JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi" |
| 4910 | AC_MSG_RESULT([java JDK in $kde_java_bindir]) |
| 4911 | |
| 4912 | else |
| 4913 | AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is]) |
| 4914 | AC_MSG_RESULT([java JRE in $kde_java_bindir]) |
| 4915 | fi |
| 4916 | else # no |
| 4917 | AC_MSG_RESULT([none found]) |
| 4918 | fi |
| 4919 | |
| 4920 | AC_SUBST(JAVAC) |
| 4921 | AC_SUBST(JAVAH) |
| 4922 | AC_SUBST(JAR) |
| 4923 | AC_SUBST(JVMLIBS) |
| 4924 | AC_SUBST(jni_includes) |
| 4925 | |
| 4926 | # for backward compat |
| 4927 | kde_cv_java_includedir=$kde_java_includedir |
| 4928 | kde_cv_java_bindir=$kde_java_bindir |
| 4929 | ]) |
| 4930 | |
| 4931 | dnl this is a redefinition of autoconf 2.5x's AC_FOREACH. |
| 4932 | dnl When the argument list becomes big, as in KDE for AC_OUTPUT in |
| 4933 | dnl big packages, m4_foreach is dog-slow. So use our own version of |
| 4934 | dnl it. (matz@kde.org) |
| 4935 | m4_define([mm_foreach], |
| 4936 | [m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])]) |
| 4937 | m4_define([mm_car], [[$1]]) |
| 4938 | m4_define([mm_car2], [[$@]]) |
| 4939 | m4_define([_mm_foreach], |
| 4940 | [m4_if(m4_quote($2), [], [], |
| 4941 | [m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1], |
| 4942 | mm_car2(m4_shift($2)), |
| 4943 | [$3])])]) |
| 4944 | m4_define([AC_FOREACH], |
| 4945 | [mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])]) |
| 4946 | |
| 4947 | AC_DEFUN(KDE_NEED_FLEX, |
| 4948 | [ |
| 4949 | kde_libs_safe=$LIBS |
| 4950 | LIBS="$LIBS $USER_LDFLAGS" |
| 4951 | AM_PROG_LEX |
| 4952 | LIBS=$kde_libs_safe |
| 4953 | if test -z "$LEXLIB"; then |
| 4954 | AC_MSG_ERROR([You need to have flex installed.]) |
| 4955 | fi |
| 4956 | AC_SUBST(LEXLIB) |
| 4957 | ]) |
| 4958 | |
| 4959 | AC_DEFUN(AC_PATH_QTOPIA, |
| 4960 | [ |
| 4961 | dnl TODO: use AC_CACHE_VAL |
| 4962 | |
| 4963 | if test -z "$1"; then |
| 4964 | qtopia_minver_maj=1 |
| 4965 | qtopia_minver_min=5 |
| 4966 | qtopia_minver_pat=0 |
| 4967 | else |
| 4968 | qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"` |
| 4969 | qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"` |
| 4970 | qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"` |
| 4971 | fi |
| 4972 | |
| 4973 | qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat" |
| 4974 | qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat" |
| 4975 | |
| 4976 | AC_REQUIRE([AC_PATH_QT]) |
| 4977 | |
| 4978 | AC_MSG_CHECKING([for Qtopia]) |
| 4979 | |
| 4980 | LIB_QTOPIA="-lqpe" |
| 4981 | AC_SUBST(LIB_QTOPIA) |
| 4982 | |
| 4983 | kde_qtopia_dirs="$QPEDIR /opt/Qtopia" |
| 4984 | |
| 4985 | ac_qtopia_incdir=NO |
| 4986 | |
| 4987 | AC_ARG_WITH(qtopia-dir, |
| 4988 | [ --with-qtopia-dir=DIR where the root of Qtopia is installed ], |
| 4989 | [ ac_qtopia_incdir="$withval"/include] ) |
| 4990 | |
| 4991 | qtopia_incdirs="" |
| 4992 | for dir in $kde_qtopia_dirs; do |
| 4993 | qtopia_incdirs="$qtopia_incdirs $dir/include" |
| 4994 | done |
| 4995 | |
| 4996 | if test ! "$ac_qtopia_incdir" = "NO"; then |
| 4997 | qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs" |
| 4998 | fi |
| 4999 | |
| 5000 | qtopia_incdir="" |
| 5001 | AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir) |
| 5002 | ac_qtopia_incdir="$qtopia_incdir" |
| 5003 | |
| 5004 | if test -z "$qtopia_incdir"; then |
| 5005 | AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.]) |
| 5006 | fi |
| 5007 | |
| 5008 | qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`; |
| 5009 | qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`; |
| 5010 | qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`; |
| 5011 | |
| 5012 | qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat" |
| 5013 | qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat" |
| 5014 | if test "$qtopia_ver" -lt "$qtopia_minver"; then |
| 5015 | AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr |
| 5016 | is required.]) |
| 5017 | fi |
| 5018 | |
| 5019 | AC_LANG_SAVE |
| 5020 | AC_LANG_CPLUSPLUS |
| 5021 | |
| 5022 | ac_cxxflags_safe="$CXXFLAGS" |
| 5023 | ac_ldflags_safe="$LDFLAGS" |
| 5024 | ac_libs_safe="$LIBS" |
| 5025 | |
| 5026 | CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes" |
| 5027 | LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS" |
| 5028 | LIBS="$LIBS $LIB_QTOPIA $LIBQT" |
| 5029 | |
| 5030 | cat > conftest.$ac_ext <<EOF |
| 5031 | #include "confdefs.h" |
| 5032 | #include <qpe/qpeapplication.h> |
| 5033 | #include <qpe/version.h> |
| 5034 | |
| 5035 | int main( int argc, char **argv ) |
| 5036 | { |
| 5037 | QPEApplication app( argc, argv ); |
| 5038 | return 0; |
| 5039 | } |
| 5040 | EOF |
| 5041 | |
| 5042 | if AC_TRY_EVAL(ac_link) && test -s conftest; then |
| 5043 | rm -f conftest* |
| 5044 | else |
| 5045 | rm -f conftest* |
| 5046 | AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at |
| 5047 | the end of config.log]) |
| 5048 | fi |
| 5049 | |
| 5050 | CXXFLAGS="$ac_cxxflags_safe" |
| 5051 | LDFLAGS="$ac_ldflags_safe" |
| 5052 | LIBS="$ac_libs_safe" |
| 5053 | |
| 5054 | AC_LANG_RESTORE |
| 5055 | |
| 5056 | QTOPIA_INCLUDES="-I$qtopia_incdir" |
| 5057 | AC_SUBST(QTOPIA_INCLUDES) |
| 5058 | |
| 5059 | AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir]) |
| 5060 | ]) |
| 5061 | |
| 5062 | |
| 5063 | AC_DEFUN(KDE_INIT_DOXYGEN, |
| 5064 | [ |
| 5065 | AC_MSG_CHECKING([for Qt docs]) |
| 5066 | kde_qtdir= |
| 5067 | if test "${with_qt_dir+set}" = set; then |
| 5068 | kde_qtdir="$with_qt_dir" |
| 5069 | fi |
| 5070 | |
| 5071 | AC_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) |
| 5072 | AC_MSG_RESULT($QTDOCDIR) |
| 5073 | |
| 5074 | AC_SUBST(QTDOCDIR) |
| 5075 | |
| 5076 | KDE_FIND_PATH(dot, DOT, [], []) |
| 5077 | if test -n "$DOT"; then |
| 5078 | KDE_HAVE_DOT="YES" |
| 5079 | else |
| 5080 | KDE_HAVE_DOT="NO" |
| 5081 | fi |
| 5082 | AC_SUBST(KDE_HAVE_DOT) |
| 5083 | KDE_FIND_PATH(doxygen, DOXYGEN, [], []) |
| 5084 | AC_SUBST(DOXYGEN) |
| 5085 | |
| 5086 | DOXYGEN_PROJECT_NAME="$1" |
| 5087 | DOXYGEN_PROJECT_NUMBER="$2" |
| 5088 | AC_SUBST(DOXYGEN_PROJECT_NAME) |
| 5089 | AC_SUBST(DOXYGEN_PROJECT_NUMBER) |
| 5090 | |
| 5091 | KDE_HAS_DOXYGEN=no |
| 5092 | if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then |
| 5093 | KDE_HAS_DOXYGEN=yes |
| 5094 | fi |
| 5095 | AC_SUBST(KDE_HAS_DOXYGEN) |
| 5096 | |
| 5097 | ]) |
| 5098 | |
| 5099 | |
| 5100 | AC_DEFUN(AC_FIND_BZIP2, |
| 5101 | [ |
| 5102 | AC_MSG_CHECKING([for bzDecompress in libbz2]) |
| 5103 | AC_CACHE_VAL(ac_cv_lib_bzip2, |
| 5104 | [ |
| 5105 | AC_LANG_C |
| 5106 | kde_save_LIBS="$LIBS" |
| 5107 | LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET" |
| 5108 | kde_save_CFLAGS="$CFLAGS" |
| 5109 | CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" |
| 5110 | AC_TRY_LINK(dnl |
| 5111 | [ |
| 5112 | #define BZ_NO_STDIO |
| 5113 | #include<bzlib.h> |
| 5114 | ], |
| 5115 | [ bz_stream s; (void) bzDecompress(&s); ], |
| 5116 | eval "ac_cv_lib_bzip2='-lbz2'", |
| 5117 | eval "ac_cv_lib_bzip2=no") |
| 5118 | LIBS="$kde_save_LIBS" |
| 5119 | CFLAGS="$kde_save_CFLAGS" |
| 5120 | ])dnl |
| 5121 | AC_MSG_RESULT($ac_cv_lib_bzip2) |
| 5122 | |
| 5123 | if test ! "$ac_cv_lib_bzip2" = no; then |
| 5124 | BZIP2DIR=bzip2 |
| 5125 | |
| 5126 | LIBBZ2="$ac_cv_lib_bzip2" |
| 5127 | AC_SUBST(LIBBZ2) |
| 5128 | |
| 5129 | else |
| 5130 | |
| 5131 | cxx_shared_flags= |
| 5132 | KDE_CHECK_COMPILER_FLAG(shared, [ |
| 5133 | cxx_shared_flag="-shared" |
| 5134 | ]) |
| 5135 | |
| 5136 | AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2]) |
| 5137 | AC_CACHE_VAL(ac_cv_lib_bzip2_prefix, |
| 5138 | [ |
| 5139 | AC_LANG_C |
| 5140 | kde_save_LIBS="$LIBS" |
| 5141 | LIBS="$all_libraries $USER_LDFLAGS $cxx_shared_flag -lbz2 $LIBSOCKET" |
| 5142 | kde_save_CFLAGS="$CFLAGS" |
| 5143 | CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" |
| 5144 | |
| 5145 | AC_TRY_LINK(dnl |
| 5146 | [ |
| 5147 | #define BZ_NO_STDIO |
| 5148 | #include<bzlib.h> |
| 5149 | ], |
| 5150 | [ bz_stream s; (void) BZ2_bzDecompress(&s); ], |
| 5151 | eval "ac_cv_lib_bzip2_prefix='-lbz2'", |
| 5152 | eval "ac_cv_lib_bzip2_prefix=no") |
| 5153 | LIBS="$kde_save_LIBS" |
| 5154 | CFLAGS="$kde_save_CFLAGS" |
| 5155 | ])dnl |
| 5156 | |
| 5157 | AC_MSG_RESULT($ac_cv_lib_bzip2_prefix) |
| 5158 | |
| 5159 | |
| 5160 | |
| 5161 | if test ! "$ac_cv_lib_bzip2_prefix" = no; then |
| 5162 | BZIP2DIR=bzip2 |
| 5163 | |
| 5164 | LIBBZ2="$ac_cv_lib_bzip2_prefix" |
| 5165 | AC_SUBST(LIBBZ2) |
| 5166 | |
| 5167 | AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix]) |
| 5168 | dnl else, we just ignore this |
| 5169 | fi |
| 5170 | |
| 5171 | fi |
| 5172 | AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR") |
| 5173 | ]) |
| 5174 | |
| 5175 | dnl ------------------------------------------------------------------------ |
| 5176 | dnl Try to find the SSL headers and libraries. |
| 5177 | dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed) |
| 5178 | dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed) |
| 5179 | dnl ------------------------------------------------------------------------ |
| 5180 | dnl |
| 5181 | AC_DEFUN(KDE_CHECK_SSL, |
| 5182 | [ |
| 5183 | LIBSSL="-lssl -lcrypto" |
| 5184 | AC_REQUIRE([KDE_CHECK_LIB64]) |
| 5185 | |
| 5186 | ac_ssl_includes=NO ac_ssl_libraries=NO |
| 5187 | ssl_libraries="" |
| 5188 | ssl_includes="" |
| 5189 | AC_ARG_WITH(ssl-dir, |
| 5190 | [ --with-ssl-dir=DIR where the root of OpenSSL is installed], |
| 5191 | [ ac_ssl_includes="$withval"/include |
| 5192 | ac_ssl_libraries="$withval"/lib$kdelibsuff |
| 5193 | ]) |
| 5194 | |
| 5195 | want_ssl=yes |
| 5196 | AC_ARG_WITH(ssl, |
| 5197 | [ --without-ssl disable SSL checks], |
| 5198 | [want_ssl=$withval]) |
| 5199 | |
| 5200 | if test $want_ssl = yes; then |
| 5201 | |
| 5202 | AC_MSG_CHECKING(for OpenSSL) |
| 5203 | |
| 5204 | AC_CACHE_VAL(ac_cv_have_ssl, |
| 5205 | [#try to guess OpenSSL locations |
| 5206 | |
| 5207 | ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes" |
| 5208 | ssl_incdirs="$ac_ssl_includes $ssl_incdirs" |
| 5209 | AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir) |
| 5210 | ac_ssl_includes="$ssl_incdir" |
| 5211 | |
| 5212 | 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" |
| 5213 | if test ! "$ac_ssl_libraries" = "NO"; then |
| 5214 | ssl_libdirs="$ac_ssl_libraries $ssl_libdirs" |
| 5215 | fi |
| 5216 | |
| 5217 | test=NONE |
| 5218 | ssl_libdir=NONE |
| 5219 | for dir in $ssl_libdirs; do |
| 5220 | try="ls -1 $dir/libssl*" |
| 5221 | if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi |
| 5222 | done |
| 5223 | |
| 5224 | ac_ssl_libraries="$ssl_libdir" |
| 5225 | |
| 5226 | AC_LANG_SAVE |
| 5227 | AC_LANG_C |
| 5228 | |
| 5229 | ac_cflags_safe="$CFLAGS" |
| 5230 | ac_ldflags_safe="$LDFLAGS" |
| 5231 | ac_libs_safe="$LIBS" |
| 5232 | |
| 5233 | CFLAGS="$CFLAGS -I$ssl_incdir $all_includes" |
| 5234 | LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries" |
| 5235 | LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref" |
| 5236 | |
| 5237 | AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();, |
| 5238 | ac_ssl_rsaref="yes" |
| 5239 | , |
| 5240 | ac_ssl_rsaref="no" |
| 5241 | ) |
| 5242 | |
| 5243 | CFLAGS="$ac_cflags_safe" |
| 5244 | LDFLAGS="$ac_ldflags_safe" |
| 5245 | LIBS="$ac_libs_safe" |
| 5246 | |
| 5247 | AC_LANG_RESTORE |
| 5248 | |
| 5249 | if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then |
| 5250 | have_ssl=no |
| 5251 | else |
| 5252 | have_ssl=yes; |
| 5253 | fi |
| 5254 | |
| 5255 | ]) |
| 5256 | |
| 5257 | eval "$ac_cv_have_ssl" |
| 5258 | |
| 5259 | AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes]) |
| 5260 | |
| 5261 | AC_MSG_CHECKING([whether OpenSSL uses rsaref]) |
| 5262 | AC_MSG_RESULT($ac_ssl_rsaref) |
| 5263 | |
| 5264 | AC_MSG_CHECKING([for easter eggs]) |
| 5265 | AC_MSG_RESULT([none found]) |
| 5266 | |
| 5267 | else |
| 5268 | have_ssl=no |
| 5269 | fi |
| 5270 | |
| 5271 | if test "$have_ssl" = yes; then |
| 5272 | AC_MSG_CHECKING(for OpenSSL version) |
| 5273 | dnl Check for SSL version |
| 5274 | AC_CACHE_VAL(ac_cv_ssl_version, |
| 5275 | [ |
| 5276 | AC_LANG_SAVE |
| 5277 | AC_LANG_C |
| 5278 | |
| 5279 | cat >conftest.$ac_ext <<EOF |
| 5280 | #include <openssl/opensslv.h> |
| 5281 | #include <stdio.h> |
| 5282 | int main() { |
| 5283 | |
| 5284 | #ifndef OPENSSL_VERSION_NUMBER |
| 5285 | printf("ssl_version=\\"error\\"\n"); |
| 5286 | #else |
| 5287 | if (OPENSSL_VERSION_NUMBER < 0x00906000) |
| 5288 | printf("ssl_version=\\"old\\"\n"); |
| 5289 | else |
| 5290 | printf("ssl_version=\\"ok\\"\n"); |
| 5291 | #endif |
| 5292 | return (0); |
| 5293 | } |
| 5294 | EOF |
| 5295 | |
| 5296 | ac_compile='${CC-gcc} $CFLAGS -I$ac_ssl_includes conftest.$ac_ext -o conftest' |
| 5297 | if AC_TRY_EVAL(ac_compile); then |
| 5298 | |
| 5299 | if eval `./conftest 2>&5`; then |
| 5300 | if test $ssl_version = error; then |
| 5301 | AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !]) |
| 5302 | else |
| 5303 | if test $ssl_version = old; then |
| 5304 | AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.]) |
| 5305 | have_ssl=no |
| 5306 | fi |
| 5307 | fi |
| 5308 | ac_cv_ssl_version="ssl_version=$ssl_version" |
| 5309 | else |
| 5310 | AC_MSG_ERROR([Your system couldn't run a small SSL test program. |
| 5311 | Check config.log, and if you can't figure it out, send a mail to |
| 5312 | David Faure <faure@kde.org>, attaching your config.log]) |
| 5313 | fi |
| 5314 | |
| 5315 | else |
| 5316 | AC_MSG_ERROR([Your system couldn't link a small SSL test program. |
| 5317 | Check config.log, and if you can't figure it out, send a mail to |
| 5318 | David Faure <faure@kde.org>, attaching your config.log]) |
| 5319 | fi |
| 5320 | |
| 5321 | AC_LANG_RESTORE |
| 5322 | |
| 5323 | ]) |
| 5324 | |
| 5325 | eval "$ac_cv_ssl_version" |
| 5326 | AC_MSG_RESULT($ssl_version) |
| 5327 | fi |
| 5328 | |
| 5329 | if test "$have_ssl" != yes; then |
| 5330 | LIBSSL=""; |
| 5331 | else |
| 5332 | AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL]) |
| 5333 | ac_cv_have_ssl="have_ssl=yes \ |
| 5334 | ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref" |
| 5335 | |
| 5336 | |
| 5337 | ssl_libraries="$ac_ssl_libraries" |
| 5338 | ssl_includes="$ac_ssl_includes" |
| 5339 | |
| 5340 | if test "$ac_ssl_rsaref" = yes; then |
| 5341 | LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" |
| 5342 | fi |
| 5343 | |
| 5344 | if test $ssl_version = "old"; then |
| 5345 | AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6]) |
| 5346 | fi |
| 5347 | fi |
| 5348 | |
| 5349 | if test "$ssl_includes" = "/usr/include" || test "$ssl_includes" = "/usr/local/include" || test -z "$ssl_includes"; then |
| 5350 | SSL_INCLUDES=""; |
| 5351 | else |
| 5352 | SSL_INCLUDES="-I$ssl_includes" |
| 5353 | fi |
| 5354 | |
| 5355 | if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries"; then |
| 5356 | SSL_LDFLAGS="" |
| 5357 | else |
| 5358 | SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries" |
| 5359 | fi |
| 5360 | |
| 5361 | AC_SUBST(SSL_INCLUDES) |
| 5362 | AC_SUBST(SSL_LDFLAGS) |
| 5363 | AC_SUBST(LIBSSL) |
| 5364 | ]) |
| 5365 | |
| 5366 | AC_DEFUN(KDE_CHECK_STRLCPY, |
| 5367 | [ |
| 5368 | AC_CHECK_STRLCPY |
| 5369 | AC_CHECK_STRLCAT |
| 5370 | AC_CHECK_SIZEOF(size_t) |
| 5371 | AC_CHECK_SIZEOF(unsigned long) |
| 5372 | |
| 5373 | AC_MSG_CHECKING([sizeof(size_t) == sizeof(unsigned long)]) |
| 5374 | AC_TRY_COMPILE(,[ |
| 5375 | #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG |
| 5376 | choke me |
| 5377 | #endif |
| 5378 | ],[AC_MSG_RESULT([yes])],[ |
| 5379 | AC_MSG_RESULT([no]) |
| 5380 | AC_MSG_ERROR([ |
| 5381 | Apparently on your system our assumption sizeof(size_t) == sizeof(unsigned long) |
| 5382 | does not apply. Please mail kde-devel@kde.org with a description of your system! |
| 5383 | ]) |
| 5384 | ]) |
| 5385 | ]) |
| 5386 | |
| 5387 | AC_DEFUN(AC_CHECK_C_COMPILER, |
| 5388 | [ |
| 5389 | AC_ARG_ENABLE(debug,[ --enable-debug enables debug symbols [default=no]], |
| 5390 | [ |
| 5391 | if test $enableval = "no"; dnl |
| 5392 | then |
| 5393 | kde_use_debug_code="no" |
| 5394 | kde_use_debug_define=yes |
| 5395 | else |
| 5396 | kde_use_debug_code="yes" |
| 5397 | kde_use_debug_define=no |
| 5398 | fi |
| 5399 | ], |
| 5400 | [kde_use_debug_code="no" |
| 5401 | kde_use_debug_define=no |
| 5402 | ]) |
| 5403 | |
| 5404 | dnl Just for configure --help |
| 5405 | AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[]) |
| 5406 | |
| 5407 | AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)], |
| 5408 | [ |
| 5409 | if test $enableval = "no"; then |
| 5410 | kde_use_strict_options="no" |
| 5411 | else |
| 5412 | kde_use_strict_options="yes" |
| 5413 | fi |
| 5414 | ], [kde_use_strict_options="no"]) |
| 5415 | |
| 5416 | AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]], |
| 5417 | [kde_use_profiling=$enableval], |
| 5418 | [kde_use_profiling="no"] |
| 5419 | ) |
| 5420 | |
| 5421 | dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS |
| 5422 | CFLAGS=" $CFLAGS" |
| 5423 | |
| 5424 | AC_PROG_CC |
| 5425 | |
| 5426 | if test "$GCC" = "yes"; then |
| 5427 | if test "$kde_use_debug_code" = "yes"; then |
| 5428 | CFLAGS="-g -O2 $CFLAGS" |
| 5429 | case $host in |
| 5430 | *-*-linux-gnu) |
| 5431 | CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS" |
| 5432 | ;; |
| 5433 | esac |
| 5434 | else |
| 5435 | CFLAGS="-O2 $CFLAGS" |
| 5436 | fi |
| 5437 | fi |
| 5438 | |
| 5439 | if test "$kde_use_debug_define" = "yes"; then |
| 5440 | CFLAGS="-DNDEBUG $CFLAGS" |
| 5441 | fi |
| 5442 | |
| 5443 | case "$host" in |
| 5444 | *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";; |
| 5445 | *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";; |
| 5446 | esac |
| 5447 | |
| 5448 | if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then |
| 5449 | LDFLAGS="" |
| 5450 | fi |
| 5451 | |
| 5452 | if test "$kde_use_profiling" = "yes"; then |
| 5453 | KDE_CHECK_COMPILER_FLAG(pg, |
| 5454 | [ |
| 5455 | CFLAGS="-pg $CFLAGS" |
| 5456 | ]) |
| 5457 | fi |
| 5458 | |
| 5459 | USE_EXCEPTIONS= |
| 5460 | AC_SUBST(USE_EXCEPTIONS) |
| 5461 | dnl obsolete macro - provided to keep things going |
| 5462 | USE_RTTI= |
| 5463 | AC_SUBST(USE_RTTI) |
| 5464 | |
| 5465 | AC_PROG_CPP |
| 5466 | |
| 5467 | # the following is to allow programs, that are known to |
| 5468 | # have problems when compiled with -O2 |
| 5469 | if test -n "$CFLAGS"; then |
| 5470 | kde_safe_IFS=$IFS |
| 5471 | IFS=" " |
| 5472 | NOOPT_CFLAGS="" |
| 5473 | for i in $CFLAGS; do |
| 5474 | case $i in |
| 5475 | -O*) |
| 5476 | ;; |
| 5477 | *) |
| 5478 | NOOPT_CFLAGS="$NOOPT_CFLAGS $i" |
| 5479 | ;; |
| 5480 | esac |
| 5481 | done |
| 5482 | IFS=$kde_safe_IFS |
| 5483 | fi |
| 5484 | |
| 5485 | AC_SUBST(NOOPT_CFLAGS) |
| 5486 | |
| 5487 | KDE_CHECK_FINAL |
| 5488 | |
| 5489 | ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDEV_ADD_DEPENDENCIES]), []) |
| 5490 | |
| 5491 | KDE_CXXFLAGS= |
| 5492 | AC_SUBST(KDE_CXXFLAGS) |
| 5493 | ]) |
| 5494 | |
| 5495 | AC_DEFUN(KDEV_ADD_DEPENDENCIES, |
| 5496 | [ |
| 5497 | [A]M_DEPENDENCIES(CC) |
| 5498 | ]) |
| 5499 | |
| 5500 | |
| 5501 | dnl just a wrapper to clean up configure.in only for c projects |
| 5502 | AC_DEFUN(KDEV_PROG_LIBTOOL, |
| 5503 | [ |
| 5504 | AC_REQUIRE([AC_CHECK_C_COMPILER]) |
| 5505 | AC_REQUIRE([AC_ENABLE_SHARED]) |
| 5506 | AC_REQUIRE([AC_ENABLE_STATIC]) |
| 5507 | |
| 5508 | AC_REQUIRE([AC_LIBTOOL_DLOPEN]) |
| 5509 | |
| 5510 | AC_LANG_SAVE |
| 5511 | AC_LANG_C |
| 5512 | AC_OBJEXT |
| 5513 | AC_EXEEXT |
| 5514 | AC_LANG_RESTORE |
| 5515 | |
| 5516 | AM_PROG_LIBTOOL |
| 5517 | AC_LIBTOOL_SETUP |
| 5518 | |
| 5519 | LIBTOOL_SHELL="/bin/sh ./libtool" |
| 5520 | # LIBTOOL="$LIBTOOL --silent" |
| 5521 | ]) |
| 5522 | |
| 5523 | # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- |
| 5524 | |
| 5525 | # serial 47 AC_PROG_LIBTOOL |
| 5526 | |
| 5527 | # AC_PROG_LIBTOOL |
| 5528 | # --------------- |
| 5529 | AC_DEFUN([AC_PROG_LIBTOOL], |
| 5530 | [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl |
| 5531 | dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX |
| 5532 | dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. |
| 5533 | AC_PROVIDE_IFELSE([AC_PROG_CXX], |
| 5534 | [AC_LIBTOOL_CXX], |
| 5535 | [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX |
| 5536 | ])]) |
| 5537 | |
| 5538 | dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. |
| 5539 | dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run |
| 5540 | dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. |
| 5541 | AC_PROVIDE_IFELSE([AC_PROG_GCJ], |
| 5542 | [AC_LIBTOOL_GCJ], |
| 5543 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], |
| 5544 | [AC_LIBTOOL_GCJ], |
| 5545 | [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], |
| 5546 | [AC_LIBTOOL_GCJ], |
| 5547 | [ifdef([AC_PROG_GCJ], |
| 5548 | [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) |
| 5549 | ifdef([A][M_PROG_GCJ], |
| 5550 | [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) |
| 5551 | ifdef([LT_AC_PROG_GCJ], |
| 5552 | [define([LT_AC_PROG_GCJ], |
| 5553 | defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) |
| 5554 | ])])# AC_PROG_LIBTOOL |
| 5555 | |
| 5556 | |
| 5557 | # _AC_PROG_LIBTOOL |
| 5558 | # ---------------- |
| 5559 | AC_DEFUN([_AC_PROG_LIBTOOL], |
| 5560 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl |
| 5561 | AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl |
| 5562 | AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl |
| 5563 | |
| 5564 | # This can be used to rebuild libtool when needed |
| 5565 | LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" |
| 5566 | |
| 5567 | # Always use our own libtool. |
| 5568 | LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent' |
| 5569 | AC_SUBST(LIBTOOL)dnl |
| 5570 | |
| 5571 | # Prevent multiple expansion |
| 5572 | define([AC_PROG_LIBTOOL], []) |
| 5573 | ])# _AC_PROG_LIBTOOL |
| 5574 | |
| 5575 | |
| 5576 | # AC_LIBTOOL_SETUP |
| 5577 | # ---------------- |
| 5578 | AC_DEFUN([AC_LIBTOOL_SETUP], |
| 5579 | [AC_PREREQ(2.50)dnl |
| 5580 | AC_REQUIRE([AC_ENABLE_SHARED])dnl |
| 5581 | AC_REQUIRE([AC_ENABLE_STATIC])dnl |
| 5582 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl |
| 5583 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 5584 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
| 5585 | AC_REQUIRE([AC_PROG_CC])dnl |
| 5586 | AC_REQUIRE([AC_PROG_LD])dnl |
| 5587 | AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl |
| 5588 | AC_REQUIRE([AC_PROG_NM])dnl |
| 5589 | AC_REQUIRE([LT_AC_PROG_SED])dnl |
| 5590 | |
| 5591 | AC_REQUIRE([AC_PROG_LN_S])dnl |
| 5592 | AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl |
| 5593 | # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! |
| 5594 | AC_REQUIRE([AC_OBJEXT])dnl |
| 5595 | AC_REQUIRE([AC_EXEEXT])dnl |
| 5596 | dnl |
| 5597 | |
| 5598 | AC_LIBTOOL_SYS_MAX_CMD_LEN |
| 5599 | AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
| 5600 | AC_LIBTOOL_OBJDIR |
| 5601 | |
| 5602 | AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
| 5603 | _LT_AC_PROG_ECHO_BACKSLASH |
| 5604 | |
| 5605 | case $host_os in |
| 5606 | aix3*) |
| 5607 | # AIX sometimes has problems with the GCC collect2 program. For some |
| 5608 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
| 5609 | # vanish in a puff of smoke. |
| 5610 | if test "X${COLLECT_NAMES+set}" != Xset; then |
| 5611 | COLLECT_NAMES= |
| 5612 | export COLLECT_NAMES |
| 5613 | fi |
| 5614 | ;; |
| 5615 | esac |
| 5616 | |
| 5617 | # Sed substitution that helps us do robust quoting. It backslashifies |
| 5618 | # metacharacters that are still active within double-quoted strings. |
| 5619 | Xsed='sed -e s/^X//' |
| 5620 | [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] |
| 5621 | |
| 5622 | # Same as above, but do not quote variable references. |
| 5623 | [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] |
| 5624 | |
| 5625 | # Sed substitution to delay expansion of an escaped shell variable in a |
| 5626 | # double_quote_subst'ed string. |
| 5627 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
| 5628 | |
| 5629 | # Sed substitution to avoid accidental globbing in evaled expressions |
| 5630 | no_glob_subst='s/\*/\\\*/g' |
| 5631 | |
| 5632 | # Constants: |
| 5633 | rm="rm -f" |
| 5634 | |
| 5635 | # Global variables: |
| 5636 | default_ofile=libtool |
| 5637 | can_build_shared=yes |
| 5638 | |
| 5639 | # All known linkers require a `.a' archive for static linking (except M$VC, |
| 5640 | # which needs '.lib'). |
| 5641 | libext=a |
| 5642 | ltmain="$ac_aux_dir/ltmain.sh" |
| 5643 | ofile="$default_ofile" |
| 5644 | with_gnu_ld="$lt_cv_prog_gnu_ld" |
| 5645 | |
| 5646 | AC_CHECK_TOOL(RANLIB, ranlib, :) |
| 5647 | AC_CHECK_TOOL(STRIP, strip, :) |
| 5648 | |
| 5649 | old_CC="$CC" |
| 5650 | old_CFLAGS="$CFLAGS" |
| 5651 | |
| 5652 | # Set sane defaults for various variables |
| 5653 | test -z "$AR" && AR=ar |
| 5654 | test -z "$AR_FLAGS" && AR_FLAGS=cru |
| 5655 | test -z "$AS" && AS=as |
| 5656 | test -z "$CC" && CC=cc |
| 5657 | test -z "$LTCC" && LTCC=$CC |
| 5658 | test -z "$DLLTOOL" && DLLTOOL=dlltool |
| 5659 | test -z "$LD" && LD=ld |
| 5660 | test -z "$LN_S" && LN_S="ln -s" |
| 5661 | test -z "$MAGIC_CMD" && MAGIC_CMD=file |
| 5662 | test -z "$NM" && NM=nm |
| 5663 | test -z "$SED" && SED=sed |
| 5664 | test -z "$OBJDUMP" && OBJDUMP=objdump |
| 5665 | test -z "$RANLIB" && RANLIB=: |
| 5666 | test -z "$STRIP" && STRIP=: |
| 5667 | test -z "$ac_objext" && ac_objext=o |
| 5668 | |
| 5669 | # Determine commands to create old-style static archives. |
| 5670 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' |
| 5671 | old_postinstall_cmds='chmod 644 $oldlib' |
| 5672 | old_postuninstall_cmds= |
| 5673 | |
| 5674 | if test -n "$RANLIB"; then |
| 5675 | case $host_os in |
| 5676 | openbsd*) |
| 5677 | old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" |
| 5678 | ;; |
| 5679 | *) |
| 5680 | old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" |
| 5681 | ;; |
| 5682 | esac |
| 5683 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" |
| 5684 | fi |
| 5685 | |
| 5686 | # Only perform the check for file, if the check method requires it |
| 5687 | case $deplibs_check_method in |
| 5688 | file_magic*) |
| 5689 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then |
| 5690 | AC_PATH_MAGIC |
| 5691 | fi |
| 5692 | ;; |
| 5693 | esac |
| 5694 | |
| 5695 | ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) |
| 5696 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
| 5697 | enable_win32_dll=yes, enable_win32_dll=no) |
| 5698 | |
| 5699 | AC_ARG_ENABLE([libtool-lock], |
| 5700 | [AC_HELP_STRING([--disable-libtool-lock], |
| 5701 | [avoid locking (might break parallel builds)])]) |
| 5702 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
| 5703 | |
| 5704 | AC_ARG_WITH([pic], |
| 5705 | [AC_HELP_STRING([--with-pic], |
| 5706 | [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], |
| 5707 | [pic_mode="$withval"], |
| 5708 | [pic_mode=default]) |
| 5709 | test -z "$pic_mode" && pic_mode=default |
| 5710 | |
| 5711 | # Use C for the default configuration in the libtool script |
| 5712 | tagname= |
| 5713 | AC_LIBTOOL_LANG_C_CONFIG |
| 5714 | _LT_AC_TAGCONFIG |
| 5715 | ])# AC_LIBTOOL_SETUP |
| 5716 | |
| 5717 | |
| 5718 | # _LT_AC_SYS_COMPILER |
| 5719 | # ------------------- |
| 5720 | AC_DEFUN([_LT_AC_SYS_COMPILER], |
| 5721 | [AC_REQUIRE([AC_PROG_CC])dnl |
| 5722 | |
| 5723 | # If no C compiler was specified, use CC. |
| 5724 | LTCC=${LTCC-"$CC"} |
| 5725 | |
| 5726 | # Allow CC to be a program name with arguments. |
| 5727 | set dummy $CC |
| 5728 | compiler="[$]2" |
| 5729 | ])# _LT_AC_SYS_COMPILER |
| 5730 | |
| 5731 | |
| 5732 | # _LT_AC_SYS_LIBPATH_AIX |
| 5733 | # ---------------------- |
| 5734 | # Links a minimal program and checks the executable |
| 5735 | # for the system default hardcoded library path. In most cases, |
| 5736 | # this is /usr/lib:/lib, but when the MPI compilers are used |
| 5737 | # the location of the communication and MPI libs are included too. |
| 5738 | # If we don't find anything, use the default library path according |
| 5739 | # to the aix ld manual. |
| 5740 | AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], |
| 5741 | [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ |
| 5742 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } |
| 5743 | }'` |
| 5744 | # Check for a 64-bit object if we didn't find anything. |
| 5745 | if 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; } |
| 5746 | }'`; fi],[]) |
| 5747 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi |
| 5748 | ])# _LT_AC_SYS_LIBPATH_AIX |
| 5749 | |
| 5750 | |
| 5751 | # _LT_AC_PROG_ECHO_BACKSLASH |
| 5752 | # -------------------------- |
| 5753 | # Add some code to the start of the generated configure script which |
| 5754 | # will find an echo command which doesn't interpret backslashes. |
| 5755 | AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], |
| 5756 | [ifdef([AC_DIVERSION_NOTICE], |
| 5757 | [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], |
| 5758 | [AC_DIVERT_PUSH(NOTICE)]) |
| 5759 | |
| 5760 | # Check that we are running under the correct shell. |
| 5761 | SHELL=${CONFIG_SHELL-/bin/sh} |
| 5762 | |
| 5763 | case X$ECHO in |
| 5764 | X*--fallback-echo) |
| 5765 | # Remove one level of quotation (which was required for Make). |
| 5766 | ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` |
| 5767 | ;; |
| 5768 | esac |
| 5769 | |
| 5770 | echo=${ECHO-echo} |
| 5771 | if test "X[$]1" = X--no-reexec; then |
| 5772 | # Discard the --no-reexec flag, and continue. |
| 5773 | shift |
| 5774 | elif test "X[$]1" = X--fallback-echo; then |
| 5775 | # Avoid inline document here, it may be left over |
| 5776 | : |
| 5777 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then |
| 5778 | # Yippee, $echo works! |
| 5779 | : |
| 5780 | else |
| 5781 | # Restart under the correct shell. |
| 5782 | exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} |
| 5783 | fi |
| 5784 | |
| 5785 | if test "X[$]1" = X--fallback-echo; then |
| 5786 | # used as fallback echo |
| 5787 | shift |
| 5788 | cat <<EOF |
| 5789 | [$]* |
| 5790 | EOF |
| 5791 | exit 0 |
| 5792 | fi |
| 5793 | |
| 5794 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
| 5795 | # if CDPATH is set. |
| 5796 | if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
| 5797 | |
| 5798 | if test -z "$ECHO"; then |
| 5799 | if test "X${echo_test_string+set}" != Xset; then |
| 5800 | # find a string as large as possible, as long as the shell can cope with it |
| 5801 | for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do |
| 5802 | # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... |
| 5803 | if (echo_test_string="`eval $cmd`") 2>/dev/null && |
| 5804 | echo_test_string="`eval $cmd`" && |
| 5805 | (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null |
| 5806 | then |
| 5807 | break |
| 5808 | fi |
| 5809 | done |
| 5810 | fi |
| 5811 | |
| 5812 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
| 5813 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
| 5814 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 5815 | : |
| 5816 | else |
| 5817 | # The Solaris, AIX, and Digital Unix default echo programs unquote |
| 5818 | # backslashes. This makes it impossible to quote backslashes using |
| 5819 | # echo "$something" | sed 's/\\/\\\\/g' |
| 5820 | # |
| 5821 | # So, first we look for a working echo in the user's PATH. |
| 5822 | |
| 5823 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
| 5824 | for dir in $PATH /usr/ucb; do |
| 5825 | IFS="$lt_save_ifs" |
| 5826 | if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && |
| 5827 | test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && |
| 5828 | echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && |
| 5829 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 5830 | echo="$dir/echo" |
| 5831 | break |
| 5832 | fi |
| 5833 | done |
| 5834 | IFS="$lt_save_ifs" |
| 5835 | |
| 5836 | if test "X$echo" = Xecho; then |
| 5837 | # We didn't find a better echo, so look for alternatives. |
| 5838 | if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && |
| 5839 | echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && |
| 5840 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 5841 | # This shell has a builtin print -r that does the trick. |
| 5842 | echo='print -r' |
| 5843 | elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && |
| 5844 | test "X$CONFIG_SHELL" != X/bin/ksh; then |
| 5845 | # If we have ksh, try running configure again with it. |
| 5846 | ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
| 5847 | export ORIGINAL_CONFIG_SHELL |
| 5848 | CONFIG_SHELL=/bin/ksh |
| 5849 | export CONFIG_SHELL |
| 5850 | exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} |
| 5851 | else |
| 5852 | # Try using printf. |
| 5853 | echo='printf %s\n' |
| 5854 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
| 5855 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
| 5856 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 5857 | # Cool, printf works |
| 5858 | : |
| 5859 | elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
| 5860 | test "X$echo_testing_string" = 'X\t' && |
| 5861 | echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
| 5862 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 5863 | CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL |
| 5864 | export CONFIG_SHELL |
| 5865 | SHELL="$CONFIG_SHELL" |
| 5866 | export SHELL |
| 5867 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
| 5868 | elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
| 5869 | test "X$echo_testing_string" = 'X\t' && |
| 5870 | echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
| 5871 | test "X$echo_testing_string" = "X$echo_test_string"; then |
| 5872 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
| 5873 | else |
| 5874 | # maybe with a smaller string... |
| 5875 | prev=: |
| 5876 | |
| 5877 | for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do |
| 5878 | if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null |
| 5879 | then |
| 5880 | break |
| 5881 | fi |
| 5882 | prev="$cmd" |
| 5883 | done |
| 5884 | |
| 5885 | if test "$prev" != 'sed 50q "[$]0"'; then |
| 5886 | echo_test_string=`eval $prev` |
| 5887 | export echo_test_string |
| 5888 | exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} |
| 5889 | else |
| 5890 | # Oops. We lost completely, so just stick with echo. |
| 5891 | echo=echo |
| 5892 | fi |
| 5893 | fi |
| 5894 | fi |
| 5895 | fi |
| 5896 | fi |
| 5897 | fi |
| 5898 | |
| 5899 | # Copy echo and quote the copy suitably for passing to libtool from |
| 5900 | # the Makefile, instead of quoting the original, which is used later. |
| 5901 | ECHO=$echo |
| 5902 | if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then |
| 5903 | ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" |
| 5904 | fi |
| 5905 | |
| 5906 | AC_SUBST(ECHO) |
| 5907 | AC_DIVERT_POP |
| 5908 | ])# _LT_AC_PROG_ECHO_BACKSLASH |
| 5909 | |
| 5910 | |
| 5911 | # _LT_AC_LOCK |
| 5912 | # ----------- |
| 5913 | AC_DEFUN([_LT_AC_LOCK], |
| 5914 | [AC_ARG_ENABLE([libtool-lock], |
| 5915 | [AC_HELP_STRING([--disable-libtool-lock], |
| 5916 | [avoid locking (might break parallel builds)])]) |
| 5917 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
| 5918 | |
| 5919 | # Some flags need to be propagated to the compiler or linker for good |
| 5920 | # libtool support. |
| 5921 | case $host in |
| 5922 | ia64-*-hpux*) |
| 5923 | # Find out which ABI we are using. |
| 5924 | echo 'int i;' > conftest.$ac_ext |
| 5925 | if AC_TRY_EVAL(ac_compile); then |
| 5926 | case `/usr/bin/file conftest.$ac_objext` in |
| 5927 | *ELF-32*) |
| 5928 | HPUX_IA64_MODE="32" |
| 5929 | ;; |
| 5930 | *ELF-64*) |
| 5931 | HPUX_IA64_MODE="64" |
| 5932 | ;; |
| 5933 | esac |
| 5934 | fi |
| 5935 | rm -rf conftest* |
| 5936 | ;; |
| 5937 | *-*-irix6*) |
| 5938 | # Find out which ABI we are using. |
| 5939 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
| 5940 | if AC_TRY_EVAL(ac_compile); then |
| 5941 | case `/usr/bin/file conftest.$ac_objext` in |
| 5942 | *32-bit*) |
| 5943 | LD="${LD-ld} -32" |
| 5944 | ;; |
| 5945 | *N32*) |
| 5946 | LD="${LD-ld} -n32" |
| 5947 | ;; |
| 5948 | *64-bit*) |
| 5949 | LD="${LD-ld} -64" |
| 5950 | ;; |
| 5951 | esac |
| 5952 | fi |
| 5953 | rm -rf conftest* |
| 5954 | ;; |
| 5955 | |
| 5956 | *-*-linux*) |
| 5957 | # Test if the compiler is 64bit |
| 5958 | echo 'int i;' > conftest.$ac_ext |
| 5959 | if AC_TRY_EVAL(ac_compile); then |
| 5960 | case `/usr/bin/file conftest.$ac_objext` in |
| 5961 | *"ELF 32"*) |
| 5962 | LINUX_64_MODE="32" |
| 5963 | ;; |
| 5964 | *"ELF 64"*) |
| 5965 | LINUX_64_MODE="64" |
| 5966 | ;; |
| 5967 | esac |
| 5968 | fi |
| 5969 | rm -rf conftest* |
| 5970 | ;; |
| 5971 | |
| 5972 | *-*-sco3.2v5*) |
| 5973 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. |
| 5974 | SAVE_CFLAGS="$CFLAGS" |
| 5975 | CFLAGS="$CFLAGS -belf" |
| 5976 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
| 5977 | [AC_LANG_PUSH(C) |
| 5978 | AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) |
| 5979 | AC_LANG_POP]) |
| 5980 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
| 5981 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
| 5982 | CFLAGS="$SAVE_CFLAGS" |
| 5983 | fi |
| 5984 | ;; |
| 5985 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
| 5986 | [*-*-cygwin* | *-*-mingw* | *-*-pw32*) |
| 5987 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
| 5988 | AC_CHECK_TOOL(AS, as, false) |
| 5989 | AC_CHECK_TOOL(OBJDUMP, objdump, false) |
| 5990 | |
| 5991 | # recent cygwin and mingw systems supply a stub DllMain which the user |
| 5992 | # can override, but on older systems we have to supply one |
| 5993 | AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, |
| 5994 | [AC_TRY_LINK([], |
| 5995 | [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); |
| 5996 | DllMain (0, 0, 0);], |
| 5997 | [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) |
| 5998 | |
| 5999 | case $host/$CC in |
| 6000 | *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) |
| 6001 | # old mingw systems require "-dll" to link a DLL, while more recent ones |
| 6002 | # require "-mdll" |
| 6003 | SAVE_CFLAGS="$CFLAGS" |
| 6004 | CFLAGS="$CFLAGS -mdll" |
| 6005 | AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, |
| 6006 | [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) |
| 6007 | CFLAGS="$SAVE_CFLAGS" ;; |
| 6008 | *-*-cygwin* | *-*-pw32*) |
| 6009 | # cygwin systems need to pass --dll to the linker, and not link |
| 6010 | # crt.o which will require a WinMain@16 definition. |
| 6011 | lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; |
| 6012 | esac |
| 6013 | ;; |
| 6014 | ]) |
| 6015 | esac |
| 6016 | |
| 6017 | need_locks="$enable_libtool_lock" |
| 6018 | |
| 6019 | ])# _LT_AC_LOCK |
| 6020 | |
| 6021 | |
| 6022 | # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
| 6023 | # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) |
| 6024 | # ---------------------------------------------------------------- |
| 6025 | # Check whether the given compiler option works |
| 6026 | AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], |
| 6027 | [AC_CACHE_CHECK([$1], [$2], |
| 6028 | [$2=no |
| 6029 | ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) |
| 6030 | save_CFLAGS="$CFLAGS" |
| 6031 | CFLAGS="$CFLAGS $3" |
| 6032 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext |
| 6033 | if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then |
| 6034 | # The compiler can only warn and ignore the option if not recognized |
| 6035 | # So say no if there are warnings |
| 6036 | if test -s conftest.err; then |
| 6037 | # Append any errors to the config.log. |
| 6038 | cat conftest.err 1>&AS_MESSAGE_LOG_FD |
| 6039 | else |
| 6040 | $2=yes |
| 6041 | fi |
| 6042 | fi |
| 6043 | $rm conftest* |
| 6044 | CFLAGS="$save_CFLAGS" |
| 6045 | ]) |
| 6046 | |
| 6047 | if test x"[$]$2" = xyes; then |
| 6048 | ifelse([$5], , :, [$5]) |
| 6049 | else |
| 6050 | ifelse([$6], , :, [$6]) |
| 6051 | fi |
| 6052 | ])# AC_LIBTOOL_COMPILER_OPTION |
| 6053 | |
| 6054 | |
| 6055 | # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
| 6056 | # [ACTION-SUCCESS], [ACTION-FAILURE]) |
| 6057 | # ------------------------------------------------------------ |
| 6058 | # Check whether the given compiler option works |
| 6059 | AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], |
| 6060 | [AC_CACHE_CHECK([$1], [$2], |
| 6061 | [$2=no |
| 6062 | save_LDFLAGS="$LDFLAGS" |
| 6063 | LDFLAGS="$LDFLAGS $3" |
| 6064 | echo "$lt_simple_link_test_code" > conftest.$ac_ext |
| 6065 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then |
| 6066 | # The compiler can only warn and ignore the option if not recognized |
| 6067 | # So say no if there are warnings |
| 6068 | if test -s conftest.err; then |
| 6069 | # Append any errors to the config.log. |
| 6070 | cat conftest.err 1>&AS_MESSAGE_LOG_FD |
| 6071 | else |
| 6072 | $2=yes |
| 6073 | fi |
| 6074 | fi |
| 6075 | $rm conftest* |
| 6076 | LDFLAGS="$save_LDFLAGS" |
| 6077 | ]) |
| 6078 | |
| 6079 | if test x"[$]$2" = xyes; then |
| 6080 | ifelse([$4], , :, [$4]) |
| 6081 | else |
| 6082 | ifelse([$5], , :, [$5]) |
| 6083 | fi |
| 6084 | ])# AC_LIBTOOL_LINKER_OPTION |
| 6085 | |
| 6086 | |
| 6087 | # AC_LIBTOOL_SYS_MAX_CMD_LEN |
| 6088 | # -------------------------- |
| 6089 | AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], |
| 6090 | [# find the maximum length of command line arguments |
| 6091 | AC_MSG_CHECKING([the maximum length of command line arguments]) |
| 6092 | AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl |
| 6093 | i=0 |
| 6094 | testring="ABCD" |
| 6095 | |
| 6096 | case $host_os in |
| 6097 | msdosdjgpp*) |
| 6098 | # On DJGPP, this test can blow up pretty badly due to problems in libc |
| 6099 | # (any single argument exceeding 2000 bytes causes a buffer overrun |
| 6100 | # during glob expansion). Even if it were fixed, the result of this |
| 6101 | # check would be larger than it should be. |
| 6102 | lt_cv_sys_max_cmd_len=12288; # 12K is about right |
| 6103 | ;; |
| 6104 | |
| 6105 | gnu*) |
| 6106 | # Under GNU Hurd, this test is not required because there is |
| 6107 | # no limit to the length of command line arguments. |
| 6108 | # Libtool will interpret -1 as no limit whatsoever |
| 6109 | lt_cv_sys_max_cmd_len=-1; |
| 6110 | ;; |
| 6111 | |
| 6112 | *) |
| 6113 | # If test is not a shell built-in, we'll probably end up computing a |
| 6114 | # maximum length that is only half of the actual maximum length, but |
| 6115 | # we can't tell. |
| 6116 | while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \ |
| 6117 | = "XX$testring") >/dev/null 2>&1 && |
| 6118 | new_result=`expr "X$testring" : ".*" 2>&1` && |
| 6119 | lt_cv_sys_max_cmd_len=$new_result && |
| 6120 | test $i != 17 # 1/2 MB should be enough |
| 6121 | do |
| 6122 | i=`expr $i + 1` |
| 6123 | testring=$testring$testring |
| 6124 | done |
| 6125 | testring= |
| 6126 | # Add a significant safety factor because C++ compilers can tack on massive |
| 6127 | # amounts of additional arguments before passing them to the linker. |
| 6128 | # It appears as though 1/2 is a usable value. |
| 6129 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` |
| 6130 | ;; |
| 6131 | esac |
| 6132 | ]) |
| 6133 | if test -n $lt_cv_sys_max_cmd_len ; then |
| 6134 | AC_MSG_RESULT($lt_cv_sys_max_cmd_len) |
| 6135 | else |
| 6136 | AC_MSG_RESULT(none) |
| 6137 | fi |
| 6138 | ])# AC_LIBTOOL_SYS_MAX_CMD_LEN |
| 6139 | |
| 6140 | |
| 6141 | # _LT_AC_CHECK_DLFCN |
| 6142 | # -------------------- |
| 6143 | AC_DEFUN([_LT_AC_CHECK_DLFCN], |
| 6144 | [AC_CHECK_HEADERS(dlfcn.h)dnl |
| 6145 | ])# _LT_AC_CHECK_DLFCN |
| 6146 | |
| 6147 | |
| 6148 | # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, |
| 6149 | # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) |
| 6150 | # ------------------------------------------------------------------ |
| 6151 | AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], |
| 6152 | [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
| 6153 | if test "$cross_compiling" = yes; then : |
| 6154 | [$4] |
| 6155 | else |
| 6156 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
| 6157 | lt_status=$lt_dlunknown |
| 6158 | cat > conftest.$ac_ext <<EOF |
| 6159 | [#line __oline__ "configure" |
| 6160 | #include "confdefs.h" |
| 6161 | |
| 6162 | #if HAVE_DLFCN_H |
| 6163 | #include <dlfcn.h> |
| 6164 | #endif |
| 6165 | |
| 6166 | #include <stdio.h> |
| 6167 | |
| 6168 | #ifdef RTLD_GLOBAL |
| 6169 | # define LT_DLGLOBAL RTLD_GLOBAL |
| 6170 | #else |
| 6171 | # ifdef DL_GLOBAL |
| 6172 | # define LT_DLGLOBAL DL_GLOBAL |
| 6173 | # else |
| 6174 | # define LT_DLGLOBAL 0 |
| 6175 | # endif |
| 6176 | #endif |
| 6177 | |
| 6178 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we |
| 6179 | find out it does not work in some platform. */ |
| 6180 | #ifndef LT_DLLAZY_OR_NOW |
| 6181 | # ifdef RTLD_LAZY |
| 6182 | # define LT_DLLAZY_OR_NOW RTLD_LAZY |
| 6183 | # else |
| 6184 | # ifdef DL_LAZY |
| 6185 | # define LT_DLLAZY_OR_NOW DL_LAZY |
| 6186 | # else |
| 6187 | # ifdef RTLD_NOW |
| 6188 | # define LT_DLLAZY_OR_NOW RTLD_NOW |
| 6189 | # else |
| 6190 | # ifdef DL_NOW |
| 6191 | # define LT_DLLAZY_OR_NOW DL_NOW |
| 6192 | # else |
| 6193 | # define LT_DLLAZY_OR_NOW 0 |
| 6194 | # endif |
| 6195 | # endif |
| 6196 | # endif |
| 6197 | # endif |
| 6198 | #endif |
| 6199 | |
| 6200 | #ifdef __cplusplus |
| 6201 | extern "C" void exit (int); |
| 6202 | #endif |
| 6203 | |
| 6204 | void fnord() { int i=42;} |
| 6205 | int main () |
| 6206 | { |
| 6207 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); |
| 6208 | int status = $lt_dlunknown; |
| 6209 | |
| 6210 | if (self) |
| 6211 | { |
| 6212 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; |
| 6213 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; |
| 6214 | /* dlclose (self); */ |
| 6215 | } |
| 6216 | |
| 6217 | exit (status); |
| 6218 | }] |
| 6219 | EOF |
| 6220 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then |
| 6221 | (./conftest; exit; ) 2>/dev/null |
| 6222 | lt_status=$? |
| 6223 | case x$lt_status in |
| 6224 | x$lt_dlno_uscore) $1 ;; |
| 6225 | x$lt_dlneed_uscore) $2 ;; |
| 6226 | x$lt_unknown|x*) $3 ;; |
| 6227 | esac |
| 6228 | else : |
| 6229 | # compilation failed |
| 6230 | $3 |
| 6231 | fi |
| 6232 | fi |
| 6233 | rm -fr conftest* |
| 6234 | ])# _LT_AC_TRY_DLOPEN_SELF |
| 6235 | |
| 6236 | |
| 6237 | # AC_LIBTOOL_DLOPEN_SELF |
| 6238 | # ------------------- |
| 6239 | AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], |
| 6240 | [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
| 6241 | if test "x$enable_dlopen" != xyes; then |
| 6242 | enable_dlopen=unknown |
| 6243 | enable_dlopen_self=unknown |
| 6244 | enable_dlopen_self_static=unknown |
| 6245 | else |
| 6246 | lt_cv_dlopen=no |
| 6247 | lt_cv_dlopen_libs= |
| 6248 | |
| 6249 | case $host_os in |
| 6250 | beos*) |
| 6251 | lt_cv_dlopen="load_add_on" |
| 6252 | lt_cv_dlopen_libs= |
| 6253 | lt_cv_dlopen_self=yes |
| 6254 | ;; |
| 6255 | |
| 6256 | cygwin* | mingw* | pw32*) |
| 6257 | lt_cv_dlopen="LoadLibrary" |
| 6258 | lt_cv_dlopen_libs= |
| 6259 | ;; |
| 6260 | |
| 6261 | *) |
| 6262 | AC_CHECK_FUNC([shl_load], |
| 6263 | [lt_cv_dlopen="shl_load"], |
| 6264 | [AC_CHECK_LIB([dld], [shl_load], |
| 6265 | [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], |
| 6266 | [AC_CHECK_FUNC([dlopen], |
| 6267 | [lt_cv_dlopen="dlopen"], |
| 6268 | [AC_CHECK_LIB([dl], [dlopen], |
| 6269 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], |
| 6270 | [AC_CHECK_LIB([svld], [dlopen], |
| 6271 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], |
| 6272 | [AC_CHECK_LIB([dld], [dld_link], |
| 6273 | [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) |
| 6274 | ]) |
| 6275 | ]) |
| 6276 | ]) |
| 6277 | ]) |
| 6278 | ]) |
| 6279 | ;; |
| 6280 | esac |
| 6281 | |
| 6282 | if test "x$lt_cv_dlopen" != xno; then |
| 6283 | enable_dlopen=yes |
| 6284 | else |
| 6285 | enable_dlopen=no |
| 6286 | fi |
| 6287 | |
| 6288 | case $lt_cv_dlopen in |
| 6289 | dlopen) |
| 6290 | save_CPPFLAGS="$CPPFLAGS" |
| 6291 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" |
| 6292 | |
| 6293 | save_LDFLAGS="$LDFLAGS" |
| 6294 | eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" |
| 6295 | |
| 6296 | save_LIBS="$LIBS" |
| 6297 | LIBS="$lt_cv_dlopen_libs $LIBS" |
| 6298 | |
| 6299 | AC_CACHE_CHECK([whether a program can dlopen itself], |
| 6300 | lt_cv_dlopen_self, [dnl |
| 6301 | _LT_AC_TRY_DLOPEN_SELF( |
| 6302 | lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, |
| 6303 | lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) |
| 6304 | ]) |
| 6305 | |
| 6306 | if test "x$lt_cv_dlopen_self" = xyes; then |
| 6307 | LDFLAGS="$LDFLAGS $link_static_flag" |
| 6308 | AC_CACHE_CHECK([whether a statically linked program can dlopen itself], |
| 6309 | lt_cv_dlopen_self_static, [dnl |
| 6310 | _LT_AC_TRY_DLOPEN_SELF( |
| 6311 | lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, |
| 6312 | lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) |
| 6313 | ]) |
| 6314 | fi |
| 6315 | |
| 6316 | CPPFLAGS="$save_CPPFLAGS" |
| 6317 | LDFLAGS="$save_LDFLAGS" |
| 6318 | LIBS="$save_LIBS" |
| 6319 | ;; |
| 6320 | esac |
| 6321 | |
| 6322 | case $lt_cv_dlopen_self in |
| 6323 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; |
| 6324 | *) enable_dlopen_self=unknown ;; |
| 6325 | esac |
| 6326 | |
| 6327 | case $lt_cv_dlopen_self_static in |
| 6328 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; |
| 6329 | *) enable_dlopen_self_static=unknown ;; |
| 6330 | esac |
| 6331 | fi |
| 6332 | ])# AC_LIBTOOL_DLOPEN_SELF |
| 6333 | |
| 6334 | |
| 6335 | # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) |
| 6336 | # --------------------------------- |
| 6337 | # Check to see if options -c and -o are simultaneously supported by compiler |
| 6338 | AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], |
| 6339 | [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
| 6340 | AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], |
| 6341 | [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], |
| 6342 | [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no |
| 6343 | $rm -r conftest 2>/dev/null |
| 6344 | mkdir conftest |
| 6345 | cd conftest |
| 6346 | mkdir out |
| 6347 | ifelse([$1],[],[save_CFLAGS="$CFLAGS" |
| 6348 | CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"], |
| 6349 | [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS" |
| 6350 | CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"], |
| 6351 | [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS" |
| 6352 | GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"]) |
| 6353 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext |
| 6354 | |
| 6355 | # According to Tom Tromey, Ian Lance Taylor reported there are C compilers |
| 6356 | # that will create temporary files in the current directory regardless of |
| 6357 | # the output directory. Thus, making CWD read-only will cause this test |
| 6358 | # to fail, enabling locking or at least warning the user not to do parallel |
| 6359 | # builds. |
| 6360 | chmod -w . |
| 6361 | |
| 6362 | if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext |
| 6363 | then |
| 6364 | # The compiler can only warn and ignore the option if not recognized |
| 6365 | # So say no if there are warnings |
| 6366 | if test -s out/conftest.err; then |
| 6367 | # Append any errors to the config.log. |
| 6368 | cat out/conftest.err 1>&AS_MESSAGE_LOG_FD |
| 6369 | else |
| 6370 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes |
| 6371 | fi |
| 6372 | fi |
| 6373 | ifelse([$1],[],[CFLAGS="$save_CFLAGS"], |
| 6374 | [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"], |
| 6375 | [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"]) |
| 6376 | chmod u+w . |
| 6377 | $rm conftest* out/* |
| 6378 | rmdir out |
| 6379 | cd .. |
| 6380 | rmdir conftest |
| 6381 | $rm conftest* |
| 6382 | ]) |
| 6383 | ])# AC_LIBTOOL_PROG_CC_C_O |
| 6384 | |
| 6385 | |
| 6386 | # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) |
| 6387 | # ----------------------------------------- |
| 6388 | # Check to see if we can do hard links to lock some files if needed |
| 6389 | AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], |
| 6390 | [AC_REQUIRE([_LT_AC_LOCK])dnl |
| 6391 | |
| 6392 | hard_links="nottested" |
| 6393 | if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then |
| 6394 | # do not overwrite the value of need_locks provided by the user |
| 6395 | AC_MSG_CHECKING([if we can lock with hard links]) |
| 6396 | hard_links=yes |
| 6397 | $rm conftest* |
| 6398 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
| 6399 | touch conftest.a |
| 6400 | ln conftest.a conftest.b 2>&5 || hard_links=no |
| 6401 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
| 6402 | AC_MSG_RESULT([$hard_links]) |
| 6403 | if test "$hard_links" = no; then |
| 6404 | AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) |
| 6405 | need_locks=warn |
| 6406 | fi |
| 6407 | else |
| 6408 | need_locks=no |
| 6409 | fi |
| 6410 | ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS |
| 6411 | |
| 6412 | |
| 6413 | # AC_LIBTOOL_OBJDIR |
| 6414 | # ----------------- |
| 6415 | AC_DEFUN([AC_LIBTOOL_OBJDIR], |
| 6416 | [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], |
| 6417 | [rm -f .libs 2>/dev/null |
| 6418 | mkdir .libs 2>/dev/null |
| 6419 | if test -d .libs; then |
| 6420 | lt_cv_objdir=.libs |
| 6421 | else |
| 6422 | # MS-DOS does not allow filenames that begin with a dot. |
| 6423 | lt_cv_objdir=_libs |
| 6424 | fi |
| 6425 | rmdir .libs 2>/dev/null]) |
| 6426 | objdir=$lt_cv_objdir |
| 6427 | ])# AC_LIBTOOL_OBJDIR |
| 6428 | |
| 6429 | |
| 6430 | # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) |
| 6431 | # ---------------------------------------------- |
| 6432 | # Check hardcoding attributes. |
| 6433 | AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], |
| 6434 | [AC_MSG_CHECKING([how to hardcode library paths into programs]) |
| 6435 | _LT_AC_TAGVAR(hardcode_action, $1)= |
| 6436 | if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ |
| 6437 | test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then |
| 6438 | |
| 6439 | # We can hardcode non-existant directories. |
| 6440 | if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && |
| 6441 | # If the only mechanism to avoid hardcoding is shlibpath_var, we |
| 6442 | # have to relink, otherwise we might link with an installed library |
| 6443 | # when we should be linking with a yet-to-be-installed one |
| 6444 | ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && |
| 6445 | test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then |
| 6446 | # Linking always hardcodes the temporary library directory. |
| 6447 | _LT_AC_TAGVAR(hardcode_action, $1)=relink |
| 6448 | else |
| 6449 | # We can link without hardcoding, and we can hardcode nonexisting dirs. |
| 6450 | _LT_AC_TAGVAR(hardcode_action, $1)=immediate |
| 6451 | fi |
| 6452 | else |
| 6453 | # We cannot hardcode anything, or else we can only hardcode existing |
| 6454 | # directories. |
| 6455 | _LT_AC_TAGVAR(hardcode_action, $1)=unsupported |
| 6456 | fi |
| 6457 | AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) |
| 6458 | |
| 6459 | if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then |
| 6460 | # Fast installation is not supported |
| 6461 | enable_fast_install=no |
| 6462 | elif test "$shlibpath_overrides_runpath" = yes || |
| 6463 | test "$enable_shared" = no; then |
| 6464 | # Fast installation is not necessary |
| 6465 | enable_fast_install=needless |
| 6466 | fi |
| 6467 | ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH |
| 6468 | |
| 6469 | |
| 6470 | # AC_LIBTOOL_SYS_LIB_STRIP |
| 6471 | # ------------------------ |
| 6472 | AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], |
| 6473 | [striplib= |
| 6474 | old_striplib= |
| 6475 | AC_MSG_CHECKING([whether stripping libraries is possible]) |
| 6476 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then |
| 6477 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" |
| 6478 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" |
| 6479 | AC_MSG_RESULT([yes]) |
| 6480 | else |
| 6481 | AC_MSG_RESULT([no]) |
| 6482 | fi |
| 6483 | ])# AC_LIBTOOL_SYS_LIB_STRIP |
| 6484 | |
| 6485 | |
| 6486 | # AC_LIBTOOL_SYS_DYNAMIC_LINKER |
| 6487 | # ----------------------------- |
| 6488 | # PORTME Fill in your ld.so characteristics |
| 6489 | AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], |
| 6490 | [AC_MSG_CHECKING([dynamic linker characteristics]) |
| 6491 | library_names_spec= |
| 6492 | libname_spec='lib$name' |
| 6493 | soname_spec= |
| 6494 | postinstall_cmds= |
| 6495 | postuninstall_cmds= |
| 6496 | finish_cmds= |
| 6497 | finish_eval= |
| 6498 | shlibpath_var= |
| 6499 | shlibpath_overrides_runpath=unknown |
| 6500 | version_type=none |
| 6501 | dynamic_linker="$host_os ld.so" |
| 6502 | sys_lib_dlsearch_path_spec="/lib /usr/lib" |
| 6503 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
| 6504 | need_lib_prefix=unknown |
| 6505 | hardcode_into_libs=no |
| 6506 | |
| 6507 | # when you set need_version to no, make sure it does not cause -set_version |
| 6508 | # flags to be left without arguments |
| 6509 | need_version=unknown |
| 6510 | |
| 6511 | case $host_os in |
| 6512 | aix3*) |
| 6513 | version_type=linux |
| 6514 | library_names_spec='${libname}${release}.so$versuffix $libname.a' |
| 6515 | shlibpath_var=LIBPATH |
| 6516 | |
| 6517 | # AIX 3 has no versioning support, so we append a major version to the name. |
| 6518 | soname_spec='${libname}${release}.so$major' |
| 6519 | ;; |
| 6520 | |
| 6521 | aix4* | aix5*) |
| 6522 | version_type=linux |
| 6523 | if test "$host_cpu" = ia64; then |
| 6524 | # AIX 5 supports IA64 |
| 6525 | library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' |
| 6526 | shlibpath_var=LD_LIBRARY_PATH |
| 6527 | else |
| 6528 | # With GCC up to 2.95.x, collect2 would create an import file |
| 6529 | # for dependence libraries. The import file would start with |
| 6530 | # the line `#! .'. This would cause the generated library to |
| 6531 | # depend on `.', always an invalid library. This was fixed in |
| 6532 | # development snapshots of GCC prior to 3.0. |
| 6533 | case $host_os in |
| 6534 | aix4 | aix4.[[01]] | aix4.[[01]].*) |
| 6535 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' |
| 6536 | echo ' yes ' |
| 6537 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then |
| 6538 | : |
| 6539 | else |
| 6540 | can_build_shared=no |
| 6541 | fi |
| 6542 | ;; |
| 6543 | esac |
| 6544 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct |
| 6545 | # soname into executable. Probably we can add versioning support to |
| 6546 | # collect2, so additional links can be useful in future. |
| 6547 | if test "$aix_use_runtimelinking" = yes; then |
| 6548 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so |
| 6549 | # instead of lib<name>.a to let people know that these are not |
| 6550 | # typical AIX shared libraries. |
| 6551 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 6552 | else |
| 6553 | # We preserve .a as extension for shared libraries through AIX4.2 |
| 6554 | # and later when we are not doing run time linking. |
| 6555 | library_names_spec='${libname}${release}.a $libname.a' |
| 6556 | soname_spec='${libname}${release}.so$major' |
| 6557 | fi |
| 6558 | shlibpath_var=LIBPATH |
| 6559 | fi |
| 6560 | ;; |
| 6561 | |
| 6562 | amigaos*) |
| 6563 | library_names_spec='$libname.ixlibrary $libname.a' |
| 6564 | # Create ${libname}_ixlibrary.a entries in /sys/libs. |
| 6565 | 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' |
| 6566 | ;; |
| 6567 | |
| 6568 | beos*) |
| 6569 | library_names_spec='${libname}.so' |
| 6570 | dynamic_linker="$host_os ld.so" |
| 6571 | shlibpath_var=LIBRARY_PATH |
| 6572 | ;; |
| 6573 | |
| 6574 | bsdi4*) |
| 6575 | version_type=linux |
| 6576 | need_version=no |
| 6577 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 6578 | soname_spec='${libname}${release}.so$major' |
| 6579 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' |
| 6580 | shlibpath_var=LD_LIBRARY_PATH |
| 6581 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
| 6582 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
| 6583 | # the default ld.so.conf also contains /usr/contrib/lib and |
| 6584 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
| 6585 | # libtool to hard-code these into programs |
| 6586 | ;; |
| 6587 | |
| 6588 | cygwin* | mingw* | pw32*) |
| 6589 | version_type=windows |
| 6590 | need_version=no |
| 6591 | need_lib_prefix=no |
| 6592 | case $GCC,$host_os in |
| 6593 | yes,cygwin*) |
| 6594 | library_names_spec='$libname.dll.a' |
| 6595 | sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" |
| 6596 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' |
| 6597 | postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ |
| 6598 | dldir=$destdir/`dirname \$dlpath`~ |
| 6599 | test -d \$dldir || mkdir -p \$dldir~ |
| 6600 | $install_prog .libs/$dlname \$dldir/$dlname' |
| 6601 | postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ |
| 6602 | dlpath=$dir/\$dldll~ |
| 6603 | $rm \$dlpath' |
| 6604 | ;; |
| 6605 | yes,mingw*) |
| 6606 | library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' |
| 6607 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"` |
| 6608 | if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then |
| 6609 | # It is most probably a Windows format PATH printed by |
| 6610 | # mingw gcc, but we are running on Cygwin. Gcc prints its search |
| 6611 | # path with ; separators, and with drive letters. We can handle the |
| 6612 | # drive letters (cygwin fileutils understands them), so leave them, |
| 6613 | # especially as we might pass files found there to a mingw objdump, |
| 6614 | # which wouldn't understand a cygwinified path. Ahh. |
| 6615 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'` |
| 6616 | else |
| 6617 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"` |
| 6618 | fi |
| 6619 | ;; |
| 6620 | yes,pw32*) |
| 6621 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' |
| 6622 | ;; |
| 6623 | *) |
| 6624 | library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' |
| 6625 | ;; |
| 6626 | esac |
| 6627 | dynamic_linker='Win32 ld.exe' |
| 6628 | # FIXME: first we should search . and the directory the executable is in |
| 6629 | shlibpath_var=PATH |
| 6630 | ;; |
| 6631 | |
| 6632 | darwin* | rhapsody*) |
| 6633 | dynamic_linker="$host_os dyld" |
| 6634 | version_type=darwin |
| 6635 | need_lib_prefix=no |
| 6636 | need_version=no |
| 6637 | # FIXME: Relying on posixy $() will cause problems for |
| 6638 | # cross-compilation, but unfortunately the echo tests do not |
| 6639 | # yet detect zsh echo's removal of \ escapes. |
| 6640 | 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)' |
| 6641 | soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' |
| 6642 | shlibpath_overrides_runpath=yes |
| 6643 | shlibpath_var=DYLD_LIBRARY_PATH |
| 6644 | ;; |
| 6645 | |
| 6646 | dgux*) |
| 6647 | version_type=linux |
| 6648 | need_lib_prefix=no |
| 6649 | need_version=no |
| 6650 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 6651 | soname_spec='${libname}${release}.so$major' |
| 6652 | shlibpath_var=LD_LIBRARY_PATH |
| 6653 | ;; |
| 6654 | |
| 6655 | freebsd1*) |
| 6656 | dynamic_linker=no |
| 6657 | ;; |
| 6658 | |
| 6659 | freebsd*) |
| 6660 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` |
| 6661 | version_type=freebsd-$objformat |
| 6662 | case $version_type in |
| 6663 | freebsd-elf*) |
| 6664 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
| 6665 | need_version=no |
| 6666 | need_lib_prefix=no |
| 6667 | ;; |
| 6668 | freebsd-*) |
| 6669 | library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' |
| 6670 | need_version=yes |
| 6671 | ;; |
| 6672 | esac |
| 6673 | shlibpath_var=LD_LIBRARY_PATH |
| 6674 | case $host_os in |
| 6675 | freebsd2*) |
| 6676 | shlibpath_overrides_runpath=yes |
| 6677 | ;; |
| 6678 | freebsd3.[01]* | freebsdelf3.[01]*) |
| 6679 | shlibpath_overrides_runpath=yes |
| 6680 | hardcode_into_libs=yes |
| 6681 | ;; |
| 6682 | *) # from 3.2 on |
| 6683 | shlibpath_overrides_runpath=no |
| 6684 | hardcode_into_libs=yes |
| 6685 | ;; |
| 6686 | esac |
| 6687 | ;; |
| 6688 | |
| 6689 | gnu*) |
| 6690 | version_type=linux |
| 6691 | need_lib_prefix=no |
| 6692 | need_version=no |
| 6693 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' |
| 6694 | soname_spec='${libname}${release}.so$major' |
| 6695 | shlibpath_var=LD_LIBRARY_PATH |
| 6696 | hardcode_into_libs=yes |
| 6697 | ;; |
| 6698 | |
| 6699 | hpux9* | hpux10* | hpux11*) |
| 6700 | # Give a soname corresponding to the major version so that dld.sl refuses to |
| 6701 | # link against other versions. |
| 6702 | version_type=sunos |
| 6703 | need_lib_prefix=no |
| 6704 | need_version=no |
| 6705 | if test "$host_cpu" = ia64; then |
| 6706 | hardcode_into_libs=yes |
| 6707 | dynamic_linker="$host_os dld.so" |
| 6708 | shlibpath_var=LD_LIBRARY_PATH |
| 6709 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. |
| 6710 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 6711 | soname_spec='${libname}${release}.so$major' |
| 6712 | if test "X$HPUX_IA64_MODE" = X32; then |
| 6713 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" |
| 6714 | else |
| 6715 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" |
| 6716 | fi |
| 6717 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec |
| 6718 | else |
| 6719 | dynamic_linker="$host_os dld.sl" |
| 6720 | shlibpath_var=SHLIB_PATH |
| 6721 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH |
| 6722 | library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' |
| 6723 | soname_spec='${libname}${release}.sl$major' |
| 6724 | fi |
| 6725 | # HP-UX runs *really* slowly unless shared libraries are mode 555. |
| 6726 | postinstall_cmds='chmod 555 $lib' |
| 6727 | ;; |
| 6728 | |
| 6729 | irix5* | irix6* | nonstopux*) |
| 6730 | case $host_os in |
| 6731 | nonstopux*) version_type=nonstopux ;; |
| 6732 | *) version_type=irix ;; |
| 6733 | esac |
| 6734 | need_lib_prefix=no |
| 6735 | need_version=no |
| 6736 | soname_spec='${libname}${release}.so$major' |
| 6737 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' |
| 6738 | case $host_os in |
| 6739 | irix5* | nonstopux*) |
| 6740 | libsuff= shlibsuff= |
| 6741 | ;; |
| 6742 | *) |
| 6743 | case $LD in # libtool.m4 will add one of these switches to LD |
| 6744 | *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; |
| 6745 | *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; |
| 6746 | *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; |
| 6747 | *) libsuff= shlibsuff= libmagic=never-match;; |
| 6748 | esac |
| 6749 | ;; |
| 6750 | esac |
| 6751 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
| 6752 | shlibpath_overrides_runpath=no |
| 6753 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" |
| 6754 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" |
| 6755 | ;; |
| 6756 | |
| 6757 | # No shared lib support for Linux oldld, aout, or coff. |
| 6758 | linux*oldld* | linux*aout* | linux*coff*) |
| 6759 | dynamic_linker=no |
| 6760 | ;; |
| 6761 | |
| 6762 | # This must be Linux ELF. |
| 6763 | linux*) |
| 6764 | version_type=linux |
| 6765 | need_lib_prefix=no |
| 6766 | need_version=no |
| 6767 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 6768 | soname_spec='${libname}${release}.so$major' |
| 6769 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
| 6770 | libsuff= |
| 6771 | if test "x$LINUX_64_MODE" = x64; then |
| 6772 | # Some platforms are per default 64-bit, so there's no /lib64 |
| 6773 | if test -d /lib64; then |
| 6774 | libsuff=64 |
| 6775 | fi |
| 6776 | fi |
| 6777 | shlibpath_var=LD_LIBRARY_PATH |
| 6778 | shlibpath_overrides_runpath=no |
| 6779 | sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" |
| 6780 | sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" |
| 6781 | # This implies no fast_install, which is unacceptable. |
| 6782 | # Some rework will be needed to allow for fast_install |
| 6783 | # before this can be enabled. |
| 6784 | hardcode_into_libs=yes |
| 6785 | |
| 6786 | # We used to test for /lib/ld.so.1 and disable shared libraries on |
| 6787 | # powerpc, because MkLinux only supported shared libraries with the |
| 6788 | # GNU dynamic linker. Since this was broken with cross compilers, |
| 6789 | # most powerpc-linux boxes support dynamic linking these days and |
| 6790 | # people can always --disable-shared, the test was removed, and we |
| 6791 | # assume the GNU/Linux dynamic linker is in use. |
| 6792 | dynamic_linker='GNU/Linux ld.so' |
| 6793 | ;; |
| 6794 | |
| 6795 | netbsd*) |
| 6796 | version_type=sunos |
| 6797 | need_lib_prefix=no |
| 6798 | need_version=no |
| 6799 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 6800 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
| 6801 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
| 6802 | dynamic_linker='NetBSD (a.out) ld.so' |
| 6803 | else |
| 6804 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' |
| 6805 | soname_spec='${libname}${release}.so$major' |
| 6806 | dynamic_linker='NetBSD ld.elf_so' |
| 6807 | fi |
| 6808 | shlibpath_var=LD_LIBRARY_PATH |
| 6809 | shlibpath_overrides_runpath=yes |
| 6810 | hardcode_into_libs=yes |
| 6811 | ;; |
| 6812 | |
| 6813 | newsos6) |
| 6814 | version_type=linux |
| 6815 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 6816 | shlibpath_var=LD_LIBRARY_PATH |
| 6817 | shlibpath_overrides_runpath=yes |
| 6818 | ;; |
| 6819 | |
| 6820 | nto-qnx) |
| 6821 | version_type=linux |
| 6822 | need_lib_prefix=no |
| 6823 | need_version=no |
| 6824 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 6825 | soname_spec='${libname}${release}.so$major' |
| 6826 | shlibpath_var=LD_LIBRARY_PATH |
| 6827 | shlibpath_overrides_runpath=yes |
| 6828 | ;; |
| 6829 | |
| 6830 | openbsd*) |
| 6831 | version_type=sunos |
| 6832 | need_lib_prefix=no |
| 6833 | need_version=no |
| 6834 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
| 6835 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
| 6836 | shlibpath_var=LD_LIBRARY_PATH |
| 6837 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| 6838 | case $host_os in |
| 6839 | openbsd2.[[89]] | openbsd2.[[89]].*) |
| 6840 | shlibpath_overrides_runpath=no |
| 6841 | ;; |
| 6842 | *) |
| 6843 | shlibpath_overrides_runpath=yes |
| 6844 | ;; |
| 6845 | esac |
| 6846 | else |
| 6847 | shlibpath_overrides_runpath=yes |
| 6848 | fi |
| 6849 | ;; |
| 6850 | |
| 6851 | os2*) |
| 6852 | libname_spec='$name' |
| 6853 | need_lib_prefix=no |
| 6854 | library_names_spec='$libname.dll $libname.a' |
| 6855 | dynamic_linker='OS/2 ld.exe' |
| 6856 | shlibpath_var=LIBPATH |
| 6857 | ;; |
| 6858 | |
| 6859 | osf3* | osf4* | osf5*) |
| 6860 | version_type=osf |
| 6861 | need_lib_prefix=no |
| 6862 | need_version=no |
| 6863 | soname_spec='${libname}${release}.so' |
| 6864 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
| 6865 | shlibpath_var=LD_LIBRARY_PATH |
| 6866 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" |
| 6867 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" |
| 6868 | ;; |
| 6869 | |
| 6870 | sco3.2v5*) |
| 6871 | version_type=osf |
| 6872 | soname_spec='${libname}${release}.so$major' |
| 6873 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 6874 | shlibpath_var=LD_LIBRARY_PATH |
| 6875 | ;; |
| 6876 | |
| 6877 | solaris*) |
| 6878 | version_type=linux |
| 6879 | need_lib_prefix=no |
| 6880 | need_version=no |
| 6881 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 6882 | soname_spec='${libname}${release}.so$major' |
| 6883 | shlibpath_var=LD_LIBRARY_PATH |
| 6884 | shlibpath_overrides_runpath=yes |
| 6885 | hardcode_into_libs=yes |
| 6886 | # ldd complains unless libraries are executable |
| 6887 | postinstall_cmds='chmod +x $lib' |
| 6888 | ;; |
| 6889 | |
| 6890 | sunos4*) |
| 6891 | version_type=sunos |
| 6892 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
| 6893 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' |
| 6894 | shlibpath_var=LD_LIBRARY_PATH |
| 6895 | shlibpath_overrides_runpath=yes |
| 6896 | if test "$with_gnu_ld" = yes; then |
| 6897 | need_lib_prefix=no |
| 6898 | fi |
| 6899 | need_version=yes |
| 6900 | ;; |
| 6901 | |
| 6902 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
| 6903 | version_type=linux |
| 6904 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 6905 | soname_spec='${libname}${release}.so$major' |
| 6906 | shlibpath_var=LD_LIBRARY_PATH |
| 6907 | case $host_vendor in |
| 6908 | sni) |
| 6909 | shlibpath_overrides_runpath=no |
| 6910 | ;; |
| 6911 | motorola) |
| 6912 | need_lib_prefix=no |
| 6913 | need_version=no |
| 6914 | shlibpath_overrides_runpath=no |
| 6915 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' |
| 6916 | ;; |
| 6917 | esac |
| 6918 | ;; |
| 6919 | |
| 6920 | sysv4*MP*) |
| 6921 | if test -d /usr/nec ;then |
| 6922 | version_type=linux |
| 6923 | library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' |
| 6924 | soname_spec='$libname.so.$major' |
| 6925 | shlibpath_var=LD_LIBRARY_PATH |
| 6926 | fi |
| 6927 | ;; |
| 6928 | |
| 6929 | uts4*) |
| 6930 | version_type=linux |
| 6931 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
| 6932 | soname_spec='${libname}${release}.so$major' |
| 6933 | shlibpath_var=LD_LIBRARY_PATH |
| 6934 | ;; |
| 6935 | |
| 6936 | *) |
| 6937 | dynamic_linker=no |
| 6938 | ;; |
| 6939 | esac |
| 6940 | AC_MSG_RESULT([$dynamic_linker]) |
| 6941 | test "$dynamic_linker" = no && can_build_shared=no |
| 6942 | ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER |
| 6943 | |
| 6944 | |
| 6945 | # _LT_AC_TAGCONFIG |
| 6946 | # ---------------- |
| 6947 | AC_DEFUN([_LT_AC_TAGCONFIG], |
| 6948 | [AC_ARG_WITH([tags], |
| 6949 | [AC_HELP_STRING([--with-tags=TAGS], |
| 6950 | [include additional configurations @<:@CXX,GCJ@:>@])], |
| 6951 | [tagnames="$withval"], |
| 6952 | [tagnames="CXX,GCJ" |
| 6953 | case $host_os in |
| 6954 | mingw*|cygwin*) tagnames="$tagnames,RC" ;; |
| 6955 | esac]) |
| 6956 | |
| 6957 | if test -f "$ltmain" && test -n "$tagnames"; then |
| 6958 | if test ! -f "${ofile}"; then |
| 6959 | AC_MSG_WARN([output file `$ofile' does not exist]) |
| 6960 | fi |
| 6961 | |
| 6962 | if test -z "$LTCC"; then |
| 6963 | eval "`$SHELL ${ofile} --config | grep '^LTCC='`" |
| 6964 | if test -z "$LTCC"; then |
| 6965 | AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) |
| 6966 | else |
| 6967 | AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) |
| 6968 | fi |
| 6969 | fi |
| 6970 | |
| 6971 | # Extract list of available tagged configurations in $ofile. |
| 6972 | # Note that this assumes the entire list is on one line. |
| 6973 | available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` |
| 6974 | |
| 6975 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
| 6976 | for tagname in $tagnames; do |
| 6977 | IFS="$lt_save_ifs" |
| 6978 | # Check whether tagname contains only valid characters |
| 6979 | case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in |
| 6980 | "") ;; |
| 6981 | *) AC_MSG_ERROR([invalid tag name: $tagname]) |
| 6982 | ;; |
| 6983 | esac |
| 6984 | |
| 6985 | if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null |
| 6986 | then |
| 6987 | AC_MSG_ERROR([tag name \"$tagname\" already exists]) |
| 6988 | fi |
| 6989 | |
| 6990 | # Update the list of available tags. |
| 6991 | if test -n "$tagname"; then |
| 6992 | echo appending configuration tag \"$tagname\" to $ofile |
| 6993 | |
| 6994 | case $tagname in |
| 6995 | CXX) |
| 6996 | AC_LIBTOOL_LANG_CXX_CONFIG |
| 6997 | ;; |
| 6998 | |
| 6999 | GCJ) |
| 7000 | AC_LIBTOOL_LANG_GCJ_CONFIG |
| 7001 | ;; |
| 7002 | |
| 7003 | RC) |
| 7004 | AC_LIBTOOL_LANG_RC_CONFIG |
| 7005 | ;; |
| 7006 | |
| 7007 | *) |
| 7008 | AC_MSG_ERROR([Unsupported tag name: $tagname]) |
| 7009 | ;; |
| 7010 | esac |
| 7011 | |
| 7012 | # Append the new tag name to the list of available tags. |
| 7013 | available_tags="$available_tags $tagname" |
| 7014 | fi |
| 7015 | done |
| 7016 | IFS="$lt_save_ifs" |
| 7017 | |
| 7018 | # Now substitute the updated list of available tags. |
| 7019 | if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then |
| 7020 | mv "${ofile}T" "$ofile" |
| 7021 | chmod +x "$ofile" |
| 7022 | else |
| 7023 | rm -f "${ofile}T" |
| 7024 | AC_MSG_ERROR([unable to update list of available tagged configurations.]) |
| 7025 | fi |
| 7026 | fi |
| 7027 | ])# _LT_AC_TAGCONFIG |
| 7028 | |
| 7029 | |
| 7030 | # AC_LIBTOOL_DLOPEN |
| 7031 | # ----------------- |
| 7032 | # enable checks for dlopen support |
| 7033 | AC_DEFUN([AC_LIBTOOL_DLOPEN], |
| 7034 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) |
| 7035 | ])# AC_LIBTOOL_DLOPEN |
| 7036 | |
| 7037 | |
| 7038 | # AC_LIBTOOL_WIN32_DLL |
| 7039 | # -------------------- |
| 7040 | # declare package support for building win32 dll's |
| 7041 | AC_DEFUN([AC_LIBTOOL_WIN32_DLL], |
| 7042 | [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) |
| 7043 | ])# AC_LIBTOOL_WIN32_DLL |
| 7044 | |
| 7045 | |
| 7046 | # AC_ENABLE_SHARED([DEFAULT]) |
| 7047 | # --------------------------- |
| 7048 | # implement the --enable-shared flag |
| 7049 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
| 7050 | AC_DEFUN([AC_ENABLE_SHARED], |
| 7051 | [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl |
| 7052 | AC_ARG_ENABLE([shared], |
| 7053 | [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], |
| 7054 | [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], |
| 7055 | [p=${PACKAGE-default} |
| 7056 | case $enableval in |
| 7057 | yes) enable_shared=yes ;; |
| 7058 | no) enable_shared=no ;; |
| 7059 | *) |
| 7060 | enable_shared=no |
| 7061 | # Look at the argument we got. We use all the common list separators. |
| 7062 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
| 7063 | for pkg in $enableval; do |
| 7064 | IFS="$lt_save_ifs" |
| 7065 | if test "X$pkg" = "X$p"; then |
| 7066 | enable_shared=yes |
| 7067 | fi |
| 7068 | done |
| 7069 | IFS="$lt_save_ifs" |
| 7070 | ;; |
| 7071 | esac], |
| 7072 | [enable_shared=]AC_ENABLE_SHARED_DEFAULT) |
| 7073 | ])# AC_ENABLE_SHARED |
| 7074 | |
| 7075 | |
| 7076 | # AC_DISABLE_SHARED |
| 7077 | # ----------------- |
| 7078 | #- set the default shared flag to --disable-shared |
| 7079 | AC_DEFUN([AC_DISABLE_SHARED], |
| 7080 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 7081 | AC_ENABLE_SHARED(no) |
| 7082 | ])# AC_DISABLE_SHARED |
| 7083 | |
| 7084 | |
| 7085 | # AC_ENABLE_STATIC([DEFAULT]) |
| 7086 | # --------------------------- |
| 7087 | # implement the --enable-static flag |
| 7088 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
| 7089 | AC_DEFUN([AC_ENABLE_STATIC], |
| 7090 | [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl |
| 7091 | AC_ARG_ENABLE([static], |
| 7092 | [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], |
| 7093 | [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], |
| 7094 | [p=${PACKAGE-default} |
| 7095 | case $enableval in |
| 7096 | yes) enable_static=yes ;; |
| 7097 | no) enable_static=no ;; |
| 7098 | *) |
| 7099 | enable_static=no |
| 7100 | # Look at the argument we got. We use all the common list separators. |
| 7101 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
| 7102 | for pkg in $enableval; do |
| 7103 | IFS="$lt_save_ifs" |
| 7104 | if test "X$pkg" = "X$p"; then |
| 7105 | enable_static=yes |
| 7106 | fi |
| 7107 | done |
| 7108 | IFS="$lt_save_ifs" |
| 7109 | ;; |
| 7110 | esac], |
| 7111 | [enable_static=]AC_ENABLE_STATIC_DEFAULT) |
| 7112 | ])# AC_ENABLE_STATIC |
| 7113 | |
| 7114 | |
| 7115 | # AC_DISABLE_STATIC |
| 7116 | # ----------------- |
| 7117 | # set the default static flag to --disable-static |
| 7118 | AC_DEFUN([AC_DISABLE_STATIC], |
| 7119 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 7120 | AC_ENABLE_STATIC(no) |
| 7121 | ])# AC_DISABLE_STATIC |
| 7122 | |
| 7123 | |
| 7124 | # AC_ENABLE_FAST_INSTALL([DEFAULT]) |
| 7125 | # --------------------------------- |
| 7126 | # implement the --enable-fast-install flag |
| 7127 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
| 7128 | AC_DEFUN([AC_ENABLE_FAST_INSTALL], |
| 7129 | [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl |
| 7130 | AC_ARG_ENABLE([fast-install], |
| 7131 | [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], |
| 7132 | [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], |
| 7133 | [p=${PACKAGE-default} |
| 7134 | case $enableval in |
| 7135 | yes) enable_fast_install=yes ;; |
| 7136 | no) enable_fast_install=no ;; |
| 7137 | *) |
| 7138 | enable_fast_install=no |
| 7139 | # Look at the argument we got. We use all the common list separators. |
| 7140 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
| 7141 | for pkg in $enableval; do |
| 7142 | IFS="$lt_save_ifs" |
| 7143 | if test "X$pkg" = "X$p"; then |
| 7144 | enable_fast_install=yes |
| 7145 | fi |
| 7146 | done |
| 7147 | IFS="$lt_save_ifs" |
| 7148 | ;; |
| 7149 | esac], |
| 7150 | [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) |
| 7151 | ])# AC_ENABLE_FAST_INSTALL |
| 7152 | |
| 7153 | |
| 7154 | # AC_DISABLE_FAST_INSTALL |
| 7155 | # ----------------------- |
| 7156 | # set the default to --disable-fast-install |
| 7157 | AC_DEFUN([AC_DISABLE_FAST_INSTALL], |
| 7158 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 7159 | AC_ENABLE_FAST_INSTALL(no) |
| 7160 | ])# AC_DISABLE_FAST_INSTALL |
| 7161 | |
| 7162 | |
| 7163 | # AC_LIBTOOL_PICMODE([MODE]) |
| 7164 | # -------------------------- |
| 7165 | # implement the --with-pic flag |
| 7166 | # MODE is either `yes' or `no'. If omitted, it defaults to `both'. |
| 7167 | AC_DEFUN([AC_LIBTOOL_PICMODE], |
| 7168 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 7169 | pic_mode=ifelse($#,1,$1,default) |
| 7170 | ])# AC_LIBTOOL_PICMODE |
| 7171 | |
| 7172 | |
| 7173 | # AC_PATH_TOOL_PREFIX |
| 7174 | # ------------------- |
| 7175 | # find a file program which can recognise shared library |
| 7176 | AC_DEFUN([AC_PATH_TOOL_PREFIX], |
| 7177 | [AC_MSG_CHECKING([for $1]) |
| 7178 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, |
| 7179 | [case $MAGIC_CMD in |
| 7180 | [[\\/*] | ?:[\\/]*]) |
| 7181 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
| 7182 | ;; |
| 7183 | *) |
| 7184 | lt_save_MAGIC_CMD="$MAGIC_CMD" |
| 7185 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
| 7186 | dnl $ac_dummy forces splitting on constant user-supplied paths. |
| 7187 | dnl POSIX.2 word splitting is done only on the output of word expansions, |
| 7188 | dnl not every word. This closes a longstanding sh security hole. |
| 7189 | ac_dummy="ifelse([$2], , $PATH, [$2])" |
| 7190 | for ac_dir in $ac_dummy; do |
| 7191 | IFS="$lt_save_ifs" |
| 7192 | test -z "$ac_dir" && ac_dir=. |
| 7193 | if test -f $ac_dir/$1; then |
| 7194 | lt_cv_path_MAGIC_CMD="$ac_dir/$1" |
| 7195 | if test -n "$file_magic_test_file"; then |
| 7196 | case $deplibs_check_method in |
| 7197 | "file_magic "*) |
| 7198 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" |
| 7199 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
| 7200 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
| 7201 | egrep "$file_magic_regex" > /dev/null; then |
| 7202 | : |
| 7203 | else |
| 7204 | cat <<EOF 1>&2 |
| 7205 | |
| 7206 | *** Warning: the command libtool uses to detect shared libraries, |
| 7207 | *** $file_magic_cmd, produces output that libtool cannot recognize. |
| 7208 | *** The result is that libtool may fail to recognize shared libraries |
| 7209 | *** as such. This will affect the creation of libtool libraries that |
| 7210 | *** depend on shared libraries, but programs linked with such libtool |
| 7211 | *** libraries will work regardless of this problem. Nevertheless, you |
| 7212 | *** may want to report the problem to your system manager and/or to |
| 7213 | *** bug-libtool@gnu.org |
| 7214 | |
| 7215 | EOF |
| 7216 | fi ;; |
| 7217 | esac |
| 7218 | fi |
| 7219 | break |
| 7220 | fi |
| 7221 | done |
| 7222 | IFS="$lt_save_ifs" |
| 7223 | MAGIC_CMD="$lt_save_MAGIC_CMD" |
| 7224 | ;; |
| 7225 | esac]) |
| 7226 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
| 7227 | if test -n "$MAGIC_CMD"; then |
| 7228 | AC_MSG_RESULT($MAGIC_CMD) |
| 7229 | else |
| 7230 | AC_MSG_RESULT(no) |
| 7231 | fi |
| 7232 | ])# AC_PATH_TOOL_PREFIX |
| 7233 | |
| 7234 | |
| 7235 | # AC_PATH_MAGIC |
| 7236 | # ------------- |
| 7237 | # find a file program which can recognise a shared library |
| 7238 | AC_DEFUN([AC_PATH_MAGIC], |
| 7239 | [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) |
| 7240 | if test -z "$lt_cv_path_MAGIC_CMD"; then |
| 7241 | if test -n "$ac_tool_prefix"; then |
| 7242 | AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) |
| 7243 | else |
| 7244 | MAGIC_CMD=: |
| 7245 | fi |
| 7246 | fi |
| 7247 | ])# AC_PATH_MAGIC |
| 7248 | |
| 7249 | |
| 7250 | # AC_PROG_LD |
| 7251 | # ---------- |
| 7252 | # find the path to the GNU or non-GNU linker |
| 7253 | AC_DEFUN([AC_PROG_LD], |
| 7254 | [AC_ARG_WITH([gnu-ld], |
| 7255 | [AC_HELP_STRING([--with-gnu-ld], |
| 7256 | [assume the C compiler uses GNU ld @<:@default=no@:>@])], |
| 7257 | [test "$withval" = no || with_gnu_ld=yes], |
| 7258 | [with_gnu_ld=no]) |
| 7259 | AC_REQUIRE([AC_PROG_CC])dnl |
| 7260 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 7261 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
| 7262 | ac_prog=ld |
| 7263 | if test "$GCC" = yes; then |
| 7264 | # Check if gcc -print-prog-name=ld gives a path. |
| 7265 | AC_MSG_CHECKING([for ld used by GCC]) |
| 7266 | case $host in |
| 7267 | *-*-mingw*) |
| 7268 | # gcc leaves a trailing carriage return which upsets mingw |
| 7269 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
| 7270 | *) |
| 7271 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
| 7272 | esac |
| 7273 | case $ac_prog in |
| 7274 | # Accept absolute paths. |
| 7275 | [[\\/]]* | ?:[[\\/]]*) |
| 7276 | re_direlt='/[[^/]][[^/]]*/\.\./' |
| 7277 | # Canonicalize the path of ld |
| 7278 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
| 7279 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
| 7280 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
| 7281 | done |
| 7282 | test -z "$LD" && LD="$ac_prog" |
| 7283 | ;; |
| 7284 | "") |
| 7285 | # If it fails, then pretend we aren't using GCC. |
| 7286 | ac_prog=ld |
| 7287 | ;; |
| 7288 | *) |
| 7289 | # If it is relative, then search for the first ld in PATH. |
| 7290 | with_gnu_ld=unknown |
| 7291 | ;; |
| 7292 | esac |
| 7293 | elif test "$with_gnu_ld" = yes; then |
| 7294 | AC_MSG_CHECKING([for GNU ld]) |
| 7295 | else |
| 7296 | AC_MSG_CHECKING([for non-GNU ld]) |
| 7297 | fi |
| 7298 | AC_CACHE_VAL(lt_cv_path_LD, |
| 7299 | [if test -z "$LD"; then |
| 7300 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
| 7301 | for ac_dir in $PATH; do |
| 7302 | IFS="$lt_save_ifs" |
| 7303 | test -z "$ac_dir" && ac_dir=. |
| 7304 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
| 7305 | lt_cv_path_LD="$ac_dir/$ac_prog" |
| 7306 | # Check to see if the program is GNU ld. I'd rather use --version, |
| 7307 | # but apparently some GNU ld's only accept -v. |
| 7308 | # Break only if it was the GNU/non-GNU ld that we prefer. |
| 7309 | if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
| 7310 | test "$with_gnu_ld" != no && break |
| 7311 | else |
| 7312 | test "$with_gnu_ld" != yes && break |
| 7313 | fi |
| 7314 | fi |
| 7315 | done |
| 7316 | IFS="$lt_save_ifs" |
| 7317 | else |
| 7318 | lt_cv_path_LD="$LD" # Let the user override the test with a path. |
| 7319 | fi]) |
| 7320 | LD="$lt_cv_path_LD" |
| 7321 | if test -n "$LD"; then |
| 7322 | AC_MSG_RESULT($LD) |
| 7323 | else |
| 7324 | AC_MSG_RESULT(no) |
| 7325 | fi |
| 7326 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
| 7327 | AC_PROG_LD_GNU |
| 7328 | ])# AC_PROG_LD |
| 7329 | |
| 7330 | |
| 7331 | # AC_PROG_LD_GNU |
| 7332 | # -------------- |
| 7333 | AC_DEFUN([AC_PROG_LD_GNU], |
| 7334 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, |
| 7335 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
| 7336 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
| 7337 | lt_cv_prog_gnu_ld=yes |
| 7338 | else |
| 7339 | lt_cv_prog_gnu_ld=no |
| 7340 | fi]) |
| 7341 | with_gnu_ld=$lt_cv_prog_gnu_ld |
| 7342 | ])# AC_PROG_LD_GNU |
| 7343 | |
| 7344 | |
| 7345 | # AC_PROG_LD_RELOAD_FLAG |
| 7346 | # ---------------------- |
| 7347 | # find reload flag for linker |
| 7348 | # -- PORTME Some linkers may need a different reload flag. |
| 7349 | AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], |
| 7350 | [AC_CACHE_CHECK([for $LD option to reload object files], |
| 7351 | lt_cv_ld_reload_flag, |
| 7352 | [lt_cv_ld_reload_flag='-r']) |
| 7353 | reload_flag=$lt_cv_ld_reload_flag |
| 7354 | case $reload_flag in |
| 7355 | "" | " "*) ;; |
| 7356 | *) reload_flag=" $reload_flag" ;; |
| 7357 | esac |
| 7358 | reload_cmds='$LD$reload_flag -o $output$reload_objs' |
| 7359 | ])# AC_PROG_LD_RELOAD_FLAG |
| 7360 | |
| 7361 | |
| 7362 | # AC_DEPLIBS_CHECK_METHOD |
| 7363 | # ----------------------- |
| 7364 | # how to check for library dependencies |
| 7365 | # -- PORTME fill in with the dynamic library characteristics |
| 7366 | AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], |
| 7367 | [AC_CACHE_CHECK([how to recognise dependant libraries], |
| 7368 | lt_cv_deplibs_check_method, |
| 7369 | [lt_cv_file_magic_cmd='$MAGIC_CMD' |
| 7370 | lt_cv_file_magic_test_file= |
| 7371 | lt_cv_deplibs_check_method='unknown' |
| 7372 | # Need to set the preceding variable on all platforms that support |
| 7373 | # interlibrary dependencies. |
| 7374 | # 'none' -- dependencies not supported. |
| 7375 | # `unknown' -- same as none, but documents that we really don't know. |
| 7376 | # 'pass_all' -- all dependencies passed with no checks. |
| 7377 | # 'test_compile' -- check by making test program. |
| 7378 | # 'file_magic [[regex]]' -- check by looking for files in library path |
| 7379 | # which responds to the $file_magic_cmd with a given egrep regex. |
| 7380 | # If you have `file' or equivalent on your system and you're not sure |
| 7381 | # whether `pass_all' will *always* work, you probably want this one. |
| 7382 | |
| 7383 | case $host_os in |
| 7384 | aix4* | aix5*) |
| 7385 | lt_cv_deplibs_check_method=pass_all |
| 7386 | ;; |
| 7387 | |
| 7388 | beos*) |
| 7389 | lt_cv_deplibs_check_method=pass_all |
| 7390 | ;; |
| 7391 | |
| 7392 | bsdi4*) |
| 7393 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' |
| 7394 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
| 7395 | lt_cv_file_magic_test_file=/shlib/libc.so |
| 7396 | ;; |
| 7397 | |
| 7398 | cygwin* | mingw* | pw32*) |
| 7399 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
| 7400 | lt_cv_file_magic_cmd='$OBJDUMP -f' |
| 7401 | ;; |
| 7402 | |
| 7403 | darwin* | rhapsody*) |
| 7404 | lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' |
| 7405 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
| 7406 | case "$host_os" in |
| 7407 | rhapsody* | darwin1.[[012]]) |
| 7408 | lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System` |
| 7409 | ;; |
| 7410 | *) # Darwin 1.3 on |
| 7411 | lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' |
| 7412 | ;; |
| 7413 | esac |
| 7414 | ;; |
| 7415 | |
| 7416 | freebsd*) |
| 7417 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
| 7418 | case $host_cpu in |
| 7419 | i*86 ) |
| 7420 | # Not sure whether the presence of OpenBSD here was a mistake. |
| 7421 | # Let's accept both of them until this is cleared up. |
| 7422 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' |
| 7423 | lt_cv_file_magic_cmd=/usr/bin/file |
| 7424 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
| 7425 | ;; |
| 7426 | esac |
| 7427 | else |
| 7428 | lt_cv_deplibs_check_method=pass_all |
| 7429 | fi |
| 7430 | ;; |
| 7431 | |
| 7432 | gnu*) |
| 7433 | lt_cv_deplibs_check_method=pass_all |
| 7434 | ;; |
| 7435 | |
| 7436 | hpux10.20* | hpux11*) |
| 7437 | lt_cv_file_magic_cmd=/usr/bin/file |
| 7438 | if test "$host_cpu" = ia64; then |
| 7439 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' |
| 7440 | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so |
| 7441 | else |
| 7442 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' |
| 7443 | lt_cv_file_magic_test_file=/usr/lib/libc.sl |
| 7444 | fi |
| 7445 | ;; |
| 7446 | |
| 7447 | irix5* | irix6* | nonstopux*) |
| 7448 | case $host_os in |
| 7449 | irix5* | nonstopux*) |
| 7450 | # this will be overridden with pass_all, but let us keep it just in case |
| 7451 | lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" |
| 7452 | ;; |
| 7453 | *) |
| 7454 | case $LD in |
| 7455 | *-32|*"-32 ") libmagic=32-bit;; |
| 7456 | *-n32|*"-n32 ") libmagic=N32;; |
| 7457 | *-64|*"-64 ") libmagic=64-bit;; |
| 7458 | *) libmagic=never-match;; |
| 7459 | esac |
| 7460 | # this will be overridden with pass_all, but let us keep it just in case |
| 7461 | lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" |
| 7462 | ;; |
| 7463 | esac |
| 7464 | lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` |
| 7465 | lt_cv_deplibs_check_method=pass_all |
| 7466 | ;; |
| 7467 | |
| 7468 | # This must be Linux ELF. |
| 7469 | linux*) |
| 7470 | case $host_cpu in |
| 7471 | alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* ) |
| 7472 | lt_cv_deplibs_check_method=pass_all ;; |
| 7473 | *) |
| 7474 | # glibc up to 2.1.1 does not perform some relocations on ARM |
| 7475 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; |
| 7476 | esac |
| 7477 | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` |
| 7478 | ;; |
| 7479 | |
| 7480 | netbsd*) |
| 7481 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
| 7482 | lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' |
| 7483 | else |
| 7484 | lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' |
| 7485 | fi |
| 7486 | ;; |
| 7487 | |
| 7488 | newos6*) |
| 7489 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' |
| 7490 | lt_cv_file_magic_cmd=/usr/bin/file |
| 7491 | lt_cv_file_magic_test_file=/usr/lib/libnls.so |
| 7492 | ;; |
| 7493 | |
| 7494 | nto-qnx) |
| 7495 | lt_cv_deplibs_check_method=unknown |
| 7496 | ;; |
| 7497 | |
| 7498 | openbsd*) |
| 7499 | lt_cv_file_magic_cmd=/usr/bin/file |
| 7500 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
| 7501 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| 7502 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' |
| 7503 | else |
| 7504 | lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' |
| 7505 | fi |
| 7506 | ;; |
| 7507 | |
| 7508 | osf3* | osf4* | osf5*) |
| 7509 | # this will be overridden with pass_all, but let us keep it just in case |
| 7510 | lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' |
| 7511 | lt_cv_file_magic_test_file=/shlib/libc.so |
| 7512 | lt_cv_deplibs_check_method=pass_all |
| 7513 | ;; |
| 7514 | |
| 7515 | sco3.2v5*) |
| 7516 | lt_cv_deplibs_check_method=pass_all |
| 7517 | ;; |
| 7518 | |
| 7519 | solaris*) |
| 7520 | lt_cv_deplibs_check_method=pass_all |
| 7521 | lt_cv_file_magic_test_file=/lib/libc.so |
| 7522 | ;; |
| 7523 | |
| 7524 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
| 7525 | case $host_vendor in |
| 7526 | motorola) |
| 7527 | 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]]' |
| 7528 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` |
| 7529 | ;; |
| 7530 | ncr) |
| 7531 | lt_cv_deplibs_check_method=pass_all |
| 7532 | ;; |
| 7533 | sequent) |
| 7534 | lt_cv_file_magic_cmd='/bin/file' |
| 7535 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' |
| 7536 | ;; |
| 7537 | sni) |
| 7538 | lt_cv_file_magic_cmd='/bin/file' |
| 7539 | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" |
| 7540 | lt_cv_file_magic_test_file=/lib/libc.so |
| 7541 | ;; |
| 7542 | esac |
| 7543 | ;; |
| 7544 | |
| 7545 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) |
| 7546 | lt_cv_deplibs_check_method=pass_all |
| 7547 | ;; |
| 7548 | esac |
| 7549 | ]) |
| 7550 | file_magic_cmd=$lt_cv_file_magic_cmd |
| 7551 | deplibs_check_method=$lt_cv_deplibs_check_method |
| 7552 | test -z "$deplibs_check_method" && deplibs_check_method=unknown |
| 7553 | ])# AC_DEPLIBS_CHECK_METHOD |
| 7554 | |
| 7555 | |
| 7556 | # AC_PROG_NM |
| 7557 | # ---------- |
| 7558 | # find the path to a BSD-compatible name lister |
| 7559 | AC_DEFUN([AC_PROG_NM], |
| 7560 | [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, |
| 7561 | [if test -n "$NM"; then |
| 7562 | # Let the user override the test. |
| 7563 | lt_cv_path_NM="$NM" |
| 7564 | else |
| 7565 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
| 7566 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
| 7567 | IFS="$lt_save_ifs" |
| 7568 | test -z "$ac_dir" && ac_dir=. |
| 7569 | tmp_nm="$ac_dir/${ac_tool_prefix}nm" |
| 7570 | if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then |
| 7571 | # Check to see if the nm accepts a BSD-compat flag. |
| 7572 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
| 7573 | # nm: unknown option "B" ignored |
| 7574 | # Tru64's nm complains that /dev/null is an invalid object file |
| 7575 | if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then |
| 7576 | lt_cv_path_NM="$tmp_nm -B" |
| 7577 | break |
| 7578 | elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
| 7579 | lt_cv_path_NM="$tmp_nm -p" |
| 7580 | break |
| 7581 | else |
| 7582 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
| 7583 | continue # so that we can try to find one that supports BSD flags |
| 7584 | fi |
| 7585 | fi |
| 7586 | done |
| 7587 | IFS="$lt_save_ifs" |
| 7588 | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
| 7589 | fi]) |
| 7590 | NM="$lt_cv_path_NM" |
| 7591 | ])# AC_PROG_NM |
| 7592 | |
| 7593 | |
| 7594 | # AC_CHECK_LIBM |
| 7595 | # ------------- |
| 7596 | # check for math library |
| 7597 | AC_DEFUN([AC_CHECK_LIBM], |
| 7598 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 7599 | LIBM= |
| 7600 | case $host in |
| 7601 | *-*-beos* | *-*-cygwin* | *-*-pw32*) |
| 7602 | # These system don't have libm |
| 7603 | ;; |
| 7604 | *-ncr-sysv4.3*) |
| 7605 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
| 7606 | AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") |
| 7607 | ;; |
| 7608 | *) |
| 7609 | AC_CHECK_LIB(m, main, LIBM="-lm") |
| 7610 | ;; |
| 7611 | esac |
| 7612 | ])# AC_CHECK_LIBM |
| 7613 | |
| 7614 | |
| 7615 | # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) |
| 7616 | # ----------------------------------- |
| 7617 | # sets LIBLTDL to the link flags for the libltdl convenience library and |
| 7618 | # LTDLINCL to the include flags for the libltdl header and adds |
| 7619 | # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL |
| 7620 | # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If |
| 7621 | # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will |
| 7622 | # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with |
| 7623 | # '${top_srcdir}/' (note the single quotes!). If your package is not |
| 7624 | # flat and you're not using automake, define top_builddir and |
| 7625 | # top_srcdir appropriately in the Makefiles. |
| 7626 | AC_DEFUN([AC_LIBLTDL_CONVENIENCE], |
| 7627 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 7628 | case $enable_ltdl_convenience in |
| 7629 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
| 7630 | "") enable_ltdl_convenience=yes |
| 7631 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
| 7632 | esac |
| 7633 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la |
| 7634 | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
| 7635 | # For backwards non-gettext consistent compatibility... |
| 7636 | INCLTDL="$LTDLINCL" |
| 7637 | ])# AC_LIBLTDL_CONVENIENCE |
| 7638 | |
| 7639 | |
| 7640 | # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) |
| 7641 | # ----------------------------------- |
| 7642 | # sets LIBLTDL to the link flags for the libltdl installable library and |
| 7643 | # LTDLINCL to the include flags for the libltdl header and adds |
| 7644 | # --enable-ltdl-install to the configure arguments. Note that LIBLTDL |
| 7645 | # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If |
| 7646 | # DIRECTORY is not provided and an installed libltdl is not found, it is |
| 7647 | # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' |
| 7648 | # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single |
| 7649 | # quotes!). If your package is not flat and you're not using automake, |
| 7650 | # define top_builddir and top_srcdir appropriately in the Makefiles. |
| 7651 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. |
| 7652 | AC_DEFUN([AC_LIBLTDL_INSTALLABLE], |
| 7653 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 7654 | AC_CHECK_LIB(ltdl, main, |
| 7655 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], |
| 7656 | [if test x"$enable_ltdl_install" = xno; then |
| 7657 | AC_MSG_WARN([libltdl not installed, but installation disabled]) |
| 7658 | else |
| 7659 | enable_ltdl_install=yes |
| 7660 | fi |
| 7661 | ]) |
| 7662 | if test x"$enable_ltdl_install" = x"yes"; then |
| 7663 | ac_configure_args="$ac_configure_args --enable-ltdl-install" |
| 7664 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la |
| 7665 | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
| 7666 | else |
| 7667 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" |
| 7668 | LIBLTDL="-lltdl" |
| 7669 | LTDLINCL= |
| 7670 | fi |
| 7671 | # For backwards non-gettext consistent compatibility... |
| 7672 | INCLTDL="$LTDLINCL" |
| 7673 | ])# AC_LIBLTDL_INSTALLABLE |
| 7674 | |
| 7675 | |
| 7676 | # If this macro is not defined by Autoconf, define it here. |
| 7677 | ifdef([AC_PROVIDE_IFELSE], |
| 7678 | [], |
| 7679 | [define([AC_PROVIDE_IFELSE], |
| 7680 | [ifdef([AC_PROVIDE_$1], |
| 7681 | [$2], [$3])])]) |
| 7682 | |
| 7683 | |
| 7684 | # AC_LIBTOOL_CXX |
| 7685 | # -------------- |
| 7686 | # enable support for C++ libraries |
| 7687 | AC_DEFUN([AC_LIBTOOL_CXX], |
| 7688 | [AC_REQUIRE([_LT_AC_LANG_CXX]) |
| 7689 | ])# AC_LIBTOOL_CXX |
| 7690 | |
| 7691 | |
| 7692 | # _LT_AC_LANG_CXX |
| 7693 | # --------------- |
| 7694 | AC_DEFUN([_LT_AC_LANG_CXX], |
| 7695 | [AC_REQUIRE([AC_PROG_CXX]) |
| 7696 | AC_REQUIRE([AC_PROG_CXXCPP]) |
| 7697 | ])# _LT_AC_LANG_CXX |
| 7698 | |
| 7699 | |
| 7700 | # AC_LIBTOOL_GCJ |
| 7701 | # -------------- |
| 7702 | # enable support for GCJ libraries |
| 7703 | AC_DEFUN([AC_LIBTOOL_GCJ], |
| 7704 | [AC_REQUIRE([_LT_AC_LANG_GCJ]) |
| 7705 | ])# AC_LIBTOOL_GCJ |
| 7706 | |
| 7707 | |
| 7708 | # _LT_AC_LANG_GCJ |
| 7709 | # --------------- |
| 7710 | AC_DEFUN([_LT_AC_LANG_GCJ], |
| 7711 | [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], |
| 7712 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], |
| 7713 | [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], |
| 7714 | [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], |
| 7715 | [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], |
| 7716 | [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) |
| 7717 | ])# _LT_AC_LANG_GCJ |
| 7718 | |
| 7719 | |
| 7720 | # AC_LIBTOOL_RC |
| 7721 | # -------------- |
| 7722 | # enable support for Windows resource files |
| 7723 | AC_DEFUN([AC_LIBTOOL_RC], |
| 7724 | [AC_REQUIRE([AC_PROG_RC]) |
| 7725 | ])# AC_LIBTOOL_RC |
| 7726 | |
| 7727 | |
| 7728 | # AC_LIBTOOL_LANG_C_CONFIG |
| 7729 | # ------------------------ |
| 7730 | # Ensure that the configuration vars for the C compiler are |
| 7731 | # suitably defined. Those variables are subsequently used by |
| 7732 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
| 7733 | AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) |
| 7734 | AC_DEFUN([_LT_AC_LANG_C_CONFIG], |
| 7735 | [lt_save_CC="$CC" |
| 7736 | AC_LANG_PUSH(C) |
| 7737 | |
| 7738 | # Source file extension for C test sources. |
| 7739 | ac_ext=c |
| 7740 | |
| 7741 | # Object file extension for compiled C test sources. |
| 7742 | objext=o |
| 7743 | _LT_AC_TAGVAR(objext, $1)=$objext |
| 7744 | |
| 7745 | # Code to be used in simple compile tests |
| 7746 | lt_simple_compile_test_code="int some_variable = 0;" |
| 7747 | |
| 7748 | # Code to be used in simple link tests |
| 7749 | lt_simple_link_test_code='main(){return(0);}' |
| 7750 | |
| 7751 | _LT_AC_SYS_COMPILER |
| 7752 | |
| 7753 | # |
| 7754 | # Check for any special shared library compilation flags. |
| 7755 | # |
| 7756 | _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= |
| 7757 | if test "$GCC" = no; then |
| 7758 | case $host_os in |
| 7759 | sco3.2v5*) |
| 7760 | _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' |
| 7761 | ;; |
| 7762 | esac |
| 7763 | fi |
| 7764 | if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then |
| 7765 | AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) |
| 7766 | if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then : |
| 7767 | else |
| 7768 | AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) |
| 7769 | _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no |
| 7770 | fi |
| 7771 | fi |
| 7772 | |
| 7773 | |
| 7774 | # |
| 7775 | # Check to make sure the static flag actually works. |
| 7776 | # |
| 7777 | AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], |
| 7778 | _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), |
| 7779 | $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), |
| 7780 | [], |
| 7781 | [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) |
| 7782 | |
| 7783 | |
| 7784 | AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) |
| 7785 | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
| 7786 | AC_LIBTOOL_PROG_CC_C_O($1) |
| 7787 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
| 7788 | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
| 7789 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
| 7790 | AC_LIBTOOL_SYS_LIB_STRIP |
| 7791 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
| 7792 | AC_LIBTOOL_DLOPEN_SELF($1) |
| 7793 | |
| 7794 | # Report which librarie types wil actually be built |
| 7795 | AC_MSG_CHECKING([if libtool supports shared libraries]) |
| 7796 | AC_MSG_RESULT([$can_build_shared]) |
| 7797 | |
| 7798 | AC_MSG_CHECKING([whether to build shared libraries]) |
| 7799 | test "$can_build_shared" = "no" && enable_shared=no |
| 7800 | |
| 7801 | # On AIX, shared libraries and static libraries use the same namespace, and |
| 7802 | # are all built from PIC. |
| 7803 | case "$host_os" in |
| 7804 | aix3*) |
| 7805 | test "$enable_shared" = yes && enable_static=no |
| 7806 | if test -n "$RANLIB"; then |
| 7807 | archive_cmds="$archive_cmds~\$RANLIB \$lib" |
| 7808 | postinstall_cmds='$RANLIB $lib' |
| 7809 | fi |
| 7810 | ;; |
| 7811 | |
| 7812 | aix4*) |
| 7813 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then |
| 7814 | test "$enable_shared" = yes && enable_static=no |
| 7815 | fi |
| 7816 | ;; |
| 7817 | esac |
| 7818 | AC_MSG_RESULT([$enable_shared]) |
| 7819 | |
| 7820 | AC_MSG_CHECKING([whether to build static libraries]) |
| 7821 | # Make sure either enable_shared or enable_static is yes. |
| 7822 | test "$enable_shared" = yes || enable_static=yes |
| 7823 | AC_MSG_RESULT([$enable_static]) |
| 7824 | |
| 7825 | AC_LIBTOOL_CONFIG($1) |
| 7826 | |
| 7827 | AC_LANG_POP |
| 7828 | CC="$lt_save_CC" |
| 7829 | ])# AC_LIBTOOL_LANG_C_CONFIG |
| 7830 | |
| 7831 | |
| 7832 | # AC_LIBTOOL_LANG_CXX_CONFIG |
| 7833 | # -------------------------- |
| 7834 | # Ensure that the configuration vars for the C compiler are |
| 7835 | # suitably defined. Those variables are subsequently used by |
| 7836 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
| 7837 | AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) |
| 7838 | AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], |
| 7839 | [AC_LANG_PUSH(C++) |
| 7840 | AC_REQUIRE([AC_PROG_CXX]) |
| 7841 | AC_REQUIRE([AC_PROG_CXXCPP]) |
| 7842 | |
| 7843 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 7844 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= |
| 7845 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
| 7846 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)= |
| 7847 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
| 7848 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
| 7849 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
| 7850 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
| 7851 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
| 7852 | _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown |
| 7853 | _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
| 7854 | _LT_AC_TAGVAR(no_undefined_flag, $1)= |
| 7855 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
| 7856 | |
| 7857 | # Dependencies to place before and after the object being linked: |
| 7858 | _LT_AC_TAGVAR(predep_objects, $1)= |
| 7859 | _LT_AC_TAGVAR(postdep_objects, $1)= |
| 7860 | _LT_AC_TAGVAR(predeps, $1)= |
| 7861 | _LT_AC_TAGVAR(postdeps, $1)= |
| 7862 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)= |
| 7863 | |
| 7864 | # Source file extension for C test sources. |
| 7865 | ac_ext=cc |
| 7866 | |
| 7867 | # Object file extension for compiled C test sources. |
| 7868 | objext=o |
| 7869 | _LT_AC_TAGVAR(objext, $1)=$objext |
| 7870 | |
| 7871 | # Code to be used in simple compile tests |
| 7872 | lt_simple_compile_test_code="int some_variable = 0;" |
| 7873 | |
| 7874 | # Code to be used in simple link tests |
| 7875 | lt_simple_link_test_code='int main(int char *[]) { return(0); }' |
| 7876 | |
| 7877 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
| 7878 | _LT_AC_SYS_COMPILER |
| 7879 | |
| 7880 | # Allow CC to be a program name with arguments. |
| 7881 | lt_save_CC="$CC" |
| 7882 | CC=${CXX-"c++"} |
| 7883 | set dummy $CC |
| 7884 | compiler="[$]2" |
| 7885 | _LT_AC_TAGVAR(compiler, $1)=$CC |
| 7886 | cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` |
| 7887 | |
| 7888 | # We don't want -fno-exception wen compiling C++ code, so set the |
| 7889 | # no_builtin_flag separately |
| 7890 | if test "$GXX" = yes; then |
| 7891 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' |
| 7892 | else |
| 7893 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
| 7894 | fi |
| 7895 | |
| 7896 | if test "$GXX" = yes; then |
| 7897 | # Set up default GNU C++ configuration |
| 7898 | |
| 7899 | # Check if GNU C++ uses GNU ld as the underlying linker, since the |
| 7900 | # archiving commands below assume that GNU ld is being used. |
| 7901 | if eval "`$CC -print-prog-name=ld` --version 2>&1" | \ |
| 7902 | egrep 'GNU ld' > /dev/null; then |
| 7903 | with_gnu_ld=yes |
| 7904 | |
| 7905 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 7906 | _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' |
| 7907 | |
| 7908 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' |
| 7909 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
| 7910 | |
| 7911 | # If archive_cmds runs LD, not CC, wlarc should be empty |
| 7912 | # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to |
| 7913 | # investigate it a little bit more. (MM) |
| 7914 | wlarc='${wl}' |
| 7915 | |
| 7916 | # ancient GNU ld didn't support --whole-archive et. al. |
| 7917 | if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ |
| 7918 | egrep 'no-whole-archive' > /dev/null; then |
| 7919 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
| 7920 | else |
| 7921 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
| 7922 | fi |
| 7923 | else |
| 7924 | with_gnu_ld=no |
| 7925 | wlarc= |
| 7926 | |
| 7927 | # A generic and very simple default shared library creation |
| 7928 | # command for GNU C++ for the case where it uses the native |
| 7929 | # linker, instead of GNU ld. If possible, this setting should |
| 7930 | # overridden to take advantage of the native linker features on |
| 7931 | # the platform it is being used on. |
| 7932 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' |
| 7933 | fi |
| 7934 | |
| 7935 | # Commands to make compiler produce verbose output that lists |
| 7936 | # what "hidden" libraries, object files and flags are used when |
| 7937 | # linking a shared library. |
| 7938 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' |
| 7939 | |
| 7940 | else |
| 7941 | GXX=no |
| 7942 | with_gnu_ld=no |
| 7943 | wlarc= |
| 7944 | fi |
| 7945 | |
| 7946 | # PORTME: fill in a description of your system's C++ link characteristics |
| 7947 | AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
| 7948 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes |
| 7949 | case $host_os in |
| 7950 | aix3*) |
| 7951 | # FIXME: insert proper C++ library support |
| 7952 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 7953 | ;; |
| 7954 | aix4* | aix5*) |
| 7955 | if test "$host_cpu" = ia64; then |
| 7956 | # On IA64, the linker does run time linking by default, so we don't |
| 7957 | # have to do anything special. |
| 7958 | aix_use_runtimelinking=no |
| 7959 | exp_sym_flag='-Bexport' |
| 7960 | no_entry_flag="" |
| 7961 | else |
| 7962 | # KDE requires run time linking. Make it the default. |
| 7963 | aix_use_runtimelinking=yes |
| 7964 | exp_sym_flag='-bexport' |
| 7965 | no_entry_flag='-bnoentry' |
| 7966 | fi |
| 7967 | |
| 7968 | # When large executables or shared objects are built, AIX ld can |
| 7969 | # have problems creating the table of contents. If linking a library |
| 7970 | # or program results in "error TOC overflow" add -mminimal-toc to |
| 7971 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
| 7972 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
| 7973 | |
| 7974 | _LT_AC_TAGVAR(archive_cmds, $1)='' |
| 7975 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 7976 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' |
| 7977 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 7978 | |
| 7979 | if test "$GXX" = yes; then |
| 7980 | case $host_os in aix4.[012]|aix4.[012].*) |
| 7981 | # We only want to do this on AIX 4.2 and lower, the check |
| 7982 | # below for broken collect2 doesn't work under 4.3+ |
| 7983 | collect2name=`${CC} -print-prog-name=collect2` |
| 7984 | if test -f "$collect2name" && \ |
| 7985 | strings "$collect2name" | grep resolve_lib_name >/dev/null |
| 7986 | then |
| 7987 | # We have reworked collect2 |
| 7988 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 7989 | else |
| 7990 | # We have old collect2 |
| 7991 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
| 7992 | # It fails to find uninstalled libraries when the uninstalled |
| 7993 | # path is not listed in the libpath. Setting hardcode_minus_L |
| 7994 | # to unsupported forces relinking |
| 7995 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 7996 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 7997 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
| 7998 | fi |
| 7999 | esac |
| 8000 | shared_flag='-shared' |
| 8001 | else |
| 8002 | # not using gcc |
| 8003 | if test "$host_cpu" = ia64; then |
| 8004 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release |
| 8005 | # chokes on -Wl,-G. The following line is correct: |
| 8006 | shared_flag='-G' |
| 8007 | else |
| 8008 | if test "$aix_use_runtimelinking" = yes; then |
| 8009 | shared_flag='-qmkshrobj ${wl}-G' |
| 8010 | else |
| 8011 | shared_flag='-qmkshrobj' |
| 8012 | fi |
| 8013 | fi |
| 8014 | fi |
| 8015 | |
| 8016 | # Let the compiler handle the export list. |
| 8017 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
| 8018 | if test "$aix_use_runtimelinking" = yes; then |
| 8019 | # Warning - without using the other runtime loading flags (-brtl), |
| 8020 | # -berok will link without error, but may produce a broken library. |
| 8021 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' |
| 8022 | # Determine the default libpath from the value encoded in an empty executable. |
| 8023 | _LT_AC_SYS_LIBPATH_AIX |
| 8024 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
| 8025 | |
| 8026 | _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" |
| 8027 | _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" |
| 8028 | else |
| 8029 | if test "$host_cpu" = ia64; then |
| 8030 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' |
| 8031 | _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" |
| 8032 | _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" |
| 8033 | else |
| 8034 | # Determine the default libpath from the value encoded in an empty executable. |
| 8035 | _LT_AC_SYS_LIBPATH_AIX |
| 8036 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
| 8037 | # Warning - without using the other run time loading flags, |
| 8038 | # -berok will link without error, but may produce a broken library. |
| 8039 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' |
| 8040 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' |
| 8041 | # -bexpall does not export symbols beginning with underscore (_) |
| 8042 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
| 8043 | # Exported symbols can be pulled into shared objects from archives |
| 8044 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' |
| 8045 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
| 8046 | # This is similar to how AIX traditionally builds it's shared libraries. |
| 8047 | _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' |
| 8048 | fi |
| 8049 | fi |
| 8050 | ;; |
| 8051 | chorus*) |
| 8052 | case $cc_basename in |
| 8053 | *) |
| 8054 | # FIXME: insert proper C++ library support |
| 8055 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8056 | ;; |
| 8057 | esac |
| 8058 | ;; |
| 8059 | dgux*) |
| 8060 | case $cc_basename in |
| 8061 | ec++) |
| 8062 | # FIXME: insert proper C++ library support |
| 8063 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8064 | ;; |
| 8065 | ghcx) |
| 8066 | # Green Hills C++ Compiler |
| 8067 | # FIXME: insert proper C++ library support |
| 8068 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8069 | ;; |
| 8070 | *) |
| 8071 | # FIXME: insert proper C++ library support |
| 8072 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8073 | ;; |
| 8074 | esac |
| 8075 | ;; |
| 8076 | freebsd[12]*) |
| 8077 | # C++ shared libraries reported to be fairly broken before switch to ELF |
| 8078 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8079 | ;; |
| 8080 | freebsd-elf*) |
| 8081 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 8082 | ;; |
| 8083 | freebsd*) |
| 8084 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF |
| 8085 | # conventions |
| 8086 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes |
| 8087 | ;; |
| 8088 | gnu*) |
| 8089 | ;; |
| 8090 | hpux*) |
| 8091 | if test $with_gnu_ld = no; then |
| 8092 | if test "$host_cpu" = ia64; then |
| 8093 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 8094 | else |
| 8095 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
| 8096 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 8097 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
| 8098 | fi |
| 8099 | fi |
| 8100 | if test "$host_cpu" = ia64; then |
| 8101 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
| 8102 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 8103 | else |
| 8104 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 8105 | fi |
| 8106 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, |
| 8107 | # but as the default |
| 8108 | # location of the library. |
| 8109 | |
| 8110 | case $cc_basename in |
| 8111 | CC) |
| 8112 | # FIXME: insert proper C++ library support |
| 8113 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8114 | ;; |
| 8115 | aCC) |
| 8116 | case $host_os in |
| 8117 | hpux9*) |
| 8118 | _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' |
| 8119 | ;; |
| 8120 | *) |
| 8121 | if test "$host_cpu" = ia64; then |
| 8122 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' |
| 8123 | else |
| 8124 | _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' |
| 8125 | fi |
| 8126 | ;; |
| 8127 | esac |
| 8128 | # Commands to make compiler produce verbose output that lists |
| 8129 | # what "hidden" libraries, object files and flags are used when |
| 8130 | # linking a shared library. |
| 8131 | # |
| 8132 | # There doesn't appear to be a way to prevent this compiler from |
| 8133 | # explicitly linking system object files so we need to strip them |
| 8134 | # from the output so that they don't get included in the library |
| 8135 | # dependencies. |
| 8136 | 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' |
| 8137 | ;; |
| 8138 | *) |
| 8139 | if test "$GXX" = yes; then |
| 8140 | if test $with_gnu_ld = no; then |
| 8141 | case $host_os in |
| 8142 | hpux9*) |
| 8143 | _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' |
| 8144 | ;; |
| 8145 | *) |
| 8146 | if test "$host_cpu" = ia64; then |
| 8147 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' |
| 8148 | else |
| 8149 | _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' |
| 8150 | fi |
| 8151 | ;; |
| 8152 | esac |
| 8153 | fi |
| 8154 | else |
| 8155 | # FIXME: insert proper C++ library support |
| 8156 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8157 | fi |
| 8158 | ;; |
| 8159 | esac |
| 8160 | ;; |
| 8161 | irix5* | irix6*) |
| 8162 | case $cc_basename in |
| 8163 | CC) |
| 8164 | # SGI C++ |
| 8165 | _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' |
| 8166 | |
| 8167 | # Archives containing C++ object files must be created using |
| 8168 | # "CC -ar", where "CC" is the IRIX C++ compiler. This is |
| 8169 | # necessary to make sure instantiated templates are included |
| 8170 | # in the archive. |
| 8171 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' |
| 8172 | ;; |
| 8173 | *) |
| 8174 | if test "$GXX" = yes; then |
| 8175 | if test "$with_gnu_ld" = no; then |
| 8176 | _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' |
| 8177 | else |
| 8178 | _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' |
| 8179 | fi |
| 8180 | fi |
| 8181 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 8182 | ;; |
| 8183 | esac |
| 8184 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 8185 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 8186 | ;; |
| 8187 | linux*) |
| 8188 | case $cc_basename in |
| 8189 | KCC) |
| 8190 | # Kuck and Associates, Inc. (KAI) C++ Compiler |
| 8191 | |
| 8192 | # KCC will only create a shared library if the output file |
| 8193 | # ends with ".so" (or ".sl" for HP-UX), so rename the library |
| 8194 | # to its proper name (with version) after linking. |
| 8195 | _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' |
| 8196 | _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' |
| 8197 | |
| 8198 | # Commands to make compiler produce verbose output that lists |
| 8199 | # what "hidden" libraries, object files and flags are used when |
| 8200 | # linking a shared library. |
| 8201 | # |
| 8202 | # There doesn't appear to be a way to prevent this compiler from |
| 8203 | # explicitly linking system object files so we need to strip them |
| 8204 | # from the output so that they don't get included in the library |
| 8205 | # dependencies. |
| 8206 | 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' |
| 8207 | |
| 8208 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' |
| 8209 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
| 8210 | |
| 8211 | # Archives containing C++ object files must be created using |
| 8212 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. |
| 8213 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' |
| 8214 | ;; |
| 8215 | cxx) |
| 8216 | # Compaq C++ |
| 8217 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 8218 | _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' |
| 8219 | |
| 8220 | runpath_var=LD_RUN_PATH |
| 8221 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
| 8222 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 8223 | |
| 8224 | # Commands to make compiler produce verbose output that lists |
| 8225 | # what "hidden" libraries, object files and flags are used when |
| 8226 | # linking a shared library. |
| 8227 | # |
| 8228 | # There doesn't appear to be a way to prevent this compiler from |
| 8229 | # explicitly linking system object files so we need to strip them |
| 8230 | # from the output so that they don't get included in the library |
| 8231 | # dependencies. |
| 8232 | 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' |
| 8233 | ;; |
| 8234 | esac |
| 8235 | ;; |
| 8236 | lynxos*) |
| 8237 | # FIXME: insert proper C++ library support |
| 8238 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8239 | ;; |
| 8240 | m88k*) |
| 8241 | # FIXME: insert proper C++ library support |
| 8242 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8243 | ;; |
| 8244 | mvs*) |
| 8245 | case $cc_basename in |
| 8246 | cxx) |
| 8247 | # FIXME: insert proper C++ library support |
| 8248 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8249 | ;; |
| 8250 | *) |
| 8251 | # FIXME: insert proper C++ library support |
| 8252 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8253 | ;; |
| 8254 | esac |
| 8255 | ;; |
| 8256 | netbsd*) |
| 8257 | # NetBSD uses g++ - do we need to do anything? |
| 8258 | ;; |
| 8259 | osf3*) |
| 8260 | case $cc_basename in |
| 8261 | KCC) |
| 8262 | # Kuck and Associates, Inc. (KAI) C++ Compiler |
| 8263 | |
| 8264 | # KCC will only create a shared library if the output file |
| 8265 | # ends with ".so" (or ".sl" for HP-UX), so rename the library |
| 8266 | # to its proper name (with version) after linking. |
| 8267 | _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' |
| 8268 | |
| 8269 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
| 8270 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 8271 | |
| 8272 | # Archives containing C++ object files must be created using |
| 8273 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. |
| 8274 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' |
| 8275 | |
| 8276 | ;; |
| 8277 | RCC) |
| 8278 | # Rational C++ 2.4.1 |
| 8279 | # FIXME: insert proper C++ library support |
| 8280 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8281 | ;; |
| 8282 | cxx) |
| 8283 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
| 8284 | _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' |
| 8285 | |
| 8286 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$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" | 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' |
| 8298 | ;; |
| 8299 | *) |
| 8300 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
| 8301 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
| 8302 | _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' |
| 8303 | |
| 8304 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 8305 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 8306 | |
| 8307 | # Commands to make compiler produce verbose output that lists |
| 8308 | # what "hidden" libraries, object files and flags are used when |
| 8309 | # linking a shared library. |
| 8310 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' |
| 8311 | |
| 8312 | else |
| 8313 | # FIXME: insert proper C++ library support |
| 8314 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8315 | fi |
| 8316 | ;; |
| 8317 | esac |
| 8318 | ;; |
| 8319 | osf4* | osf5*) |
| 8320 | case $cc_basename in |
| 8321 | KCC) |
| 8322 | # Kuck and Associates, Inc. (KAI) C++ Compiler |
| 8323 | |
| 8324 | # KCC will only create a shared library if the output file |
| 8325 | # ends with ".so" (or ".sl" for HP-UX), so rename the library |
| 8326 | # to its proper name (with version) after linking. |
| 8327 | _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' |
| 8328 | |
| 8329 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
| 8330 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 8331 | |
| 8332 | # Archives containing C++ object files must be created using |
| 8333 | # the KAI C++ compiler. |
| 8334 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' |
| 8335 | ;; |
| 8336 | RCC) |
| 8337 | # Rational C++ 2.4.1 |
| 8338 | # FIXME: insert proper C++ library support |
| 8339 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8340 | ;; |
| 8341 | cxx) |
| 8342 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
| 8343 | _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' |
| 8344 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~ |
| 8345 | echo "-hidden">> $lib.exp~ |
| 8346 | $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~ |
| 8347 | $rm $lib.exp' |
| 8348 | |
| 8349 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
| 8350 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 8351 | |
| 8352 | # Commands to make compiler produce verbose output that lists |
| 8353 | # what "hidden" libraries, object files and flags are used when |
| 8354 | # linking a shared library. |
| 8355 | # |
| 8356 | # There doesn't appear to be a way to prevent this compiler from |
| 8357 | # explicitly linking system object files so we need to strip them |
| 8358 | # from the output so that they don't get included in the library |
| 8359 | # dependencies. |
| 8360 | 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' |
| 8361 | ;; |
| 8362 | *) |
| 8363 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
| 8364 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
| 8365 | _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' |
| 8366 | |
| 8367 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 8368 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 8369 | |
| 8370 | # Commands to make compiler produce verbose output that lists |
| 8371 | # what "hidden" libraries, object files and flags are used when |
| 8372 | # linking a shared library. |
| 8373 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' |
| 8374 | |
| 8375 | else |
| 8376 | # FIXME: insert proper C++ library support |
| 8377 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8378 | fi |
| 8379 | ;; |
| 8380 | esac |
| 8381 | ;; |
| 8382 | psos*) |
| 8383 | # FIXME: insert proper C++ library support |
| 8384 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8385 | ;; |
| 8386 | sco*) |
| 8387 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 8388 | case $cc_basename in |
| 8389 | CC) |
| 8390 | # FIXME: insert proper C++ library support |
| 8391 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8392 | ;; |
| 8393 | *) |
| 8394 | # FIXME: insert proper C++ library support |
| 8395 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8396 | ;; |
| 8397 | esac |
| 8398 | ;; |
| 8399 | sunos4*) |
| 8400 | case $cc_basename in |
| 8401 | CC) |
| 8402 | # Sun C++ 4.x |
| 8403 | # FIXME: insert proper C++ library support |
| 8404 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8405 | ;; |
| 8406 | lcc) |
| 8407 | # Lucid |
| 8408 | # FIXME: insert proper C++ library support |
| 8409 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8410 | ;; |
| 8411 | *) |
| 8412 | # FIXME: insert proper C++ library support |
| 8413 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8414 | ;; |
| 8415 | esac |
| 8416 | ;; |
| 8417 | solaris*) |
| 8418 | case $cc_basename in |
| 8419 | CC) |
| 8420 | # Sun C++ 4.2, 5.x and Centerline C++ |
| 8421 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' |
| 8422 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
| 8423 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 8424 | $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' |
| 8425 | |
| 8426 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 8427 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 8428 | case $host_os in |
| 8429 | solaris2.[0-5] | solaris2.[0-5].*) ;; |
| 8430 | *) |
| 8431 | # The C++ compiler is used as linker so we must use $wl |
| 8432 | # flag to pass the commands to the underlying system |
| 8433 | # linker. |
| 8434 | # Supported since Solaris 2.6 (maybe 2.5.1?) |
| 8435 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' |
| 8436 | ;; |
| 8437 | esac |
| 8438 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 8439 | |
| 8440 | # Commands to make compiler produce verbose output that lists |
| 8441 | # what "hidden" libraries, object files and flags are used when |
| 8442 | # linking a shared library. |
| 8443 | # |
| 8444 | # There doesn't appear to be a way to prevent this compiler from |
| 8445 | # explicitly linking system object files so we need to strip them |
| 8446 | # from the output so that they don't get included in the library |
| 8447 | # dependencies. |
| 8448 | 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' |
| 8449 | |
| 8450 | # Archives containing C++ object files must be created using |
| 8451 | # "CC -xar", where "CC" is the Sun C++ compiler. This is |
| 8452 | # necessary to make sure instantiated templates are included |
| 8453 | # in the archive. |
| 8454 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' |
| 8455 | ;; |
| 8456 | gcx) |
| 8457 | # Green Hills C++ Compiler |
| 8458 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
| 8459 | |
| 8460 | # The C++ compiler must be used to create the archive. |
| 8461 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' |
| 8462 | ;; |
| 8463 | *) |
| 8464 | # GNU C++ compiler with Solaris linker |
| 8465 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
| 8466 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' |
| 8467 | if $CC --version | egrep -v '^2\.7' > /dev/null; then |
| 8468 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib' |
| 8469 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 8470 | $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp' |
| 8471 | |
| 8472 | # Commands to make compiler produce verbose output that lists |
| 8473 | # what "hidden" libraries, object files and flags are used when |
| 8474 | # linking a shared library. |
| 8475 | output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" |
| 8476 | else |
| 8477 | # g++ 2.7 appears to require `-G' NOT `-shared' on this |
| 8478 | # platform. |
| 8479 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib' |
| 8480 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 8481 | $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp' |
| 8482 | |
| 8483 | # Commands to make compiler produce verbose output that lists |
| 8484 | # what "hidden" libraries, object files and flags are used when |
| 8485 | # linking a shared library. |
| 8486 | output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" |
| 8487 | fi |
| 8488 | |
| 8489 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' |
| 8490 | fi |
| 8491 | ;; |
| 8492 | esac |
| 8493 | ;; |
| 8494 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) |
| 8495 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 8496 | ;; |
| 8497 | tandem*) |
| 8498 | case $cc_basename in |
| 8499 | NCC) |
| 8500 | # NonStop-UX NCC 3.20 |
| 8501 | # FIXME: insert proper C++ library support |
| 8502 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8503 | ;; |
| 8504 | *) |
| 8505 | # FIXME: insert proper C++ library support |
| 8506 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8507 | ;; |
| 8508 | esac |
| 8509 | ;; |
| 8510 | vxworks*) |
| 8511 | # FIXME: insert proper C++ library support |
| 8512 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8513 | ;; |
| 8514 | *) |
| 8515 | # FIXME: insert proper C++ library support |
| 8516 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8517 | ;; |
| 8518 | esac |
| 8519 | AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) |
| 8520 | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no |
| 8521 | |
| 8522 | # Figure out "hidden" C++ library dependencies from verbose |
| 8523 | # compiler output whening linking a shared library. |
| 8524 | cat > conftest.$ac_ext <<EOF |
| 8525 | class Foo |
| 8526 | { |
| 8527 | public: |
| 8528 | Foo (void) { a = 0; } |
| 8529 | private: |
| 8530 | int a; |
| 8531 | }; |
| 8532 | EOF |
| 8533 | |
| 8534 | |
| 8535 | if AC_TRY_EVAL(ac_compile); then |
| 8536 | # Parse the compiler output and extract the necessary |
| 8537 | # objects, libraries and library flags. |
| 8538 | |
| 8539 | # Sentinel used to keep track of whether or not we are before |
| 8540 | # the conftest object file. |
| 8541 | pre_test_object_deps_done=no |
| 8542 | |
| 8543 | # The `*' in the case matches for architectures that use `case' in |
| 8544 | # $output_verbose_cmd can trigger glob expansion during the loop |
| 8545 | # eval without this substitution. |
| 8546 | output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" |
| 8547 | |
| 8548 | for p in `eval $output_verbose_link_cmd`; do |
| 8549 | case $p in |
| 8550 | |
| 8551 | -L* | -R* | -l*) |
| 8552 | # Some compilers place space between "-{L,R}" and the path. |
| 8553 | # Remove the space. |
| 8554 | if test $p = "-L" \ |
| 8555 | || test $p = "-R"; then |
| 8556 | prev=$p |
| 8557 | continue |
| 8558 | else |
| 8559 | prev= |
| 8560 | fi |
| 8561 | |
| 8562 | if test "$pre_test_object_deps_done" = no; then |
| 8563 | case $p in |
| 8564 | -L* | -R*) |
| 8565 | # Internal compiler library paths should come after those |
| 8566 | # provided the user. The postdeps already come after the |
| 8567 | # user supplied libs so there is no need to process them. |
| 8568 | if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then |
| 8569 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" |
| 8570 | else |
| 8571 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" |
| 8572 | fi |
| 8573 | ;; |
| 8574 | # The "-l" case would never come before the object being |
| 8575 | # linked, so don't bother handling this case. |
| 8576 | esac |
| 8577 | else |
| 8578 | if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then |
| 8579 | _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" |
| 8580 | else |
| 8581 | _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" |
| 8582 | fi |
| 8583 | fi |
| 8584 | ;; |
| 8585 | |
| 8586 | *.$objext|*.$libext) |
| 8587 | # This assumes that the test object file only shows up |
| 8588 | # once in the compiler output. |
| 8589 | if test "$p" = "conftest.$objext"; then |
| 8590 | pre_test_object_deps_done=yes |
| 8591 | continue |
| 8592 | fi |
| 8593 | |
| 8594 | if test "$pre_test_object_deps_done" = no; then |
| 8595 | if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then |
| 8596 | _LT_AC_TAGVAR(predep_objects, $1)="$p" |
| 8597 | else |
| 8598 | _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" |
| 8599 | fi |
| 8600 | else |
| 8601 | if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then |
| 8602 | _LT_AC_TAGVAR(postdep_objects, $1)="$p" |
| 8603 | else |
| 8604 | _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" |
| 8605 | fi |
| 8606 | fi |
| 8607 | ;; |
| 8608 | |
| 8609 | *) ;; # Ignore the rest. |
| 8610 | |
| 8611 | esac |
| 8612 | done |
| 8613 | |
| 8614 | # Clean up. |
| 8615 | rm -f a.out |
| 8616 | else |
| 8617 | echo "libtool.m4: error: problem compiling C++ test program" |
| 8618 | fi |
| 8619 | |
| 8620 | $rm -f confest.$objext |
| 8621 | |
| 8622 | case " $_LT_AC_TAGVAR(postdeps, $1) " in |
| 8623 | *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; |
| 8624 | *) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;; |
| 8625 | esac |
| 8626 | |
| 8627 | _LT_AC_TAGVAR(GCC, $1)="$GXX" |
| 8628 | _LT_AC_TAGVAR(LD, $1)="$LD" |
| 8629 | |
| 8630 | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
| 8631 | AC_LIBTOOL_PROG_CC_C_O($1) |
| 8632 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
| 8633 | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
| 8634 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
| 8635 | AC_LIBTOOL_SYS_LIB_STRIP |
| 8636 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
| 8637 | AC_LIBTOOL_DLOPEN_SELF($1) |
| 8638 | |
| 8639 | AC_LIBTOOL_CONFIG($1) |
| 8640 | |
| 8641 | AC_LANG_POP |
| 8642 | CC="$lt_save_CC" |
| 8643 | ])# AC_LIBTOOL_LANG_CXX_CONFIG |
| 8644 | |
| 8645 | |
| 8646 | # AC_LIBTOOL_LANG_GCJ_CONFIG |
| 8647 | # -------------------------- |
| 8648 | # Ensure that the configuration vars for the C compiler are |
| 8649 | # suitably defined. Those variables are subsequently used by |
| 8650 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
| 8651 | AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) |
| 8652 | AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], |
| 8653 | [AC_LANG_SAVE |
| 8654 | |
| 8655 | # Source file extension for C test sources. |
| 8656 | ac_ext=java |
| 8657 | |
| 8658 | # Object file extension for compiled C test sources. |
| 8659 | objext=o |
| 8660 | _LT_AC_TAGVAR(objext, $1)=$objext |
| 8661 | |
| 8662 | # Code to be used in simple compile tests |
| 8663 | lt_simple_compile_test_code="class foo {}" |
| 8664 | |
| 8665 | # Code to be used in simple link tests |
| 8666 | lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' |
| 8667 | |
| 8668 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
| 8669 | _LT_AC_SYS_COMPILER |
| 8670 | |
| 8671 | # Allow CC to be a program name with arguments. |
| 8672 | lt_save_CC="$CC" |
| 8673 | CC=${GCJ-"gcj"} |
| 8674 | set dummy $CC |
| 8675 | compiler="[$]2" |
| 8676 | _LT_AC_TAGVAR(compiler, $1)=$CC |
| 8677 | |
| 8678 | # GCJ did not exist at the time GCC didn't implicitly link libc in. |
| 8679 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 8680 | |
| 8681 | AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) |
| 8682 | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
| 8683 | AC_LIBTOOL_PROG_CC_C_O($1) |
| 8684 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
| 8685 | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
| 8686 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
| 8687 | AC_LIBTOOL_SYS_LIB_STRIP |
| 8688 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
| 8689 | AC_LIBTOOL_DLOPEN_SELF($1) |
| 8690 | |
| 8691 | AC_LIBTOOL_CONFIG($1) |
| 8692 | |
| 8693 | AC_LANG_RESTORE |
| 8694 | CC="$lt_save_CC" |
| 8695 | ])# AC_LIBTOOL_LANG_GCJ_CONFIG |
| 8696 | |
| 8697 | |
| 8698 | # AC_LIBTOOL_LANG_RC_CONFIG |
| 8699 | # -------------------------- |
| 8700 | # Ensure that the configuration vars for the Windows resource compiler are |
| 8701 | # suitably defined. Those variables are subsequently used by |
| 8702 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
| 8703 | AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) |
| 8704 | AC_DEFUN([_LT_AC_LANG_RC_CONFIG], |
| 8705 | [AC_LANG_SAVE |
| 8706 | |
| 8707 | # Source file extension for RC test sources. |
| 8708 | ac_ext=rc |
| 8709 | |
| 8710 | # Object file extension for compiled RC test sources. |
| 8711 | objext=o |
| 8712 | _LT_AC_TAGVAR(objext, $1)=$objext |
| 8713 | |
| 8714 | # Code to be used in simple compile tests |
| 8715 | lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' |
| 8716 | |
| 8717 | # Code to be used in simple link tests |
| 8718 | lt_simple_link_test_code="$lt_simple_compile_test_code" |
| 8719 | |
| 8720 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
| 8721 | _LT_AC_SYS_COMPILER |
| 8722 | |
| 8723 | # Allow CC to be a program name with arguments. |
| 8724 | lt_save_CC="$CC" |
| 8725 | CC=${RC-"windres"} |
| 8726 | set dummy $CC |
| 8727 | compiler="[$]2" |
| 8728 | _LT_AC_TAGVAR(compiler, $1)=$CC |
| 8729 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes |
| 8730 | |
| 8731 | AC_LIBTOOL_CONFIG($1) |
| 8732 | |
| 8733 | AC_LANG_RESTORE |
| 8734 | CC="$lt_save_CC" |
| 8735 | ])# AC_LIBTOOL_LANG_RC_CONFIG |
| 8736 | |
| 8737 | |
| 8738 | # AC_LIBTOOL_CONFIG([TAGNAME]) |
| 8739 | # ---------------------------- |
| 8740 | # If TAGNAME is not passed, then create an initial libtool script |
| 8741 | # with a default configuration from the untagged config vars. Otherwise |
| 8742 | # add code to config.status for appending the configuration named by |
| 8743 | # TAGNAME from the matching tagged config vars. |
| 8744 | AC_DEFUN([AC_LIBTOOL_CONFIG], |
| 8745 | [# The else clause should only fire when bootstrapping the |
| 8746 | # libtool distribution, otherwise you forgot to ship ltmain.sh |
| 8747 | # with your package, and you will get complaints that there are |
| 8748 | # no rules to generate ltmain.sh. |
| 8749 | if test -f "$ltmain"; then |
| 8750 | # Now quote all the things that may contain metacharacters while being |
| 8751 | # careful not to overquote the AC_SUBSTed values. We take copies of the |
| 8752 | # variables and quote the copies for generation of the libtool script. |
| 8753 | for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \ |
| 8754 | libname_spec library_names_spec soname_spec extract_expsyms_cmds \ |
| 8755 | old_striplib striplib file_magic_cmd finish_cmds finish_eval \ |
| 8756 | deplibs_check_method reload_flag reload_cmds need_locks \ |
| 8757 | lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ |
| 8758 | lt_cv_sys_global_symbol_to_c_name_address \ |
| 8759 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ |
| 8760 | old_postinstall_cmds old_postuninstall_cmds \ |
| 8761 | _LT_AC_TAGVAR(compiler, $1) \ |
| 8762 | _LT_AC_TAGVAR(CC, $1) \ |
| 8763 | _LT_AC_TAGVAR(LD, $1) \ |
| 8764 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ |
| 8765 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ |
| 8766 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ |
| 8767 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ |
| 8768 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ |
| 8769 | _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ |
| 8770 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ |
| 8771 | _LT_AC_TAGVAR(old_archive_cmds, $1) \ |
| 8772 | _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ |
| 8773 | _LT_AC_TAGVAR(predep_objects, $1) \ |
| 8774 | _LT_AC_TAGVAR(postdep_objects, $1) \ |
| 8775 | _LT_AC_TAGVAR(predeps, $1) \ |
| 8776 | _LT_AC_TAGVAR(postdeps, $1) \ |
| 8777 | _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ |
| 8778 | _LT_AC_TAGVAR(archive_cmds, $1) \ |
| 8779 | _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ |
| 8780 | _LT_AC_TAGVAR(postinstall_cmds, $1) \ |
| 8781 | _LT_AC_TAGVAR(postuninstall_cmds, $1) \ |
| 8782 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ |
| 8783 | _LT_AC_TAGVAR(allow_undefined_flag, $1) \ |
| 8784 | _LT_AC_TAGVAR(no_undefined_flag, $1) \ |
| 8785 | _LT_AC_TAGVAR(export_symbols_cmds, $1) \ |
| 8786 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ |
| 8787 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ |
| 8788 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ |
| 8789 | _LT_AC_TAGVAR(exclude_expsyms, $1) \ |
| 8790 | _LT_AC_TAGVAR(include_expsyms, $1); do |
| 8791 | |
| 8792 | case $var in |
| 8793 | _LT_AC_TAGVAR(old_archive_cmds, $1) | \ |
| 8794 | _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ |
| 8795 | _LT_AC_TAGVAR(archive_cmds, $1) | \ |
| 8796 | _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ |
| 8797 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ |
| 8798 | _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ |
| 8799 | extract_expsyms_cmds | reload_cmds | finish_cmds | \ |
| 8800 | postinstall_cmds | postuninstall_cmds | \ |
| 8801 | old_postinstall_cmds | old_postuninstall_cmds | \ |
| 8802 | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) |
| 8803 | # Double-quote double-evaled strings. |
| 8804 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" |
| 8805 | ;; |
| 8806 | *) |
| 8807 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" |
| 8808 | ;; |
| 8809 | esac |
| 8810 | done |
| 8811 | |
| 8812 | case $lt_echo in |
| 8813 | *'\[$]0 --fallback-echo"') |
| 8814 | lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` |
| 8815 | ;; |
| 8816 | esac |
| 8817 | |
| 8818 | ifelse([$1], [], |
| 8819 | [cfgfile="${ofile}T" |
| 8820 | trap "$rm \"$cfgfile\"; exit 1" 1 2 15 |
| 8821 | $rm -f "$cfgfile" |
| 8822 | AC_MSG_NOTICE([creating $ofile])], |
| 8823 | [cfgfile="$ofile"]) |
| 8824 | |
| 8825 | cat <<__EOF__ >> "$cfgfile" |
| 8826 | ifelse([$1], [], |
| 8827 | [#! $SHELL |
| 8828 | |
| 8829 | # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
| 8830 | # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
| 8831 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. |
| 8832 | # |
| 8833 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 |
| 8834 | # Free Software Foundation, Inc. |
| 8835 | # |
| 8836 | # This file is part of GNU Libtool: |
| 8837 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
| 8838 | # |
| 8839 | # This program is free software; you can redistribute it and/or modify |
| 8840 | # it under the terms of the GNU General Public License as published by |
| 8841 | # the Free Software Foundation; either version 2 of the License, or |
| 8842 | # (at your option) any later version. |
| 8843 | # |
| 8844 | # This program is distributed in the hope that it will be useful, but |
| 8845 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 8846 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 8847 | # General Public License for more details. |
| 8848 | # |
| 8849 | # You should have received a copy of the GNU General Public License |
| 8850 | # along with this program; if not, write to the Free Software |
| 8851 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 8852 | # |
| 8853 | # As a special exception to the GNU General Public License, if you |
| 8854 | # distribute this file as part of a program that contains a |
| 8855 | # configuration script generated by Autoconf, you may include it under |
| 8856 | # the same distribution terms that you use for the rest of that program. |
| 8857 | |
| 8858 | # Sed that helps us avoid accidentally triggering echo(1) options like -n. |
| 8859 | Xsed="sed -e s/^X//" |
| 8860 | |
| 8861 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
| 8862 | # if CDPATH is set. |
| 8863 | if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
| 8864 | |
| 8865 | # The names of the tagged configurations supported by this script. |
| 8866 | available_tags= |
| 8867 | |
| 8868 | # ### BEGIN LIBTOOL CONFIG], |
| 8869 | [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) |
| 8870 | |
| 8871 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 8872 | |
| 8873 | # Shell to use when invoking shell scripts. |
| 8874 | SHELL=$lt_SHELL |
| 8875 | |
| 8876 | # Whether or not to build shared libraries. |
| 8877 | build_libtool_libs=$enable_shared |
| 8878 | |
| 8879 | # Whether or not to build static libraries. |
| 8880 | build_old_libs=$enable_static |
| 8881 | |
| 8882 | # Whether or not to add -lc for building shared libraries. |
| 8883 | build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) |
| 8884 | |
| 8885 | # Whether or not to optimize for fast installation. |
| 8886 | fast_install=$enable_fast_install |
| 8887 | |
| 8888 | # The host system. |
| 8889 | host_alias=$host_alias |
| 8890 | host=$host |
| 8891 | |
| 8892 | # An echo program that does not interpret backslashes. |
| 8893 | echo=$lt_echo |
| 8894 | |
| 8895 | # The archiver. |
| 8896 | AR=$lt_AR |
| 8897 | AR_FLAGS=$lt_AR_FLAGS |
| 8898 | |
| 8899 | # A C compiler. |
| 8900 | LTCC=$lt_LTCC |
| 8901 | |
| 8902 | # A language-specific compiler. |
| 8903 | CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) |
| 8904 | |
| 8905 | # Is the compiler the GNU C compiler? |
| 8906 | with_gcc=$_LT_AC_TAGVAR(GCC, $1) |
| 8907 | |
| 8908 | # The linker used to build libraries. |
| 8909 | LD=$lt_[]_LT_AC_TAGVAR(LD, $1) |
| 8910 | |
| 8911 | # Whether we need hard or soft links. |
| 8912 | LN_S=$lt_LN_S |
| 8913 | |
| 8914 | # A BSD-compatible nm program. |
| 8915 | NM=$lt_NM |
| 8916 | |
| 8917 | # A sed program that does not truncate output. |
| 8918 | SED=$lt_SED |
| 8919 | |
| 8920 | # A symbol stripping program |
| 8921 | STRIP=$STRIP |
| 8922 | |
| 8923 | # Used to examine libraries when file_magic_cmd begins "file" |
| 8924 | MAGIC_CMD=$MAGIC_CMD |
| 8925 | |
| 8926 | # Used on cygwin: DLL creation program. |
| 8927 | DLLTOOL="$DLLTOOL" |
| 8928 | |
| 8929 | # Used on cygwin: object dumper. |
| 8930 | OBJDUMP="$OBJDUMP" |
| 8931 | |
| 8932 | # Used on cygwin: assembler. |
| 8933 | AS="$AS" |
| 8934 | |
| 8935 | # The name of the directory that contains temporary libtool files. |
| 8936 | objdir=$objdir |
| 8937 | |
| 8938 | # How to create reloadable object files. |
| 8939 | reload_flag=$lt_reload_flag |
| 8940 | reload_cmds=$lt_reload_cmds |
| 8941 | |
| 8942 | # How to pass a linker flag through the compiler. |
| 8943 | wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) |
| 8944 | |
| 8945 | # Object file suffix (normally "o"). |
| 8946 | objext="$ac_objext" |
| 8947 | |
| 8948 | # Old archive suffix (normally "a"). |
| 8949 | libext="$libext" |
| 8950 | |
| 8951 | # Executable file suffix (normally ""). |
| 8952 | exeext="$exeext" |
| 8953 | |
| 8954 | # Additional compiler flags for building library objects. |
| 8955 | pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) |
| 8956 | pic_mode=$pic_mode |
| 8957 | |
| 8958 | # What is the maximum length of a command? |
| 8959 | max_cmd_len=$lt_cv_sys_max_cmd_len |
| 8960 | |
| 8961 | # Does compiler simultaneously support -c and -o options? |
| 8962 | compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) |
| 8963 | |
| 8964 | # Must we lock files when doing compilation ? |
| 8965 | need_locks=$lt_need_locks |
| 8966 | |
| 8967 | # Do we need the lib prefix for modules? |
| 8968 | need_lib_prefix=$need_lib_prefix |
| 8969 | |
| 8970 | # Do we need a version for libraries? |
| 8971 | need_version=$need_version |
| 8972 | |
| 8973 | # Whether dlopen is supported. |
| 8974 | dlopen_support=$enable_dlopen |
| 8975 | |
| 8976 | # Whether dlopen of programs is supported. |
| 8977 | dlopen_self=$enable_dlopen_self |
| 8978 | |
| 8979 | # Whether dlopen of statically linked programs is supported. |
| 8980 | dlopen_self_static=$enable_dlopen_self_static |
| 8981 | |
| 8982 | # Compiler flag to prevent dynamic linking. |
| 8983 | link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) |
| 8984 | |
| 8985 | # Compiler flag to turn off builtin functions. |
| 8986 | no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) |
| 8987 | |
| 8988 | # Compiler flag to allow reflexive dlopens. |
| 8989 | export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) |
| 8990 | |
| 8991 | # Compiler flag to generate shared objects directly from archives. |
| 8992 | whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) |
| 8993 | |
| 8994 | # Compiler flag to generate thread-safe objects. |
| 8995 | thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) |
| 8996 | |
| 8997 | # Library versioning type. |
| 8998 | version_type=$version_type |
| 8999 | |
| 9000 | # Format of library name prefix. |
| 9001 | libname_spec=$lt_libname_spec |
| 9002 | |
| 9003 | # List of archive names. First name is the real one, the rest are links. |
| 9004 | # The last name is the one that the linker finds with -lNAME. |
| 9005 | library_names_spec=$lt_library_names_spec |
| 9006 | |
| 9007 | # The coded name of the library, if different from the real name. |
| 9008 | soname_spec=$lt_soname_spec |
| 9009 | |
| 9010 | # Commands used to build and install an old-style archive. |
| 9011 | RANLIB=$lt_RANLIB |
| 9012 | old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) |
| 9013 | old_postinstall_cmds=$lt_old_postinstall_cmds |
| 9014 | old_postuninstall_cmds=$lt_old_postuninstall_cmds |
| 9015 | |
| 9016 | # Create an old-style archive from a shared archive. |
| 9017 | old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) |
| 9018 | |
| 9019 | # Create a temporary old-style archive to link instead of a shared archive. |
| 9020 | old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) |
| 9021 | |
| 9022 | # Commands used to build and install a shared archive. |
| 9023 | archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) |
| 9024 | archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) |
| 9025 | postinstall_cmds=$lt_postinstall_cmds |
| 9026 | postuninstall_cmds=$lt_postuninstall_cmds |
| 9027 | |
| 9028 | # Commands to strip libraries. |
| 9029 | old_striplib=$lt_old_striplib |
| 9030 | striplib=$lt_striplib |
| 9031 | |
| 9032 | # Dependencies to place before the objects being linked to create a |
| 9033 | # shared library. |
| 9034 | predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) |
| 9035 | |
| 9036 | # Dependencies to place after the objects being linked to create a |
| 9037 | # shared library. |
| 9038 | postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) |
| 9039 | |
| 9040 | # Dependencies to place before the objects being linked to create a |
| 9041 | # shared library. |
| 9042 | predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) |
| 9043 | |
| 9044 | # Dependencies to place after the objects being linked to create a |
| 9045 | # shared library. |
| 9046 | postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) |
| 9047 | |
| 9048 | # The library search path used internally by the compiler when linking |
| 9049 | # a shared library. |
| 9050 | compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) |
| 9051 | |
| 9052 | # Method to check whether dependent libraries are shared objects. |
| 9053 | deplibs_check_method=$lt_deplibs_check_method |
| 9054 | |
| 9055 | # Command to use when deplibs_check_method == file_magic. |
| 9056 | file_magic_cmd=$lt_file_magic_cmd |
| 9057 | |
| 9058 | # Flag that allows shared libraries with undefined symbols to be built. |
| 9059 | allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) |
| 9060 | |
| 9061 | # Flag that forces no undefined symbols. |
| 9062 | no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) |
| 9063 | |
| 9064 | # Commands used to finish a libtool library installation in a directory. |
| 9065 | finish_cmds=$lt_finish_cmds |
| 9066 | |
| 9067 | # Same as above, but a single script fragment to be evaled but not shown. |
| 9068 | finish_eval=$lt_finish_eval |
| 9069 | |
| 9070 | # Take the output of nm and produce a listing of raw symbols and C names. |
| 9071 | global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe |
| 9072 | |
| 9073 | # Transform the output of nm in a proper C declaration |
| 9074 | global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl |
| 9075 | |
| 9076 | # Transform the output of nm in a C name address pair |
| 9077 | global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address |
| 9078 | |
| 9079 | # This is the shared library runtime path variable. |
| 9080 | runpath_var=$runpath_var |
| 9081 | |
| 9082 | # This is the shared library path variable. |
| 9083 | shlibpath_var=$shlibpath_var |
| 9084 | |
| 9085 | # Is shlibpath searched before the hard-coded library search path? |
| 9086 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath |
| 9087 | |
| 9088 | # How to hardcode a shared library path into an executable. |
| 9089 | hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) |
| 9090 | |
| 9091 | # Whether we should hardcode library paths into libraries. |
| 9092 | hardcode_into_libs=$hardcode_into_libs |
| 9093 | |
| 9094 | # Flag to hardcode \$libdir into a binary during linking. |
| 9095 | # This must work even if \$libdir does not exist. |
| 9096 | hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) |
| 9097 | |
| 9098 | # Whether we need a single -rpath flag with a separated argument. |
| 9099 | hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) |
| 9100 | |
| 9101 | # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the |
| 9102 | # resulting binary. |
| 9103 | hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) |
| 9104 | |
| 9105 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the |
| 9106 | # resulting binary. |
| 9107 | hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) |
| 9108 | |
| 9109 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into |
| 9110 | # the resulting binary. |
| 9111 | hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) |
| 9112 | |
| 9113 | # Variables whose values should be saved in libtool wrapper scripts and |
| 9114 | # restored at relink time. |
| 9115 | variables_saved_for_relink="$variables_saved_for_relink" |
| 9116 | |
| 9117 | # Whether libtool must link a program against all its dependency libraries. |
| 9118 | link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) |
| 9119 | |
| 9120 | # Compile-time system search path for libraries |
| 9121 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec |
| 9122 | |
| 9123 | # Run-time system search path for libraries |
| 9124 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec |
| 9125 | |
| 9126 | # Fix the shell variable \$srcfile for the compiler. |
| 9127 | fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" |
| 9128 | |
| 9129 | # Set to yes if exported symbols are required. |
| 9130 | always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) |
| 9131 | |
| 9132 | # The commands to list exported symbols. |
| 9133 | export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) |
| 9134 | |
| 9135 | # The commands to extract the exported symbol list from a shared archive. |
| 9136 | extract_expsyms_cmds=$lt_extract_expsyms_cmds |
| 9137 | |
| 9138 | # Symbols that should not be listed in the preloaded symbols. |
| 9139 | exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) |
| 9140 | |
| 9141 | # Symbols that must always be exported. |
| 9142 | include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) |
| 9143 | |
| 9144 | ifelse([$1],[], |
| 9145 | [# ### END LIBTOOL CONFIG], |
| 9146 | [# ### END LIBTOOL TAG CONFIG: $tagname]) |
| 9147 | |
| 9148 | __EOF__ |
| 9149 | |
| 9150 | ifelse([$1],[], [ |
| 9151 | case $host_os in |
| 9152 | aix3*) |
| 9153 | cat <<\EOF >> "$cfgfile" |
| 9154 | |
| 9155 | # AIX sometimes has problems with the GCC collect2 program. For some |
| 9156 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
| 9157 | # vanish in a puff of smoke. |
| 9158 | if test "X${COLLECT_NAMES+set}" != Xset; then |
| 9159 | COLLECT_NAMES= |
| 9160 | export COLLECT_NAMES |
| 9161 | fi |
| 9162 | EOF |
| 9163 | ;; |
| 9164 | |
| 9165 | cygwin* | mingw* | pw32* | os2*) |
| 9166 | cat <<'EOF' >> "$cfgfile" |
| 9167 | # This is a source program that is used to create dlls on Windows |
| 9168 | # Don't remove nor modify the starting and closing comments |
| 9169 | _LT_AC_FILE_LTDLL_C |
| 9170 | # This is a source program that is used to create import libraries |
| 9171 | # on Windows for dlls which lack them. Don't remove nor modify the |
| 9172 | # starting and closing comments |
| 9173 | _LT_AC_FILE_IMPGEN_C |
| 9174 | EOF |
| 9175 | ;; |
| 9176 | esac |
| 9177 | |
| 9178 | # We use sed instead of cat because bash on DJGPP gets confused if |
| 9179 | # if finds mixed CR/LF and LF-only lines. Since sed operates in |
| 9180 | # text mode, it properly converts lines to CR/LF. This bash problem |
| 9181 | # is reportedly fixed, but why not run on old versions too? |
| 9182 | sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) |
| 9183 | |
| 9184 | mv -f "$cfgfile" "$ofile" || \ |
| 9185 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") |
| 9186 | chmod +x "$ofile" |
| 9187 | ]) |
| 9188 | else |
| 9189 | # If there is no Makefile yet, we rely on a make rule to execute |
| 9190 | # `config.status --recheck' to rerun these tests and create the |
| 9191 | # libtool script then. |
| 9192 | test -f Makefile && make "$ltmain" |
| 9193 | fi |
| 9194 | ])# AC_LIBTOOL_CONFIG |
| 9195 | |
| 9196 | |
| 9197 | # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) |
| 9198 | # ------------------------------------------- |
| 9199 | AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], |
| 9200 | [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
| 9201 | |
| 9202 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
| 9203 | |
| 9204 | if test "$GCC" = yes; then |
| 9205 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' |
| 9206 | |
| 9207 | AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], |
| 9208 | lt_cv_prog_compiler_rtti_exceptions, |
| 9209 | [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [], |
| 9210 | [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) |
| 9211 | fi |
| 9212 | ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI |
| 9213 | |
| 9214 | |
| 9215 | # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
| 9216 | # --------------------------------- |
| 9217 | AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], |
| 9218 | [AC_REQUIRE([AC_CANONICAL_HOST]) |
| 9219 | AC_REQUIRE([AC_PROG_NM]) |
| 9220 | AC_REQUIRE([AC_OBJEXT]) |
| 9221 | # Check for command to grab the raw symbol name followed by C symbol from nm. |
| 9222 | AC_MSG_CHECKING([command to parse $NM output from $compiler object]) |
| 9223 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], |
| 9224 | [ |
| 9225 | # These are sane defaults that work on at least a few old systems. |
| 9226 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] |
| 9227 | |
| 9228 | # Character class describing NM global symbol codes. |
| 9229 | symcode='[[BCDEGRST]]' |
| 9230 | |
| 9231 | # Regexp to match symbols that can be accessed directly from C. |
| 9232 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' |
| 9233 | |
| 9234 | # Transform the above into a raw symbol and a C symbol. |
| 9235 | symxfrm='\1 \2\3 \3' |
| 9236 | |
| 9237 | # Transform an extracted symbol line into a proper C declaration |
| 9238 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" |
| 9239 | |
| 9240 | # Transform an extracted symbol line into symbol name and symbol address |
| 9241 | 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'" |
| 9242 | |
| 9243 | # Define system-specific variables. |
| 9244 | case $host_os in |
| 9245 | aix*) |
| 9246 | symcode='[[BCDT]]' |
| 9247 | ;; |
| 9248 | cygwin* | mingw* | pw32*) |
| 9249 | symcode='[[ABCDGISTW]]' |
| 9250 | ;; |
| 9251 | hpux*) # Its linker distinguishes data from code symbols |
| 9252 | if test "$host_cpu" = ia64; then |
| 9253 | symcode='[[ABCDEGRST]]' |
| 9254 | fi |
| 9255 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
| 9256 | 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'" |
| 9257 | ;; |
| 9258 | irix* | nonstopux*) |
| 9259 | symcode='[[BCDEGRST]]' |
| 9260 | ;; |
| 9261 | solaris* | sysv5*) |
| 9262 | symcode='[[BDT]]' |
| 9263 | ;; |
| 9264 | sysv4) |
| 9265 | symcode='[[DFNSTU]]' |
| 9266 | ;; |
| 9267 | esac |
| 9268 | |
| 9269 | # Handle CRLF in mingw tool chain |
| 9270 | opt_cr= |
| 9271 | case $host_os in |
| 9272 | mingw*) |
| 9273 | opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
| 9274 | ;; |
| 9275 | esac |
| 9276 | |
| 9277 | # If we're using GNU nm, then use its standard symbol codes. |
| 9278 | if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then |
| 9279 | symcode='[[ABCDGISTW]]' |
| 9280 | fi |
| 9281 | |
| 9282 | # Try without a prefix undercore, then with it. |
| 9283 | for ac_symprfx in "" "_"; do |
| 9284 | |
| 9285 | # Write the raw and C identifiers. |
| 9286 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" |
| 9287 | |
| 9288 | # Check to see that the pipe works correctly. |
| 9289 | pipe_works=no |
| 9290 | |
| 9291 | rm -f conftest* |
| 9292 | cat > conftest.$ac_ext <<EOF |
| 9293 | #ifdef __cplusplus |
| 9294 | extern "C" { |
| 9295 | #endif |
| 9296 | char nm_test_var; |
| 9297 | void nm_test_func(){} |
| 9298 | #ifdef __cplusplus |
| 9299 | } |
| 9300 | #endif |
| 9301 | int main(){nm_test_var='a';nm_test_func();return(0);} |
| 9302 | EOF |
| 9303 | |
| 9304 | if AC_TRY_EVAL(ac_compile); then |
| 9305 | # Now try to grab the symbols. |
| 9306 | nlist=conftest.nm |
| 9307 | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
| 9308 | # Try sorting and uniquifying the output. |
| 9309 | if sort "$nlist" | uniq > "$nlist"T; then |
| 9310 | mv -f "$nlist"T "$nlist" |
| 9311 | else |
| 9312 | rm -f "$nlist"T |
| 9313 | fi |
| 9314 | |
| 9315 | # Make sure that we snagged all the symbols we need. |
| 9316 | if egrep ' nm_test_var$' "$nlist" >/dev/null; then |
| 9317 | if egrep ' nm_test_func$' "$nlist" >/dev/null; then |
| 9318 | cat <<EOF > conftest.$ac_ext |
| 9319 | #ifdef __cplusplus |
| 9320 | extern "C" { |
| 9321 | #endif |
| 9322 | |
| 9323 | EOF |
| 9324 | # Now generate the symbol file. |
| 9325 | eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' |
| 9326 | |
| 9327 | cat <<EOF >> conftest.$ac_ext |
| 9328 | #if defined (__STDC__) && __STDC__ |
| 9329 | # define lt_ptr_t void * |
| 9330 | #else |
| 9331 | # define lt_ptr_t char * |
| 9332 | # define const |
| 9333 | #endif |
| 9334 | |
| 9335 | /* The mapping between symbol names and symbols. */ |
| 9336 | const struct { |
| 9337 | const char *name; |
| 9338 | lt_ptr_t address; |
| 9339 | } |
| 9340 | lt_preloaded_symbols[[]] = |
| 9341 | { |
| 9342 | EOF |
| 9343 | sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext |
| 9344 | cat <<\EOF >> conftest.$ac_ext |
| 9345 | {0, (lt_ptr_t) 0} |
| 9346 | }; |
| 9347 | |
| 9348 | #ifdef __cplusplus |
| 9349 | } |
| 9350 | #endif |
| 9351 | EOF |
| 9352 | # Now try linking the two files. |
| 9353 | mv conftest.$ac_objext conftstm.$ac_objext |
| 9354 | lt_save_LIBS="$LIBS" |
| 9355 | lt_save_CFLAGS="$CFLAGS" |
| 9356 | LIBS="conftstm.$ac_objext" |
| 9357 | CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" |
| 9358 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then |
| 9359 | pipe_works=yes |
| 9360 | fi |
| 9361 | LIBS="$lt_save_LIBS" |
| 9362 | CFLAGS="$lt_save_CFLAGS" |
| 9363 | else |
| 9364 | echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD |
| 9365 | fi |
| 9366 | else |
| 9367 | echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD |
| 9368 | fi |
| 9369 | else |
| 9370 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD |
| 9371 | fi |
| 9372 | else |
| 9373 | echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD |
| 9374 | cat conftest.$ac_ext >&5 |
| 9375 | fi |
| 9376 | rm -f conftest* conftst* |
| 9377 | |
| 9378 | # Do not use the global_symbol_pipe unless it works. |
| 9379 | if test "$pipe_works" = yes; then |
| 9380 | break |
| 9381 | else |
| 9382 | lt_cv_sys_global_symbol_pipe= |
| 9383 | fi |
| 9384 | done |
| 9385 | ]) |
| 9386 | if test -z "$lt_cv_sys_global_symbol_pipe"; then |
| 9387 | lt_cv_sys_global_symbol_to_cdecl= |
| 9388 | fi |
| 9389 | if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then |
| 9390 | AC_MSG_RESULT(failed) |
| 9391 | else |
| 9392 | AC_MSG_RESULT(ok) |
| 9393 | fi |
| 9394 | ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
| 9395 | |
| 9396 | |
| 9397 | # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) |
| 9398 | # --------------------------------------- |
| 9399 | AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], |
| 9400 | [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= |
| 9401 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
| 9402 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= |
| 9403 | |
| 9404 | AC_MSG_CHECKING([for $compiler option to produce PIC]) |
| 9405 | ifelse([$1],[CXX],[ |
| 9406 | # C++ specific cases for pic, static, wl, etc. |
| 9407 | if test "$GXX" = yes; then |
| 9408 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 9409 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 9410 | |
| 9411 | case $host_os in |
| 9412 | aix*) |
| 9413 | # All AIX code is PIC. |
| 9414 | if test "$host_cpu" = ia64; then |
| 9415 | # AIX 5 now supports IA64 processor |
| 9416 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 9417 | fi |
| 9418 | ;; |
| 9419 | amigaos*) |
| 9420 | # FIXME: we need at least 68020 code to build shared libraries, but |
| 9421 | # adding the `-m68020' flag to GCC prevents building anything better, |
| 9422 | # like `-m68040'. |
| 9423 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
| 9424 | ;; |
| 9425 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
| 9426 | # PIC is the default for these OSes. |
| 9427 | ;; |
| 9428 | cygwin* | mingw* | os2*) |
| 9429 | # This hack is so that the source file can tell whether it is being |
| 9430 | # built for inclusion in a dll (and should export symbols for example). |
| 9431 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
| 9432 | ;; |
| 9433 | darwin* | rhapsody*) |
| 9434 | # PIC is the default on this platform |
| 9435 | # Common symbols not allowed in MH_DYLIB files |
| 9436 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
| 9437 | ;; |
| 9438 | *djgpp*) |
| 9439 | # DJGPP does not support shared libraries at all |
| 9440 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
| 9441 | ;; |
| 9442 | sysv4*MP*) |
| 9443 | if test -d /usr/nec; then |
| 9444 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
| 9445 | fi |
| 9446 | ;; |
| 9447 | hpux*) |
| 9448 | # PIC is the default for IA64 HP-UX, but not for PA HP-UX. |
| 9449 | if test "$host_cpu" != ia64; then |
| 9450 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 9451 | fi |
| 9452 | ;; |
| 9453 | *) |
| 9454 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 9455 | ;; |
| 9456 | esac |
| 9457 | else |
| 9458 | case $host_os in |
| 9459 | aix4* | aix5*) |
| 9460 | # All AIX code is PIC. |
| 9461 | if test "$host_cpu" = ia64; then |
| 9462 | # AIX 5 now supports IA64 processor |
| 9463 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 9464 | else |
| 9465 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
| 9466 | fi |
| 9467 | ;; |
| 9468 | chorus*) |
| 9469 | case $cc_basename in |
| 9470 | cxch68) |
| 9471 | # Green Hills C++ Compiler |
| 9472 | # _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" |
| 9473 | ;; |
| 9474 | esac |
| 9475 | ;; |
| 9476 | dgux*) |
| 9477 | case $cc_basename in |
| 9478 | ec++) |
| 9479 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 9480 | ;; |
| 9481 | ghcx) |
| 9482 | # Green Hills C++ Compiler |
| 9483 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 9484 | ;; |
| 9485 | *) |
| 9486 | ;; |
| 9487 | esac |
| 9488 | ;; |
| 9489 | freebsd*) |
| 9490 | # FreeBSD uses GNU C++ |
| 9491 | ;; |
| 9492 | hpux9* | hpux10* | hpux11*) |
| 9493 | case $cc_basename in |
| 9494 | CC) |
| 9495 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 9496 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" |
| 9497 | if test "$host_cpu" != ia64; then |
| 9498 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
| 9499 | fi |
| 9500 | ;; |
| 9501 | aCC) |
| 9502 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 9503 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" |
| 9504 | if test "$host_cpu" != ia64; then |
| 9505 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
| 9506 | fi |
| 9507 | ;; |
| 9508 | *) |
| 9509 | ;; |
| 9510 | esac |
| 9511 | ;; |
| 9512 | irix5* | irix6* | nonstopux*) |
| 9513 | case $cc_basename in |
| 9514 | CC) |
| 9515 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 9516 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 9517 | # CC pic flag -KPIC is the default. |
| 9518 | ;; |
| 9519 | *) |
| 9520 | ;; |
| 9521 | esac |
| 9522 | ;; |
| 9523 | linux*) |
| 9524 | case $cc_basename in |
| 9525 | KCC) |
| 9526 | # KAI C++ Compiler |
| 9527 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
| 9528 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 9529 | ;; |
| 9530 | cxx) |
| 9531 | # Compaq C++ |
| 9532 | # Make sure the PIC flag is empty. It appears that all Alpha |
| 9533 | # Linux and Compaq Tru64 Unix objects are PIC. |
| 9534 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
| 9535 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 9536 | ;; |
| 9537 | *) |
| 9538 | ;; |
| 9539 | esac |
| 9540 | ;; |
| 9541 | lynxos*) |
| 9542 | ;; |
| 9543 | m88k*) |
| 9544 | ;; |
| 9545 | mvs*) |
| 9546 | case $cc_basename in |
| 9547 | cxx) |
| 9548 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' |
| 9549 | ;; |
| 9550 | *) |
| 9551 | ;; |
| 9552 | esac |
| 9553 | ;; |
| 9554 | netbsd*) |
| 9555 | ;; |
| 9556 | osf3* | osf4* | osf5*) |
| 9557 | case $cc_basename in |
| 9558 | KCC) |
| 9559 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
| 9560 | ;; |
| 9561 | RCC) |
| 9562 | # Rational C++ 2.4.1 |
| 9563 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 9564 | ;; |
| 9565 | cxx) |
| 9566 | # Digital/Compaq C++ |
| 9567 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 9568 | # Make sure the PIC flag is empty. It appears that all Alpha |
| 9569 | # Linux and Compaq Tru64 Unix objects are PIC. |
| 9570 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
| 9571 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 9572 | ;; |
| 9573 | *) |
| 9574 | ;; |
| 9575 | esac |
| 9576 | ;; |
| 9577 | psos*) |
| 9578 | ;; |
| 9579 | sco*) |
| 9580 | case $cc_basename in |
| 9581 | CC) |
| 9582 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 9583 | ;; |
| 9584 | *) |
| 9585 | ;; |
| 9586 | esac |
| 9587 | ;; |
| 9588 | solaris*) |
| 9589 | case $cc_basename in |
| 9590 | CC) |
| 9591 | # Sun C++ 4.2, 5.x and Centerline C++ |
| 9592 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 9593 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 9594 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
| 9595 | ;; |
| 9596 | gcx) |
| 9597 | # Green Hills C++ Compiler |
| 9598 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
| 9599 | ;; |
| 9600 | *) |
| 9601 | ;; |
| 9602 | esac |
| 9603 | ;; |
| 9604 | sunos4*) |
| 9605 | case $cc_basename in |
| 9606 | CC) |
| 9607 | # Sun C++ 4.x |
| 9608 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 9609 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 9610 | ;; |
| 9611 | lcc) |
| 9612 | # Lucid |
| 9613 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 9614 | ;; |
| 9615 | *) |
| 9616 | ;; |
| 9617 | esac |
| 9618 | ;; |
| 9619 | tandem*) |
| 9620 | case $cc_basename in |
| 9621 | NCC) |
| 9622 | # NonStop-UX NCC 3.20 |
| 9623 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 9624 | ;; |
| 9625 | *) |
| 9626 | ;; |
| 9627 | esac |
| 9628 | ;; |
| 9629 | unixware*) |
| 9630 | ;; |
| 9631 | vxworks*) |
| 9632 | ;; |
| 9633 | *) |
| 9634 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
| 9635 | ;; |
| 9636 | esac |
| 9637 | fi |
| 9638 | ], |
| 9639 | [ |
| 9640 | if test "$GCC" = yes; then |
| 9641 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 9642 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 9643 | |
| 9644 | case $host_os in |
| 9645 | aix*) |
| 9646 | # All AIX code is PIC. |
| 9647 | if test "$host_cpu" = ia64; then |
| 9648 | # AIX 5 now supports IA64 processor |
| 9649 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 9650 | fi |
| 9651 | ;; |
| 9652 | |
| 9653 | amigaos*) |
| 9654 | # FIXME: we need at least 68020 code to build shared libraries, but |
| 9655 | # adding the `-m68020' flag to GCC prevents building anything better, |
| 9656 | # like `-m68040'. |
| 9657 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
| 9658 | ;; |
| 9659 | |
| 9660 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
| 9661 | # PIC is the default for these OSes. |
| 9662 | ;; |
| 9663 | |
| 9664 | cygwin* | mingw* | pw32* | os2*) |
| 9665 | # This hack is so that the source file can tell whether it is being |
| 9666 | # built for inclusion in a dll (and should export symbols for example). |
| 9667 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
| 9668 | ;; |
| 9669 | |
| 9670 | darwin* | rhapsody*) |
| 9671 | # PIC is the default on this platform |
| 9672 | # Common symbols not allowed in MH_DYLIB files |
| 9673 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
| 9674 | ;; |
| 9675 | |
| 9676 | msdosdjgpp*) |
| 9677 | # Just because we use GCC doesn't mean we suddenly get shared libraries |
| 9678 | # on systems that don't support them. |
| 9679 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
| 9680 | enable_shared=no |
| 9681 | ;; |
| 9682 | |
| 9683 | sysv4*MP*) |
| 9684 | if test -d /usr/nec; then |
| 9685 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
| 9686 | fi |
| 9687 | ;; |
| 9688 | |
| 9689 | hpux*) |
| 9690 | # PIC is the default for IA64 HP-UX, but not for PA HP-UX. |
| 9691 | if test "$host_cpu" != ia64; then |
| 9692 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 9693 | fi |
| 9694 | ;; |
| 9695 | |
| 9696 | *) |
| 9697 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 9698 | ;; |
| 9699 | esac |
| 9700 | else |
| 9701 | # PORTME Check for flag to pass linker flags through the system compiler. |
| 9702 | case $host_os in |
| 9703 | aix*) |
| 9704 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 9705 | if test "$host_cpu" = ia64; then |
| 9706 | # AIX 5 now supports IA64 processor |
| 9707 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 9708 | else |
| 9709 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
| 9710 | fi |
| 9711 | ;; |
| 9712 | |
| 9713 | cygwin* | mingw* | pw32* | os2*) |
| 9714 | # This hack is so that the source file can tell whether it is being |
| 9715 | # built for inclusion in a dll (and should export symbols for example). |
| 9716 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
| 9717 | ;; |
| 9718 | |
| 9719 | hpux9* | hpux10* | hpux11*) |
| 9720 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 9721 | if test "$host_cpu" != ia64; then |
| 9722 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
| 9723 | fi |
| 9724 | # Is there a better lt_prog_compiler_static that works with the bundled CC? |
| 9725 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' |
| 9726 | ;; |
| 9727 | |
| 9728 | irix5* | irix6* | nonstopux*) |
| 9729 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 9730 | # PIC (with -KPIC) is the default. |
| 9731 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 9732 | ;; |
| 9733 | |
| 9734 | newsos6) |
| 9735 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 9736 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 9737 | ;; |
| 9738 | |
| 9739 | osf3* | osf4* | osf5*) |
| 9740 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 9741 | # All OSF/1 code is PIC. |
| 9742 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 9743 | ;; |
| 9744 | |
| 9745 | sco3.2v5*) |
| 9746 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' |
| 9747 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' |
| 9748 | ;; |
| 9749 | |
| 9750 | solaris*) |
| 9751 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 9752 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 9753 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 9754 | ;; |
| 9755 | |
| 9756 | sunos4*) |
| 9757 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
| 9758 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
| 9759 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 9760 | ;; |
| 9761 | |
| 9762 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
| 9763 | if test "x$host_vendor" = xsni; then |
| 9764 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD' |
| 9765 | else |
| 9766 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 9767 | fi |
| 9768 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 9769 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 9770 | ;; |
| 9771 | |
| 9772 | sysv4*MP*) |
| 9773 | if test -d /usr/nec ;then |
| 9774 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' |
| 9775 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 9776 | fi |
| 9777 | ;; |
| 9778 | |
| 9779 | uts4*) |
| 9780 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 9781 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 9782 | ;; |
| 9783 | |
| 9784 | *) |
| 9785 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
| 9786 | ;; |
| 9787 | esac |
| 9788 | fi |
| 9789 | ]) |
| 9790 | AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) |
| 9791 | |
| 9792 | # |
| 9793 | # Check to make sure the PIC flag actually works. |
| 9794 | # |
| 9795 | if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then |
| 9796 | AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], |
| 9797 | _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), |
| 9798 | [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [], |
| 9799 | [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in |
| 9800 | "" | " "*) ;; |
| 9801 | *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; |
| 9802 | esac], |
| 9803 | [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
| 9804 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) |
| 9805 | fi |
| 9806 | case "$host_os" in |
| 9807 | # For platforms which do not support PIC, -DPIC is meaningless: |
| 9808 | *djgpp*) |
| 9809 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
| 9810 | ;; |
| 9811 | *) |
| 9812 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC" |
| 9813 | ;; |
| 9814 | esac |
| 9815 | ]) |
| 9816 | |
| 9817 | |
| 9818 | # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) |
| 9819 | # ------------------------------------ |
| 9820 | # See if the linker supports building shared libraries. |
| 9821 | AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], |
| 9822 | [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
| 9823 | ifelse([$1],[CXX],[ |
| 9824 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' |
| 9825 | case $host_os in |
| 9826 | aix4* | aix5*) |
| 9827 | # If we're using GNU nm, then we don't want the "-C" option. |
| 9828 | # -C means demangle to AIX nm, but means don't demangle with GNU nm |
| 9829 | if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then |
| 9830 | _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' |
| 9831 | else |
| 9832 | _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' |
| 9833 | fi |
| 9834 | ;; |
| 9835 | cygwin* | mingw* | pw32*) |
| 9836 | _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" |
| 9837 | ;; |
| 9838 | *) |
| 9839 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' |
| 9840 | ;; |
| 9841 | esac |
| 9842 | ],[ |
| 9843 | runpath_var= |
| 9844 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= |
| 9845 | |
| 9846 | _LT_AC_TAGVAR(archive_cmds, $1)= |
| 9847 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)= |
| 9848 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)= |
| 9849 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= |
| 9850 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= |
| 9851 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
| 9852 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
| 9853 | _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= |
| 9854 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
| 9855 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
| 9856 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
| 9857 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
| 9858 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
| 9859 | _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown |
| 9860 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
| 9861 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' |
| 9862 | # include_expsyms should be a list of space-separated symbols to be *always* |
| 9863 | # included in the symbol list |
| 9864 | _LT_AC_TAGVAR(include_expsyms, $1)= |
| 9865 | # exclude_expsyms can be an egrep regular expression of symbols to exclude |
| 9866 | # it will be wrapped by ` (' and `)$', so one must not match beginning or |
| 9867 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
| 9868 | # as well as any symbol that contains `d'. |
| 9869 | _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" |
| 9870 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
| 9871 | # platforms (ab)use it in PIC code, but their linkers get confused if |
| 9872 | # the symbol is explicitly referenced. Since portable code cannot |
| 9873 | # rely on this symbol name, it's probably fine to never include it in |
| 9874 | # preloaded symbol tables. |
| 9875 | extract_expsyms_cmds= |
| 9876 | |
| 9877 | case $host_os in |
| 9878 | cygwin* | mingw* | pw32*) |
| 9879 | # FIXME: the MSVC++ port hasn't been tested in a loooong time |
| 9880 | # When not using gcc, we currently assume that we are using |
| 9881 | # Microsoft Visual C++. |
| 9882 | if test "$GCC" != yes; then |
| 9883 | with_gnu_ld=no |
| 9884 | fi |
| 9885 | ;; |
| 9886 | openbsd*) |
| 9887 | with_gnu_ld=no |
| 9888 | ;; |
| 9889 | esac |
| 9890 | |
| 9891 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes |
| 9892 | if test "$with_gnu_ld" = yes; then |
| 9893 | # If archive_cmds runs LD, not CC, wlarc should be empty |
| 9894 | wlarc='${wl}' |
| 9895 | |
| 9896 | # See if GNU ld supports shared libraries. |
| 9897 | case $host_os in |
| 9898 | aix3* | aix4* | aix5*) |
| 9899 | # On AIX/PPC, the GNU linker is very broken |
| 9900 | if test "$host_cpu" != ia64; then |
| 9901 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9902 | cat <<EOF 1>&2 |
| 9903 | |
| 9904 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported |
| 9905 | *** to be unable to reliably create shared libraries on AIX. |
| 9906 | *** Therefore, libtool is disabling shared libraries support. If you |
| 9907 | *** really care for shared libraries, you may want to modify your PATH |
| 9908 | *** so that a non-GNU linker is found, and then restart. |
| 9909 | |
| 9910 | EOF |
| 9911 | fi |
| 9912 | ;; |
| 9913 | |
| 9914 | amigaos*) |
| 9915 | _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)' |
| 9916 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 9917 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 9918 | |
| 9919 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
| 9920 | # that the semantics of dynamic libraries on AmigaOS, at least up |
| 9921 | # to version 4, is to share data among multiple programs linked |
| 9922 | # with the same dynamic library. Since this doesn't match the |
| 9923 | # behavior of shared libraries on other platforms, we can't use |
| 9924 | # them. |
| 9925 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9926 | ;; |
| 9927 | |
| 9928 | beos*) |
| 9929 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
| 9930 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 9931 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
| 9932 | # support --undefined. This deserves some investigation. FIXME |
| 9933 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 9934 | else |
| 9935 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9936 | fi |
| 9937 | ;; |
| 9938 | |
| 9939 | cygwin* | mingw* | pw32*) |
| 9940 | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is |
| 9941 | # no search path for DLLs. |
| 9942 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 9943 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 9944 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
| 9945 | |
| 9946 | extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ |
| 9947 | sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ |
| 9948 | test -f $output_objdir/impgen.exe || (cd $output_objdir && \ |
| 9949 | if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ |
| 9950 | else $CC -o impgen impgen.c ; fi)~ |
| 9951 | $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' |
| 9952 | |
| 9953 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' |
| 9954 | |
| 9955 | # cygwin and mingw dlls have different entry points and sets of symbols |
| 9956 | # to exclude. |
| 9957 | # FIXME: what about values for MSVC? |
| 9958 | dll_entry=__cygwin_dll_entry@12 |
| 9959 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ |
| 9960 | case $host_os in |
| 9961 | mingw*) |
| 9962 | # mingw values |
| 9963 | dll_entry=_DllMainCRTStartup@12 |
| 9964 | dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ |
| 9965 | ;; |
| 9966 | esac |
| 9967 | |
| 9968 | # mingw and cygwin differ, and it's simplest to just exclude the union |
| 9969 | # of the two symbol sets. |
| 9970 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 |
| 9971 | |
| 9972 | # recent cygwin and mingw systems supply a stub DllMain which the user |
| 9973 | # can override, but on older systems we have to supply one (in ltdll.c) |
| 9974 | if test "x$lt_cv_need_dllmain" = "xyes"; then |
| 9975 | ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " |
| 9976 | 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~ |
| 9977 | test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' |
| 9978 | else |
| 9979 | ltdll_obj= |
| 9980 | ltdll_cmds= |
| 9981 | fi |
| 9982 | |
| 9983 | # Extract the symbol export list from an `--export-all' def file, |
| 9984 | # then regenerate the def file from the symbol export list, so that |
| 9985 | # the compiled dll only exports the symbol export list. |
| 9986 | # Be careful not to strip the DATA tag left by newer dlltools. |
| 9987 | _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"' |
| 9988 | $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ |
| 9989 | sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' |
| 9990 | |
| 9991 | # If the export-symbols file already is a .def file (1st line |
| 9992 | # is EXPORTS), use it as is. |
| 9993 | # If DATA tags from a recent dlltool are present, honour them! |
| 9994 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then |
| 9995 | cp $export_symbols $output_objdir/$soname-def; |
| 9996 | else |
| 9997 | echo EXPORTS > $output_objdir/$soname-def; |
| 9998 | _lt_hint=1; |
| 9999 | cat $export_symbols | while read symbol; do |
| 10000 | set dummy \$symbol; |
| 10001 | case \[$]# in |
| 10002 | 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; |
| 10003 | *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; |
| 10004 | esac; |
| 10005 | _lt_hint=`expr 1 + \$_lt_hint`; |
| 10006 | done; |
| 10007 | fi~ |
| 10008 | '"$ltdll_cmds"' |
| 10009 | $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~ |
| 10010 | $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~ |
| 10011 | $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~ |
| 10012 | $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~ |
| 10013 | $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' |
| 10014 | ;; |
| 10015 | |
| 10016 | netbsd*) |
| 10017 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 10018 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
| 10019 | wlarc= |
| 10020 | else |
| 10021 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 10022 | _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' |
| 10023 | fi |
| 10024 | ;; |
| 10025 | |
| 10026 | solaris* | sysv5*) |
| 10027 | if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then |
| 10028 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 10029 | cat <<EOF 1>&2 |
| 10030 | |
| 10031 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably |
| 10032 | *** create shared libraries on Solaris systems. Therefore, libtool |
| 10033 | *** is disabling shared libraries support. We urge you to upgrade GNU |
| 10034 | *** binutils to release 2.9.1 or newer. Another option is to modify |
| 10035 | *** your PATH or compiler configuration so that the native linker is |
| 10036 | *** used, and then restart. |
| 10037 | |
| 10038 | EOF |
| 10039 | elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
| 10040 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 10041 | _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' |
| 10042 | else |
| 10043 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 10044 | fi |
| 10045 | ;; |
| 10046 | |
| 10047 | sunos4*) |
| 10048 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 10049 | wlarc= |
| 10050 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 10051 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10052 | ;; |
| 10053 | |
| 10054 | *) |
| 10055 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
| 10056 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 10057 | _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' |
| 10058 | else |
| 10059 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 10060 | fi |
| 10061 | ;; |
| 10062 | esac |
| 10063 | |
| 10064 | if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then |
| 10065 | runpath_var=LD_RUN_PATH |
| 10066 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' |
| 10067 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
| 10068 | case $host_os in |
| 10069 | cygwin* | mingw* | pw32*) |
| 10070 | # dlltool doesn't understand --whole-archive et. al. |
| 10071 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
| 10072 | ;; |
| 10073 | *) |
| 10074 | # ancient GNU ld didn't support --whole-archive et. al. |
| 10075 | if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then |
| 10076 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
| 10077 | else |
| 10078 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
| 10079 | fi |
| 10080 | ;; |
| 10081 | esac |
| 10082 | fi |
| 10083 | else |
| 10084 | # PORTME fill in a description of your system's linker (not GNU ld) |
| 10085 | case $host_os in |
| 10086 | aix3*) |
| 10087 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 10088 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
| 10089 | _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' |
| 10090 | # Note: this linker hardcodes the directories in LIBPATH if there |
| 10091 | # are no directories specified by -L. |
| 10092 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 10093 | if test "$GCC" = yes && test -z "$link_static_flag"; then |
| 10094 | # Neither direct hardcoding nor static linking is supported with a |
| 10095 | # broken collect2. |
| 10096 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
| 10097 | fi |
| 10098 | ;; |
| 10099 | |
| 10100 | aix4* | aix5*) |
| 10101 | if test "$host_cpu" = ia64; then |
| 10102 | # On IA64, the linker does run time linking by default, so we don't |
| 10103 | # have to do anything special. |
| 10104 | aix_use_runtimelinking=no |
| 10105 | exp_sym_flag='-Bexport' |
| 10106 | no_entry_flag="" |
| 10107 | else |
| 10108 | # If we're using GNU nm, then we don't want the "-C" option. |
| 10109 | # -C means demangle to AIX nm, but means don't demangle with GNU nm |
| 10110 | if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then |
| 10111 | _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' |
| 10112 | else |
| 10113 | _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' |
| 10114 | fi |
| 10115 | |
| 10116 | # KDE requires run time linking. Make it the default. |
| 10117 | aix_use_runtimelinking=yes |
| 10118 | exp_sym_flag='-bexport' |
| 10119 | no_entry_flag='-bnoentry' |
| 10120 | fi |
| 10121 | |
| 10122 | # When large executables or shared objects are built, AIX ld can |
| 10123 | # have problems creating the table of contents. If linking a library |
| 10124 | # or program results in "error TOC overflow" add -mminimal-toc to |
| 10125 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
| 10126 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
| 10127 | |
| 10128 | _LT_AC_TAGVAR(archive_cmds, $1)='' |
| 10129 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 10130 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' |
| 10131 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 10132 | |
| 10133 | if test "$GCC" = yes; then |
| 10134 | case $host_os in aix4.[012]|aix4.[012].*) |
| 10135 | # We only want to do this on AIX 4.2 and lower, the check |
| 10136 | # below for broken collect2 doesn't work under 4.3+ |
| 10137 | collect2name=`${CC} -print-prog-name=collect2` |
| 10138 | if test -f "$collect2name" && \ |
| 10139 | strings "$collect2name" | grep resolve_lib_name >/dev/null |
| 10140 | then |
| 10141 | # We have reworked collect2 |
| 10142 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 10143 | else |
| 10144 | # We have old collect2 |
| 10145 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
| 10146 | # It fails to find uninstalled libraries when the uninstalled |
| 10147 | # path is not listed in the libpath. Setting hardcode_minus_L |
| 10148 | # to unsupported forces relinking |
| 10149 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 10150 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 10151 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
| 10152 | fi |
| 10153 | esac |
| 10154 | shared_flag='-shared' |
| 10155 | else |
| 10156 | # not using gcc |
| 10157 | if test "$host_cpu" = ia64; then |
| 10158 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release |
| 10159 | # chokes on -Wl,-G. The following line is correct: |
| 10160 | shared_flag='-G' |
| 10161 | else |
| 10162 | if test "$aix_use_runtimelinking" = yes; then |
| 10163 | shared_flag='-qmkshrobj ${wl}-G' |
| 10164 | else |
| 10165 | shared_flag='-qmkshrobj' |
| 10166 | fi |
| 10167 | fi |
| 10168 | fi |
| 10169 | |
| 10170 | # Let the compiler handle the export list. |
| 10171 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
| 10172 | if test "$aix_use_runtimelinking" = yes; then |
| 10173 | # Warning - without using the other runtime loading flags (-brtl), |
| 10174 | # -berok will link without error, but may produce a broken library. |
| 10175 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' |
| 10176 | # Determine the default libpath from the value encoded in an empty executable. |
| 10177 | _LT_AC_SYS_LIBPATH_AIX |
| 10178 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
| 10179 | _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" |
| 10180 | _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" |
| 10181 | else |
| 10182 | if test "$host_cpu" = ia64; then |
| 10183 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' |
| 10184 | _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" |
| 10185 | _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" |
| 10186 | else |
| 10187 | # Determine the default libpath from the value encoded in an empty executable. |
| 10188 | _LT_AC_SYS_LIBPATH_AIX |
| 10189 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
| 10190 | # Warning - without using the other run time loading flags, |
| 10191 | # -berok will link without error, but may produce a broken library. |
| 10192 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' |
| 10193 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' |
| 10194 | # -bexpall does not export symbols beginning with underscore (_) |
| 10195 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
| 10196 | # Exported symbols can be pulled into shared objects from archives |
| 10197 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' |
| 10198 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
| 10199 | # This is similar to how AIX traditionally builds it's shared libraries. |
| 10200 | _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' |
| 10201 | fi |
| 10202 | fi |
| 10203 | ;; |
| 10204 | |
| 10205 | amigaos*) |
| 10206 | _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)' |
| 10207 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 10208 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 10209 | # see comment about different semantics on the GNU ld section |
| 10210 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 10211 | ;; |
| 10212 | |
| 10213 | bsdi4*) |
| 10214 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic |
| 10215 | ;; |
| 10216 | |
| 10217 | cygwin* | mingw* | pw32*) |
| 10218 | # When not using gcc, we currently assume that we are using |
| 10219 | # Microsoft Visual C++. |
| 10220 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
| 10221 | # no search path for DLLs. |
| 10222 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' |
| 10223 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 10224 | # Tell ltmain to make .lib files, not .a files. |
| 10225 | libext=lib |
| 10226 | # FIXME: Setting linknames here is a bad hack. |
| 10227 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
| 10228 | # The linker will automatically build a .lib file if we build a DLL. |
| 10229 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' |
| 10230 | # FIXME: Should let the user specify the lib program. |
| 10231 | _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' |
| 10232 | fix_srcfile_path='`cygpath -w "$srcfile"`' |
| 10233 | ;; |
| 10234 | |
| 10235 | darwin* | rhapsody*) |
| 10236 | case "$host_os" in |
| 10237 | rhapsody* | darwin1.[[012]]) |
| 10238 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' |
| 10239 | ;; |
| 10240 | *) # Darwin 1.3 on |
| 10241 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' |
| 10242 | ;; |
| 10243 | esac |
| 10244 | |
| 10245 | # FIXME: Relying on posixy $() will cause problems for |
| 10246 | # cross-compilation, but unfortunately the echo tests do not |
| 10247 | # yet detect zsh echo's removal of \ escapes. Also zsh mangles |
| 10248 | # `"' quotes if we put them in here... so don't! |
| 10249 | _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' |
| 10250 | # We need to add '_' to the symbols in $export_symbols first |
| 10251 | #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols' |
| 10252 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 10253 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10254 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' |
| 10255 | ;; |
| 10256 | |
| 10257 | dgux*) |
| 10258 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 10259 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 10260 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10261 | ;; |
| 10262 | |
| 10263 | freebsd1*) |
| 10264 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 10265 | ;; |
| 10266 | |
| 10267 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
| 10268 | # support. Future versions do this automatically, but an explicit c++rt0.o |
| 10269 | # does not break anything, and helps significantly (at the cost of a little |
| 10270 | # extra space). |
| 10271 | freebsd2.2*) |
| 10272 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' |
| 10273 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 10274 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 10275 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10276 | ;; |
| 10277 | |
| 10278 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
| 10279 | freebsd2*) |
| 10280 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 10281 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 10282 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 10283 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10284 | ;; |
| 10285 | |
| 10286 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
| 10287 | freebsd*) |
| 10288 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' |
| 10289 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 10290 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 10291 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10292 | ;; |
| 10293 | |
| 10294 | hpux9* | hpux10* | hpux11*) |
| 10295 | if test "$GCC" = yes; then |
| 10296 | case $host_os in |
| 10297 | hpux9*) |
| 10298 | _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' |
| 10299 | ;; |
| 10300 | *) |
| 10301 | if test "$host_cpu" = ia64; then |
| 10302 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 10303 | else |
| 10304 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' |
| 10305 | fi |
| 10306 | ;; |
| 10307 | esac |
| 10308 | else |
| 10309 | case $host_os in |
| 10310 | hpux9*) |
| 10311 | _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' |
| 10312 | ;; |
| 10313 | *) |
| 10314 | if test "$host_cpu" = ia64; then |
| 10315 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 10316 | else |
| 10317 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' |
| 10318 | fi |
| 10319 | ;; |
| 10320 | esac |
| 10321 | fi |
| 10322 | if test "$host_cpu" = ia64; then |
| 10323 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 10324 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
| 10325 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10326 | else |
| 10327 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
| 10328 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 10329 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 10330 | fi |
| 10331 | # hardcode_minus_L: Not really in the search PATH, |
| 10332 | # but as the default location of the library. |
| 10333 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 10334 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
| 10335 | ;; |
| 10336 | |
| 10337 | irix5* | irix6* | nonstopux*) |
| 10338 | if test "$GCC" = yes; then |
| 10339 | _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' |
| 10340 | else |
| 10341 | _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' |
| 10342 | fi |
| 10343 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 10344 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 10345 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 10346 | ;; |
| 10347 | |
| 10348 | netbsd*) |
| 10349 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 10350 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
| 10351 | else |
| 10352 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
| 10353 | fi |
| 10354 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 10355 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 10356 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10357 | ;; |
| 10358 | |
| 10359 | newsos6) |
| 10360 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 10361 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 10362 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 10363 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 10364 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10365 | ;; |
| 10366 | |
| 10367 | openbsd*) |
| 10368 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 10369 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10370 | |
| 10371 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| 10372 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' |
| 10373 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
| 10374 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
| 10375 | else |
| 10376 | case $host_os in |
| 10377 | openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) |
| 10378 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 10379 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 10380 | ;; |
| 10381 | *) |
| 10382 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' |
| 10383 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
| 10384 | ;; |
| 10385 | esac |
| 10386 | fi |
| 10387 | ;; |
| 10388 | |
| 10389 | os2*) |
| 10390 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 10391 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 10392 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 10393 | _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' |
| 10394 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
| 10395 | ;; |
| 10396 | |
| 10397 | osf3*) |
| 10398 | if test "$GCC" = yes; then |
| 10399 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
| 10400 | _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' |
| 10401 | else |
| 10402 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
| 10403 | _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' |
| 10404 | fi |
| 10405 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 10406 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 10407 | ;; |
| 10408 | |
| 10409 | osf4* | osf5*) # as osf3* with the addition of -msym flag |
| 10410 | if test "$GCC" = yes; then |
| 10411 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
| 10412 | _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' |
| 10413 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 10414 | else |
| 10415 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
| 10416 | _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' |
| 10417 | _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~ |
| 10418 | $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' |
| 10419 | |
| 10420 | # Both c and cxx compiler support -rpath directly |
| 10421 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
| 10422 | fi |
| 10423 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 10424 | ;; |
| 10425 | |
| 10426 | sco3.2v5*) |
| 10427 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 10428 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10429 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' |
| 10430 | runpath_var=LD_RUN_PATH |
| 10431 | hardcode_runpath_var=yes |
| 10432 | ;; |
| 10433 | |
| 10434 | solaris*) |
| 10435 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' |
| 10436 | if test "$GCC" = yes; then |
| 10437 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 10438 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 10439 | $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' |
| 10440 | else |
| 10441 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 10442 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 10443 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
| 10444 | fi |
| 10445 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 10446 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10447 | case $host_os in |
| 10448 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
| 10449 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) |
| 10450 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; |
| 10451 | esac |
| 10452 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 10453 | ;; |
| 10454 | |
| 10455 | sunos4*) |
| 10456 | if test "x$host_vendor" = xsequent; then |
| 10457 | # Use $CC to link under sequent, because it throws in some extra .o |
| 10458 | # files that make .init and .fini sections work. |
| 10459 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' |
| 10460 | else |
| 10461 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' |
| 10462 | fi |
| 10463 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 10464 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 10465 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 10466 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10467 | ;; |
| 10468 | |
| 10469 | sysv4) |
| 10470 | if test "x$host_vendor" = xsni; then |
| 10471 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 10472 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? |
| 10473 | else |
| 10474 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 10475 | _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie |
| 10476 | fi |
| 10477 | runpath_var='LD_RUN_PATH' |
| 10478 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10479 | ;; |
| 10480 | |
| 10481 | sysv4.3*) |
| 10482 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 10483 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10484 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' |
| 10485 | ;; |
| 10486 | |
| 10487 | sysv4*MP*) |
| 10488 | if test -d /usr/nec; then |
| 10489 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 10490 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10491 | runpath_var=LD_RUN_PATH |
| 10492 | hardcode_runpath_var=yes |
| 10493 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes |
| 10494 | fi |
| 10495 | ;; |
| 10496 | |
| 10497 | sysv4.2uw2*) |
| 10498 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
| 10499 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 10500 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
| 10501 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10502 | hardcode_runpath_var=yes |
| 10503 | runpath_var=LD_RUN_PATH |
| 10504 | ;; |
| 10505 | |
| 10506 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) |
| 10507 | _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' |
| 10508 | if test "$GCC" = yes; then |
| 10509 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 10510 | else |
| 10511 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 10512 | fi |
| 10513 | runpath_var='LD_RUN_PATH' |
| 10514 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10515 | ;; |
| 10516 | |
| 10517 | sysv5*) |
| 10518 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' |
| 10519 | # $CC -shared without GNU ld will not create a library from C++ |
| 10520 | # object files and a static libstdc++, better avoid it by now |
| 10521 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 10522 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 10523 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
| 10524 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
| 10525 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10526 | runpath_var='LD_RUN_PATH' |
| 10527 | ;; |
| 10528 | |
| 10529 | uts4*) |
| 10530 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 10531 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 10532 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 10533 | ;; |
| 10534 | |
| 10535 | *) |
| 10536 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 10537 | ;; |
| 10538 | esac |
| 10539 | fi |
| 10540 | ]) |
| 10541 | AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) |
| 10542 | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no |
| 10543 | |
| 10544 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
| 10545 | if test "$GCC" = yes; then |
| 10546 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
| 10547 | fi |
| 10548 | |
| 10549 | # |
| 10550 | # Do we need to explicitly link libc? |
| 10551 | # |
| 10552 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
| 10553 | if test "$enable_shared" = yes && test "$GCC" = yes; then |
| 10554 | case $_LT_AC_TAGVAR(archive_cmds, $1) in |
| 10555 | *'~'*) |
| 10556 | # FIXME: we may have to deal with multi-command sequences. |
| 10557 | ;; |
| 10558 | '$CC '*) |
| 10559 | # Test whether the compiler implicitly links with -lc since on some |
| 10560 | # systems, -lgcc has to come before -lc. If gcc already passes -lc |
| 10561 | # to ld, don't add -lc before -lgcc. |
| 10562 | AC_MSG_CHECKING([whether -lc should be explicitly linked in]) |
| 10563 | $rm conftest* |
| 10564 | echo 'static int dummy;' > conftest.$ac_ext |
| 10565 | |
| 10566 | if AC_TRY_EVAL(ac_compile) 2>conftest.err; then |
| 10567 | soname=conftest |
| 10568 | lib=conftest |
| 10569 | libobjs=conftest.$ac_objext |
| 10570 | deplibs= |
| 10571 | wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) |
| 10572 | compiler_flags=-v |
| 10573 | linker_flags=-v |
| 10574 | verstring= |
| 10575 | output_objdir=. |
| 10576 | libname=conftest |
| 10577 | lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) |
| 10578 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= |
| 10579 | if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) |
| 10580 | then |
| 10581 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 10582 | else |
| 10583 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
| 10584 | fi |
| 10585 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag |
| 10586 | else |
| 10587 | cat conftest.err 1>&5 |
| 10588 | fi |
| 10589 | $rm conftest* |
| 10590 | AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) |
| 10591 | ;; |
| 10592 | esac |
| 10593 | fi |
| 10594 | ])# AC_LIBTOOL_PROG_LD_SHLIBS |
| 10595 | |
| 10596 | |
| 10597 | # _LT_AC_FILE_LTDLL_C |
| 10598 | # ------------------- |
| 10599 | # Be careful that the start marker always follows a newline. |
| 10600 | AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ |
| 10601 | # /* ltdll.c starts here */ |
| 10602 | # #define WIN32_LEAN_AND_MEAN |
| 10603 | # #include <windows.h> |
| 10604 | # #undef WIN32_LEAN_AND_MEAN |
| 10605 | # #include <stdio.h> |
| 10606 | # |
| 10607 | # #ifndef __CYGWIN__ |
| 10608 | # # ifdef __CYGWIN32__ |
| 10609 | # # define __CYGWIN__ __CYGWIN32__ |
| 10610 | # # endif |
| 10611 | # #endif |
| 10612 | # |
| 10613 | # #ifdef __cplusplus |
| 10614 | # extern "C" { |
| 10615 | # #endif |
| 10616 | # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); |
| 10617 | # #ifdef __cplusplus |
| 10618 | # } |
| 10619 | # #endif |
| 10620 | # |
| 10621 | # #ifdef __CYGWIN__ |
| 10622 | # #include <cygwin/cygwin_dll.h> |
| 10623 | # DECLARE_CYGWIN_DLL( DllMain ); |
| 10624 | # #endif |
| 10625 | # HINSTANCE __hDllInstance_base; |
| 10626 | # |
| 10627 | # BOOL APIENTRY |
| 10628 | # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) |
| 10629 | # { |
| 10630 | # __hDllInstance_base = hInst; |
| 10631 | # return TRUE; |
| 10632 | # } |
| 10633 | # /* ltdll.c ends here */ |
| 10634 | ])# _LT_AC_FILE_LTDLL_C |
| 10635 | |
| 10636 | |
| 10637 | # _LT_AC_FILE_IMPGEN_C |
| 10638 | # -------------------- |
| 10639 | # Be careful that the start marker always follows a newline. |
| 10640 | AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [ |
| 10641 | # /* impgen.c starts here */ |
| 10642 | # /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. |
| 10643 | # |
| 10644 | # This file is part of GNU libtool. |
| 10645 | # |
| 10646 | # This program is free software; you can redistribute it and/or modify |
| 10647 | # it under the terms of the GNU General Public License as published by |
| 10648 | # the Free Software Foundation; either version 2 of the License, or |
| 10649 | # (at your option) any later version. |
| 10650 | # |
| 10651 | # This program is distributed in the hope that it will be useful, |
| 10652 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10653 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10654 | # GNU General Public License for more details. |
| 10655 | # |
| 10656 | # You should have received a copy of the GNU General Public License |
| 10657 | # along with this program; if not, write to the Free Software |
| 10658 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 10659 | # */ |
| 10660 | # |
| 10661 | # #include <stdio.h> /* for printf() */ |
| 10662 | # #include <unistd.h> /* for open(), lseek(), read() */ |
| 10663 | # #include <fcntl.h> /* for O_RDONLY, O_BINARY */ |
| 10664 | # #include <string.h> /* for strdup() */ |
| 10665 | # |
| 10666 | # /* O_BINARY isn't required (or even defined sometimes) under Unix */ |
| 10667 | # #ifndef O_BINARY |
| 10668 | # #define O_BINARY 0 |
| 10669 | # #endif |
| 10670 | # |
| 10671 | # static unsigned int |
| 10672 | # pe_get16 (fd, offset) |
| 10673 | # int fd; |
| 10674 | # int offset; |
| 10675 | # { |
| 10676 | # unsigned char b[2]; |
| 10677 | # lseek (fd, offset, SEEK_SET); |
| 10678 | # read (fd, b, 2); |
| 10679 | # return b[0] + (b[1]<<8); |
| 10680 | # } |
| 10681 | # |
| 10682 | # static unsigned int |
| 10683 | # pe_get32 (fd, offset) |
| 10684 | # int fd; |
| 10685 | # int offset; |
| 10686 | # { |
| 10687 | # unsigned char b[4]; |
| 10688 | # lseek (fd, offset, SEEK_SET); |
| 10689 | # read (fd, b, 4); |
| 10690 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
| 10691 | # } |
| 10692 | # |
| 10693 | # static unsigned int |
| 10694 | # pe_as32 (ptr) |
| 10695 | # void *ptr; |
| 10696 | # { |
| 10697 | # unsigned char *b = ptr; |
| 10698 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
| 10699 | # } |
| 10700 | # |
| 10701 | # int |
| 10702 | # main (argc, argv) |
| 10703 | # int argc; |
| 10704 | # char *argv[]; |
| 10705 | # { |
| 10706 | # int dll; |
| 10707 | # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; |
| 10708 | # unsigned long export_rva, export_size, nsections, secptr, expptr; |
| 10709 | # unsigned long name_rvas, nexp; |
| 10710 | # unsigned char *expdata, *erva; |
| 10711 | # char *filename, *dll_name; |
| 10712 | # |
| 10713 | # filename = argv[1]; |
| 10714 | # |
| 10715 | # dll = open(filename, O_RDONLY|O_BINARY); |
| 10716 | # if (dll < 1) |
| 10717 | # return 1; |
| 10718 | # |
| 10719 | # dll_name = filename; |
| 10720 | # |
| 10721 | # for (i=0; filename[i]; i++) |
| 10722 | # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') |
| 10723 | # dll_name = filename + i +1; |
| 10724 | # |
| 10725 | # pe_header_offset = pe_get32 (dll, 0x3c); |
| 10726 | # opthdr_ofs = pe_header_offset + 4 + 20; |
| 10727 | # num_entries = pe_get32 (dll, opthdr_ofs + 92); |
| 10728 | # |
| 10729 | # if (num_entries < 1) /* no exports */ |
| 10730 | # return 1; |
| 10731 | # |
| 10732 | # export_rva = pe_get32 (dll, opthdr_ofs + 96); |
| 10733 | # export_size = pe_get32 (dll, opthdr_ofs + 100); |
| 10734 | # nsections = pe_get16 (dll, pe_header_offset + 4 +2); |
| 10735 | # secptr = (pe_header_offset + 4 + 20 + |
| 10736 | # pe_get16 (dll, pe_header_offset + 4 + 16)); |
| 10737 | # |
| 10738 | # expptr = 0; |
| 10739 | # for (i = 0; i < nsections; i++) |
| 10740 | # { |
| 10741 | # char sname[8]; |
| 10742 | # unsigned long secptr1 = secptr + 40 * i; |
| 10743 | # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); |
| 10744 | # unsigned long vsize = pe_get32 (dll, secptr1 + 16); |
| 10745 | # unsigned long fptr = pe_get32 (dll, secptr1 + 20); |
| 10746 | # lseek(dll, secptr1, SEEK_SET); |
| 10747 | # read(dll, sname, 8); |
| 10748 | # if (vaddr <= export_rva && vaddr+vsize > export_rva) |
| 10749 | # { |
| 10750 | # expptr = fptr + (export_rva - vaddr); |
| 10751 | # if (export_rva + export_size > vaddr + vsize) |
| 10752 | # export_size = vsize - (export_rva - vaddr); |
| 10753 | # break; |
| 10754 | # } |
| 10755 | # } |
| 10756 | # |
| 10757 | # expdata = (unsigned char*)malloc(export_size); |
| 10758 | # lseek (dll, expptr, SEEK_SET); |
| 10759 | # read (dll, expdata, export_size); |
| 10760 | # erva = expdata - export_rva; |
| 10761 | # |
| 10762 | # nexp = pe_as32 (expdata+24); |
| 10763 | # name_rvas = pe_as32 (expdata+32); |
| 10764 | # |
| 10765 | # printf ("EXPORTS\n"); |
| 10766 | # for (i = 0; i<nexp; i++) |
| 10767 | # { |
| 10768 | # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); |
| 10769 | # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); |
| 10770 | # } |
| 10771 | # |
| 10772 | # return 0; |
| 10773 | # } |
| 10774 | # /* impgen.c ends here */ |
| 10775 | ])# _LT_AC_FILE_IMPGEN_C |
| 10776 | |
| 10777 | # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) |
| 10778 | # --------------------------------- |
| 10779 | AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) |
| 10780 | |
| 10781 | |
| 10782 | # old names |
| 10783 | AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) |
| 10784 | AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
| 10785 | AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) |
| 10786 | AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) |
| 10787 | AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) |
| 10788 | AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) |
| 10789 | AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) |
| 10790 | |
| 10791 | # This is just to silence aclocal about the macro not being used |
| 10792 | ifelse([AC_DISABLE_FAST_INSTALL]) |
| 10793 | |
| 10794 | AC_DEFUN([LT_AC_PROG_GCJ], |
| 10795 | [AC_CHECK_TOOL(GCJ, gcj, no) |
| 10796 | test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" |
| 10797 | AC_SUBST(GCJFLAGS) |
| 10798 | ]) |
| 10799 | |
| 10800 | AC_DEFUN([LT_AC_PROG_RC], |
| 10801 | [AC_CHECK_TOOL(RC, windres, no) |
| 10802 | ]) |
| 10803 | |
| 10804 | # NOTE: This macro has been submitted for inclusion into # |
| 10805 | # GNU Autoconf as AC_PROG_SED. When it is available in # |
| 10806 | # a released version of Autoconf we should remove this # |
| 10807 | # macro and use it instead. # |
| 10808 | # LT_AC_PROG_SED |
| 10809 | # -------------- |
| 10810 | # Check for a fully-functional sed program, that truncates |
| 10811 | # as few characters as possible. Prefer GNU sed if found. |
| 10812 | AC_DEFUN([LT_AC_PROG_SED], |
| 10813 | [AC_MSG_CHECKING([for a sed that does not truncate output]) |
| 10814 | AC_CACHE_VAL(lt_cv_path_SED, |
| 10815 | [# Loop through the user's path and test for sed and gsed. |
| 10816 | # Then use that list of sed's as ones to test for truncation. |
| 10817 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 10818 | for as_dir in $PATH |
| 10819 | do |
| 10820 | IFS=$as_save_IFS |
| 10821 | test -z "$as_dir" && as_dir=. |
| 10822 | for ac_prog in sed gsed; do |
| 10823 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 10824 | if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
| 10825 | _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" |
| 10826 | fi |
| 10827 | done |
| 10828 | done |
| 10829 | done |
| 10830 | |
| 10831 | # Create a temporary directory, and hook for its removal unless debugging. |
| 10832 | $debug || |
| 10833 | { |
| 10834 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 |
| 10835 | trap '{ (exit 1); exit 1; }' 1 2 13 15 |
| 10836 | } |
| 10837 | |
| 10838 | # Create a (secure) tmp directory for tmp files. |
| 10839 | : ${TMPDIR=/tmp} |
| 10840 | { |
| 10841 | tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && |
| 10842 | test -n "$tmp" && test -d "$tmp" |
| 10843 | } || |
| 10844 | { |
| 10845 | tmp=$TMPDIR/sed$$-$RANDOM |
| 10846 | (umask 077 && mkdir $tmp) |
| 10847 | } || |
| 10848 | { |
| 10849 | echo "$me: cannot create a temporary directory in $TMPDIR" >&2 |
| 10850 | { (exit 1); exit 1; } |
| 10851 | } |
| 10852 | _max=0 |
| 10853 | _count=0 |
| 10854 | # Add /usr/xpg4/bin/sed as it is typically found on Solaris |
| 10855 | # along with /bin/sed that truncates output. |
| 10856 | for _sed in $_sed_list /usr/xpg4/bin/sed; do |
| 10857 | test ! -f ${_sed} && break |
| 10858 | cat /dev/null > "$tmp/sed.in" |
| 10859 | _count=0 |
| 10860 | echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in" |
| 10861 | # Check for GNU sed and select it if it is found. |
| 10862 | if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then |
| 10863 | lt_cv_path_SED=${_sed} |
| 10864 | break; |
| 10865 | fi |
| 10866 | while true; do |
| 10867 | cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" |
| 10868 | mv "$tmp/sed.tmp" "$tmp/sed.in" |
| 10869 | cp "$tmp/sed.in" "$tmp/sed.nl" |
| 10870 | echo >>"$tmp/sed.nl" |
| 10871 | ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break |
| 10872 | cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break |
| 10873 | # 10000 chars as input seems more than enough |
| 10874 | test $_count -gt 10 && break |
| 10875 | _count=`expr $_count + 1` |
| 10876 | if test $_count -gt $_max; then |
| 10877 | _max=$_count |
| 10878 | lt_cv_path_SED=$_sed |
| 10879 | fi |
| 10880 | done |
| 10881 | done |
| 10882 | rm -rf "$tmp" |
| 10883 | ]) |
| 10884 | AC_MSG_RESULT([$SED]) |
| 10885 | ]) |
| 10886 | |
| 10887 | # Do all the work for Automake. This macro actually does too much -- |
| 10888 | # some checks are only needed if your package does certain things. |
| 10889 | # But this isn't really a big deal. |
| 10890 | |
| 10891 | # serial 1 |
| 10892 | |
| 10893 | dnl Usage: |
| 10894 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
| 10895 | |
| 10896 | AC_DEFUN([AM_INIT_AUTOMAKE], |
| 10897 | [AC_REQUIRE([AC_PROG_INSTALL]) |
| 10898 | PACKAGE=[$1] |
| 10899 | AC_SUBST(PACKAGE) |
| 10900 | VERSION=[$2] |
| 10901 | AC_SUBST(VERSION) |
| 10902 | dnl test to see if srcdir already configured |
| 10903 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
| 10904 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
| 10905 | fi |
| 10906 | ifelse([$3],, |
| 10907 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
| 10908 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
| 10909 | AC_REQUIRE([AM_SANITY_CHECK]) |
| 10910 | AC_REQUIRE([AC_ARG_PROGRAM]) |
| 10911 | dnl FIXME This is truly gross. |
| 10912 | missing_dir=`cd $ac_aux_dir && pwd` |
| 10913 | AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) |
| 10914 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
| 10915 | AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) |
| 10916 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
| 10917 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
| 10918 | AC_REQUIRE([AC_PROG_MAKE_SET])]) |
| 10919 | |
| 10920 | # |
| 10921 | # Check to make sure that the build environment is sane. |
| 10922 | # |
| 10923 | |
| 10924 | AC_DEFUN([AM_SANITY_CHECK], |
| 10925 | [AC_MSG_CHECKING([whether build environment is sane]) |
| 10926 | # Just in case |
| 10927 | sleep 1 |
| 10928 | echo timestamp > conftestfile |
| 10929 | # Do `set' in a subshell so we don't clobber the current shell's |
| 10930 | # arguments. Must try -L first in case configure is actually a |
| 10931 | # symlink; some systems play weird games with the mod time of symlinks |
| 10932 | # (eg FreeBSD returns the mod time of the symlink's containing |
| 10933 | # directory). |
| 10934 | if ( |
| 10935 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
| 10936 | if test "[$]*" = "X"; then |
| 10937 | # -L didn't work. |
| 10938 | set X `ls -t $srcdir/configure conftestfile` |
| 10939 | fi |
| 10940 | if test "[$]*" != "X $srcdir/configure conftestfile" \ |
| 10941 | && test "[$]*" != "X conftestfile $srcdir/configure"; then |
| 10942 | |
| 10943 | # If neither matched, then we have a broken ls. This can happen |
| 10944 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
| 10945 | # broken ls alias from the environment. This has actually |
| 10946 | # happened. Such a system could not be considered "sane". |
| 10947 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
| 10948 | alias in your environment]) |
| 10949 | fi |
| 10950 | |
| 10951 | test "[$]2" = conftestfile |
| 10952 | ) |
| 10953 | then |
| 10954 | # Ok. |
| 10955 | : |
| 10956 | else |
| 10957 | AC_MSG_ERROR([newly created file is older than distributed files! |
| 10958 | Check your system clock]) |
| 10959 | fi |
| 10960 | rm -f conftest* |
| 10961 | AC_MSG_RESULT(yes)]) |
| 10962 | |
| 10963 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
| 10964 | dnl The program must properly implement --version. |
| 10965 | AC_DEFUN([AM_MISSING_PROG], |
| 10966 | [AC_MSG_CHECKING(for working $2) |
| 10967 | # Run test in a subshell; some versions of sh will print an error if |
| 10968 | # an executable is not found, even if stderr is redirected. |
| 10969 | # Redirect stdin to placate older versions of autoconf. Sigh. |
| 10970 | if ($2 --version) < /dev/null > /dev/null 2>&1; then |
| 10971 | $1=$2 |
| 10972 | AC_MSG_RESULT(found) |
| 10973 | else |
| 10974 | $1="$3/missing $2" |
| 10975 | AC_MSG_RESULT(missing) |
| 10976 | fi |
| 10977 | AC_SUBST($1)]) |
| 10978 | |
| 10979 | |
| 10980 | dnl AM_PROG_LEX |
| 10981 | dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT |
| 10982 | AC_DEFUN([AM_PROG_LEX], |
| 10983 | [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) |
| 10984 | AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex") |
| 10985 | AC_PROG_LEX |
| 10986 | AC_DECL_YYTEXT]) |
| 10987 | |
| 10988 | # Define a conditional. |
| 10989 | |
| 10990 | AC_DEFUN([AM_CONDITIONAL], |
| 10991 | [AC_SUBST($1_TRUE) |
| 10992 | AC_SUBST($1_FALSE) |
| 10993 | if $2; then |
| 10994 | $1_TRUE= |
| 10995 | $1_FALSE='#' |
| 10996 | else |
| 10997 | $1_TRUE='#' |
| 10998 | $1_FALSE= |
| 10999 | fi]) |
| 11000 | |
| 11001 | # Like AC_CONFIG_HEADER, but automatically create stamp file. |
| 11002 | |
| 11003 | AC_DEFUN([AM_CONFIG_HEADER], |
| 11004 | [AC_PREREQ([2.12]) |
| 11005 | AC_CONFIG_HEADER([$1]) |
| 11006 | dnl When config.status generates a header, we must update the stamp-h file. |
| 11007 | dnl This file resides in the same directory as the config header |
| 11008 | dnl that is generated. We must strip everything past the first ":", |
| 11009 | dnl and everything past the last "/". |
| 11010 | AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl |
| 11011 | ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, |
| 11012 | <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, |
| 11013 | <<am_indx=1 |
| 11014 | for am_file in <<$1>>; do |
| 11015 | case " <<$>>CONFIG_HEADERS " in |
| 11016 | *" <<$>>am_file "*<<)>> |
| 11017 | echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx |
| 11018 | ;; |
| 11019 | esac |
| 11020 | am_indx=`expr "<<$>>am_indx" + 1` |
| 11021 | done<<>>dnl>>) |
| 11022 | changequote([,]))]) |
| 11023 | |