|
Lines 1-12406
Link Here
|
| 1 |
## -*- autoconf -*- |
|
|
| 2 |
|
| 3 |
dnl This file is part of the KDE libraries/packages |
| 4 |
dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu) |
| 5 |
dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org) |
| 6 |
|
| 7 |
dnl This file is free software; you can redistribute it and/or |
| 8 |
dnl modify it under the terms of the GNU Library General Public |
| 9 |
dnl License as published by the Free Software Foundation; either |
| 10 |
dnl version 2 of the License, or (at your option) any later version. |
| 11 |
|
| 12 |
dnl This library is distributed in the hope that it will be useful, |
| 13 |
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 |
dnl Library General Public License for more details. |
| 16 |
|
| 17 |
dnl You should have received a copy of the GNU Library General Public License |
| 18 |
dnl along with this library; see the file COPYING.LIB. If not, write to |
| 19 |
dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 20 |
dnl Boston, MA 02110-1301, USA. |
| 21 |
|
| 22 |
dnl IMPORTANT NOTE: |
| 23 |
dnl Please do not modify this file unless you expect your modifications to be |
| 24 |
dnl carried into every other module in the repository. |
| 25 |
dnl |
| 26 |
dnl Single-module modifications are best placed in configure.in for kdelibs |
| 27 |
dnl and kdebase or configure.in.in if present. |
| 28 |
|
| 29 |
# KDE_PATH_X_DIRECT |
| 30 |
dnl Internal subroutine of AC_PATH_X. |
| 31 |
dnl Set ac_x_includes and/or ac_x_libraries. |
| 32 |
AC_DEFUN([KDE_PATH_X_DIRECT], |
| 33 |
[ |
| 34 |
AC_REQUIRE([KDE_CHECK_LIB64]) |
| 35 |
|
| 36 |
if test "$ac_x_includes" = NO; then |
| 37 |
# Guess where to find include files, by looking for this one X11 .h file. |
| 38 |
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h |
| 39 |
|
| 40 |
# First, try using that file with no special directory specified. |
| 41 |
AC_TRY_CPP([#include <$x_direct_test_include>], |
| 42 |
[# We can compile using X headers with no special include directory. |
| 43 |
ac_x_includes=], |
| 44 |
[# Look for the header file in a standard set of common directories. |
| 45 |
# Check X11 before X11Rn because it is often a symlink to the current release. |
| 46 |
for ac_dir in \ |
| 47 |
/usr/X11/include \ |
| 48 |
/usr/X11R6/include \ |
| 49 |
/usr/X11R5/include \ |
| 50 |
/usr/X11R4/include \ |
| 51 |
\ |
| 52 |
/usr/include/X11 \ |
| 53 |
/usr/include/X11R6 \ |
| 54 |
/usr/include/X11R5 \ |
| 55 |
/usr/include/X11R4 \ |
| 56 |
\ |
| 57 |
/usr/local/X11/include \ |
| 58 |
/usr/local/X11R6/include \ |
| 59 |
/usr/local/X11R5/include \ |
| 60 |
/usr/local/X11R4/include \ |
| 61 |
\ |
| 62 |
/usr/local/include/X11 \ |
| 63 |
/usr/local/include/X11R6 \ |
| 64 |
/usr/local/include/X11R5 \ |
| 65 |
/usr/local/include/X11R4 \ |
| 66 |
\ |
| 67 |
/usr/X386/include \ |
| 68 |
/usr/x386/include \ |
| 69 |
/usr/XFree86/include/X11 \ |
| 70 |
\ |
| 71 |
/usr/include \ |
| 72 |
/usr/local/include \ |
| 73 |
/usr/unsupported/include \ |
| 74 |
/usr/athena/include \ |
| 75 |
/usr/local/x11r5/include \ |
| 76 |
/usr/lpp/Xamples/include \ |
| 77 |
\ |
| 78 |
/usr/openwin/include \ |
| 79 |
/usr/openwin/share/include \ |
| 80 |
; \ |
| 81 |
do |
| 82 |
if test -r "$ac_dir/$x_direct_test_include"; then |
| 83 |
ac_x_includes=$ac_dir |
| 84 |
break |
| 85 |
fi |
| 86 |
done]) |
| 87 |
fi # $ac_x_includes = NO |
| 88 |
|
| 89 |
if test "$ac_x_libraries" = NO; then |
| 90 |
# Check for the libraries. |
| 91 |
|
| 92 |
test -z "$x_direct_test_library" && x_direct_test_library=Xt |
| 93 |
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc |
| 94 |
|
| 95 |
# See if we find them without any special options. |
| 96 |
# Don't add to $LIBS permanently. |
| 97 |
ac_save_LIBS="$LIBS" |
| 98 |
LIBS="-l$x_direct_test_library $LIBS" |
| 99 |
AC_TRY_LINK([#include <X11/Intrinsic.h>], [${x_direct_test_function}(1)], |
| 100 |
[LIBS="$ac_save_LIBS" |
| 101 |
# We can link X programs with no special library path. |
| 102 |
ac_x_libraries=], |
| 103 |
[LIBS="$ac_save_LIBS" |
| 104 |
# First see if replacing the include by lib works. |
| 105 |
# Check X11 before X11Rn because it is often a symlink to the current release. |
| 106 |
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \ |
| 107 |
/usr/X11/lib${kdelibsuff} \ |
| 108 |
/usr/X11R6/lib${kdelibsuff} \ |
| 109 |
/usr/X11R5/lib${kdelibsuff} \ |
| 110 |
/usr/X11R4/lib${kdelibsuff} \ |
| 111 |
\ |
| 112 |
/usr/lib${kdelibsuff}/X11 \ |
| 113 |
/usr/lib${kdelibsuff}/X11R6 \ |
| 114 |
/usr/lib${kdelibsuff}/X11R5 \ |
| 115 |
/usr/lib${kdelibsuff}/X11R4 \ |
| 116 |
\ |
| 117 |
/usr/local/X11/lib${kdelibsuff} \ |
| 118 |
/usr/local/X11R6/lib${kdelibsuff} \ |
| 119 |
/usr/local/X11R5/lib${kdelibsuff} \ |
| 120 |
/usr/local/X11R4/lib${kdelibsuff} \ |
| 121 |
\ |
| 122 |
/usr/local/lib${kdelibsuff}/X11 \ |
| 123 |
/usr/local/lib${kdelibsuff}/X11R6 \ |
| 124 |
/usr/local/lib${kdelibsuff}/X11R5 \ |
| 125 |
/usr/local/lib${kdelibsuff}/X11R4 \ |
| 126 |
\ |
| 127 |
/usr/X386/lib${kdelibsuff} \ |
| 128 |
/usr/x386/lib${kdelibsuff} \ |
| 129 |
/usr/XFree86/lib${kdelibsuff}/X11 \ |
| 130 |
\ |
| 131 |
/usr/lib${kdelibsuff} \ |
| 132 |
/usr/local/lib${kdelibsuff} \ |
| 133 |
/usr/unsupported/lib${kdelibsuff} \ |
| 134 |
/usr/athena/lib${kdelibsuff} \ |
| 135 |
/usr/local/x11r5/lib${kdelibsuff} \ |
| 136 |
/usr/lpp/Xamples/lib${kdelibsuff} \ |
| 137 |
/lib/usr/lib${kdelibsuff}/X11 \ |
| 138 |
\ |
| 139 |
/usr/openwin/lib${kdelibsuff} \ |
| 140 |
/usr/openwin/share/lib${kdelibsuff} \ |
| 141 |
; \ |
| 142 |
do |
| 143 |
dnl Don't even attempt the hair of trying to link an X program! |
| 144 |
for ac_extension in a so sl; do |
| 145 |
if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then |
| 146 |
ac_x_libraries=$ac_dir |
| 147 |
break 2 |
| 148 |
fi |
| 149 |
done |
| 150 |
done]) |
| 151 |
fi # $ac_x_libraries = NO |
| 152 |
]) |
| 153 |
|
| 154 |
|
| 155 |
dnl ------------------------------------------------------------------------ |
| 156 |
dnl Find a file (or one of more files in a list of dirs) |
| 157 |
dnl ------------------------------------------------------------------------ |
| 158 |
dnl |
| 159 |
AC_DEFUN([AC_FIND_FILE], |
| 160 |
[ |
| 161 |
$3=NO |
| 162 |
for i in $2; |
| 163 |
do |
| 164 |
for j in $1; |
| 165 |
do |
| 166 |
echo "configure: __oline__: $i/$j" >&AC_FD_CC |
| 167 |
if test -r "$i/$j"; then |
| 168 |
echo "taking that" >&AC_FD_CC |
| 169 |
$3=$i |
| 170 |
break 2 |
| 171 |
fi |
| 172 |
done |
| 173 |
done |
| 174 |
]) |
| 175 |
|
| 176 |
dnl KDE_FIND_PATH(program-name, variable-name, list-of-dirs, |
| 177 |
dnl if-not-found, test-parameter, prepend-path) |
| 178 |
dnl |
| 179 |
dnl Look for program-name in list-of-dirs+$PATH. |
| 180 |
dnl If prepend-path is set, look in $PATH+list-of-dirs instead. |
| 181 |
dnl If found, $variable-name is set. If not, if-not-found is evaluated. |
| 182 |
dnl test-parameter: if set, the program is executed with this arg, |
| 183 |
dnl and only a successful exit code is required. |
| 184 |
AC_DEFUN([KDE_FIND_PATH], |
| 185 |
[ |
| 186 |
AC_MSG_CHECKING([for $1]) |
| 187 |
if test -n "$$2"; then |
| 188 |
kde_cv_path="$$2"; |
| 189 |
else |
| 190 |
kde_cache=`echo $1 | sed 'y%./+-%__p_%'` |
| 191 |
|
| 192 |
AC_CACHE_VAL(kde_cv_path_$kde_cache, |
| 193 |
[ |
| 194 |
kde_cv_path="NONE" |
| 195 |
kde_save_IFS=$IFS |
| 196 |
IFS=':' |
| 197 |
dirs="" |
| 198 |
for dir in $PATH; do |
| 199 |
dirs="$dirs $dir" |
| 200 |
done |
| 201 |
if test -z "$6"; then dnl Append dirs in PATH (default) |
| 202 |
dirs="$3 $dirs" |
| 203 |
else dnl Prepend dirs in PATH (if 6th arg is set) |
| 204 |
dirs="$dirs $3" |
| 205 |
fi |
| 206 |
IFS=$kde_save_IFS |
| 207 |
|
| 208 |
for dir in $dirs; do |
| 209 |
if test -x "$dir/$1"; then |
| 210 |
if test -n "$5" |
| 211 |
then |
| 212 |
evalstr="$dir/$1 $5 2>&1 " |
| 213 |
if eval $evalstr; then |
| 214 |
kde_cv_path="$dir/$1" |
| 215 |
break |
| 216 |
fi |
| 217 |
else |
| 218 |
kde_cv_path="$dir/$1" |
| 219 |
break |
| 220 |
fi |
| 221 |
fi |
| 222 |
done |
| 223 |
|
| 224 |
eval "kde_cv_path_$kde_cache=$kde_cv_path" |
| 225 |
|
| 226 |
]) |
| 227 |
|
| 228 |
eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\"" |
| 229 |
|
| 230 |
fi |
| 231 |
|
| 232 |
if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then |
| 233 |
AC_MSG_RESULT(not found) |
| 234 |
$4 |
| 235 |
else |
| 236 |
AC_MSG_RESULT($kde_cv_path) |
| 237 |
$2=$kde_cv_path |
| 238 |
|
| 239 |
fi |
| 240 |
]) |
| 241 |
|
| 242 |
AC_DEFUN([KDE_MOC_ERROR_MESSAGE], |
| 243 |
[ |
| 244 |
AC_MSG_ERROR([No Qt meta object compiler (moc) found! |
| 245 |
Please check whether you installed Qt correctly. |
| 246 |
You need to have a running moc binary. |
| 247 |
configure tried to run $ac_cv_path_moc and the test didn't |
| 248 |
succeed. If configure shouldn't have tried this one, set |
| 249 |
the environment variable MOC to the right one before running |
| 250 |
configure. |
| 251 |
]) |
| 252 |
]) |
| 253 |
|
| 254 |
AC_DEFUN([KDE_UIC_ERROR_MESSAGE], |
| 255 |
[ |
| 256 |
AC_MSG_WARN([No Qt ui compiler (uic) found! |
| 257 |
Please check whether you installed Qt correctly. |
| 258 |
You need to have a running uic binary. |
| 259 |
configure tried to run $ac_cv_path_uic and the test didn't |
| 260 |
succeed. If configure shouldn't have tried this one, set |
| 261 |
the environment variable UIC to the right one before running |
| 262 |
configure. |
| 263 |
]) |
| 264 |
]) |
| 265 |
|
| 266 |
|
| 267 |
AC_DEFUN([KDE_CHECK_UIC_FLAG], |
| 268 |
[ |
| 269 |
AC_MSG_CHECKING([whether uic supports -$1 ]) |
| 270 |
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'` |
| 271 |
AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache, |
| 272 |
[ |
| 273 |
cat >conftest.ui <<EOT |
| 274 |
<!DOCTYPE UI><UI version="3" stdsetdef="1"></UI> |
| 275 |
EOT |
| 276 |
ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null" |
| 277 |
if AC_TRY_EVAL(ac_uic_testrun); then |
| 278 |
eval "kde_cv_prog_uic_$kde_cache=yes" |
| 279 |
else |
| 280 |
eval "kde_cv_prog_uic_$kde_cache=no" |
| 281 |
fi |
| 282 |
rm -f conftest* |
| 283 |
]) |
| 284 |
|
| 285 |
if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then |
| 286 |
AC_MSG_RESULT([yes]) |
| 287 |
: |
| 288 |
$3 |
| 289 |
else |
| 290 |
AC_MSG_RESULT([no]) |
| 291 |
: |
| 292 |
$4 |
| 293 |
fi |
| 294 |
]) |
| 295 |
|
| 296 |
|
| 297 |
dnl ------------------------------------------------------------------------ |
| 298 |
dnl Find the meta object compiler and the ui compiler in the PATH, |
| 299 |
dnl in $QTDIR/bin, and some more usual places |
| 300 |
dnl ------------------------------------------------------------------------ |
| 301 |
dnl |
| 302 |
AC_DEFUN([AC_PATH_QT_MOC_UIC], |
| 303 |
[ |
| 304 |
AC_REQUIRE([KDE_CHECK_PERL]) |
| 305 |
qt_bindirs="" |
| 306 |
for dir in $kde_qt_dirs; do |
| 307 |
qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc" |
| 308 |
done |
| 309 |
qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin" |
| 310 |
if test ! "$ac_qt_bindir" = "NO"; then |
| 311 |
qt_bindirs="$ac_qt_bindir $qt_bindirs" |
| 312 |
fi |
| 313 |
|
| 314 |
KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE]) |
| 315 |
if test -z "$UIC_NOT_NEEDED"; then |
| 316 |
KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""]) |
| 317 |
if test -z "$UIC_PATH" ; then |
| 318 |
KDE_UIC_ERROR_MESSAGE |
| 319 |
exit 1 |
| 320 |
else |
| 321 |
UIC=$UIC_PATH |
| 322 |
|
| 323 |
if test $kde_qtver = 3; then |
| 324 |
KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no) |
| 325 |
KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no) |
| 326 |
|
| 327 |
if test x$ac_uic_supports_libpath = xyes; then |
| 328 |
UIC="$UIC -L \$(kde_widgetdir)" |
| 329 |
fi |
| 330 |
if test x$ac_uic_supports_nounload = xyes; then |
| 331 |
UIC="$UIC -nounload" |
| 332 |
fi |
| 333 |
fi |
| 334 |
fi |
| 335 |
else |
| 336 |
UIC="echo uic not available: " |
| 337 |
fi |
| 338 |
|
| 339 |
AC_SUBST(MOC) |
| 340 |
AC_SUBST(UIC) |
| 341 |
|
| 342 |
UIC_TR="i18n" |
| 343 |
if test $kde_qtver = 3; then |
| 344 |
UIC_TR="tr2i18n" |
| 345 |
fi |
| 346 |
|
| 347 |
AC_SUBST(UIC_TR) |
| 348 |
]) |
| 349 |
|
| 350 |
AC_DEFUN([KDE_1_CHECK_PATHS], |
| 351 |
[ |
| 352 |
KDE_1_CHECK_PATH_HEADERS |
| 353 |
|
| 354 |
KDE_TEST_RPATH= |
| 355 |
|
| 356 |
if test -n "$USE_RPATH"; then |
| 357 |
|
| 358 |
if test -n "$kde_libraries"; then |
| 359 |
KDE_TEST_RPATH="-R $kde_libraries" |
| 360 |
fi |
| 361 |
|
| 362 |
if test -n "$qt_libraries"; then |
| 363 |
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries" |
| 364 |
fi |
| 365 |
|
| 366 |
if test -n "$x_libraries"; then |
| 367 |
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries" |
| 368 |
fi |
| 369 |
|
| 370 |
KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH" |
| 371 |
fi |
| 372 |
|
| 373 |
AC_MSG_CHECKING([for KDE libraries installed]) |
| 374 |
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' |
| 375 |
|
| 376 |
if AC_TRY_EVAL(ac_link) && test -s conftest; then |
| 377 |
AC_MSG_RESULT(yes) |
| 378 |
else |
| 379 |
AC_MSG_ERROR([your system fails at linking a small KDE application! |
| 380 |
Check, if your compiler is installed correctly and if you have used the |
| 381 |
same compiler to compile Qt and kdelibs as you did use now. |
| 382 |
For more details about this problem, look at the end of config.log.]) |
| 383 |
fi |
| 384 |
|
| 385 |
if eval `KDEDIR= ./conftest 2>&5`; then |
| 386 |
kde_result=done |
| 387 |
else |
| 388 |
kde_result=problems |
| 389 |
fi |
| 390 |
|
| 391 |
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log |
| 392 |
kde_have_all_paths=yes |
| 393 |
|
| 394 |
KDE_SET_PATHS($kde_result) |
| 395 |
|
| 396 |
]) |
| 397 |
|
| 398 |
AC_DEFUN([KDE_SET_PATHS], |
| 399 |
[ |
| 400 |
kde_cv_all_paths="kde_have_all_paths=\"yes\" \ |
| 401 |
kde_htmldir=\"$kde_htmldir\" \ |
| 402 |
kde_appsdir=\"$kde_appsdir\" \ |
| 403 |
kde_icondir=\"$kde_icondir\" \ |
| 404 |
kde_sounddir=\"$kde_sounddir\" \ |
| 405 |
kde_datadir=\"$kde_datadir\" \ |
| 406 |
kde_locale=\"$kde_locale\" \ |
| 407 |
kde_cgidir=\"$kde_cgidir\" \ |
| 408 |
kde_confdir=\"$kde_confdir\" \ |
| 409 |
kde_kcfgdir=\"$kde_kcfgdir\" \ |
| 410 |
kde_mimedir=\"$kde_mimedir\" \ |
| 411 |
kde_toolbardir=\"$kde_toolbardir\" \ |
| 412 |
kde_wallpaperdir=\"$kde_wallpaperdir\" \ |
| 413 |
kde_templatesdir=\"$kde_templatesdir\" \ |
| 414 |
kde_bindir=\"$kde_bindir\" \ |
| 415 |
kde_servicesdir=\"$kde_servicesdir\" \ |
| 416 |
kde_servicetypesdir=\"$kde_servicetypesdir\" \ |
| 417 |
kde_moduledir=\"$kde_moduledir\" \ |
| 418 |
kde_styledir=\"$kde_styledir\" \ |
| 419 |
kde_widgetdir=\"$kde_widgetdir\" \ |
| 420 |
xdg_appsdir=\"$xdg_appsdir\" \ |
| 421 |
xdg_menudir=\"$xdg_menudir\" \ |
| 422 |
xdg_directorydir=\"$xdg_directorydir\" \ |
| 423 |
kde_result=$1" |
| 424 |
]) |
| 425 |
|
| 426 |
AC_DEFUN([KDE_SET_DEFAULT_PATHS], |
| 427 |
[ |
| 428 |
if test "$1" = "default"; then |
| 429 |
|
| 430 |
if test -z "$kde_htmldir"; then |
| 431 |
kde_htmldir='\${datadir}/doc/tde/HTML' |
| 432 |
fi |
| 433 |
if test -z "$kde_appsdir"; then |
| 434 |
kde_appsdir='\${datadir}/applnk' |
| 435 |
fi |
| 436 |
if test -z "$kde_icondir"; then |
| 437 |
kde_icondir='\${datadir}/icons' |
| 438 |
fi |
| 439 |
if test -z "$kde_sounddir"; then |
| 440 |
kde_sounddir='\${datadir}/sounds' |
| 441 |
fi |
| 442 |
if test -z "$kde_datadir"; then |
| 443 |
kde_datadir='\${datadir}/apps' |
| 444 |
fi |
| 445 |
if test -z "$kde_locale"; then |
| 446 |
kde_locale='\${datadir}/locale' |
| 447 |
fi |
| 448 |
if test -z "$kde_cgidir"; then |
| 449 |
kde_cgidir='\${exec_prefix}/cgi-bin' |
| 450 |
fi |
| 451 |
if test -z "$kde_confdir"; then |
| 452 |
kde_confdir='\${datadir}/config' |
| 453 |
fi |
| 454 |
if test -z "$kde_kcfgdir"; then |
| 455 |
kde_kcfgdir='\${datadir}/config.kcfg' |
| 456 |
fi |
| 457 |
if test -z "$kde_mimedir"; then |
| 458 |
kde_mimedir='\${datadir}/mimelnk' |
| 459 |
fi |
| 460 |
if test -z "$kde_toolbardir"; then |
| 461 |
kde_toolbardir='\${datadir}/toolbar' |
| 462 |
fi |
| 463 |
if test -z "$kde_wallpaperdir"; then |
| 464 |
kde_wallpaperdir='\${datadir}/wallpapers' |
| 465 |
fi |
| 466 |
if test -z "$kde_templatesdir"; then |
| 467 |
kde_templatesdir='\${datadir}/templates' |
| 468 |
fi |
| 469 |
if test -z "$kde_bindir"; then |
| 470 |
kde_bindir='\${exec_prefix}/bin' |
| 471 |
fi |
| 472 |
if test -z "$kde_servicesdir"; then |
| 473 |
kde_servicesdir='\${datadir}/services' |
| 474 |
fi |
| 475 |
if test -z "$kde_servicetypesdir"; then |
| 476 |
kde_servicetypesdir='\${datadir}/servicetypes' |
| 477 |
fi |
| 478 |
if test -z "$kde_moduledir"; then |
| 479 |
if test "$kde_qtver" = "2"; then |
| 480 |
kde_moduledir='\${libdir}/kde2' |
| 481 |
else |
| 482 |
kde_moduledir='\${libdir}/trinity' |
| 483 |
fi |
| 484 |
fi |
| 485 |
if test -z "$kde_styledir"; then |
| 486 |
kde_styledir='\${libdir}/trinity/plugins/styles' |
| 487 |
fi |
| 488 |
if test -z "$kde_widgetdir"; then |
| 489 |
kde_widgetdir='\${libdir}/trinity/plugins/designer' |
| 490 |
fi |
| 491 |
if test -z "$xdg_appsdir"; then |
| 492 |
xdg_appsdir='\${datadir}/applications/kde' |
| 493 |
fi |
| 494 |
if test -z "$xdg_menudir"; then |
| 495 |
xdg_menudir='\${sysconfdir}/xdg/menus' |
| 496 |
fi |
| 497 |
if test -z "$xdg_directorydir"; then |
| 498 |
xdg_directorydir='\${datadir}/desktop-directories' |
| 499 |
fi |
| 500 |
|
| 501 |
KDE_SET_PATHS(defaults) |
| 502 |
|
| 503 |
else |
| 504 |
|
| 505 |
if test $kde_qtver = 1; then |
| 506 |
AC_MSG_RESULT([compiling]) |
| 507 |
KDE_1_CHECK_PATHS |
| 508 |
else |
| 509 |
AC_MSG_ERROR([path checking not yet supported for KDE 2]) |
| 510 |
fi |
| 511 |
|
| 512 |
fi |
| 513 |
]) |
| 514 |
|
| 515 |
AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS], |
| 516 |
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" || |
| 517 |
test -z "$kde_icondir" || test -z "$kde_sounddir" || |
| 518 |
test -z "$kde_datadir" || test -z "$kde_locale" || |
| 519 |
test -z "$kde_cgidir" || test -z "$kde_confdir" || |
| 520 |
test -z "$kde_kcfgdir" || |
| 521 |
test -z "$kde_mimedir" || test -z "$kde_toolbardir" || |
| 522 |
test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" || |
| 523 |
test -z "$kde_bindir" || test -z "$kde_servicesdir" || |
| 524 |
test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" || |
| 525 |
test -z "$kde_styledir" || test -z "kde_widgetdir" || |
| 526 |
test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" || |
| 527 |
test "x$kde_have_all_paths" != "xyes"; then |
| 528 |
kde_have_all_paths=no |
| 529 |
fi |
| 530 |
]) |
| 531 |
|
| 532 |
AC_DEFUN([KDE_MISSING_PROG_ERROR], |
| 533 |
[ |
| 534 |
AC_MSG_ERROR([The important program $1 was not found! |
| 535 |
Please check whether you installed KDE correctly. |
| 536 |
]) |
| 537 |
]) |
| 538 |
|
| 539 |
AC_DEFUN([KDE_MISSING_ARTS_ERROR], |
| 540 |
[ |
| 541 |
AC_MSG_ERROR([The important program $1 was not found! |
| 542 |
Please check whether you installed aRts correctly or use |
| 543 |
--without-arts to compile without aRts support (this will remove functionality). |
| 544 |
]) |
| 545 |
]) |
| 546 |
|
| 547 |
AC_DEFUN([KDE_SET_DEFAULT_BINDIRS], |
| 548 |
[ |
| 549 |
kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/trinity/bin /usr/kde/bin /usr/local/kde/bin" |
| 550 |
test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs" |
| 551 |
if test -n "$KDEDIRS"; then |
| 552 |
kde_save_IFS=$IFS |
| 553 |
IFS=: |
| 554 |
for dir in $KDEDIRS; do |
| 555 |
kde_default_bindirs="$dir/bin $kde_default_bindirs " |
| 556 |
done |
| 557 |
IFS=$kde_save_IFS |
| 558 |
fi |
| 559 |
]) |
| 560 |
|
| 561 |
AC_DEFUN([KDE_SUBST_PROGRAMS], |
| 562 |
[ |
| 563 |
AC_ARG_WITH(arts, |
| 564 |
AC_HELP_STRING([--without-arts],[build without aRts [default=no]]), |
| 565 |
[build_arts=$withval], |
| 566 |
[build_arts=yes] |
| 567 |
) |
| 568 |
AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no") |
| 569 |
if test "$build_arts" = "no"; then |
| 570 |
AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts]) |
| 571 |
fi |
| 572 |
|
| 573 |
KDE_SET_DEFAULT_BINDIRS |
| 574 |
kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs" |
| 575 |
KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)]) |
| 576 |
KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)]) |
| 577 |
if test "$build_arts" '!=' "no"; then |
| 578 |
KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)]) |
| 579 |
KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)]) |
| 580 |
fi |
| 581 |
KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs]) |
| 582 |
|
| 583 |
trinity2ornewer=1 |
| 584 |
trinity3ornewer=1 |
| 585 |
if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then |
| 586 |
trinity2ornewer= |
| 587 |
trinity3ornewer= |
| 588 |
else |
| 589 |
if test "$kde_qtver" = "3"; then |
| 590 |
if test "$kde_qtsubver" -le 1; then |
| 591 |
trinity2ornewer= |
| 592 |
fi |
| 593 |
if test "$kde_qtsubver" -le 2; then |
| 594 |
trinity3ornewer= |
| 595 |
fi |
| 596 |
if test "$KDECONFIG" != "compiled"; then |
| 597 |
if test `$KDECONFIG --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` = 3.2; then |
| 598 |
trinity3ornewer= |
| 599 |
fi |
| 600 |
fi |
| 601 |
fi |
| 602 |
fi |
| 603 |
|
| 604 |
if test -n "$trinity2ornewer"; then |
| 605 |
KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)]) |
| 606 |
KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)]) |
| 607 |
fi |
| 608 |
if test -n "$trinity3ornewer"; then |
| 609 |
KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)]) |
| 610 |
AC_SUBST(MAKEKDEWIDGETS) |
| 611 |
fi |
| 612 |
KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""]) |
| 613 |
|
| 614 |
if test -n "$MEINPROC" -a "$MEINPROC" != "compiled"; then |
| 615 |
kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/trinity/share /opt/kde/share $prefix/share" |
| 616 |
test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs" |
| 617 |
AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET) |
| 618 |
if test "$KDE_XSL_STYLESHEET" = "NO"; then |
| 619 |
KDE_XSL_STYLESHEET="" |
| 620 |
else |
| 621 |
KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl" |
| 622 |
fi |
| 623 |
fi |
| 624 |
|
| 625 |
DCOP_DEPENDENCIES='$(DCOPIDL)' |
| 626 |
if test -n "$trinity2ornewer"; then |
| 627 |
KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)' |
| 628 |
DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)' |
| 629 |
AC_SUBST(KCONFIG_COMPILER) |
| 630 |
AC_SUBST(KCFG_DEPENDENCIES) |
| 631 |
AC_SUBST(DCOPIDLNG) |
| 632 |
fi |
| 633 |
AC_SUBST(DCOPIDL) |
| 634 |
AC_SUBST(DCOPIDL2CPP) |
| 635 |
AC_SUBST(DCOP_DEPENDENCIES) |
| 636 |
AC_SUBST(MCOPIDL) |
| 637 |
AC_SUBST(ARTSCCONFIG) |
| 638 |
AC_SUBST(MEINPROC) |
| 639 |
AC_SUBST(KDE_XSL_STYLESHEET) |
| 640 |
AC_SUBST(XMLLINT) |
| 641 |
])dnl |
| 642 |
|
| 643 |
AC_DEFUN([AC_CREATE_KFSSTND], |
| 644 |
[ |
| 645 |
AC_REQUIRE([AC_CHECK_RPATH]) |
| 646 |
|
| 647 |
AC_MSG_CHECKING([for KDE paths]) |
| 648 |
kde_result="" |
| 649 |
kde_cached_paths=yes |
| 650 |
AC_CACHE_VAL(kde_cv_all_paths, |
| 651 |
[ |
| 652 |
KDE_SET_DEFAULT_PATHS($1) |
| 653 |
kde_cached_paths=no |
| 654 |
]) |
| 655 |
eval "$kde_cv_all_paths" |
| 656 |
KDE_CHECK_PATHS_FOR_COMPLETENESS |
| 657 |
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then |
| 658 |
# wrong values were cached, may be, we can set better ones |
| 659 |
kde_result= |
| 660 |
kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir= |
| 661 |
kde_datadir= kde_locale= kde_cgidir= kde_confdir= kde_kcfgdir= |
| 662 |
kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir= |
| 663 |
kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir= |
| 664 |
kde_have_all_paths= |
| 665 |
kde_styledir= |
| 666 |
kde_widgetdir= |
| 667 |
xdg_appsdir = xdg_menudir= xdg_directorydir= |
| 668 |
KDE_SET_DEFAULT_PATHS($1) |
| 669 |
eval "$kde_cv_all_paths" |
| 670 |
KDE_CHECK_PATHS_FOR_COMPLETENESS |
| 671 |
kde_result="$kde_result (cache overridden)" |
| 672 |
fi |
| 673 |
if test "$kde_have_all_paths" = "no"; then |
| 674 |
AC_MSG_ERROR([configure could not run a little KDE program to test the environment. |
| 675 |
Since it had compiled and linked before, it must be a strange problem on your system. |
| 676 |
Look at config.log for details. If you are not able to fix this, look at |
| 677 |
http://www.kde.org/faq/installation.html or any www.kde.org mirror. |
| 678 |
(If you're using an egcs version on Linux, you may update binutils!) |
| 679 |
]) |
| 680 |
else |
| 681 |
rm -f conftest* |
| 682 |
AC_MSG_RESULT($kde_result) |
| 683 |
fi |
| 684 |
|
| 685 |
bindir=$kde_bindir |
| 686 |
|
| 687 |
KDE_SUBST_PROGRAMS |
| 688 |
|
| 689 |
]) |
| 690 |
|
| 691 |
AC_DEFUN([AC_SUBST_KFSSTND], |
| 692 |
[ |
| 693 |
AC_SUBST(kde_htmldir) |
| 694 |
AC_SUBST(kde_appsdir) |
| 695 |
AC_SUBST(kde_icondir) |
| 696 |
AC_SUBST(kde_sounddir) |
| 697 |
AC_SUBST(kde_datadir) |
| 698 |
AC_SUBST(kde_locale) |
| 699 |
AC_SUBST(kde_confdir) |
| 700 |
AC_SUBST(kde_kcfgdir) |
| 701 |
AC_SUBST(kde_mimedir) |
| 702 |
AC_SUBST(kde_wallpaperdir) |
| 703 |
AC_SUBST(kde_bindir) |
| 704 |
dnl X Desktop Group standards |
| 705 |
AC_SUBST(xdg_appsdir) |
| 706 |
AC_SUBST(xdg_menudir) |
| 707 |
AC_SUBST(xdg_directorydir) |
| 708 |
dnl for KDE 2 |
| 709 |
AC_SUBST(kde_templatesdir) |
| 710 |
AC_SUBST(kde_servicesdir) |
| 711 |
AC_SUBST(kde_servicetypesdir) |
| 712 |
AC_SUBST(kde_moduledir) |
| 713 |
AC_SUBST(kdeinitdir, '$(kde_moduledir)') |
| 714 |
AC_SUBST(kde_styledir) |
| 715 |
AC_SUBST(kde_widgetdir) |
| 716 |
if test "$kde_qtver" = 1; then |
| 717 |
kde_minidir="$kde_icondir/mini" |
| 718 |
else |
| 719 |
# for KDE 1 - this breaks KDE2 apps using minidir, but |
| 720 |
# that's the plan ;-/ |
| 721 |
kde_minidir="/dev/null" |
| 722 |
fi |
| 723 |
dnl AC_SUBST(kde_minidir) |
| 724 |
dnl AC_SUBST(kde_cgidir) |
| 725 |
dnl AC_SUBST(kde_toolbardir) |
| 726 |
]) |
| 727 |
|
| 728 |
AC_DEFUN([KDE_MISC_TESTS], |
| 729 |
[ |
| 730 |
dnl Checks for libraries. |
| 731 |
AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD |
| 732 |
AC_SUBST(LIBUTIL) |
| 733 |
AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD |
| 734 |
AC_SUBST(LIBCOMPAT) |
| 735 |
kde_have_crypt= |
| 736 |
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes], |
| 737 |
AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [ |
| 738 |
AC_MSG_WARN([you have no crypt in either libcrypt or libc. |
| 739 |
You should install libcrypt from another source or configure with PAM |
| 740 |
support]) |
| 741 |
kde_have_crypt=no |
| 742 |
])) |
| 743 |
AC_SUBST(LIBCRYPT) |
| 744 |
if test $kde_have_crypt = yes; then |
| 745 |
AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function]) |
| 746 |
fi |
| 747 |
AC_CHECK_SOCKLEN_T |
| 748 |
AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"]) |
| 749 |
if test $ac_cv_lib_dnet_dnet_ntoa = no; then |
| 750 |
AC_CHECK_LIB(dnet_stub, dnet_ntoa, |
| 751 |
[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) |
| 752 |
fi |
| 753 |
AC_CHECK_FUNC(inet_ntoa) |
| 754 |
if test $ac_cv_func_inet_ntoa = no; then |
| 755 |
AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl") |
| 756 |
fi |
| 757 |
AC_CHECK_FUNC(connect) |
| 758 |
if test $ac_cv_func_connect = no; then |
| 759 |
AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", , |
| 760 |
$X_EXTRA_LIBS) |
| 761 |
fi |
| 762 |
|
| 763 |
AC_CHECK_FUNC(remove) |
| 764 |
if test $ac_cv_func_remove = no; then |
| 765 |
AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix") |
| 766 |
fi |
| 767 |
|
| 768 |
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. |
| 769 |
AC_CHECK_FUNC(shmat, , |
| 770 |
AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc")) |
| 771 |
|
| 772 |
# more headers that need to be explicitly included on darwin |
| 773 |
AC_CHECK_HEADERS(sys/types.h stdint.h) |
| 774 |
|
| 775 |
# sys/bitypes.h is needed for uint32_t and friends on Tru64 |
| 776 |
AC_CHECK_HEADERS(sys/bitypes.h) |
| 777 |
|
| 778 |
# darwin requires a poll emulation library |
| 779 |
AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll") |
| 780 |
|
| 781 |
# for some image handling on Mac OS X |
| 782 |
AC_CHECK_HEADERS(Carbon/Carbon.h) |
| 783 |
|
| 784 |
# CoreAudio framework |
| 785 |
AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [ |
| 786 |
AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API]) |
| 787 |
FRAMEWORK_COREAUDIO="-Wl,-framework,CoreAudio" |
| 788 |
]) |
| 789 |
|
| 790 |
AC_CHECK_RES_INIT |
| 791 |
AC_SUBST(LIB_POLL) |
| 792 |
AC_SUBST(FRAMEWORK_COREAUDIO) |
| 793 |
LIBSOCKET="$X_EXTRA_LIBS" |
| 794 |
AC_SUBST(LIBSOCKET) |
| 795 |
AC_SUBST(X_EXTRA_LIBS) |
| 796 |
AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4 |
| 797 |
AC_SUBST(LIBUCB) |
| 798 |
|
| 799 |
case $host in dnl this *is* LynxOS specific |
| 800 |
*-*-lynxos* ) |
| 801 |
AC_MSG_CHECKING([LynxOS header file wrappers]) |
| 802 |
[CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"] |
| 803 |
AC_MSG_RESULT(disabled) |
| 804 |
AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS |
| 805 |
;; |
| 806 |
esac |
| 807 |
|
| 808 |
KDE_CHECK_TYPES |
| 809 |
KDE_CHECK_LIBDL |
| 810 |
KDE_CHECK_STRLCPY |
| 811 |
KDE_CHECK_PIE_SUPPORT |
| 812 |
|
| 813 |
# darwin needs this to initialize the environment |
| 814 |
AC_CHECK_HEADERS(crt_externs.h) |
| 815 |
AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])]) |
| 816 |
|
| 817 |
AH_VERBATIM(_DARWIN_ENVIRON, |
| 818 |
[ |
| 819 |
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H) |
| 820 |
# include <sys/time.h> |
| 821 |
# include <crt_externs.h> |
| 822 |
# define environ (*_NSGetEnviron()) |
| 823 |
#endif |
| 824 |
]) |
| 825 |
|
| 826 |
AH_VERBATIM(_AIX_STRINGS_H_BZERO, |
| 827 |
[ |
| 828 |
/* |
| 829 |
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h> |
| 830 |
* that defines bzero. |
| 831 |
*/ |
| 832 |
|
| 833 |
#if defined(_AIX) |
| 834 |
#include <strings.h> |
| 835 |
#endif |
| 836 |
]) |
| 837 |
|
| 838 |
AC_CHECK_FUNCS([vsnprintf snprintf]) |
| 839 |
|
| 840 |
AH_VERBATIM(_TRU64,[ |
| 841 |
/* |
| 842 |
* On HP-UX, the declaration of vsnprintf() is needed every time ! |
| 843 |
*/ |
| 844 |
|
| 845 |
#if !defined(HAVE_VSNPRINTF) || defined(hpux) |
| 846 |
#if __STDC__ |
| 847 |
#include <stdarg.h> |
| 848 |
#include <stdlib.h> |
| 849 |
#else |
| 850 |
#include <varargs.h> |
| 851 |
#endif |
| 852 |
#ifdef __cplusplus |
| 853 |
extern "C" |
| 854 |
#endif |
| 855 |
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap); |
| 856 |
#ifdef __cplusplus |
| 857 |
extern "C" |
| 858 |
#endif |
| 859 |
int snprintf(char *str, size_t n, char const *fmt, ...); |
| 860 |
#endif |
| 861 |
]) |
| 862 |
|
| 863 |
]) |
| 864 |
|
| 865 |
dnl ------------------------------------------------------------------------ |
| 866 |
dnl Find the header files and libraries for X-Windows. Extended the |
| 867 |
dnl macro AC_PATH_X |
| 868 |
dnl ------------------------------------------------------------------------ |
| 869 |
dnl |
| 870 |
AC_DEFUN([K_PATH_X], |
| 871 |
[ |
| 872 |
AC_REQUIRE([KDE_MISC_TESTS])dnl |
| 873 |
AC_REQUIRE([KDE_CHECK_LIB64]) |
| 874 |
|
| 875 |
AC_ARG_ENABLE( |
| 876 |
embedded, |
| 877 |
AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]), |
| 878 |
kde_use_qt_emb=$enableval, |
| 879 |
kde_use_qt_emb=no |
| 880 |
) |
| 881 |
|
| 882 |
AC_ARG_ENABLE( |
| 883 |
qtopia, |
| 884 |
AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]), |
| 885 |
kde_use_qt_emb_palm=$enableval, |
| 886 |
kde_use_qt_emb_palm=no |
| 887 |
) |
| 888 |
|
| 889 |
AC_ARG_ENABLE( |
| 890 |
mac, |
| 891 |
AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]), |
| 892 |
kde_use_qt_mac=$enableval, |
| 893 |
kde_use_qt_mac=no |
| 894 |
) |
| 895 |
|
| 896 |
# used to disable x11-specific stuff on special platforms |
| 897 |
AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no") |
| 898 |
|
| 899 |
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then |
| 900 |
|
| 901 |
AC_MSG_CHECKING(for X) |
| 902 |
|
| 903 |
AC_CACHE_VAL(kde_cv_have_x, |
| 904 |
[# One or both of the vars are not set, and there is no cached value. |
| 905 |
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then |
| 906 |
kde_x_includes=NO |
| 907 |
else |
| 908 |
kde_x_includes=$x_includes |
| 909 |
fi |
| 910 |
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then |
| 911 |
kde_x_libraries=NO |
| 912 |
else |
| 913 |
kde_x_libraries=$x_libraries |
| 914 |
fi |
| 915 |
|
| 916 |
# below we use the standard autoconf calls |
| 917 |
ac_x_libraries=$kde_x_libraries |
| 918 |
ac_x_includes=$kde_x_includes |
| 919 |
|
| 920 |
KDE_PATH_X_DIRECT |
| 921 |
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries. |
| 922 |
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct |
| 923 |
dnl location. The correct location is /usr/lib32 or an undefined value |
| 924 |
dnl (the linker is smart enough to pick the correct default library). |
| 925 |
dnl Things work just fine if you use just AC_PATH_X_DIRECT. |
| 926 |
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to |
| 927 |
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so |
| 928 |
dnl x_includes should be left alone. |
| 929 |
case "$host" in |
| 930 |
mips-sgi-irix6*) |
| 931 |
;; |
| 932 |
*-*-solaris*) |
| 933 |
;; |
| 934 |
*) |
| 935 |
_AC_PATH_X_XMKMF |
| 936 |
if test -z "$ac_x_includes"; then |
| 937 |
ac_x_includes="." |
| 938 |
fi |
| 939 |
if test -z "$ac_x_libraries"; then |
| 940 |
ac_x_libraries="/usr/lib${kdelibsuff}" |
| 941 |
fi |
| 942 |
esac |
| 943 |
#from now on we use our own again |
| 944 |
|
| 945 |
# when the user already gave --x-includes, we ignore |
| 946 |
# what the standard autoconf macros told us. |
| 947 |
if test "$kde_x_includes" = NO; then |
| 948 |
kde_x_includes=$ac_x_includes |
| 949 |
fi |
| 950 |
|
| 951 |
# for --x-libraries too |
| 952 |
if test "$kde_x_libraries" = NO; then |
| 953 |
kde_x_libraries=$ac_x_libraries |
| 954 |
fi |
| 955 |
|
| 956 |
if test "$kde_x_includes" = NO; then |
| 957 |
AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!]) |
| 958 |
fi |
| 959 |
|
| 960 |
if test "$kde_x_libraries" = NO; then |
| 961 |
AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!]) |
| 962 |
fi |
| 963 |
|
| 964 |
# Record where we found X for the cache. |
| 965 |
kde_cv_have_x="have_x=yes \ |
| 966 |
kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries" |
| 967 |
])dnl |
| 968 |
|
| 969 |
eval "$kde_cv_have_x" |
| 970 |
|
| 971 |
if test "$have_x" != yes; then |
| 972 |
AC_MSG_RESULT($have_x) |
| 973 |
no_x=yes |
| 974 |
else |
| 975 |
AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes]) |
| 976 |
fi |
| 977 |
|
| 978 |
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then |
| 979 |
X_INCLUDES="" |
| 980 |
x_includes="."; dnl better than nothing :- |
| 981 |
else |
| 982 |
x_includes=$kde_x_includes |
| 983 |
X_INCLUDES="-I$x_includes" |
| 984 |
fi |
| 985 |
|
| 986 |
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE || test "$kde_x_libraries" = "/usr/lib"; then |
| 987 |
X_LDFLAGS="" |
| 988 |
x_libraries="/usr/lib"; dnl better than nothing :- |
| 989 |
else |
| 990 |
x_libraries=$kde_x_libraries |
| 991 |
X_LDFLAGS="-L$x_libraries" |
| 992 |
fi |
| 993 |
all_includes="$X_INCLUDES" |
| 994 |
all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS" |
| 995 |
|
| 996 |
# Check for libraries that X11R6 Xt/Xaw programs need. |
| 997 |
ac_save_LDFLAGS="$LDFLAGS" |
| 998 |
LDFLAGS="$LDFLAGS $X_LDFLAGS" |
| 999 |
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to |
| 1000 |
# check for ICE first), but we must link in the order -lSM -lICE or |
| 1001 |
# we get undefined symbols. So assume we have SM if we have ICE. |
| 1002 |
# These have to be linked with before -lX11, unlike the other |
| 1003 |
# libraries we check for below, so use a different variable. |
| 1004 |
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu. |
| 1005 |
AC_CHECK_LIB(ICE, IceConnectionNumber, |
| 1006 |
[LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS) |
| 1007 |
LDFLAGS="$ac_save_LDFLAGS" |
| 1008 |
|
| 1009 |
LIB_X11='-lX11 $(LIBSOCKET)' |
| 1010 |
|
| 1011 |
AC_MSG_CHECKING(for libXext) |
| 1012 |
AC_CACHE_VAL(kde_cv_have_libXext, |
| 1013 |
[ |
| 1014 |
kde_ldflags_safe="$LDFLAGS" |
| 1015 |
kde_libs_safe="$LIBS" |
| 1016 |
|
| 1017 |
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS" |
| 1018 |
LIBS="-lXext -lX11 $LIBSOCKET" |
| 1019 |
|
| 1020 |
AC_TRY_LINK([ |
| 1021 |
#include <stdio.h> |
| 1022 |
#ifdef STDC_HEADERS |
| 1023 |
# include <stdlib.h> |
| 1024 |
#endif |
| 1025 |
], |
| 1026 |
[ |
| 1027 |
printf("hello Xext\n"); |
| 1028 |
], |
| 1029 |
kde_cv_have_libXext=yes, |
| 1030 |
kde_cv_have_libXext=no |
| 1031 |
) |
| 1032 |
|
| 1033 |
LDFLAGS=$kde_ldflags_safe |
| 1034 |
LIBS=$kde_libs_safe |
| 1035 |
]) |
| 1036 |
|
| 1037 |
AC_MSG_RESULT($kde_cv_have_libXext) |
| 1038 |
|
| 1039 |
if test "$kde_cv_have_libXext" = "no"; then |
| 1040 |
AC_MSG_ERROR([We need a working libXext to proceed. Since configure |
| 1041 |
can't find it itself, we stop here assuming that make wouldn't find |
| 1042 |
them either.]) |
| 1043 |
fi |
| 1044 |
|
| 1045 |
LIB_XEXT="-lXext" |
| 1046 |
QTE_NORTTI="" |
| 1047 |
|
| 1048 |
elif test "$kde_use_qt_emb" = "yes"; then |
| 1049 |
dnl We're using QT Embedded |
| 1050 |
CPPFLAGS=-DQWS |
| 1051 |
CXXFLAGS="$CXXFLAGS -fno-rtti" |
| 1052 |
QTE_NORTTI="-fno-rtti -DQWS" |
| 1053 |
X_PRE_LIBS="" |
| 1054 |
LIB_X11="" |
| 1055 |
LIB_XEXT="" |
| 1056 |
LIB_XRENDER="" |
| 1057 |
LIBSM="" |
| 1058 |
X_INCLUDES="" |
| 1059 |
X_LDFLAGS="" |
| 1060 |
x_includes="" |
| 1061 |
x_libraries="" |
| 1062 |
elif test "$kde_use_qt_mac" = "yes"; then |
| 1063 |
dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to |
| 1064 |
dnl be included to get the information) --Sam |
| 1065 |
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp" |
| 1066 |
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp" |
| 1067 |
X_PRE_LIBS="" |
| 1068 |
LIB_X11="" |
| 1069 |
LIB_XEXT="" |
| 1070 |
LIB_XRENDER="" |
| 1071 |
LIBSM="" |
| 1072 |
X_INCLUDES="" |
| 1073 |
X_LDFLAGS="" |
| 1074 |
x_includes="" |
| 1075 |
x_libraries="" |
| 1076 |
fi |
| 1077 |
AC_SUBST(X_PRE_LIBS) |
| 1078 |
AC_SUBST(LIB_X11) |
| 1079 |
AC_SUBST(LIB_XRENDER) |
| 1080 |
AC_SUBST(LIBSM) |
| 1081 |
AC_SUBST(X_INCLUDES) |
| 1082 |
AC_SUBST(X_LDFLAGS) |
| 1083 |
AC_SUBST(x_includes) |
| 1084 |
AC_SUBST(x_libraries) |
| 1085 |
AC_SUBST(QTE_NORTTI) |
| 1086 |
AC_SUBST(LIB_XEXT) |
| 1087 |
|
| 1088 |
]) |
| 1089 |
|
| 1090 |
AC_DEFUN([KDE_PRINT_QT_PROGRAM], |
| 1091 |
[ |
| 1092 |
AC_REQUIRE([KDE_USE_QT]) |
| 1093 |
cat > conftest.$ac_ext <<EOF |
| 1094 |
#include "confdefs.h" |
| 1095 |
#include <qglobal.h> |
| 1096 |
#include <qapplication.h> |
| 1097 |
EOF |
| 1098 |
if test "$kde_qtver" = "2"; then |
| 1099 |
cat >> conftest.$ac_ext <<EOF |
| 1100 |
#include <qevent.h> |
| 1101 |
#include <qstring.h> |
| 1102 |
#include <qstyle.h> |
| 1103 |
EOF |
| 1104 |
|
| 1105 |
if test $kde_qtsubver -gt 0; then |
| 1106 |
cat >> conftest.$ac_ext <<EOF |
| 1107 |
#if QT_VERSION < 210 |
| 1108 |
#error 1 |
| 1109 |
#endif |
| 1110 |
EOF |
| 1111 |
fi |
| 1112 |
fi |
| 1113 |
|
| 1114 |
if test "$kde_qtver" = "3"; then |
| 1115 |
cat >> conftest.$ac_ext <<EOF |
| 1116 |
#include <qcursor.h> |
| 1117 |
#include <qstylefactory.h> |
| 1118 |
#include <private/qucomextra_p.h> |
| 1119 |
EOF |
| 1120 |
fi |
| 1121 |
|
| 1122 |
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext |
| 1123 |
cat >> conftest.$ac_ext <<EOF |
| 1124 |
#error 1 |
| 1125 |
#endif |
| 1126 |
|
| 1127 |
int main() { |
| 1128 |
EOF |
| 1129 |
if test "$kde_qtver" = "2"; then |
| 1130 |
cat >> conftest.$ac_ext <<EOF |
| 1131 |
QStringList *t = new QStringList(); |
| 1132 |
Q_UNUSED(t); |
| 1133 |
EOF |
| 1134 |
if test $kde_qtsubver -gt 0; then |
| 1135 |
cat >> conftest.$ac_ext <<EOF |
| 1136 |
QString s; |
| 1137 |
s.setLatin1("Elvis is alive", 14); |
| 1138 |
EOF |
| 1139 |
fi |
| 1140 |
fi |
| 1141 |
if test "$kde_qtver" = "3"; then |
| 1142 |
cat >> conftest.$ac_ext <<EOF |
| 1143 |
(void)QStyleFactory::create(QString::null); |
| 1144 |
QCursor c(Qt::WhatsThisCursor); |
| 1145 |
EOF |
| 1146 |
fi |
| 1147 |
cat >> conftest.$ac_ext <<EOF |
| 1148 |
return 0; |
| 1149 |
} |
| 1150 |
EOF |
| 1151 |
]) |
| 1152 |
|
| 1153 |
AC_DEFUN([KDE_USE_QT], |
| 1154 |
[ |
| 1155 |
if test -z "$1"; then |
| 1156 |
# Current default Qt version: 3.3 |
| 1157 |
kde_qtver=3 |
| 1158 |
kde_qtsubver=3 |
| 1159 |
else |
| 1160 |
kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'` |
| 1161 |
# following is the check if subversion isnt found in passed argument |
| 1162 |
if test "$kde_qtsubver" = "$1"; then |
| 1163 |
kde_qtsubver=1 |
| 1164 |
fi |
| 1165 |
kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'` |
| 1166 |
if test "$kde_qtver" = "1"; then |
| 1167 |
kde_qtsubver=42 |
| 1168 |
fi |
| 1169 |
fi |
| 1170 |
|
| 1171 |
if test -z "$2"; then |
| 1172 |
if test "$kde_qtver" = "2"; then |
| 1173 |
if test $kde_qtsubver -gt 0; then |
| 1174 |
kde_qt_minversion=">= Qt 2.2.2" |
| 1175 |
else |
| 1176 |
kde_qt_minversion=">= Qt 2.0.2" |
| 1177 |
fi |
| 1178 |
fi |
| 1179 |
if test "$kde_qtver" = "3"; then |
| 1180 |
if test $kde_qtsubver -gt 0; then |
| 1181 |
if test $kde_qtsubver -gt 1; then |
| 1182 |
if test $kde_qtsubver -gt 2; then |
| 1183 |
kde_qt_minversion=">= Qt 3.3 and < 4.0" |
| 1184 |
else |
| 1185 |
kde_qt_minversion=">= Qt 3.2 and < 4.0" |
| 1186 |
fi |
| 1187 |
else |
| 1188 |
kde_qt_minversion=">= Qt 3.1 (20021021) and < 4.0" |
| 1189 |
fi |
| 1190 |
else |
| 1191 |
kde_qt_minversion=">= Qt 3.0 and < 4.0" |
| 1192 |
fi |
| 1193 |
fi |
| 1194 |
if test "$kde_qtver" = "1"; then |
| 1195 |
kde_qt_minversion=">= 1.42 and < 2.0" |
| 1196 |
fi |
| 1197 |
else |
| 1198 |
kde_qt_minversion="$2" |
| 1199 |
fi |
| 1200 |
|
| 1201 |
if test -z "$3"; then |
| 1202 |
if test $kde_qtver = 3; then |
| 1203 |
if test $kde_qtsubver -gt 0; then |
| 1204 |
kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000" |
| 1205 |
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` |
| 1206 |
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` |
| 1207 |
else |
| 1208 |
kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000" |
| 1209 |
fi |
| 1210 |
fi |
| 1211 |
if test $kde_qtver = 2; then |
| 1212 |
if test $kde_qtsubver -gt 0; then |
| 1213 |
kde_qt_verstring="QT_VERSION >= 222" |
| 1214 |
else |
| 1215 |
kde_qt_verstring="QT_VERSION >= 200" |
| 1216 |
fi |
| 1217 |
fi |
| 1218 |
if test $kde_qtver = 1; then |
| 1219 |
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" |
| 1220 |
fi |
| 1221 |
else |
| 1222 |
kde_qt_verstring="$3" |
| 1223 |
fi |
| 1224 |
|
| 1225 |
if test $kde_qtver = 4; then |
| 1226 |
kde_qt_dirs="$QTDIR /usr/lib/qt4 /usr/lib/qt /usr/share/qt4" |
| 1227 |
fi |
| 1228 |
if test $kde_qtver = 3; then |
| 1229 |
kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3" |
| 1230 |
fi |
| 1231 |
if test $kde_qtver = 2; then |
| 1232 |
kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt" |
| 1233 |
fi |
| 1234 |
if test $kde_qtver = 1; then |
| 1235 |
kde_qt_dirs="$QTDIR /usr/lib/qt" |
| 1236 |
fi |
| 1237 |
]) |
| 1238 |
|
| 1239 |
AC_DEFUN([KDE_CHECK_QT_DIRECT], |
| 1240 |
[ |
| 1241 |
AC_REQUIRE([KDE_USE_QT]) |
| 1242 |
AC_MSG_CHECKING([if Qt compiles without flags]) |
| 1243 |
AC_CACHE_VAL(kde_cv_qt_direct, |
| 1244 |
[ |
| 1245 |
AC_LANG_SAVE |
| 1246 |
AC_LANG_CPLUSPLUS |
| 1247 |
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH |
| 1248 |
ac_LIBRARY_PATH="$LIBRARY_PATH" |
| 1249 |
ac_cxxflags_safe="$CXXFLAGS" |
| 1250 |
ac_ldflags_safe="$LDFLAGS" |
| 1251 |
ac_libs_safe="$LIBS" |
| 1252 |
|
| 1253 |
CXXFLAGS="$CXXFLAGS -I$qt_includes" |
| 1254 |
LDFLAGS="$LDFLAGS $X_LDFLAGS" |
| 1255 |
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then |
| 1256 |
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET" |
| 1257 |
else |
| 1258 |
LIBS="$LIBQT $LIBSOCKET" |
| 1259 |
fi |
| 1260 |
LD_LIBRARY_PATH= |
| 1261 |
export LD_LIBRARY_PATH |
| 1262 |
LIBRARY_PATH= |
| 1263 |
export LIBRARY_PATH |
| 1264 |
|
| 1265 |
KDE_PRINT_QT_PROGRAM |
| 1266 |
|
| 1267 |
if AC_TRY_EVAL(ac_link) && test -s conftest; then |
| 1268 |
kde_cv_qt_direct="yes" |
| 1269 |
else |
| 1270 |
kde_cv_qt_direct="no" |
| 1271 |
echo "configure: failed program was:" >&AC_FD_CC |
| 1272 |
cat conftest.$ac_ext >&AC_FD_CC |
| 1273 |
fi |
| 1274 |
|
| 1275 |
rm -f conftest* |
| 1276 |
CXXFLAGS="$ac_cxxflags_safe" |
| 1277 |
LDFLAGS="$ac_ldflags_safe" |
| 1278 |
LIBS="$ac_libs_safe" |
| 1279 |
|
| 1280 |
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe" |
| 1281 |
export LD_LIBRARY_PATH |
| 1282 |
LIBRARY_PATH="$ac_LIBRARY_PATH" |
| 1283 |
export LIBRARY_PATH |
| 1284 |
AC_LANG_RESTORE |
| 1285 |
]) |
| 1286 |
|
| 1287 |
if test "$kde_cv_qt_direct" = "yes"; then |
| 1288 |
AC_MSG_RESULT(yes) |
| 1289 |
$1 |
| 1290 |
else |
| 1291 |
AC_MSG_RESULT(no) |
| 1292 |
$2 |
| 1293 |
fi |
| 1294 |
]) |
| 1295 |
|
| 1296 |
dnl ------------------------------------------------------------------------ |
| 1297 |
dnl Try to find the Qt headers and libraries. |
| 1298 |
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed) |
| 1299 |
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed) |
| 1300 |
dnl ------------------------------------------------------------------------ |
| 1301 |
dnl |
| 1302 |
AC_DEFUN([AC_PATH_QT_1_3], |
| 1303 |
[ |
| 1304 |
AC_REQUIRE([K_PATH_X]) |
| 1305 |
AC_REQUIRE([KDE_USE_QT]) |
| 1306 |
AC_REQUIRE([KDE_CHECK_LIB64]) |
| 1307 |
|
| 1308 |
dnl ------------------------------------------------------------------------ |
| 1309 |
dnl Add configure flag to enable linking to MT version of Qt library. |
| 1310 |
dnl ------------------------------------------------------------------------ |
| 1311 |
|
| 1312 |
AC_ARG_ENABLE( |
| 1313 |
mt, |
| 1314 |
AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]), |
| 1315 |
kde_use_qt_mt=$enableval, |
| 1316 |
[ |
| 1317 |
if test $kde_qtver = 3; then |
| 1318 |
kde_use_qt_mt=yes |
| 1319 |
else |
| 1320 |
kde_use_qt_mt=no |
| 1321 |
fi |
| 1322 |
] |
| 1323 |
) |
| 1324 |
|
| 1325 |
USING_QT_MT="" |
| 1326 |
|
| 1327 |
dnl ------------------------------------------------------------------------ |
| 1328 |
dnl If we not get --disable-qt-mt then adjust some vars for the host. |
| 1329 |
dnl ------------------------------------------------------------------------ |
| 1330 |
|
| 1331 |
KDE_MT_LDFLAGS= |
| 1332 |
KDE_MT_LIBS= |
| 1333 |
if test "x$kde_use_qt_mt" = "xyes"; then |
| 1334 |
KDE_CHECK_THREADING |
| 1335 |
if test "x$kde_use_threading" = "xyes"; then |
| 1336 |
CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS" |
| 1337 |
KDE_MT_LDFLAGS="$USE_THREADS" |
| 1338 |
KDE_MT_LIBS="$LIBPTHREAD" |
| 1339 |
else |
| 1340 |
kde_use_qt_mt=no |
| 1341 |
fi |
| 1342 |
fi |
| 1343 |
AC_SUBST(KDE_MT_LDFLAGS) |
| 1344 |
AC_SUBST(KDE_MT_LIBS) |
| 1345 |
|
| 1346 |
kde_qt_was_given=yes |
| 1347 |
|
| 1348 |
dnl ------------------------------------------------------------------------ |
| 1349 |
dnl If we haven't been told how to link to Qt, we work it out for ourselves. |
| 1350 |
dnl ------------------------------------------------------------------------ |
| 1351 |
if test -z "$LIBQT_GLOB"; then |
| 1352 |
if test "x$kde_use_qt_emb" = "xyes"; then |
| 1353 |
LIBQT_GLOB="libqte.*" |
| 1354 |
else |
| 1355 |
LIBQT_GLOB="libqt.*" |
| 1356 |
fi |
| 1357 |
fi |
| 1358 |
|
| 1359 |
dnl ------------------------------------------------------------ |
| 1360 |
dnl If we got --enable-embedded then adjust the Qt library name. |
| 1361 |
dnl ------------------------------------------------------------ |
| 1362 |
if test "x$kde_use_qt_emb" = "xyes"; then |
| 1363 |
qtlib="qte" |
| 1364 |
else |
| 1365 |
qtlib="qt" |
| 1366 |
fi |
| 1367 |
|
| 1368 |
kde_int_qt="-l$qtlib" |
| 1369 |
|
| 1370 |
if test -z "$LIBQPE"; then |
| 1371 |
dnl ------------------------------------------------------------ |
| 1372 |
dnl If we got --enable-palmtop then add -lqpe to the link line |
| 1373 |
dnl ------------------------------------------------------------ |
| 1374 |
if test "x$kde_use_qt_emb" = "xyes"; then |
| 1375 |
if test "x$kde_use_qt_emb_palm" = "xyes"; then |
| 1376 |
LIB_QPE="-lqpe" |
| 1377 |
else |
| 1378 |
LIB_QPE="" |
| 1379 |
fi |
| 1380 |
else |
| 1381 |
LIB_QPE="" |
| 1382 |
fi |
| 1383 |
fi |
| 1384 |
|
| 1385 |
dnl ------------------------------------------------------------------------ |
| 1386 |
dnl If we got --enable-qt-mt then adjust the Qt library name for the host. |
| 1387 |
dnl ------------------------------------------------------------------------ |
| 1388 |
|
| 1389 |
if test "x$kde_use_qt_mt" = "xyes"; then |
| 1390 |
LIBQT="-l$qtlib-mt" |
| 1391 |
kde_int_qt="-l$qtlib-mt" |
| 1392 |
LIBQT_GLOB="lib$qtlib-mt.*" |
| 1393 |
USING_QT_MT="using -mt" |
| 1394 |
else |
| 1395 |
LIBQT="-l$qtlib" |
| 1396 |
fi |
| 1397 |
|
| 1398 |
if test $kde_qtver != 1; then |
| 1399 |
|
| 1400 |
AC_REQUIRE([AC_FIND_PNG]) |
| 1401 |
AC_REQUIRE([AC_FIND_JPEG]) |
| 1402 |
LIBQT="$LIBQT $LIBPNG $LIBJPEG" |
| 1403 |
fi |
| 1404 |
|
| 1405 |
if test $kde_qtver = 3; then |
| 1406 |
AC_REQUIRE([KDE_CHECK_LIBDL]) |
| 1407 |
LIBQT="$LIBQT $LIBDL" |
| 1408 |
fi |
| 1409 |
|
| 1410 |
AC_MSG_CHECKING([for Qt]) |
| 1411 |
|
| 1412 |
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then |
| 1413 |
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET" |
| 1414 |
fi |
| 1415 |
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO |
| 1416 |
qt_libraries="" |
| 1417 |
qt_includes="" |
| 1418 |
AC_ARG_WITH(qt-dir, |
| 1419 |
AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]), |
| 1420 |
[ ac_qt_includes="$withval"/include |
| 1421 |
ac_qt_libraries="$withval"/lib${kdelibsuff} |
| 1422 |
ac_qt_bindir="$withval"/bin |
| 1423 |
]) |
| 1424 |
|
| 1425 |
AC_ARG_WITH(qt-includes, |
| 1426 |
AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]), |
| 1427 |
[ |
| 1428 |
ac_qt_includes="$withval" |
| 1429 |
]) |
| 1430 |
|
| 1431 |
kde_qt_libs_given=no |
| 1432 |
|
| 1433 |
AC_ARG_WITH(qt-libraries, |
| 1434 |
AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]), |
| 1435 |
[ ac_qt_libraries="$withval" |
| 1436 |
kde_qt_libs_given=yes |
| 1437 |
]) |
| 1438 |
|
| 1439 |
AC_CACHE_VAL(ac_cv_have_qt, |
| 1440 |
[#try to guess Qt locations |
| 1441 |
|
| 1442 |
qt_incdirs="" |
| 1443 |
for dir in $kde_qt_dirs; do |
| 1444 |
qt_incdirs="$qt_incdirs $dir/include $dir" |
| 1445 |
done |
| 1446 |
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 /usr/include/qt3 $x_includes" |
| 1447 |
if test ! "$ac_qt_includes" = "NO"; then |
| 1448 |
qt_incdirs="$ac_qt_includes $qt_incdirs" |
| 1449 |
fi |
| 1450 |
|
| 1451 |
if test "$kde_qtver" != "1"; then |
| 1452 |
kde_qt_header=qstyle.h |
| 1453 |
else |
| 1454 |
kde_qt_header=qglobal.h |
| 1455 |
fi |
| 1456 |
|
| 1457 |
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) |
| 1458 |
ac_qt_includes="$qt_incdir" |
| 1459 |
|
| 1460 |
qt_libdirs="" |
| 1461 |
for dir in $kde_qt_dirs; do |
| 1462 |
qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir" |
| 1463 |
done |
| 1464 |
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries" |
| 1465 |
if test ! "$ac_qt_libraries" = "NO"; then |
| 1466 |
qt_libdir=$ac_qt_libraries |
| 1467 |
else |
| 1468 |
qt_libdirs="$ac_qt_libraries $qt_libdirs" |
| 1469 |
# if the Qt was given, the chance is too big that libqt.* doesn't exist |
| 1470 |
qt_libdir=NONE |
| 1471 |
for dir in $qt_libdirs; do |
| 1472 |
try="ls -1 $dir/${LIBQT_GLOB}" |
| 1473 |
if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi |
| 1474 |
done |
| 1475 |
fi |
| 1476 |
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do |
| 1477 |
if test -e "$a"; then |
| 1478 |
LIBQT="$LIBQT ${kde_int_qt}_incremental" |
| 1479 |
break |
| 1480 |
fi |
| 1481 |
done |
| 1482 |
|
| 1483 |
ac_qt_libraries="$qt_libdir" |
| 1484 |
|
| 1485 |
AC_LANG_SAVE |
| 1486 |
AC_LANG_CPLUSPLUS |
| 1487 |
|
| 1488 |
ac_cxxflags_safe="$CXXFLAGS" |
| 1489 |
ac_ldflags_safe="$LDFLAGS" |
| 1490 |
ac_libs_safe="$LIBS" |
| 1491 |
|
| 1492 |
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" |
| 1493 |
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS" |
| 1494 |
LIBS="$LIBS $LIBQT $KDE_MT_LIBS" |
| 1495 |
|
| 1496 |
KDE_PRINT_QT_PROGRAM |
| 1497 |
|
| 1498 |
if AC_TRY_EVAL(ac_link) && test -s conftest; then |
| 1499 |
rm -f conftest* |
| 1500 |
else |
| 1501 |
echo "configure: failed program was:" >&AC_FD_CC |
| 1502 |
cat conftest.$ac_ext >&AC_FD_CC |
| 1503 |
ac_qt_libraries="NO" |
| 1504 |
fi |
| 1505 |
rm -f conftest* |
| 1506 |
CXXFLAGS="$ac_cxxflags_safe" |
| 1507 |
LDFLAGS="$ac_ldflags_safe" |
| 1508 |
LIBS="$ac_libs_safe" |
| 1509 |
|
| 1510 |
AC_LANG_RESTORE |
| 1511 |
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then |
| 1512 |
ac_cv_have_qt="have_qt=no" |
| 1513 |
ac_qt_notfound="" |
| 1514 |
missing_qt_mt="" |
| 1515 |
if test "$ac_qt_includes" = NO; then |
| 1516 |
if test "$ac_qt_libraries" = NO; then |
| 1517 |
ac_qt_notfound="(headers and libraries)"; |
| 1518 |
else |
| 1519 |
ac_qt_notfound="(headers)"; |
| 1520 |
fi |
| 1521 |
else |
| 1522 |
if test "x$kde_use_qt_mt" = "xyes"; then |
| 1523 |
missing_qt_mt=" |
| 1524 |
Make sure that you have compiled Qt with thread support!" |
| 1525 |
ac_qt_notfound="(library $qtlib-mt)"; |
| 1526 |
else |
| 1527 |
ac_qt_notfound="(library $qtlib)"; |
| 1528 |
fi |
| 1529 |
fi |
| 1530 |
|
| 1531 |
AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation! |
| 1532 |
For more details about this problem, look at the end of config.log.$missing_qt_mt]) |
| 1533 |
else |
| 1534 |
have_qt="yes" |
| 1535 |
fi |
| 1536 |
]) |
| 1537 |
|
| 1538 |
eval "$ac_cv_have_qt" |
| 1539 |
|
| 1540 |
if test "$have_qt" != yes; then |
| 1541 |
AC_MSG_RESULT([$have_qt]); |
| 1542 |
else |
| 1543 |
ac_cv_have_qt="have_qt=yes \ |
| 1544 |
ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries" |
| 1545 |
AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT]) |
| 1546 |
|
| 1547 |
qt_libraries="$ac_qt_libraries" |
| 1548 |
qt_includes="$ac_qt_includes" |
| 1549 |
fi |
| 1550 |
|
| 1551 |
if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then |
| 1552 |
KDE_CHECK_QT_DIRECT(qt_libraries= ,[]) |
| 1553 |
fi |
| 1554 |
|
| 1555 |
AC_SUBST(qt_libraries) |
| 1556 |
AC_SUBST(qt_includes) |
| 1557 |
|
| 1558 |
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then |
| 1559 |
QT_INCLUDES="" |
| 1560 |
else |
| 1561 |
QT_INCLUDES="-I$qt_includes" |
| 1562 |
all_includes="$QT_INCLUDES $all_includes" |
| 1563 |
fi |
| 1564 |
|
| 1565 |
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then |
| 1566 |
QT_LDFLAGS="" |
| 1567 |
else |
| 1568 |
QT_LDFLAGS="-L$qt_libraries" |
| 1569 |
all_libraries="$QT_LDFLAGS $all_libraries" |
| 1570 |
fi |
| 1571 |
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS" |
| 1572 |
|
| 1573 |
AC_SUBST(QT_INCLUDES) |
| 1574 |
AC_SUBST(QT_LDFLAGS) |
| 1575 |
AC_PATH_QT_MOC_UIC |
| 1576 |
|
| 1577 |
KDE_CHECK_QT_JPEG |
| 1578 |
|
| 1579 |
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then |
| 1580 |
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)' |
| 1581 |
else |
| 1582 |
LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)' |
| 1583 |
fi |
| 1584 |
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS" |
| 1585 |
for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do |
| 1586 |
if test -e "$a"; then |
| 1587 |
LIB_QT="$LIB_QT ${kde_int_qt}_incremental" |
| 1588 |
break |
| 1589 |
fi |
| 1590 |
done |
| 1591 |
|
| 1592 |
AC_SUBST(LIB_QT) |
| 1593 |
AC_SUBST(LIB_QPE) |
| 1594 |
|
| 1595 |
AC_SUBST(kde_qtver) |
| 1596 |
]) |
| 1597 |
|
| 1598 |
AC_DEFUN([AC_PATH_QT], |
| 1599 |
[ |
| 1600 |
AC_PATH_QT_1_3 |
| 1601 |
]) |
| 1602 |
|
| 1603 |
AC_DEFUN([KDE_CHECK_UIC_PLUGINS], |
| 1604 |
[ |
| 1605 |
AC_REQUIRE([AC_PATH_QT_MOC_UIC]) |
| 1606 |
|
| 1607 |
if test x$ac_uic_supports_libpath = xyes; then |
| 1608 |
|
| 1609 |
AC_MSG_CHECKING([if UIC has KDE plugins available]) |
| 1610 |
AC_CACHE_VAL(kde_cv_uic_plugins, |
| 1611 |
[ |
| 1612 |
cat > actest.ui << EOF |
| 1613 |
<!DOCTYPE UI><UI version="3.0" stdsetdef="1"> |
| 1614 |
<class>NewConnectionDialog</class> |
| 1615 |
<widget class="QDialog"> |
| 1616 |
<widget class="KLineEdit"> |
| 1617 |
<property name="name"> |
| 1618 |
<cstring>testInput</cstring> |
| 1619 |
</property> |
| 1620 |
</widget> |
| 1621 |
</widget> |
| 1622 |
</UI> |
| 1623 |
EOF |
| 1624 |
|
| 1625 |
|
| 1626 |
|
| 1627 |
kde_cv_uic_plugins=no |
| 1628 |
kde_line="$UIC_PATH -L $kde_widgetdir" |
| 1629 |
if test x$ac_uic_supports_nounload = xyes; then |
| 1630 |
kde_line="$kde_line -nounload" |
| 1631 |
fi |
| 1632 |
kde_line="$kde_line -impl actest.h actest.ui > actest.cpp" |
| 1633 |
if AC_TRY_EVAL(kde_line); then |
| 1634 |
# if you're trying to debug this check and think it's incorrect, |
| 1635 |
# better check your installation. The check _is_ correct - your |
| 1636 |
# installation is not. |
| 1637 |
if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then |
| 1638 |
kde_cv_uic_plugins=yes |
| 1639 |
fi |
| 1640 |
fi |
| 1641 |
rm -f actest.ui actest.cpp |
| 1642 |
]) |
| 1643 |
|
| 1644 |
AC_MSG_RESULT([$kde_cv_uic_plugins]) |
| 1645 |
if test "$kde_cv_uic_plugins" != yes; then |
| 1646 |
AC_MSG_ERROR([ |
| 1647 |
you need to install kdelibs first. |
| 1648 |
|
| 1649 |
If you did install kdelibs, then the Qt version that is picked up by |
| 1650 |
this configure is not the same version you used to compile kdelibs. |
| 1651 |
The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the |
| 1652 |
_same Qt version_, compiled with the _same compiler_ and the same Qt |
| 1653 |
configuration settings. |
| 1654 |
]) |
| 1655 |
fi |
| 1656 |
fi |
| 1657 |
]) |
| 1658 |
|
| 1659 |
AC_DEFUN([KDE_CHECK_FINAL], |
| 1660 |
[ |
| 1661 |
AC_ARG_ENABLE(final, |
| 1662 |
AC_HELP_STRING([--enable-final], |
| 1663 |
[build size optimized apps (experimental - needs lots of memory)]), |
| 1664 |
kde_use_final=$enableval, kde_use_final=no) |
| 1665 |
|
| 1666 |
if test "x$kde_use_final" = "xyes"; then |
| 1667 |
KDE_USE_FINAL_TRUE="" |
| 1668 |
KDE_USE_FINAL_FALSE="#" |
| 1669 |
else |
| 1670 |
KDE_USE_FINAL_TRUE="#" |
| 1671 |
KDE_USE_FINAL_FALSE="" |
| 1672 |
fi |
| 1673 |
AC_SUBST(KDE_USE_FINAL_TRUE) |
| 1674 |
AC_SUBST(KDE_USE_FINAL_FALSE) |
| 1675 |
]) |
| 1676 |
|
| 1677 |
AC_DEFUN([KDE_CHECK_CLOSURE], |
| 1678 |
[ |
| 1679 |
AC_ARG_ENABLE(closure, |
| 1680 |
AC_HELP_STRING([--enable-closure],[delay template instantiation]), |
| 1681 |
kde_use_closure=$enableval, kde_use_closure=no) |
| 1682 |
|
| 1683 |
KDE_NO_UNDEFINED="" |
| 1684 |
if test "x$kde_use_closure" = "xyes"; then |
| 1685 |
KDE_USE_CLOSURE_TRUE="" |
| 1686 |
KDE_USE_CLOSURE_FALSE="#" |
| 1687 |
# CXXFLAGS="$CXXFLAGS $REPO" |
| 1688 |
else |
| 1689 |
KDE_USE_CLOSURE_TRUE="#" |
| 1690 |
KDE_USE_CLOSURE_FALSE="" |
| 1691 |
KDE_NO_UNDEFINED="" |
| 1692 |
fi |
| 1693 |
AC_SUBST(KDE_USE_CLOSURE_TRUE) |
| 1694 |
AC_SUBST(KDE_USE_CLOSURE_FALSE) |
| 1695 |
AC_SUBST(KDE_NO_UNDEFINED) |
| 1696 |
]) |
| 1697 |
|
| 1698 |
dnl Check if the linker supports --enable-new-dtags and --as-needed |
| 1699 |
AC_DEFUN([KDE_CHECK_NEW_LDFLAGS], |
| 1700 |
[ |
| 1701 |
AC_ARG_ENABLE(new_ldflags, |
| 1702 |
AC_HELP_STRING([--enable-new-ldflags], |
| 1703 |
[enable the new linker flags]), |
| 1704 |
kde_use_new_ldflags=$enableval, |
| 1705 |
kde_use_new_ldflags=no) |
| 1706 |
|
| 1707 |
LDFLAGS_AS_NEEDED="" |
| 1708 |
LDFLAGS_NEW_DTAGS="" |
| 1709 |
if test "x$kde_use_new_ldflags" = "xyes"; then |
| 1710 |
LDFLAGS_NEW_DTAGS="" |
| 1711 |
KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags], |
| 1712 |
[LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],) |
| 1713 |
|
| 1714 |
KDE_CHECK_COMPILER_FLAG([Wl,--as-needed], |
| 1715 |
[LDFLAGS_AS_NEEDED="-Wl,--as-needed"],) |
| 1716 |
fi |
| 1717 |
AC_SUBST(LDFLAGS_AS_NEEDED) |
| 1718 |
AC_SUBST(LDFLAGS_NEW_DTAGS) |
| 1719 |
]) |
| 1720 |
|
| 1721 |
AC_DEFUN([KDE_CHECK_NMCHECK], |
| 1722 |
[ |
| 1723 |
AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]), |
| 1724 |
kde_use_nmcheck=$enableval, kde_use_nmcheck=no) |
| 1725 |
|
| 1726 |
if test "$kde_use_nmcheck" = "yes"; then |
| 1727 |
KDE_USE_NMCHECK_TRUE="" |
| 1728 |
KDE_USE_NMCHECK_FALSE="#" |
| 1729 |
else |
| 1730 |
KDE_USE_NMCHECK_TRUE="#" |
| 1731 |
KDE_USE_NMCHECK_FALSE="" |
| 1732 |
fi |
| 1733 |
AC_SUBST(KDE_USE_NMCHECK_TRUE) |
| 1734 |
AC_SUBST(KDE_USE_NMCHECK_FALSE) |
| 1735 |
]) |
| 1736 |
|
| 1737 |
AC_DEFUN([KDE_EXPAND_MAKEVAR], [ |
| 1738 |
savex=$exec_prefix |
| 1739 |
test "x$exec_prefix" = xNONE && exec_prefix=$prefix |
| 1740 |
tmp=$$2 |
| 1741 |
while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done |
| 1742 |
exec_prefix=$savex |
| 1743 |
]) |
| 1744 |
|
| 1745 |
dnl ------------------------------------------------------------------------ |
| 1746 |
dnl Now, the same with KDE |
| 1747 |
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed) |
| 1748 |
dnl and $(kde_includes) will be the kdehdrlocation (if needed) |
| 1749 |
dnl ------------------------------------------------------------------------ |
| 1750 |
dnl |
| 1751 |
AC_DEFUN([AC_BASE_PATH_KDE], |
| 1752 |
[ |
| 1753 |
AC_REQUIRE([KDE_CHECK_STL]) |
| 1754 |
AC_REQUIRE([AC_PATH_QT])dnl |
| 1755 |
AC_REQUIRE([KDE_CHECK_LIB64]) |
| 1756 |
|
| 1757 |
AC_CHECK_RPATH |
| 1758 |
AC_MSG_CHECKING([for KDE]) |
| 1759 |
|
| 1760 |
if test "${prefix}" != NONE; then |
| 1761 |
kde_includes=${includedir} |
| 1762 |
KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir) |
| 1763 |
|
| 1764 |
kde_libraries=${libdir} |
| 1765 |
KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir) |
| 1766 |
|
| 1767 |
else |
| 1768 |
ac_kde_includes= |
| 1769 |
ac_kde_libraries= |
| 1770 |
kde_libraries="" |
| 1771 |
kde_includes="" |
| 1772 |
fi |
| 1773 |
|
| 1774 |
AC_CACHE_VAL(ac_cv_have_kde, |
| 1775 |
[#try to guess kde locations |
| 1776 |
|
| 1777 |
if test "$kde_qtver" = 1; then |
| 1778 |
kde_check_header="ksock.h" |
| 1779 |
kde_check_lib="libkdecore.la" |
| 1780 |
else |
| 1781 |
kde_check_header="ksharedptr.h" |
| 1782 |
kde_check_lib="libkio.la" |
| 1783 |
fi |
| 1784 |
|
| 1785 |
if test -z "$1"; then |
| 1786 |
|
| 1787 |
kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/trinity/include /opt/kde/include $x_includes $qt_includes" |
| 1788 |
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs" |
| 1789 |
kde_incdirs="$ac_kde_includes $kde_incdirs" |
| 1790 |
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir) |
| 1791 |
ac_kde_includes="$kde_incdir" |
| 1792 |
|
| 1793 |
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then |
| 1794 |
AC_MSG_ERROR([ |
| 1795 |
in the prefix, you've chosen, are no KDE headers installed. This will fail. |
| 1796 |
So, check this please and use another prefix!]) |
| 1797 |
fi |
| 1798 |
|
| 1799 |
kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/trinity /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/trinity/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}" |
| 1800 |
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs" |
| 1801 |
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs" |
| 1802 |
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir) |
| 1803 |
ac_kde_libraries="$kde_libdir" |
| 1804 |
|
| 1805 |
kde_widgetdir=NO |
| 1806 |
dnl this might be somewhere else |
| 1807 |
AC_FIND_FILE("trinity/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir) |
| 1808 |
|
| 1809 |
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then |
| 1810 |
AC_MSG_ERROR([ |
| 1811 |
in the prefix, you've chosen, are no KDE libraries installed. This will fail. |
| 1812 |
So, check this please and use another prefix!]) |
| 1813 |
fi |
| 1814 |
|
| 1815 |
if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/trinity/plugins/designer/kdewidgets.la"; then |
| 1816 |
AC_MSG_ERROR([ |
| 1817 |
I can't find the designer plugins. These are required and should have been installed |
| 1818 |
by kdelibs]) |
| 1819 |
fi |
| 1820 |
|
| 1821 |
if test -n "$kde_widgetdir"; then |
| 1822 |
kde_widgetdir="$kde_widgetdir/trinity/plugins/designer" |
| 1823 |
fi |
| 1824 |
|
| 1825 |
|
| 1826 |
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then |
| 1827 |
ac_cv_have_kde="have_kde=no" |
| 1828 |
else |
| 1829 |
ac_cv_have_kde="have_kde=yes \ |
| 1830 |
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries" |
| 1831 |
fi |
| 1832 |
|
| 1833 |
else dnl test -z $1, e.g. from kdelibs |
| 1834 |
|
| 1835 |
ac_cv_have_kde="have_kde=no" |
| 1836 |
|
| 1837 |
fi |
| 1838 |
])dnl |
| 1839 |
|
| 1840 |
eval "$ac_cv_have_kde" |
| 1841 |
|
| 1842 |
if test "$have_kde" != "yes"; then |
| 1843 |
if test "${prefix}" = NONE; then |
| 1844 |
ac_kde_prefix="$ac_default_prefix" |
| 1845 |
else |
| 1846 |
ac_kde_prefix="$prefix" |
| 1847 |
fi |
| 1848 |
if test "$exec_prefix" = NONE; then |
| 1849 |
ac_kde_exec_prefix="$ac_kde_prefix" |
| 1850 |
AC_MSG_RESULT([will be installed in $ac_kde_prefix]) |
| 1851 |
else |
| 1852 |
ac_kde_exec_prefix="$exec_prefix" |
| 1853 |
AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix]) |
| 1854 |
fi |
| 1855 |
|
| 1856 |
kde_libraries="${libdir}" |
| 1857 |
kde_includes="${includedir}" |
| 1858 |
|
| 1859 |
else |
| 1860 |
ac_cv_have_kde="have_kde=yes \ |
| 1861 |
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries" |
| 1862 |
AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes]) |
| 1863 |
|
| 1864 |
kde_libraries="$ac_kde_libraries" |
| 1865 |
kde_includes="$ac_kde_includes" |
| 1866 |
fi |
| 1867 |
AC_SUBST(kde_libraries) |
| 1868 |
AC_SUBST(kde_includes) |
| 1869 |
|
| 1870 |
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then |
| 1871 |
KDE_INCLUDES="" |
| 1872 |
else |
| 1873 |
KDE_INCLUDES="-I$kde_includes" |
| 1874 |
all_includes="$KDE_INCLUDES $all_includes" |
| 1875 |
fi |
| 1876 |
|
| 1877 |
KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION" |
| 1878 |
|
| 1879 |
KDE_LDFLAGS="-L$kde_libraries" |
| 1880 |
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then |
| 1881 |
all_libraries="$KDE_LDFLAGS $all_libraries" |
| 1882 |
fi |
| 1883 |
|
| 1884 |
AC_SUBST(KDE_LDFLAGS) |
| 1885 |
AC_SUBST(KDE_INCLUDES) |
| 1886 |
|
| 1887 |
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 1888 |
|
| 1889 |
all_libraries="$all_libraries $USER_LDFLAGS" |
| 1890 |
all_includes="$all_includes $USER_INCLUDES" |
| 1891 |
AC_SUBST(all_includes) |
| 1892 |
AC_SUBST(all_libraries) |
| 1893 |
|
| 1894 |
if test -z "$1"; then |
| 1895 |
KDE_CHECK_UIC_PLUGINS |
| 1896 |
fi |
| 1897 |
|
| 1898 |
ac_kde_libraries="$kde_libdir" |
| 1899 |
|
| 1900 |
AC_SUBST(AUTODIRS) |
| 1901 |
|
| 1902 |
|
| 1903 |
]) |
| 1904 |
|
| 1905 |
AC_DEFUN([KDE_CHECK_EXTRA_LIBS], |
| 1906 |
[ |
| 1907 |
AC_MSG_CHECKING(for extra includes) |
| 1908 |
AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]), |
| 1909 |
kde_use_extra_includes="$withval", |
| 1910 |
kde_use_extra_includes=NONE |
| 1911 |
) |
| 1912 |
kde_extra_includes= |
| 1913 |
if test -n "$kde_use_extra_includes" && \ |
| 1914 |
test "$kde_use_extra_includes" != "NONE"; then |
| 1915 |
|
| 1916 |
ac_save_ifs=$IFS |
| 1917 |
IFS=':' |
| 1918 |
for dir in $kde_use_extra_includes; do |
| 1919 |
kde_extra_includes="$kde_extra_includes $dir" |
| 1920 |
USER_INCLUDES="$USER_INCLUDES -I$dir" |
| 1921 |
done |
| 1922 |
IFS=$ac_save_ifs |
| 1923 |
kde_use_extra_includes="added" |
| 1924 |
else |
| 1925 |
kde_use_extra_includes="no" |
| 1926 |
fi |
| 1927 |
AC_SUBST(USER_INCLUDES) |
| 1928 |
|
| 1929 |
AC_MSG_RESULT($kde_use_extra_includes) |
| 1930 |
|
| 1931 |
kde_extra_libs= |
| 1932 |
AC_MSG_CHECKING(for extra libs) |
| 1933 |
AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]), |
| 1934 |
kde_use_extra_libs=$withval, |
| 1935 |
kde_use_extra_libs=NONE |
| 1936 |
) |
| 1937 |
if test -n "$kde_use_extra_libs" && \ |
| 1938 |
test "$kde_use_extra_libs" != "NONE"; then |
| 1939 |
|
| 1940 |
ac_save_ifs=$IFS |
| 1941 |
IFS=':' |
| 1942 |
for dir in $kde_use_extra_libs; do |
| 1943 |
kde_extra_libs="$kde_extra_libs $dir" |
| 1944 |
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir" |
| 1945 |
USER_LDFLAGS="$USER_LDFLAGS -L$dir" |
| 1946 |
done |
| 1947 |
IFS=$ac_save_ifs |
| 1948 |
kde_use_extra_libs="added" |
| 1949 |
else |
| 1950 |
kde_use_extra_libs="no" |
| 1951 |
fi |
| 1952 |
|
| 1953 |
AC_SUBST(USER_LDFLAGS) |
| 1954 |
|
| 1955 |
AC_MSG_RESULT($kde_use_extra_libs) |
| 1956 |
|
| 1957 |
]) |
| 1958 |
|
| 1959 |
AC_DEFUN([KDE_1_CHECK_PATH_HEADERS], |
| 1960 |
[ |
| 1961 |
AC_MSG_CHECKING([for KDE headers installed]) |
| 1962 |
AC_LANG_SAVE |
| 1963 |
AC_LANG_CPLUSPLUS |
| 1964 |
cat > conftest.$ac_ext <<EOF |
| 1965 |
#ifdef STDC_HEADERS |
| 1966 |
# include <stdlib.h> |
| 1967 |
#endif |
| 1968 |
#include <stdio.h> |
| 1969 |
#include "confdefs.h" |
| 1970 |
#include <kapp.h> |
| 1971 |
|
| 1972 |
int main() { |
| 1973 |
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data()); |
| 1974 |
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data()); |
| 1975 |
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data()); |
| 1976 |
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data()); |
| 1977 |
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data()); |
| 1978 |
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data()); |
| 1979 |
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data()); |
| 1980 |
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data()); |
| 1981 |
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data()); |
| 1982 |
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data()); |
| 1983 |
printf("kde_wallpaperdir=\\"%s\\"\n", |
| 1984 |
KApplication::kde_wallpaperdir().data()); |
| 1985 |
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data()); |
| 1986 |
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data()); |
| 1987 |
printf("kde_servicesdir=\\"/tmp/dummy\\"\n"); |
| 1988 |
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n"); |
| 1989 |
printf("kde_moduledir=\\"/tmp/dummy\\"\n"); |
| 1990 |
printf("kde_styledir=\\"/tmp/dummy\\"\n"); |
| 1991 |
printf("kde_widgetdir=\\"/tmp/dummy\\"\n"); |
| 1992 |
printf("xdg_appsdir=\\"/tmp/dummy\\"\n"); |
| 1993 |
printf("xdg_menudir=\\"/tmp/dummy\\"\n"); |
| 1994 |
printf("xdg_directorydir=\\"/tmp/dummy\\"\n"); |
| 1995 |
printf("kde_kcfgdir=\\"/tmp/dummy\\"\n"); |
| 1996 |
return 0; |
| 1997 |
} |
| 1998 |
EOF |
| 1999 |
|
| 2000 |
ac_save_CPPFLAGS=$CPPFLAGS |
| 2001 |
CPPFLAGS="$all_includes $CPPFLAGS" |
| 2002 |
if AC_TRY_EVAL(ac_compile); then |
| 2003 |
AC_MSG_RESULT(yes) |
| 2004 |
else |
| 2005 |
AC_MSG_ERROR([your system is not able to compile a small KDE application! |
| 2006 |
Check, if you installed the KDE header files correctly. |
| 2007 |
For more details about this problem, look at the end of config.log.]) |
| 2008 |
fi |
| 2009 |
CPPFLAGS=$ac_save_CPPFLAGS |
| 2010 |
|
| 2011 |
AC_LANG_RESTORE |
| 2012 |
]) |
| 2013 |
|
| 2014 |
AC_DEFUN([KDE_CHECK_KDEQTADDON], |
| 2015 |
[ |
| 2016 |
AC_MSG_CHECKING(for kde-qt-addon) |
| 2017 |
AC_CACHE_VAL(kde_cv_have_kdeqtaddon, |
| 2018 |
[ |
| 2019 |
kde_ldflags_safe="$LDFLAGS" |
| 2020 |
kde_libs_safe="$LIBS" |
| 2021 |
kde_cxxflags_safe="$CXXFLAGS" |
| 2022 |
|
| 2023 |
LIBS="-lkde-qt-addon $LIBQT $LIBS" |
| 2024 |
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes" |
| 2025 |
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS" |
| 2026 |
|
| 2027 |
AC_TRY_LINK([ |
| 2028 |
#include <qdom.h> |
| 2029 |
], |
| 2030 |
[ |
| 2031 |
QDomDocument doc; |
| 2032 |
], |
| 2033 |
kde_cv_have_kdeqtaddon=yes, |
| 2034 |
kde_cv_have_kdeqtaddon=no |
| 2035 |
) |
| 2036 |
|
| 2037 |
LDFLAGS=$kde_ldflags_safe |
| 2038 |
LIBS=$kde_libs_safe |
| 2039 |
CXXFLAGS=$kde_cxxflags_safe |
| 2040 |
]) |
| 2041 |
|
| 2042 |
AC_MSG_RESULT($kde_cv_have_kdeqtaddon) |
| 2043 |
|
| 2044 |
if test "$kde_cv_have_kdeqtaddon" = "no"; then |
| 2045 |
AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first. |
| 2046 |
It is a separate package (and CVS module) named kde-qt-addon.]) |
| 2047 |
fi |
| 2048 |
]) |
| 2049 |
|
| 2050 |
AC_DEFUN([KDE_CREATE_LIBS_ALIASES], |
| 2051 |
[ |
| 2052 |
AC_REQUIRE([KDE_MISC_TESTS]) |
| 2053 |
AC_REQUIRE([KDE_CHECK_LIBDL]) |
| 2054 |
AC_REQUIRE([K_PATH_X]) |
| 2055 |
|
| 2056 |
if test $kde_qtver = 3; then |
| 2057 |
case $host in |
| 2058 |
*cygwin*) lib_kded="-lkdeinit_kded" ;; |
| 2059 |
*) lib_kded="" ;; |
| 2060 |
esac |
| 2061 |
AC_SUBST(LIB_KDED, $lib_kded) |
| 2062 |
AC_SUBST(LIB_KDECORE, "-lkdecore") |
| 2063 |
AC_SUBST(LIB_KDEUI, "-lkdeui") |
| 2064 |
AC_SUBST(LIB_KIO, "-lkio") |
| 2065 |
AC_SUBST(LIB_KJS, "-lkjs") |
| 2066 |
AC_SUBST(LIB_SMB, "-lsmb") |
| 2067 |
AC_SUBST(LIB_KAB, "-lkab") |
| 2068 |
AC_SUBST(LIB_KABC, "-lkabc") |
| 2069 |
AC_SUBST(LIB_KHTML, "-lkhtml") |
| 2070 |
AC_SUBST(LIB_KSPELL, "-lkspell") |
| 2071 |
AC_SUBST(LIB_KPARTS, "-lkparts") |
| 2072 |
AC_SUBST(LIB_KDEPRINT, "-lkdeprint") |
| 2073 |
AC_SUBST(LIB_KUTILS, "-lkutils") |
| 2074 |
AC_SUBST(LIB_KDEPIM, "-lkdepim") |
| 2075 |
AC_SUBST(LIB_KIMPROXY, "-lkimproxy") |
| 2076 |
AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff") |
| 2077 |
AC_SUBST(LIB_KDNSSD, "-lkdnssd") |
| 2078 |
AC_SUBST(LIB_KUNITTEST, "-lkunittest") |
| 2079 |
# these are for backward compatibility |
| 2080 |
AC_SUBST(LIB_KSYCOCA, "-lkio") |
| 2081 |
AC_SUBST(LIB_KFILE, "-lkio") |
| 2082 |
elif test $kde_qtver = 2; then |
| 2083 |
AC_SUBST(LIB_KDECORE, "-lkdecore") |
| 2084 |
AC_SUBST(LIB_KDEUI, "-lkdeui") |
| 2085 |
AC_SUBST(LIB_KIO, "-lkio") |
| 2086 |
AC_SUBST(LIB_KSYCOCA, "-lksycoca") |
| 2087 |
AC_SUBST(LIB_SMB, "-lsmb") |
| 2088 |
AC_SUBST(LIB_KFILE, "-lkfile") |
| 2089 |
AC_SUBST(LIB_KAB, "-lkab") |
| 2090 |
AC_SUBST(LIB_KHTML, "-lkhtml") |
| 2091 |
AC_SUBST(LIB_KSPELL, "-lkspell") |
| 2092 |
AC_SUBST(LIB_KPARTS, "-lkparts") |
| 2093 |
AC_SUBST(LIB_KDEPRINT, "-lkdeprint") |
| 2094 |
else |
| 2095 |
AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)") |
| 2096 |
AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)") |
| 2097 |
AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)") |
| 2098 |
AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)") |
| 2099 |
AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)") |
| 2100 |
fi |
| 2101 |
]) |
| 2102 |
|
| 2103 |
AC_DEFUN([AC_PATH_KDE], |
| 2104 |
[ |
| 2105 |
AC_BASE_PATH_KDE |
| 2106 |
AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]), |
| 2107 |
[ |
| 2108 |
if test "$enableval" = "no"; |
| 2109 |
then ac_use_path_checking="default" |
| 2110 |
else ac_use_path_checking="" |
| 2111 |
fi |
| 2112 |
], |
| 2113 |
[ |
| 2114 |
if test "$kde_qtver" = 1; |
| 2115 |
then ac_use_path_checking="" |
| 2116 |
else ac_use_path_checking="default" |
| 2117 |
fi |
| 2118 |
] |
| 2119 |
) |
| 2120 |
|
| 2121 |
AC_CREATE_KFSSTND($ac_use_path_checking) |
| 2122 |
|
| 2123 |
AC_SUBST_KFSSTND |
| 2124 |
KDE_CREATE_LIBS_ALIASES |
| 2125 |
]) |
| 2126 |
|
| 2127 |
dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found]) |
| 2128 |
AC_DEFUN([KDE_CHECK_FUNC_EXT], |
| 2129 |
[ |
| 2130 |
AC_MSG_CHECKING(for $1) |
| 2131 |
AC_CACHE_VAL(kde_cv_func_$1, |
| 2132 |
[ |
| 2133 |
AC_LANG_SAVE |
| 2134 |
AC_LANG_CPLUSPLUS |
| 2135 |
save_CXXFLAGS="$CXXFLAGS" |
| 2136 |
kde_safe_LIBS="$LIBS" |
| 2137 |
LIBS="$LIBS $X_EXTRA_LIBS" |
| 2138 |
AC_TRY_COMPILE([ |
| 2139 |
$2 |
| 2140 |
], |
| 2141 |
[ |
| 2142 |
$3 |
| 2143 |
], |
| 2144 |
kde_cv_func_$1=yes, |
| 2145 |
kde_cv_func_$1=no) |
| 2146 |
CXXFLAGS="$save_CXXFLAGS" |
| 2147 |
LIBS="$kde_safe_LIBS" |
| 2148 |
AC_LANG_RESTORE |
| 2149 |
]) |
| 2150 |
|
| 2151 |
AC_MSG_RESULT($kde_cv_func_$1) |
| 2152 |
|
| 2153 |
AC_MSG_CHECKING([if $1 needs custom prototype]) |
| 2154 |
AC_CACHE_VAL(kde_cv_proto_$1, |
| 2155 |
[ |
| 2156 |
if test "x$kde_cv_func_$1" = xyes; then |
| 2157 |
kde_cv_proto_$1=no |
| 2158 |
else |
| 2159 |
case "$1" in |
| 2160 |
setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat) |
| 2161 |
kde_cv_proto_$1="yes - in libkdefakes" |
| 2162 |
;; |
| 2163 |
*) |
| 2164 |
kde_cv_proto_$1=unknown |
| 2165 |
;; |
| 2166 |
esac |
| 2167 |
fi |
| 2168 |
|
| 2169 |
if test "x$kde_cv_proto_$1" = xunknown; then |
| 2170 |
|
| 2171 |
AC_LANG_SAVE |
| 2172 |
AC_LANG_CPLUSPLUS |
| 2173 |
kde_safe_libs=$LIBS |
| 2174 |
LIBS="$LIBS $X_EXTRA_LIBS" |
| 2175 |
AC_TRY_LINK([ |
| 2176 |
$2 |
| 2177 |
|
| 2178 |
extern "C" $4; |
| 2179 |
], |
| 2180 |
[ |
| 2181 |
$3 |
| 2182 |
], |
| 2183 |
[ kde_cv_func_$1=yes |
| 2184 |
kde_cv_proto_$1=yes ], |
| 2185 |
[kde_cv_proto_$1="$1 unavailable"] |
| 2186 |
) |
| 2187 |
LIBS=$kde_safe_libs |
| 2188 |
AC_LANG_RESTORE |
| 2189 |
fi |
| 2190 |
]) |
| 2191 |
AC_MSG_RESULT($kde_cv_proto_$1) |
| 2192 |
|
| 2193 |
if test "x$kde_cv_func_$1" = xyes; then |
| 2194 |
AC_DEFINE(HAVE_$5, 1, [Define if you have $1]) |
| 2195 |
$6 |
| 2196 |
fi |
| 2197 |
if test "x$kde_cv_proto_$1" = xno; then |
| 2198 |
AC_DEFINE(HAVE_$5_PROTO, 1, |
| 2199 |
[Define if you have the $1 prototype]) |
| 2200 |
fi |
| 2201 |
|
| 2202 |
AH_VERBATIM([_HAVE_$5_PROTO], |
| 2203 |
[ |
| 2204 |
#if !defined(HAVE_$5_PROTO) |
| 2205 |
#ifdef __cplusplus |
| 2206 |
extern "C" { |
| 2207 |
#endif |
| 2208 |
$4; |
| 2209 |
#ifdef __cplusplus |
| 2210 |
} |
| 2211 |
#endif |
| 2212 |
#endif |
| 2213 |
]) |
| 2214 |
]) |
| 2215 |
|
| 2216 |
AC_DEFUN([AC_CHECK_SETENV], |
| 2217 |
[ |
| 2218 |
KDE_CHECK_FUNC_EXT(setenv, [ |
| 2219 |
#include <stdlib.h> |
| 2220 |
], |
| 2221 |
[setenv("VAR", "VALUE", 1);], |
| 2222 |
[int setenv (const char *, const char *, int)], |
| 2223 |
[SETENV]) |
| 2224 |
]) |
| 2225 |
|
| 2226 |
AC_DEFUN([AC_CHECK_UNSETENV], |
| 2227 |
[ |
| 2228 |
KDE_CHECK_FUNC_EXT(unsetenv, [ |
| 2229 |
#include <stdlib.h> |
| 2230 |
], |
| 2231 |
[unsetenv("VAR");], |
| 2232 |
[void unsetenv (const char *)], |
| 2233 |
[UNSETENV]) |
| 2234 |
]) |
| 2235 |
|
| 2236 |
AC_DEFUN([AC_CHECK_GETDOMAINNAME], |
| 2237 |
[ |
| 2238 |
KDE_CHECK_FUNC_EXT(getdomainname, [ |
| 2239 |
#include <stdlib.h> |
| 2240 |
#include <unistd.h> |
| 2241 |
#include <netdb.h> |
| 2242 |
], |
| 2243 |
[ |
| 2244 |
char buffer[200]; |
| 2245 |
getdomainname(buffer, 200); |
| 2246 |
], |
| 2247 |
[#include <sys/types.h> |
| 2248 |
int getdomainname (char *, size_t)], |
| 2249 |
[GETDOMAINNAME]) |
| 2250 |
]) |
| 2251 |
|
| 2252 |
AC_DEFUN([AC_CHECK_GETHOSTNAME], |
| 2253 |
[ |
| 2254 |
KDE_CHECK_FUNC_EXT(gethostname, [ |
| 2255 |
#include <stdlib.h> |
| 2256 |
#include <unistd.h> |
| 2257 |
], |
| 2258 |
[ |
| 2259 |
char buffer[200]; |
| 2260 |
gethostname(buffer, 200); |
| 2261 |
], |
| 2262 |
[int gethostname (char *, unsigned int)], |
| 2263 |
[GETHOSTNAME]) |
| 2264 |
]) |
| 2265 |
|
| 2266 |
AC_DEFUN([AC_CHECK_USLEEP], |
| 2267 |
[ |
| 2268 |
KDE_CHECK_FUNC_EXT(usleep, [ |
| 2269 |
#include <unistd.h> |
| 2270 |
], |
| 2271 |
[ |
| 2272 |
usleep(200); |
| 2273 |
], |
| 2274 |
[int usleep (unsigned int)], |
| 2275 |
[USLEEP]) |
| 2276 |
]) |
| 2277 |
|
| 2278 |
|
| 2279 |
AC_DEFUN([AC_CHECK_RANDOM], |
| 2280 |
[ |
| 2281 |
KDE_CHECK_FUNC_EXT(random, [ |
| 2282 |
#include <stdlib.h> |
| 2283 |
], |
| 2284 |
[ |
| 2285 |
random(); |
| 2286 |
], |
| 2287 |
[long int random(void)], |
| 2288 |
[RANDOM]) |
| 2289 |
|
| 2290 |
KDE_CHECK_FUNC_EXT(srandom, [ |
| 2291 |
#include <stdlib.h> |
| 2292 |
], |
| 2293 |
[ |
| 2294 |
srandom(27); |
| 2295 |
], |
| 2296 |
[void srandom(unsigned int)], |
| 2297 |
[SRANDOM]) |
| 2298 |
|
| 2299 |
]) |
| 2300 |
|
| 2301 |
AC_DEFUN([AC_CHECK_INITGROUPS], |
| 2302 |
[ |
| 2303 |
KDE_CHECK_FUNC_EXT(initgroups, [ |
| 2304 |
#include <sys/types.h> |
| 2305 |
#include <unistd.h> |
| 2306 |
#include <grp.h> |
| 2307 |
], |
| 2308 |
[ |
| 2309 |
char buffer[200]; |
| 2310 |
initgroups(buffer, 27); |
| 2311 |
], |
| 2312 |
[int initgroups(const char *, gid_t)], |
| 2313 |
[INITGROUPS]) |
| 2314 |
]) |
| 2315 |
|
| 2316 |
AC_DEFUN([AC_CHECK_MKSTEMPS], |
| 2317 |
[ |
| 2318 |
KDE_CHECK_FUNC_EXT(mkstemps, [ |
| 2319 |
#include <stdlib.h> |
| 2320 |
#include <unistd.h> |
| 2321 |
], |
| 2322 |
[ |
| 2323 |
mkstemps("/tmp/aaaXXXXXX", 6); |
| 2324 |
], |
| 2325 |
[int mkstemps(char *, int)], |
| 2326 |
[MKSTEMPS]) |
| 2327 |
]) |
| 2328 |
|
| 2329 |
AC_DEFUN([AC_CHECK_MKSTEMP], |
| 2330 |
[ |
| 2331 |
KDE_CHECK_FUNC_EXT(mkstemp, [ |
| 2332 |
#include <stdlib.h> |
| 2333 |
#include <unistd.h> |
| 2334 |
], |
| 2335 |
[ |
| 2336 |
mkstemp("/tmp/aaaXXXXXX"); |
| 2337 |
], |
| 2338 |
[int mkstemp(char *)], |
| 2339 |
[MKSTEMP]) |
| 2340 |
]) |
| 2341 |
|
| 2342 |
AC_DEFUN([AC_CHECK_MKDTEMP], |
| 2343 |
[ |
| 2344 |
KDE_CHECK_FUNC_EXT(mkdtemp, [ |
| 2345 |
#include <stdlib.h> |
| 2346 |
#include <unistd.h> |
| 2347 |
], |
| 2348 |
[ |
| 2349 |
mkdtemp("/tmp/aaaXXXXXX"); |
| 2350 |
], |
| 2351 |
[char *mkdtemp(char *)], |
| 2352 |
[MKDTEMP]) |
| 2353 |
]) |
| 2354 |
|
| 2355 |
|
| 2356 |
AC_DEFUN([AC_CHECK_RES_INIT], |
| 2357 |
[ |
| 2358 |
AC_MSG_CHECKING([if res_init needs -lresolv]) |
| 2359 |
kde_libs_safe="$LIBS" |
| 2360 |
LIBS="$LIBS $X_EXTRA_LIBS -lresolv" |
| 2361 |
AC_TRY_LINK( |
| 2362 |
[ |
| 2363 |
#include <sys/types.h> |
| 2364 |
#include <netinet/in.h> |
| 2365 |
#include <arpa/nameser.h> |
| 2366 |
#include <resolv.h> |
| 2367 |
], |
| 2368 |
[ |
| 2369 |
res_init(); |
| 2370 |
], |
| 2371 |
[ |
| 2372 |
LIBRESOLV="-lresolv" |
| 2373 |
AC_MSG_RESULT(yes) |
| 2374 |
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function]) |
| 2375 |
], |
| 2376 |
[ AC_MSG_RESULT(no) ] |
| 2377 |
) |
| 2378 |
LIBS=$kde_libs_safe |
| 2379 |
AC_SUBST(LIBRESOLV) |
| 2380 |
|
| 2381 |
KDE_CHECK_FUNC_EXT(res_init, |
| 2382 |
[ |
| 2383 |
#include <sys/types.h> |
| 2384 |
#include <netinet/in.h> |
| 2385 |
#include <arpa/nameser.h> |
| 2386 |
#include <resolv.h> |
| 2387 |
], |
| 2388 |
[res_init()], |
| 2389 |
[int res_init(void)], |
| 2390 |
[RES_INIT]) |
| 2391 |
]) |
| 2392 |
|
| 2393 |
AC_DEFUN([AC_CHECK_STRLCPY], |
| 2394 |
[ |
| 2395 |
KDE_CHECK_FUNC_EXT(strlcpy, [ |
| 2396 |
#include <string.h> |
| 2397 |
], |
| 2398 |
[ char buf[20]; |
| 2399 |
strlcpy(buf, "KDE function test", sizeof(buf)); |
| 2400 |
], |
| 2401 |
[unsigned long strlcpy(char*, const char*, unsigned long)], |
| 2402 |
[STRLCPY]) |
| 2403 |
]) |
| 2404 |
|
| 2405 |
AC_DEFUN([AC_CHECK_STRLCAT], |
| 2406 |
[ |
| 2407 |
KDE_CHECK_FUNC_EXT(strlcat, [ |
| 2408 |
#include <string.h> |
| 2409 |
], |
| 2410 |
[ char buf[20]; |
| 2411 |
buf[0]='\0'; |
| 2412 |
strlcat(buf, "KDE function test", sizeof(buf)); |
| 2413 |
], |
| 2414 |
[unsigned long strlcat(char*, const char*, unsigned long)], |
| 2415 |
[STRLCAT]) |
| 2416 |
]) |
| 2417 |
|
| 2418 |
AC_DEFUN([AC_CHECK_RES_QUERY], |
| 2419 |
[ |
| 2420 |
KDE_CHECK_FUNC_EXT(res_query, [ |
| 2421 |
#include <sys/types.h> |
| 2422 |
#include <netinet/in.h> |
| 2423 |
#include <arpa/nameser.h> |
| 2424 |
#include <resolv.h> |
| 2425 |
#include <netdb.h> |
| 2426 |
], |
| 2427 |
[ |
| 2428 |
res_query(NULL, 0, 0, NULL, 0); |
| 2429 |
], |
| 2430 |
[int res_query(const char *, int, int, unsigned char *, int)], |
| 2431 |
[RES_QUERY]) |
| 2432 |
]) |
| 2433 |
|
| 2434 |
AC_DEFUN([AC_CHECK_DN_SKIPNAME], |
| 2435 |
[ |
| 2436 |
KDE_CHECK_FUNC_EXT(dn_skipname, [ |
| 2437 |
#include <sys/types.h> |
| 2438 |
#include <netinet/in.h> |
| 2439 |
#include <arpa/nameser.h> |
| 2440 |
#include <resolv.h> |
| 2441 |
], |
| 2442 |
[ |
| 2443 |
dn_skipname (NULL, NULL); |
| 2444 |
], |
| 2445 |
[int dn_skipname (unsigned char *, unsigned char *)], |
| 2446 |
[DN_SKIPNAME]) |
| 2447 |
]) |
| 2448 |
|
| 2449 |
|
| 2450 |
AC_DEFUN([AC_FIND_GIF], |
| 2451 |
[AC_MSG_CHECKING([for giflib]) |
| 2452 |
AC_CACHE_VAL(ac_cv_lib_gif, |
| 2453 |
[ac_save_LIBS="$LIBS" |
| 2454 |
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then |
| 2455 |
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET" |
| 2456 |
else |
| 2457 |
LIBS="$all_libraries -lgif" |
| 2458 |
fi |
| 2459 |
AC_TRY_LINK(dnl |
| 2460 |
[ |
| 2461 |
#ifdef __cplusplus |
| 2462 |
extern "C" { |
| 2463 |
#endif |
| 2464 |
int GifLastError(void); |
| 2465 |
#ifdef __cplusplus |
| 2466 |
} |
| 2467 |
#endif |
| 2468 |
/* We use char because int might match the return type of a gcc2 |
| 2469 |
builtin and then its argument prototype would still apply. */ |
| 2470 |
], |
| 2471 |
[return GifLastError();], |
| 2472 |
eval "ac_cv_lib_gif=yes", |
| 2473 |
eval "ac_cv_lib_gif=no") |
| 2474 |
LIBS="$ac_save_LIBS" |
| 2475 |
])dnl |
| 2476 |
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then |
| 2477 |
AC_MSG_RESULT(yes) |
| 2478 |
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif]) |
| 2479 |
else |
| 2480 |
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package) |
| 2481 |
fi |
| 2482 |
]) |
| 2483 |
|
| 2484 |
AC_DEFUN([KDE_FIND_JPEG_HELPER], |
| 2485 |
[ |
| 2486 |
AC_MSG_CHECKING([for libjpeg$2]) |
| 2487 |
AC_CACHE_VAL(ac_cv_lib_jpeg_$1, |
| 2488 |
[ |
| 2489 |
ac_save_LIBS="$LIBS" |
| 2490 |
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm" |
| 2491 |
ac_save_CFLAGS="$CFLAGS" |
| 2492 |
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" |
| 2493 |
AC_TRY_LINK( |
| 2494 |
[ |
| 2495 |
#ifdef __cplusplus |
| 2496 |
extern "C" { |
| 2497 |
#endif |
| 2498 |
void jpeg_CreateDecompress(); |
| 2499 |
#ifdef __cplusplus |
| 2500 |
} |
| 2501 |
#endif |
| 2502 |
], |
| 2503 |
[jpeg_CreateDecompress();], |
| 2504 |
eval "ac_cv_lib_jpeg_$1=-ljpeg$2", |
| 2505 |
eval "ac_cv_lib_jpeg_$1=no") |
| 2506 |
LIBS="$ac_save_LIBS" |
| 2507 |
CFLAGS="$ac_save_CFLAGS" |
| 2508 |
]) |
| 2509 |
|
| 2510 |
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then |
| 2511 |
LIBJPEG="$ac_cv_lib_jpeg_$1" |
| 2512 |
AC_MSG_RESULT($ac_cv_lib_jpeg_$1) |
| 2513 |
else |
| 2514 |
AC_MSG_RESULT(no) |
| 2515 |
$3 |
| 2516 |
fi |
| 2517 |
|
| 2518 |
]) |
| 2519 |
|
| 2520 |
AC_DEFUN([AC_FIND_JPEG], |
| 2521 |
[ |
| 2522 |
dnl first look for libraries |
| 2523 |
KDE_FIND_JPEG_HELPER(6b, 6b, |
| 2524 |
KDE_FIND_JPEG_HELPER(normal, [], |
| 2525 |
[ |
| 2526 |
LIBJPEG= |
| 2527 |
] |
| 2528 |
) |
| 2529 |
) |
| 2530 |
|
| 2531 |
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h |
| 2532 |
dnl requires system dependent includes loaded before it) |
| 2533 |
jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes" |
| 2534 |
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir) |
| 2535 |
test "x$jpeg_incdir" = xNO && jpeg_incdir= |
| 2536 |
|
| 2537 |
dnl if headers _and_ libraries are missing, this is no error, and we |
| 2538 |
dnl continue with a warning (the user will get no jpeg support in khtml) |
| 2539 |
dnl if only one is missing, it means a configuration error, but we still |
| 2540 |
dnl only warn |
| 2541 |
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then |
| 2542 |
AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg]) |
| 2543 |
else |
| 2544 |
if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then |
| 2545 |
AC_MSG_WARN([ |
| 2546 |
There is an installation error in jpeg support. You seem to have only one |
| 2547 |
of either the headers _or_ the libraries installed. You may need to either |
| 2548 |
provide correct --with-extra-... options, or the development package of |
| 2549 |
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/ |
| 2550 |
Disabling JPEG support. |
| 2551 |
]) |
| 2552 |
else |
| 2553 |
AC_MSG_WARN([libjpeg not found. disable JPEG support.]) |
| 2554 |
fi |
| 2555 |
jpeg_incdir= |
| 2556 |
LIBJPEG= |
| 2557 |
fi |
| 2558 |
|
| 2559 |
AC_SUBST(LIBJPEG) |
| 2560 |
AH_VERBATIM(_AC_CHECK_JPEG, |
| 2561 |
[/* |
| 2562 |
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system |
| 2563 |
* headers and I'm too lazy to write a configure test as long as only |
| 2564 |
* unixware is related |
| 2565 |
*/ |
| 2566 |
#ifdef _UNIXWARE |
| 2567 |
#define HAVE_BOOLEAN |
| 2568 |
#endif |
| 2569 |
]) |
| 2570 |
]) |
| 2571 |
|
| 2572 |
AC_DEFUN([KDE_CHECK_QT_JPEG], |
| 2573 |
[ |
| 2574 |
if test -n "$LIBJPEG"; then |
| 2575 |
AC_MSG_CHECKING([if Qt needs $LIBJPEG]) |
| 2576 |
AC_CACHE_VAL(kde_cv_qt_jpeg, |
| 2577 |
[ |
| 2578 |
AC_LANG_SAVE |
| 2579 |
AC_LANG_CPLUSPLUS |
| 2580 |
ac_save_LIBS="$LIBS" |
| 2581 |
LIBS="$all_libraries $USER_LDFLAGS $LIBQT" |
| 2582 |
LIBS=`echo $LIBS | sed "s/$LIBJPEG//"` |
| 2583 |
ac_save_CXXFLAGS="$CXXFLAGS" |
| 2584 |
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" |
| 2585 |
AC_TRY_LINK( |
| 2586 |
[#include <qapplication.h>], |
| 2587 |
[ |
| 2588 |
int argc; |
| 2589 |
char** argv; |
| 2590 |
QApplication app(argc, argv);], |
| 2591 |
eval "kde_cv_qt_jpeg=no", |
| 2592 |
eval "kde_cv_qt_jpeg=yes") |
| 2593 |
LIBS="$ac_save_LIBS" |
| 2594 |
CXXFLAGS="$ac_save_CXXFLAGS" |
| 2595 |
AC_LANG_RESTORE |
| 2596 |
fi |
| 2597 |
]) |
| 2598 |
|
| 2599 |
if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then |
| 2600 |
AC_MSG_RESULT(yes) |
| 2601 |
LIBJPEG_QT='$(LIBJPEG)' |
| 2602 |
else |
| 2603 |
AC_MSG_RESULT(no) |
| 2604 |
LIBJPEG_QT= |
| 2605 |
fi |
| 2606 |
|
| 2607 |
]) |
| 2608 |
|
| 2609 |
AC_DEFUN([AC_FIND_ZLIB], |
| 2610 |
[ |
| 2611 |
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 2612 |
AC_MSG_CHECKING([for libz]) |
| 2613 |
AC_CACHE_VAL(ac_cv_lib_z, |
| 2614 |
[ |
| 2615 |
kde_save_LIBS="$LIBS" |
| 2616 |
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET" |
| 2617 |
kde_save_CFLAGS="$CFLAGS" |
| 2618 |
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" |
| 2619 |
AC_TRY_LINK(dnl |
| 2620 |
[ |
| 2621 |
#include<zlib.h> |
| 2622 |
], |
| 2623 |
[ |
| 2624 |
char buf[42]; |
| 2625 |
gzFile f = (gzFile) 0; |
| 2626 |
/* this would segfault.. but we only link, don't run */ |
| 2627 |
(void) gzgets(f, buf, sizeof(buf)); |
| 2628 |
|
| 2629 |
return (zlibVersion() == ZLIB_VERSION); |
| 2630 |
], |
| 2631 |
eval "ac_cv_lib_z='-lz'", |
| 2632 |
eval "ac_cv_lib_z=no") |
| 2633 |
LIBS="$kde_save_LIBS" |
| 2634 |
CFLAGS="$kde_save_CFLAGS" |
| 2635 |
])dnl |
| 2636 |
if test ! "$ac_cv_lib_z" = no; then |
| 2637 |
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz]) |
| 2638 |
LIBZ="$ac_cv_lib_z" |
| 2639 |
AC_MSG_RESULT($ac_cv_lib_z) |
| 2640 |
else |
| 2641 |
AC_MSG_ERROR(not found. |
| 2642 |
Possibly configure picks up an outdated version |
| 2643 |
installed by XFree86. Remove it from your system. |
| 2644 |
|
| 2645 |
Check your installation and look into config.log) |
| 2646 |
LIBZ="" |
| 2647 |
fi |
| 2648 |
AC_SUBST(LIBZ) |
| 2649 |
]) |
| 2650 |
|
| 2651 |
AC_DEFUN([KDE_TRY_TIFFLIB], |
| 2652 |
[ |
| 2653 |
AC_MSG_CHECKING([for libtiff $1]) |
| 2654 |
|
| 2655 |
AC_CACHE_VAL(kde_cv_libtiff_$1, |
| 2656 |
[ |
| 2657 |
AC_LANG_SAVE |
| 2658 |
AC_LANG_CPLUSPLUS |
| 2659 |
kde_save_LIBS="$LIBS" |
| 2660 |
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then |
| 2661 |
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm" |
| 2662 |
else |
| 2663 |
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm" |
| 2664 |
fi |
| 2665 |
kde_save_CXXFLAGS="$CXXFLAGS" |
| 2666 |
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" |
| 2667 |
|
| 2668 |
AC_TRY_LINK(dnl |
| 2669 |
[ |
| 2670 |
#include<tiffio.h> |
| 2671 |
], |
| 2672 |
[return (TIFFOpen( "", "r") == 0); ], |
| 2673 |
[ |
| 2674 |
kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ" |
| 2675 |
], [ |
| 2676 |
kde_cv_libtiff_$1=no |
| 2677 |
]) |
| 2678 |
|
| 2679 |
LIBS="$kde_save_LIBS" |
| 2680 |
CXXFLAGS="$kde_save_CXXFLAGS" |
| 2681 |
AC_LANG_RESTORE |
| 2682 |
]) |
| 2683 |
|
| 2684 |
if test "$kde_cv_libtiff_$1" = "no"; then |
| 2685 |
AC_MSG_RESULT(no) |
| 2686 |
LIBTIFF="" |
| 2687 |
$3 |
| 2688 |
else |
| 2689 |
LIBTIFF="$kde_cv_libtiff_$1" |
| 2690 |
AC_MSG_RESULT(yes) |
| 2691 |
AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff]) |
| 2692 |
$2 |
| 2693 |
fi |
| 2694 |
|
| 2695 |
]) |
| 2696 |
|
| 2697 |
AC_DEFUN([AC_FIND_TIFF], |
| 2698 |
[ |
| 2699 |
AC_REQUIRE([K_PATH_X]) |
| 2700 |
AC_REQUIRE([AC_FIND_ZLIB]) |
| 2701 |
AC_REQUIRE([AC_FIND_JPEG]) |
| 2702 |
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 2703 |
|
| 2704 |
KDE_TRY_TIFFLIB(tiff, [], |
| 2705 |
KDE_TRY_TIFFLIB(tiff34)) |
| 2706 |
|
| 2707 |
AC_SUBST(LIBTIFF) |
| 2708 |
]) |
| 2709 |
|
| 2710 |
AC_DEFUN([KDE_FIND_LIBEXR], |
| 2711 |
[ |
| 2712 |
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 2713 |
AC_REQUIRE([AC_FIND_ZLIB]) |
| 2714 |
AC_CACHE_VAL(ac_cv_libexr, |
| 2715 |
[ |
| 2716 |
if test -z "$PKG_CONFIG"; then |
| 2717 |
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
| 2718 |
fi |
| 2719 |
|
| 2720 |
AC_MSG_CHECKING([for OpenEXR libraries]) |
| 2721 |
|
| 2722 |
if test "$PKG_CONFIG" = "no" ; then |
| 2723 |
AC_MSG_RESULT(no) |
| 2724 |
echo "*** The pkg-config script could not be found. Make sure it is" |
| 2725 |
echo "*** in your path, or set the PKG_CONFIG environment variable" |
| 2726 |
echo "*** to the full path to pkg-config." |
| 2727 |
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." |
| 2728 |
else |
| 2729 |
if !(`$PKG_CONFIG --exists OpenEXR`) ; then |
| 2730 |
AC_MSG_RESULT(no) |
| 2731 |
EXRSTATUS=no |
| 2732 |
else |
| 2733 |
if !(`$PKG_CONFIG --atleast-version="1.1.1" OpenEXR`) ; then |
| 2734 |
AC_MSG_RESULT(no) |
| 2735 |
EXRSTATUS=old |
| 2736 |
else |
| 2737 |
kde_save_LIBS="$LIBS" |
| 2738 |
LIBS="$LIBS $all_libraries $USER_LDFLAGS `pkg-config --libs OpenEXR` $LIBZ" |
| 2739 |
AC_LANG_SAVE |
| 2740 |
AC_LANG_CPLUSPLUS |
| 2741 |
kde_save_CXXFLAGS="$CXXFLAGS" |
| 2742 |
EXR_FLAGS=`$PKG_CONFIG --cflags OpenEXR` |
| 2743 |
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES $EXR_FLAGS" |
| 2744 |
|
| 2745 |
AC_TRY_LINK(dnl |
| 2746 |
[ |
| 2747 |
#include <ImfRgbaFile.h> |
| 2748 |
], |
| 2749 |
[ |
| 2750 |
using namespace Imf; |
| 2751 |
RgbaInputFile file ("dummy"); |
| 2752 |
return 0; |
| 2753 |
], |
| 2754 |
eval "ac_cv_libexr='`pkg-config --libs OpenEXR`'", |
| 2755 |
eval "ac_cv_libexr=no" |
| 2756 |
) |
| 2757 |
LIBS="$kde_save_LIBS" |
| 2758 |
CXXFLAGS="$kde_save_CXXFLAGS" |
| 2759 |
AC_LANG_RESTORE |
| 2760 |
])dnl |
| 2761 |
if eval "test ! \"`echo $ac_cv_libexr`\" = no"; then |
| 2762 |
AC_DEFINE_UNQUOTED(HAVE_EXR, 1, [Define if you have OpenEXR]) |
| 2763 |
LIB_EXR="$ac_cv_libexr" |
| 2764 |
AC_MSG_RESULT($ac_cv_libexr) |
| 2765 |
else |
| 2766 |
AC_MSG_RESULT(no) |
| 2767 |
LIB_EXR="" |
| 2768 |
fi |
| 2769 |
fi |
| 2770 |
fi |
| 2771 |
fi |
| 2772 |
AC_SUBST(LIB_EXR) |
| 2773 |
AC_SUBST(EXR_FLAGS) |
| 2774 |
]) |
| 2775 |
|
| 2776 |
|
| 2777 |
|
| 2778 |
AC_DEFUN([AC_FIND_PNG], |
| 2779 |
[ |
| 2780 |
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 2781 |
AC_REQUIRE([AC_FIND_ZLIB]) |
| 2782 |
AC_MSG_CHECKING([for libpng]) |
| 2783 |
AC_CACHE_VAL(ac_cv_lib_png, |
| 2784 |
[ |
| 2785 |
kde_save_LIBS="$LIBS" |
| 2786 |
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then |
| 2787 |
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET" |
| 2788 |
else |
| 2789 |
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm" |
| 2790 |
fi |
| 2791 |
kde_save_CFLAGS="$CFLAGS" |
| 2792 |
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" |
| 2793 |
|
| 2794 |
AC_TRY_LINK(dnl |
| 2795 |
[ |
| 2796 |
#include<png.h> |
| 2797 |
], |
| 2798 |
[ |
| 2799 |
png_structp png_ptr = png_create_read_struct( /* image ptr */ |
| 2800 |
PNG_LIBPNG_VER_STRING, 0, 0, 0 ); |
| 2801 |
return( png_ptr != 0 ); |
| 2802 |
], |
| 2803 |
eval "ac_cv_lib_png='-lpng $LIBZ -lm'", |
| 2804 |
eval "ac_cv_lib_png=no" |
| 2805 |
) |
| 2806 |
LIBS="$kde_save_LIBS" |
| 2807 |
CFLAGS="$kde_save_CFLAGS" |
| 2808 |
])dnl |
| 2809 |
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then |
| 2810 |
AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng]) |
| 2811 |
LIBPNG="$ac_cv_lib_png" |
| 2812 |
AC_SUBST(LIBPNG) |
| 2813 |
AC_MSG_RESULT($ac_cv_lib_png) |
| 2814 |
else |
| 2815 |
AC_MSG_RESULT(no) |
| 2816 |
LIBPNG="" |
| 2817 |
AC_SUBST(LIBPNG) |
| 2818 |
fi |
| 2819 |
]) |
| 2820 |
|
| 2821 |
|
| 2822 |
AC_DEFUN([AC_FIND_JASPER], |
| 2823 |
[ |
| 2824 |
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 2825 |
AC_REQUIRE([AC_FIND_JPEG]) |
| 2826 |
AC_MSG_CHECKING([for jasper]) |
| 2827 |
AC_CACHE_VAL(ac_cv_jasper, |
| 2828 |
[ |
| 2829 |
kde_save_LIBS="$LIBS" |
| 2830 |
LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm" |
| 2831 |
kde_save_CFLAGS="$CFLAGS" |
| 2832 |
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" |
| 2833 |
|
| 2834 |
AC_TRY_LINK(dnl |
| 2835 |
[ |
| 2836 |
#include<jasper/jasper.h> |
| 2837 |
], |
| 2838 |
[ |
| 2839 |
return( jas_init() ); |
| 2840 |
], |
| 2841 |
eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'", |
| 2842 |
eval "ac_cv_jasper=no" |
| 2843 |
) |
| 2844 |
LIBS="$kde_save_LIBS" |
| 2845 |
CFLAGS="$kde_save_CFLAGS" |
| 2846 |
])dnl |
| 2847 |
if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then |
| 2848 |
AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper]) |
| 2849 |
LIB_JASPER="$ac_cv_jasper" |
| 2850 |
AC_MSG_RESULT($ac_cv_jasper) |
| 2851 |
else |
| 2852 |
AC_MSG_RESULT(no) |
| 2853 |
LIB_JASPER="" |
| 2854 |
fi |
| 2855 |
AC_SUBST(LIB_JASPER) |
| 2856 |
]) |
| 2857 |
|
| 2858 |
AC_DEFUN([AC_CHECK_BOOL], |
| 2859 |
[ |
| 2860 |
AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool]) |
| 2861 |
]) |
| 2862 |
|
| 2863 |
AC_DEFUN([AC_CHECK_GNU_EXTENSIONS], |
| 2864 |
[ |
| 2865 |
AC_MSG_CHECKING(if you need GNU extensions) |
| 2866 |
AC_CACHE_VAL(ac_cv_gnu_extensions, |
| 2867 |
[ |
| 2868 |
cat > conftest.c << EOF |
| 2869 |
#include <features.h> |
| 2870 |
|
| 2871 |
#ifdef __GNU_LIBRARY__ |
| 2872 |
yes |
| 2873 |
#endif |
| 2874 |
EOF |
| 2875 |
|
| 2876 |
if (eval "$ac_cpp conftest.c") 2>&5 | |
| 2877 |
egrep "yes" >/dev/null 2>&1; then |
| 2878 |
rm -rf conftest* |
| 2879 |
ac_cv_gnu_extensions=yes |
| 2880 |
else |
| 2881 |
ac_cv_gnu_extensions=no |
| 2882 |
fi |
| 2883 |
]) |
| 2884 |
|
| 2885 |
AC_MSG_RESULT($ac_cv_gnu_extensions) |
| 2886 |
if test "$ac_cv_gnu_extensions" = "yes"; then |
| 2887 |
AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions]) |
| 2888 |
fi |
| 2889 |
]) |
| 2890 |
|
| 2891 |
AC_DEFUN([KDE_CHECK_COMPILER_FLAG], |
| 2892 |
[ |
| 2893 |
AC_MSG_CHECKING([whether $CXX supports -$1]) |
| 2894 |
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'` |
| 2895 |
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache, |
| 2896 |
[ |
| 2897 |
AC_LANG_SAVE |
| 2898 |
AC_LANG_CPLUSPLUS |
| 2899 |
save_CXXFLAGS="$CXXFLAGS" |
| 2900 |
CXXFLAGS="$CXXFLAGS -$1" |
| 2901 |
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], []) |
| 2902 |
CXXFLAGS="$save_CXXFLAGS" |
| 2903 |
AC_LANG_RESTORE |
| 2904 |
]) |
| 2905 |
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then |
| 2906 |
AC_MSG_RESULT(yes) |
| 2907 |
: |
| 2908 |
$2 |
| 2909 |
else |
| 2910 |
AC_MSG_RESULT(no) |
| 2911 |
: |
| 2912 |
$3 |
| 2913 |
fi |
| 2914 |
]) |
| 2915 |
|
| 2916 |
AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG], |
| 2917 |
[ |
| 2918 |
AC_MSG_CHECKING([whether $CC supports -$1]) |
| 2919 |
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'` |
| 2920 |
AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache, |
| 2921 |
[ |
| 2922 |
AC_LANG_SAVE |
| 2923 |
AC_LANG_C |
| 2924 |
save_CFLAGS="$CFLAGS" |
| 2925 |
CFLAGS="$CFLAGS -$1" |
| 2926 |
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], []) |
| 2927 |
CFLAGS="$save_CFLAGS" |
| 2928 |
AC_LANG_RESTORE |
| 2929 |
]) |
| 2930 |
if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then |
| 2931 |
AC_MSG_RESULT(yes) |
| 2932 |
: |
| 2933 |
$2 |
| 2934 |
else |
| 2935 |
AC_MSG_RESULT(no) |
| 2936 |
: |
| 2937 |
$3 |
| 2938 |
fi |
| 2939 |
]) |
| 2940 |
|
| 2941 |
|
| 2942 |
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables |
| 2943 |
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever]) |
| 2944 |
dnl it's all white-space separated |
| 2945 |
AC_DEFUN([AC_REMOVE_FORBIDDEN], |
| 2946 |
[ __val=$$1 |
| 2947 |
__forbid=" $2 " |
| 2948 |
if test -n "$__val"; then |
| 2949 |
__new="" |
| 2950 |
ac_save_IFS=$IFS |
| 2951 |
IFS=" " |
| 2952 |
for i in $__val; do |
| 2953 |
case "$__forbid" in |
| 2954 |
*" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;; |
| 2955 |
*) # Careful to not add spaces, where there were none, because otherwise |
| 2956 |
# libtool gets confused, if we change e.g. CXX |
| 2957 |
if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;; |
| 2958 |
esac |
| 2959 |
done |
| 2960 |
IFS=$ac_save_IFS |
| 2961 |
$1=$__new |
| 2962 |
fi |
| 2963 |
]) |
| 2964 |
|
| 2965 |
|
| 2966 |
AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER], |
| 2967 |
[ |
| 2968 |
AC_MSG_CHECKING([whether $CC is blacklisted]) |
| 2969 |
|
| 2970 |
dnl In theory we have tu run this test against $CC and $CXX |
| 2971 |
dnl in C and in C++ mode, because its perfectly legal for |
| 2972 |
dnl the user to mix compiler versions, since C has a defined |
| 2973 |
dnl ABI. |
| 2974 |
dnl |
| 2975 |
dnl For now, we assume the user is not on crack. |
| 2976 |
|
| 2977 |
AC_TRY_COMPILE([ |
| 2978 |
#ifdef __GNUC__ |
| 2979 |
#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0 |
| 2980 |
choke me |
| 2981 |
#endif |
| 2982 |
#endif |
| 2983 |
], , |
| 2984 |
kde_bad_compiler=no, |
| 2985 |
kde_bad_compiler=yes |
| 2986 |
) |
| 2987 |
|
| 2988 |
AC_MSG_RESULT($kde_bad_compiler) |
| 2989 |
|
| 2990 |
if test "$kde_bad_compiler" = "yes"; then |
| 2991 |
AC_MSG_ERROR([ |
| 2992 |
|
| 2993 |
This particular compiler version is blacklisted because it |
| 2994 |
is known to miscompile KDE. Please use a newer version, or |
| 2995 |
if that is not yet available, choose an older version. |
| 2996 |
|
| 2997 |
Please do not report a bug or bother us reporting this |
| 2998 |
configure error. We know about it, and we introduced |
| 2999 |
it by intention to avoid untraceable bugs or crashes in KDE. |
| 3000 |
|
| 3001 |
]) |
| 3002 |
fi |
| 3003 |
|
| 3004 |
]) |
| 3005 |
|
| 3006 |
|
| 3007 |
AC_DEFUN([KDE_CHECK_FOR_OPT_NOINLINE_MATCH], |
| 3008 |
[ |
| 3009 |
AC_CACHE_CHECK([whether system headers can cope with -O2 -fno-inline], |
| 3010 |
kde_cv_opt_noinline_match, |
| 3011 |
[ |
| 3012 |
kde_cv_opt_noinline_match=irrelevant |
| 3013 |
dnl if we don't use both -O2 and -fno-inline, this check is moot |
| 3014 |
if echo "$CFLAGS" | grep -e -O2 >/dev/null 2>/dev/null \ |
| 3015 |
&& echo "$CFLAGS" | grep -e -fno-inline >/dev/null 2>/dev/null ; then |
| 3016 |
|
| 3017 |
ac_cflags_save="$CFLAGS" |
| 3018 |
CFLAGS="$CFLAGS -D_USE_GNU" |
| 3019 |
|
| 3020 |
AC_TRY_LINK([ |
| 3021 |
#include <string.h> |
| 3022 |
], [ const char *pt, *et; |
| 3023 |
et = __extension__ ({ char __a0, __a1, __a2; (__builtin_constant_p ( ";," ) && ((size_t)(const void *)(( ";," )+ 1) - (size_t)(const void *)( ";," ) == 1) ? ((__a0 =((__const char *) ( ";," ))[0], __a0 == '\0') ? ((void) ( pt ),((void *)0) ) : ((__a1 = ((__const char *) ( ";," ))[1], __a1== '\0') ? (__extension__ (__builtin_constant_p ( __a0 ) && ( __a0 ) == '\0' ? (char *) __rawmemchr ( pt , __a0) : strchr( pt , __a0 ))) : ((__a2 = ((__const char *) ( ";," ))[2], __a2 == '\0') ? __strpbrk_c2 ( pt , __a0, __a1) :(((__const char *) ( ";," ))[3] == '\0' ? __strpbrk_c3 ( pt ,__a0, __a1, __a2): strpbrk ( pt , ";," ))))) : strpbrk ( pt , ";," )); }) ; |
| 3024 |
], |
| 3025 |
kde_cv_opt_noinline_match=yes, |
| 3026 |
kde_cv_opt_noinline_match=no |
| 3027 |
) |
| 3028 |
|
| 3029 |
CFLAGS="$ac_cflags_save" |
| 3030 |
fi |
| 3031 |
]) |
| 3032 |
]) |
| 3033 |
|
| 3034 |
|
| 3035 |
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given |
| 3036 |
AC_DEFUN([AC_VALIDIFY_CXXFLAGS], |
| 3037 |
[dnl |
| 3038 |
if test "x$kde_use_qt_emb" != "xyes"; then |
| 3039 |
AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath]) |
| 3040 |
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath]) |
| 3041 |
else |
| 3042 |
AC_REMOVE_FORBIDDEN(CXX, [-rpath]) |
| 3043 |
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath]) |
| 3044 |
fi |
| 3045 |
]) |
| 3046 |
|
| 3047 |
AC_DEFUN([AC_CHECK_COMPILERS], |
| 3048 |
[ |
| 3049 |
AC_ARG_ENABLE(debug, |
| 3050 |
AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]), |
| 3051 |
[ |
| 3052 |
case $enableval in |
| 3053 |
yes) |
| 3054 |
kde_use_debug_code="yes" |
| 3055 |
kde_use_debug_define=no |
| 3056 |
;; |
| 3057 |
full) |
| 3058 |
kde_use_debug_code="full" |
| 3059 |
kde_use_debug_define=no |
| 3060 |
;; |
| 3061 |
*) |
| 3062 |
kde_use_debug_code="no" |
| 3063 |
kde_use_debug_define=yes |
| 3064 |
;; |
| 3065 |
esac |
| 3066 |
], |
| 3067 |
[kde_use_debug_code="no" |
| 3068 |
kde_use_debug_define=no |
| 3069 |
]) |
| 3070 |
|
| 3071 |
dnl Just for configure --help |
| 3072 |
AC_ARG_ENABLE(dummyoption, |
| 3073 |
AC_HELP_STRING([--disable-debug], |
| 3074 |
[disables debug output and debug symbols [default=no]]), |
| 3075 |
[],[]) |
| 3076 |
|
| 3077 |
AC_ARG_ENABLE(strict, |
| 3078 |
AC_HELP_STRING([--enable-strict], |
| 3079 |
[compiles with strict compiler options (may not work!)]), |
| 3080 |
[ |
| 3081 |
if test $enableval = "no"; then |
| 3082 |
kde_use_strict_options="no" |
| 3083 |
else |
| 3084 |
kde_use_strict_options="yes" |
| 3085 |
fi |
| 3086 |
], [kde_use_strict_options="no"]) |
| 3087 |
|
| 3088 |
AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]), |
| 3089 |
[ |
| 3090 |
if test $enableval = "no"; then |
| 3091 |
kde_use_warnings="no" |
| 3092 |
else |
| 3093 |
kde_use_warnings="yes" |
| 3094 |
fi |
| 3095 |
], [kde_use_warnings="yes"]) |
| 3096 |
|
| 3097 |
dnl enable warnings for debug build |
| 3098 |
if test "$kde_use_debug_code" != "no"; then |
| 3099 |
kde_use_warnings=yes |
| 3100 |
fi |
| 3101 |
|
| 3102 |
AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]), |
| 3103 |
[kde_use_profiling=$enableval], |
| 3104 |
[kde_use_profiling="no"] |
| 3105 |
) |
| 3106 |
|
| 3107 |
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS |
| 3108 |
CFLAGS=" $CFLAGS" |
| 3109 |
|
| 3110 |
AC_PROG_CC |
| 3111 |
|
| 3112 |
AC_PROG_CPP |
| 3113 |
|
| 3114 |
if test "$GCC" = "yes"; then |
| 3115 |
if test "$kde_use_debug_code" != "no"; then |
| 3116 |
if test $kde_use_debug_code = "full"; then |
| 3117 |
CFLAGS="-g3 -fno-inline $CFLAGS" |
| 3118 |
else |
| 3119 |
CFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CFLAGS" |
| 3120 |
fi |
| 3121 |
else |
| 3122 |
CFLAGS="-O2 $CFLAGS" |
| 3123 |
fi |
| 3124 |
fi |
| 3125 |
|
| 3126 |
if test "$kde_use_debug_define" = "yes"; then |
| 3127 |
CFLAGS="-DNDEBUG $CFLAGS" |
| 3128 |
fi |
| 3129 |
|
| 3130 |
|
| 3131 |
case "$host" in |
| 3132 |
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";; |
| 3133 |
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";; |
| 3134 |
esac |
| 3135 |
|
| 3136 |
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then |
| 3137 |
LDFLAGS="" |
| 3138 |
fi |
| 3139 |
|
| 3140 |
CXXFLAGS=" $CXXFLAGS" |
| 3141 |
|
| 3142 |
AC_PROG_CXX |
| 3143 |
|
| 3144 |
KDE_CHECK_FOR_BAD_COMPILER |
| 3145 |
|
| 3146 |
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then |
| 3147 |
if test "$kde_use_debug_code" != "no"; then |
| 3148 |
if test "$CXX" = "KCC"; then |
| 3149 |
CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS" |
| 3150 |
else |
| 3151 |
if test "$kde_use_debug_code" = "full"; then |
| 3152 |
CXXFLAGS="-g3 -fno-inline $CXXFLAGS" |
| 3153 |
else |
| 3154 |
CXXFLAGS="-g -O2 -fno-schedule-insns -fno-inline $CXXFLAGS" |
| 3155 |
fi |
| 3156 |
fi |
| 3157 |
KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"]) |
| 3158 |
|
| 3159 |
dnl convenience compiler flags |
| 3160 |
KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""]) |
| 3161 |
AC_SUBST(WOVERLOADED_VIRTUAL) |
| 3162 |
else |
| 3163 |
if test "$CXX" = "KCC"; then |
| 3164 |
CXXFLAGS="+K3 $CXXFLAGS" |
| 3165 |
else |
| 3166 |
CXXFLAGS="-O2 $CXXFLAGS" |
| 3167 |
fi |
| 3168 |
fi |
| 3169 |
fi |
| 3170 |
|
| 3171 |
if test "$kde_use_debug_define" = "yes"; then |
| 3172 |
CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS" |
| 3173 |
fi |
| 3174 |
|
| 3175 |
if test "$kde_use_profiling" = "yes"; then |
| 3176 |
KDE_CHECK_COMPILER_FLAG(pg, |
| 3177 |
[ |
| 3178 |
CFLAGS="-pg $CFLAGS" |
| 3179 |
CXXFLAGS="-pg $CXXFLAGS" |
| 3180 |
]) |
| 3181 |
fi |
| 3182 |
|
| 3183 |
if test "$kde_use_warnings" = "yes"; then |
| 3184 |
if test "$GCC" = "yes"; then |
| 3185 |
CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS" |
| 3186 |
case $host in |
| 3187 |
*-*-linux-gnu) |
| 3188 |
CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS" |
| 3189 |
CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts $CXXFLAGS" |
| 3190 |
KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"]) |
| 3191 |
KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"]) |
| 3192 |
;; |
| 3193 |
esac |
| 3194 |
KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"]) |
| 3195 |
KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"]) |
| 3196 |
dnl ### FIXME: revert for KDE 4 |
| 3197 |
KDE_CHECK_COMPILER_FLAG(Wno-non-virtual-dtor,[CXXFLAGS="$CXXFLAGS -Wno-non-virtual-dtor"]) |
| 3198 |
fi |
| 3199 |
fi |
| 3200 |
|
| 3201 |
if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then |
| 3202 |
CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS" |
| 3203 |
fi |
| 3204 |
|
| 3205 |
AC_ARG_ENABLE(pch, |
| 3206 |
AC_HELP_STRING([--enable-pch], |
| 3207 |
[enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]), |
| 3208 |
[ kde_use_pch=$enableval ],[ kde_use_pch=no ]) |
| 3209 |
|
| 3210 |
HAVE_GCC_VISIBILITY=0 |
| 3211 |
AC_SUBST([HAVE_GCC_VISIBILITY]) |
| 3212 |
|
| 3213 |
if test "$GXX" = "yes"; then |
| 3214 |
gcc_no_reorder_blocks=NO |
| 3215 |
KDE_CHECK_COMPILER_FLAG(fno-reorder-blocks,[gcc_no_reorder_blocks=YES]) |
| 3216 |
if test $kde_use_debug_code != "no" && \ |
| 3217 |
test $kde_use_debug_code != "full" && \ |
| 3218 |
test "YES" = "$gcc_no_reorder_blocks" ; then |
| 3219 |
CXXFLAGS="$CXXFLAGS -fno-reorder-blocks" |
| 3220 |
CFLAGS="$CFLAGS -fno-reorder-blocks" |
| 3221 |
fi |
| 3222 |
KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"]) |
| 3223 |
KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"]) |
| 3224 |
KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"]) |
| 3225 |
KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= ) |
| 3226 |
ENABLE_PERMISSIVE_FLAG="-fpermissive" |
| 3227 |
|
| 3228 |
if test "$kde_use_pch" = "yes"; then |
| 3229 |
AC_MSG_CHECKING(whether gcc supports precompiling c header files) |
| 3230 |
echo >conftest.h |
| 3231 |
if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then |
| 3232 |
kde_gcc_supports_pch=yes |
| 3233 |
AC_MSG_RESULT(yes) |
| 3234 |
else |
| 3235 |
kde_gcc_supports_pch=no |
| 3236 |
AC_MSG_RESULT(no) |
| 3237 |
fi |
| 3238 |
if test "$kde_gcc_supports_pch" = "yes"; then |
| 3239 |
AC_MSG_CHECKING(whether gcc supports precompiling c++ header files) |
| 3240 |
if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then |
| 3241 |
kde_gcc_supports_pch=yes |
| 3242 |
AC_MSG_RESULT(yes) |
| 3243 |
else |
| 3244 |
kde_gcc_supports_pch=no |
| 3245 |
AC_MSG_RESULT(no) |
| 3246 |
fi |
| 3247 |
fi |
| 3248 |
rm -f conftest.h conftest.h.gch |
| 3249 |
fi |
| 3250 |
|
| 3251 |
KDE_CHECK_FOR_OPT_NOINLINE_MATCH |
| 3252 |
if test "x$kde_cv_opt_noinline_match" = "xno" ; then |
| 3253 |
CFLAGS="`echo "$CFLAGS" | sed "s/ -fno-inline//"`" |
| 3254 |
fi |
| 3255 |
fi |
| 3256 |
AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes") |
| 3257 |
if test "$CXX" = "KCC"; then |
| 3258 |
dnl unfortunately we currently cannot disable exception support in KCC |
| 3259 |
dnl because doing so is binary incompatible and Qt by default links with exceptions :-( |
| 3260 |
dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"]) |
| 3261 |
dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= ) |
| 3262 |
|
| 3263 |
if test "$kde_use_pch" = "yes"; then |
| 3264 |
dnl TODO: support --pch-dir! |
| 3265 |
KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"]) |
| 3266 |
dnl the below works (but the dir must exist), but it's |
| 3267 |
dnl useless for a whole package. |
| 3268 |
dnl The are precompiled headers for each source file, so when compiling |
| 3269 |
dnl from scratch, it doesn't make a difference, and they take up |
| 3270 |
dnl around ~5Mb _per_ sourcefile. |
| 3271 |
dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp, |
| 3272 |
dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"]) |
| 3273 |
fi |
| 3274 |
dnl this flag controls inlining. by default KCC inlines in optimisation mode |
| 3275 |
dnl all implementations that are defined inside the class {} declaration. |
| 3276 |
dnl because of templates-compatibility with broken gcc compilers, this |
| 3277 |
dnl can cause excessive inlining. This flag limits it to a sane level |
| 3278 |
KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"]) |
| 3279 |
KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"]) |
| 3280 |
KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"]) |
| 3281 |
KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"]) |
| 3282 |
dnl Some source files are shared between multiple executables |
| 3283 |
dnl (or libraries) and some of those need template instantiations. |
| 3284 |
dnl In that case KCC needs to compile those sources with |
| 3285 |
dnl --one_instantiation_per_object. To make it easy for us we compile |
| 3286 |
dnl _all_ objects with that flag (--one_per is a shorthand). |
| 3287 |
KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"]) |
| 3288 |
fi |
| 3289 |
AC_SUBST(USE_EXCEPTIONS) |
| 3290 |
dnl obsolete macro - provided to keep things going |
| 3291 |
USE_RTTI= |
| 3292 |
AC_SUBST(USE_RTTI) |
| 3293 |
|
| 3294 |
case "$host" in |
| 3295 |
*-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;; |
| 3296 |
*-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";; |
| 3297 |
*-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";; |
| 3298 |
*-*-solaris*) |
| 3299 |
if test "$GXX" = yes; then |
| 3300 |
libstdcpp=`$CXX -print-file-name=libstdc++.so` |
| 3301 |
if test ! -f $libstdcpp; then |
| 3302 |
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]) |
| 3303 |
fi |
| 3304 |
fi |
| 3305 |
;; |
| 3306 |
esac |
| 3307 |
|
| 3308 |
AC_VALIDIFY_CXXFLAGS |
| 3309 |
|
| 3310 |
AC_PROG_CXXCPP |
| 3311 |
|
| 3312 |
if test "$GCC" = yes; then |
| 3313 |
NOOPT_CFLAGS=-O0 |
| 3314 |
fi |
| 3315 |
KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0]) |
| 3316 |
|
| 3317 |
AC_ARG_ENABLE(coverage, |
| 3318 |
AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [ |
| 3319 |
if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then |
| 3320 |
ac_coverage_compiler="-fprofile-arcs -ftest-coverage" |
| 3321 |
ac_coverage_linker="-lgcc" |
| 3322 |
elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then |
| 3323 |
ac_coverage_compiler="-fprofile-arcs -ftest-coverage" |
| 3324 |
ac_coverage_linker="" |
| 3325 |
else |
| 3326 |
AC_MSG_ERROR([coverage with your compiler is not supported]) |
| 3327 |
fi |
| 3328 |
CFLAGS="$CFLAGS $ac_coverage_compiler" |
| 3329 |
CXXFLAGS="$CXXFLAGS $ac_coverage_compiler" |
| 3330 |
LDFLAGS="$LDFLAGS $ac_coverage_linker" |
| 3331 |
]) |
| 3332 |
|
| 3333 |
AC_SUBST(NOOPT_CXXFLAGS) |
| 3334 |
AC_SUBST(NOOPT_CFLAGS) |
| 3335 |
AC_SUBST(ENABLE_PERMISSIVE_FLAG) |
| 3336 |
|
| 3337 |
KDE_CHECK_NEW_LDFLAGS |
| 3338 |
KDE_CHECK_FINAL |
| 3339 |
KDE_CHECK_CLOSURE |
| 3340 |
KDE_CHECK_NMCHECK |
| 3341 |
|
| 3342 |
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), []) |
| 3343 |
]) |
| 3344 |
|
| 3345 |
AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG], |
| 3346 |
[ |
| 3347 |
AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug, |
| 3348 |
[ |
| 3349 |
AC_LANG_SAVE |
| 3350 |
AC_LANG_CPLUSPLUS |
| 3351 |
|
| 3352 |
safe_CXXFLAGS=$CXXFLAGS |
| 3353 |
safe_LDFLAGS=$LDFLAGS |
| 3354 |
CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0" |
| 3355 |
LDFLAGS="$LDFLAGS -shared -fPIC" |
| 3356 |
|
| 3357 |
AC_TRY_LINK( |
| 3358 |
[ |
| 3359 |
/* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */ |
| 3360 |
#include <string> |
| 3361 |
int some_function( void ) __attribute__ ((visibility("default"))); |
| 3362 |
int some_function( void ) |
| 3363 |
{ |
| 3364 |
std::string s("blafasel"); |
| 3365 |
return 0; |
| 3366 |
} |
| 3367 |
], [/* elvis is alive */], |
| 3368 |
kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes) |
| 3369 |
|
| 3370 |
CXXFLAGS=$safe_CXXFLAGS |
| 3371 |
LDFLAGS=$safe_LDFLAGS |
| 3372 |
AC_LANG_RESTORE |
| 3373 |
] |
| 3374 |
) |
| 3375 |
|
| 3376 |
if test x$kde_cv_val_gcc_visibility_bug = xno; then |
| 3377 |
CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden" |
| 3378 |
fi |
| 3379 |
] |
| 3380 |
) |
| 3381 |
|
| 3382 |
AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY], |
| 3383 |
[ |
| 3384 |
AC_BEFORE([AC_PATH_QT_1_3], [KDE_ENABLE_HIDDEN_VISIBILITY]) |
| 3385 |
|
| 3386 |
AC_MSG_CHECKING([grepping for visibility push/pop in headers]) |
| 3387 |
|
| 3388 |
if test "x$GXX" = "xyes"; then |
| 3389 |
AC_LANG_SAVE |
| 3390 |
AC_LANG_CPLUSPLUS |
| 3391 |
AC_EGREP_CPP( |
| 3392 |
[GCC visibility push], |
| 3393 |
[ #include <exception> |
| 3394 |
], |
| 3395 |
[ |
| 3396 |
AC_MSG_RESULT(yes) |
| 3397 |
kde_stdc_visibility_patched=yes ], |
| 3398 |
[ |
| 3399 |
AC_MSG_RESULT(no) |
| 3400 |
AC_MSG_WARN([Your libstdc++ doesn't appear to be patched for |
| 3401 |
visibility support. Disabling -fvisibility=hidden]) |
| 3402 |
|
| 3403 |
kde_stdc_visibility_patched=no ]) |
| 3404 |
|
| 3405 |
AC_LANG_RESTORE |
| 3406 |
|
| 3407 |
kde_have_gcc_visibility=no |
| 3408 |
KDE_CHECK_COMPILER_FLAG(fvisibility=hidden, |
| 3409 |
[ |
| 3410 |
kde_have_gcc_visibility=yes |
| 3411 |
dnl the whole toolchain is just a mess, gcc is just too buggy |
| 3412 |
dnl to handle STL with visibility enabled. Lets reconsider |
| 3413 |
dnl when gcc 4.2 is out or when things get fixed in the compiler. |
| 3414 |
dnl Contact mueller@kde.org for details. |
| 3415 |
AC_ARG_ENABLE(gcc-hidden-visibility, |
| 3416 |
AC_HELP_STRING([--enable-gcc-hidden-visibility],[toolchain hidden visibility [default=no]]), |
| 3417 |
[kde_have_gcc_visibility=$enableval], |
| 3418 |
[kde_have_gcc_visibility=no]) |
| 3419 |
|
| 3420 |
AC_CACHE_CHECK([if Qt is patched for -fvisibility], kde_cv_val_qt_gcc_visibility_patched, |
| 3421 |
[ |
| 3422 |
AC_LANG_SAVE |
| 3423 |
AC_LANG_CPLUSPLUS |
| 3424 |
|
| 3425 |
safe_CXXFLAGS=$CXXFLAGS |
| 3426 |
CXXFLAGS="$CXXFLAGS $all_includes" |
| 3427 |
|
| 3428 |
AC_TRY_COMPILE( |
| 3429 |
[ |
| 3430 |
#include <qglobal.h> |
| 3431 |
#if Q_EXPORT - 0 != 0 |
| 3432 |
/* if this compiles, then Q_EXPORT is undefined */ |
| 3433 |
/* if Q_EXPORT is nonempty, this will break compilation */ |
| 3434 |
#endif |
| 3435 |
], [/* elvis is alive */], |
| 3436 |
kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes) |
| 3437 |
|
| 3438 |
CXXFLAGS=$safe_CXXFLAGS |
| 3439 |
AC_LANG_RESTORE |
| 3440 |
] |
| 3441 |
) |
| 3442 |
|
| 3443 |
if test x$kde_have_gcc_visibility = "xyes" && test x$kde_stdc_visibility_patched = "xyes" && test x$kde_cv_val_qt_gcc_visibility_patched = "xyes"; then |
| 3444 |
CXXFLAGS="$CXXFLAGS -fvisibility=hidden" |
| 3445 |
KDE_CHECK_VISIBILITY_GCC_BUG |
| 3446 |
HAVE_GCC_VISIBILITY=1 |
| 3447 |
AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported]) |
| 3448 |
fi |
| 3449 |
]) |
| 3450 |
fi |
| 3451 |
]) |
| 3452 |
|
| 3453 |
AC_DEFUN([KDE_ADD_DEPENDENCIES], |
| 3454 |
[ |
| 3455 |
[A]M_DEPENDENCIES(CC) |
| 3456 |
[A]M_DEPENDENCIES(CXX) |
| 3457 |
]) |
| 3458 |
|
| 3459 |
dnl just a wrapper to clean up configure.in |
| 3460 |
AC_DEFUN([KDE_PROG_LIBTOOL], |
| 3461 |
[ |
| 3462 |
AC_REQUIRE([AC_CHECK_COMPILERS]) |
| 3463 |
AC_REQUIRE([AC_ENABLE_SHARED]) |
| 3464 |
AC_REQUIRE([AC_ENABLE_STATIC]) |
| 3465 |
|
| 3466 |
AC_REQUIRE([AC_LIBTOOL_DLOPEN]) |
| 3467 |
AC_REQUIRE([KDE_CHECK_LIB64]) |
| 3468 |
|
| 3469 |
AC_OBJEXT |
| 3470 |
AC_EXEEXT |
| 3471 |
|
| 3472 |
AM_PROG_LIBTOOL |
| 3473 |
AC_LIBTOOL_CXX |
| 3474 |
|
| 3475 |
LIBTOOL_SHELL="/bin/sh ./libtool" |
| 3476 |
# LIBTOOL="$LIBTOOL --silent" |
| 3477 |
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)" |
| 3478 |
AC_SUBST(KDE_PLUGIN) |
| 3479 |
|
| 3480 |
# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs. |
| 3481 |
KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)" |
| 3482 |
AC_SUBST(KDE_CHECK_PLUGIN) |
| 3483 |
|
| 3484 |
# we patch configure quite some so we better keep that consistent for incremental runs |
| 3485 |
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure') |
| 3486 |
]) |
| 3487 |
|
| 3488 |
AC_DEFUN([KDE_CHECK_LIB64], |
| 3489 |
[ |
| 3490 |
AC_ARG_ENABLE(libsuffix, |
| 3491 |
AC_HELP_STRING([--enable-libsuffix], |
| 3492 |
[/lib directory suffix (64,32,none,auto[=default])]), |
| 3493 |
kdelibsuff=$enableval, kdelibsuff="auto") |
| 3494 |
|
| 3495 |
if test "$kdelibsuff" = "auto"; then |
| 3496 |
|
| 3497 |
cat > conftest.c << EOF |
| 3498 |
#include <stdio.h> |
| 3499 |
int main() { |
| 3500 |
return 0; |
| 3501 |
} |
| 3502 |
EOF |
| 3503 |
kdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out |sed -ne '/libc.so/{ |
| 3504 |
s,.*/lib\([[^\/]]*\)/.*,\1, |
| 3505 |
p |
| 3506 |
}'` |
| 3507 |
rm -rf conftest.* |
| 3508 |
fi |
| 3509 |
|
| 3510 |
if test "$kdelibsuff" = "no" || test "$kdelibsuff" = "none"; then |
| 3511 |
kdelibsuff= |
| 3512 |
fi |
| 3513 |
if test -z "$kdelibsuff"; then |
| 3514 |
AC_MSG_RESULT([not using lib directory suffix]) |
| 3515 |
AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories) |
| 3516 |
else |
| 3517 |
if test "$libdir" = '${exec_prefix}/lib'; then |
| 3518 |
libdir="$libdir${kdelibsuff}" |
| 3519 |
AC_SUBST([libdir], ["$libdir"]) dnl ugly hack for lib64 platforms |
| 3520 |
fi |
| 3521 |
AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories) |
| 3522 |
AC_MSG_RESULT([using lib directory suffix $kdelibsuff]) |
| 3523 |
fi |
| 3524 |
]) |
| 3525 |
|
| 3526 |
AC_DEFUN([KDE_CHECK_TYPES], |
| 3527 |
[ AC_CHECK_SIZEOF(int, 4)dnl |
| 3528 |
AC_CHECK_SIZEOF(short)dnl |
| 3529 |
AC_CHECK_SIZEOF(long, 4)dnl |
| 3530 |
AC_CHECK_SIZEOF(char *, 4)dnl |
| 3531 |
])dnl |
| 3532 |
|
| 3533 |
dnl Not used - kept for compat only? |
| 3534 |
AC_DEFUN([KDE_DO_IT_ALL], |
| 3535 |
[ |
| 3536 |
AC_CANONICAL_SYSTEM |
| 3537 |
AC_ARG_PROGRAM |
| 3538 |
AM_INIT_AUTOMAKE($1, $2) |
| 3539 |
AM_DISABLE_LIBRARIES |
| 3540 |
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde}) |
| 3541 |
AC_CHECK_COMPILERS |
| 3542 |
KDE_PROG_LIBTOOL |
| 3543 |
AM_KDE_WITH_NLS |
| 3544 |
AC_PATH_KDE |
| 3545 |
]) |
| 3546 |
|
| 3547 |
AC_DEFUN([AC_CHECK_RPATH], |
| 3548 |
[ |
| 3549 |
AC_MSG_CHECKING(for rpath) |
| 3550 |
AC_ARG_ENABLE(rpath, |
| 3551 |
AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]), |
| 3552 |
USE_RPATH=$enableval, USE_RPATH=yes) |
| 3553 |
|
| 3554 |
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then |
| 3555 |
|
| 3556 |
KDE_RPATH="-R \$(libdir)" |
| 3557 |
|
| 3558 |
if test "$kde_libraries" != "$libdir"; then |
| 3559 |
KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)" |
| 3560 |
fi |
| 3561 |
|
| 3562 |
if test -n "$qt_libraries"; then |
| 3563 |
KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)" |
| 3564 |
fi |
| 3565 |
dnl $x_libraries is set to /usr/lib in case |
| 3566 |
if test -n "$X_LDFLAGS"; then |
| 3567 |
X_RPATH="-R \$(x_libraries)" |
| 3568 |
KDE_RPATH="$KDE_RPATH $X_RPATH" |
| 3569 |
fi |
| 3570 |
if test -n "$KDE_EXTRA_RPATH"; then |
| 3571 |
KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)" |
| 3572 |
fi |
| 3573 |
fi |
| 3574 |
AC_SUBST(KDE_EXTRA_RPATH) |
| 3575 |
AC_SUBST(KDE_RPATH) |
| 3576 |
AC_SUBST(X_RPATH) |
| 3577 |
AC_MSG_RESULT($USE_RPATH) |
| 3578 |
]) |
| 3579 |
|
| 3580 |
dnl Check for the type of the third argument of getsockname |
| 3581 |
AC_DEFUN([AC_CHECK_SOCKLEN_T], |
| 3582 |
[ |
| 3583 |
AC_MSG_CHECKING(for socklen_t) |
| 3584 |
AC_CACHE_VAL(kde_cv_socklen_t, |
| 3585 |
[ |
| 3586 |
AC_LANG_PUSH(C++) |
| 3587 |
kde_cv_socklen_t=no |
| 3588 |
AC_TRY_COMPILE([ |
| 3589 |
#include <sys/types.h> |
| 3590 |
#include <sys/socket.h> |
| 3591 |
], |
| 3592 |
[ |
| 3593 |
socklen_t len; |
| 3594 |
getpeername(0,0,&len); |
| 3595 |
], |
| 3596 |
[ |
| 3597 |
kde_cv_socklen_t=yes |
| 3598 |
kde_cv_socklen_t_equiv=socklen_t |
| 3599 |
]) |
| 3600 |
AC_LANG_POP(C++) |
| 3601 |
]) |
| 3602 |
AC_MSG_RESULT($kde_cv_socklen_t) |
| 3603 |
if test $kde_cv_socklen_t = no; then |
| 3604 |
AC_MSG_CHECKING([for socklen_t equivalent for socket functions]) |
| 3605 |
AC_CACHE_VAL(kde_cv_socklen_t_equiv, |
| 3606 |
[ |
| 3607 |
kde_cv_socklen_t_equiv=int |
| 3608 |
AC_LANG_PUSH(C++) |
| 3609 |
for t in int size_t unsigned long "unsigned long"; do |
| 3610 |
AC_TRY_COMPILE([ |
| 3611 |
#include <sys/types.h> |
| 3612 |
#include <sys/socket.h> |
| 3613 |
], |
| 3614 |
[ |
| 3615 |
$t len; |
| 3616 |
getpeername(0,0,&len); |
| 3617 |
], |
| 3618 |
[ |
| 3619 |
kde_cv_socklen_t_equiv="$t" |
| 3620 |
break |
| 3621 |
]) |
| 3622 |
done |
| 3623 |
AC_LANG_POP(C++) |
| 3624 |
]) |
| 3625 |
AC_MSG_RESULT($kde_cv_socklen_t_equiv) |
| 3626 |
fi |
| 3627 |
AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv, |
| 3628 |
[type to use in place of socklen_t if not defined]) |
| 3629 |
AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv, |
| 3630 |
[type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)]) |
| 3631 |
]) |
| 3632 |
|
| 3633 |
dnl This is a merge of some macros out of the gettext aclocal.m4 |
| 3634 |
dnl since we don't need anything, I took the things we need |
| 3635 |
dnl the copyright for them is: |
| 3636 |
dnl > |
| 3637 |
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. |
| 3638 |
dnl This Makefile.in is free software; the Free Software Foundation |
| 3639 |
dnl gives unlimited permission to copy and/or distribute it, |
| 3640 |
dnl with or without modifications, as long as this notice is preserved. |
| 3641 |
|
| 3642 |
dnl This program is distributed in the hope that it will be useful, |
| 3643 |
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
| 3644 |
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 3645 |
dnl PARTICULAR PURPOSE. |
| 3646 |
dnl > |
| 3647 |
dnl for this file it is relicensed under LGPL |
| 3648 |
|
| 3649 |
AC_DEFUN([AM_KDE_WITH_NLS], |
| 3650 |
[ |
| 3651 |
dnl If we use NLS figure out what method |
| 3652 |
|
| 3653 |
AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt, |
| 3654 |
[test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt) |
| 3655 |
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
| 3656 |
|
| 3657 |
if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then |
| 3658 |
AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it]) |
| 3659 |
GMSGFMT=":" |
| 3660 |
fi |
| 3661 |
MSGFMT=$GMSGFMT |
| 3662 |
AC_SUBST(GMSGFMT) |
| 3663 |
AC_SUBST(MSGFMT) |
| 3664 |
|
| 3665 |
AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext, |
| 3666 |
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
| 3667 |
|
| 3668 |
dnl Test whether we really found GNU xgettext. |
| 3669 |
if test "$XGETTEXT" != ":"; then |
| 3670 |
dnl If it is no GNU xgettext we define it as : so that the |
| 3671 |
dnl Makefiles still can work. |
| 3672 |
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then |
| 3673 |
: ; |
| 3674 |
else |
| 3675 |
AC_MSG_RESULT( |
| 3676 |
[found xgettext programs is not GNU xgettext; ignore it]) |
| 3677 |
XGETTEXT=":" |
| 3678 |
fi |
| 3679 |
fi |
| 3680 |
AC_SUBST(XGETTEXT) |
| 3681 |
|
| 3682 |
]) |
| 3683 |
|
| 3684 |
# Search path for a program which passes the given test. |
| 3685 |
# Ulrich Drepper <drepper@cygnus.com>, 1996. |
| 3686 |
|
| 3687 |
# serial 1 |
| 3688 |
# Stephan Kulow: I appended a _KDE against name conflicts |
| 3689 |
|
| 3690 |
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR, |
| 3691 |
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) |
| 3692 |
AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE], |
| 3693 |
[# Extract the first word of "$2", so it can be a program name with args. |
| 3694 |
set dummy $2; ac_word=[$]2 |
| 3695 |
AC_MSG_CHECKING([for $ac_word]) |
| 3696 |
AC_CACHE_VAL(ac_cv_path_$1, |
| 3697 |
[case "[$]$1" in |
| 3698 |
/*) |
| 3699 |
ac_cv_path_$1="[$]$1" # Let the user override the test with a path. |
| 3700 |
;; |
| 3701 |
*) |
| 3702 |
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
| 3703 |
for ac_dir in ifelse([$5], , $PATH, [$5]); do |
| 3704 |
test -z "$ac_dir" && ac_dir=. |
| 3705 |
if test -f $ac_dir/$ac_word; then |
| 3706 |
if [$3]; then |
| 3707 |
ac_cv_path_$1="$ac_dir/$ac_word" |
| 3708 |
break |
| 3709 |
fi |
| 3710 |
fi |
| 3711 |
done |
| 3712 |
IFS="$ac_save_ifs" |
| 3713 |
dnl If no 4th arg is given, leave the cache variable unset, |
| 3714 |
dnl so AC_PATH_PROGS will keep looking. |
| 3715 |
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" |
| 3716 |
])dnl |
| 3717 |
;; |
| 3718 |
esac])dnl |
| 3719 |
$1="$ac_cv_path_$1" |
| 3720 |
if test -n "[$]$1"; then |
| 3721 |
AC_MSG_RESULT([$]$1) |
| 3722 |
else |
| 3723 |
AC_MSG_RESULT(no) |
| 3724 |
fi |
| 3725 |
AC_SUBST($1)dnl |
| 3726 |
]) |
| 3727 |
|
| 3728 |
|
| 3729 |
# Check whether LC_MESSAGES is available in <locale.h>. |
| 3730 |
# Ulrich Drepper <drepper@cygnus.com>, 1995. |
| 3731 |
|
| 3732 |
# serial 1 |
| 3733 |
|
| 3734 |
AC_DEFUN([AM_LC_MESSAGES], |
| 3735 |
[if test $ac_cv_header_locale_h = yes; then |
| 3736 |
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, |
| 3737 |
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], |
| 3738 |
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) |
| 3739 |
if test $am_cv_val_LC_MESSAGES = yes; then |
| 3740 |
AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES]) |
| 3741 |
fi |
| 3742 |
fi]) |
| 3743 |
|
| 3744 |
dnl From Jim Meyering. |
| 3745 |
dnl FIXME: migrate into libit. |
| 3746 |
|
| 3747 |
AC_DEFUN([AM_FUNC_OBSTACK], |
| 3748 |
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack, |
| 3749 |
[AC_TRY_LINK([#include "obstack.h"], |
| 3750 |
[struct obstack *mem;obstack_free(mem,(char *) 0)], |
| 3751 |
am_cv_func_obstack=yes, |
| 3752 |
am_cv_func_obstack=no)]) |
| 3753 |
if test $am_cv_func_obstack = yes; then |
| 3754 |
AC_DEFINE(HAVE_OBSTACK) |
| 3755 |
else |
| 3756 |
LIBOBJS="$LIBOBJS obstack.o" |
| 3757 |
fi |
| 3758 |
]) |
| 3759 |
|
| 3760 |
dnl From Jim Meyering. Use this if you use the GNU error.[ch]. |
| 3761 |
dnl FIXME: Migrate into libit |
| 3762 |
|
| 3763 |
AC_DEFUN([AM_FUNC_ERROR_AT_LINE], |
| 3764 |
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line, |
| 3765 |
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");], |
| 3766 |
am_cv_lib_error_at_line=yes, |
| 3767 |
am_cv_lib_error_at_line=no)]) |
| 3768 |
if test $am_cv_lib_error_at_line = no; then |
| 3769 |
LIBOBJS="$LIBOBJS error.o" |
| 3770 |
fi |
| 3771 |
AC_SUBST(LIBOBJS)dnl |
| 3772 |
]) |
| 3773 |
|
| 3774 |
# Macro to add for using GNU gettext. |
| 3775 |
# Ulrich Drepper <drepper@cygnus.com>, 1995. |
| 3776 |
|
| 3777 |
# serial 1 |
| 3778 |
# Stephan Kulow: I put a KDE in it to avoid name conflicts |
| 3779 |
|
| 3780 |
AC_DEFUN([AM_KDE_GNU_GETTEXT], |
| 3781 |
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
| 3782 |
AC_REQUIRE([AC_PROG_RANLIB])dnl |
| 3783 |
AC_REQUIRE([AC_HEADER_STDC])dnl |
| 3784 |
AC_REQUIRE([AC_TYPE_OFF_T])dnl |
| 3785 |
AC_REQUIRE([AC_TYPE_SIZE_T])dnl |
| 3786 |
AC_REQUIRE([AC_FUNC_ALLOCA])dnl |
| 3787 |
AC_REQUIRE([AC_FUNC_MMAP])dnl |
| 3788 |
AC_REQUIRE([AM_KDE_WITH_NLS])dnl |
| 3789 |
AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h]) |
| 3790 |
AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \ |
| 3791 |
__argz_count __argz_stringify __argz_next]) |
| 3792 |
|
| 3793 |
AC_MSG_CHECKING(for stpcpy) |
| 3794 |
AC_CACHE_VAL(kde_cv_func_stpcpy, |
| 3795 |
[ |
| 3796 |
kde_safe_cxxflags=$CXXFLAGS |
| 3797 |
CXXFLAGS="-Werror" |
| 3798 |
AC_LANG_SAVE |
| 3799 |
AC_LANG_CPLUSPLUS |
| 3800 |
AC_TRY_COMPILE([ |
| 3801 |
#include <string.h> |
| 3802 |
], |
| 3803 |
[ |
| 3804 |
char buffer[200]; |
| 3805 |
stpcpy(buffer, buffer); |
| 3806 |
], |
| 3807 |
kde_cv_func_stpcpy=yes, |
| 3808 |
kde_cv_func_stpcpy=no) |
| 3809 |
AC_LANG_RESTORE |
| 3810 |
CXXFLAGS=$kde_safe_cxxflags |
| 3811 |
]) |
| 3812 |
AC_MSG_RESULT($kde_cv_func_stpcpy) |
| 3813 |
if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then |
| 3814 |
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy]) |
| 3815 |
fi |
| 3816 |
|
| 3817 |
AM_LC_MESSAGES |
| 3818 |
|
| 3819 |
if test "x$CATOBJEXT" != "x"; then |
| 3820 |
if test "x$ALL_LINGUAS" = "x"; then |
| 3821 |
LINGUAS= |
| 3822 |
else |
| 3823 |
AC_MSG_CHECKING(for catalogs to be installed) |
| 3824 |
NEW_LINGUAS= |
| 3825 |
for lang in ${LINGUAS=$ALL_LINGUAS}; do |
| 3826 |
case "$ALL_LINGUAS" in |
| 3827 |
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; |
| 3828 |
esac |
| 3829 |
done |
| 3830 |
LINGUAS=$NEW_LINGUAS |
| 3831 |
AC_MSG_RESULT($LINGUAS) |
| 3832 |
fi |
| 3833 |
|
| 3834 |
dnl Construct list of names of catalog files to be constructed. |
| 3835 |
if test -n "$LINGUAS"; then |
| 3836 |
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done |
| 3837 |
fi |
| 3838 |
fi |
| 3839 |
|
| 3840 |
]) |
| 3841 |
|
| 3842 |
AC_DEFUN([AC_HAVE_XPM], |
| 3843 |
[AC_REQUIRE_CPP()dnl |
| 3844 |
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 3845 |
|
| 3846 |
test -z "$XPM_LDFLAGS" && XPM_LDFLAGS= |
| 3847 |
test -z "$XPM_INCLUDE" && XPM_INCLUDE= |
| 3848 |
|
| 3849 |
AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]), |
| 3850 |
xpm_test=$withval, xpm_test="yes") |
| 3851 |
if test "x$xpm_test" = xno; then |
| 3852 |
ac_cv_have_xpm=no |
| 3853 |
else |
| 3854 |
AC_MSG_CHECKING(for XPM) |
| 3855 |
AC_CACHE_VAL(ac_cv_have_xpm, |
| 3856 |
[ |
| 3857 |
ac_save_ldflags="$LDFLAGS" |
| 3858 |
ac_save_cflags="$CFLAGS" |
| 3859 |
if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then |
| 3860 |
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET" |
| 3861 |
else |
| 3862 |
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET" |
| 3863 |
fi |
| 3864 |
CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES" |
| 3865 |
test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS" |
| 3866 |
AC_TRY_LINK([#include <X11/xpm.h>],[], |
| 3867 |
ac_cv_have_xpm="yes",ac_cv_have_xpm="no") |
| 3868 |
LDFLAGS="$ac_save_ldflags" |
| 3869 |
CFLAGS="$ac_save_cflags" |
| 3870 |
])dnl |
| 3871 |
|
| 3872 |
if test "$ac_cv_have_xpm" = no; then |
| 3873 |
AC_MSG_RESULT(no) |
| 3874 |
XPM_LDFLAGS="" |
| 3875 |
XPMINC="" |
| 3876 |
$2 |
| 3877 |
else |
| 3878 |
AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support]) |
| 3879 |
if test "$XPM_LDFLAGS" = ""; then |
| 3880 |
XPMLIB='-lXpm $(LIB_X11)' |
| 3881 |
else |
| 3882 |
XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)' |
| 3883 |
fi |
| 3884 |
if test "$XPM_INCLUDE" = ""; then |
| 3885 |
XPMINC="" |
| 3886 |
else |
| 3887 |
XPMINC="-I$XPM_INCLUDE" |
| 3888 |
fi |
| 3889 |
AC_MSG_RESULT(yes) |
| 3890 |
$1 |
| 3891 |
fi |
| 3892 |
fi |
| 3893 |
AC_SUBST(XPMINC) |
| 3894 |
AC_SUBST(XPMLIB) |
| 3895 |
]) |
| 3896 |
|
| 3897 |
AC_DEFUN([AC_HAVE_DPMS], |
| 3898 |
[AC_REQUIRE_CPP()dnl |
| 3899 |
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 3900 |
|
| 3901 |
test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS= |
| 3902 |
test -z "$DPMS_INCLUDE" && DPMS_INCLUDE= |
| 3903 |
DPMS_LIB= |
| 3904 |
|
| 3905 |
AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]), |
| 3906 |
dpms_test=$withval, dpms_test="yes") |
| 3907 |
if test "x$dpms_test" = xno; then |
| 3908 |
ac_cv_have_dpms=no |
| 3909 |
else |
| 3910 |
AC_MSG_CHECKING(for DPMS) |
| 3911 |
dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms. |
| 3912 |
dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms". |
| 3913 |
AC_CACHE_VAL(ac_cv_have_dpms, |
| 3914 |
[ |
| 3915 |
if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then |
| 3916 |
AC_MSG_RESULT(no) |
| 3917 |
ac_cv_have_dpms="no" |
| 3918 |
else |
| 3919 |
ac_save_ldflags="$LDFLAGS" |
| 3920 |
ac_save_cflags="$CFLAGS" |
| 3921 |
ac_save_libs="$LIBS" |
| 3922 |
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries" |
| 3923 |
LIBS="-lX11 -lXext $LIBSOCKET" |
| 3924 |
CFLAGS="$CFLAGS $X_INCLUDES" |
| 3925 |
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS" |
| 3926 |
AC_TRY_LINK([ |
| 3927 |
#include <X11/Xproto.h> |
| 3928 |
#include <X11/X.h> |
| 3929 |
#include <X11/Xlib.h> |
| 3930 |
#include <X11/extensions/dpms.h> |
| 3931 |
int foo_test_dpms() |
| 3932 |
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[], |
| 3933 |
ac_cv_have_dpms="yes", [ |
| 3934 |
LIBS="-lXdpms $LIBS" |
| 3935 |
AC_TRY_LINK([ |
| 3936 |
#include <X11/Xproto.h> |
| 3937 |
#include <X11/X.h> |
| 3938 |
#include <X11/Xlib.h> |
| 3939 |
#include <X11/extensions/dpms.h> |
| 3940 |
int foo_test_dpms() |
| 3941 |
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[], |
| 3942 |
[ |
| 3943 |
ac_cv_have_dpms="-lXdpms" |
| 3944 |
],ac_cv_have_dpms="no") |
| 3945 |
]) |
| 3946 |
LDFLAGS="$ac_save_ldflags" |
| 3947 |
CFLAGS="$ac_save_cflags" |
| 3948 |
LIBS="$ac_save_libs" |
| 3949 |
fi |
| 3950 |
])dnl |
| 3951 |
|
| 3952 |
if test "$ac_cv_have_dpms" = no; then |
| 3953 |
AC_MSG_RESULT(no) |
| 3954 |
DPMS_LDFLAGS="" |
| 3955 |
DPMSINC="" |
| 3956 |
$2 |
| 3957 |
else |
| 3958 |
AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support]) |
| 3959 |
if test "$ac_cv_have_dpms" = "-lXdpms"; then |
| 3960 |
DPMS_LIB="-lXdpms" |
| 3961 |
fi |
| 3962 |
if test "$DPMS_LDFLAGS" = ""; then |
| 3963 |
DPMSLIB="$DPMS_LIB "'$(LIB_X11)' |
| 3964 |
else |
| 3965 |
DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)' |
| 3966 |
fi |
| 3967 |
if test "$DPMS_INCLUDE" = ""; then |
| 3968 |
DPMSINC="" |
| 3969 |
else |
| 3970 |
DPMSINC="-I$DPMS_INCLUDE" |
| 3971 |
fi |
| 3972 |
AC_MSG_RESULT(yes) |
| 3973 |
$1 |
| 3974 |
fi |
| 3975 |
fi |
| 3976 |
ac_save_cflags="$CFLAGS" |
| 3977 |
CFLAGS="$CFLAGS $X_INCLUDES" |
| 3978 |
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS" |
| 3979 |
AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO, |
| 3980 |
[Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>]) |
| 3981 |
AC_CHECK_DECL(DPMSCapable, |
| 3982 |
AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),, |
| 3983 |
[#include <X11/Xlib.h> |
| 3984 |
#include <X11/extensions/dpms.h>]) |
| 3985 |
AH_TEMPLATE(HAVE_DPMSINFO_PROTO, |
| 3986 |
[Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>]) |
| 3987 |
AC_CHECK_DECL(DPMSInfo, |
| 3988 |
AC_DEFINE(HAVE_DPMSINFO_PROTO),, |
| 3989 |
[#include <X11/Xlib.h> |
| 3990 |
#include <X11/extensions/dpms.h>]) |
| 3991 |
CFLAGS="$ac_save_cflags" |
| 3992 |
AC_SUBST(DPMSINC) |
| 3993 |
AC_SUBST(DPMSLIB) |
| 3994 |
]) |
| 3995 |
|
| 3996 |
AC_DEFUN([AC_HAVE_GL], |
| 3997 |
[AC_REQUIRE_CPP()dnl |
| 3998 |
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 3999 |
|
| 4000 |
test -z "$GL_LDFLAGS" && GL_LDFLAGS= |
| 4001 |
test -z "$GL_INCLUDE" && GL_INCLUDE= |
| 4002 |
|
| 4003 |
AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]), |
| 4004 |
gl_test=$withval, gl_test="yes") |
| 4005 |
if test "x$kde_use_qt_emb" = "xyes"; then |
| 4006 |
# GL and Qt Embedded is a no-go for now. |
| 4007 |
ac_cv_have_gl=no |
| 4008 |
elif test "x$gl_test" = xno; then |
| 4009 |
ac_cv_have_gl=no |
| 4010 |
else |
| 4011 |
AC_MSG_CHECKING(for GL) |
| 4012 |
AC_CACHE_VAL(ac_cv_have_gl, |
| 4013 |
[ |
| 4014 |
AC_LANG_SAVE |
| 4015 |
AC_LANG_CPLUSPLUS |
| 4016 |
ac_save_ldflags=$LDFLAGS |
| 4017 |
ac_save_cxxflags=$CXXFLAGS |
| 4018 |
ac_save_libs=$LIBS |
| 4019 |
LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries" |
| 4020 |
LIBS="$LIBS -lGL -lGLU" |
| 4021 |
test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11" |
| 4022 |
LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET" |
| 4023 |
CXXFLAGS="$CFLAGS $X_INCLUDES" |
| 4024 |
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS" |
| 4025 |
AC_TRY_LINK([#include <GL/gl.h> |
| 4026 |
#include <GL/glu.h> |
| 4027 |
], [], |
| 4028 |
ac_cv_have_gl="yes", ac_cv_have_gl="no") |
| 4029 |
AC_LANG_RESTORE |
| 4030 |
LDFLAGS=$ac_save_ldflags |
| 4031 |
CXXFLAGS=$ac_save_cxxflags |
| 4032 |
LIBS=$ac_save_libs |
| 4033 |
])dnl |
| 4034 |
|
| 4035 |
if test "$ac_cv_have_gl" = "no"; then |
| 4036 |
AC_MSG_RESULT(no) |
| 4037 |
GL_LDFLAGS="" |
| 4038 |
GLINC="" |
| 4039 |
$2 |
| 4040 |
else |
| 4041 |
AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)]) |
| 4042 |
if test "$GL_LDFLAGS" = ""; then |
| 4043 |
GLLIB='-lGLU -lGL $(LIB_X11)' |
| 4044 |
else |
| 4045 |
GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)' |
| 4046 |
fi |
| 4047 |
if test "$GL_INCLUDE" = ""; then |
| 4048 |
GLINC="" |
| 4049 |
else |
| 4050 |
GLINC="-I$GL_INCLUDE" |
| 4051 |
fi |
| 4052 |
AC_MSG_RESULT($ac_cv_have_gl) |
| 4053 |
$1 |
| 4054 |
fi |
| 4055 |
fi |
| 4056 |
AC_SUBST(GLINC) |
| 4057 |
AC_SUBST(GLLIB) |
| 4058 |
]) |
| 4059 |
|
| 4060 |
|
| 4061 |
dnl shadow password and PAM magic - maintained by ossi@kde.org |
| 4062 |
|
| 4063 |
AC_DEFUN([KDE_PAM], [ |
| 4064 |
AC_REQUIRE([KDE_CHECK_LIBDL]) |
| 4065 |
|
| 4066 |
want_pam= |
| 4067 |
AC_ARG_WITH(pam, |
| 4068 |
AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]), |
| 4069 |
[ if test "x$withval" = "xyes"; then |
| 4070 |
want_pam=yes |
| 4071 |
pam_service=kde |
| 4072 |
elif test "x$withval" = "xno"; then |
| 4073 |
want_pam=no |
| 4074 |
else |
| 4075 |
want_pam=yes |
| 4076 |
pam_service=$withval |
| 4077 |
fi |
| 4078 |
], [ pam_service=kde ]) |
| 4079 |
|
| 4080 |
use_pam= |
| 4081 |
PAMLIBS= |
| 4082 |
if test "x$want_pam" != xno; then |
| 4083 |
AC_CHECK_LIB(pam, pam_start, [ |
| 4084 |
AC_CHECK_HEADER(security/pam_appl.h, |
| 4085 |
[ pam_header=security/pam_appl.h ], |
| 4086 |
[ AC_CHECK_HEADER(pam/pam_appl.h, |
| 4087 |
[ pam_header=pam/pam_appl.h ], |
| 4088 |
[ |
| 4089 |
AC_MSG_WARN([PAM detected, but no headers found! |
| 4090 |
Make sure you have the necessary development packages installed.]) |
| 4091 |
] |
| 4092 |
) |
| 4093 |
] |
| 4094 |
) |
| 4095 |
], , $LIBDL) |
| 4096 |
if test -z "$pam_header"; then |
| 4097 |
if test "x$want_pam" = xyes; then |
| 4098 |
AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!]) |
| 4099 |
fi |
| 4100 |
else |
| 4101 |
AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)]) |
| 4102 |
PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL" |
| 4103 |
use_pam=yes |
| 4104 |
|
| 4105 |
dnl darwin claims to be something special |
| 4106 |
if test "$pam_header" = "pam/pam_appl.h"; then |
| 4107 |
AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/]) |
| 4108 |
fi |
| 4109 |
|
| 4110 |
dnl test whether struct pam_message is const (Linux) or not (Sun) |
| 4111 |
AC_MSG_CHECKING(for const pam_message) |
| 4112 |
AC_EGREP_HEADER([struct pam_message], $pam_header, |
| 4113 |
[ AC_EGREP_HEADER([const struct pam_message], $pam_header, |
| 4114 |
[AC_MSG_RESULT([const: Linux-type PAM])], |
| 4115 |
[AC_MSG_RESULT([nonconst: Sun-type PAM]) |
| 4116 |
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])] |
| 4117 |
)], |
| 4118 |
[AC_MSG_RESULT([not found - assume const, Linux-type PAM])]) |
| 4119 |
fi |
| 4120 |
fi |
| 4121 |
|
| 4122 |
AC_SUBST(PAMLIBS) |
| 4123 |
]) |
| 4124 |
|
| 4125 |
dnl DEF_PAM_SERVICE(arg name, full name, define name) |
| 4126 |
AC_DEFUN([DEF_PAM_SERVICE], [ |
| 4127 |
AC_ARG_WITH($1-pam, |
| 4128 |
AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]), |
| 4129 |
[ if test "x$use_pam" = xyes; then |
| 4130 |
$3_PAM_SERVICE=$withval |
| 4131 |
else |
| 4132 |
AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected. |
| 4133 |
You may want to enforce it by using --with-pam.]) |
| 4134 |
fi |
| 4135 |
], |
| 4136 |
[ if test "x$use_pam" = xyes; then |
| 4137 |
$3_PAM_SERVICE="$pam_service" |
| 4138 |
fi |
| 4139 |
]) |
| 4140 |
if test -n "$$3_PAM_SERVICE"; then |
| 4141 |
AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE]) |
| 4142 |
AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2]) |
| 4143 |
fi |
| 4144 |
AC_SUBST($3_PAM_SERVICE) |
| 4145 |
]) |
| 4146 |
|
| 4147 |
AC_DEFUN([KDE_SHADOWPASSWD], [ |
| 4148 |
AC_REQUIRE([KDE_PAM]) |
| 4149 |
|
| 4150 |
AC_CHECK_LIB(shadow, getspent, |
| 4151 |
[ LIBSHADOW="-lshadow" |
| 4152 |
ac_use_shadow=yes |
| 4153 |
], |
| 4154 |
[ dnl for UnixWare |
| 4155 |
AC_CHECK_LIB(gen, getspent, |
| 4156 |
[ LIBGEN="-lgen" |
| 4157 |
ac_use_shadow=yes |
| 4158 |
], |
| 4159 |
[ AC_CHECK_FUNC(getspent, |
| 4160 |
[ ac_use_shadow=yes ], |
| 4161 |
[ ac_use_shadow=no ]) |
| 4162 |
]) |
| 4163 |
]) |
| 4164 |
AC_SUBST(LIBSHADOW) |
| 4165 |
AC_SUBST(LIBGEN) |
| 4166 |
|
| 4167 |
AC_MSG_CHECKING([for shadow passwords]) |
| 4168 |
|
| 4169 |
AC_ARG_WITH(shadow, |
| 4170 |
AC_HELP_STRING([--with-shadow],[If you want shadow password support]), |
| 4171 |
[ if test "x$withval" != "xno"; then |
| 4172 |
use_shadow=yes |
| 4173 |
else |
| 4174 |
use_shadow=no |
| 4175 |
fi |
| 4176 |
], [ |
| 4177 |
use_shadow="$ac_use_shadow" |
| 4178 |
]) |
| 4179 |
|
| 4180 |
if test "x$use_shadow" = xyes; then |
| 4181 |
AC_MSG_RESULT(yes) |
| 4182 |
AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords]) |
| 4183 |
else |
| 4184 |
AC_MSG_RESULT(no) |
| 4185 |
LIBSHADOW= |
| 4186 |
LIBGEN= |
| 4187 |
fi |
| 4188 |
|
| 4189 |
dnl finally make the relevant binaries setuid root, if we have shadow passwds. |
| 4190 |
dnl this still applies, if we could use it indirectly through pam. |
| 4191 |
if test "x$use_shadow" = xyes || |
| 4192 |
( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then |
| 4193 |
case $host in |
| 4194 |
*-*-freebsd* | *-*-netbsd* | *-*-openbsd*) |
| 4195 |
SETUIDFLAGS="-m 4755 -o root";; |
| 4196 |
*) |
| 4197 |
SETUIDFLAGS="-m 4755";; |
| 4198 |
esac |
| 4199 |
fi |
| 4200 |
AC_SUBST(SETUIDFLAGS) |
| 4201 |
|
| 4202 |
]) |
| 4203 |
|
| 4204 |
AC_DEFUN([KDE_PASSWDLIBS], [ |
| 4205 |
AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT |
| 4206 |
AC_REQUIRE([KDE_PAM]) |
| 4207 |
AC_REQUIRE([KDE_SHADOWPASSWD]) |
| 4208 |
|
| 4209 |
if test "x$use_pam" = "xyes"; then |
| 4210 |
PASSWDLIBS="$PAMLIBS" |
| 4211 |
else |
| 4212 |
PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN" |
| 4213 |
fi |
| 4214 |
|
| 4215 |
dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but |
| 4216 |
dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires |
| 4217 |
dnl root to read, so kcheckpass needs to be root (even when using pam, since pam |
| 4218 |
dnl may need to read /etc/master.passwd). |
| 4219 |
case $host in |
| 4220 |
*-*-freebsd*) |
| 4221 |
SETUIDFLAGS="-m 4755 -o root" |
| 4222 |
;; |
| 4223 |
*) |
| 4224 |
;; |
| 4225 |
esac |
| 4226 |
|
| 4227 |
AC_SUBST(PASSWDLIBS) |
| 4228 |
]) |
| 4229 |
|
| 4230 |
AC_DEFUN([KDE_CHECK_LIBDL], |
| 4231 |
[ |
| 4232 |
AC_CHECK_LIB(dl, dlopen, [ |
| 4233 |
LIBDL="-ldl" |
| 4234 |
ac_cv_have_dlfcn=yes |
| 4235 |
]) |
| 4236 |
|
| 4237 |
AC_CHECK_LIB(dld, shl_unload, [ |
| 4238 |
LIBDL="-ldld" |
| 4239 |
ac_cv_have_shload=yes |
| 4240 |
]) |
| 4241 |
|
| 4242 |
AC_SUBST(LIBDL) |
| 4243 |
]) |
| 4244 |
|
| 4245 |
AC_DEFUN([KDE_CHECK_DLOPEN], |
| 4246 |
[ |
| 4247 |
KDE_CHECK_LIBDL |
| 4248 |
AC_CHECK_HEADERS(dlfcn.h dl.h) |
| 4249 |
if test "$ac_cv_header_dlfcn_h" = "no"; then |
| 4250 |
ac_cv_have_dlfcn=no |
| 4251 |
fi |
| 4252 |
|
| 4253 |
if test "$ac_cv_header_dl_h" = "no"; then |
| 4254 |
ac_cv_have_shload=no |
| 4255 |
fi |
| 4256 |
|
| 4257 |
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE |
| 4258 |
dnl (MM) |
| 4259 |
AC_ARG_ENABLE(dlopen, |
| 4260 |
AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]), |
| 4261 |
enable_dlopen=$enableval, |
| 4262 |
enable_dlopen=yes) |
| 4263 |
|
| 4264 |
# override the user's opinion, if we know it better ;) |
| 4265 |
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then |
| 4266 |
enable_dlopen=no |
| 4267 |
fi |
| 4268 |
|
| 4269 |
if test "$ac_cv_have_dlfcn" = "yes"; then |
| 4270 |
AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn]) |
| 4271 |
fi |
| 4272 |
|
| 4273 |
if test "$ac_cv_have_shload" = "yes"; then |
| 4274 |
AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload]) |
| 4275 |
fi |
| 4276 |
|
| 4277 |
if test "$enable_dlopen" = no ; then |
| 4278 |
test -n "$1" && eval $1 |
| 4279 |
else |
| 4280 |
test -n "$2" && eval $2 |
| 4281 |
fi |
| 4282 |
|
| 4283 |
]) |
| 4284 |
|
| 4285 |
AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING], |
| 4286 |
[ |
| 4287 |
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no) |
| 4288 |
KDE_PROG_LIBTOOL |
| 4289 |
AC_MSG_CHECKING([dynamic loading]) |
| 4290 |
eval "`egrep '^build_libtool_libs=' libtool`" |
| 4291 |
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then |
| 4292 |
dynamic_loading=yes |
| 4293 |
AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING) |
| 4294 |
else |
| 4295 |
dynamic_loading=no |
| 4296 |
fi |
| 4297 |
AC_MSG_RESULT($dynamic_loading) |
| 4298 |
if test "$dynamic_loading" = "yes"; then |
| 4299 |
$1 |
| 4300 |
else |
| 4301 |
$2 |
| 4302 |
fi |
| 4303 |
]) |
| 4304 |
|
| 4305 |
AC_DEFUN([KDE_ADD_INCLUDES], |
| 4306 |
[ |
| 4307 |
if test -z "$1"; then |
| 4308 |
test_include="Pix.h" |
| 4309 |
else |
| 4310 |
test_include="$1" |
| 4311 |
fi |
| 4312 |
|
| 4313 |
AC_MSG_CHECKING([for libg++ ($test_include)]) |
| 4314 |
|
| 4315 |
AC_CACHE_VAL(kde_cv_libgpp_includes, |
| 4316 |
[ |
| 4317 |
kde_cv_libgpp_includes=no |
| 4318 |
|
| 4319 |
for ac_dir in \ |
| 4320 |
\ |
| 4321 |
/usr/include/g++ \ |
| 4322 |
/usr/include \ |
| 4323 |
/usr/unsupported/include \ |
| 4324 |
/opt/include \ |
| 4325 |
$extra_include \ |
| 4326 |
; \ |
| 4327 |
do |
| 4328 |
if test -r "$ac_dir/$test_include"; then |
| 4329 |
kde_cv_libgpp_includes=$ac_dir |
| 4330 |
break |
| 4331 |
fi |
| 4332 |
done |
| 4333 |
]) |
| 4334 |
|
| 4335 |
AC_MSG_RESULT($kde_cv_libgpp_includes) |
| 4336 |
if test "$kde_cv_libgpp_includes" != "no"; then |
| 4337 |
all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES" |
| 4338 |
fi |
| 4339 |
]) |
| 4340 |
]) |
| 4341 |
|
| 4342 |
AC_DEFUN([KDE_CHECK_LIBPTHREAD], |
| 4343 |
[ |
| 4344 |
dnl This code is here specifically to handle the |
| 4345 |
dnl various flavors of threading library on FreeBSD |
| 4346 |
dnl 4-, 5-, and 6-, and the (weird) rules around it. |
| 4347 |
dnl There may be an environment PTHREAD_LIBS that |
| 4348 |
dnl specifies what to use; otherwise, search for it. |
| 4349 |
dnl -pthread is special cased and unsets LIBPTHREAD |
| 4350 |
dnl below if found. |
| 4351 |
LIBPTHREAD="" |
| 4352 |
|
| 4353 |
if test -n "$PTHREAD_LIBS"; then |
| 4354 |
if test "x$PTHREAD_LIBS" = "x-pthread" ; then |
| 4355 |
LIBPTHREAD="PTHREAD" |
| 4356 |
else |
| 4357 |
PTHREAD_LIBS_save="$PTHREAD_LIBS" |
| 4358 |
PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'` |
| 4359 |
AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS]) |
| 4360 |
KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [ |
| 4361 |
LIBPTHREAD="$PTHREAD_LIBS_save"]) |
| 4362 |
PTHREAD_LIBS="$PTHREAD_LIBS_save" |
| 4363 |
fi |
| 4364 |
fi |
| 4365 |
|
| 4366 |
dnl Is this test really needed, in the face of the Tru64 test below? |
| 4367 |
if test -z "$LIBPTHREAD"; then |
| 4368 |
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"]) |
| 4369 |
fi |
| 4370 |
|
| 4371 |
dnl This is a special Tru64 check, see BR 76171 issue #18. |
| 4372 |
if test -z "$LIBPTHREAD" ; then |
| 4373 |
AC_MSG_CHECKING([for pthread_create in -lpthread]) |
| 4374 |
kde_safe_libs=$LIBS |
| 4375 |
LIBS="$LIBS -lpthread" |
| 4376 |
AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[ |
| 4377 |
AC_MSG_RESULT(yes) |
| 4378 |
LIBPTHREAD="-lpthread"],[ |
| 4379 |
AC_MSG_RESULT(no)]) |
| 4380 |
LIBS=$kde_safe_libs |
| 4381 |
fi |
| 4382 |
|
| 4383 |
dnl Un-special-case for FreeBSD. |
| 4384 |
if test "x$LIBPTHREAD" = "xPTHREAD" ; then |
| 4385 |
LIBPTHREAD="" |
| 4386 |
fi |
| 4387 |
|
| 4388 |
AC_SUBST(LIBPTHREAD) |
| 4389 |
]) |
| 4390 |
|
| 4391 |
AC_DEFUN([KDE_CHECK_PTHREAD_OPTION], |
| 4392 |
[ |
| 4393 |
USE_THREADS="" |
| 4394 |
if test -z "$LIBPTHREAD"; then |
| 4395 |
KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"]) |
| 4396 |
fi |
| 4397 |
|
| 4398 |
AH_VERBATIM(__svr_define, [ |
| 4399 |
#if defined(__SVR4) && !defined(__svr4__) |
| 4400 |
#define __svr4__ 1 |
| 4401 |
#endif |
| 4402 |
]) |
| 4403 |
case $host_os in |
| 4404 |
solaris*) |
| 4405 |
KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"]) |
| 4406 |
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4" |
| 4407 |
;; |
| 4408 |
freebsd*) |
| 4409 |
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS" |
| 4410 |
;; |
| 4411 |
aix*) |
| 4412 |
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" |
| 4413 |
LIBPTHREAD="$LIBPTHREAD -lc_r" |
| 4414 |
;; |
| 4415 |
linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" |
| 4416 |
if test "$CXX" = "KCC"; then |
| 4417 |
CXXFLAGS="$CXXFLAGS --thread_safe" |
| 4418 |
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe" |
| 4419 |
fi |
| 4420 |
;; |
| 4421 |
*) |
| 4422 |
;; |
| 4423 |
esac |
| 4424 |
AC_SUBST(USE_THREADS) |
| 4425 |
AC_SUBST(LIBPTHREAD) |
| 4426 |
]) |
| 4427 |
|
| 4428 |
AC_DEFUN([KDE_CHECK_THREADING], |
| 4429 |
[ |
| 4430 |
AC_REQUIRE([KDE_CHECK_LIBPTHREAD]) |
| 4431 |
AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION]) |
| 4432 |
dnl default is yes if libpthread is found and no if no libpthread is available |
| 4433 |
if test -z "$LIBPTHREAD"; then |
| 4434 |
if test -z "$USE_THREADS"; then |
| 4435 |
kde_check_threading_default=no |
| 4436 |
else |
| 4437 |
kde_check_threading_default=yes |
| 4438 |
fi |
| 4439 |
else |
| 4440 |
kde_check_threading_default=yes |
| 4441 |
fi |
| 4442 |
AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]), |
| 4443 |
kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default) |
| 4444 |
if test "x$kde_use_threading" = "xyes"; then |
| 4445 |
AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)]) |
| 4446 |
fi |
| 4447 |
]) |
| 4448 |
|
| 4449 |
AC_DEFUN([KDE_TRY_LINK_PYTHON], |
| 4450 |
[ |
| 4451 |
if test "$kde_python_link_found" = no; then |
| 4452 |
|
| 4453 |
if test "$1" = normal; then |
| 4454 |
AC_MSG_CHECKING(if a Python application links) |
| 4455 |
else |
| 4456 |
AC_MSG_CHECKING(if Python depends on $2) |
| 4457 |
fi |
| 4458 |
|
| 4459 |
AC_CACHE_VAL(kde_cv_try_link_python_$1, |
| 4460 |
[ |
| 4461 |
kde_save_cflags="$CFLAGS" |
| 4462 |
CFLAGS="$CFLAGS $PYTHONINC" |
| 4463 |
kde_save_libs="$LIBS" |
| 4464 |
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET" |
| 4465 |
kde_save_ldflags="$LDFLAGS" |
| 4466 |
LDFLAGS="$LDFLAGS $PYTHONLIB" |
| 4467 |
|
| 4468 |
AC_TRY_LINK( |
| 4469 |
[ |
| 4470 |
#include <Python.h> |
| 4471 |
],[ |
| 4472 |
PySys_SetArgv(1, 0); |
| 4473 |
], |
| 4474 |
[kde_cv_try_link_python_$1=yes], |
| 4475 |
[kde_cv_try_link_python_$1=no] |
| 4476 |
) |
| 4477 |
CFLAGS="$kde_save_cflags" |
| 4478 |
LIBS="$kde_save_libs" |
| 4479 |
LDFLAGS="$kde_save_ldflags" |
| 4480 |
]) |
| 4481 |
|
| 4482 |
if test "$kde_cv_try_link_python_$1" = "yes"; then |
| 4483 |
AC_MSG_RESULT(yes) |
| 4484 |
kde_python_link_found=yes |
| 4485 |
if test ! "$1" = normal; then |
| 4486 |
LIBPYTHON="$LIBPYTHON $2" |
| 4487 |
fi |
| 4488 |
$3 |
| 4489 |
else |
| 4490 |
AC_MSG_RESULT(no) |
| 4491 |
$4 |
| 4492 |
fi |
| 4493 |
|
| 4494 |
fi |
| 4495 |
|
| 4496 |
]) |
| 4497 |
|
| 4498 |
AC_DEFUN([KDE_CHECK_PYTHON_DIR], |
| 4499 |
[ |
| 4500 |
AC_MSG_CHECKING([for Python directory]) |
| 4501 |
|
| 4502 |
AC_CACHE_VAL(kde_cv_pythondir, |
| 4503 |
[ |
| 4504 |
if test -z "$PYTHONDIR"; then |
| 4505 |
kde_cv_pythondir=/usr/local |
| 4506 |
else |
| 4507 |
kde_cv_pythondir="$PYTHONDIR" |
| 4508 |
fi |
| 4509 |
]) |
| 4510 |
|
| 4511 |
AC_ARG_WITH(pythondir, |
| 4512 |
AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]), |
| 4513 |
[ |
| 4514 |
ac_python_dir=$withval |
| 4515 |
], ac_python_dir=$kde_cv_pythondir |
| 4516 |
) |
| 4517 |
|
| 4518 |
AC_MSG_RESULT($ac_python_dir) |
| 4519 |
]) |
| 4520 |
|
| 4521 |
AC_DEFUN([KDE_CHECK_PYTHON_INTERN], |
| 4522 |
[ |
| 4523 |
AC_REQUIRE([KDE_CHECK_LIBDL]) |
| 4524 |
AC_REQUIRE([KDE_CHECK_LIBPTHREAD]) |
| 4525 |
AC_REQUIRE([KDE_CHECK_PYTHON_DIR]) |
| 4526 |
|
| 4527 |
if test -z "$1"; then |
| 4528 |
version="1.5" |
| 4529 |
else |
| 4530 |
version="$1" |
| 4531 |
fi |
| 4532 |
|
| 4533 |
AC_MSG_CHECKING([for Python$version]) |
| 4534 |
|
| 4535 |
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes" |
| 4536 |
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir) |
| 4537 |
if test ! -r $python_incdir/Python.h; then |
| 4538 |
AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir) |
| 4539 |
python_incdir=$python_incdir/python$version |
| 4540 |
if test ! -r $python_incdir/Python.h; then |
| 4541 |
python_incdir=no |
| 4542 |
fi |
| 4543 |
fi |
| 4544 |
|
| 4545 |
PYTHONINC=-I$python_incdir |
| 4546 |
|
| 4547 |
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs" |
| 4548 |
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir) |
| 4549 |
if test ! -r $python_libdir/libpython$version.so; then |
| 4550 |
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir) |
| 4551 |
if test ! -r $python_libdir/libpython$version.a; then |
| 4552 |
AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir) |
| 4553 |
python_libdir=$python_libdir/python$version/config |
| 4554 |
if test ! -r $python_libdir/libpython$version.a; then |
| 4555 |
python_libdir=no |
| 4556 |
fi |
| 4557 |
fi |
| 4558 |
fi |
| 4559 |
|
| 4560 |
PYTHONLIB=-L$python_libdir |
| 4561 |
kde_orig_LIBPYTHON=$LIBPYTHON |
| 4562 |
if test -z "$LIBPYTHON"; then |
| 4563 |
LIBPYTHON=-lpython$version |
| 4564 |
fi |
| 4565 |
|
| 4566 |
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir) |
| 4567 |
python_moddir=$python_moddir/python$version |
| 4568 |
if test ! -r $python_moddir/copy.py; then |
| 4569 |
python_moddir=no |
| 4570 |
fi |
| 4571 |
|
| 4572 |
PYTHONMODDIR=$python_moddir |
| 4573 |
|
| 4574 |
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir) |
| 4575 |
|
| 4576 |
if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then |
| 4577 |
LIBPYTHON=$kde_orig_LIBPYTHON |
| 4578 |
test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB="" |
| 4579 |
test "x$PYTHONINC" = "x-Ino" && PYTHONINC="" |
| 4580 |
$2 |
| 4581 |
else |
| 4582 |
dnl Note: this test is very weak |
| 4583 |
kde_python_link_found=no |
| 4584 |
KDE_TRY_LINK_PYTHON(normal) |
| 4585 |
KDE_TRY_LINK_PYTHON(m, -lm) |
| 4586 |
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD) |
| 4587 |
KDE_TRY_LINK_PYTHON(tcl, -ltcl) |
| 4588 |
KDE_TRY_LINK_PYTHON(db2, -ldb2) |
| 4589 |
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm]) |
| 4590 |
KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil]) |
| 4591 |
KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil]) |
| 4592 |
KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3]) |
| 4593 |
KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil]) |
| 4594 |
KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm]) |
| 4595 |
KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses]) |
| 4596 |
KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [], |
| 4597 |
[AC_MSG_WARN([it seems, Python depends on another library. |
| 4598 |
Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this |
| 4599 |
and contact the authors to let them know about this problem]) |
| 4600 |
]) |
| 4601 |
|
| 4602 |
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET" |
| 4603 |
AC_SUBST(PYTHONINC) |
| 4604 |
AC_SUBST(PYTHONLIB) |
| 4605 |
AC_SUBST(LIBPYTHON) |
| 4606 |
AC_SUBST(PYTHONMODDIR) |
| 4607 |
AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python]) |
| 4608 |
fi |
| 4609 |
|
| 4610 |
]) |
| 4611 |
|
| 4612 |
|
| 4613 |
AC_DEFUN([KDE_CHECK_PYTHON], |
| 4614 |
[ |
| 4615 |
KDE_CHECK_PYTHON_INTERN("2.5", |
| 4616 |
[KDE_CHECK_PYTHON_INTERN("2.4", |
| 4617 |
[KDE_CHECK_PYTHON_INTERN("2.3", |
| 4618 |
[KDE_CHECK_PYTHON_INTERN("2.2", |
| 4619 |
[KDE_CHECK_PYTHON_INTERN("2.1", |
| 4620 |
[KDE_CHECK_PYTHON_INTERN("2.0", |
| 4621 |
[KDE_CHECK_PYTHON_INTERN($1, $2) ]) |
| 4622 |
]) |
| 4623 |
]) |
| 4624 |
]) |
| 4625 |
]) |
| 4626 |
]) |
| 4627 |
]) |
| 4628 |
|
| 4629 |
AC_DEFUN([KDE_CHECK_STL], |
| 4630 |
[ |
| 4631 |
AC_LANG_SAVE |
| 4632 |
AC_LANG_CPLUSPLUS |
| 4633 |
ac_save_CXXFLAGS="$CXXFLAGS" |
| 4634 |
CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`" |
| 4635 |
|
| 4636 |
AC_MSG_CHECKING([if C++ programs can be compiled]) |
| 4637 |
AC_CACHE_VAL(kde_cv_stl_works, |
| 4638 |
[ |
| 4639 |
AC_TRY_COMPILE([ |
| 4640 |
#include <string> |
| 4641 |
using namespace std; |
| 4642 |
],[ |
| 4643 |
string astring="Hallo Welt."; |
| 4644 |
astring.erase(0, 6); // now astring is "Welt" |
| 4645 |
return 0; |
| 4646 |
], kde_cv_stl_works=yes, |
| 4647 |
kde_cv_stl_works=no) |
| 4648 |
]) |
| 4649 |
|
| 4650 |
AC_MSG_RESULT($kde_cv_stl_works) |
| 4651 |
|
| 4652 |
if test "$kde_cv_stl_works" = "yes"; then |
| 4653 |
# back compatible |
| 4654 |
AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI]) |
| 4655 |
else |
| 4656 |
AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs. |
| 4657 |
Check config.log for details - if you're using a Linux distribution you might miss |
| 4658 |
a package named similar to libstdc++-dev.]) |
| 4659 |
fi |
| 4660 |
|
| 4661 |
CXXFLAGS="$ac_save_CXXFLAGS" |
| 4662 |
AC_LANG_RESTORE |
| 4663 |
]) |
| 4664 |
|
| 4665 |
AC_DEFUN([AC_FIND_QIMGIO], |
| 4666 |
[AC_REQUIRE([AC_FIND_JPEG]) |
| 4667 |
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS]) |
| 4668 |
AC_MSG_CHECKING([for qimgio]) |
| 4669 |
AC_CACHE_VAL(ac_cv_lib_qimgio, |
| 4670 |
[ |
| 4671 |
AC_LANG_SAVE |
| 4672 |
AC_LANG_CPLUSPLUS |
| 4673 |
ac_save_LIBS="$LIBS" |
| 4674 |
ac_save_CXXFLAGS="$CXXFLAGS" |
| 4675 |
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT" |
| 4676 |
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" |
| 4677 |
AC_TRY_RUN(dnl |
| 4678 |
[ |
| 4679 |
#include <qimageio.h> |
| 4680 |
#include <qstring.h> |
| 4681 |
int main() { |
| 4682 |
QString t = "hallo"; |
| 4683 |
t.fill('t'); |
| 4684 |
qInitImageIO(); |
| 4685 |
} |
| 4686 |
], |
| 4687 |
ac_cv_lib_qimgio=yes, |
| 4688 |
ac_cv_lib_qimgio=no, |
| 4689 |
ac_cv_lib_qimgio=no) |
| 4690 |
LIBS="$ac_save_LIBS" |
| 4691 |
CXXFLAGS="$ac_save_CXXFLAGS" |
| 4692 |
AC_LANG_RESTORE |
| 4693 |
])dnl |
| 4694 |
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then |
| 4695 |
LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG" |
| 4696 |
AC_MSG_RESULT(yes) |
| 4697 |
AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available]) |
| 4698 |
AC_SUBST(LIBQIMGIO) |
| 4699 |
else |
| 4700 |
AC_MSG_RESULT(not found) |
| 4701 |
fi |
| 4702 |
]) |
| 4703 |
|
| 4704 |
AC_DEFUN([AM_DISABLE_LIBRARIES], |
| 4705 |
[ |
| 4706 |
AC_PROVIDE([AM_ENABLE_STATIC]) |
| 4707 |
AC_PROVIDE([AM_ENABLE_SHARED]) |
| 4708 |
enable_static=no |
| 4709 |
enable_shared=yes |
| 4710 |
]) |
| 4711 |
|
| 4712 |
|
| 4713 |
AC_DEFUN([AC_CHECK_UTMP_FILE], |
| 4714 |
[ |
| 4715 |
AC_MSG_CHECKING([for utmp file]) |
| 4716 |
|
| 4717 |
AC_CACHE_VAL(kde_cv_utmp_file, |
| 4718 |
[ |
| 4719 |
kde_cv_utmp_file=no |
| 4720 |
|
| 4721 |
for ac_file in \ |
| 4722 |
\ |
| 4723 |
/var/run/utmp \ |
| 4724 |
/var/adm/utmp \ |
| 4725 |
/etc/utmp \ |
| 4726 |
; \ |
| 4727 |
do |
| 4728 |
if test -r "$ac_file"; then |
| 4729 |
kde_cv_utmp_file=$ac_file |
| 4730 |
break |
| 4731 |
fi |
| 4732 |
done |
| 4733 |
]) |
| 4734 |
|
| 4735 |
if test "$kde_cv_utmp_file" != "no"; then |
| 4736 |
AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries]) |
| 4737 |
$1 |
| 4738 |
AC_MSG_RESULT($kde_cv_utmp_file) |
| 4739 |
else |
| 4740 |
$2 |
| 4741 |
AC_MSG_RESULT([non found]) |
| 4742 |
fi |
| 4743 |
]) |
| 4744 |
|
| 4745 |
|
| 4746 |
AC_DEFUN([KDE_CREATE_SUBDIRSLIST], |
| 4747 |
[ |
| 4748 |
|
| 4749 |
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin" |
| 4750 |
TOPSUBDIRS="" |
| 4751 |
|
| 4752 |
if test ! -s $srcdir/subdirs; then |
| 4753 |
dnl Note: Makefile.common creates subdirs, so this is just a fallback |
| 4754 |
files=`cd $srcdir && ls -1` |
| 4755 |
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done` |
| 4756 |
for i in $dirs; do |
| 4757 |
echo $i >> $srcdir/subdirs |
| 4758 |
done |
| 4759 |
fi |
| 4760 |
|
| 4761 |
ac_topsubdirs= |
| 4762 |
if test -s $srcdir/inst-apps; then |
| 4763 |
ac_topsubdirs="`cat $srcdir/inst-apps`" |
| 4764 |
elif test -s $srcdir/subdirs; then |
| 4765 |
ac_topsubdirs="`cat $srcdir/subdirs`" |
| 4766 |
fi |
| 4767 |
|
| 4768 |
for i in $ac_topsubdirs; do |
| 4769 |
AC_MSG_CHECKING([if $i should be compiled]) |
| 4770 |
if test -d $srcdir/$i; then |
| 4771 |
install_it="yes" |
| 4772 |
for j in $DO_NOT_COMPILE; do |
| 4773 |
if test $i = $j; then |
| 4774 |
install_it="no" |
| 4775 |
fi |
| 4776 |
done |
| 4777 |
else |
| 4778 |
install_it="no" |
| 4779 |
fi |
| 4780 |
AC_MSG_RESULT($install_it) |
| 4781 |
vari=`echo $i | sed -e 's,[[-+.@]],_,g'` |
| 4782 |
if test $install_it = "yes"; then |
| 4783 |
TOPSUBDIRS="$TOPSUBDIRS $i" |
| 4784 |
eval "$vari""_SUBDIR_included=yes" |
| 4785 |
else |
| 4786 |
eval "$vari""_SUBDIR_included=no" |
| 4787 |
fi |
| 4788 |
done |
| 4789 |
|
| 4790 |
AC_SUBST(TOPSUBDIRS) |
| 4791 |
]) |
| 4792 |
|
| 4793 |
AC_DEFUN([KDE_CHECK_NAMESPACES], |
| 4794 |
[ |
| 4795 |
AC_MSG_CHECKING(whether C++ compiler supports namespaces) |
| 4796 |
AC_LANG_SAVE |
| 4797 |
AC_LANG_CPLUSPLUS |
| 4798 |
AC_TRY_COMPILE([ |
| 4799 |
], |
| 4800 |
[ |
| 4801 |
namespace Foo { |
| 4802 |
extern int i; |
| 4803 |
namespace Bar { |
| 4804 |
extern int i; |
| 4805 |
} |
| 4806 |
} |
| 4807 |
|
| 4808 |
int Foo::i = 0; |
| 4809 |
int Foo::Bar::i = 1; |
| 4810 |
],[ |
| 4811 |
AC_MSG_RESULT(yes) |
| 4812 |
AC_DEFINE(HAVE_NAMESPACES) |
| 4813 |
], [ |
| 4814 |
AC_MSG_RESULT(no) |
| 4815 |
]) |
| 4816 |
AC_LANG_RESTORE |
| 4817 |
]) |
| 4818 |
|
| 4819 |
dnl ------------------------------------------------------------------------ |
| 4820 |
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org |
| 4821 |
dnl ------------------------------------------------------------------------ |
| 4822 |
dnl |
| 4823 |
AC_DEFUN([AC_CHECK_S_ISSOCK], |
| 4824 |
[ |
| 4825 |
AC_MSG_CHECKING(for S_ISSOCK) |
| 4826 |
AC_CACHE_VAL(ac_cv_have_s_issock, |
| 4827 |
[ |
| 4828 |
AC_TRY_LINK( |
| 4829 |
[ |
| 4830 |
#include <sys/stat.h> |
| 4831 |
], |
| 4832 |
[ |
| 4833 |
struct stat buff; |
| 4834 |
int b = S_ISSOCK( buff.st_mode ); |
| 4835 |
], |
| 4836 |
ac_cv_have_s_issock=yes, |
| 4837 |
ac_cv_have_s_issock=no) |
| 4838 |
]) |
| 4839 |
AC_MSG_RESULT($ac_cv_have_s_issock) |
| 4840 |
if test "$ac_cv_have_s_issock" = "yes"; then |
| 4841 |
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.]) |
| 4842 |
fi |
| 4843 |
|
| 4844 |
AH_VERBATIM(_ISSOCK, |
| 4845 |
[ |
| 4846 |
#ifndef HAVE_S_ISSOCK |
| 4847 |
#define HAVE_S_ISSOCK |
| 4848 |
#define S_ISSOCK(mode) (1==0) |
| 4849 |
#endif |
| 4850 |
]) |
| 4851 |
|
| 4852 |
]) |
| 4853 |
|
| 4854 |
dnl ------------------------------------------------------------------------ |
| 4855 |
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org |
| 4856 |
dnl ------------------------------------------------------------------------ |
| 4857 |
dnl |
| 4858 |
AC_DEFUN([AC_CHECK_KDEMAXPATHLEN], |
| 4859 |
[ |
| 4860 |
AC_MSG_CHECKING(for MAXPATHLEN) |
| 4861 |
AC_CACHE_VAL(ac_cv_maxpathlen, |
| 4862 |
[ |
| 4863 |
cat > conftest.$ac_ext <<EOF |
| 4864 |
#ifdef STDC_HEADERS |
| 4865 |
# include <stdlib.h> |
| 4866 |
#endif |
| 4867 |
#include <stdio.h> |
| 4868 |
#include <sys/param.h> |
| 4869 |
#ifndef MAXPATHLEN |
| 4870 |
#define MAXPATHLEN 1024 |
| 4871 |
#endif |
| 4872 |
|
| 4873 |
KDE_HELLO MAXPATHLEN |
| 4874 |
|
| 4875 |
EOF |
| 4876 |
|
| 4877 |
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out" |
| 4878 |
|
| 4879 |
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then |
| 4880 |
ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out` |
| 4881 |
else |
| 4882 |
ac_cv_maxpathlen=1024 |
| 4883 |
fi |
| 4884 |
|
| 4885 |
rm conftest.* |
| 4886 |
|
| 4887 |
]) |
| 4888 |
AC_MSG_RESULT($ac_cv_maxpathlen) |
| 4889 |
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] ) |
| 4890 |
]) |
| 4891 |
|
| 4892 |
AC_DEFUN([KDE_CHECK_HEADER], |
| 4893 |
[ |
| 4894 |
kde_safe_cppflags=$CPPFLAGS |
| 4895 |
CPPFLAGS="$CPPFLAGS $all_includes" |
| 4896 |
AC_LANG_SAVE |
| 4897 |
AC_LANG_CPLUSPLUS |
| 4898 |
AC_CHECK_HEADER([$1], [$2], [$3], [$4]) |
| 4899 |
AC_LANG_RESTORE |
| 4900 |
CPPFLAGS=$kde_safe_cppflags |
| 4901 |
]) |
| 4902 |
|
| 4903 |
AC_DEFUN([KDE_CHECK_HEADERS], |
| 4904 |
[ |
| 4905 |
AH_CHECK_HEADERS([$1]) |
| 4906 |
AC_LANG_SAVE |
| 4907 |
kde_safe_cppflags=$CPPFLAGS |
| 4908 |
CPPFLAGS="$CPPFLAGS $all_includes" |
| 4909 |
AC_LANG_CPLUSPLUS |
| 4910 |
AC_CHECK_HEADERS([$1], [$2], [$3], [$4]) |
| 4911 |
CPPFLAGS=$kde_safe_cppflags |
| 4912 |
AC_LANG_RESTORE |
| 4913 |
]) |
| 4914 |
|
| 4915 |
AC_DEFUN([KDE_FAST_CONFIGURE], |
| 4916 |
[ |
| 4917 |
dnl makes configure fast (needs perl) |
| 4918 |
AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]), |
| 4919 |
with_fast_perl=$enableval, with_fast_perl=yes) |
| 4920 |
]) |
| 4921 |
|
| 4922 |
AC_DEFUN([KDE_CONF_FILES], |
| 4923 |
[ |
| 4924 |
val= |
| 4925 |
if test -f $srcdir/configure.files ; then |
| 4926 |
val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files` |
| 4927 |
fi |
| 4928 |
CONF_FILES= |
| 4929 |
if test -n "$val" ; then |
| 4930 |
for i in $val ; do |
| 4931 |
CONF_FILES="$CONF_FILES $i" |
| 4932 |
done |
| 4933 |
fi |
| 4934 |
AC_SUBST(CONF_FILES) |
| 4935 |
])dnl |
| 4936 |
|
| 4937 |
dnl This sets the prefix, for arts and kdelibs |
| 4938 |
dnl Do NOT use in any other module. |
| 4939 |
dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde |
| 4940 |
AC_DEFUN([KDE_SET_PREFIX_CORE], |
| 4941 |
[ |
| 4942 |
unset CDPATH |
| 4943 |
dnl make $KDEDIR the default for the installation |
| 4944 |
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde}) |
| 4945 |
|
| 4946 |
if test "x$prefix" = "xNONE"; then |
| 4947 |
prefix=$ac_default_prefix |
| 4948 |
ac_configure_args="$ac_configure_args --prefix=$prefix" |
| 4949 |
fi |
| 4950 |
# And delete superfluous '/' to make compares easier |
| 4951 |
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'` |
| 4952 |
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'` |
| 4953 |
|
| 4954 |
kde_libs_prefix='$(prefix)' |
| 4955 |
kde_libs_htmldir='$(kde_htmldir)' |
| 4956 |
AC_SUBST(kde_libs_prefix) |
| 4957 |
AC_SUBST(kde_libs_htmldir) |
| 4958 |
KDE_FAST_CONFIGURE |
| 4959 |
KDE_CONF_FILES |
| 4960 |
]) |
| 4961 |
|
| 4962 |
|
| 4963 |
AC_DEFUN([KDE_SET_PREFIX], |
| 4964 |
[ |
| 4965 |
unset CDPATH |
| 4966 |
dnl We can't give real code to that macro, only a value. |
| 4967 |
dnl It only matters for --help, since we set the prefix in this function anyway. |
| 4968 |
AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix}) |
| 4969 |
|
| 4970 |
KDE_SET_DEFAULT_BINDIRS |
| 4971 |
if test "x$prefix" = "xNONE"; then |
| 4972 |
dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it |
| 4973 |
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend) |
| 4974 |
else |
| 4975 |
dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH |
| 4976 |
kde_save_PATH="$PATH" |
| 4977 |
PATH="$exec_prefix/bin:$prefix/bin:$PATH" |
| 4978 |
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend) |
| 4979 |
PATH="$kde_save_PATH" |
| 4980 |
fi |
| 4981 |
|
| 4982 |
kde_libs_prefix=`$KDECONFIG --prefix` |
| 4983 |
if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then |
| 4984 |
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs. |
| 4985 |
This means it has been moved since you installed it. |
| 4986 |
This won't work. Please recompile kdelibs for the new prefix. |
| 4987 |
]) |
| 4988 |
fi |
| 4989 |
kde_libs_htmldir=`$KDECONFIG --install html --expandvars` |
| 4990 |
|
| 4991 |
AC_MSG_CHECKING([where to install]) |
| 4992 |
if test "x$prefix" = "xNONE"; then |
| 4993 |
prefix=$kde_libs_prefix |
| 4994 |
AC_MSG_RESULT([$prefix (as returned by kde-config)]) |
| 4995 |
else |
| 4996 |
dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different |
| 4997 |
given_prefix=$prefix |
| 4998 |
AC_MSG_RESULT([$prefix (as requested)]) |
| 4999 |
fi |
| 5000 |
|
| 5001 |
# And delete superfluous '/' to make compares easier |
| 5002 |
prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'` |
| 5003 |
exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'` |
| 5004 |
given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'` |
| 5005 |
|
| 5006 |
AC_SUBST(KDECONFIG) |
| 5007 |
AC_SUBST(kde_libs_prefix) |
| 5008 |
AC_SUBST(kde_libs_htmldir) |
| 5009 |
|
| 5010 |
KDE_FAST_CONFIGURE |
| 5011 |
KDE_CONF_FILES |
| 5012 |
]) |
| 5013 |
|
| 5014 |
pushdef([AC_PROG_INSTALL], |
| 5015 |
[ |
| 5016 |
dnl our own version, testing for a -p flag |
| 5017 |
popdef([AC_PROG_INSTALL]) |
| 5018 |
dnl as AC_PROG_INSTALL works as it works we first have |
| 5019 |
dnl to save if the user didn't specify INSTALL, as the |
| 5020 |
dnl autoconf one overwrites INSTALL and we have no chance to find |
| 5021 |
dnl out afterwards |
| 5022 |
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL |
| 5023 |
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM |
| 5024 |
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT |
| 5025 |
AC_PROG_INSTALL |
| 5026 |
|
| 5027 |
if test -z "$kde_save_INSTALL_given" ; then |
| 5028 |
# OK, user hasn't given any INSTALL, autoconf found one for us |
| 5029 |
# now we test, if it supports the -p flag |
| 5030 |
AC_MSG_CHECKING(for -p flag to install) |
| 5031 |
rm -f confinst.$$.* > /dev/null 2>&1 |
| 5032 |
echo "Testtest" > confinst.$$.orig |
| 5033 |
ac_res=no |
| 5034 |
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then |
| 5035 |
if test -f confinst.$$.new ; then |
| 5036 |
# OK, -p seems to do no harm to install |
| 5037 |
INSTALL="${INSTALL} -p" |
| 5038 |
ac_res=yes |
| 5039 |
fi |
| 5040 |
fi |
| 5041 |
rm -f confinst.$$.* |
| 5042 |
AC_MSG_RESULT($ac_res) |
| 5043 |
fi |
| 5044 |
dnl the following tries to resolve some signs and wonders coming up |
| 5045 |
dnl with different autoconf/automake versions |
| 5046 |
dnl e.g.: |
| 5047 |
dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s |
| 5048 |
dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS) |
| 5049 |
dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s |
| 5050 |
dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has |
| 5051 |
dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the |
| 5052 |
dnl install-@DIR@PROGRAMS targets to explicitly use that flag |
| 5053 |
dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as |
| 5054 |
dnl INSTALL_SCRIPT, which breaks with automake <= 1.4 |
| 5055 |
dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure |
| 5056 |
dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from |
| 5057 |
dnl automake (due to broken Makefile.am or whatever) to install programs, |
| 5058 |
dnl and so does not see the -s flag in automake > 1.4 |
| 5059 |
dnl to clean up that mess we: |
| 5060 |
dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG |
| 5061 |
dnl which cleans KDE's program with automake > 1.4; |
| 5062 |
dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems |
| 5063 |
dnl with automake<=1.4 |
| 5064 |
dnl note that dues to this sometimes two '-s' flags are used (if KDE |
| 5065 |
dnl properly uses install-@DIR@PROGRAMS, but I don't care |
| 5066 |
dnl |
| 5067 |
dnl And to all this comes, that I even can't write in comments variable |
| 5068 |
dnl names used by automake, because it is so stupid to think I wanted to |
| 5069 |
dnl _use_ them, therefor I have written A_M_... instead of AM_ |
| 5070 |
dnl hmm, I wanted to say something ... ahh yes: Arghhh. |
| 5071 |
|
| 5072 |
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then |
| 5073 |
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)' |
| 5074 |
fi |
| 5075 |
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then |
| 5076 |
INSTALL_SCRIPT='${INSTALL}' |
| 5077 |
fi |
| 5078 |
])dnl |
| 5079 |
|
| 5080 |
AC_DEFUN([KDE_LANG_CPLUSPLUS], |
| 5081 |
[AC_LANG_CPLUSPLUS |
| 5082 |
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' |
| 5083 |
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS]) |
| 5084 |
]) |
| 5085 |
|
| 5086 |
pushdef([AC_LANG_CPLUSPLUS], |
| 5087 |
[popdef([AC_LANG_CPLUSPLUS]) |
| 5088 |
KDE_LANG_CPLUSPLUS |
| 5089 |
]) |
| 5090 |
|
| 5091 |
AC_DEFUN([KDE_CHECK_LONG_LONG], |
| 5092 |
[ |
| 5093 |
AC_MSG_CHECKING(for long long) |
| 5094 |
AC_CACHE_VAL(kde_cv_c_long_long, |
| 5095 |
[ |
| 5096 |
AC_LANG_SAVE |
| 5097 |
AC_LANG_CPLUSPLUS |
| 5098 |
AC_TRY_LINK([], [ |
| 5099 |
long long foo = 0; |
| 5100 |
foo = foo+1; |
| 5101 |
], |
| 5102 |
kde_cv_c_long_long=yes, kde_cv_c_long_long=no) |
| 5103 |
AC_LANG_RESTORE |
| 5104 |
]) |
| 5105 |
AC_MSG_RESULT($kde_cv_c_long_long) |
| 5106 |
if test "$kde_cv_c_long_long" = yes; then |
| 5107 |
AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype]) |
| 5108 |
fi |
| 5109 |
]) |
| 5110 |
|
| 5111 |
AC_DEFUN([KDE_CHECK_LIB], |
| 5112 |
[ |
| 5113 |
kde_save_LDFLAGS="$LDFLAGS" |
| 5114 |
dnl AC_CHECK_LIB modifies LIBS, so save it here |
| 5115 |
kde_save_LIBS="$LIBS" |
| 5116 |
LDFLAGS="$LDFLAGS $all_libraries" |
| 5117 |
case $host_os in |
| 5118 |
aix*) LDFLAGS="-brtl $LDFLAGS" |
| 5119 |
test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS" |
| 5120 |
;; |
| 5121 |
esac |
| 5122 |
AC_CHECK_LIB($1, $2, $3, $4, $5) |
| 5123 |
LDFLAGS="$kde_save_LDFLAGS" |
| 5124 |
LIBS="$kde_save_LIBS" |
| 5125 |
]) |
| 5126 |
|
| 5127 |
AC_DEFUN([KDE_JAVA_PREFIX], |
| 5128 |
[ |
| 5129 |
dir=`dirname "$1"` |
| 5130 |
base=`basename "$1"` |
| 5131 |
list=`ls -1 $dir 2> /dev/null` |
| 5132 |
for entry in $list; do |
| 5133 |
if test -d $dir/$entry/bin; then |
| 5134 |
case $entry in |
| 5135 |
$base) |
| 5136 |
javadirs="$javadirs $dir/$entry/bin" |
| 5137 |
;; |
| 5138 |
esac |
| 5139 |
elif test -d $dir/$entry/jre/bin; then |
| 5140 |
case $entry in |
| 5141 |
$base) |
| 5142 |
javadirs="$javadirs $dir/$entry/jre/bin" |
| 5143 |
;; |
| 5144 |
esac |
| 5145 |
fi |
| 5146 |
done |
| 5147 |
]) |
| 5148 |
|
| 5149 |
dnl KDE_CHEC_JAVA_DIR(onlyjre) |
| 5150 |
AC_DEFUN([KDE_CHECK_JAVA_DIR], |
| 5151 |
[ |
| 5152 |
|
| 5153 |
AC_ARG_WITH(java, |
| 5154 |
AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]), |
| 5155 |
[ ac_java_dir=$withval |
| 5156 |
], ac_java_dir="" |
| 5157 |
) |
| 5158 |
|
| 5159 |
AC_MSG_CHECKING([for Java]) |
| 5160 |
|
| 5161 |
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH |
| 5162 |
if test "x$ac_java_dir" = "xno"; then |
| 5163 |
kde_java_bindir=no |
| 5164 |
kde_java_includedir=no |
| 5165 |
kde_java_libjvmdir=no |
| 5166 |
kde_java_libgcjdir=no |
| 5167 |
kde_java_libhpidir=no |
| 5168 |
else |
| 5169 |
if test "x$ac_java_dir" = "x"; then |
| 5170 |
|
| 5171 |
|
| 5172 |
dnl No option set -> collect list of candidate paths |
| 5173 |
if test -n "$JAVA_HOME"; then |
| 5174 |
KDE_JAVA_PREFIX($JAVA_HOME) |
| 5175 |
fi |
| 5176 |
KDE_JAVA_PREFIX(/usr/j2se) |
| 5177 |
KDE_JAVA_PREFIX(/usr/lib/j2se) |
| 5178 |
KDE_JAVA_PREFIX(/usr/j*dk*) |
| 5179 |
KDE_JAVA_PREFIX(/usr/lib/j*dk*) |
| 5180 |
KDE_JAVA_PREFIX(/opt/j*sdk*) |
| 5181 |
KDE_JAVA_PREFIX(/usr/lib/java*) |
| 5182 |
KDE_JAVA_PREFIX(/usr/java*) |
| 5183 |
KDE_JAVA_PREFIX(/usr/java/j*dk*) |
| 5184 |
KDE_JAVA_PREFIX(/usr/java/j*re*) |
| 5185 |
KDE_JAVA_PREFIX(/usr/lib/SunJava2*) |
| 5186 |
KDE_JAVA_PREFIX(/usr/lib/SunJava*) |
| 5187 |
KDE_JAVA_PREFIX(/usr/lib/IBMJava2*) |
| 5188 |
KDE_JAVA_PREFIX(/usr/lib/IBMJava*) |
| 5189 |
KDE_JAVA_PREFIX(/opt/java*) |
| 5190 |
|
| 5191 |
kde_cv_path="NONE" |
| 5192 |
kde_save_IFS=$IFS |
| 5193 |
IFS=':' |
| 5194 |
for dir in $PATH; do |
| 5195 |
if test -d "$dir"; then |
| 5196 |
javadirs="$javadirs $dir" |
| 5197 |
fi |
| 5198 |
done |
| 5199 |
IFS=$kde_save_IFS |
| 5200 |
jredirs= |
| 5201 |
|
| 5202 |
dnl Now javadirs contains a list of paths that exist, all ending with bin/ |
| 5203 |
for dir in $javadirs; do |
| 5204 |
dnl Check for the java executable |
| 5205 |
if test -x "$dir/java"; then |
| 5206 |
sane_path=$(cd $dir; /bin/pwd) |
| 5207 |
dnl And also check for a libjvm.so somewhere under there |
| 5208 |
dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big. |
| 5209 |
if test "$sane_path" != "/usr/bin"; then |
| 5210 |
libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1` |
| 5211 |
if test ! -f $libjvmdir/libjvm.so; then continue; fi |
| 5212 |
jredirs="$jredirs $dir" |
| 5213 |
fi |
| 5214 |
fi |
| 5215 |
done |
| 5216 |
|
| 5217 |
dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found |
| 5218 |
JAVAC= |
| 5219 |
JAVA= |
| 5220 |
kde_java_bindir=no |
| 5221 |
for dir in $jredirs; do |
| 5222 |
JAVA="$dir/java" |
| 5223 |
kde_java_bindir=$dir |
| 5224 |
if test -x "$dir/javac"; then |
| 5225 |
JAVAC="$dir/javac" |
| 5226 |
break |
| 5227 |
fi |
| 5228 |
done |
| 5229 |
|
| 5230 |
if test -n "$JAVAC"; then |
| 5231 |
dnl this substitution might not work - well, we test for jni.h below |
| 5232 |
kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'` |
| 5233 |
else |
| 5234 |
kde_java_includedir=no |
| 5235 |
fi |
| 5236 |
else |
| 5237 |
dnl config option set |
| 5238 |
kde_java_bindir=$ac_java_dir/bin |
| 5239 |
if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then |
| 5240 |
kde_java_includedir=no |
| 5241 |
else |
| 5242 |
kde_java_includedir=$ac_java_dir/include |
| 5243 |
fi |
| 5244 |
fi |
| 5245 |
fi |
| 5246 |
|
| 5247 |
dnl At this point kde_java_bindir and kde_java_includedir are either set or "no" |
| 5248 |
if test "x$kde_java_bindir" != "xno"; then |
| 5249 |
|
| 5250 |
dnl Look for libjvm.so |
| 5251 |
kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1` |
| 5252 |
dnl Look for libgcj.so |
| 5253 |
kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1` |
| 5254 |
dnl Look for libhpi.so and avoid green threads |
| 5255 |
kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1` |
| 5256 |
|
| 5257 |
dnl Now check everything's fine under there |
| 5258 |
dnl the include dir is our flag for having the JDK |
| 5259 |
if test -d "$kde_java_includedir"; then |
| 5260 |
if test ! -x "$kde_java_bindir/javac"; then |
| 5261 |
AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.]) |
| 5262 |
fi |
| 5263 |
if test ! -x "$kde_java_bindir/javah"; then |
| 5264 |
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.]) |
| 5265 |
fi |
| 5266 |
if test ! -x "$kde_java_bindir/jar"; then |
| 5267 |
AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.]) |
| 5268 |
fi |
| 5269 |
if test ! -r "$kde_java_includedir/jni.h"; then |
| 5270 |
AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.]) |
| 5271 |
fi |
| 5272 |
|
| 5273 |
jni_includes="-I$kde_java_includedir" |
| 5274 |
dnl Strange thing, jni.h requires jni_md.h which is under genunix here.. |
| 5275 |
dnl and under linux here.. |
| 5276 |
|
| 5277 |
dnl not needed for gcj |
| 5278 |
|
| 5279 |
if test "x$kde_java_libgcjdir" = "x"; then |
| 5280 |
test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux" |
| 5281 |
test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris" |
| 5282 |
test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix" |
| 5283 |
fi |
| 5284 |
|
| 5285 |
else |
| 5286 |
JAVAC= |
| 5287 |
jni_includes= |
| 5288 |
fi |
| 5289 |
|
| 5290 |
if test "x$kde_java_libgcjdir" = "x"; then |
| 5291 |
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then |
| 5292 |
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.]) |
| 5293 |
fi |
| 5294 |
else |
| 5295 |
if test ! -r "$kde_java_libgcjdir/libgcj.so"; then |
| 5296 |
AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.]) |
| 5297 |
fi |
| 5298 |
fi |
| 5299 |
|
| 5300 |
if test ! -x "$kde_java_bindir/java"; then |
| 5301 |
AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.]) |
| 5302 |
fi |
| 5303 |
|
| 5304 |
dnl not needed for gcj compile |
| 5305 |
|
| 5306 |
if test "x$kde_java_libgcjdir" = "x"; then |
| 5307 |
if test ! -r "$kde_java_libhpidir/libhpi.so"; then |
| 5308 |
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.]) |
| 5309 |
fi |
| 5310 |
fi |
| 5311 |
|
| 5312 |
if test -n "$jni_includes"; then |
| 5313 |
dnl Check for JNI version |
| 5314 |
AC_LANG_SAVE |
| 5315 |
AC_LANG_CPLUSPLUS |
| 5316 |
ac_cxxflags_safe="$CXXFLAGS" |
| 5317 |
CXXFLAGS="$CXXFLAGS $all_includes $jni_includes" |
| 5318 |
|
| 5319 |
AC_TRY_COMPILE([ |
| 5320 |
#include <jni.h> |
| 5321 |
], |
| 5322 |
[ |
| 5323 |
#ifndef JNI_VERSION_1_2 |
| 5324 |
Syntax Error |
| 5325 |
#endif |
| 5326 |
],[ kde_jni_works=yes ], |
| 5327 |
[ kde_jni_works=no ]) |
| 5328 |
|
| 5329 |
if test $kde_jni_works = no; then |
| 5330 |
AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h. |
| 5331 |
You need to have Java Development Kit (JDK) version 1.2. |
| 5332 |
|
| 5333 |
Use --with-java to specify another location. |
| 5334 |
Use --without-java to configure without java support. |
| 5335 |
Or download a newer JDK and try again. |
| 5336 |
See e.g. http://java.sun.com/products/jdk/1.2 ]) |
| 5337 |
fi |
| 5338 |
|
| 5339 |
CXXFLAGS="$ac_cxxflags_safe" |
| 5340 |
AC_LANG_RESTORE |
| 5341 |
|
| 5342 |
dnl All tests ok, inform and subst the variables |
| 5343 |
|
| 5344 |
JAVAC=$kde_java_bindir/javac |
| 5345 |
JAVAH=$kde_java_bindir/javah |
| 5346 |
JAR=$kde_java_bindir/jar |
| 5347 |
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is]) |
| 5348 |
if test "x$kde_java_libgcjdir" = "x"; then |
| 5349 |
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi" |
| 5350 |
else |
| 5351 |
JVMLIBS="-L$kde_java_libgcjdir -lgcj" |
| 5352 |
fi |
| 5353 |
AC_MSG_RESULT([java JDK in $kde_java_bindir]) |
| 5354 |
|
| 5355 |
else |
| 5356 |
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is]) |
| 5357 |
AC_MSG_RESULT([java JRE in $kde_java_bindir]) |
| 5358 |
fi |
| 5359 |
elif test -d "/Library/Java/Home"; then |
| 5360 |
kde_java_bindir="/Library/Java/Home/bin" |
| 5361 |
jni_includes="-I/Library/Java/Home/include" |
| 5362 |
|
| 5363 |
JAVAC=$kde_java_bindir/javac |
| 5364 |
JAVAH=$kde_java_bindir/javah |
| 5365 |
JAR=$kde_java_bindir/jar |
| 5366 |
JVMLIBS="-Wl,-framework,JavaVM" |
| 5367 |
|
| 5368 |
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is]) |
| 5369 |
AC_MSG_RESULT([Apple Java Framework]) |
| 5370 |
else |
| 5371 |
AC_MSG_RESULT([none found]) |
| 5372 |
fi |
| 5373 |
|
| 5374 |
AC_SUBST(JAVAC) |
| 5375 |
AC_SUBST(JAVAH) |
| 5376 |
AC_SUBST(JAR) |
| 5377 |
AC_SUBST(JVMLIBS) |
| 5378 |
AC_SUBST(jni_includes) |
| 5379 |
|
| 5380 |
# for backward compat |
| 5381 |
kde_cv_java_includedir=$kde_java_includedir |
| 5382 |
kde_cv_java_bindir=$kde_java_bindir |
| 5383 |
]) |
| 5384 |
|
| 5385 |
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH. |
| 5386 |
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in |
| 5387 |
dnl big packages, m4_foreach is dog-slow. So use our own version of |
| 5388 |
dnl it. (matz@kde.org) |
| 5389 |
m4_define([mm_foreach], |
| 5390 |
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])]) |
| 5391 |
m4_define([mm_car], [[$1]]) |
| 5392 |
m4_define([mm_car2], [[$@]]) |
| 5393 |
m4_define([_mm_foreach], |
| 5394 |
[m4_if(m4_quote($2), [], [], |
| 5395 |
[m4_define([$1], mm_car($2))$3[]_mm_foreach([$1], |
| 5396 |
mm_car2(m4_shift($2)), |
| 5397 |
[$3])])]) |
| 5398 |
m4_define([AC_FOREACH], |
| 5399 |
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])]) |
| 5400 |
|
| 5401 |
AC_DEFUN([KDE_NEED_FLEX], |
| 5402 |
[ |
| 5403 |
kde_libs_safe=$LIBS |
| 5404 |
LIBS="$LIBS $USER_LDFLAGS" |
| 5405 |
AM_PROG_LEX |
| 5406 |
LIBS=$kde_libs_safe |
| 5407 |
if test -z "$LEXLIB"; then |
| 5408 |
AC_MSG_ERROR([You need to have flex installed.]) |
| 5409 |
fi |
| 5410 |
AC_SUBST(LEXLIB) |
| 5411 |
]) |
| 5412 |
|
| 5413 |
AC_DEFUN([AC_PATH_QTOPIA], |
| 5414 |
[ |
| 5415 |
dnl TODO: use AC_CACHE_VAL |
| 5416 |
|
| 5417 |
if test -z "$1"; then |
| 5418 |
qtopia_minver_maj=1 |
| 5419 |
qtopia_minver_min=5 |
| 5420 |
qtopia_minver_pat=0 |
| 5421 |
else |
| 5422 |
qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"` |
| 5423 |
qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"` |
| 5424 |
qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"` |
| 5425 |
fi |
| 5426 |
|
| 5427 |
qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat" |
| 5428 |
qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat" |
| 5429 |
|
| 5430 |
AC_REQUIRE([AC_PATH_QT]) |
| 5431 |
|
| 5432 |
AC_MSG_CHECKING([for Qtopia]) |
| 5433 |
|
| 5434 |
LIB_QTOPIA="-lqpe" |
| 5435 |
AC_SUBST(LIB_QTOPIA) |
| 5436 |
|
| 5437 |
kde_qtopia_dirs="$QPEDIR /opt/Qtopia" |
| 5438 |
|
| 5439 |
ac_qtopia_incdir=NO |
| 5440 |
|
| 5441 |
AC_ARG_WITH(qtopia-dir, |
| 5442 |
AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]), |
| 5443 |
[ ac_qtopia_incdir="$withval"/include] ) |
| 5444 |
|
| 5445 |
qtopia_incdirs="" |
| 5446 |
for dir in $kde_qtopia_dirs; do |
| 5447 |
qtopia_incdirs="$qtopia_incdirs $dir/include" |
| 5448 |
done |
| 5449 |
|
| 5450 |
if test ! "$ac_qtopia_incdir" = "NO"; then |
| 5451 |
qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs" |
| 5452 |
fi |
| 5453 |
|
| 5454 |
qtopia_incdir="" |
| 5455 |
AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir) |
| 5456 |
ac_qtopia_incdir="$qtopia_incdir" |
| 5457 |
|
| 5458 |
if test -z "$qtopia_incdir"; then |
| 5459 |
AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.]) |
| 5460 |
fi |
| 5461 |
|
| 5462 |
qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`; |
| 5463 |
qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`; |
| 5464 |
qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`; |
| 5465 |
|
| 5466 |
qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat" |
| 5467 |
qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat" |
| 5468 |
if test "$qtopia_ver" -lt "$qtopia_minver"; then |
| 5469 |
AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr |
| 5470 |
is required.]) |
| 5471 |
fi |
| 5472 |
|
| 5473 |
AC_LANG_SAVE |
| 5474 |
AC_LANG_CPLUSPLUS |
| 5475 |
|
| 5476 |
ac_cxxflags_safe="$CXXFLAGS" |
| 5477 |
ac_ldflags_safe="$LDFLAGS" |
| 5478 |
ac_libs_safe="$LIBS" |
| 5479 |
|
| 5480 |
CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes" |
| 5481 |
LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS" |
| 5482 |
LIBS="$LIBS $LIB_QTOPIA $LIBQT" |
| 5483 |
|
| 5484 |
cat > conftest.$ac_ext <<EOF |
| 5485 |
#include "confdefs.h" |
| 5486 |
#include <qpe/qpeapplication.h> |
| 5487 |
#include <qpe/version.h> |
| 5488 |
|
| 5489 |
int main( int argc, char **argv ) |
| 5490 |
{ |
| 5491 |
QPEApplication app( argc, argv ); |
| 5492 |
return 0; |
| 5493 |
} |
| 5494 |
EOF |
| 5495 |
|
| 5496 |
if AC_TRY_EVAL(ac_link) && test -s conftest; then |
| 5497 |
rm -f conftest* |
| 5498 |
else |
| 5499 |
rm -f conftest* |
| 5500 |
AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at |
| 5501 |
the end of config.log]) |
| 5502 |
fi |
| 5503 |
|
| 5504 |
CXXFLAGS="$ac_cxxflags_safe" |
| 5505 |
LDFLAGS="$ac_ldflags_safe" |
| 5506 |
LIBS="$ac_libs_safe" |
| 5507 |
|
| 5508 |
AC_LANG_RESTORE |
| 5509 |
|
| 5510 |
QTOPIA_INCLUDES="-I$qtopia_incdir" |
| 5511 |
AC_SUBST(QTOPIA_INCLUDES) |
| 5512 |
|
| 5513 |
AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir]) |
| 5514 |
]) |
| 5515 |
|
| 5516 |
|
| 5517 |
AC_DEFUN([KDE_INIT_DOXYGEN], |
| 5518 |
[ |
| 5519 |
AC_MSG_CHECKING([for Qt docs]) |
| 5520 |
kde_qtdir= |
| 5521 |
if test "${with_qt_dir+set}" = set; then |
| 5522 |
kde_qtdir="$with_qt_dir" |
| 5523 |
fi |
| 5524 |
|
| 5525 |
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 /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR) |
| 5526 |
AC_MSG_RESULT($QTDOCDIR) |
| 5527 |
|
| 5528 |
AC_SUBST(QTDOCDIR) |
| 5529 |
|
| 5530 |
KDE_FIND_PATH(dot, DOT, [], []) |
| 5531 |
if test -n "$DOT"; then |
| 5532 |
KDE_HAVE_DOT="YES" |
| 5533 |
else |
| 5534 |
KDE_HAVE_DOT="NO" |
| 5535 |
fi |
| 5536 |
AC_SUBST(KDE_HAVE_DOT) |
| 5537 |
KDE_FIND_PATH(doxygen, DOXYGEN, [], []) |
| 5538 |
AC_SUBST(DOXYGEN) |
| 5539 |
|
| 5540 |
DOXYGEN_PROJECT_NAME="$1" |
| 5541 |
DOXYGEN_PROJECT_NUMBER="$2" |
| 5542 |
AC_SUBST(DOXYGEN_PROJECT_NAME) |
| 5543 |
AC_SUBST(DOXYGEN_PROJECT_NUMBER) |
| 5544 |
|
| 5545 |
KDE_HAS_DOXYGEN=no |
| 5546 |
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then |
| 5547 |
KDE_HAS_DOXYGEN=yes |
| 5548 |
fi |
| 5549 |
AC_SUBST(KDE_HAS_DOXYGEN) |
| 5550 |
|
| 5551 |
]) |
| 5552 |
|
| 5553 |
|
| 5554 |
AC_DEFUN([AC_FIND_BZIP2], |
| 5555 |
[ |
| 5556 |
AC_MSG_CHECKING([for bzDecompress in libbz2]) |
| 5557 |
AC_CACHE_VAL(ac_cv_lib_bzip2, |
| 5558 |
[ |
| 5559 |
AC_LANG_SAVE |
| 5560 |
AC_LANG_CPLUSPLUS |
| 5561 |
kde_save_LIBS="$LIBS" |
| 5562 |
LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET" |
| 5563 |
kde_save_CXXFLAGS="$CXXFLAGS" |
| 5564 |
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" |
| 5565 |
AC_TRY_LINK(dnl |
| 5566 |
[ |
| 5567 |
#define BZ_NO_STDIO |
| 5568 |
#include<bzlib.h> |
| 5569 |
], |
| 5570 |
[ bz_stream s; (void) bzDecompress(&s); ], |
| 5571 |
eval "ac_cv_lib_bzip2='-lbz2'", |
| 5572 |
eval "ac_cv_lib_bzip2=no") |
| 5573 |
LIBS="$kde_save_LIBS" |
| 5574 |
CXXFLAGS="$kde_save_CXXFLAGS" |
| 5575 |
AC_LANG_RESTORE |
| 5576 |
])dnl |
| 5577 |
AC_MSG_RESULT($ac_cv_lib_bzip2) |
| 5578 |
|
| 5579 |
if test ! "$ac_cv_lib_bzip2" = no; then |
| 5580 |
BZIP2DIR=bzip2 |
| 5581 |
|
| 5582 |
LIBBZ2="$ac_cv_lib_bzip2" |
| 5583 |
AC_SUBST(LIBBZ2) |
| 5584 |
|
| 5585 |
else |
| 5586 |
|
| 5587 |
cxx_shared_flag= |
| 5588 |
ld_shared_flag= |
| 5589 |
KDE_CHECK_COMPILER_FLAG(shared, [ |
| 5590 |
ld_shared_flag="-shared" |
| 5591 |
]) |
| 5592 |
KDE_CHECK_COMPILER_FLAG(fPIC, [ |
| 5593 |
cxx_shared_flag="-fPIC" |
| 5594 |
]) |
| 5595 |
|
| 5596 |
AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2]) |
| 5597 |
AC_CACHE_VAL(ac_cv_lib_bzip2_prefix, |
| 5598 |
[ |
| 5599 |
AC_LANG_SAVE |
| 5600 |
AC_LANG_CPLUSPLUS |
| 5601 |
kde_save_LIBS="$LIBS" |
| 5602 |
LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET" |
| 5603 |
kde_save_CXXFLAGS="$CXXFLAGS" |
| 5604 |
CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES" |
| 5605 |
|
| 5606 |
AC_TRY_LINK(dnl |
| 5607 |
[ |
| 5608 |
#define BZ_NO_STDIO |
| 5609 |
#include<bzlib.h> |
| 5610 |
], |
| 5611 |
[ bz_stream s; (void) BZ2_bzDecompress(&s); ], |
| 5612 |
eval "ac_cv_lib_bzip2_prefix='-lbz2'", |
| 5613 |
eval "ac_cv_lib_bzip2_prefix=no") |
| 5614 |
LIBS="$kde_save_LIBS" |
| 5615 |
CXXFLAGS="$kde_save_CXXFLAGS" |
| 5616 |
AC_LANG_RESTORE |
| 5617 |
])dnl |
| 5618 |
|
| 5619 |
AC_MSG_RESULT($ac_cv_lib_bzip2_prefix) |
| 5620 |
|
| 5621 |
if test ! "$ac_cv_lib_bzip2_prefix" = no; then |
| 5622 |
BZIP2DIR=bzip2 |
| 5623 |
|
| 5624 |
LIBBZ2="$ac_cv_lib_bzip2_prefix" |
| 5625 |
AC_SUBST(LIBBZ2) |
| 5626 |
|
| 5627 |
AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix]) |
| 5628 |
dnl else, we just ignore this |
| 5629 |
fi |
| 5630 |
|
| 5631 |
fi |
| 5632 |
AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR") |
| 5633 |
]) |
| 5634 |
|
| 5635 |
dnl ------------------------------------------------------------------------ |
| 5636 |
dnl Try to find the SSL headers and libraries. |
| 5637 |
dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed) |
| 5638 |
dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed) |
| 5639 |
dnl ------------------------------------------------------------------------ |
| 5640 |
dnl |
| 5641 |
AC_DEFUN([KDE_CHECK_SSL], |
| 5642 |
[ |
| 5643 |
LIBSSL="-lssl -lcrypto" |
| 5644 |
AC_REQUIRE([KDE_CHECK_LIB64]) |
| 5645 |
|
| 5646 |
ac_ssl_includes=NO ac_ssl_libraries=NO |
| 5647 |
ssl_libraries="" |
| 5648 |
ssl_includes="" |
| 5649 |
AC_ARG_WITH(ssl-dir, |
| 5650 |
AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]), |
| 5651 |
[ ac_ssl_includes="$withval"/include |
| 5652 |
ac_ssl_libraries="$withval"/lib$kdelibsuff |
| 5653 |
]) |
| 5654 |
|
| 5655 |
want_ssl=yes |
| 5656 |
AC_ARG_WITH(ssl, |
| 5657 |
AC_HELP_STRING([--without-ssl],[disable SSL checks]), |
| 5658 |
[want_ssl=$withval]) |
| 5659 |
|
| 5660 |
if test $want_ssl = yes; then |
| 5661 |
|
| 5662 |
AC_MSG_CHECKING(for OpenSSL) |
| 5663 |
|
| 5664 |
AC_CACHE_VAL(ac_cv_have_ssl, |
| 5665 |
[#try to guess OpenSSL locations |
| 5666 |
|
| 5667 |
ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes" |
| 5668 |
ssl_incdirs="$ac_ssl_includes $ssl_incdirs" |
| 5669 |
AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir) |
| 5670 |
ac_ssl_includes="$ssl_incdir" |
| 5671 |
|
| 5672 |
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" |
| 5673 |
if test ! "$ac_ssl_libraries" = "NO"; then |
| 5674 |
ssl_libdirs="$ac_ssl_libraries $ssl_libdirs" |
| 5675 |
fi |
| 5676 |
|
| 5677 |
test=NONE |
| 5678 |
ssl_libdir=NONE |
| 5679 |
for dir in $ssl_libdirs; do |
| 5680 |
try="ls -1 $dir/libssl*" |
| 5681 |
if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi |
| 5682 |
done |
| 5683 |
|
| 5684 |
ac_ssl_libraries="$ssl_libdir" |
| 5685 |
|
| 5686 |
ac_ldflags_safe="$LDFLAGS" |
| 5687 |
ac_libs_safe="$LIBS" |
| 5688 |
|
| 5689 |
LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries" |
| 5690 |
LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref" |
| 5691 |
|
| 5692 |
AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();, |
| 5693 |
ac_ssl_rsaref="yes" |
| 5694 |
, |
| 5695 |
ac_ssl_rsaref="no" |
| 5696 |
) |
| 5697 |
|
| 5698 |
LDFLAGS="$ac_ldflags_safe" |
| 5699 |
LIBS="$ac_libs_safe" |
| 5700 |
|
| 5701 |
if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then |
| 5702 |
have_ssl=no |
| 5703 |
else |
| 5704 |
have_ssl=yes; |
| 5705 |
fi |
| 5706 |
|
| 5707 |
]) |
| 5708 |
|
| 5709 |
eval "$ac_cv_have_ssl" |
| 5710 |
|
| 5711 |
AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes]) |
| 5712 |
|
| 5713 |
AC_MSG_CHECKING([whether OpenSSL uses rsaref]) |
| 5714 |
AC_MSG_RESULT($ac_ssl_rsaref) |
| 5715 |
|
| 5716 |
AC_MSG_CHECKING([for easter eggs]) |
| 5717 |
AC_MSG_RESULT([none found]) |
| 5718 |
|
| 5719 |
else |
| 5720 |
have_ssl=no |
| 5721 |
fi |
| 5722 |
|
| 5723 |
if test "$have_ssl" = yes; then |
| 5724 |
AC_MSG_CHECKING(for OpenSSL version) |
| 5725 |
dnl Check for SSL version |
| 5726 |
AC_CACHE_VAL(ac_cv_ssl_version, |
| 5727 |
[ |
| 5728 |
|
| 5729 |
cat >conftest.$ac_ext <<EOF |
| 5730 |
#include <openssl/opensslv.h> |
| 5731 |
#include <stdio.h> |
| 5732 |
int main() { |
| 5733 |
|
| 5734 |
#ifndef OPENSSL_VERSION_NUMBER |
| 5735 |
printf("ssl_version=\\"error\\"\n"); |
| 5736 |
#else |
| 5737 |
if (OPENSSL_VERSION_NUMBER < 0x00906000) |
| 5738 |
printf("ssl_version=\\"old\\"\n"); |
| 5739 |
else |
| 5740 |
printf("ssl_version=\\"ok\\"\n"); |
| 5741 |
#endif |
| 5742 |
return (0); |
| 5743 |
} |
| 5744 |
EOF |
| 5745 |
|
| 5746 |
ac_save_CPPFLAGS=$CPPFLAGS |
| 5747 |
if test "$ac_ssl_includes" != "/usr/include"; then |
| 5748 |
CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes" |
| 5749 |
fi |
| 5750 |
|
| 5751 |
if AC_TRY_EVAL(ac_link); then |
| 5752 |
|
| 5753 |
if eval `./conftest 2>&5`; then |
| 5754 |
if test $ssl_version = error; then |
| 5755 |
AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !]) |
| 5756 |
else |
| 5757 |
if test $ssl_version = old; then |
| 5758 |
AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.]) |
| 5759 |
have_ssl=no |
| 5760 |
fi |
| 5761 |
fi |
| 5762 |
ac_cv_ssl_version="ssl_version=$ssl_version" |
| 5763 |
else |
| 5764 |
AC_MSG_ERROR([Your system couldn't run a small SSL test program. |
| 5765 |
Check config.log, and if you can't figure it out, send a mail to |
| 5766 |
David Faure <faure@kde.org>, attaching your config.log]) |
| 5767 |
fi |
| 5768 |
|
| 5769 |
else |
| 5770 |
AC_MSG_ERROR([Your system couldn't link a small SSL test program. |
| 5771 |
Check config.log, and if you can't figure it out, send a mail to |
| 5772 |
David Faure <faure@kde.org>, attaching your config.log]) |
| 5773 |
fi |
| 5774 |
CPPFLAGS=$ac_save_CPPFLAGS |
| 5775 |
|
| 5776 |
]) |
| 5777 |
|
| 5778 |
eval "$ac_cv_ssl_version" |
| 5779 |
AC_MSG_RESULT($ssl_version) |
| 5780 |
fi |
| 5781 |
|
| 5782 |
if test "$have_ssl" != yes; then |
| 5783 |
LIBSSL=""; |
| 5784 |
else |
| 5785 |
AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL]) |
| 5786 |
ac_cv_have_ssl="have_ssl=yes \ |
| 5787 |
ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref" |
| 5788 |
|
| 5789 |
|
| 5790 |
ssl_libraries="$ac_ssl_libraries" |
| 5791 |
ssl_includes="$ac_ssl_includes" |
| 5792 |
|
| 5793 |
if test "$ac_ssl_rsaref" = yes; then |
| 5794 |
LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" |
| 5795 |
fi |
| 5796 |
|
| 5797 |
if test $ssl_version = "old"; then |
| 5798 |
AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6]) |
| 5799 |
fi |
| 5800 |
fi |
| 5801 |
|
| 5802 |
SSL_INCLUDES= |
| 5803 |
|
| 5804 |
if test "$ssl_includes" = "/usr/include"; then |
| 5805 |
if test -f /usr/kerberos/include/krb5.h; then |
| 5806 |
SSL_INCLUDES="-I/usr/kerberos/include" |
| 5807 |
fi |
| 5808 |
elif test "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then |
| 5809 |
SSL_INCLUDES="-I$ssl_includes" |
| 5810 |
fi |
| 5811 |
|
| 5812 |
if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then |
| 5813 |
SSL_LDFLAGS="" |
| 5814 |
else |
| 5815 |
SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries" |
| 5816 |
fi |
| 5817 |
|
| 5818 |
AC_SUBST(SSL_INCLUDES) |
| 5819 |
AC_SUBST(SSL_LDFLAGS) |
| 5820 |
AC_SUBST(LIBSSL) |
| 5821 |
]) |
| 5822 |
|
| 5823 |
AC_DEFUN([KDE_CHECK_STRLCPY], |
| 5824 |
[ |
| 5825 |
AC_REQUIRE([AC_CHECK_STRLCAT]) |
| 5826 |
AC_REQUIRE([AC_CHECK_STRLCPY]) |
| 5827 |
AC_CHECK_SIZEOF(size_t) |
| 5828 |
AC_CHECK_SIZEOF(unsigned long) |
| 5829 |
|
| 5830 |
AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long]) |
| 5831 |
AC_TRY_COMPILE(,[ |
| 5832 |
#if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG |
| 5833 |
choke me |
| 5834 |
#endif |
| 5835 |
],AC_MSG_RESULT([yes]),[ |
| 5836 |
AC_MSG_RESULT(no) |
| 5837 |
AC_MSG_ERROR([ |
| 5838 |
Apparently on your system our assumption sizeof size_t == sizeof unsigned long |
| 5839 |
does not apply. Please mail kde-devel@kde.org with a description of your system! |
| 5840 |
]) |
| 5841 |
]) |
| 5842 |
]) |
| 5843 |
|
| 5844 |
AC_DEFUN([KDE_CHECK_BINUTILS], |
| 5845 |
[ |
| 5846 |
AC_MSG_CHECKING([if ld supports unversioned version maps]) |
| 5847 |
|
| 5848 |
kde_save_LDFLAGS="$LDFLAGS" |
| 5849 |
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" |
| 5850 |
echo "{ local: extern \"C++\" { foo }; };" > conftest.map |
| 5851 |
AC_TRY_LINK([int foo;], |
| 5852 |
[ |
| 5853 |
#ifdef __INTEL_COMPILER |
| 5854 |
icc apparently does not support libtools version-info and version-script |
| 5855 |
at the same time. Dunno where the bug is, but until somebody figured out, |
| 5856 |
better disable the optional version scripts. |
| 5857 |
#endif |
| 5858 |
|
| 5859 |
foo = 42; |
| 5860 |
], kde_supports_versionmaps=yes, kde_supports_versionmaps=no) |
| 5861 |
LDFLAGS="$kde_save_LDFLAGS" |
| 5862 |
rm -f conftest.map |
| 5863 |
AM_CONDITIONAL(include_VERSION_SCRIPT, |
| 5864 |
[test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"]) |
| 5865 |
|
| 5866 |
AC_MSG_RESULT($kde_supports_versionmaps) |
| 5867 |
]) |
| 5868 |
|
| 5869 |
AC_DEFUN([AM_PROG_OBJC],[ |
| 5870 |
AC_CHECK_PROGS(OBJC, gcc, gcc) |
| 5871 |
test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH]) |
| 5872 |
if test "x${OBJCFLAGS-unset}" = xunset; then |
| 5873 |
OBJCFLAGS="-g -O2" |
| 5874 |
fi |
| 5875 |
AC_SUBST(OBJCFLAGS) |
| 5876 |
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)]) |
| 5877 |
]) |
| 5878 |
|
| 5879 |
AC_DEFUN([KDE_CHECK_PERL], |
| 5880 |
[ |
| 5881 |
KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [ |
| 5882 |
AC_MSG_ERROR([No Perl found in your $PATH. |
| 5883 |
We need perl to generate some code.]) |
| 5884 |
]) |
| 5885 |
AC_SUBST(PERL) |
| 5886 |
]) |
| 5887 |
|
| 5888 |
AC_DEFUN([KDE_CHECK_LARGEFILE], |
| 5889 |
[ |
| 5890 |
AC_SYS_LARGEFILE |
| 5891 |
if test "$ac_cv_sys_file_offset_bits" != no; then |
| 5892 |
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" |
| 5893 |
fi |
| 5894 |
|
| 5895 |
if test "x$ac_cv_sys_large_files" != "xno"; then |
| 5896 |
CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1" |
| 5897 |
fi |
| 5898 |
|
| 5899 |
]) |
| 5900 |
|
| 5901 |
dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in) |
| 5902 |
dnl which allows to search for libs that get installed into the KDE prefix. |
| 5903 |
dnl |
| 5904 |
dnl Syntax: KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not) |
| 5905 |
dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page |
| 5906 |
dnl also defines KSTUFF_PKG_ERRORS on error |
| 5907 |
AC_DEFUN([KDE_PKG_CHECK_MODULES], [ |
| 5908 |
|
| 5909 |
PKG_CONFIG_PATH="$prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH" |
| 5910 |
if test "$prefix" != "$kde_libs_prefix"; then |
| 5911 |
PKG_CONFIG_PATH="$kde_libs_prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH" |
| 5912 |
fi |
| 5913 |
export PKG_CONFIG_PATH |
| 5914 |
PKG_CHECK_MODULES([$1],[$2],[$3],[$4]) |
| 5915 |
]) |
| 5916 |
|
| 5917 |
|
| 5918 |
dnl Check for PIE support in the compiler and linker |
| 5919 |
AC_DEFUN([KDE_CHECK_PIE_SUPPORT], |
| 5920 |
[ |
| 5921 |
AC_CACHE_CHECK([for PIE support], kde_cv_val_pie_support, |
| 5922 |
[ |
| 5923 |
AC_LANG_SAVE |
| 5924 |
AC_LANG_CPLUSPLUS |
| 5925 |
safe_CXXFLAGS=$CXXFLAGS |
| 5926 |
safe_LDFLAGS=$LDFLAGS |
| 5927 |
CXXFLAGS="$CXXFLAGS -fPIE" |
| 5928 |
LDFLAGS="$LDFLAGS -pie" |
| 5929 |
|
| 5930 |
AC_TRY_LINK([int foo;], [], [kde_cv_val_pie_support=yes], [kde_cv_val_pie_support=no]) |
| 5931 |
|
| 5932 |
CXXFLAGS=$safe_CXXFLAGS |
| 5933 |
LDFLAGS=$safe_LDFLAGS |
| 5934 |
AC_LANG_RESTORE |
| 5935 |
]) |
| 5936 |
|
| 5937 |
AC_MSG_CHECKING(if enabling -pie/fPIE support) |
| 5938 |
|
| 5939 |
AC_ARG_ENABLE(pie, |
| 5940 |
AC_HELP_STRING([--enable-pie],[platform supports PIE linking [default=detect]]), |
| 5941 |
[kde_has_pie_support=$enableval], |
| 5942 |
[kde_has_pie_support=detect]) |
| 5943 |
|
| 5944 |
if test "$kde_has_pie_support" = "detect"; then |
| 5945 |
kde_has_pie_support=$kde_cv_val_pie_support |
| 5946 |
fi |
| 5947 |
|
| 5948 |
AC_MSG_RESULT([$kde_has_pie_support]) |
| 5949 |
|
| 5950 |
KDE_USE_FPIE="" |
| 5951 |
KDE_USE_PIE="" |
| 5952 |
|
| 5953 |
AC_SUBST([KDE_USE_FPIE]) |
| 5954 |
AC_SUBST([KDE_USE_PIE]) |
| 5955 |
|
| 5956 |
if test "$kde_has_pie_support" = "yes"; then |
| 5957 |
KDE_USE_FPIE="-fPIE" |
| 5958 |
KDE_USE_PIE="-pie" |
| 5959 |
fi |
| 5960 |
]) |
| 5961 |
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- |
| 5962 |
## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 |
| 5963 |
## Free Software Foundation, Inc. |
| 5964 |
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
| 5965 |
## |
| 5966 |
## This file is free software; the Free Software Foundation gives |
| 5967 |
## unlimited permission to copy and/or distribute it, with or without |
| 5968 |
## modifications, as long as this notice is preserved. |
| 5969 |
|
| 5970 |
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL |
| 5971 |
|
| 5972 |
|
| 5973 |
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) |
| 5974 |
# ----------------------------------------------------------- |
| 5975 |
# If this macro is not defined by Autoconf, define it here. |
| 5976 |
m4_ifdef([AC_PROVIDE_IFELSE], |
| 5977 |
[], |
| 5978 |
[m4_define([AC_PROVIDE_IFELSE], |
| 5979 |
[m4_ifdef([AC_PROVIDE_$1], |
| 5980 |
[$2], [$3])])]) |
| 5981 |
|
| 5982 |
|
| 5983 |
# AC_PROG_LIBTOOL |
| 5984 |
# --------------- |
| 5985 |
AC_DEFUN([AC_PROG_LIBTOOL], |
| 5986 |
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl |
| 5987 |
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX |
| 5988 |
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. |
| 5989 |
AC_PROVIDE_IFELSE([AC_PROG_CXX], |
| 5990 |
[AC_LIBTOOL_CXX], |
| 5991 |
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX |
| 5992 |
])]) |
| 5993 |
dnl And a similar setup for Fortran 77 support |
| 5994 |
AC_PROVIDE_IFELSE([AC_PROG_F77], |
| 5995 |
[AC_LIBTOOL_F77], |
| 5996 |
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 |
| 5997 |
])]) |
| 5998 |
|
| 5999 |
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. |
| 6000 |
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run |
| 6001 |
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. |
| 6002 |
AC_PROVIDE_IFELSE([AC_PROG_GCJ], |
| 6003 |
[AC_LIBTOOL_GCJ], |
| 6004 |
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ], |
| 6005 |
[AC_LIBTOOL_GCJ], |
| 6006 |
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], |
| 6007 |
[AC_LIBTOOL_GCJ], |
| 6008 |
[ifdef([AC_PROG_GCJ], |
| 6009 |
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) |
| 6010 |
ifdef([A][M_PROG_GCJ], |
| 6011 |
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) |
| 6012 |
ifdef([LT_AC_PROG_GCJ], |
| 6013 |
[define([LT_AC_PROG_GCJ], |
| 6014 |
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) |
| 6015 |
])])# AC_PROG_LIBTOOL |
| 6016 |
|
| 6017 |
|
| 6018 |
# _AC_PROG_LIBTOOL |
| 6019 |
# ---------------- |
| 6020 |
AC_DEFUN([_AC_PROG_LIBTOOL], |
| 6021 |
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl |
| 6022 |
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl |
| 6023 |
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl |
| 6024 |
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl |
| 6025 |
|
| 6026 |
# This can be used to rebuild libtool when needed |
| 6027 |
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" |
| 6028 |
|
| 6029 |
# Always use our own libtool. |
| 6030 |
LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
| 6031 |
AC_SUBST(LIBTOOL)dnl |
| 6032 |
|
| 6033 |
# Prevent multiple expansion |
| 6034 |
define([AC_PROG_LIBTOOL], []) |
| 6035 |
])# _AC_PROG_LIBTOOL |
| 6036 |
|
| 6037 |
|
| 6038 |
# AC_LIBTOOL_SETUP |
| 6039 |
# ---------------- |
| 6040 |
AC_DEFUN([AC_LIBTOOL_SETUP], |
| 6041 |
[AC_PREREQ(2.50)dnl |
| 6042 |
AC_REQUIRE([AC_ENABLE_SHARED])dnl |
| 6043 |
AC_REQUIRE([AC_ENABLE_STATIC])dnl |
| 6044 |
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl |
| 6045 |
AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 6046 |
AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
| 6047 |
AC_REQUIRE([AC_PROG_CC])dnl |
| 6048 |
AC_REQUIRE([AC_PROG_LD])dnl |
| 6049 |
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl |
| 6050 |
AC_REQUIRE([AC_PROG_NM])dnl |
| 6051 |
|
| 6052 |
AC_REQUIRE([AC_PROG_LN_S])dnl |
| 6053 |
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl |
| 6054 |
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! |
| 6055 |
AC_REQUIRE([AC_OBJEXT])dnl |
| 6056 |
AC_REQUIRE([AC_EXEEXT])dnl |
| 6057 |
dnl |
| 6058 |
|
| 6059 |
AC_LIBTOOL_SYS_MAX_CMD_LEN |
| 6060 |
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
| 6061 |
AC_LIBTOOL_OBJDIR |
| 6062 |
|
| 6063 |
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
| 6064 |
_LT_AC_PROG_ECHO_BACKSLASH |
| 6065 |
|
| 6066 |
case $host_os in |
| 6067 |
aix3*) |
| 6068 |
# AIX sometimes has problems with the GCC collect2 program. For some |
| 6069 |
# reason, if we set the COLLECT_NAMES environment variable, the problems |
| 6070 |
# vanish in a puff of smoke. |
| 6071 |
if test "X${COLLECT_NAMES+set}" != Xset; then |
| 6072 |
COLLECT_NAMES= |
| 6073 |
export COLLECT_NAMES |
| 6074 |
fi |
| 6075 |
;; |
| 6076 |
esac |
| 6077 |
|
| 6078 |
# Sed substitution that helps us do robust quoting. It backslashifies |
| 6079 |
# metacharacters that are still active within double-quoted strings. |
| 6080 |
Xsed='sed -e 1s/^X//' |
| 6081 |
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] |
| 6082 |
|
| 6083 |
# Same as above, but do not quote variable references. |
| 6084 |
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] |
| 6085 |
|
| 6086 |
# Sed substitution to delay expansion of an escaped shell variable in a |
| 6087 |
# double_quote_subst'ed string. |
| 6088 |
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
| 6089 |
|
| 6090 |
# Sed substitution to avoid accidental globbing in evaled expressions |
| 6091 |
no_glob_subst='s/\*/\\\*/g' |
| 6092 |
|
| 6093 |
# Constants: |
| 6094 |
rm="rm -f" |
| 6095 |
|
| 6096 |
# Global variables: |
| 6097 |
default_ofile=libtool |
| 6098 |
can_build_shared=yes |
| 6099 |
|
| 6100 |
# All known linkers require a `.a' archive for static linking (except MSVC, |
| 6101 |
# which needs '.lib'). |
| 6102 |
libext=a |
| 6103 |
ltmain="$ac_aux_dir/ltmain.sh" |
| 6104 |
ofile="$default_ofile" |
| 6105 |
with_gnu_ld="$lt_cv_prog_gnu_ld" |
| 6106 |
|
| 6107 |
AC_CHECK_TOOL(AR, ar, false) |
| 6108 |
AC_CHECK_TOOL(RANLIB, ranlib, :) |
| 6109 |
AC_CHECK_TOOL(STRIP, strip, :) |
| 6110 |
|
| 6111 |
old_CC="$CC" |
| 6112 |
old_CFLAGS="$CFLAGS" |
| 6113 |
|
| 6114 |
# Set sane defaults for various variables |
| 6115 |
test -z "$AR" && AR=ar |
| 6116 |
test -z "$AR_FLAGS" && AR_FLAGS=cru |
| 6117 |
test -z "$AS" && AS=as |
| 6118 |
test -z "$CC" && CC=cc |
| 6119 |
test -z "$LTCC" && LTCC=$CC |
| 6120 |
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS |
| 6121 |
test -z "$DLLTOOL" && DLLTOOL=dlltool |
| 6122 |
test -z "$LD" && LD=ld |
| 6123 |
test -z "$LN_S" && LN_S="ln -s" |
| 6124 |
test -z "$MAGIC_CMD" && MAGIC_CMD=file |
| 6125 |
test -z "$NM" && NM=nm |
| 6126 |
test -z "$SED" && SED=sed |
| 6127 |
test -z "$OBJDUMP" && OBJDUMP=objdump |
| 6128 |
test -z "$RANLIB" && RANLIB=: |
| 6129 |
test -z "$STRIP" && STRIP=: |
| 6130 |
test -z "$ac_objext" && ac_objext=o |
| 6131 |
|
| 6132 |
# Determine commands to create old-style static archives. |
| 6133 |
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' |
| 6134 |
old_postinstall_cmds='chmod 644 $oldlib' |
| 6135 |
old_postuninstall_cmds= |
| 6136 |
|
| 6137 |
if test -n "$RANLIB"; then |
| 6138 |
case $host_os in |
| 6139 |
openbsd*) |
| 6140 |
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" |
| 6141 |
;; |
| 6142 |
*) |
| 6143 |
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" |
| 6144 |
;; |
| 6145 |
esac |
| 6146 |
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" |
| 6147 |
fi |
| 6148 |
|
| 6149 |
_LT_CC_BASENAME([$compiler]) |
| 6150 |
|
| 6151 |
# Only perform the check for file, if the check method requires it |
| 6152 |
case $deplibs_check_method in |
| 6153 |
file_magic*) |
| 6154 |
if test "$file_magic_cmd" = '$MAGIC_CMD'; then |
| 6155 |
AC_PATH_MAGIC |
| 6156 |
fi |
| 6157 |
;; |
| 6158 |
esac |
| 6159 |
|
| 6160 |
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) |
| 6161 |
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], |
| 6162 |
enable_win32_dll=yes, enable_win32_dll=no) |
| 6163 |
|
| 6164 |
AC_ARG_ENABLE([libtool-lock], |
| 6165 |
[AC_HELP_STRING([--disable-libtool-lock], |
| 6166 |
[avoid locking (might break parallel builds)])]) |
| 6167 |
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
| 6168 |
|
| 6169 |
AC_ARG_WITH([pic], |
| 6170 |
[AC_HELP_STRING([--with-pic], |
| 6171 |
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])], |
| 6172 |
[pic_mode="$withval"], |
| 6173 |
[pic_mode=default]) |
| 6174 |
test -z "$pic_mode" && pic_mode=default |
| 6175 |
|
| 6176 |
# Use C for the default configuration in the libtool script |
| 6177 |
tagname= |
| 6178 |
AC_LIBTOOL_LANG_C_CONFIG |
| 6179 |
_LT_AC_TAGCONFIG |
| 6180 |
])# AC_LIBTOOL_SETUP |
| 6181 |
|
| 6182 |
|
| 6183 |
# _LT_AC_SYS_COMPILER |
| 6184 |
# ------------------- |
| 6185 |
AC_DEFUN([_LT_AC_SYS_COMPILER], |
| 6186 |
[AC_REQUIRE([AC_PROG_CC])dnl |
| 6187 |
|
| 6188 |
# If no C compiler was specified, use CC. |
| 6189 |
LTCC=${LTCC-"$CC"} |
| 6190 |
|
| 6191 |
# If no C compiler flags were specified, use CFLAGS. |
| 6192 |
LTCFLAGS=${LTCFLAGS-"$CFLAGS"} |
| 6193 |
|
| 6194 |
# Allow CC to be a program name with arguments. |
| 6195 |
compiler=$CC |
| 6196 |
])# _LT_AC_SYS_COMPILER |
| 6197 |
|
| 6198 |
|
| 6199 |
# _LT_CC_BASENAME(CC) |
| 6200 |
# ------------------- |
| 6201 |
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. |
| 6202 |
AC_DEFUN([_LT_CC_BASENAME], |
| 6203 |
[for cc_temp in $1""; do |
| 6204 |
case $cc_temp in |
| 6205 |
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; |
| 6206 |
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; |
| 6207 |
\-*) ;; |
| 6208 |
*) break;; |
| 6209 |
esac |
| 6210 |
done |
| 6211 |
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` |
| 6212 |
]) |
| 6213 |
|
| 6214 |
|
| 6215 |
# _LT_COMPILER_BOILERPLATE |
| 6216 |
# ------------------------ |
| 6217 |
# Check for compiler boilerplate output or warnings with |
| 6218 |
# the simple compiler test code. |
| 6219 |
AC_DEFUN([_LT_COMPILER_BOILERPLATE], |
| 6220 |
[ac_outfile=conftest.$ac_objext |
| 6221 |
printf "$lt_simple_compile_test_code" >conftest.$ac_ext |
| 6222 |
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err |
| 6223 |
_lt_compiler_boilerplate=`cat conftest.err` |
| 6224 |
$rm conftest* |
| 6225 |
])# _LT_COMPILER_BOILERPLATE |
| 6226 |
|
| 6227 |
|
| 6228 |
# _LT_LINKER_BOILERPLATE |
| 6229 |
# ---------------------- |
| 6230 |
# Check for linker boilerplate output or warnings with |
| 6231 |
# the simple link test code. |
| 6232 |
AC_DEFUN([_LT_LINKER_BOILERPLATE], |
| 6233 |
[ac_outfile=conftest.$ac_objext |
| 6234 |
printf "$lt_simple_link_test_code" >conftest.$ac_ext |
| 6235 |
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err |
| 6236 |
_lt_linker_boilerplate=`cat conftest.err` |
| 6237 |
$rm conftest* |
| 6238 |
])# _LT_LINKER_BOILERPLATE |
| 6239 |
|
| 6240 |
|
| 6241 |
# _LT_AC_SYS_LIBPATH_AIX |
| 6242 |
# ---------------------- |
| 6243 |
# Links a minimal program and checks the executable |
| 6244 |
# for the system default hardcoded library path. In most cases, |
| 6245 |
# this is /usr/lib:/lib, but when the MPI compilers are used |
| 6246 |
# the location of the communication and MPI libs are included too. |
| 6247 |
# If we don't find anything, use the default library path according |
| 6248 |
# to the aix ld manual. |
| 6249 |
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], |
| 6250 |
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ |
| 6251 |
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } |
| 6252 |
}'` |
| 6253 |
# Check for a 64-bit object if we didn't find anything. |
| 6254 |
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; } |
| 6255 |
}'`; fi],[]) |
| 6256 |
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi |
| 6257 |
])# _LT_AC_SYS_LIBPATH_AIX |
| 6258 |
|
| 6259 |
|
| 6260 |
# _LT_AC_SHELL_INIT(ARG) |
| 6261 |
# ---------------------- |
| 6262 |
AC_DEFUN([_LT_AC_SHELL_INIT], |
| 6263 |
[ifdef([AC_DIVERSION_NOTICE], |
| 6264 |
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], |
| 6265 |
[AC_DIVERT_PUSH(NOTICE)]) |
| 6266 |
$1 |
| 6267 |
AC_DIVERT_POP |
| 6268 |
])# _LT_AC_SHELL_INIT |
| 6269 |
|
| 6270 |
|
| 6271 |
# _LT_AC_PROG_ECHO_BACKSLASH |
| 6272 |
# -------------------------- |
| 6273 |
# Add some code to the start of the generated configure script which |
| 6274 |
# will find an echo command which doesn't interpret backslashes. |
| 6275 |
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], |
| 6276 |
[_LT_AC_SHELL_INIT([ |
| 6277 |
# Check that we are running under the correct shell. |
| 6278 |
SHELL=${CONFIG_SHELL-/bin/sh} |
| 6279 |
|
| 6280 |
case X$ECHO in |
| 6281 |
X*--fallback-echo) |
| 6282 |
# Remove one level of quotation (which was required for Make). |
| 6283 |
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` |
| 6284 |
;; |
| 6285 |
esac |
| 6286 |
|
| 6287 |
echo=${ECHO-echo} |
| 6288 |
if test "X[$]1" = X--no-reexec; then |
| 6289 |
# Discard the --no-reexec flag, and continue. |
| 6290 |
shift |
| 6291 |
elif test "X[$]1" = X--fallback-echo; then |
| 6292 |
# Avoid inline document here, it may be left over |
| 6293 |
: |
| 6294 |
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then |
| 6295 |
# Yippee, $echo works! |
| 6296 |
: |
| 6297 |
else |
| 6298 |
# Restart under the correct shell. |
| 6299 |
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} |
| 6300 |
fi |
| 6301 |
|
| 6302 |
if test "X[$]1" = X--fallback-echo; then |
| 6303 |
# used as fallback echo |
| 6304 |
shift |
| 6305 |
cat <<EOF |
| 6306 |
[$]* |
| 6307 |
EOF |
| 6308 |
exit 0 |
| 6309 |
fi |
| 6310 |
|
| 6311 |
# The HP-UX ksh and POSIX shell print the target directory to stdout |
| 6312 |
# if CDPATH is set. |
| 6313 |
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
| 6314 |
|
| 6315 |
if test -z "$ECHO"; then |
| 6316 |
if test "X${echo_test_string+set}" != Xset; then |
| 6317 |
# find a string as large as possible, as long as the shell can cope with it |
| 6318 |
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do |
| 6319 |
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... |
| 6320 |
if (echo_test_string=`eval $cmd`) 2>/dev/null && |
| 6321 |
echo_test_string=`eval $cmd` && |
| 6322 |
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null |
| 6323 |
then |
| 6324 |
break |
| 6325 |
fi |
| 6326 |
done |
| 6327 |
fi |
| 6328 |
|
| 6329 |
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
| 6330 |
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
| 6331 |
test "X$echo_testing_string" = "X$echo_test_string"; then |
| 6332 |
: |
| 6333 |
else |
| 6334 |
# The Solaris, AIX, and Digital Unix default echo programs unquote |
| 6335 |
# backslashes. This makes it impossible to quote backslashes using |
| 6336 |
# echo "$something" | sed 's/\\/\\\\/g' |
| 6337 |
# |
| 6338 |
# So, first we look for a working echo in the user's PATH. |
| 6339 |
|
| 6340 |
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
| 6341 |
for dir in $PATH /usr/ucb; do |
| 6342 |
IFS="$lt_save_ifs" |
| 6343 |
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && |
| 6344 |
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && |
| 6345 |
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && |
| 6346 |
test "X$echo_testing_string" = "X$echo_test_string"; then |
| 6347 |
echo="$dir/echo" |
| 6348 |
break |
| 6349 |
fi |
| 6350 |
done |
| 6351 |
IFS="$lt_save_ifs" |
| 6352 |
|
| 6353 |
if test "X$echo" = Xecho; then |
| 6354 |
# We didn't find a better echo, so look for alternatives. |
| 6355 |
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && |
| 6356 |
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && |
| 6357 |
test "X$echo_testing_string" = "X$echo_test_string"; then |
| 6358 |
# This shell has a builtin print -r that does the trick. |
| 6359 |
echo='print -r' |
| 6360 |
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && |
| 6361 |
test "X$CONFIG_SHELL" != X/bin/ksh; then |
| 6362 |
# If we have ksh, try running configure again with it. |
| 6363 |
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
| 6364 |
export ORIGINAL_CONFIG_SHELL |
| 6365 |
CONFIG_SHELL=/bin/ksh |
| 6366 |
export CONFIG_SHELL |
| 6367 |
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} |
| 6368 |
else |
| 6369 |
# Try using printf. |
| 6370 |
echo='printf %s\n' |
| 6371 |
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
| 6372 |
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
| 6373 |
test "X$echo_testing_string" = "X$echo_test_string"; then |
| 6374 |
# Cool, printf works |
| 6375 |
: |
| 6376 |
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
| 6377 |
test "X$echo_testing_string" = 'X\t' && |
| 6378 |
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
| 6379 |
test "X$echo_testing_string" = "X$echo_test_string"; then |
| 6380 |
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL |
| 6381 |
export CONFIG_SHELL |
| 6382 |
SHELL="$CONFIG_SHELL" |
| 6383 |
export SHELL |
| 6384 |
echo="$CONFIG_SHELL [$]0 --fallback-echo" |
| 6385 |
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
| 6386 |
test "X$echo_testing_string" = 'X\t' && |
| 6387 |
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
| 6388 |
test "X$echo_testing_string" = "X$echo_test_string"; then |
| 6389 |
echo="$CONFIG_SHELL [$]0 --fallback-echo" |
| 6390 |
else |
| 6391 |
# maybe with a smaller string... |
| 6392 |
prev=: |
| 6393 |
|
| 6394 |
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do |
| 6395 |
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null |
| 6396 |
then |
| 6397 |
break |
| 6398 |
fi |
| 6399 |
prev="$cmd" |
| 6400 |
done |
| 6401 |
|
| 6402 |
if test "$prev" != 'sed 50q "[$]0"'; then |
| 6403 |
echo_test_string=`eval $prev` |
| 6404 |
export echo_test_string |
| 6405 |
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} |
| 6406 |
else |
| 6407 |
# Oops. We lost completely, so just stick with echo. |
| 6408 |
echo=echo |
| 6409 |
fi |
| 6410 |
fi |
| 6411 |
fi |
| 6412 |
fi |
| 6413 |
fi |
| 6414 |
fi |
| 6415 |
|
| 6416 |
# Copy echo and quote the copy suitably for passing to libtool from |
| 6417 |
# the Makefile, instead of quoting the original, which is used later. |
| 6418 |
ECHO=$echo |
| 6419 |
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then |
| 6420 |
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" |
| 6421 |
fi |
| 6422 |
|
| 6423 |
AC_SUBST(ECHO) |
| 6424 |
])])# _LT_AC_PROG_ECHO_BACKSLASH |
| 6425 |
|
| 6426 |
|
| 6427 |
# _LT_AC_LOCK |
| 6428 |
# ----------- |
| 6429 |
AC_DEFUN([_LT_AC_LOCK], |
| 6430 |
[AC_ARG_ENABLE([libtool-lock], |
| 6431 |
[AC_HELP_STRING([--disable-libtool-lock], |
| 6432 |
[avoid locking (might break parallel builds)])]) |
| 6433 |
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
| 6434 |
|
| 6435 |
# Some flags need to be propagated to the compiler or linker for good |
| 6436 |
# libtool support. |
| 6437 |
case $host in |
| 6438 |
ia64-*-hpux*) |
| 6439 |
# Find out which ABI we are using. |
| 6440 |
echo 'int i;' > conftest.$ac_ext |
| 6441 |
if AC_TRY_EVAL(ac_compile); then |
| 6442 |
case `/usr/bin/file conftest.$ac_objext` in |
| 6443 |
*ELF-32*) |
| 6444 |
HPUX_IA64_MODE="32" |
| 6445 |
;; |
| 6446 |
*ELF-64*) |
| 6447 |
HPUX_IA64_MODE="64" |
| 6448 |
;; |
| 6449 |
esac |
| 6450 |
fi |
| 6451 |
rm -rf conftest* |
| 6452 |
;; |
| 6453 |
*-*-irix6*) |
| 6454 |
# Find out which ABI we are using. |
| 6455 |
echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
| 6456 |
if AC_TRY_EVAL(ac_compile); then |
| 6457 |
if test "$lt_cv_prog_gnu_ld" = yes; then |
| 6458 |
case `/usr/bin/file conftest.$ac_objext` in |
| 6459 |
*32-bit*) |
| 6460 |
LD="${LD-ld} -melf32bsmip" |
| 6461 |
;; |
| 6462 |
*N32*) |
| 6463 |
LD="${LD-ld} -melf32bmipn32" |
| 6464 |
;; |
| 6465 |
*64-bit*) |
| 6466 |
LD="${LD-ld} -melf64bmip" |
| 6467 |
;; |
| 6468 |
esac |
| 6469 |
else |
| 6470 |
case `/usr/bin/file conftest.$ac_objext` in |
| 6471 |
*32-bit*) |
| 6472 |
LD="${LD-ld} -32" |
| 6473 |
;; |
| 6474 |
*N32*) |
| 6475 |
LD="${LD-ld} -n32" |
| 6476 |
;; |
| 6477 |
*64-bit*) |
| 6478 |
LD="${LD-ld} -64" |
| 6479 |
;; |
| 6480 |
esac |
| 6481 |
fi |
| 6482 |
fi |
| 6483 |
rm -rf conftest* |
| 6484 |
;; |
| 6485 |
|
| 6486 |
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) |
| 6487 |
# Find out which ABI we are using. |
| 6488 |
echo 'int i;' > conftest.$ac_ext |
| 6489 |
if AC_TRY_EVAL(ac_compile); then |
| 6490 |
case `/usr/bin/file conftest.o` in |
| 6491 |
*32-bit*) |
| 6492 |
case $host in |
| 6493 |
x86_64-*linux*) |
| 6494 |
LD="${LD-ld} -m elf_i386" |
| 6495 |
;; |
| 6496 |
ppc64-*linux*|powerpc64-*linux*) |
| 6497 |
LD="${LD-ld} -m elf32ppclinux" |
| 6498 |
;; |
| 6499 |
s390x-*linux*) |
| 6500 |
LD="${LD-ld} -m elf_s390" |
| 6501 |
;; |
| 6502 |
sparc64-*linux*) |
| 6503 |
LD="${LD-ld} -m elf32_sparc" |
| 6504 |
;; |
| 6505 |
esac |
| 6506 |
;; |
| 6507 |
*64-bit*) |
| 6508 |
case $host in |
| 6509 |
x86_64-*linux*) |
| 6510 |
LD="${LD-ld} -m elf_x86_64" |
| 6511 |
;; |
| 6512 |
ppc*-*linux*|powerpc*-*linux*) |
| 6513 |
LD="${LD-ld} -m elf64ppc" |
| 6514 |
;; |
| 6515 |
s390*-*linux*) |
| 6516 |
LD="${LD-ld} -m elf64_s390" |
| 6517 |
;; |
| 6518 |
sparc*-*linux*) |
| 6519 |
LD="${LD-ld} -m elf64_sparc" |
| 6520 |
;; |
| 6521 |
esac |
| 6522 |
;; |
| 6523 |
esac |
| 6524 |
fi |
| 6525 |
rm -rf conftest* |
| 6526 |
;; |
| 6527 |
|
| 6528 |
*-*-sco3.2v5*) |
| 6529 |
# On SCO OpenServer 5, we need -belf to get full-featured binaries. |
| 6530 |
SAVE_CFLAGS="$CFLAGS" |
| 6531 |
CFLAGS="$CFLAGS -belf" |
| 6532 |
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
| 6533 |
[AC_LANG_PUSH(C) |
| 6534 |
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) |
| 6535 |
AC_LANG_POP]) |
| 6536 |
if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
| 6537 |
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
| 6538 |
CFLAGS="$SAVE_CFLAGS" |
| 6539 |
fi |
| 6540 |
;; |
| 6541 |
sparc*-*solaris*) |
| 6542 |
# Find out which ABI we are using. |
| 6543 |
echo 'int i;' > conftest.$ac_ext |
| 6544 |
if AC_TRY_EVAL(ac_compile); then |
| 6545 |
case `/usr/bin/file conftest.o` in |
| 6546 |
*64-bit*) |
| 6547 |
case $lt_cv_prog_gnu_ld in |
| 6548 |
yes*) LD="${LD-ld} -m elf64_sparc" ;; |
| 6549 |
*) LD="${LD-ld} -64" ;; |
| 6550 |
esac |
| 6551 |
;; |
| 6552 |
esac |
| 6553 |
fi |
| 6554 |
rm -rf conftest* |
| 6555 |
;; |
| 6556 |
|
| 6557 |
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], |
| 6558 |
[*-*-cygwin* | *-*-mingw* | *-*-pw32*) |
| 6559 |
AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
| 6560 |
AC_CHECK_TOOL(AS, as, false) |
| 6561 |
AC_CHECK_TOOL(OBJDUMP, objdump, false) |
| 6562 |
;; |
| 6563 |
]) |
| 6564 |
esac |
| 6565 |
|
| 6566 |
need_locks="$enable_libtool_lock" |
| 6567 |
|
| 6568 |
])# _LT_AC_LOCK |
| 6569 |
|
| 6570 |
|
| 6571 |
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
| 6572 |
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) |
| 6573 |
# ---------------------------------------------------------------- |
| 6574 |
# Check whether the given compiler option works |
| 6575 |
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], |
| 6576 |
[AC_REQUIRE([LT_AC_PROG_SED]) |
| 6577 |
AC_CACHE_CHECK([$1], [$2], |
| 6578 |
[$2=no |
| 6579 |
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) |
| 6580 |
printf "$lt_simple_compile_test_code" > conftest.$ac_ext |
| 6581 |
lt_compiler_flag="$3" |
| 6582 |
# Insert the option either (1) after the last *FLAGS variable, or |
| 6583 |
# (2) before a word containing "conftest.", or (3) at the end. |
| 6584 |
# Note that $ac_compile itself does not contain backslashes and begins |
| 6585 |
# with a dollar sign (not a hyphen), so the echo should work correctly. |
| 6586 |
# The option is referenced via a variable to avoid confusing sed. |
| 6587 |
lt_compile=`echo "$ac_compile" | $SED \ |
| 6588 |
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
| 6589 |
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ |
| 6590 |
-e 's:$: $lt_compiler_flag:'` |
| 6591 |
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) |
| 6592 |
(eval "$lt_compile" 2>conftest.err) |
| 6593 |
ac_status=$? |
| 6594 |
cat conftest.err >&AS_MESSAGE_LOG_FD |
| 6595 |
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
| 6596 |
if (exit $ac_status) && test -s "$ac_outfile"; then |
| 6597 |
# The compiler can only warn and ignore the option if not recognized |
| 6598 |
# So say no if there are warnings other than the usual output. |
| 6599 |
$echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp |
| 6600 |
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
| 6601 |
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then |
| 6602 |
$2=yes |
| 6603 |
fi |
| 6604 |
fi |
| 6605 |
$rm conftest* |
| 6606 |
]) |
| 6607 |
|
| 6608 |
if test x"[$]$2" = xyes; then |
| 6609 |
ifelse([$5], , :, [$5]) |
| 6610 |
else |
| 6611 |
ifelse([$6], , :, [$6]) |
| 6612 |
fi |
| 6613 |
])# AC_LIBTOOL_COMPILER_OPTION |
| 6614 |
|
| 6615 |
|
| 6616 |
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
| 6617 |
# [ACTION-SUCCESS], [ACTION-FAILURE]) |
| 6618 |
# ------------------------------------------------------------ |
| 6619 |
# Check whether the given compiler option works |
| 6620 |
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], |
| 6621 |
[AC_CACHE_CHECK([$1], [$2], |
| 6622 |
[$2=no |
| 6623 |
save_LDFLAGS="$LDFLAGS" |
| 6624 |
LDFLAGS="$LDFLAGS $3" |
| 6625 |
printf "$lt_simple_link_test_code" > conftest.$ac_ext |
| 6626 |
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then |
| 6627 |
# The linker can only warn and ignore the option if not recognized |
| 6628 |
# So say no if there are warnings |
| 6629 |
if test -s conftest.err; then |
| 6630 |
# Append any errors to the config.log. |
| 6631 |
cat conftest.err 1>&AS_MESSAGE_LOG_FD |
| 6632 |
$echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp |
| 6633 |
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
| 6634 |
if diff conftest.exp conftest.er2 >/dev/null; then |
| 6635 |
$2=yes |
| 6636 |
fi |
| 6637 |
else |
| 6638 |
$2=yes |
| 6639 |
fi |
| 6640 |
fi |
| 6641 |
$rm conftest* |
| 6642 |
LDFLAGS="$save_LDFLAGS" |
| 6643 |
]) |
| 6644 |
|
| 6645 |
if test x"[$]$2" = xyes; then |
| 6646 |
ifelse([$4], , :, [$4]) |
| 6647 |
else |
| 6648 |
ifelse([$5], , :, [$5]) |
| 6649 |
fi |
| 6650 |
])# AC_LIBTOOL_LINKER_OPTION |
| 6651 |
|
| 6652 |
|
| 6653 |
# AC_LIBTOOL_SYS_MAX_CMD_LEN |
| 6654 |
# -------------------------- |
| 6655 |
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], |
| 6656 |
[# find the maximum length of command line arguments |
| 6657 |
AC_MSG_CHECKING([the maximum length of command line arguments]) |
| 6658 |
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl |
| 6659 |
i=0 |
| 6660 |
teststring="ABCD" |
| 6661 |
|
| 6662 |
case $build_os in |
| 6663 |
msdosdjgpp*) |
| 6664 |
# On DJGPP, this test can blow up pretty badly due to problems in libc |
| 6665 |
# (any single argument exceeding 2000 bytes causes a buffer overrun |
| 6666 |
# during glob expansion). Even if it were fixed, the result of this |
| 6667 |
# check would be larger than it should be. |
| 6668 |
lt_cv_sys_max_cmd_len=12288; # 12K is about right |
| 6669 |
;; |
| 6670 |
|
| 6671 |
gnu*) |
| 6672 |
# Under GNU Hurd, this test is not required because there is |
| 6673 |
# no limit to the length of command line arguments. |
| 6674 |
# Libtool will interpret -1 as no limit whatsoever |
| 6675 |
lt_cv_sys_max_cmd_len=-1; |
| 6676 |
;; |
| 6677 |
|
| 6678 |
cygwin* | mingw*) |
| 6679 |
# On Win9x/ME, this test blows up -- it succeeds, but takes |
| 6680 |
# about 5 minutes as the teststring grows exponentially. |
| 6681 |
# Worse, since 9x/ME are not pre-emptively multitasking, |
| 6682 |
# you end up with a "frozen" computer, even though with patience |
| 6683 |
# the test eventually succeeds (with a max line length of 256k). |
| 6684 |
# Instead, let's just punt: use the minimum linelength reported by |
| 6685 |
# all of the supported platforms: 8192 (on NT/2K/XP). |
| 6686 |
lt_cv_sys_max_cmd_len=8192; |
| 6687 |
;; |
| 6688 |
|
| 6689 |
amigaos*) |
| 6690 |
# On AmigaOS with pdksh, this test takes hours, literally. |
| 6691 |
# So we just punt and use a minimum line length of 8192. |
| 6692 |
lt_cv_sys_max_cmd_len=8192; |
| 6693 |
;; |
| 6694 |
|
| 6695 |
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) |
| 6696 |
# This has been around since 386BSD, at least. Likely further. |
| 6697 |
if test -x /sbin/sysctl; then |
| 6698 |
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` |
| 6699 |
elif test -x /usr/sbin/sysctl; then |
| 6700 |
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` |
| 6701 |
else |
| 6702 |
lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs |
| 6703 |
fi |
| 6704 |
# And add a safety zone |
| 6705 |
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` |
| 6706 |
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` |
| 6707 |
;; |
| 6708 |
|
| 6709 |
interix*) |
| 6710 |
# We know the value 262144 and hardcode it with a safety zone (like BSD) |
| 6711 |
lt_cv_sys_max_cmd_len=196608 |
| 6712 |
;; |
| 6713 |
|
| 6714 |
osf*) |
| 6715 |
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure |
| 6716 |
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not |
| 6717 |
# nice to cause kernel panics so lets avoid the loop below. |
| 6718 |
# First set a reasonable default. |
| 6719 |
lt_cv_sys_max_cmd_len=16384 |
| 6720 |
# |
| 6721 |
if test -x /sbin/sysconfig; then |
| 6722 |
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in |
| 6723 |
*1*) lt_cv_sys_max_cmd_len=-1 ;; |
| 6724 |
esac |
| 6725 |
fi |
| 6726 |
;; |
| 6727 |
sco3.2v5*) |
| 6728 |
lt_cv_sys_max_cmd_len=102400 |
| 6729 |
;; |
| 6730 |
sysv5* | sco5v6* | sysv4.2uw2*) |
| 6731 |
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` |
| 6732 |
if test -n "$kargmax"; then |
| 6733 |
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` |
| 6734 |
else |
| 6735 |
lt_cv_sys_max_cmd_len=32768 |
| 6736 |
fi |
| 6737 |
;; |
| 6738 |
*) |
| 6739 |
# If test is not a shell built-in, we'll probably end up computing a |
| 6740 |
# maximum length that is only half of the actual maximum length, but |
| 6741 |
# we can't tell. |
| 6742 |
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} |
| 6743 |
while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ |
| 6744 |
= "XX$teststring") >/dev/null 2>&1 && |
| 6745 |
new_result=`expr "X$teststring" : ".*" 2>&1` && |
| 6746 |
lt_cv_sys_max_cmd_len=$new_result && |
| 6747 |
test $i != 17 # 1/2 MB should be enough |
| 6748 |
do |
| 6749 |
i=`expr $i + 1` |
| 6750 |
teststring=$teststring$teststring |
| 6751 |
done |
| 6752 |
teststring= |
| 6753 |
# Add a significant safety factor because C++ compilers can tack on massive |
| 6754 |
# amounts of additional arguments before passing them to the linker. |
| 6755 |
# It appears as though 1/2 is a usable value. |
| 6756 |
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` |
| 6757 |
;; |
| 6758 |
esac |
| 6759 |
]) |
| 6760 |
if test -n $lt_cv_sys_max_cmd_len ; then |
| 6761 |
AC_MSG_RESULT($lt_cv_sys_max_cmd_len) |
| 6762 |
else |
| 6763 |
AC_MSG_RESULT(none) |
| 6764 |
fi |
| 6765 |
])# AC_LIBTOOL_SYS_MAX_CMD_LEN |
| 6766 |
|
| 6767 |
|
| 6768 |
# _LT_AC_CHECK_DLFCN |
| 6769 |
# ------------------ |
| 6770 |
AC_DEFUN([_LT_AC_CHECK_DLFCN], |
| 6771 |
[AC_CHECK_HEADERS(dlfcn.h)dnl |
| 6772 |
])# _LT_AC_CHECK_DLFCN |
| 6773 |
|
| 6774 |
|
| 6775 |
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, |
| 6776 |
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) |
| 6777 |
# --------------------------------------------------------------------- |
| 6778 |
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], |
| 6779 |
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
| 6780 |
if test "$cross_compiling" = yes; then : |
| 6781 |
[$4] |
| 6782 |
else |
| 6783 |
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
| 6784 |
lt_status=$lt_dlunknown |
| 6785 |
cat > conftest.$ac_ext <<EOF |
| 6786 |
[#line __oline__ "configure" |
| 6787 |
#include "confdefs.h" |
| 6788 |
|
| 6789 |
#if HAVE_DLFCN_H |
| 6790 |
#include <dlfcn.h> |
| 6791 |
#endif |
| 6792 |
|
| 6793 |
#include <stdio.h> |
| 6794 |
|
| 6795 |
#ifdef RTLD_GLOBAL |
| 6796 |
# define LT_DLGLOBAL RTLD_GLOBAL |
| 6797 |
#else |
| 6798 |
# ifdef DL_GLOBAL |
| 6799 |
# define LT_DLGLOBAL DL_GLOBAL |
| 6800 |
# else |
| 6801 |
# define LT_DLGLOBAL 0 |
| 6802 |
# endif |
| 6803 |
#endif |
| 6804 |
|
| 6805 |
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we |
| 6806 |
find out it does not work in some platform. */ |
| 6807 |
#ifndef LT_DLLAZY_OR_NOW |
| 6808 |
# ifdef RTLD_LAZY |
| 6809 |
# define LT_DLLAZY_OR_NOW RTLD_LAZY |
| 6810 |
# else |
| 6811 |
# ifdef DL_LAZY |
| 6812 |
# define LT_DLLAZY_OR_NOW DL_LAZY |
| 6813 |
# else |
| 6814 |
# ifdef RTLD_NOW |
| 6815 |
# define LT_DLLAZY_OR_NOW RTLD_NOW |
| 6816 |
# else |
| 6817 |
# ifdef DL_NOW |
| 6818 |
# define LT_DLLAZY_OR_NOW DL_NOW |
| 6819 |
# else |
| 6820 |
# define LT_DLLAZY_OR_NOW 0 |
| 6821 |
# endif |
| 6822 |
# endif |
| 6823 |
# endif |
| 6824 |
# endif |
| 6825 |
#endif |
| 6826 |
|
| 6827 |
#ifdef __cplusplus |
| 6828 |
extern "C" void exit (int); |
| 6829 |
#endif |
| 6830 |
|
| 6831 |
void fnord() { int i=42;} |
| 6832 |
int main () |
| 6833 |
{ |
| 6834 |
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); |
| 6835 |
int status = $lt_dlunknown; |
| 6836 |
|
| 6837 |
if (self) |
| 6838 |
{ |
| 6839 |
if (dlsym (self,"fnord")) status = $lt_dlno_uscore; |
| 6840 |
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; |
| 6841 |
/* dlclose (self); */ |
| 6842 |
} |
| 6843 |
else |
| 6844 |
puts (dlerror ()); |
| 6845 |
|
| 6846 |
exit (status); |
| 6847 |
}] |
| 6848 |
EOF |
| 6849 |
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then |
| 6850 |
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null |
| 6851 |
lt_status=$? |
| 6852 |
case x$lt_status in |
| 6853 |
x$lt_dlno_uscore) $1 ;; |
| 6854 |
x$lt_dlneed_uscore) $2 ;; |
| 6855 |
x$lt_dlunknown|x*) $3 ;; |
| 6856 |
esac |
| 6857 |
else : |
| 6858 |
# compilation failed |
| 6859 |
$3 |
| 6860 |
fi |
| 6861 |
fi |
| 6862 |
rm -fr conftest* |
| 6863 |
])# _LT_AC_TRY_DLOPEN_SELF |
| 6864 |
|
| 6865 |
|
| 6866 |
# AC_LIBTOOL_DLOPEN_SELF |
| 6867 |
# ---------------------- |
| 6868 |
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], |
| 6869 |
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
| 6870 |
if test "x$enable_dlopen" != xyes; then |
| 6871 |
enable_dlopen=unknown |
| 6872 |
enable_dlopen_self=unknown |
| 6873 |
enable_dlopen_self_static=unknown |
| 6874 |
else |
| 6875 |
lt_cv_dlopen=no |
| 6876 |
lt_cv_dlopen_libs= |
| 6877 |
|
| 6878 |
case $host_os in |
| 6879 |
beos*) |
| 6880 |
lt_cv_dlopen="load_add_on" |
| 6881 |
lt_cv_dlopen_libs= |
| 6882 |
lt_cv_dlopen_self=yes |
| 6883 |
;; |
| 6884 |
|
| 6885 |
mingw* | pw32*) |
| 6886 |
lt_cv_dlopen="LoadLibrary" |
| 6887 |
lt_cv_dlopen_libs= |
| 6888 |
;; |
| 6889 |
|
| 6890 |
cygwin*) |
| 6891 |
lt_cv_dlopen="dlopen" |
| 6892 |
lt_cv_dlopen_libs= |
| 6893 |
;; |
| 6894 |
|
| 6895 |
darwin*) |
| 6896 |
# if libdl is installed we need to link against it |
| 6897 |
AC_CHECK_LIB([dl], [dlopen], |
| 6898 |
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ |
| 6899 |
lt_cv_dlopen="dyld" |
| 6900 |
lt_cv_dlopen_libs= |
| 6901 |
lt_cv_dlopen_self=yes |
| 6902 |
]) |
| 6903 |
;; |
| 6904 |
|
| 6905 |
*) |
| 6906 |
AC_CHECK_FUNC([shl_load], |
| 6907 |
[lt_cv_dlopen="shl_load"], |
| 6908 |
[AC_CHECK_LIB([dld], [shl_load], |
| 6909 |
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], |
| 6910 |
[AC_CHECK_FUNC([dlopen], |
| 6911 |
[lt_cv_dlopen="dlopen"], |
| 6912 |
[AC_CHECK_LIB([dl], [dlopen], |
| 6913 |
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], |
| 6914 |
[AC_CHECK_LIB([svld], [dlopen], |
| 6915 |
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], |
| 6916 |
[AC_CHECK_LIB([dld], [dld_link], |
| 6917 |
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) |
| 6918 |
]) |
| 6919 |
]) |
| 6920 |
]) |
| 6921 |
]) |
| 6922 |
]) |
| 6923 |
;; |
| 6924 |
esac |
| 6925 |
|
| 6926 |
if test "x$lt_cv_dlopen" != xno; then |
| 6927 |
enable_dlopen=yes |
| 6928 |
else |
| 6929 |
enable_dlopen=no |
| 6930 |
fi |
| 6931 |
|
| 6932 |
case $lt_cv_dlopen in |
| 6933 |
dlopen) |
| 6934 |
save_CPPFLAGS="$CPPFLAGS" |
| 6935 |
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" |
| 6936 |
|
| 6937 |
save_LDFLAGS="$LDFLAGS" |
| 6938 |
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" |
| 6939 |
|
| 6940 |
save_LIBS="$LIBS" |
| 6941 |
LIBS="$lt_cv_dlopen_libs $LIBS" |
| 6942 |
|
| 6943 |
AC_CACHE_CHECK([whether a program can dlopen itself], |
| 6944 |
lt_cv_dlopen_self, [dnl |
| 6945 |
_LT_AC_TRY_DLOPEN_SELF( |
| 6946 |
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, |
| 6947 |
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) |
| 6948 |
]) |
| 6949 |
|
| 6950 |
if test "x$lt_cv_dlopen_self" = xyes; then |
| 6951 |
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" |
| 6952 |
AC_CACHE_CHECK([whether a statically linked program can dlopen itself], |
| 6953 |
lt_cv_dlopen_self_static, [dnl |
| 6954 |
_LT_AC_TRY_DLOPEN_SELF( |
| 6955 |
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, |
| 6956 |
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) |
| 6957 |
]) |
| 6958 |
fi |
| 6959 |
|
| 6960 |
CPPFLAGS="$save_CPPFLAGS" |
| 6961 |
LDFLAGS="$save_LDFLAGS" |
| 6962 |
LIBS="$save_LIBS" |
| 6963 |
;; |
| 6964 |
esac |
| 6965 |
|
| 6966 |
case $lt_cv_dlopen_self in |
| 6967 |
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; |
| 6968 |
*) enable_dlopen_self=unknown ;; |
| 6969 |
esac |
| 6970 |
|
| 6971 |
case $lt_cv_dlopen_self_static in |
| 6972 |
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; |
| 6973 |
*) enable_dlopen_self_static=unknown ;; |
| 6974 |
esac |
| 6975 |
fi |
| 6976 |
])# AC_LIBTOOL_DLOPEN_SELF |
| 6977 |
|
| 6978 |
|
| 6979 |
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) |
| 6980 |
# --------------------------------- |
| 6981 |
# Check to see if options -c and -o are simultaneously supported by compiler |
| 6982 |
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], |
| 6983 |
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
| 6984 |
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], |
| 6985 |
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], |
| 6986 |
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no |
| 6987 |
$rm -r conftest 2>/dev/null |
| 6988 |
mkdir conftest |
| 6989 |
cd conftest |
| 6990 |
mkdir out |
| 6991 |
printf "$lt_simple_compile_test_code" > conftest.$ac_ext |
| 6992 |
|
| 6993 |
lt_compiler_flag="-o out/conftest2.$ac_objext" |
| 6994 |
# Insert the option either (1) after the last *FLAGS variable, or |
| 6995 |
# (2) before a word containing "conftest.", or (3) at the end. |
| 6996 |
# Note that $ac_compile itself does not contain backslashes and begins |
| 6997 |
# with a dollar sign (not a hyphen), so the echo should work correctly. |
| 6998 |
lt_compile=`echo "$ac_compile" | $SED \ |
| 6999 |
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
| 7000 |
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ |
| 7001 |
-e 's:$: $lt_compiler_flag:'` |
| 7002 |
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) |
| 7003 |
(eval "$lt_compile" 2>out/conftest.err) |
| 7004 |
ac_status=$? |
| 7005 |
cat out/conftest.err >&AS_MESSAGE_LOG_FD |
| 7006 |
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
| 7007 |
if (exit $ac_status) && test -s out/conftest2.$ac_objext |
| 7008 |
then |
| 7009 |
# The compiler can only warn and ignore the option if not recognized |
| 7010 |
# So say no if there are warnings |
| 7011 |
$echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp |
| 7012 |
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 |
| 7013 |
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then |
| 7014 |
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes |
| 7015 |
fi |
| 7016 |
fi |
| 7017 |
chmod u+w . 2>&AS_MESSAGE_LOG_FD |
| 7018 |
$rm conftest* |
| 7019 |
# SGI C++ compiler will create directory out/ii_files/ for |
| 7020 |
# template instantiation |
| 7021 |
test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files |
| 7022 |
$rm out/* && rmdir out |
| 7023 |
cd .. |
| 7024 |
rmdir conftest |
| 7025 |
$rm conftest* |
| 7026 |
]) |
| 7027 |
])# AC_LIBTOOL_PROG_CC_C_O |
| 7028 |
|
| 7029 |
|
| 7030 |
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) |
| 7031 |
# ----------------------------------------- |
| 7032 |
# Check to see if we can do hard links to lock some files if needed |
| 7033 |
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], |
| 7034 |
[AC_REQUIRE([_LT_AC_LOCK])dnl |
| 7035 |
|
| 7036 |
hard_links="nottested" |
| 7037 |
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then |
| 7038 |
# do not overwrite the value of need_locks provided by the user |
| 7039 |
AC_MSG_CHECKING([if we can lock with hard links]) |
| 7040 |
hard_links=yes |
| 7041 |
$rm conftest* |
| 7042 |
ln conftest.a conftest.b 2>/dev/null && hard_links=no |
| 7043 |
touch conftest.a |
| 7044 |
ln conftest.a conftest.b 2>&5 || hard_links=no |
| 7045 |
ln conftest.a conftest.b 2>/dev/null && hard_links=no |
| 7046 |
AC_MSG_RESULT([$hard_links]) |
| 7047 |
if test "$hard_links" = no; then |
| 7048 |
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) |
| 7049 |
need_locks=warn |
| 7050 |
fi |
| 7051 |
else |
| 7052 |
need_locks=no |
| 7053 |
fi |
| 7054 |
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS |
| 7055 |
|
| 7056 |
|
| 7057 |
# AC_LIBTOOL_OBJDIR |
| 7058 |
# ----------------- |
| 7059 |
AC_DEFUN([AC_LIBTOOL_OBJDIR], |
| 7060 |
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], |
| 7061 |
[rm -f .libs 2>/dev/null |
| 7062 |
mkdir .libs 2>/dev/null |
| 7063 |
if test -d .libs; then |
| 7064 |
lt_cv_objdir=.libs |
| 7065 |
else |
| 7066 |
# MS-DOS does not allow filenames that begin with a dot. |
| 7067 |
lt_cv_objdir=_libs |
| 7068 |
fi |
| 7069 |
rmdir .libs 2>/dev/null]) |
| 7070 |
objdir=$lt_cv_objdir |
| 7071 |
])# AC_LIBTOOL_OBJDIR |
| 7072 |
|
| 7073 |
|
| 7074 |
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) |
| 7075 |
# ---------------------------------------------- |
| 7076 |
# Check hardcoding attributes. |
| 7077 |
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], |
| 7078 |
[AC_MSG_CHECKING([how to hardcode library paths into programs]) |
| 7079 |
_LT_AC_TAGVAR(hardcode_action, $1)= |
| 7080 |
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ |
| 7081 |
test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ |
| 7082 |
test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then |
| 7083 |
|
| 7084 |
# We can hardcode non-existant directories. |
| 7085 |
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && |
| 7086 |
# If the only mechanism to avoid hardcoding is shlibpath_var, we |
| 7087 |
# have to relink, otherwise we might link with an installed library |
| 7088 |
# when we should be linking with a yet-to-be-installed one |
| 7089 |
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && |
| 7090 |
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then |
| 7091 |
# Linking always hardcodes the temporary library directory. |
| 7092 |
_LT_AC_TAGVAR(hardcode_action, $1)=relink |
| 7093 |
else |
| 7094 |
# We can link without hardcoding, and we can hardcode nonexisting dirs. |
| 7095 |
_LT_AC_TAGVAR(hardcode_action, $1)=immediate |
| 7096 |
fi |
| 7097 |
else |
| 7098 |
# We cannot hardcode anything, or else we can only hardcode existing |
| 7099 |
# directories. |
| 7100 |
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported |
| 7101 |
fi |
| 7102 |
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) |
| 7103 |
|
| 7104 |
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then |
| 7105 |
# Fast installation is not supported |
| 7106 |
enable_fast_install=no |
| 7107 |
elif test "$shlibpath_overrides_runpath" = yes || |
| 7108 |
test "$enable_shared" = no; then |
| 7109 |
# Fast installation is not necessary |
| 7110 |
enable_fast_install=needless |
| 7111 |
fi |
| 7112 |
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH |
| 7113 |
|
| 7114 |
|
| 7115 |
# AC_LIBTOOL_SYS_LIB_STRIP |
| 7116 |
# ------------------------ |
| 7117 |
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], |
| 7118 |
[striplib= |
| 7119 |
old_striplib= |
| 7120 |
AC_MSG_CHECKING([whether stripping libraries is possible]) |
| 7121 |
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then |
| 7122 |
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" |
| 7123 |
test -z "$striplib" && striplib="$STRIP --strip-unneeded" |
| 7124 |
AC_MSG_RESULT([yes]) |
| 7125 |
else |
| 7126 |
# FIXME - insert some real tests, host_os isn't really good enough |
| 7127 |
case $host_os in |
| 7128 |
darwin*) |
| 7129 |
if test -n "$STRIP" ; then |
| 7130 |
striplib="$STRIP -x" |
| 7131 |
AC_MSG_RESULT([yes]) |
| 7132 |
else |
| 7133 |
AC_MSG_RESULT([no]) |
| 7134 |
fi |
| 7135 |
;; |
| 7136 |
*) |
| 7137 |
AC_MSG_RESULT([no]) |
| 7138 |
;; |
| 7139 |
esac |
| 7140 |
fi |
| 7141 |
])# AC_LIBTOOL_SYS_LIB_STRIP |
| 7142 |
|
| 7143 |
|
| 7144 |
# AC_LIBTOOL_SYS_DYNAMIC_LINKER |
| 7145 |
# ----------------------------- |
| 7146 |
# PORTME Fill in your ld.so characteristics |
| 7147 |
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], |
| 7148 |
[AC_MSG_CHECKING([dynamic linker characteristics]) |
| 7149 |
library_names_spec= |
| 7150 |
libname_spec='lib$name' |
| 7151 |
soname_spec= |
| 7152 |
shrext_cmds=".so" |
| 7153 |
postinstall_cmds= |
| 7154 |
postuninstall_cmds= |
| 7155 |
finish_cmds= |
| 7156 |
finish_eval= |
| 7157 |
shlibpath_var= |
| 7158 |
shlibpath_overrides_runpath=unknown |
| 7159 |
version_type=none |
| 7160 |
dynamic_linker="$host_os ld.so" |
| 7161 |
sys_lib_dlsearch_path_spec="/lib /usr/lib" |
| 7162 |
if test "$GCC" = yes; then |
| 7163 |
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` |
| 7164 |
if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then |
| 7165 |
# if the path contains ";" then we assume it to be the separator |
| 7166 |
# otherwise default to the standard path separator (i.e. ":") - it is |
| 7167 |
# assumed that no part of a normal pathname contains ";" but that should |
| 7168 |
# okay in the real world where ";" in dirpaths is itself problematic. |
| 7169 |
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` |
| 7170 |
else |
| 7171 |
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` |
| 7172 |
fi |
| 7173 |
else |
| 7174 |
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
| 7175 |
fi |
| 7176 |
need_lib_prefix=unknown |
| 7177 |
hardcode_into_libs=no |
| 7178 |
|
| 7179 |
# when you set need_version to no, make sure it does not cause -set_version |
| 7180 |
# flags to be left without arguments |
| 7181 |
need_version=unknown |
| 7182 |
|
| 7183 |
case $host_os in |
| 7184 |
aix3*) |
| 7185 |
version_type=linux |
| 7186 |
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' |
| 7187 |
shlibpath_var=LIBPATH |
| 7188 |
|
| 7189 |
# AIX 3 has no versioning support, so we append a major version to the name. |
| 7190 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7191 |
;; |
| 7192 |
|
| 7193 |
aix4* | aix5*) |
| 7194 |
version_type=linux |
| 7195 |
need_lib_prefix=no |
| 7196 |
need_version=no |
| 7197 |
hardcode_into_libs=yes |
| 7198 |
if test "$host_cpu" = ia64; then |
| 7199 |
# AIX 5 supports IA64 |
| 7200 |
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' |
| 7201 |
shlibpath_var=LD_LIBRARY_PATH |
| 7202 |
else |
| 7203 |
# With GCC up to 2.95.x, collect2 would create an import file |
| 7204 |
# for dependence libraries. The import file would start with |
| 7205 |
# the line `#! .'. This would cause the generated library to |
| 7206 |
# depend on `.', always an invalid library. This was fixed in |
| 7207 |
# development snapshots of GCC prior to 3.0. |
| 7208 |
case $host_os in |
| 7209 |
aix4 | aix4.[[01]] | aix4.[[01]].*) |
| 7210 |
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' |
| 7211 |
echo ' yes ' |
| 7212 |
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then |
| 7213 |
: |
| 7214 |
else |
| 7215 |
can_build_shared=no |
| 7216 |
fi |
| 7217 |
;; |
| 7218 |
esac |
| 7219 |
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct |
| 7220 |
# soname into executable. Probably we can add versioning support to |
| 7221 |
# collect2, so additional links can be useful in future. |
| 7222 |
if test "$aix_use_runtimelinking" = yes; then |
| 7223 |
# If using run time linking (on AIX 4.2 or later) use lib<name>.so |
| 7224 |
# instead of lib<name>.a to let people know that these are not |
| 7225 |
# typical AIX shared libraries. |
| 7226 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
| 7227 |
else |
| 7228 |
# We preserve .a as extension for shared libraries through AIX4.2 |
| 7229 |
# and later when we are not doing run time linking. |
| 7230 |
library_names_spec='${libname}${release}.a $libname.a' |
| 7231 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7232 |
fi |
| 7233 |
shlibpath_var=LIBPATH |
| 7234 |
fi |
| 7235 |
;; |
| 7236 |
|
| 7237 |
amigaos*) |
| 7238 |
library_names_spec='$libname.ixlibrary $libname.a' |
| 7239 |
# Create ${libname}_ixlibrary.a entries in /sys/libs. |
| 7240 |
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' |
| 7241 |
;; |
| 7242 |
|
| 7243 |
beos*) |
| 7244 |
library_names_spec='${libname}${shared_ext}' |
| 7245 |
dynamic_linker="$host_os ld.so" |
| 7246 |
shlibpath_var=LIBRARY_PATH |
| 7247 |
;; |
| 7248 |
|
| 7249 |
bsdi[[45]]*) |
| 7250 |
version_type=linux |
| 7251 |
need_version=no |
| 7252 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
| 7253 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7254 |
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' |
| 7255 |
shlibpath_var=LD_LIBRARY_PATH |
| 7256 |
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
| 7257 |
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
| 7258 |
# the default ld.so.conf also contains /usr/contrib/lib and |
| 7259 |
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
| 7260 |
# libtool to hard-code these into programs |
| 7261 |
;; |
| 7262 |
|
| 7263 |
cygwin* | mingw* | pw32*) |
| 7264 |
version_type=windows |
| 7265 |
shrext_cmds=".dll" |
| 7266 |
need_version=no |
| 7267 |
need_lib_prefix=no |
| 7268 |
|
| 7269 |
case $GCC,$host_os in |
| 7270 |
yes,cygwin* | yes,mingw* | yes,pw32*) |
| 7271 |
library_names_spec='$libname.dll.a' |
| 7272 |
# DLL is installed to $(libdir)/../bin by postinstall_cmds |
| 7273 |
postinstall_cmds='base_file=`basename \${file}`~ |
| 7274 |
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ |
| 7275 |
dldir=$destdir/`dirname \$dlpath`~ |
| 7276 |
test -d \$dldir || mkdir -p \$dldir~ |
| 7277 |
$install_prog $dir/$dlname \$dldir/$dlname~ |
| 7278 |
chmod a+x \$dldir/$dlname' |
| 7279 |
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ |
| 7280 |
dlpath=$dir/\$dldll~ |
| 7281 |
$rm \$dlpath' |
| 7282 |
shlibpath_overrides_runpath=yes |
| 7283 |
|
| 7284 |
case $host_os in |
| 7285 |
cygwin*) |
| 7286 |
# Cygwin DLLs use 'cyg' prefix rather than 'lib' |
| 7287 |
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' |
| 7288 |
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" |
| 7289 |
;; |
| 7290 |
mingw*) |
| 7291 |
# MinGW DLLs use traditional 'lib' prefix |
| 7292 |
soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' |
| 7293 |
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` |
| 7294 |
if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then |
| 7295 |
# It is most probably a Windows format PATH printed by |
| 7296 |
# mingw gcc, but we are running on Cygwin. Gcc prints its search |
| 7297 |
# path with ; separators, and with drive letters. We can handle the |
| 7298 |
# drive letters (cygwin fileutils understands them), so leave them, |
| 7299 |
# especially as we might pass files found there to a mingw objdump, |
| 7300 |
# which wouldn't understand a cygwinified path. Ahh. |
| 7301 |
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` |
| 7302 |
else |
| 7303 |
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` |
| 7304 |
fi |
| 7305 |
;; |
| 7306 |
pw32*) |
| 7307 |
# pw32 DLLs use 'pw' prefix rather than 'lib' |
| 7308 |
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' |
| 7309 |
;; |
| 7310 |
esac |
| 7311 |
;; |
| 7312 |
|
| 7313 |
*) |
| 7314 |
library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' |
| 7315 |
;; |
| 7316 |
esac |
| 7317 |
dynamic_linker='Win32 ld.exe' |
| 7318 |
# FIXME: first we should search . and the directory the executable is in |
| 7319 |
shlibpath_var=PATH |
| 7320 |
;; |
| 7321 |
|
| 7322 |
darwin* | rhapsody*) |
| 7323 |
dynamic_linker="$host_os dyld" |
| 7324 |
version_type=darwin |
| 7325 |
need_lib_prefix=no |
| 7326 |
need_version=no |
| 7327 |
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' |
| 7328 |
soname_spec='${libname}${release}${major}$shared_ext' |
| 7329 |
shlibpath_overrides_runpath=yes |
| 7330 |
shlibpath_var=DYLD_LIBRARY_PATH |
| 7331 |
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' |
| 7332 |
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. |
| 7333 |
if test "$GCC" = yes; then |
| 7334 |
sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` |
| 7335 |
else |
| 7336 |
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' |
| 7337 |
fi |
| 7338 |
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' |
| 7339 |
;; |
| 7340 |
|
| 7341 |
dgux*) |
| 7342 |
version_type=linux |
| 7343 |
need_lib_prefix=no |
| 7344 |
need_version=no |
| 7345 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' |
| 7346 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7347 |
shlibpath_var=LD_LIBRARY_PATH |
| 7348 |
;; |
| 7349 |
|
| 7350 |
freebsd1*) |
| 7351 |
dynamic_linker=no |
| 7352 |
;; |
| 7353 |
|
| 7354 |
freebsd* | dragonfly*) |
| 7355 |
# DragonFly does not have aout. When/if they implement a new |
| 7356 |
# versioning mechanism, adjust this. |
| 7357 |
if test -x /usr/bin/objformat; then |
| 7358 |
objformat=`/usr/bin/objformat` |
| 7359 |
else |
| 7360 |
case $host_os in |
| 7361 |
freebsd[[123]]*) objformat=aout ;; |
| 7362 |
*) objformat=elf ;; |
| 7363 |
esac |
| 7364 |
fi |
| 7365 |
version_type=freebsd-$objformat |
| 7366 |
case $version_type in |
| 7367 |
freebsd-elf*) |
| 7368 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' |
| 7369 |
need_version=no |
| 7370 |
need_lib_prefix=no |
| 7371 |
;; |
| 7372 |
freebsd-*) |
| 7373 |
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' |
| 7374 |
need_version=yes |
| 7375 |
;; |
| 7376 |
esac |
| 7377 |
shlibpath_var=LD_LIBRARY_PATH |
| 7378 |
case $host_os in |
| 7379 |
freebsd2*) |
| 7380 |
shlibpath_overrides_runpath=yes |
| 7381 |
;; |
| 7382 |
freebsd3.[[01]]* | freebsdelf3.[[01]]*) |
| 7383 |
shlibpath_overrides_runpath=yes |
| 7384 |
hardcode_into_libs=yes |
| 7385 |
;; |
| 7386 |
freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ |
| 7387 |
freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) |
| 7388 |
shlibpath_overrides_runpath=no |
| 7389 |
hardcode_into_libs=yes |
| 7390 |
;; |
| 7391 |
freebsd*) # from 4.6 on |
| 7392 |
shlibpath_overrides_runpath=yes |
| 7393 |
hardcode_into_libs=yes |
| 7394 |
;; |
| 7395 |
esac |
| 7396 |
;; |
| 7397 |
|
| 7398 |
gnu*) |
| 7399 |
version_type=linux |
| 7400 |
need_lib_prefix=no |
| 7401 |
need_version=no |
| 7402 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' |
| 7403 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7404 |
shlibpath_var=LD_LIBRARY_PATH |
| 7405 |
hardcode_into_libs=yes |
| 7406 |
;; |
| 7407 |
|
| 7408 |
hpux9* | hpux10* | hpux11*) |
| 7409 |
# Give a soname corresponding to the major version so that dld.sl refuses to |
| 7410 |
# link against other versions. |
| 7411 |
version_type=sunos |
| 7412 |
need_lib_prefix=no |
| 7413 |
need_version=no |
| 7414 |
case $host_cpu in |
| 7415 |
ia64*) |
| 7416 |
shrext_cmds='.so' |
| 7417 |
hardcode_into_libs=yes |
| 7418 |
dynamic_linker="$host_os dld.so" |
| 7419 |
shlibpath_var=LD_LIBRARY_PATH |
| 7420 |
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. |
| 7421 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
| 7422 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7423 |
if test "X$HPUX_IA64_MODE" = X32; then |
| 7424 |
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" |
| 7425 |
else |
| 7426 |
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" |
| 7427 |
fi |
| 7428 |
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec |
| 7429 |
;; |
| 7430 |
hppa*64*) |
| 7431 |
shrext_cmds='.sl' |
| 7432 |
hardcode_into_libs=yes |
| 7433 |
dynamic_linker="$host_os dld.sl" |
| 7434 |
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH |
| 7435 |
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. |
| 7436 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
| 7437 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7438 |
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" |
| 7439 |
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec |
| 7440 |
;; |
| 7441 |
*) |
| 7442 |
shrext_cmds='.sl' |
| 7443 |
dynamic_linker="$host_os dld.sl" |
| 7444 |
shlibpath_var=SHLIB_PATH |
| 7445 |
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH |
| 7446 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
| 7447 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7448 |
;; |
| 7449 |
esac |
| 7450 |
# HP-UX runs *really* slowly unless shared libraries are mode 555. |
| 7451 |
postinstall_cmds='chmod 555 $lib' |
| 7452 |
;; |
| 7453 |
|
| 7454 |
interix3*) |
| 7455 |
version_type=linux |
| 7456 |
need_lib_prefix=no |
| 7457 |
need_version=no |
| 7458 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' |
| 7459 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7460 |
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' |
| 7461 |
shlibpath_var=LD_LIBRARY_PATH |
| 7462 |
shlibpath_overrides_runpath=no |
| 7463 |
hardcode_into_libs=yes |
| 7464 |
;; |
| 7465 |
|
| 7466 |
irix5* | irix6* | nonstopux*) |
| 7467 |
case $host_os in |
| 7468 |
nonstopux*) version_type=nonstopux ;; |
| 7469 |
*) |
| 7470 |
if test "$lt_cv_prog_gnu_ld" = yes; then |
| 7471 |
version_type=linux |
| 7472 |
else |
| 7473 |
version_type=irix |
| 7474 |
fi ;; |
| 7475 |
esac |
| 7476 |
need_lib_prefix=no |
| 7477 |
need_version=no |
| 7478 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7479 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' |
| 7480 |
case $host_os in |
| 7481 |
irix5* | nonstopux*) |
| 7482 |
libsuff= shlibsuff= |
| 7483 |
;; |
| 7484 |
*) |
| 7485 |
case $LD in # libtool.m4 will add one of these switches to LD |
| 7486 |
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") |
| 7487 |
libsuff= shlibsuff= libmagic=32-bit;; |
| 7488 |
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") |
| 7489 |
libsuff=32 shlibsuff=N32 libmagic=N32;; |
| 7490 |
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") |
| 7491 |
libsuff=64 shlibsuff=64 libmagic=64-bit;; |
| 7492 |
*) libsuff= shlibsuff= libmagic=never-match;; |
| 7493 |
esac |
| 7494 |
;; |
| 7495 |
esac |
| 7496 |
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
| 7497 |
shlibpath_overrides_runpath=no |
| 7498 |
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" |
| 7499 |
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" |
| 7500 |
hardcode_into_libs=yes |
| 7501 |
;; |
| 7502 |
|
| 7503 |
# No shared lib support for Linux oldld, aout, or coff. |
| 7504 |
linux*oldld* | linux*aout* | linux*coff*) |
| 7505 |
dynamic_linker=no |
| 7506 |
;; |
| 7507 |
|
| 7508 |
# This must be Linux ELF. |
| 7509 |
linux* | k*bsd*-gnu) |
| 7510 |
version_type=linux |
| 7511 |
need_lib_prefix=no |
| 7512 |
need_version=no |
| 7513 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
| 7514 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7515 |
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
| 7516 |
shlibpath_var=LD_LIBRARY_PATH |
| 7517 |
shlibpath_overrides_runpath=no |
| 7518 |
# This implies no fast_install, which is unacceptable. |
| 7519 |
# Some rework will be needed to allow for fast_install |
| 7520 |
# before this can be enabled. |
| 7521 |
hardcode_into_libs=yes |
| 7522 |
|
| 7523 |
# Append ld.so.conf contents to the search path |
| 7524 |
if test -f /etc/ld.so.conf; then |
| 7525 |
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` |
| 7526 |
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" |
| 7527 |
fi |
| 7528 |
|
| 7529 |
# We used to test for /lib/ld.so.1 and disable shared libraries on |
| 7530 |
# powerpc, because MkLinux only supported shared libraries with the |
| 7531 |
# GNU dynamic linker. Since this was broken with cross compilers, |
| 7532 |
# most powerpc-linux boxes support dynamic linking these days and |
| 7533 |
# people can always --disable-shared, the test was removed, and we |
| 7534 |
# assume the GNU/Linux dynamic linker is in use. |
| 7535 |
dynamic_linker='GNU/Linux ld.so' |
| 7536 |
;; |
| 7537 |
|
| 7538 |
netbsdelf*-gnu) |
| 7539 |
version_type=linux |
| 7540 |
need_lib_prefix=no |
| 7541 |
need_version=no |
| 7542 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' |
| 7543 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7544 |
shlibpath_var=LD_LIBRARY_PATH |
| 7545 |
shlibpath_overrides_runpath=no |
| 7546 |
hardcode_into_libs=yes |
| 7547 |
dynamic_linker='NetBSD ld.elf_so' |
| 7548 |
;; |
| 7549 |
|
| 7550 |
netbsd*) |
| 7551 |
version_type=sunos |
| 7552 |
need_lib_prefix=no |
| 7553 |
need_version=no |
| 7554 |
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 7555 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' |
| 7556 |
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
| 7557 |
dynamic_linker='NetBSD (a.out) ld.so' |
| 7558 |
else |
| 7559 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' |
| 7560 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7561 |
dynamic_linker='NetBSD ld.elf_so' |
| 7562 |
fi |
| 7563 |
shlibpath_var=LD_LIBRARY_PATH |
| 7564 |
shlibpath_overrides_runpath=yes |
| 7565 |
hardcode_into_libs=yes |
| 7566 |
;; |
| 7567 |
|
| 7568 |
newsos6) |
| 7569 |
version_type=linux |
| 7570 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
| 7571 |
shlibpath_var=LD_LIBRARY_PATH |
| 7572 |
shlibpath_overrides_runpath=yes |
| 7573 |
;; |
| 7574 |
|
| 7575 |
nto-qnx*) |
| 7576 |
version_type=linux |
| 7577 |
need_lib_prefix=no |
| 7578 |
need_version=no |
| 7579 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
| 7580 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7581 |
shlibpath_var=LD_LIBRARY_PATH |
| 7582 |
shlibpath_overrides_runpath=yes |
| 7583 |
;; |
| 7584 |
|
| 7585 |
openbsd*) |
| 7586 |
version_type=sunos |
| 7587 |
sys_lib_dlsearch_path_spec="/usr/lib" |
| 7588 |
need_lib_prefix=no |
| 7589 |
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. |
| 7590 |
case $host_os in |
| 7591 |
openbsd3.3 | openbsd3.3.*) need_version=yes ;; |
| 7592 |
*) need_version=no ;; |
| 7593 |
esac |
| 7594 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' |
| 7595 |
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
| 7596 |
shlibpath_var=LD_LIBRARY_PATH |
| 7597 |
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| 7598 |
case $host_os in |
| 7599 |
openbsd2.[[89]] | openbsd2.[[89]].*) |
| 7600 |
shlibpath_overrides_runpath=no |
| 7601 |
;; |
| 7602 |
*) |
| 7603 |
shlibpath_overrides_runpath=yes |
| 7604 |
;; |
| 7605 |
esac |
| 7606 |
else |
| 7607 |
shlibpath_overrides_runpath=yes |
| 7608 |
fi |
| 7609 |
;; |
| 7610 |
|
| 7611 |
os2*) |
| 7612 |
libname_spec='$name' |
| 7613 |
shrext_cmds=".dll" |
| 7614 |
need_lib_prefix=no |
| 7615 |
library_names_spec='$libname${shared_ext} $libname.a' |
| 7616 |
dynamic_linker='OS/2 ld.exe' |
| 7617 |
shlibpath_var=LIBPATH |
| 7618 |
;; |
| 7619 |
|
| 7620 |
osf3* | osf4* | osf5*) |
| 7621 |
version_type=osf |
| 7622 |
need_lib_prefix=no |
| 7623 |
need_version=no |
| 7624 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7625 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
| 7626 |
shlibpath_var=LD_LIBRARY_PATH |
| 7627 |
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" |
| 7628 |
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" |
| 7629 |
;; |
| 7630 |
|
| 7631 |
solaris*) |
| 7632 |
version_type=linux |
| 7633 |
need_lib_prefix=no |
| 7634 |
need_version=no |
| 7635 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
| 7636 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7637 |
shlibpath_var=LD_LIBRARY_PATH |
| 7638 |
shlibpath_overrides_runpath=yes |
| 7639 |
hardcode_into_libs=yes |
| 7640 |
# ldd complains unless libraries are executable |
| 7641 |
postinstall_cmds='chmod +x $lib' |
| 7642 |
;; |
| 7643 |
|
| 7644 |
sunos4*) |
| 7645 |
version_type=sunos |
| 7646 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' |
| 7647 |
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' |
| 7648 |
shlibpath_var=LD_LIBRARY_PATH |
| 7649 |
shlibpath_overrides_runpath=yes |
| 7650 |
if test "$with_gnu_ld" = yes; then |
| 7651 |
need_lib_prefix=no |
| 7652 |
fi |
| 7653 |
need_version=yes |
| 7654 |
;; |
| 7655 |
|
| 7656 |
sysv4 | sysv4.3*) |
| 7657 |
version_type=linux |
| 7658 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
| 7659 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7660 |
shlibpath_var=LD_LIBRARY_PATH |
| 7661 |
case $host_vendor in |
| 7662 |
sni) |
| 7663 |
shlibpath_overrides_runpath=no |
| 7664 |
need_lib_prefix=no |
| 7665 |
export_dynamic_flag_spec='${wl}-Blargedynsym' |
| 7666 |
runpath_var=LD_RUN_PATH |
| 7667 |
;; |
| 7668 |
siemens) |
| 7669 |
need_lib_prefix=no |
| 7670 |
;; |
| 7671 |
motorola) |
| 7672 |
need_lib_prefix=no |
| 7673 |
need_version=no |
| 7674 |
shlibpath_overrides_runpath=no |
| 7675 |
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' |
| 7676 |
;; |
| 7677 |
esac |
| 7678 |
;; |
| 7679 |
|
| 7680 |
sysv4*MP*) |
| 7681 |
if test -d /usr/nec ;then |
| 7682 |
version_type=linux |
| 7683 |
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' |
| 7684 |
soname_spec='$libname${shared_ext}.$major' |
| 7685 |
shlibpath_var=LD_LIBRARY_PATH |
| 7686 |
fi |
| 7687 |
;; |
| 7688 |
|
| 7689 |
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) |
| 7690 |
version_type=freebsd-elf |
| 7691 |
need_lib_prefix=no |
| 7692 |
need_version=no |
| 7693 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' |
| 7694 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7695 |
shlibpath_var=LD_LIBRARY_PATH |
| 7696 |
hardcode_into_libs=yes |
| 7697 |
if test "$with_gnu_ld" = yes; then |
| 7698 |
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' |
| 7699 |
shlibpath_overrides_runpath=no |
| 7700 |
else |
| 7701 |
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' |
| 7702 |
shlibpath_overrides_runpath=yes |
| 7703 |
case $host_os in |
| 7704 |
sco3.2v5*) |
| 7705 |
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" |
| 7706 |
;; |
| 7707 |
esac |
| 7708 |
fi |
| 7709 |
sys_lib_dlsearch_path_spec='/usr/lib' |
| 7710 |
;; |
| 7711 |
|
| 7712 |
uts4*) |
| 7713 |
version_type=linux |
| 7714 |
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
| 7715 |
soname_spec='${libname}${release}${shared_ext}$major' |
| 7716 |
shlibpath_var=LD_LIBRARY_PATH |
| 7717 |
;; |
| 7718 |
|
| 7719 |
*) |
| 7720 |
dynamic_linker=no |
| 7721 |
;; |
| 7722 |
esac |
| 7723 |
AC_MSG_RESULT([$dynamic_linker]) |
| 7724 |
test "$dynamic_linker" = no && can_build_shared=no |
| 7725 |
|
| 7726 |
variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
| 7727 |
if test "$GCC" = yes; then |
| 7728 |
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
| 7729 |
fi |
| 7730 |
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER |
| 7731 |
|
| 7732 |
|
| 7733 |
# _LT_AC_TAGCONFIG |
| 7734 |
# ---------------- |
| 7735 |
AC_DEFUN([_LT_AC_TAGCONFIG], |
| 7736 |
[AC_ARG_WITH([tags], |
| 7737 |
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], |
| 7738 |
[include additional configurations @<:@automatic@:>@])], |
| 7739 |
[tagnames="$withval"]) |
| 7740 |
|
| 7741 |
if test -f "$ltmain" && test -n "$tagnames"; then |
| 7742 |
if test ! -f "${ofile}"; then |
| 7743 |
AC_MSG_WARN([output file `$ofile' does not exist]) |
| 7744 |
fi |
| 7745 |
|
| 7746 |
if test -z "$LTCC"; then |
| 7747 |
eval "`$SHELL ${ofile} --config | grep '^LTCC='`" |
| 7748 |
if test -z "$LTCC"; then |
| 7749 |
AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) |
| 7750 |
else |
| 7751 |
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) |
| 7752 |
fi |
| 7753 |
fi |
| 7754 |
if test -z "$LTCFLAGS"; then |
| 7755 |
eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" |
| 7756 |
fi |
| 7757 |
|
| 7758 |
# Extract list of available tagged configurations in $ofile. |
| 7759 |
# Note that this assumes the entire list is on one line. |
| 7760 |
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` |
| 7761 |
|
| 7762 |
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
| 7763 |
for tagname in $tagnames; do |
| 7764 |
IFS="$lt_save_ifs" |
| 7765 |
# Check whether tagname contains only valid characters |
| 7766 |
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in |
| 7767 |
"") ;; |
| 7768 |
*) AC_MSG_ERROR([invalid tag name: $tagname]) |
| 7769 |
;; |
| 7770 |
esac |
| 7771 |
|
| 7772 |
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null |
| 7773 |
then |
| 7774 |
AC_MSG_ERROR([tag name \"$tagname\" already exists]) |
| 7775 |
fi |
| 7776 |
|
| 7777 |
# Update the list of available tags. |
| 7778 |
if test -n "$tagname"; then |
| 7779 |
echo appending configuration tag \"$tagname\" to $ofile |
| 7780 |
|
| 7781 |
case $tagname in |
| 7782 |
CXX) |
| 7783 |
if test -n "$CXX" && ( test "X$CXX" != "Xno" && |
| 7784 |
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || |
| 7785 |
(test "X$CXX" != "Xg++"))) ; then |
| 7786 |
AC_LIBTOOL_LANG_CXX_CONFIG |
| 7787 |
else |
| 7788 |
tagname="" |
| 7789 |
fi |
| 7790 |
;; |
| 7791 |
|
| 7792 |
F77) |
| 7793 |
if test -n "$F77" && test "X$F77" != "Xno"; then |
| 7794 |
AC_LIBTOOL_LANG_F77_CONFIG |
| 7795 |
else |
| 7796 |
tagname="" |
| 7797 |
fi |
| 7798 |
;; |
| 7799 |
|
| 7800 |
GCJ) |
| 7801 |
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then |
| 7802 |
AC_LIBTOOL_LANG_GCJ_CONFIG |
| 7803 |
else |
| 7804 |
tagname="" |
| 7805 |
fi |
| 7806 |
;; |
| 7807 |
|
| 7808 |
RC) |
| 7809 |
AC_LIBTOOL_LANG_RC_CONFIG |
| 7810 |
;; |
| 7811 |
|
| 7812 |
*) |
| 7813 |
AC_MSG_ERROR([Unsupported tag name: $tagname]) |
| 7814 |
;; |
| 7815 |
esac |
| 7816 |
|
| 7817 |
# Append the new tag name to the list of available tags. |
| 7818 |
if test -n "$tagname" ; then |
| 7819 |
available_tags="$available_tags $tagname" |
| 7820 |
fi |
| 7821 |
fi |
| 7822 |
done |
| 7823 |
IFS="$lt_save_ifs" |
| 7824 |
|
| 7825 |
# Now substitute the updated list of available tags. |
| 7826 |
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then |
| 7827 |
mv "${ofile}T" "$ofile" |
| 7828 |
chmod +x "$ofile" |
| 7829 |
else |
| 7830 |
rm -f "${ofile}T" |
| 7831 |
AC_MSG_ERROR([unable to update list of available tagged configurations.]) |
| 7832 |
fi |
| 7833 |
fi |
| 7834 |
])# _LT_AC_TAGCONFIG |
| 7835 |
|
| 7836 |
|
| 7837 |
# AC_LIBTOOL_DLOPEN |
| 7838 |
# ----------------- |
| 7839 |
# enable checks for dlopen support |
| 7840 |
AC_DEFUN([AC_LIBTOOL_DLOPEN], |
| 7841 |
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) |
| 7842 |
])# AC_LIBTOOL_DLOPEN |
| 7843 |
|
| 7844 |
|
| 7845 |
# AC_LIBTOOL_WIN32_DLL |
| 7846 |
# -------------------- |
| 7847 |
# declare package support for building win32 DLLs |
| 7848 |
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], |
| 7849 |
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) |
| 7850 |
])# AC_LIBTOOL_WIN32_DLL |
| 7851 |
|
| 7852 |
|
| 7853 |
# AC_ENABLE_SHARED([DEFAULT]) |
| 7854 |
# --------------------------- |
| 7855 |
# implement the --enable-shared flag |
| 7856 |
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
| 7857 |
AC_DEFUN([AC_ENABLE_SHARED], |
| 7858 |
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl |
| 7859 |
AC_ARG_ENABLE([shared], |
| 7860 |
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], |
| 7861 |
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], |
| 7862 |
[p=${PACKAGE-default} |
| 7863 |
case $enableval in |
| 7864 |
yes) enable_shared=yes ;; |
| 7865 |
no) enable_shared=no ;; |
| 7866 |
*) |
| 7867 |
enable_shared=no |
| 7868 |
# Look at the argument we got. We use all the common list separators. |
| 7869 |
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
| 7870 |
for pkg in $enableval; do |
| 7871 |
IFS="$lt_save_ifs" |
| 7872 |
if test "X$pkg" = "X$p"; then |
| 7873 |
enable_shared=yes |
| 7874 |
fi |
| 7875 |
done |
| 7876 |
IFS="$lt_save_ifs" |
| 7877 |
;; |
| 7878 |
esac], |
| 7879 |
[enable_shared=]AC_ENABLE_SHARED_DEFAULT) |
| 7880 |
])# AC_ENABLE_SHARED |
| 7881 |
|
| 7882 |
|
| 7883 |
# AC_DISABLE_SHARED |
| 7884 |
# ----------------- |
| 7885 |
# set the default shared flag to --disable-shared |
| 7886 |
AC_DEFUN([AC_DISABLE_SHARED], |
| 7887 |
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 7888 |
AC_ENABLE_SHARED(no) |
| 7889 |
])# AC_DISABLE_SHARED |
| 7890 |
|
| 7891 |
|
| 7892 |
# AC_ENABLE_STATIC([DEFAULT]) |
| 7893 |
# --------------------------- |
| 7894 |
# implement the --enable-static flag |
| 7895 |
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
| 7896 |
AC_DEFUN([AC_ENABLE_STATIC], |
| 7897 |
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl |
| 7898 |
AC_ARG_ENABLE([static], |
| 7899 |
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], |
| 7900 |
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], |
| 7901 |
[p=${PACKAGE-default} |
| 7902 |
case $enableval in |
| 7903 |
yes) enable_static=yes ;; |
| 7904 |
no) enable_static=no ;; |
| 7905 |
*) |
| 7906 |
enable_static=no |
| 7907 |
# Look at the argument we got. We use all the common list separators. |
| 7908 |
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
| 7909 |
for pkg in $enableval; do |
| 7910 |
IFS="$lt_save_ifs" |
| 7911 |
if test "X$pkg" = "X$p"; then |
| 7912 |
enable_static=yes |
| 7913 |
fi |
| 7914 |
done |
| 7915 |
IFS="$lt_save_ifs" |
| 7916 |
;; |
| 7917 |
esac], |
| 7918 |
[enable_static=]AC_ENABLE_STATIC_DEFAULT) |
| 7919 |
])# AC_ENABLE_STATIC |
| 7920 |
|
| 7921 |
|
| 7922 |
# AC_DISABLE_STATIC |
| 7923 |
# ----------------- |
| 7924 |
# set the default static flag to --disable-static |
| 7925 |
AC_DEFUN([AC_DISABLE_STATIC], |
| 7926 |
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 7927 |
AC_ENABLE_STATIC(no) |
| 7928 |
])# AC_DISABLE_STATIC |
| 7929 |
|
| 7930 |
|
| 7931 |
# AC_ENABLE_FAST_INSTALL([DEFAULT]) |
| 7932 |
# --------------------------------- |
| 7933 |
# implement the --enable-fast-install flag |
| 7934 |
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
| 7935 |
AC_DEFUN([AC_ENABLE_FAST_INSTALL], |
| 7936 |
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl |
| 7937 |
AC_ARG_ENABLE([fast-install], |
| 7938 |
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], |
| 7939 |
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], |
| 7940 |
[p=${PACKAGE-default} |
| 7941 |
case $enableval in |
| 7942 |
yes) enable_fast_install=yes ;; |
| 7943 |
no) enable_fast_install=no ;; |
| 7944 |
*) |
| 7945 |
enable_fast_install=no |
| 7946 |
# Look at the argument we got. We use all the common list separators. |
| 7947 |
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
| 7948 |
for pkg in $enableval; do |
| 7949 |
IFS="$lt_save_ifs" |
| 7950 |
if test "X$pkg" = "X$p"; then |
| 7951 |
enable_fast_install=yes |
| 7952 |
fi |
| 7953 |
done |
| 7954 |
IFS="$lt_save_ifs" |
| 7955 |
;; |
| 7956 |
esac], |
| 7957 |
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) |
| 7958 |
])# AC_ENABLE_FAST_INSTALL |
| 7959 |
|
| 7960 |
|
| 7961 |
# AC_DISABLE_FAST_INSTALL |
| 7962 |
# ----------------------- |
| 7963 |
# set the default to --disable-fast-install |
| 7964 |
AC_DEFUN([AC_DISABLE_FAST_INSTALL], |
| 7965 |
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 7966 |
AC_ENABLE_FAST_INSTALL(no) |
| 7967 |
])# AC_DISABLE_FAST_INSTALL |
| 7968 |
|
| 7969 |
|
| 7970 |
# AC_LIBTOOL_PICMODE([MODE]) |
| 7971 |
# -------------------------- |
| 7972 |
# implement the --with-pic flag |
| 7973 |
# MODE is either `yes' or `no'. If omitted, it defaults to `both'. |
| 7974 |
AC_DEFUN([AC_LIBTOOL_PICMODE], |
| 7975 |
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 7976 |
pic_mode=ifelse($#,1,$1,default) |
| 7977 |
])# AC_LIBTOOL_PICMODE |
| 7978 |
|
| 7979 |
|
| 7980 |
# AC_PROG_EGREP |
| 7981 |
# ------------- |
| 7982 |
# This is predefined starting with Autoconf 2.54, so this conditional |
| 7983 |
# definition can be removed once we require Autoconf 2.54 or later. |
| 7984 |
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], |
| 7985 |
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], |
| 7986 |
[if echo a | (grep -E '(a|b)') >/dev/null 2>&1 |
| 7987 |
then ac_cv_prog_egrep='grep -E' |
| 7988 |
else ac_cv_prog_egrep='egrep' |
| 7989 |
fi]) |
| 7990 |
EGREP=$ac_cv_prog_egrep |
| 7991 |
AC_SUBST([EGREP]) |
| 7992 |
])]) |
| 7993 |
|
| 7994 |
|
| 7995 |
# AC_PATH_TOOL_PREFIX |
| 7996 |
# ------------------- |
| 7997 |
# find a file program which can recognise shared library |
| 7998 |
AC_DEFUN([AC_PATH_TOOL_PREFIX], |
| 7999 |
[AC_REQUIRE([AC_PROG_EGREP])dnl |
| 8000 |
AC_MSG_CHECKING([for $1]) |
| 8001 |
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, |
| 8002 |
[case $MAGIC_CMD in |
| 8003 |
[[\\/*] | ?:[\\/]*]) |
| 8004 |
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
| 8005 |
;; |
| 8006 |
*) |
| 8007 |
lt_save_MAGIC_CMD="$MAGIC_CMD" |
| 8008 |
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
| 8009 |
dnl $ac_dummy forces splitting on constant user-supplied paths. |
| 8010 |
dnl POSIX.2 word splitting is done only on the output of word expansions, |
| 8011 |
dnl not every word. This closes a longstanding sh security hole. |
| 8012 |
ac_dummy="ifelse([$2], , $PATH, [$2])" |
| 8013 |
for ac_dir in $ac_dummy; do |
| 8014 |
IFS="$lt_save_ifs" |
| 8015 |
test -z "$ac_dir" && ac_dir=. |
| 8016 |
if test -f $ac_dir/$1; then |
| 8017 |
lt_cv_path_MAGIC_CMD="$ac_dir/$1" |
| 8018 |
if test -n "$file_magic_test_file"; then |
| 8019 |
case $deplibs_check_method in |
| 8020 |
"file_magic "*) |
| 8021 |
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` |
| 8022 |
MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
| 8023 |
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
| 8024 |
$EGREP "$file_magic_regex" > /dev/null; then |
| 8025 |
: |
| 8026 |
else |
| 8027 |
cat <<EOF 1>&2 |
| 8028 |
|
| 8029 |
*** Warning: the command libtool uses to detect shared libraries, |
| 8030 |
*** $file_magic_cmd, produces output that libtool cannot recognize. |
| 8031 |
*** The result is that libtool may fail to recognize shared libraries |
| 8032 |
*** as such. This will affect the creation of libtool libraries that |
| 8033 |
*** depend on shared libraries, but programs linked with such libtool |
| 8034 |
*** libraries will work regardless of this problem. Nevertheless, you |
| 8035 |
*** may want to report the problem to your system manager and/or to |
| 8036 |
*** bug-libtool@gnu.org |
| 8037 |
|
| 8038 |
EOF |
| 8039 |
fi ;; |
| 8040 |
esac |
| 8041 |
fi |
| 8042 |
break |
| 8043 |
fi |
| 8044 |
done |
| 8045 |
IFS="$lt_save_ifs" |
| 8046 |
MAGIC_CMD="$lt_save_MAGIC_CMD" |
| 8047 |
;; |
| 8048 |
esac]) |
| 8049 |
MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
| 8050 |
if test -n "$MAGIC_CMD"; then |
| 8051 |
AC_MSG_RESULT($MAGIC_CMD) |
| 8052 |
else |
| 8053 |
AC_MSG_RESULT(no) |
| 8054 |
fi |
| 8055 |
])# AC_PATH_TOOL_PREFIX |
| 8056 |
|
| 8057 |
|
| 8058 |
# AC_PATH_MAGIC |
| 8059 |
# ------------- |
| 8060 |
# find a file program which can recognise a shared library |
| 8061 |
AC_DEFUN([AC_PATH_MAGIC], |
| 8062 |
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) |
| 8063 |
if test -z "$lt_cv_path_MAGIC_CMD"; then |
| 8064 |
if test -n "$ac_tool_prefix"; then |
| 8065 |
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) |
| 8066 |
else |
| 8067 |
MAGIC_CMD=: |
| 8068 |
fi |
| 8069 |
fi |
| 8070 |
])# AC_PATH_MAGIC |
| 8071 |
|
| 8072 |
|
| 8073 |
# AC_PROG_LD |
| 8074 |
# ---------- |
| 8075 |
# find the pathname to the GNU or non-GNU linker |
| 8076 |
AC_DEFUN([AC_PROG_LD], |
| 8077 |
[AC_ARG_WITH([gnu-ld], |
| 8078 |
[AC_HELP_STRING([--with-gnu-ld], |
| 8079 |
[assume the C compiler uses GNU ld @<:@default=no@:>@])], |
| 8080 |
[test "$withval" = no || with_gnu_ld=yes], |
| 8081 |
[with_gnu_ld=no]) |
| 8082 |
AC_REQUIRE([LT_AC_PROG_SED])dnl |
| 8083 |
AC_REQUIRE([AC_PROG_CC])dnl |
| 8084 |
AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 8085 |
AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
| 8086 |
ac_prog=ld |
| 8087 |
if test "$GCC" = yes; then |
| 8088 |
# Check if gcc -print-prog-name=ld gives a path. |
| 8089 |
AC_MSG_CHECKING([for ld used by $CC]) |
| 8090 |
case $host in |
| 8091 |
*-*-mingw*) |
| 8092 |
# gcc leaves a trailing carriage return which upsets mingw |
| 8093 |
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
| 8094 |
*) |
| 8095 |
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
| 8096 |
esac |
| 8097 |
case $ac_prog in |
| 8098 |
# Accept absolute paths. |
| 8099 |
[[\\/]]* | ?:[[\\/]]*) |
| 8100 |
re_direlt='/[[^/]][[^/]]*/\.\./' |
| 8101 |
# Canonicalize the pathname of ld |
| 8102 |
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` |
| 8103 |
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
| 8104 |
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` |
| 8105 |
done |
| 8106 |
test -z "$LD" && LD="$ac_prog" |
| 8107 |
;; |
| 8108 |
"") |
| 8109 |
# If it fails, then pretend we aren't using GCC. |
| 8110 |
ac_prog=ld |
| 8111 |
;; |
| 8112 |
*) |
| 8113 |
# If it is relative, then search for the first ld in PATH. |
| 8114 |
with_gnu_ld=unknown |
| 8115 |
;; |
| 8116 |
esac |
| 8117 |
elif test "$with_gnu_ld" = yes; then |
| 8118 |
AC_MSG_CHECKING([for GNU ld]) |
| 8119 |
else |
| 8120 |
AC_MSG_CHECKING([for non-GNU ld]) |
| 8121 |
fi |
| 8122 |
AC_CACHE_VAL(lt_cv_path_LD, |
| 8123 |
[if test -z "$LD"; then |
| 8124 |
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
| 8125 |
for ac_dir in $PATH; do |
| 8126 |
IFS="$lt_save_ifs" |
| 8127 |
test -z "$ac_dir" && ac_dir=. |
| 8128 |
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
| 8129 |
lt_cv_path_LD="$ac_dir/$ac_prog" |
| 8130 |
# Check to see if the program is GNU ld. I'd rather use --version, |
| 8131 |
# but apparently some variants of GNU ld only accept -v. |
| 8132 |
# Break only if it was the GNU/non-GNU ld that we prefer. |
| 8133 |
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in |
| 8134 |
*GNU* | *'with BFD'*) |
| 8135 |
test "$with_gnu_ld" != no && break |
| 8136 |
;; |
| 8137 |
*) |
| 8138 |
test "$with_gnu_ld" != yes && break |
| 8139 |
;; |
| 8140 |
esac |
| 8141 |
fi |
| 8142 |
done |
| 8143 |
IFS="$lt_save_ifs" |
| 8144 |
else |
| 8145 |
lt_cv_path_LD="$LD" # Let the user override the test with a path. |
| 8146 |
fi]) |
| 8147 |
LD="$lt_cv_path_LD" |
| 8148 |
if test -n "$LD"; then |
| 8149 |
AC_MSG_RESULT($LD) |
| 8150 |
else |
| 8151 |
AC_MSG_RESULT(no) |
| 8152 |
fi |
| 8153 |
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
| 8154 |
AC_PROG_LD_GNU |
| 8155 |
])# AC_PROG_LD |
| 8156 |
|
| 8157 |
|
| 8158 |
# AC_PROG_LD_GNU |
| 8159 |
# -------------- |
| 8160 |
AC_DEFUN([AC_PROG_LD_GNU], |
| 8161 |
[AC_REQUIRE([AC_PROG_EGREP])dnl |
| 8162 |
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, |
| 8163 |
[# I'd rather use --version here, but apparently some GNU lds only accept -v. |
| 8164 |
case `$LD -v 2>&1 </dev/null` in |
| 8165 |
*GNU* | *'with BFD'*) |
| 8166 |
lt_cv_prog_gnu_ld=yes |
| 8167 |
;; |
| 8168 |
*) |
| 8169 |
lt_cv_prog_gnu_ld=no |
| 8170 |
;; |
| 8171 |
esac]) |
| 8172 |
with_gnu_ld=$lt_cv_prog_gnu_ld |
| 8173 |
])# AC_PROG_LD_GNU |
| 8174 |
|
| 8175 |
|
| 8176 |
# AC_PROG_LD_RELOAD_FLAG |
| 8177 |
# ---------------------- |
| 8178 |
# find reload flag for linker |
| 8179 |
# -- PORTME Some linkers may need a different reload flag. |
| 8180 |
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], |
| 8181 |
[AC_CACHE_CHECK([for $LD option to reload object files], |
| 8182 |
lt_cv_ld_reload_flag, |
| 8183 |
[lt_cv_ld_reload_flag='-r']) |
| 8184 |
reload_flag=$lt_cv_ld_reload_flag |
| 8185 |
case $reload_flag in |
| 8186 |
"" | " "*) ;; |
| 8187 |
*) reload_flag=" $reload_flag" ;; |
| 8188 |
esac |
| 8189 |
reload_cmds='$LD$reload_flag -o $output$reload_objs' |
| 8190 |
case $host_os in |
| 8191 |
darwin*) |
| 8192 |
if test "$GCC" = yes; then |
| 8193 |
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' |
| 8194 |
else |
| 8195 |
reload_cmds='$LD$reload_flag -o $output$reload_objs' |
| 8196 |
fi |
| 8197 |
;; |
| 8198 |
esac |
| 8199 |
])# AC_PROG_LD_RELOAD_FLAG |
| 8200 |
|
| 8201 |
|
| 8202 |
# AC_DEPLIBS_CHECK_METHOD |
| 8203 |
# ----------------------- |
| 8204 |
# how to check for library dependencies |
| 8205 |
# -- PORTME fill in with the dynamic library characteristics |
| 8206 |
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], |
| 8207 |
[AC_CACHE_CHECK([how to recognise dependent libraries], |
| 8208 |
lt_cv_deplibs_check_method, |
| 8209 |
[lt_cv_file_magic_cmd='$MAGIC_CMD' |
| 8210 |
lt_cv_file_magic_test_file= |
| 8211 |
lt_cv_deplibs_check_method='unknown' |
| 8212 |
# Need to set the preceding variable on all platforms that support |
| 8213 |
# interlibrary dependencies. |
| 8214 |
# 'none' -- dependencies not supported. |
| 8215 |
# `unknown' -- same as none, but documents that we really don't know. |
| 8216 |
# 'pass_all' -- all dependencies passed with no checks. |
| 8217 |
# 'test_compile' -- check by making test program. |
| 8218 |
# 'file_magic [[regex]]' -- check by looking for files in library path |
| 8219 |
# which responds to the $file_magic_cmd with a given extended regex. |
| 8220 |
# If you have `file' or equivalent on your system and you're not sure |
| 8221 |
# whether `pass_all' will *always* work, you probably want this one. |
| 8222 |
|
| 8223 |
case $host_os in |
| 8224 |
aix4* | aix5*) |
| 8225 |
lt_cv_deplibs_check_method=pass_all |
| 8226 |
;; |
| 8227 |
|
| 8228 |
beos*) |
| 8229 |
lt_cv_deplibs_check_method=pass_all |
| 8230 |
;; |
| 8231 |
|
| 8232 |
bsdi[[45]]*) |
| 8233 |
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' |
| 8234 |
lt_cv_file_magic_cmd='/usr/bin/file -L' |
| 8235 |
lt_cv_file_magic_test_file=/shlib/libc.so |
| 8236 |
;; |
| 8237 |
|
| 8238 |
cygwin*) |
| 8239 |
# func_win32_libid is a shell function defined in ltmain.sh |
| 8240 |
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' |
| 8241 |
lt_cv_file_magic_cmd='func_win32_libid' |
| 8242 |
;; |
| 8243 |
|
| 8244 |
mingw* | pw32*) |
| 8245 |
# Base MSYS/MinGW do not provide the 'file' command needed by |
| 8246 |
# func_win32_libid shell function, so use a weaker test based on 'objdump'. |
| 8247 |
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
| 8248 |
lt_cv_file_magic_cmd='$OBJDUMP -f' |
| 8249 |
;; |
| 8250 |
|
| 8251 |
darwin* | rhapsody*) |
| 8252 |
lt_cv_deplibs_check_method=pass_all |
| 8253 |
;; |
| 8254 |
|
| 8255 |
freebsd* | dragonfly*) |
| 8256 |
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
| 8257 |
case $host_cpu in |
| 8258 |
i*86 ) |
| 8259 |
# Not sure whether the presence of OpenBSD here was a mistake. |
| 8260 |
# Let's accept both of them until this is cleared up. |
| 8261 |
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' |
| 8262 |
lt_cv_file_magic_cmd=/usr/bin/file |
| 8263 |
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
| 8264 |
;; |
| 8265 |
esac |
| 8266 |
else |
| 8267 |
lt_cv_deplibs_check_method=pass_all |
| 8268 |
fi |
| 8269 |
;; |
| 8270 |
|
| 8271 |
gnu*) |
| 8272 |
lt_cv_deplibs_check_method=pass_all |
| 8273 |
;; |
| 8274 |
|
| 8275 |
hpux10.20* | hpux11*) |
| 8276 |
lt_cv_file_magic_cmd=/usr/bin/file |
| 8277 |
case $host_cpu in |
| 8278 |
ia64*) |
| 8279 |
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' |
| 8280 |
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so |
| 8281 |
;; |
| 8282 |
hppa*64*) |
| 8283 |
[lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] |
| 8284 |
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl |
| 8285 |
;; |
| 8286 |
*) |
| 8287 |
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' |
| 8288 |
lt_cv_file_magic_test_file=/usr/lib/libc.sl |
| 8289 |
;; |
| 8290 |
esac |
| 8291 |
;; |
| 8292 |
|
| 8293 |
interix3*) |
| 8294 |
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here |
| 8295 |
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' |
| 8296 |
;; |
| 8297 |
|
| 8298 |
irix5* | irix6* | nonstopux*) |
| 8299 |
case $LD in |
| 8300 |
*-32|*"-32 ") libmagic=32-bit;; |
| 8301 |
*-n32|*"-n32 ") libmagic=N32;; |
| 8302 |
*-64|*"-64 ") libmagic=64-bit;; |
| 8303 |
*) libmagic=never-match;; |
| 8304 |
esac |
| 8305 |
lt_cv_deplibs_check_method=pass_all |
| 8306 |
;; |
| 8307 |
|
| 8308 |
# This must be Linux ELF. |
| 8309 |
linux* | k*bsd*-gnu) |
| 8310 |
lt_cv_deplibs_check_method=pass_all |
| 8311 |
;; |
| 8312 |
|
| 8313 |
netbsd* | netbsdelf*-gnu) |
| 8314 |
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
| 8315 |
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' |
| 8316 |
else |
| 8317 |
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' |
| 8318 |
fi |
| 8319 |
;; |
| 8320 |
|
| 8321 |
newos6*) |
| 8322 |
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' |
| 8323 |
lt_cv_file_magic_cmd=/usr/bin/file |
| 8324 |
lt_cv_file_magic_test_file=/usr/lib/libnls.so |
| 8325 |
;; |
| 8326 |
|
| 8327 |
nto-qnx*) |
| 8328 |
lt_cv_deplibs_check_method=unknown |
| 8329 |
;; |
| 8330 |
|
| 8331 |
openbsd*) |
| 8332 |
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| 8333 |
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' |
| 8334 |
else |
| 8335 |
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' |
| 8336 |
fi |
| 8337 |
;; |
| 8338 |
|
| 8339 |
osf3* | osf4* | osf5*) |
| 8340 |
lt_cv_deplibs_check_method=pass_all |
| 8341 |
;; |
| 8342 |
|
| 8343 |
solaris*) |
| 8344 |
lt_cv_deplibs_check_method=pass_all |
| 8345 |
;; |
| 8346 |
|
| 8347 |
sysv4 | sysv4.3*) |
| 8348 |
case $host_vendor in |
| 8349 |
motorola) |
| 8350 |
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]]' |
| 8351 |
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` |
| 8352 |
;; |
| 8353 |
ncr) |
| 8354 |
lt_cv_deplibs_check_method=pass_all |
| 8355 |
;; |
| 8356 |
sequent) |
| 8357 |
lt_cv_file_magic_cmd='/bin/file' |
| 8358 |
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' |
| 8359 |
;; |
| 8360 |
sni) |
| 8361 |
lt_cv_file_magic_cmd='/bin/file' |
| 8362 |
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" |
| 8363 |
lt_cv_file_magic_test_file=/lib/libc.so |
| 8364 |
;; |
| 8365 |
siemens) |
| 8366 |
lt_cv_deplibs_check_method=pass_all |
| 8367 |
;; |
| 8368 |
pc) |
| 8369 |
lt_cv_deplibs_check_method=pass_all |
| 8370 |
;; |
| 8371 |
esac |
| 8372 |
;; |
| 8373 |
|
| 8374 |
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) |
| 8375 |
lt_cv_deplibs_check_method=pass_all |
| 8376 |
;; |
| 8377 |
esac |
| 8378 |
]) |
| 8379 |
file_magic_cmd=$lt_cv_file_magic_cmd |
| 8380 |
deplibs_check_method=$lt_cv_deplibs_check_method |
| 8381 |
test -z "$deplibs_check_method" && deplibs_check_method=unknown |
| 8382 |
])# AC_DEPLIBS_CHECK_METHOD |
| 8383 |
|
| 8384 |
|
| 8385 |
# AC_PROG_NM |
| 8386 |
# ---------- |
| 8387 |
# find the pathname to a BSD-compatible name lister |
| 8388 |
AC_DEFUN([AC_PROG_NM], |
| 8389 |
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, |
| 8390 |
[if test -n "$NM"; then |
| 8391 |
# Let the user override the test. |
| 8392 |
lt_cv_path_NM="$NM" |
| 8393 |
else |
| 8394 |
lt_nm_to_check="${ac_tool_prefix}nm" |
| 8395 |
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then |
| 8396 |
lt_nm_to_check="$lt_nm_to_check nm" |
| 8397 |
fi |
| 8398 |
for lt_tmp_nm in $lt_nm_to_check; do |
| 8399 |
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
| 8400 |
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do |
| 8401 |
IFS="$lt_save_ifs" |
| 8402 |
test -z "$ac_dir" && ac_dir=. |
| 8403 |
tmp_nm="$ac_dir/$lt_tmp_nm" |
| 8404 |
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then |
| 8405 |
# Check to see if the nm accepts a BSD-compat flag. |
| 8406 |
# Adding the `sed 1q' prevents false positives on HP-UX, which says: |
| 8407 |
# nm: unknown option "B" ignored |
| 8408 |
# Tru64's nm complains that /dev/null is an invalid object file |
| 8409 |
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in |
| 8410 |
*/dev/null* | *'Invalid file or object type'*) |
| 8411 |
lt_cv_path_NM="$tmp_nm -B" |
| 8412 |
break |
| 8413 |
;; |
| 8414 |
*) |
| 8415 |
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in |
| 8416 |
*/dev/null*) |
| 8417 |
lt_cv_path_NM="$tmp_nm -p" |
| 8418 |
break |
| 8419 |
;; |
| 8420 |
*) |
| 8421 |
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
| 8422 |
continue # so that we can try to find one that supports BSD flags |
| 8423 |
;; |
| 8424 |
esac |
| 8425 |
;; |
| 8426 |
esac |
| 8427 |
fi |
| 8428 |
done |
| 8429 |
IFS="$lt_save_ifs" |
| 8430 |
done |
| 8431 |
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
| 8432 |
fi]) |
| 8433 |
NM="$lt_cv_path_NM" |
| 8434 |
])# AC_PROG_NM |
| 8435 |
|
| 8436 |
|
| 8437 |
# AC_CHECK_LIBM |
| 8438 |
# ------------- |
| 8439 |
# check for math library |
| 8440 |
AC_DEFUN([AC_CHECK_LIBM], |
| 8441 |
[AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 8442 |
LIBM= |
| 8443 |
case $host in |
| 8444 |
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) |
| 8445 |
# These system don't have libm, or don't need it |
| 8446 |
;; |
| 8447 |
*-ncr-sysv4.3*) |
| 8448 |
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
| 8449 |
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") |
| 8450 |
;; |
| 8451 |
*) |
| 8452 |
AC_CHECK_LIB(m, cos, LIBM="-lm") |
| 8453 |
;; |
| 8454 |
esac |
| 8455 |
])# AC_CHECK_LIBM |
| 8456 |
|
| 8457 |
|
| 8458 |
# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) |
| 8459 |
# ----------------------------------- |
| 8460 |
# sets LIBLTDL to the link flags for the libltdl convenience library and |
| 8461 |
# LTDLINCL to the include flags for the libltdl header and adds |
| 8462 |
# --enable-ltdl-convenience to the configure arguments. Note that |
| 8463 |
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, |
| 8464 |
# it is assumed to be `libltdl'. LIBLTDL will be prefixed with |
| 8465 |
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' |
| 8466 |
# (note the single quotes!). If your package is not flat and you're not |
| 8467 |
# using automake, define top_builddir and top_srcdir appropriately in |
| 8468 |
# the Makefiles. |
| 8469 |
AC_DEFUN([AC_LIBLTDL_CONVENIENCE], |
| 8470 |
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 8471 |
case $enable_ltdl_convenience in |
| 8472 |
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
| 8473 |
"") enable_ltdl_convenience=yes |
| 8474 |
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
| 8475 |
esac |
| 8476 |
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la |
| 8477 |
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
| 8478 |
# For backwards non-gettext consistent compatibility... |
| 8479 |
INCLTDL="$LTDLINCL" |
| 8480 |
])# AC_LIBLTDL_CONVENIENCE |
| 8481 |
|
| 8482 |
|
| 8483 |
# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) |
| 8484 |
# ----------------------------------- |
| 8485 |
# sets LIBLTDL to the link flags for the libltdl installable library and |
| 8486 |
# LTDLINCL to the include flags for the libltdl header and adds |
| 8487 |
# --enable-ltdl-install to the configure arguments. Note that |
| 8488 |
# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, |
| 8489 |
# and an installed libltdl is not found, it is assumed to be `libltdl'. |
| 8490 |
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with |
| 8491 |
# '${top_srcdir}/' (note the single quotes!). If your package is not |
| 8492 |
# flat and you're not using automake, define top_builddir and top_srcdir |
| 8493 |
# appropriately in the Makefiles. |
| 8494 |
# In the future, this macro may have to be called after AC_PROG_LIBTOOL. |
| 8495 |
AC_DEFUN([AC_LIBLTDL_INSTALLABLE], |
| 8496 |
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
| 8497 |
AC_CHECK_LIB(ltdl, lt_dlinit, |
| 8498 |
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], |
| 8499 |
[if test x"$enable_ltdl_install" = xno; then |
| 8500 |
AC_MSG_WARN([libltdl not installed, but installation disabled]) |
| 8501 |
else |
| 8502 |
enable_ltdl_install=yes |
| 8503 |
fi |
| 8504 |
]) |
| 8505 |
if test x"$enable_ltdl_install" = x"yes"; then |
| 8506 |
ac_configure_args="$ac_configure_args --enable-ltdl-install" |
| 8507 |
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la |
| 8508 |
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
| 8509 |
else |
| 8510 |
ac_configure_args="$ac_configure_args --enable-ltdl-install=no" |
| 8511 |
LIBLTDL="-lltdl" |
| 8512 |
LTDLINCL= |
| 8513 |
fi |
| 8514 |
# For backwards non-gettext consistent compatibility... |
| 8515 |
INCLTDL="$LTDLINCL" |
| 8516 |
])# AC_LIBLTDL_INSTALLABLE |
| 8517 |
|
| 8518 |
|
| 8519 |
# AC_LIBTOOL_CXX |
| 8520 |
# -------------- |
| 8521 |
# enable support for C++ libraries |
| 8522 |
AC_DEFUN([AC_LIBTOOL_CXX], |
| 8523 |
[AC_REQUIRE([_LT_AC_LANG_CXX]) |
| 8524 |
])# AC_LIBTOOL_CXX |
| 8525 |
|
| 8526 |
|
| 8527 |
# _LT_AC_LANG_CXX |
| 8528 |
# --------------- |
| 8529 |
AC_DEFUN([_LT_AC_LANG_CXX], |
| 8530 |
[AC_REQUIRE([AC_PROG_CXX]) |
| 8531 |
AC_REQUIRE([_LT_AC_PROG_CXXCPP]) |
| 8532 |
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) |
| 8533 |
])# _LT_AC_LANG_CXX |
| 8534 |
|
| 8535 |
# _LT_AC_PROG_CXXCPP |
| 8536 |
# ------------------ |
| 8537 |
AC_DEFUN([_LT_AC_PROG_CXXCPP], |
| 8538 |
[ |
| 8539 |
AC_REQUIRE([AC_PROG_CXX]) |
| 8540 |
if test -n "$CXX" && ( test "X$CXX" != "Xno" && |
| 8541 |
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || |
| 8542 |
(test "X$CXX" != "Xg++"))) ; then |
| 8543 |
AC_PROG_CXXCPP |
| 8544 |
fi |
| 8545 |
])# _LT_AC_PROG_CXXCPP |
| 8546 |
|
| 8547 |
# AC_LIBTOOL_F77 |
| 8548 |
# -------------- |
| 8549 |
# enable support for Fortran 77 libraries |
| 8550 |
AC_DEFUN([AC_LIBTOOL_F77], |
| 8551 |
[AC_REQUIRE([_LT_AC_LANG_F77]) |
| 8552 |
])# AC_LIBTOOL_F77 |
| 8553 |
|
| 8554 |
|
| 8555 |
# _LT_AC_LANG_F77 |
| 8556 |
# --------------- |
| 8557 |
AC_DEFUN([_LT_AC_LANG_F77], |
| 8558 |
[AC_REQUIRE([AC_PROG_F77]) |
| 8559 |
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) |
| 8560 |
])# _LT_AC_LANG_F77 |
| 8561 |
|
| 8562 |
|
| 8563 |
# AC_LIBTOOL_GCJ |
| 8564 |
# -------------- |
| 8565 |
# enable support for GCJ libraries |
| 8566 |
AC_DEFUN([AC_LIBTOOL_GCJ], |
| 8567 |
[AC_REQUIRE([_LT_AC_LANG_GCJ]) |
| 8568 |
])# AC_LIBTOOL_GCJ |
| 8569 |
|
| 8570 |
|
| 8571 |
# _LT_AC_LANG_GCJ |
| 8572 |
# --------------- |
| 8573 |
AC_DEFUN([_LT_AC_LANG_GCJ], |
| 8574 |
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], |
| 8575 |
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], |
| 8576 |
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], |
| 8577 |
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], |
| 8578 |
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], |
| 8579 |
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) |
| 8580 |
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) |
| 8581 |
])# _LT_AC_LANG_GCJ |
| 8582 |
|
| 8583 |
|
| 8584 |
# AC_LIBTOOL_RC |
| 8585 |
# ------------- |
| 8586 |
# enable support for Windows resource files |
| 8587 |
AC_DEFUN([AC_LIBTOOL_RC], |
| 8588 |
[AC_REQUIRE([LT_AC_PROG_RC]) |
| 8589 |
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) |
| 8590 |
])# AC_LIBTOOL_RC |
| 8591 |
|
| 8592 |
|
| 8593 |
# AC_LIBTOOL_LANG_C_CONFIG |
| 8594 |
# ------------------------ |
| 8595 |
# Ensure that the configuration vars for the C compiler are |
| 8596 |
# suitably defined. Those variables are subsequently used by |
| 8597 |
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
| 8598 |
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) |
| 8599 |
AC_DEFUN([_LT_AC_LANG_C_CONFIG], |
| 8600 |
[lt_save_CC="$CC" |
| 8601 |
AC_LANG_PUSH(C) |
| 8602 |
|
| 8603 |
# Source file extension for C test sources. |
| 8604 |
ac_ext=c |
| 8605 |
|
| 8606 |
# Object file extension for compiled C test sources. |
| 8607 |
objext=o |
| 8608 |
_LT_AC_TAGVAR(objext, $1)=$objext |
| 8609 |
|
| 8610 |
# Code to be used in simple compile tests |
| 8611 |
lt_simple_compile_test_code="int some_variable = 0;\n" |
| 8612 |
|
| 8613 |
# Code to be used in simple link tests |
| 8614 |
lt_simple_link_test_code='int main(){return(0);}\n' |
| 8615 |
|
| 8616 |
_LT_AC_SYS_COMPILER |
| 8617 |
|
| 8618 |
# save warnings/boilerplate of simple test code |
| 8619 |
_LT_COMPILER_BOILERPLATE |
| 8620 |
_LT_LINKER_BOILERPLATE |
| 8621 |
|
| 8622 |
## CAVEAT EMPTOR: |
| 8623 |
## There is no encapsulation within the following macros, do not change |
| 8624 |
## the running order or otherwise move them around unless you know exactly |
| 8625 |
## what you are doing... |
| 8626 |
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) |
| 8627 |
AC_LIBTOOL_PROG_COMPILER_PIC($1) |
| 8628 |
AC_LIBTOOL_PROG_CC_C_O($1) |
| 8629 |
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
| 8630 |
AC_LIBTOOL_PROG_LD_SHLIBS($1) |
| 8631 |
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
| 8632 |
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
| 8633 |
AC_LIBTOOL_SYS_LIB_STRIP |
| 8634 |
AC_LIBTOOL_DLOPEN_SELF |
| 8635 |
|
| 8636 |
# Report which library types will actually be built |
| 8637 |
AC_MSG_CHECKING([if libtool supports shared libraries]) |
| 8638 |
AC_MSG_RESULT([$can_build_shared]) |
| 8639 |
|
| 8640 |
AC_MSG_CHECKING([whether to build shared libraries]) |
| 8641 |
test "$can_build_shared" = "no" && enable_shared=no |
| 8642 |
|
| 8643 |
# On AIX, shared libraries and static libraries use the same namespace, and |
| 8644 |
# are all built from PIC. |
| 8645 |
case $host_os in |
| 8646 |
aix3*) |
| 8647 |
test "$enable_shared" = yes && enable_static=no |
| 8648 |
if test -n "$RANLIB"; then |
| 8649 |
archive_cmds="$archive_cmds~\$RANLIB \$lib" |
| 8650 |
postinstall_cmds='$RANLIB $lib' |
| 8651 |
fi |
| 8652 |
;; |
| 8653 |
|
| 8654 |
aix4* | aix5*) |
| 8655 |
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then |
| 8656 |
test "$enable_shared" = yes && enable_static=no |
| 8657 |
fi |
| 8658 |
;; |
| 8659 |
esac |
| 8660 |
AC_MSG_RESULT([$enable_shared]) |
| 8661 |
|
| 8662 |
AC_MSG_CHECKING([whether to build static libraries]) |
| 8663 |
# Make sure either enable_shared or enable_static is yes. |
| 8664 |
test "$enable_shared" = yes || enable_static=yes |
| 8665 |
AC_MSG_RESULT([$enable_static]) |
| 8666 |
|
| 8667 |
AC_LIBTOOL_CONFIG($1) |
| 8668 |
|
| 8669 |
AC_LANG_POP |
| 8670 |
CC="$lt_save_CC" |
| 8671 |
])# AC_LIBTOOL_LANG_C_CONFIG |
| 8672 |
|
| 8673 |
|
| 8674 |
# AC_LIBTOOL_LANG_CXX_CONFIG |
| 8675 |
# -------------------------- |
| 8676 |
# Ensure that the configuration vars for the C compiler are |
| 8677 |
# suitably defined. Those variables are subsequently used by |
| 8678 |
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
| 8679 |
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) |
| 8680 |
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], |
| 8681 |
[AC_LANG_PUSH(C++) |
| 8682 |
AC_REQUIRE([AC_PROG_CXX]) |
| 8683 |
AC_REQUIRE([_LT_AC_PROG_CXXCPP]) |
| 8684 |
|
| 8685 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 8686 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)= |
| 8687 |
_LT_AC_TAGVAR(always_export_symbols, $1)=no |
| 8688 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)= |
| 8689 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
| 8690 |
_LT_AC_TAGVAR(hardcode_direct, $1)=no |
| 8691 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
| 8692 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= |
| 8693 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
| 8694 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
| 8695 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
| 8696 |
_LT_AC_TAGVAR(hardcode_automatic, $1)=no |
| 8697 |
_LT_AC_TAGVAR(module_cmds, $1)= |
| 8698 |
_LT_AC_TAGVAR(module_expsym_cmds, $1)= |
| 8699 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown |
| 8700 |
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
| 8701 |
_LT_AC_TAGVAR(no_undefined_flag, $1)= |
| 8702 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
| 8703 |
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
| 8704 |
|
| 8705 |
# Dependencies to place before and after the object being linked: |
| 8706 |
_LT_AC_TAGVAR(predep_objects, $1)= |
| 8707 |
_LT_AC_TAGVAR(postdep_objects, $1)= |
| 8708 |
_LT_AC_TAGVAR(predeps, $1)= |
| 8709 |
_LT_AC_TAGVAR(postdeps, $1)= |
| 8710 |
_LT_AC_TAGVAR(compiler_lib_search_path, $1)= |
| 8711 |
|
| 8712 |
# Source file extension for C++ test sources. |
| 8713 |
ac_ext=cpp |
| 8714 |
|
| 8715 |
# Object file extension for compiled C++ test sources. |
| 8716 |
objext=o |
| 8717 |
_LT_AC_TAGVAR(objext, $1)=$objext |
| 8718 |
|
| 8719 |
# Code to be used in simple compile tests |
| 8720 |
lt_simple_compile_test_code="int some_variable = 0;\n" |
| 8721 |
|
| 8722 |
# Code to be used in simple link tests |
| 8723 |
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' |
| 8724 |
|
| 8725 |
# ltmain only uses $CC for tagged configurations so make sure $CC is set. |
| 8726 |
_LT_AC_SYS_COMPILER |
| 8727 |
|
| 8728 |
# save warnings/boilerplate of simple test code |
| 8729 |
_LT_COMPILER_BOILERPLATE |
| 8730 |
_LT_LINKER_BOILERPLATE |
| 8731 |
|
| 8732 |
# Allow CC to be a program name with arguments. |
| 8733 |
lt_save_CC=$CC |
| 8734 |
lt_save_LD=$LD |
| 8735 |
lt_save_GCC=$GCC |
| 8736 |
GCC=$GXX |
| 8737 |
lt_save_with_gnu_ld=$with_gnu_ld |
| 8738 |
lt_save_path_LD=$lt_cv_path_LD |
| 8739 |
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then |
| 8740 |
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx |
| 8741 |
else |
| 8742 |
$as_unset lt_cv_prog_gnu_ld |
| 8743 |
fi |
| 8744 |
if test -n "${lt_cv_path_LDCXX+set}"; then |
| 8745 |
lt_cv_path_LD=$lt_cv_path_LDCXX |
| 8746 |
else |
| 8747 |
$as_unset lt_cv_path_LD |
| 8748 |
fi |
| 8749 |
test -z "${LDCXX+set}" || LD=$LDCXX |
| 8750 |
CC=${CXX-"c++"} |
| 8751 |
compiler=$CC |
| 8752 |
_LT_AC_TAGVAR(compiler, $1)=$CC |
| 8753 |
_LT_CC_BASENAME([$compiler]) |
| 8754 |
|
| 8755 |
# We don't want -fno-exception wen compiling C++ code, so set the |
| 8756 |
# no_builtin_flag separately |
| 8757 |
if test "$GXX" = yes; then |
| 8758 |
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' |
| 8759 |
else |
| 8760 |
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
| 8761 |
fi |
| 8762 |
|
| 8763 |
if test "$GXX" = yes; then |
| 8764 |
# Set up default GNU C++ configuration |
| 8765 |
|
| 8766 |
AC_PROG_LD |
| 8767 |
|
| 8768 |
# Check if GNU C++ uses GNU ld as the underlying linker, since the |
| 8769 |
# archiving commands below assume that GNU ld is being used. |
| 8770 |
if test "$with_gnu_ld" = yes; then |
| 8771 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 8772 |
_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' |
| 8773 |
|
| 8774 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' |
| 8775 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
| 8776 |
|
| 8777 |
# If archive_cmds runs LD, not CC, wlarc should be empty |
| 8778 |
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to |
| 8779 |
# investigate it a little bit more. (MM) |
| 8780 |
wlarc='${wl}' |
| 8781 |
|
| 8782 |
# ancient GNU ld didn't support --whole-archive et. al. |
| 8783 |
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ |
| 8784 |
grep 'no-whole-archive' > /dev/null; then |
| 8785 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
| 8786 |
else |
| 8787 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
| 8788 |
fi |
| 8789 |
else |
| 8790 |
with_gnu_ld=no |
| 8791 |
wlarc= |
| 8792 |
|
| 8793 |
# A generic and very simple default shared library creation |
| 8794 |
# command for GNU C++ for the case where it uses the native |
| 8795 |
# linker, instead of GNU ld. If possible, this setting should |
| 8796 |
# overridden to take advantage of the native linker features on |
| 8797 |
# the platform it is being used on. |
| 8798 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' |
| 8799 |
fi |
| 8800 |
|
| 8801 |
# Commands to make compiler produce verbose output that lists |
| 8802 |
# what "hidden" libraries, object files and flags are used when |
| 8803 |
# linking a shared library. |
| 8804 |
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' |
| 8805 |
|
| 8806 |
else |
| 8807 |
GXX=no |
| 8808 |
with_gnu_ld=no |
| 8809 |
wlarc= |
| 8810 |
fi |
| 8811 |
|
| 8812 |
# PORTME: fill in a description of your system's C++ link characteristics |
| 8813 |
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
| 8814 |
_LT_AC_TAGVAR(ld_shlibs, $1)=yes |
| 8815 |
case $host_os in |
| 8816 |
aix3*) |
| 8817 |
# FIXME: insert proper C++ library support |
| 8818 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8819 |
;; |
| 8820 |
aix4* | aix5*) |
| 8821 |
if test "$host_cpu" = ia64; then |
| 8822 |
# On IA64, the linker does run time linking by default, so we don't |
| 8823 |
# have to do anything special. |
| 8824 |
aix_use_runtimelinking=no |
| 8825 |
exp_sym_flag='-Bexport' |
| 8826 |
no_entry_flag="" |
| 8827 |
else |
| 8828 |
aix_use_runtimelinking=no |
| 8829 |
|
| 8830 |
# Test if we are trying to use run time linking or normal |
| 8831 |
# AIX style linking. If -brtl is somewhere in LDFLAGS, we |
| 8832 |
# need to do runtime linking. |
| 8833 |
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
| 8834 |
for ld_flag in $LDFLAGS; do |
| 8835 |
case $ld_flag in |
| 8836 |
*-brtl*) |
| 8837 |
aix_use_runtimelinking=yes |
| 8838 |
break |
| 8839 |
;; |
| 8840 |
esac |
| 8841 |
done |
| 8842 |
;; |
| 8843 |
esac |
| 8844 |
|
| 8845 |
exp_sym_flag='-bexport' |
| 8846 |
no_entry_flag='-bnoentry' |
| 8847 |
fi |
| 8848 |
|
| 8849 |
# When large executables or shared objects are built, AIX ld can |
| 8850 |
# have problems creating the table of contents. If linking a library |
| 8851 |
# or program results in "error TOC overflow" add -mminimal-toc to |
| 8852 |
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
| 8853 |
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
| 8854 |
|
| 8855 |
_LT_AC_TAGVAR(archive_cmds, $1)='' |
| 8856 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 8857 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' |
| 8858 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 8859 |
|
| 8860 |
if test "$GXX" = yes; then |
| 8861 |
case $host_os in aix4.[[012]]|aix4.[[012]].*) |
| 8862 |
# We only want to do this on AIX 4.2 and lower, the check |
| 8863 |
# below for broken collect2 doesn't work under 4.3+ |
| 8864 |
collect2name=`${CC} -print-prog-name=collect2` |
| 8865 |
if test -f "$collect2name" && \ |
| 8866 |
strings "$collect2name" | grep resolve_lib_name >/dev/null |
| 8867 |
then |
| 8868 |
# We have reworked collect2 |
| 8869 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 8870 |
else |
| 8871 |
# We have old collect2 |
| 8872 |
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
| 8873 |
# It fails to find uninstalled libraries when the uninstalled |
| 8874 |
# path is not listed in the libpath. Setting hardcode_minus_L |
| 8875 |
# to unsupported forces relinking |
| 8876 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 8877 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 8878 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
| 8879 |
fi |
| 8880 |
;; |
| 8881 |
esac |
| 8882 |
shared_flag='-shared' |
| 8883 |
if test "$aix_use_runtimelinking" = yes; then |
| 8884 |
shared_flag="$shared_flag "'${wl}-G' |
| 8885 |
fi |
| 8886 |
else |
| 8887 |
# not using gcc |
| 8888 |
if test "$host_cpu" = ia64; then |
| 8889 |
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release |
| 8890 |
# chokes on -Wl,-G. The following line is correct: |
| 8891 |
shared_flag='-G' |
| 8892 |
else |
| 8893 |
if test "$aix_use_runtimelinking" = yes; then |
| 8894 |
shared_flag='${wl}-G' |
| 8895 |
else |
| 8896 |
shared_flag='${wl}-bM:SRE' |
| 8897 |
fi |
| 8898 |
fi |
| 8899 |
fi |
| 8900 |
|
| 8901 |
# It seems that -bexpall does not export symbols beginning with |
| 8902 |
# underscore (_), so it is better to generate a list of symbols to export. |
| 8903 |
_LT_AC_TAGVAR(always_export_symbols, $1)=yes |
| 8904 |
if test "$aix_use_runtimelinking" = yes; then |
| 8905 |
# Warning - without using the other runtime loading flags (-brtl), |
| 8906 |
# -berok will link without error, but may produce a broken library. |
| 8907 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' |
| 8908 |
# Determine the default libpath from the value encoded in an empty executable. |
| 8909 |
_LT_AC_SYS_LIBPATH_AIX |
| 8910 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
| 8911 |
|
| 8912 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
| 8913 |
else |
| 8914 |
if test "$host_cpu" = ia64; then |
| 8915 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' |
| 8916 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" |
| 8917 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" |
| 8918 |
else |
| 8919 |
# Determine the default libpath from the value encoded in an empty executable. |
| 8920 |
_LT_AC_SYS_LIBPATH_AIX |
| 8921 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
| 8922 |
# Warning - without using the other run time loading flags, |
| 8923 |
# -berok will link without error, but may produce a broken library. |
| 8924 |
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' |
| 8925 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' |
| 8926 |
# Exported symbols can be pulled into shared objects from archives |
| 8927 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' |
| 8928 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
| 8929 |
# This is similar to how AIX traditionally builds its shared libraries. |
| 8930 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' |
| 8931 |
fi |
| 8932 |
fi |
| 8933 |
;; |
| 8934 |
|
| 8935 |
beos*) |
| 8936 |
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
| 8937 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 8938 |
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
| 8939 |
# support --undefined. This deserves some investigation. FIXME |
| 8940 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 8941 |
else |
| 8942 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8943 |
fi |
| 8944 |
;; |
| 8945 |
|
| 8946 |
chorus*) |
| 8947 |
case $cc_basename in |
| 8948 |
*) |
| 8949 |
# FIXME: insert proper C++ library support |
| 8950 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8951 |
;; |
| 8952 |
esac |
| 8953 |
;; |
| 8954 |
|
| 8955 |
cygwin* | mingw* | pw32*) |
| 8956 |
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, |
| 8957 |
# as there is no search path for DLLs. |
| 8958 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 8959 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 8960 |
_LT_AC_TAGVAR(always_export_symbols, $1)=no |
| 8961 |
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
| 8962 |
|
| 8963 |
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then |
| 8964 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' |
| 8965 |
# If the export-symbols file already is a .def file (1st line |
| 8966 |
# is EXPORTS), use it as is; otherwise, prepend... |
| 8967 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then |
| 8968 |
cp $export_symbols $output_objdir/$soname.def; |
| 8969 |
else |
| 8970 |
echo EXPORTS > $output_objdir/$soname.def; |
| 8971 |
cat $export_symbols >> $output_objdir/$soname.def; |
| 8972 |
fi~ |
| 8973 |
$CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' |
| 8974 |
else |
| 8975 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 8976 |
fi |
| 8977 |
;; |
| 8978 |
darwin* | rhapsody*) |
| 8979 |
case $host_os in |
| 8980 |
rhapsody* | darwin1.[[012]]) |
| 8981 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' |
| 8982 |
;; |
| 8983 |
*) # Darwin 1.3 on |
| 8984 |
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then |
| 8985 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' |
| 8986 |
else |
| 8987 |
case ${MACOSX_DEPLOYMENT_TARGET} in |
| 8988 |
10.[[012]]) |
| 8989 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' |
| 8990 |
;; |
| 8991 |
10.*) |
| 8992 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' |
| 8993 |
;; |
| 8994 |
esac |
| 8995 |
fi |
| 8996 |
;; |
| 8997 |
esac |
| 8998 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 8999 |
_LT_AC_TAGVAR(hardcode_direct, $1)=no |
| 9000 |
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes |
| 9001 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
| 9002 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' |
| 9003 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 9004 |
|
| 9005 |
if test "$GXX" = yes ; then |
| 9006 |
lt_int_apple_cc_single_mod=no |
| 9007 |
output_verbose_link_cmd='echo' |
| 9008 |
if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then |
| 9009 |
lt_int_apple_cc_single_mod=yes |
| 9010 |
fi |
| 9011 |
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then |
| 9012 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' |
| 9013 |
else |
| 9014 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' |
| 9015 |
fi |
| 9016 |
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' |
| 9017 |
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds |
| 9018 |
if test "X$lt_int_apple_cc_single_mod" = Xyes ; then |
| 9019 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
| 9020 |
else |
| 9021 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
| 9022 |
fi |
| 9023 |
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
| 9024 |
else |
| 9025 |
case $cc_basename in |
| 9026 |
xlc*) |
| 9027 |
output_verbose_link_cmd='echo' |
| 9028 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' |
| 9029 |
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' |
| 9030 |
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds |
| 9031 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
| 9032 |
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
| 9033 |
;; |
| 9034 |
*) |
| 9035 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9036 |
;; |
| 9037 |
esac |
| 9038 |
fi |
| 9039 |
;; |
| 9040 |
|
| 9041 |
dgux*) |
| 9042 |
case $cc_basename in |
| 9043 |
ec++*) |
| 9044 |
# FIXME: insert proper C++ library support |
| 9045 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9046 |
;; |
| 9047 |
ghcx*) |
| 9048 |
# Green Hills C++ Compiler |
| 9049 |
# FIXME: insert proper C++ library support |
| 9050 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9051 |
;; |
| 9052 |
*) |
| 9053 |
# FIXME: insert proper C++ library support |
| 9054 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9055 |
;; |
| 9056 |
esac |
| 9057 |
;; |
| 9058 |
freebsd[[12]]*) |
| 9059 |
# C++ shared libraries reported to be fairly broken before switch to ELF |
| 9060 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9061 |
;; |
| 9062 |
freebsd-elf*) |
| 9063 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 9064 |
;; |
| 9065 |
freebsd* | dragonfly*) |
| 9066 |
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF |
| 9067 |
# conventions |
| 9068 |
_LT_AC_TAGVAR(ld_shlibs, $1)=yes |
| 9069 |
;; |
| 9070 |
gnu*) |
| 9071 |
;; |
| 9072 |
hpux9*) |
| 9073 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
| 9074 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 9075 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
| 9076 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 9077 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, |
| 9078 |
# but as the default |
| 9079 |
# location of the library. |
| 9080 |
|
| 9081 |
case $cc_basename in |
| 9082 |
CC*) |
| 9083 |
# FIXME: insert proper C++ library support |
| 9084 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9085 |
;; |
| 9086 |
aCC*) |
| 9087 |
_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' |
| 9088 |
# Commands to make compiler produce verbose output that lists |
| 9089 |
# what "hidden" libraries, object files and flags are used when |
| 9090 |
# linking a shared library. |
| 9091 |
# |
| 9092 |
# There doesn't appear to be a way to prevent this compiler from |
| 9093 |
# explicitly linking system object files so we need to strip them |
| 9094 |
# from the output so that they don't get included in the library |
| 9095 |
# dependencies. |
| 9096 |
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
| 9097 |
;; |
| 9098 |
*) |
| 9099 |
if test "$GXX" = yes; then |
| 9100 |
_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' |
| 9101 |
else |
| 9102 |
# FIXME: insert proper C++ library support |
| 9103 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9104 |
fi |
| 9105 |
;; |
| 9106 |
esac |
| 9107 |
;; |
| 9108 |
hpux10*|hpux11*) |
| 9109 |
if test $with_gnu_ld = no; then |
| 9110 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
| 9111 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 9112 |
|
| 9113 |
case $host_cpu in |
| 9114 |
hppa*64*|ia64*) |
| 9115 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' |
| 9116 |
;; |
| 9117 |
*) |
| 9118 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
| 9119 |
;; |
| 9120 |
esac |
| 9121 |
fi |
| 9122 |
case $host_cpu in |
| 9123 |
hppa*64*|ia64*) |
| 9124 |
_LT_AC_TAGVAR(hardcode_direct, $1)=no |
| 9125 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 9126 |
;; |
| 9127 |
*) |
| 9128 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 9129 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, |
| 9130 |
# but as the default |
| 9131 |
# location of the library. |
| 9132 |
;; |
| 9133 |
esac |
| 9134 |
|
| 9135 |
case $cc_basename in |
| 9136 |
CC*) |
| 9137 |
# FIXME: insert proper C++ library support |
| 9138 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9139 |
;; |
| 9140 |
aCC*) |
| 9141 |
case $host_cpu in |
| 9142 |
hppa*64*) |
| 9143 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
| 9144 |
;; |
| 9145 |
ia64*) |
| 9146 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
| 9147 |
;; |
| 9148 |
*) |
| 9149 |
_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' |
| 9150 |
;; |
| 9151 |
esac |
| 9152 |
# Commands to make compiler produce verbose output that lists |
| 9153 |
# what "hidden" libraries, object files and flags are used when |
| 9154 |
# linking a shared library. |
| 9155 |
# |
| 9156 |
# There doesn't appear to be a way to prevent this compiler from |
| 9157 |
# explicitly linking system object files so we need to strip them |
| 9158 |
# from the output so that they don't get included in the library |
| 9159 |
# dependencies. |
| 9160 |
output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
| 9161 |
;; |
| 9162 |
*) |
| 9163 |
if test "$GXX" = yes; then |
| 9164 |
if test $with_gnu_ld = no; then |
| 9165 |
case $host_cpu in |
| 9166 |
hppa*64*) |
| 9167 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
| 9168 |
;; |
| 9169 |
ia64*) |
| 9170 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
| 9171 |
;; |
| 9172 |
*) |
| 9173 |
_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' |
| 9174 |
;; |
| 9175 |
esac |
| 9176 |
fi |
| 9177 |
else |
| 9178 |
# FIXME: insert proper C++ library support |
| 9179 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9180 |
fi |
| 9181 |
;; |
| 9182 |
esac |
| 9183 |
;; |
| 9184 |
interix3*) |
| 9185 |
_LT_AC_TAGVAR(hardcode_direct, $1)=no |
| 9186 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 9187 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
| 9188 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
| 9189 |
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. |
| 9190 |
# Instead, shared libraries are loaded at an image base (0x10000000 by |
| 9191 |
# default) and relocated if they conflict, which is a slow very memory |
| 9192 |
# consuming and fragmenting process. To avoid this, we pick a random, |
| 9193 |
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link |
| 9194 |
# time. Moving up from 0x10000000 also allows more sbrk(2) space. |
| 9195 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' |
| 9196 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' |
| 9197 |
;; |
| 9198 |
irix5* | irix6*) |
| 9199 |
case $cc_basename in |
| 9200 |
CC*) |
| 9201 |
# SGI C++ |
| 9202 |
_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 ${output_objdir}/so_locations -o $lib' |
| 9203 |
|
| 9204 |
# Archives containing C++ object files must be created using |
| 9205 |
# "CC -ar", where "CC" is the IRIX C++ compiler. This is |
| 9206 |
# necessary to make sure instantiated templates are included |
| 9207 |
# in the archive. |
| 9208 |
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' |
| 9209 |
;; |
| 9210 |
*) |
| 9211 |
if test "$GXX" = yes; then |
| 9212 |
if test "$with_gnu_ld" = no; then |
| 9213 |
_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}${output_objdir}/so_locations -o $lib' |
| 9214 |
else |
| 9215 |
_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` -o $lib' |
| 9216 |
fi |
| 9217 |
fi |
| 9218 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 9219 |
;; |
| 9220 |
esac |
| 9221 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 9222 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 9223 |
;; |
| 9224 |
linux* | k*bsd*-gnu) |
| 9225 |
case $cc_basename in |
| 9226 |
KCC*) |
| 9227 |
# Kuck and Associates, Inc. (KAI) C++ Compiler |
| 9228 |
|
| 9229 |
# KCC will only create a shared library if the output file |
| 9230 |
# ends with ".so" (or ".sl" for HP-UX), so rename the library |
| 9231 |
# to its proper name (with version) after linking. |
| 9232 |
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' |
| 9233 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' |
| 9234 |
# Commands to make compiler produce verbose output that lists |
| 9235 |
# what "hidden" libraries, object files and flags are used when |
| 9236 |
# linking a shared library. |
| 9237 |
# |
| 9238 |
# There doesn't appear to be a way to prevent this compiler from |
| 9239 |
# explicitly linking system object files so we need to strip them |
| 9240 |
# from the output so that they don't get included in the library |
| 9241 |
# dependencies. |
| 9242 |
output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
| 9243 |
|
| 9244 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' |
| 9245 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
| 9246 |
|
| 9247 |
# Archives containing C++ object files must be created using |
| 9248 |
# "CC -Bstatic", where "CC" is the KAI C++ compiler. |
| 9249 |
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' |
| 9250 |
;; |
| 9251 |
icpc*) |
| 9252 |
# Intel C++ |
| 9253 |
with_gnu_ld=yes |
| 9254 |
# version 8.0 and above of icpc choke on multiply defined symbols |
| 9255 |
# if we add $predep_objects and $postdep_objects, however 7.1 and |
| 9256 |
# earlier do not add the objects themselves. |
| 9257 |
case `$CC -V 2>&1` in |
| 9258 |
*"Version 7."*) |
| 9259 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 9260 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
| 9261 |
;; |
| 9262 |
*) # Version 8.0 or newer |
| 9263 |
tmp_idyn= |
| 9264 |
case $host_cpu in |
| 9265 |
ia64*) tmp_idyn=' -i_dynamic';; |
| 9266 |
esac |
| 9267 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 9268 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
| 9269 |
;; |
| 9270 |
esac |
| 9271 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 9272 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
| 9273 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
| 9274 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' |
| 9275 |
;; |
| 9276 |
pgCC*) |
| 9277 |
# Portland Group C++ compiler |
| 9278 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' |
| 9279 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' |
| 9280 |
|
| 9281 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' |
| 9282 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
| 9283 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' |
| 9284 |
;; |
| 9285 |
cxx*) |
| 9286 |
# Compaq C++ |
| 9287 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 9288 |
_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' |
| 9289 |
|
| 9290 |
runpath_var=LD_RUN_PATH |
| 9291 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
| 9292 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 9293 |
|
| 9294 |
# Commands to make compiler produce verbose output that lists |
| 9295 |
# what "hidden" libraries, object files and flags are used when |
| 9296 |
# linking a shared library. |
| 9297 |
# |
| 9298 |
# There doesn't appear to be a way to prevent this compiler from |
| 9299 |
# explicitly linking system object files so we need to strip them |
| 9300 |
# from the output so that they don't get included in the library |
| 9301 |
# dependencies. |
| 9302 |
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' |
| 9303 |
;; |
| 9304 |
esac |
| 9305 |
;; |
| 9306 |
lynxos*) |
| 9307 |
# FIXME: insert proper C++ library support |
| 9308 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9309 |
;; |
| 9310 |
m88k*) |
| 9311 |
# FIXME: insert proper C++ library support |
| 9312 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9313 |
;; |
| 9314 |
mvs*) |
| 9315 |
case $cc_basename in |
| 9316 |
cxx*) |
| 9317 |
# FIXME: insert proper C++ library support |
| 9318 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9319 |
;; |
| 9320 |
*) |
| 9321 |
# FIXME: insert proper C++ library support |
| 9322 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9323 |
;; |
| 9324 |
esac |
| 9325 |
;; |
| 9326 |
netbsd* | netbsdelf*-gnu) |
| 9327 |
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 9328 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' |
| 9329 |
wlarc= |
| 9330 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 9331 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 9332 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 9333 |
fi |
| 9334 |
# Workaround some broken pre-1.5 toolchains |
| 9335 |
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' |
| 9336 |
;; |
| 9337 |
openbsd2*) |
| 9338 |
# C++ shared libraries are fairly broken |
| 9339 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9340 |
;; |
| 9341 |
openbsd*) |
| 9342 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 9343 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 9344 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' |
| 9345 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
| 9346 |
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| 9347 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' |
| 9348 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
| 9349 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
| 9350 |
fi |
| 9351 |
output_verbose_link_cmd='echo' |
| 9352 |
;; |
| 9353 |
osf3*) |
| 9354 |
case $cc_basename in |
| 9355 |
KCC*) |
| 9356 |
# Kuck and Associates, Inc. (KAI) C++ Compiler |
| 9357 |
|
| 9358 |
# KCC will only create a shared library if the output file |
| 9359 |
# ends with ".so" (or ".sl" for HP-UX), so rename the library |
| 9360 |
# to its proper name (with version) after linking. |
| 9361 |
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' |
| 9362 |
|
| 9363 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
| 9364 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 9365 |
|
| 9366 |
# Archives containing C++ object files must be created using |
| 9367 |
# "CC -Bstatic", where "CC" is the KAI C++ compiler. |
| 9368 |
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' |
| 9369 |
|
| 9370 |
;; |
| 9371 |
RCC*) |
| 9372 |
# Rational C++ 2.4.1 |
| 9373 |
# FIXME: insert proper C++ library support |
| 9374 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9375 |
;; |
| 9376 |
cxx*) |
| 9377 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
| 9378 |
_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 ${output_objdir}/so_locations -o $lib' |
| 9379 |
|
| 9380 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 9381 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 9382 |
|
| 9383 |
# Commands to make compiler produce verbose output that lists |
| 9384 |
# what "hidden" libraries, object files and flags are used when |
| 9385 |
# linking a shared library. |
| 9386 |
# |
| 9387 |
# There doesn't appear to be a way to prevent this compiler from |
| 9388 |
# explicitly linking system object files so we need to strip them |
| 9389 |
# from the output so that they don't get included in the library |
| 9390 |
# dependencies. |
| 9391 |
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' |
| 9392 |
;; |
| 9393 |
*) |
| 9394 |
if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
| 9395 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
| 9396 |
_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}${output_objdir}/so_locations -o $lib' |
| 9397 |
|
| 9398 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 9399 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 9400 |
|
| 9401 |
# Commands to make compiler produce verbose output that lists |
| 9402 |
# what "hidden" libraries, object files and flags are used when |
| 9403 |
# linking a shared library. |
| 9404 |
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' |
| 9405 |
|
| 9406 |
else |
| 9407 |
# FIXME: insert proper C++ library support |
| 9408 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9409 |
fi |
| 9410 |
;; |
| 9411 |
esac |
| 9412 |
;; |
| 9413 |
osf4* | osf5*) |
| 9414 |
case $cc_basename in |
| 9415 |
KCC*) |
| 9416 |
# Kuck and Associates, Inc. (KAI) C++ Compiler |
| 9417 |
|
| 9418 |
# KCC will only create a shared library if the output file |
| 9419 |
# ends with ".so" (or ".sl" for HP-UX), so rename the library |
| 9420 |
# to its proper name (with version) after linking. |
| 9421 |
_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' |
| 9422 |
|
| 9423 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
| 9424 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 9425 |
|
| 9426 |
# Archives containing C++ object files must be created using |
| 9427 |
# the KAI C++ compiler. |
| 9428 |
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' |
| 9429 |
;; |
| 9430 |
RCC*) |
| 9431 |
# Rational C++ 2.4.1 |
| 9432 |
# FIXME: insert proper C++ library support |
| 9433 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9434 |
;; |
| 9435 |
cxx*) |
| 9436 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
| 9437 |
_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 ${output_objdir}/so_locations -o $lib' |
| 9438 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ |
| 9439 |
echo "-hidden">> $lib.exp~ |
| 9440 |
$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ |
| 9441 |
$rm $lib.exp' |
| 9442 |
|
| 9443 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
| 9444 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 9445 |
|
| 9446 |
# Commands to make compiler produce verbose output that lists |
| 9447 |
# what "hidden" libraries, object files and flags are used when |
| 9448 |
# linking a shared library. |
| 9449 |
# |
| 9450 |
# There doesn't appear to be a way to prevent this compiler from |
| 9451 |
# explicitly linking system object files so we need to strip them |
| 9452 |
# from the output so that they don't get included in the library |
| 9453 |
# dependencies. |
| 9454 |
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' |
| 9455 |
;; |
| 9456 |
*) |
| 9457 |
if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
| 9458 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
| 9459 |
_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}${output_objdir}/so_locations -o $lib' |
| 9460 |
|
| 9461 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 9462 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 9463 |
|
| 9464 |
# Commands to make compiler produce verbose output that lists |
| 9465 |
# what "hidden" libraries, object files and flags are used when |
| 9466 |
# linking a shared library. |
| 9467 |
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' |
| 9468 |
|
| 9469 |
else |
| 9470 |
# FIXME: insert proper C++ library support |
| 9471 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9472 |
fi |
| 9473 |
;; |
| 9474 |
esac |
| 9475 |
;; |
| 9476 |
psos*) |
| 9477 |
# FIXME: insert proper C++ library support |
| 9478 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9479 |
;; |
| 9480 |
sunos4*) |
| 9481 |
case $cc_basename in |
| 9482 |
CC*) |
| 9483 |
# Sun C++ 4.x |
| 9484 |
# FIXME: insert proper C++ library support |
| 9485 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9486 |
;; |
| 9487 |
lcc*) |
| 9488 |
# Lucid |
| 9489 |
# FIXME: insert proper C++ library support |
| 9490 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9491 |
;; |
| 9492 |
*) |
| 9493 |
# FIXME: insert proper C++ library support |
| 9494 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9495 |
;; |
| 9496 |
esac |
| 9497 |
;; |
| 9498 |
solaris*) |
| 9499 |
case $cc_basename in |
| 9500 |
CC*) |
| 9501 |
# Sun C++ 4.2, 5.x and Centerline C++ |
| 9502 |
_LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes |
| 9503 |
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' |
| 9504 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
| 9505 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 9506 |
$CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' |
| 9507 |
|
| 9508 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 9509 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 9510 |
case $host_os in |
| 9511 |
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
| 9512 |
*) |
| 9513 |
# The C++ compiler is used as linker so we must use $wl |
| 9514 |
# flag to pass the commands to the underlying system |
| 9515 |
# linker. We must also pass each convience library through |
| 9516 |
# to the system linker between allextract/defaultextract. |
| 9517 |
# The C++ compiler will combine linker options so we |
| 9518 |
# cannot just pass the convience library names through |
| 9519 |
# without $wl. |
| 9520 |
# Supported since Solaris 2.6 (maybe 2.5.1?) |
| 9521 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' |
| 9522 |
;; |
| 9523 |
esac |
| 9524 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 9525 |
|
| 9526 |
output_verbose_link_cmd='echo' |
| 9527 |
|
| 9528 |
# Archives containing C++ object files must be created using |
| 9529 |
# "CC -xar", where "CC" is the Sun C++ compiler. This is |
| 9530 |
# necessary to make sure instantiated templates are included |
| 9531 |
# in the archive. |
| 9532 |
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' |
| 9533 |
;; |
| 9534 |
gcx*) |
| 9535 |
# Green Hills C++ Compiler |
| 9536 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
| 9537 |
|
| 9538 |
# The C++ compiler must be used to create the archive. |
| 9539 |
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' |
| 9540 |
;; |
| 9541 |
*) |
| 9542 |
# GNU C++ compiler with Solaris linker |
| 9543 |
if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
| 9544 |
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' |
| 9545 |
if $CC --version | grep -v '^2\.7' > /dev/null; then |
| 9546 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
| 9547 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 9548 |
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' |
| 9549 |
|
| 9550 |
# Commands to make compiler produce verbose output that lists |
| 9551 |
# what "hidden" libraries, object files and flags are used when |
| 9552 |
# linking a shared library. |
| 9553 |
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" |
| 9554 |
else |
| 9555 |
# g++ 2.7 appears to require `-G' NOT `-shared' on this |
| 9556 |
# platform. |
| 9557 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
| 9558 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 9559 |
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' |
| 9560 |
|
| 9561 |
# Commands to make compiler produce verbose output that lists |
| 9562 |
# what "hidden" libraries, object files and flags are used when |
| 9563 |
# linking a shared library. |
| 9564 |
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" |
| 9565 |
fi |
| 9566 |
|
| 9567 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' |
| 9568 |
fi |
| 9569 |
;; |
| 9570 |
esac |
| 9571 |
;; |
| 9572 |
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) |
| 9573 |
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' |
| 9574 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 9575 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 9576 |
runpath_var='LD_RUN_PATH' |
| 9577 |
|
| 9578 |
case $cc_basename in |
| 9579 |
CC*) |
| 9580 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 9581 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 9582 |
;; |
| 9583 |
*) |
| 9584 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 9585 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 9586 |
;; |
| 9587 |
esac |
| 9588 |
;; |
| 9589 |
sysv5* | sco3.2v5* | sco5v6*) |
| 9590 |
# Note: We can NOT use -z defs as we might desire, because we do not |
| 9591 |
# link with -lc, and that would cause any symbols used from libc to |
| 9592 |
# always be unresolved, which means just about no library would |
| 9593 |
# ever link correctly. If we're not using GNU ld we use -z text |
| 9594 |
# though, which does catch some bad symbols but isn't as heavy-handed |
| 9595 |
# as -z defs. |
| 9596 |
# For security reasons, it is highly recommended that you always |
| 9597 |
# use absolute paths for naming shared libraries, and exclude the |
| 9598 |
# DT_RUNPATH tag from executables and libraries. But doing so |
| 9599 |
# requires that you compile everything twice, which is a pain. |
| 9600 |
# So that behaviour is only enabled if SCOABSPATH is set to a |
| 9601 |
# non-empty value in the environment. Most likely only useful for |
| 9602 |
# creating official distributions of packages. |
| 9603 |
# This is a hack until libtool officially supports absolute path |
| 9604 |
# names for shared libraries. |
| 9605 |
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' |
| 9606 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' |
| 9607 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 9608 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 9609 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' |
| 9610 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' |
| 9611 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 9612 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' |
| 9613 |
runpath_var='LD_RUN_PATH' |
| 9614 |
|
| 9615 |
case $cc_basename in |
| 9616 |
CC*) |
| 9617 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 9618 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 9619 |
;; |
| 9620 |
*) |
| 9621 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 9622 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 9623 |
;; |
| 9624 |
esac |
| 9625 |
;; |
| 9626 |
tandem*) |
| 9627 |
case $cc_basename in |
| 9628 |
NCC*) |
| 9629 |
# NonStop-UX NCC 3.20 |
| 9630 |
# FIXME: insert proper C++ library support |
| 9631 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9632 |
;; |
| 9633 |
*) |
| 9634 |
# FIXME: insert proper C++ library support |
| 9635 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9636 |
;; |
| 9637 |
esac |
| 9638 |
;; |
| 9639 |
vxworks*) |
| 9640 |
# FIXME: insert proper C++ library support |
| 9641 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9642 |
;; |
| 9643 |
*) |
| 9644 |
# FIXME: insert proper C++ library support |
| 9645 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 9646 |
;; |
| 9647 |
esac |
| 9648 |
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) |
| 9649 |
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no |
| 9650 |
|
| 9651 |
_LT_AC_TAGVAR(GCC, $1)="$GXX" |
| 9652 |
_LT_AC_TAGVAR(LD, $1)="$LD" |
| 9653 |
|
| 9654 |
## CAVEAT EMPTOR: |
| 9655 |
## There is no encapsulation within the following macros, do not change |
| 9656 |
## the running order or otherwise move them around unless you know exactly |
| 9657 |
## what you are doing... |
| 9658 |
AC_LIBTOOL_POSTDEP_PREDEP($1) |
| 9659 |
AC_LIBTOOL_PROG_COMPILER_PIC($1) |
| 9660 |
AC_LIBTOOL_PROG_CC_C_O($1) |
| 9661 |
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
| 9662 |
AC_LIBTOOL_PROG_LD_SHLIBS($1) |
| 9663 |
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
| 9664 |
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
| 9665 |
|
| 9666 |
AC_LIBTOOL_CONFIG($1) |
| 9667 |
|
| 9668 |
AC_LANG_POP |
| 9669 |
CC=$lt_save_CC |
| 9670 |
LDCXX=$LD |
| 9671 |
LD=$lt_save_LD |
| 9672 |
GCC=$lt_save_GCC |
| 9673 |
with_gnu_ldcxx=$with_gnu_ld |
| 9674 |
with_gnu_ld=$lt_save_with_gnu_ld |
| 9675 |
lt_cv_path_LDCXX=$lt_cv_path_LD |
| 9676 |
lt_cv_path_LD=$lt_save_path_LD |
| 9677 |
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld |
| 9678 |
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld |
| 9679 |
])# AC_LIBTOOL_LANG_CXX_CONFIG |
| 9680 |
|
| 9681 |
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) |
| 9682 |
# ------------------------------------ |
| 9683 |
# Figure out "hidden" library dependencies from verbose |
| 9684 |
# compiler output when linking a shared library. |
| 9685 |
# Parse the compiler output and extract the necessary |
| 9686 |
# objects, libraries and library flags. |
| 9687 |
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ |
| 9688 |
dnl we can't use the lt_simple_compile_test_code here, |
| 9689 |
dnl because it contains code intended for an executable, |
| 9690 |
dnl not a library. It's possible we should let each |
| 9691 |
dnl tag define a new lt_????_link_test_code variable, |
| 9692 |
dnl but it's only used here... |
| 9693 |
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF |
| 9694 |
int a; |
| 9695 |
void foo (void) { a = 0; } |
| 9696 |
EOF |
| 9697 |
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF |
| 9698 |
class Foo |
| 9699 |
{ |
| 9700 |
public: |
| 9701 |
Foo (void) { a = 0; } |
| 9702 |
private: |
| 9703 |
int a; |
| 9704 |
}; |
| 9705 |
EOF |
| 9706 |
],[$1],[F77],[cat > conftest.$ac_ext <<EOF |
| 9707 |
subroutine foo |
| 9708 |
implicit none |
| 9709 |
integer*4 a |
| 9710 |
a=0 |
| 9711 |
return |
| 9712 |
end |
| 9713 |
EOF |
| 9714 |
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF |
| 9715 |
public class foo { |
| 9716 |
private int a; |
| 9717 |
public void bar (void) { |
| 9718 |
a = 0; |
| 9719 |
} |
| 9720 |
}; |
| 9721 |
EOF |
| 9722 |
]) |
| 9723 |
dnl Parse the compiler output and extract the necessary |
| 9724 |
dnl objects, libraries and library flags. |
| 9725 |
if AC_TRY_EVAL(ac_compile); then |
| 9726 |
# Parse the compiler output and extract the necessary |
| 9727 |
# objects, libraries and library flags. |
| 9728 |
|
| 9729 |
# Sentinel used to keep track of whether or not we are before |
| 9730 |
# the conftest object file. |
| 9731 |
pre_test_object_deps_done=no |
| 9732 |
|
| 9733 |
# The `*' in the case matches for architectures that use `case' in |
| 9734 |
# $output_verbose_cmd can trigger glob expansion during the loop |
| 9735 |
# eval without this substitution. |
| 9736 |
output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` |
| 9737 |
|
| 9738 |
for p in `eval $output_verbose_link_cmd`; do |
| 9739 |
case $p in |
| 9740 |
|
| 9741 |
-L* | -R* | -l*) |
| 9742 |
# Some compilers place space between "-{L,R}" and the path. |
| 9743 |
# Remove the space. |
| 9744 |
if test $p = "-L" \ |
| 9745 |
|| test $p = "-R"; then |
| 9746 |
prev=$p |
| 9747 |
continue |
| 9748 |
else |
| 9749 |
prev= |
| 9750 |
fi |
| 9751 |
|
| 9752 |
if test "$pre_test_object_deps_done" = no; then |
| 9753 |
case $p in |
| 9754 |
-L* | -R*) |
| 9755 |
# Internal compiler library paths should come after those |
| 9756 |
# provided the user. The postdeps already come after the |
| 9757 |
# user supplied libs so there is no need to process them. |
| 9758 |
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then |
| 9759 |
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" |
| 9760 |
else |
| 9761 |
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" |
| 9762 |
fi |
| 9763 |
;; |
| 9764 |
# The "-l" case would never come before the object being |
| 9765 |
# linked, so don't bother handling this case. |
| 9766 |
esac |
| 9767 |
else |
| 9768 |
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then |
| 9769 |
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" |
| 9770 |
else |
| 9771 |
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" |
| 9772 |
fi |
| 9773 |
fi |
| 9774 |
;; |
| 9775 |
|
| 9776 |
*.$objext) |
| 9777 |
# This assumes that the test object file only shows up |
| 9778 |
# once in the compiler output. |
| 9779 |
if test "$p" = "conftest.$objext"; then |
| 9780 |
pre_test_object_deps_done=yes |
| 9781 |
continue |
| 9782 |
fi |
| 9783 |
|
| 9784 |
if test "$pre_test_object_deps_done" = no; then |
| 9785 |
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then |
| 9786 |
_LT_AC_TAGVAR(predep_objects, $1)="$p" |
| 9787 |
else |
| 9788 |
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" |
| 9789 |
fi |
| 9790 |
else |
| 9791 |
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then |
| 9792 |
_LT_AC_TAGVAR(postdep_objects, $1)="$p" |
| 9793 |
else |
| 9794 |
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" |
| 9795 |
fi |
| 9796 |
fi |
| 9797 |
;; |
| 9798 |
|
| 9799 |
*) ;; # Ignore the rest. |
| 9800 |
|
| 9801 |
esac |
| 9802 |
done |
| 9803 |
|
| 9804 |
# Clean up. |
| 9805 |
rm -f a.out a.exe |
| 9806 |
else |
| 9807 |
echo "libtool.m4: error: problem compiling $1 test program" |
| 9808 |
fi |
| 9809 |
|
| 9810 |
$rm -f confest.$objext |
| 9811 |
|
| 9812 |
# PORTME: override above test on systems where it is broken |
| 9813 |
ifelse([$1],[CXX], |
| 9814 |
[case $host_os in |
| 9815 |
interix3*) |
| 9816 |
# Interix 3.5 installs completely hosed .la files for C++, so rather than |
| 9817 |
# hack all around it, let's just trust "g++" to DTRT. |
| 9818 |
_LT_AC_TAGVAR(predep_objects,$1)= |
| 9819 |
_LT_AC_TAGVAR(postdep_objects,$1)= |
| 9820 |
_LT_AC_TAGVAR(postdeps,$1)= |
| 9821 |
;; |
| 9822 |
|
| 9823 |
solaris*) |
| 9824 |
case $cc_basename in |
| 9825 |
CC*) |
| 9826 |
# Adding this requires a known-good setup of shared libraries for |
| 9827 |
# Sun compiler versions before 5.6, else PIC objects from an old |
| 9828 |
# archive will be linked into the output, leading to subtle bugs. |
| 9829 |
_LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' |
| 9830 |
;; |
| 9831 |
esac |
| 9832 |
;; |
| 9833 |
esac |
| 9834 |
]) |
| 9835 |
|
| 9836 |
case " $_LT_AC_TAGVAR(postdeps, $1) " in |
| 9837 |
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; |
| 9838 |
esac |
| 9839 |
])# AC_LIBTOOL_POSTDEP_PREDEP |
| 9840 |
|
| 9841 |
# AC_LIBTOOL_LANG_F77_CONFIG |
| 9842 |
# -------------------------- |
| 9843 |
# Ensure that the configuration vars for the C compiler are |
| 9844 |
# suitably defined. Those variables are subsequently used by |
| 9845 |
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
| 9846 |
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) |
| 9847 |
AC_DEFUN([_LT_AC_LANG_F77_CONFIG], |
| 9848 |
[AC_REQUIRE([AC_PROG_F77]) |
| 9849 |
AC_LANG_PUSH(Fortran 77) |
| 9850 |
|
| 9851 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 9852 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)= |
| 9853 |
_LT_AC_TAGVAR(always_export_symbols, $1)=no |
| 9854 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)= |
| 9855 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
| 9856 |
_LT_AC_TAGVAR(hardcode_direct, $1)=no |
| 9857 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
| 9858 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= |
| 9859 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
| 9860 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
| 9861 |
_LT_AC_TAGVAR(hardcode_automatic, $1)=no |
| 9862 |
_LT_AC_TAGVAR(module_cmds, $1)= |
| 9863 |
_LT_AC_TAGVAR(module_expsym_cmds, $1)= |
| 9864 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown |
| 9865 |
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
| 9866 |
_LT_AC_TAGVAR(no_undefined_flag, $1)= |
| 9867 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
| 9868 |
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
| 9869 |
|
| 9870 |
# Source file extension for f77 test sources. |
| 9871 |
ac_ext=f |
| 9872 |
|
| 9873 |
# Object file extension for compiled f77 test sources. |
| 9874 |
objext=o |
| 9875 |
_LT_AC_TAGVAR(objext, $1)=$objext |
| 9876 |
|
| 9877 |
# Code to be used in simple compile tests |
| 9878 |
lt_simple_compile_test_code=" subroutine t\n return\n end\n" |
| 9879 |
|
| 9880 |
# Code to be used in simple link tests |
| 9881 |
lt_simple_link_test_code=" program t\n end\n" |
| 9882 |
|
| 9883 |
# ltmain only uses $CC for tagged configurations so make sure $CC is set. |
| 9884 |
_LT_AC_SYS_COMPILER |
| 9885 |
|
| 9886 |
# save warnings/boilerplate of simple test code |
| 9887 |
_LT_COMPILER_BOILERPLATE |
| 9888 |
_LT_LINKER_BOILERPLATE |
| 9889 |
|
| 9890 |
# Allow CC to be a program name with arguments. |
| 9891 |
lt_save_CC="$CC" |
| 9892 |
CC=${F77-"f77"} |
| 9893 |
compiler=$CC |
| 9894 |
_LT_AC_TAGVAR(compiler, $1)=$CC |
| 9895 |
_LT_CC_BASENAME([$compiler]) |
| 9896 |
|
| 9897 |
AC_MSG_CHECKING([if libtool supports shared libraries]) |
| 9898 |
AC_MSG_RESULT([$can_build_shared]) |
| 9899 |
|
| 9900 |
AC_MSG_CHECKING([whether to build shared libraries]) |
| 9901 |
test "$can_build_shared" = "no" && enable_shared=no |
| 9902 |
|
| 9903 |
# On AIX, shared libraries and static libraries use the same namespace, and |
| 9904 |
# are all built from PIC. |
| 9905 |
case $host_os in |
| 9906 |
aix3*) |
| 9907 |
test "$enable_shared" = yes && enable_static=no |
| 9908 |
if test -n "$RANLIB"; then |
| 9909 |
archive_cmds="$archive_cmds~\$RANLIB \$lib" |
| 9910 |
postinstall_cmds='$RANLIB $lib' |
| 9911 |
fi |
| 9912 |
;; |
| 9913 |
aix4* | aix5*) |
| 9914 |
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then |
| 9915 |
test "$enable_shared" = yes && enable_static=no |
| 9916 |
fi |
| 9917 |
;; |
| 9918 |
esac |
| 9919 |
AC_MSG_RESULT([$enable_shared]) |
| 9920 |
|
| 9921 |
AC_MSG_CHECKING([whether to build static libraries]) |
| 9922 |
# Make sure either enable_shared or enable_static is yes. |
| 9923 |
test "$enable_shared" = yes || enable_static=yes |
| 9924 |
AC_MSG_RESULT([$enable_static]) |
| 9925 |
|
| 9926 |
_LT_AC_TAGVAR(GCC, $1)="$G77" |
| 9927 |
_LT_AC_TAGVAR(LD, $1)="$LD" |
| 9928 |
|
| 9929 |
AC_LIBTOOL_PROG_COMPILER_PIC($1) |
| 9930 |
AC_LIBTOOL_PROG_CC_C_O($1) |
| 9931 |
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
| 9932 |
AC_LIBTOOL_PROG_LD_SHLIBS($1) |
| 9933 |
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
| 9934 |
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
| 9935 |
|
| 9936 |
AC_LIBTOOL_CONFIG($1) |
| 9937 |
|
| 9938 |
AC_LANG_POP |
| 9939 |
CC="$lt_save_CC" |
| 9940 |
])# AC_LIBTOOL_LANG_F77_CONFIG |
| 9941 |
|
| 9942 |
|
| 9943 |
# AC_LIBTOOL_LANG_GCJ_CONFIG |
| 9944 |
# -------------------------- |
| 9945 |
# Ensure that the configuration vars for the C compiler are |
| 9946 |
# suitably defined. Those variables are subsequently used by |
| 9947 |
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
| 9948 |
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) |
| 9949 |
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], |
| 9950 |
[AC_LANG_SAVE |
| 9951 |
|
| 9952 |
# Source file extension for Java test sources. |
| 9953 |
ac_ext=java |
| 9954 |
|
| 9955 |
# Object file extension for compiled Java test sources. |
| 9956 |
objext=o |
| 9957 |
_LT_AC_TAGVAR(objext, $1)=$objext |
| 9958 |
|
| 9959 |
# Code to be used in simple compile tests |
| 9960 |
lt_simple_compile_test_code="class foo {}\n" |
| 9961 |
|
| 9962 |
# Code to be used in simple link tests |
| 9963 |
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' |
| 9964 |
|
| 9965 |
# ltmain only uses $CC for tagged configurations so make sure $CC is set. |
| 9966 |
_LT_AC_SYS_COMPILER |
| 9967 |
|
| 9968 |
# save warnings/boilerplate of simple test code |
| 9969 |
_LT_COMPILER_BOILERPLATE |
| 9970 |
_LT_LINKER_BOILERPLATE |
| 9971 |
|
| 9972 |
# Allow CC to be a program name with arguments. |
| 9973 |
lt_save_CC="$CC" |
| 9974 |
CC=${GCJ-"gcj"} |
| 9975 |
compiler=$CC |
| 9976 |
_LT_AC_TAGVAR(compiler, $1)=$CC |
| 9977 |
_LT_CC_BASENAME([$compiler]) |
| 9978 |
|
| 9979 |
# GCJ did not exist at the time GCC didn't implicitly link libc in. |
| 9980 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 9981 |
|
| 9982 |
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
| 9983 |
|
| 9984 |
## CAVEAT EMPTOR: |
| 9985 |
## There is no encapsulation within the following macros, do not change |
| 9986 |
## the running order or otherwise move them around unless you know exactly |
| 9987 |
## what you are doing... |
| 9988 |
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) |
| 9989 |
AC_LIBTOOL_PROG_COMPILER_PIC($1) |
| 9990 |
AC_LIBTOOL_PROG_CC_C_O($1) |
| 9991 |
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
| 9992 |
AC_LIBTOOL_PROG_LD_SHLIBS($1) |
| 9993 |
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
| 9994 |
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
| 9995 |
|
| 9996 |
AC_LIBTOOL_CONFIG($1) |
| 9997 |
|
| 9998 |
AC_LANG_RESTORE |
| 9999 |
CC="$lt_save_CC" |
| 10000 |
])# AC_LIBTOOL_LANG_GCJ_CONFIG |
| 10001 |
|
| 10002 |
|
| 10003 |
# AC_LIBTOOL_LANG_RC_CONFIG |
| 10004 |
# ------------------------- |
| 10005 |
# Ensure that the configuration vars for the Windows resource compiler are |
| 10006 |
# suitably defined. Those variables are subsequently used by |
| 10007 |
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
| 10008 |
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) |
| 10009 |
AC_DEFUN([_LT_AC_LANG_RC_CONFIG], |
| 10010 |
[AC_LANG_SAVE |
| 10011 |
|
| 10012 |
# Source file extension for RC test sources. |
| 10013 |
ac_ext=rc |
| 10014 |
|
| 10015 |
# Object file extension for compiled RC test sources. |
| 10016 |
objext=o |
| 10017 |
_LT_AC_TAGVAR(objext, $1)=$objext |
| 10018 |
|
| 10019 |
# Code to be used in simple compile tests |
| 10020 |
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' |
| 10021 |
|
| 10022 |
# Code to be used in simple link tests |
| 10023 |
lt_simple_link_test_code="$lt_simple_compile_test_code" |
| 10024 |
|
| 10025 |
# ltmain only uses $CC for tagged configurations so make sure $CC is set. |
| 10026 |
_LT_AC_SYS_COMPILER |
| 10027 |
|
| 10028 |
# save warnings/boilerplate of simple test code |
| 10029 |
_LT_COMPILER_BOILERPLATE |
| 10030 |
_LT_LINKER_BOILERPLATE |
| 10031 |
|
| 10032 |
# Allow CC to be a program name with arguments. |
| 10033 |
lt_save_CC="$CC" |
| 10034 |
CC=${RC-"windres"} |
| 10035 |
compiler=$CC |
| 10036 |
_LT_AC_TAGVAR(compiler, $1)=$CC |
| 10037 |
_LT_CC_BASENAME([$compiler]) |
| 10038 |
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes |
| 10039 |
|
| 10040 |
AC_LIBTOOL_CONFIG($1) |
| 10041 |
|
| 10042 |
AC_LANG_RESTORE |
| 10043 |
CC="$lt_save_CC" |
| 10044 |
])# AC_LIBTOOL_LANG_RC_CONFIG |
| 10045 |
|
| 10046 |
|
| 10047 |
# AC_LIBTOOL_CONFIG([TAGNAME]) |
| 10048 |
# ---------------------------- |
| 10049 |
# If TAGNAME is not passed, then create an initial libtool script |
| 10050 |
# with a default configuration from the untagged config vars. Otherwise |
| 10051 |
# add code to config.status for appending the configuration named by |
| 10052 |
# TAGNAME from the matching tagged config vars. |
| 10053 |
AC_DEFUN([AC_LIBTOOL_CONFIG], |
| 10054 |
[# The else clause should only fire when bootstrapping the |
| 10055 |
# libtool distribution, otherwise you forgot to ship ltmain.sh |
| 10056 |
# with your package, and you will get complaints that there are |
| 10057 |
# no rules to generate ltmain.sh. |
| 10058 |
if test -f "$ltmain"; then |
| 10059 |
# See if we are running on zsh, and set the options which allow our commands through |
| 10060 |
# without removal of \ escapes. |
| 10061 |
if test -n "${ZSH_VERSION+set}" ; then |
| 10062 |
setopt NO_GLOB_SUBST |
| 10063 |
fi |
| 10064 |
# Now quote all the things that may contain metacharacters while being |
| 10065 |
# careful not to overquote the AC_SUBSTed values. We take copies of the |
| 10066 |
# variables and quote the copies for generation of the libtool script. |
| 10067 |
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ |
| 10068 |
SED SHELL STRIP \ |
| 10069 |
libname_spec library_names_spec soname_spec extract_expsyms_cmds \ |
| 10070 |
old_striplib striplib file_magic_cmd finish_cmds finish_eval \ |
| 10071 |
deplibs_check_method reload_flag reload_cmds need_locks \ |
| 10072 |
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ |
| 10073 |
lt_cv_sys_global_symbol_to_c_name_address \ |
| 10074 |
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ |
| 10075 |
old_postinstall_cmds old_postuninstall_cmds \ |
| 10076 |
_LT_AC_TAGVAR(compiler, $1) \ |
| 10077 |
_LT_AC_TAGVAR(CC, $1) \ |
| 10078 |
_LT_AC_TAGVAR(LD, $1) \ |
| 10079 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ |
| 10080 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ |
| 10081 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ |
| 10082 |
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ |
| 10083 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ |
| 10084 |
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ |
| 10085 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ |
| 10086 |
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ |
| 10087 |
_LT_AC_TAGVAR(old_archive_cmds, $1) \ |
| 10088 |
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ |
| 10089 |
_LT_AC_TAGVAR(predep_objects, $1) \ |
| 10090 |
_LT_AC_TAGVAR(postdep_objects, $1) \ |
| 10091 |
_LT_AC_TAGVAR(predeps, $1) \ |
| 10092 |
_LT_AC_TAGVAR(postdeps, $1) \ |
| 10093 |
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \ |
| 10094 |
_LT_AC_TAGVAR(archive_cmds, $1) \ |
| 10095 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \ |
| 10096 |
_LT_AC_TAGVAR(postinstall_cmds, $1) \ |
| 10097 |
_LT_AC_TAGVAR(postuninstall_cmds, $1) \ |
| 10098 |
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ |
| 10099 |
_LT_AC_TAGVAR(allow_undefined_flag, $1) \ |
| 10100 |
_LT_AC_TAGVAR(no_undefined_flag, $1) \ |
| 10101 |
_LT_AC_TAGVAR(export_symbols_cmds, $1) \ |
| 10102 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ |
| 10103 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ |
| 10104 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ |
| 10105 |
_LT_AC_TAGVAR(hardcode_automatic, $1) \ |
| 10106 |
_LT_AC_TAGVAR(module_cmds, $1) \ |
| 10107 |
_LT_AC_TAGVAR(module_expsym_cmds, $1) \ |
| 10108 |
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ |
| 10109 |
_LT_AC_TAGVAR(exclude_expsyms, $1) \ |
| 10110 |
_LT_AC_TAGVAR(include_expsyms, $1); do |
| 10111 |
|
| 10112 |
case $var in |
| 10113 |
_LT_AC_TAGVAR(old_archive_cmds, $1) | \ |
| 10114 |
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ |
| 10115 |
_LT_AC_TAGVAR(archive_cmds, $1) | \ |
| 10116 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ |
| 10117 |
_LT_AC_TAGVAR(module_cmds, $1) | \ |
| 10118 |
_LT_AC_TAGVAR(module_expsym_cmds, $1) | \ |
| 10119 |
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ |
| 10120 |
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \ |
| 10121 |
extract_expsyms_cmds | reload_cmds | finish_cmds | \ |
| 10122 |
postinstall_cmds | postuninstall_cmds | \ |
| 10123 |
old_postinstall_cmds | old_postuninstall_cmds | \ |
| 10124 |
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) |
| 10125 |
# Double-quote double-evaled strings. |
| 10126 |
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" |
| 10127 |
;; |
| 10128 |
*) |
| 10129 |
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" |
| 10130 |
;; |
| 10131 |
esac |
| 10132 |
done |
| 10133 |
|
| 10134 |
case $lt_echo in |
| 10135 |
*'\[$]0 --fallback-echo"') |
| 10136 |
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` |
| 10137 |
;; |
| 10138 |
esac |
| 10139 |
|
| 10140 |
ifelse([$1], [], |
| 10141 |
[cfgfile="${ofile}T" |
| 10142 |
trap "$rm \"$cfgfile\"; exit 1" 1 2 15 |
| 10143 |
$rm -f "$cfgfile" |
| 10144 |
AC_MSG_NOTICE([creating $ofile])], |
| 10145 |
[cfgfile="$ofile"]) |
| 10146 |
|
| 10147 |
cat <<__EOF__ >> "$cfgfile" |
| 10148 |
ifelse([$1], [], |
| 10149 |
[#! $SHELL |
| 10150 |
|
| 10151 |
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
| 10152 |
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
| 10153 |
# NOTE: Changes made to this file will be lost: look at ltmain.sh. |
| 10154 |
# |
| 10155 |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 |
| 10156 |
# Free Software Foundation, Inc. |
| 10157 |
# |
| 10158 |
# This file is part of GNU Libtool: |
| 10159 |
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
| 10160 |
# |
| 10161 |
# This program is free software; you can redistribute it and/or modify |
| 10162 |
# it under the terms of the GNU General Public License as published by |
| 10163 |
# the Free Software Foundation; either version 2 of the License, or |
| 10164 |
# (at your option) any later version. |
| 10165 |
# |
| 10166 |
# This program is distributed in the hope that it will be useful, but |
| 10167 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10168 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 10169 |
# General Public License for more details. |
| 10170 |
# |
| 10171 |
# You should have received a copy of the GNU General Public License |
| 10172 |
# along with this program; if not, write to the Free Software |
| 10173 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 10174 |
# |
| 10175 |
# As a special exception to the GNU General Public License, if you |
| 10176 |
# distribute this file as part of a program that contains a |
| 10177 |
# configuration script generated by Autoconf, you may include it under |
| 10178 |
# the same distribution terms that you use for the rest of that program. |
| 10179 |
|
| 10180 |
# A sed program that does not truncate output. |
| 10181 |
SED=$lt_SED |
| 10182 |
|
| 10183 |
# Sed that helps us avoid accidentally triggering echo(1) options like -n. |
| 10184 |
Xsed="$SED -e 1s/^X//" |
| 10185 |
|
| 10186 |
# The HP-UX ksh and POSIX shell print the target directory to stdout |
| 10187 |
# if CDPATH is set. |
| 10188 |
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
| 10189 |
|
| 10190 |
# The names of the tagged configurations supported by this script. |
| 10191 |
available_tags= |
| 10192 |
|
| 10193 |
# ### BEGIN LIBTOOL CONFIG], |
| 10194 |
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) |
| 10195 |
|
| 10196 |
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 10197 |
|
| 10198 |
# Shell to use when invoking shell scripts. |
| 10199 |
SHELL=$lt_SHELL |
| 10200 |
|
| 10201 |
# Whether or not to build shared libraries. |
| 10202 |
build_libtool_libs=$enable_shared |
| 10203 |
|
| 10204 |
# Whether or not to build static libraries. |
| 10205 |
build_old_libs=$enable_static |
| 10206 |
|
| 10207 |
# Whether or not to add -lc for building shared libraries. |
| 10208 |
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) |
| 10209 |
|
| 10210 |
# Whether or not to disallow shared libs when runtime libs are static |
| 10211 |
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) |
| 10212 |
|
| 10213 |
# Whether or not to optimize for fast installation. |
| 10214 |
fast_install=$enable_fast_install |
| 10215 |
|
| 10216 |
# The host system. |
| 10217 |
host_alias=$host_alias |
| 10218 |
host=$host |
| 10219 |
host_os=$host_os |
| 10220 |
|
| 10221 |
# The build system. |
| 10222 |
build_alias=$build_alias |
| 10223 |
build=$build |
| 10224 |
build_os=$build_os |
| 10225 |
|
| 10226 |
# An echo program that does not interpret backslashes. |
| 10227 |
echo=$lt_echo |
| 10228 |
|
| 10229 |
# The archiver. |
| 10230 |
AR=$lt_AR |
| 10231 |
AR_FLAGS=$lt_AR_FLAGS |
| 10232 |
|
| 10233 |
# A C compiler. |
| 10234 |
LTCC=$lt_LTCC |
| 10235 |
|
| 10236 |
# LTCC compiler flags. |
| 10237 |
LTCFLAGS=$lt_LTCFLAGS |
| 10238 |
|
| 10239 |
# A language-specific compiler. |
| 10240 |
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) |
| 10241 |
|
| 10242 |
# Is the compiler the GNU C compiler? |
| 10243 |
with_gcc=$_LT_AC_TAGVAR(GCC, $1) |
| 10244 |
|
| 10245 |
# An ERE matcher. |
| 10246 |
EGREP=$lt_EGREP |
| 10247 |
|
| 10248 |
# The linker used to build libraries. |
| 10249 |
LD=$lt_[]_LT_AC_TAGVAR(LD, $1) |
| 10250 |
|
| 10251 |
# Whether we need hard or soft links. |
| 10252 |
LN_S=$lt_LN_S |
| 10253 |
|
| 10254 |
# A BSD-compatible nm program. |
| 10255 |
NM=$lt_NM |
| 10256 |
|
| 10257 |
# A symbol stripping program |
| 10258 |
STRIP=$lt_STRIP |
| 10259 |
|
| 10260 |
# Used to examine libraries when file_magic_cmd begins "file" |
| 10261 |
MAGIC_CMD=$MAGIC_CMD |
| 10262 |
|
| 10263 |
# Used on cygwin: DLL creation program. |
| 10264 |
DLLTOOL="$DLLTOOL" |
| 10265 |
|
| 10266 |
# Used on cygwin: object dumper. |
| 10267 |
OBJDUMP="$OBJDUMP" |
| 10268 |
|
| 10269 |
# Used on cygwin: assembler. |
| 10270 |
AS="$AS" |
| 10271 |
|
| 10272 |
# The name of the directory that contains temporary libtool files. |
| 10273 |
objdir=$objdir |
| 10274 |
|
| 10275 |
# How to create reloadable object files. |
| 10276 |
reload_flag=$lt_reload_flag |
| 10277 |
reload_cmds=$lt_reload_cmds |
| 10278 |
|
| 10279 |
# How to pass a linker flag through the compiler. |
| 10280 |
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) |
| 10281 |
|
| 10282 |
# Object file suffix (normally "o"). |
| 10283 |
objext="$ac_objext" |
| 10284 |
|
| 10285 |
# Old archive suffix (normally "a"). |
| 10286 |
libext="$libext" |
| 10287 |
|
| 10288 |
# Shared library suffix (normally ".so"). |
| 10289 |
shrext_cmds='$shrext_cmds' |
| 10290 |
|
| 10291 |
# Executable file suffix (normally ""). |
| 10292 |
exeext="$exeext" |
| 10293 |
|
| 10294 |
# Additional compiler flags for building library objects. |
| 10295 |
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) |
| 10296 |
pic_mode=$pic_mode |
| 10297 |
|
| 10298 |
# What is the maximum length of a command? |
| 10299 |
max_cmd_len=$lt_cv_sys_max_cmd_len |
| 10300 |
|
| 10301 |
# Does compiler simultaneously support -c and -o options? |
| 10302 |
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) |
| 10303 |
|
| 10304 |
# Must we lock files when doing compilation? |
| 10305 |
need_locks=$lt_need_locks |
| 10306 |
|
| 10307 |
# Do we need the lib prefix for modules? |
| 10308 |
need_lib_prefix=$need_lib_prefix |
| 10309 |
|
| 10310 |
# Do we need a version for libraries? |
| 10311 |
need_version=$need_version |
| 10312 |
|
| 10313 |
# Whether dlopen is supported. |
| 10314 |
dlopen_support=$enable_dlopen |
| 10315 |
|
| 10316 |
# Whether dlopen of programs is supported. |
| 10317 |
dlopen_self=$enable_dlopen_self |
| 10318 |
|
| 10319 |
# Whether dlopen of statically linked programs is supported. |
| 10320 |
dlopen_self_static=$enable_dlopen_self_static |
| 10321 |
|
| 10322 |
# Compiler flag to prevent dynamic linking. |
| 10323 |
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) |
| 10324 |
|
| 10325 |
# Compiler flag to turn off builtin functions. |
| 10326 |
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) |
| 10327 |
|
| 10328 |
# Compiler flag to allow reflexive dlopens. |
| 10329 |
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) |
| 10330 |
|
| 10331 |
# Compiler flag to generate shared objects directly from archives. |
| 10332 |
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) |
| 10333 |
|
| 10334 |
# Compiler flag to generate thread-safe objects. |
| 10335 |
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) |
| 10336 |
|
| 10337 |
# Library versioning type. |
| 10338 |
version_type=$version_type |
| 10339 |
|
| 10340 |
# Format of library name prefix. |
| 10341 |
libname_spec=$lt_libname_spec |
| 10342 |
|
| 10343 |
# List of archive names. First name is the real one, the rest are links. |
| 10344 |
# The last name is the one that the linker finds with -lNAME. |
| 10345 |
library_names_spec=$lt_library_names_spec |
| 10346 |
|
| 10347 |
# The coded name of the library, if different from the real name. |
| 10348 |
soname_spec=$lt_soname_spec |
| 10349 |
|
| 10350 |
# Commands used to build and install an old-style archive. |
| 10351 |
RANLIB=$lt_RANLIB |
| 10352 |
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) |
| 10353 |
old_postinstall_cmds=$lt_old_postinstall_cmds |
| 10354 |
old_postuninstall_cmds=$lt_old_postuninstall_cmds |
| 10355 |
|
| 10356 |
# Create an old-style archive from a shared archive. |
| 10357 |
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) |
| 10358 |
|
| 10359 |
# Create a temporary old-style archive to link instead of a shared archive. |
| 10360 |
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) |
| 10361 |
|
| 10362 |
# Commands used to build and install a shared archive. |
| 10363 |
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) |
| 10364 |
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) |
| 10365 |
postinstall_cmds=$lt_postinstall_cmds |
| 10366 |
postuninstall_cmds=$lt_postuninstall_cmds |
| 10367 |
|
| 10368 |
# Commands used to build a loadable module (assumed same as above if empty) |
| 10369 |
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) |
| 10370 |
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) |
| 10371 |
|
| 10372 |
# Commands to strip libraries. |
| 10373 |
old_striplib=$lt_old_striplib |
| 10374 |
striplib=$lt_striplib |
| 10375 |
|
| 10376 |
# Dependencies to place before the objects being linked to create a |
| 10377 |
# shared library. |
| 10378 |
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) |
| 10379 |
|
| 10380 |
# Dependencies to place after the objects being linked to create a |
| 10381 |
# shared library. |
| 10382 |
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) |
| 10383 |
|
| 10384 |
# Dependencies to place before the objects being linked to create a |
| 10385 |
# shared library. |
| 10386 |
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) |
| 10387 |
|
| 10388 |
# Dependencies to place after the objects being linked to create a |
| 10389 |
# shared library. |
| 10390 |
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) |
| 10391 |
|
| 10392 |
# The library search path used internally by the compiler when linking |
| 10393 |
# a shared library. |
| 10394 |
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) |
| 10395 |
|
| 10396 |
# Method to check whether dependent libraries are shared objects. |
| 10397 |
deplibs_check_method=$lt_deplibs_check_method |
| 10398 |
|
| 10399 |
# Command to use when deplibs_check_method == file_magic. |
| 10400 |
file_magic_cmd=$lt_file_magic_cmd |
| 10401 |
|
| 10402 |
# Flag that allows shared libraries with undefined symbols to be built. |
| 10403 |
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) |
| 10404 |
|
| 10405 |
# Flag that forces no undefined symbols. |
| 10406 |
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) |
| 10407 |
|
| 10408 |
# Commands used to finish a libtool library installation in a directory. |
| 10409 |
finish_cmds=$lt_finish_cmds |
| 10410 |
|
| 10411 |
# Same as above, but a single script fragment to be evaled but not shown. |
| 10412 |
finish_eval=$lt_finish_eval |
| 10413 |
|
| 10414 |
# Take the output of nm and produce a listing of raw symbols and C names. |
| 10415 |
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe |
| 10416 |
|
| 10417 |
# Transform the output of nm in a proper C declaration |
| 10418 |
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl |
| 10419 |
|
| 10420 |
# Transform the output of nm in a C name address pair |
| 10421 |
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address |
| 10422 |
|
| 10423 |
# This is the shared library runtime path variable. |
| 10424 |
runpath_var=$runpath_var |
| 10425 |
|
| 10426 |
# This is the shared library path variable. |
| 10427 |
shlibpath_var=$shlibpath_var |
| 10428 |
|
| 10429 |
# Is shlibpath searched before the hard-coded library search path? |
| 10430 |
shlibpath_overrides_runpath=$shlibpath_overrides_runpath |
| 10431 |
|
| 10432 |
# How to hardcode a shared library path into an executable. |
| 10433 |
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) |
| 10434 |
|
| 10435 |
# Whether we should hardcode library paths into libraries. |
| 10436 |
hardcode_into_libs=$hardcode_into_libs |
| 10437 |
|
| 10438 |
# Flag to hardcode \$libdir into a binary during linking. |
| 10439 |
# This must work even if \$libdir does not exist. |
| 10440 |
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) |
| 10441 |
|
| 10442 |
# If ld is used when linking, flag to hardcode \$libdir into |
| 10443 |
# a binary during linking. This must work even if \$libdir does |
| 10444 |
# not exist. |
| 10445 |
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) |
| 10446 |
|
| 10447 |
# Whether we need a single -rpath flag with a separated argument. |
| 10448 |
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) |
| 10449 |
|
| 10450 |
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the |
| 10451 |
# resulting binary. |
| 10452 |
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) |
| 10453 |
|
| 10454 |
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the |
| 10455 |
# resulting binary. |
| 10456 |
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) |
| 10457 |
|
| 10458 |
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into |
| 10459 |
# the resulting binary. |
| 10460 |
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) |
| 10461 |
|
| 10462 |
# Set to yes if building a shared library automatically hardcodes DIR into the library |
| 10463 |
# and all subsequent libraries and executables linked against it. |
| 10464 |
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) |
| 10465 |
|
| 10466 |
# Variables whose values should be saved in libtool wrapper scripts and |
| 10467 |
# restored at relink time. |
| 10468 |
variables_saved_for_relink="$variables_saved_for_relink" |
| 10469 |
|
| 10470 |
# Whether libtool must link a program against all its dependency libraries. |
| 10471 |
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) |
| 10472 |
|
| 10473 |
# Compile-time system search path for libraries |
| 10474 |
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec |
| 10475 |
|
| 10476 |
# Run-time system search path for libraries |
| 10477 |
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec |
| 10478 |
|
| 10479 |
# Fix the shell variable \$srcfile for the compiler. |
| 10480 |
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" |
| 10481 |
|
| 10482 |
# Set to yes if exported symbols are required. |
| 10483 |
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) |
| 10484 |
|
| 10485 |
# The commands to list exported symbols. |
| 10486 |
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) |
| 10487 |
|
| 10488 |
# The commands to extract the exported symbol list from a shared archive. |
| 10489 |
extract_expsyms_cmds=$lt_extract_expsyms_cmds |
| 10490 |
|
| 10491 |
# Symbols that should not be listed in the preloaded symbols. |
| 10492 |
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) |
| 10493 |
|
| 10494 |
# Symbols that must always be exported. |
| 10495 |
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) |
| 10496 |
|
| 10497 |
ifelse([$1],[], |
| 10498 |
[# ### END LIBTOOL CONFIG], |
| 10499 |
[# ### END LIBTOOL TAG CONFIG: $tagname]) |
| 10500 |
|
| 10501 |
__EOF__ |
| 10502 |
|
| 10503 |
ifelse([$1],[], [ |
| 10504 |
case $host_os in |
| 10505 |
aix3*) |
| 10506 |
cat <<\EOF >> "$cfgfile" |
| 10507 |
|
| 10508 |
# AIX sometimes has problems with the GCC collect2 program. For some |
| 10509 |
# reason, if we set the COLLECT_NAMES environment variable, the problems |
| 10510 |
# vanish in a puff of smoke. |
| 10511 |
if test "X${COLLECT_NAMES+set}" != Xset; then |
| 10512 |
COLLECT_NAMES= |
| 10513 |
export COLLECT_NAMES |
| 10514 |
fi |
| 10515 |
EOF |
| 10516 |
;; |
| 10517 |
esac |
| 10518 |
|
| 10519 |
# We use sed instead of cat because bash on DJGPP gets confused if |
| 10520 |
# if finds mixed CR/LF and LF-only lines. Since sed operates in |
| 10521 |
# text mode, it properly converts lines to CR/LF. This bash problem |
| 10522 |
# is reportedly fixed, but why not run on old versions too? |
| 10523 |
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) |
| 10524 |
|
| 10525 |
mv -f "$cfgfile" "$ofile" || \ |
| 10526 |
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") |
| 10527 |
chmod +x "$ofile" |
| 10528 |
]) |
| 10529 |
else |
| 10530 |
# If there is no Makefile yet, we rely on a make rule to execute |
| 10531 |
# `config.status --recheck' to rerun these tests and create the |
| 10532 |
# libtool script then. |
| 10533 |
ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` |
| 10534 |
if test -f "$ltmain_in"; then |
| 10535 |
test -f Makefile && make "$ltmain" |
| 10536 |
fi |
| 10537 |
fi |
| 10538 |
])# AC_LIBTOOL_CONFIG |
| 10539 |
|
| 10540 |
|
| 10541 |
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) |
| 10542 |
# ------------------------------------------- |
| 10543 |
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], |
| 10544 |
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
| 10545 |
|
| 10546 |
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
| 10547 |
|
| 10548 |
if test "$GCC" = yes; then |
| 10549 |
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' |
| 10550 |
|
| 10551 |
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], |
| 10552 |
lt_cv_prog_compiler_rtti_exceptions, |
| 10553 |
[-fno-rtti -fno-exceptions], [], |
| 10554 |
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) |
| 10555 |
fi |
| 10556 |
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI |
| 10557 |
|
| 10558 |
|
| 10559 |
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
| 10560 |
# --------------------------------- |
| 10561 |
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], |
| 10562 |
[AC_REQUIRE([AC_CANONICAL_HOST]) |
| 10563 |
AC_REQUIRE([AC_PROG_NM]) |
| 10564 |
AC_REQUIRE([AC_OBJEXT]) |
| 10565 |
# Check for command to grab the raw symbol name followed by C symbol from nm. |
| 10566 |
AC_MSG_CHECKING([command to parse $NM output from $compiler object]) |
| 10567 |
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], |
| 10568 |
[ |
| 10569 |
# These are sane defaults that work on at least a few old systems. |
| 10570 |
# [They come from Ultrix. What could be older than Ultrix?!! ;)] |
| 10571 |
|
| 10572 |
# Character class describing NM global symbol codes. |
| 10573 |
symcode='[[BCDEGRST]]' |
| 10574 |
|
| 10575 |
# Regexp to match symbols that can be accessed directly from C. |
| 10576 |
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' |
| 10577 |
|
| 10578 |
# Transform an extracted symbol line into a proper C declaration |
| 10579 |
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" |
| 10580 |
|
| 10581 |
# Transform an extracted symbol line into symbol name and symbol address |
| 10582 |
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'" |
| 10583 |
|
| 10584 |
# Define system-specific variables. |
| 10585 |
case $host_os in |
| 10586 |
aix*) |
| 10587 |
symcode='[[BCDT]]' |
| 10588 |
;; |
| 10589 |
cygwin* | mingw* | pw32*) |
| 10590 |
symcode='[[ABCDGISTW]]' |
| 10591 |
;; |
| 10592 |
hpux*) # Its linker distinguishes data from code symbols |
| 10593 |
if test "$host_cpu" = ia64; then |
| 10594 |
symcode='[[ABCDEGRST]]' |
| 10595 |
fi |
| 10596 |
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
| 10597 |
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'" |
| 10598 |
;; |
| 10599 |
linux* | k*bsd*-gnu) |
| 10600 |
if test "$host_cpu" = ia64; then |
| 10601 |
symcode='[[ABCDGIRSTW]]' |
| 10602 |
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
| 10603 |
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'" |
| 10604 |
fi |
| 10605 |
;; |
| 10606 |
irix* | nonstopux*) |
| 10607 |
symcode='[[BCDEGRST]]' |
| 10608 |
;; |
| 10609 |
osf*) |
| 10610 |
symcode='[[BCDEGQRST]]' |
| 10611 |
;; |
| 10612 |
solaris*) |
| 10613 |
symcode='[[BDRT]]' |
| 10614 |
;; |
| 10615 |
sco3.2v5*) |
| 10616 |
symcode='[[DT]]' |
| 10617 |
;; |
| 10618 |
sysv4.2uw2*) |
| 10619 |
symcode='[[DT]]' |
| 10620 |
;; |
| 10621 |
sysv5* | sco5v6* | unixware* | OpenUNIX*) |
| 10622 |
symcode='[[ABDT]]' |
| 10623 |
;; |
| 10624 |
sysv4) |
| 10625 |
symcode='[[DFNSTU]]' |
| 10626 |
;; |
| 10627 |
esac |
| 10628 |
|
| 10629 |
# Handle CRLF in mingw tool chain |
| 10630 |
opt_cr= |
| 10631 |
case $build_os in |
| 10632 |
mingw*) |
| 10633 |
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
| 10634 |
;; |
| 10635 |
esac |
| 10636 |
|
| 10637 |
# If we're using GNU nm, then use its standard symbol codes. |
| 10638 |
case `$NM -V 2>&1` in |
| 10639 |
*GNU* | *'with BFD'*) |
| 10640 |
symcode='[[ABCDGIRSTW]]' ;; |
| 10641 |
esac |
| 10642 |
|
| 10643 |
# Try without a prefix undercore, then with it. |
| 10644 |
for ac_symprfx in "" "_"; do |
| 10645 |
|
| 10646 |
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. |
| 10647 |
symxfrm="\\1 $ac_symprfx\\2 \\2" |
| 10648 |
|
| 10649 |
# Write the raw and C identifiers. |
| 10650 |
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" |
| 10651 |
|
| 10652 |
# Check to see that the pipe works correctly. |
| 10653 |
pipe_works=no |
| 10654 |
|
| 10655 |
rm -f conftest* |
| 10656 |
cat > conftest.$ac_ext <<EOF |
| 10657 |
#ifdef __cplusplus |
| 10658 |
extern "C" { |
| 10659 |
#endif |
| 10660 |
char nm_test_var; |
| 10661 |
void nm_test_func(){} |
| 10662 |
#ifdef __cplusplus |
| 10663 |
} |
| 10664 |
#endif |
| 10665 |
int main(){nm_test_var='a';nm_test_func();return(0);} |
| 10666 |
EOF |
| 10667 |
|
| 10668 |
if AC_TRY_EVAL(ac_compile); then |
| 10669 |
# Now try to grab the symbols. |
| 10670 |
nlist=conftest.nm |
| 10671 |
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
| 10672 |
# Try sorting and uniquifying the output. |
| 10673 |
if sort "$nlist" | uniq > "$nlist"T; then |
| 10674 |
mv -f "$nlist"T "$nlist" |
| 10675 |
else |
| 10676 |
rm -f "$nlist"T |
| 10677 |
fi |
| 10678 |
|
| 10679 |
# Make sure that we snagged all the symbols we need. |
| 10680 |
if grep ' nm_test_var$' "$nlist" >/dev/null; then |
| 10681 |
if grep ' nm_test_func$' "$nlist" >/dev/null; then |
| 10682 |
cat <<EOF > conftest.$ac_ext |
| 10683 |
#ifdef __cplusplus |
| 10684 |
extern "C" { |
| 10685 |
#endif |
| 10686 |
|
| 10687 |
EOF |
| 10688 |
# Now generate the symbol file. |
| 10689 |
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' |
| 10690 |
|
| 10691 |
cat <<EOF >> conftest.$ac_ext |
| 10692 |
#if defined (__STDC__) && __STDC__ |
| 10693 |
# define lt_ptr_t void * |
| 10694 |
#else |
| 10695 |
# define lt_ptr_t char * |
| 10696 |
# define const |
| 10697 |
#endif |
| 10698 |
|
| 10699 |
/* The mapping between symbol names and symbols. */ |
| 10700 |
const struct { |
| 10701 |
const char *name; |
| 10702 |
lt_ptr_t address; |
| 10703 |
} |
| 10704 |
lt_preloaded_symbols[[]] = |
| 10705 |
{ |
| 10706 |
EOF |
| 10707 |
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext |
| 10708 |
cat <<\EOF >> conftest.$ac_ext |
| 10709 |
{0, (lt_ptr_t) 0} |
| 10710 |
}; |
| 10711 |
|
| 10712 |
#ifdef __cplusplus |
| 10713 |
} |
| 10714 |
#endif |
| 10715 |
EOF |
| 10716 |
# Now try linking the two files. |
| 10717 |
mv conftest.$ac_objext conftstm.$ac_objext |
| 10718 |
lt_save_LIBS="$LIBS" |
| 10719 |
lt_save_CFLAGS="$CFLAGS" |
| 10720 |
LIBS="conftstm.$ac_objext" |
| 10721 |
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" |
| 10722 |
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then |
| 10723 |
pipe_works=yes |
| 10724 |
fi |
| 10725 |
LIBS="$lt_save_LIBS" |
| 10726 |
CFLAGS="$lt_save_CFLAGS" |
| 10727 |
else |
| 10728 |
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD |
| 10729 |
fi |
| 10730 |
else |
| 10731 |
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD |
| 10732 |
fi |
| 10733 |
else |
| 10734 |
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD |
| 10735 |
fi |
| 10736 |
else |
| 10737 |
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD |
| 10738 |
cat conftest.$ac_ext >&5 |
| 10739 |
fi |
| 10740 |
rm -f conftest* conftst* |
| 10741 |
|
| 10742 |
# Do not use the global_symbol_pipe unless it works. |
| 10743 |
if test "$pipe_works" = yes; then |
| 10744 |
break |
| 10745 |
else |
| 10746 |
lt_cv_sys_global_symbol_pipe= |
| 10747 |
fi |
| 10748 |
done |
| 10749 |
]) |
| 10750 |
if test -z "$lt_cv_sys_global_symbol_pipe"; then |
| 10751 |
lt_cv_sys_global_symbol_to_cdecl= |
| 10752 |
fi |
| 10753 |
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then |
| 10754 |
AC_MSG_RESULT(failed) |
| 10755 |
else |
| 10756 |
AC_MSG_RESULT(ok) |
| 10757 |
fi |
| 10758 |
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
| 10759 |
|
| 10760 |
|
| 10761 |
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) |
| 10762 |
# --------------------------------------- |
| 10763 |
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], |
| 10764 |
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= |
| 10765 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
| 10766 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= |
| 10767 |
|
| 10768 |
AC_MSG_CHECKING([for $compiler option to produce PIC]) |
| 10769 |
ifelse([$1],[CXX],[ |
| 10770 |
# C++ specific cases for pic, static, wl, etc. |
| 10771 |
if test "$GXX" = yes; then |
| 10772 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 10773 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 10774 |
|
| 10775 |
case $host_os in |
| 10776 |
aix*) |
| 10777 |
# All AIX code is PIC. |
| 10778 |
if test "$host_cpu" = ia64; then |
| 10779 |
# AIX 5 now supports IA64 processor |
| 10780 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 10781 |
fi |
| 10782 |
;; |
| 10783 |
amigaos*) |
| 10784 |
# FIXME: we need at least 68020 code to build shared libraries, but |
| 10785 |
# adding the `-m68020' flag to GCC prevents building anything better, |
| 10786 |
# like `-m68040'. |
| 10787 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
| 10788 |
;; |
| 10789 |
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
| 10790 |
# PIC is the default for these OSes. |
| 10791 |
;; |
| 10792 |
mingw* | os2* | pw32*) |
| 10793 |
# This hack is so that the source file can tell whether it is being |
| 10794 |
# built for inclusion in a dll (and should export symbols for example). |
| 10795 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
| 10796 |
;; |
| 10797 |
darwin* | rhapsody*) |
| 10798 |
# PIC is the default on this platform |
| 10799 |
# Common symbols not allowed in MH_DYLIB files |
| 10800 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
| 10801 |
;; |
| 10802 |
*djgpp*) |
| 10803 |
# DJGPP does not support shared libraries at all |
| 10804 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
| 10805 |
;; |
| 10806 |
interix3*) |
| 10807 |
# Interix 3.x gcc -fpic/-fPIC options generate broken code. |
| 10808 |
# Instead, we relocate shared libraries at runtime. |
| 10809 |
;; |
| 10810 |
sysv4*MP*) |
| 10811 |
if test -d /usr/nec; then |
| 10812 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
| 10813 |
fi |
| 10814 |
;; |
| 10815 |
hpux*) |
| 10816 |
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but |
| 10817 |
# not for PA HP-UX. |
| 10818 |
case $host_cpu in |
| 10819 |
hppa*64*|ia64*) |
| 10820 |
;; |
| 10821 |
*) |
| 10822 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 10823 |
;; |
| 10824 |
esac |
| 10825 |
;; |
| 10826 |
*) |
| 10827 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 10828 |
;; |
| 10829 |
esac |
| 10830 |
else |
| 10831 |
case $host_os in |
| 10832 |
aix4* | aix5*) |
| 10833 |
# All AIX code is PIC. |
| 10834 |
if test "$host_cpu" = ia64; then |
| 10835 |
# AIX 5 now supports IA64 processor |
| 10836 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 10837 |
else |
| 10838 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
| 10839 |
fi |
| 10840 |
;; |
| 10841 |
chorus*) |
| 10842 |
case $cc_basename in |
| 10843 |
cxch68*) |
| 10844 |
# Green Hills C++ Compiler |
| 10845 |
# _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" |
| 10846 |
;; |
| 10847 |
esac |
| 10848 |
;; |
| 10849 |
darwin*) |
| 10850 |
# PIC is the default on this platform |
| 10851 |
# Common symbols not allowed in MH_DYLIB files |
| 10852 |
case $cc_basename in |
| 10853 |
xlc*) |
| 10854 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' |
| 10855 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 10856 |
;; |
| 10857 |
esac |
| 10858 |
;; |
| 10859 |
dgux*) |
| 10860 |
case $cc_basename in |
| 10861 |
ec++*) |
| 10862 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 10863 |
;; |
| 10864 |
ghcx*) |
| 10865 |
# Green Hills C++ Compiler |
| 10866 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 10867 |
;; |
| 10868 |
*) |
| 10869 |
;; |
| 10870 |
esac |
| 10871 |
;; |
| 10872 |
freebsd* | dragonfly*) |
| 10873 |
# FreeBSD uses GNU C++ |
| 10874 |
;; |
| 10875 |
hpux9* | hpux10* | hpux11*) |
| 10876 |
case $cc_basename in |
| 10877 |
CC*) |
| 10878 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 10879 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' |
| 10880 |
if test "$host_cpu" != ia64; then |
| 10881 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
| 10882 |
fi |
| 10883 |
;; |
| 10884 |
aCC*) |
| 10885 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 10886 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' |
| 10887 |
case $host_cpu in |
| 10888 |
hppa*64*|ia64*) |
| 10889 |
# +Z the default |
| 10890 |
;; |
| 10891 |
*) |
| 10892 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
| 10893 |
;; |
| 10894 |
esac |
| 10895 |
;; |
| 10896 |
*) |
| 10897 |
;; |
| 10898 |
esac |
| 10899 |
;; |
| 10900 |
interix*) |
| 10901 |
# This is c89, which is MS Visual C++ (no shared libs) |
| 10902 |
# Anyone wants to do a port? |
| 10903 |
;; |
| 10904 |
irix5* | irix6* | nonstopux*) |
| 10905 |
case $cc_basename in |
| 10906 |
CC*) |
| 10907 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 10908 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 10909 |
# CC pic flag -KPIC is the default. |
| 10910 |
;; |
| 10911 |
*) |
| 10912 |
;; |
| 10913 |
esac |
| 10914 |
;; |
| 10915 |
linux* | k*bsd*-gnu) |
| 10916 |
case $cc_basename in |
| 10917 |
KCC*) |
| 10918 |
# KAI C++ Compiler |
| 10919 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
| 10920 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 10921 |
;; |
| 10922 |
icpc* | ecpc*) |
| 10923 |
# Intel C++ |
| 10924 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 10925 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 10926 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 10927 |
;; |
| 10928 |
pgCC*) |
| 10929 |
# Portland Group C++ compiler. |
| 10930 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 10931 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' |
| 10932 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 10933 |
;; |
| 10934 |
cxx*) |
| 10935 |
# Compaq C++ |
| 10936 |
# Make sure the PIC flag is empty. It appears that all Alpha |
| 10937 |
# Linux and Compaq Tru64 Unix objects are PIC. |
| 10938 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
| 10939 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 10940 |
;; |
| 10941 |
*) |
| 10942 |
;; |
| 10943 |
esac |
| 10944 |
;; |
| 10945 |
lynxos*) |
| 10946 |
;; |
| 10947 |
m88k*) |
| 10948 |
;; |
| 10949 |
mvs*) |
| 10950 |
case $cc_basename in |
| 10951 |
cxx*) |
| 10952 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' |
| 10953 |
;; |
| 10954 |
*) |
| 10955 |
;; |
| 10956 |
esac |
| 10957 |
;; |
| 10958 |
netbsd* | netbsdelf*-gnu) |
| 10959 |
;; |
| 10960 |
osf3* | osf4* | osf5*) |
| 10961 |
case $cc_basename in |
| 10962 |
KCC*) |
| 10963 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
| 10964 |
;; |
| 10965 |
RCC*) |
| 10966 |
# Rational C++ 2.4.1 |
| 10967 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 10968 |
;; |
| 10969 |
cxx*) |
| 10970 |
# Digital/Compaq C++ |
| 10971 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 10972 |
# Make sure the PIC flag is empty. It appears that all Alpha |
| 10973 |
# Linux and Compaq Tru64 Unix objects are PIC. |
| 10974 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
| 10975 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 10976 |
;; |
| 10977 |
*) |
| 10978 |
;; |
| 10979 |
esac |
| 10980 |
;; |
| 10981 |
psos*) |
| 10982 |
;; |
| 10983 |
solaris*) |
| 10984 |
case $cc_basename in |
| 10985 |
CC*) |
| 10986 |
# Sun C++ 4.2, 5.x and Centerline C++ |
| 10987 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 10988 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 10989 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
| 10990 |
;; |
| 10991 |
gcx*) |
| 10992 |
# Green Hills C++ Compiler |
| 10993 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
| 10994 |
;; |
| 10995 |
*) |
| 10996 |
;; |
| 10997 |
esac |
| 10998 |
;; |
| 10999 |
sunos4*) |
| 11000 |
case $cc_basename in |
| 11001 |
CC*) |
| 11002 |
# Sun C++ 4.x |
| 11003 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 11004 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 11005 |
;; |
| 11006 |
lcc*) |
| 11007 |
# Lucid |
| 11008 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 11009 |
;; |
| 11010 |
*) |
| 11011 |
;; |
| 11012 |
esac |
| 11013 |
;; |
| 11014 |
tandem*) |
| 11015 |
case $cc_basename in |
| 11016 |
NCC*) |
| 11017 |
# NonStop-UX NCC 3.20 |
| 11018 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 11019 |
;; |
| 11020 |
*) |
| 11021 |
;; |
| 11022 |
esac |
| 11023 |
;; |
| 11024 |
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) |
| 11025 |
case $cc_basename in |
| 11026 |
CC*) |
| 11027 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 11028 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 11029 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 11030 |
;; |
| 11031 |
esac |
| 11032 |
;; |
| 11033 |
vxworks*) |
| 11034 |
;; |
| 11035 |
*) |
| 11036 |
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
| 11037 |
;; |
| 11038 |
esac |
| 11039 |
fi |
| 11040 |
], |
| 11041 |
[ |
| 11042 |
if test "$GCC" = yes; then |
| 11043 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 11044 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 11045 |
|
| 11046 |
case $host_os in |
| 11047 |
aix*) |
| 11048 |
# All AIX code is PIC. |
| 11049 |
if test "$host_cpu" = ia64; then |
| 11050 |
# AIX 5 now supports IA64 processor |
| 11051 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 11052 |
fi |
| 11053 |
;; |
| 11054 |
|
| 11055 |
amigaos*) |
| 11056 |
# FIXME: we need at least 68020 code to build shared libraries, but |
| 11057 |
# adding the `-m68020' flag to GCC prevents building anything better, |
| 11058 |
# like `-m68040'. |
| 11059 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
| 11060 |
;; |
| 11061 |
|
| 11062 |
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
| 11063 |
# PIC is the default for these OSes. |
| 11064 |
;; |
| 11065 |
|
| 11066 |
mingw* | pw32* | os2*) |
| 11067 |
# This hack is so that the source file can tell whether it is being |
| 11068 |
# built for inclusion in a dll (and should export symbols for example). |
| 11069 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
| 11070 |
;; |
| 11071 |
|
| 11072 |
darwin* | rhapsody*) |
| 11073 |
# PIC is the default on this platform |
| 11074 |
# Common symbols not allowed in MH_DYLIB files |
| 11075 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
| 11076 |
;; |
| 11077 |
|
| 11078 |
interix3*) |
| 11079 |
# Interix 3.x gcc -fpic/-fPIC options generate broken code. |
| 11080 |
# Instead, we relocate shared libraries at runtime. |
| 11081 |
;; |
| 11082 |
|
| 11083 |
msdosdjgpp*) |
| 11084 |
# Just because we use GCC doesn't mean we suddenly get shared libraries |
| 11085 |
# on systems that don't support them. |
| 11086 |
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
| 11087 |
enable_shared=no |
| 11088 |
;; |
| 11089 |
|
| 11090 |
sysv4*MP*) |
| 11091 |
if test -d /usr/nec; then |
| 11092 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
| 11093 |
fi |
| 11094 |
;; |
| 11095 |
|
| 11096 |
hpux*) |
| 11097 |
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but |
| 11098 |
# not for PA HP-UX. |
| 11099 |
case $host_cpu in |
| 11100 |
hppa*64*|ia64*) |
| 11101 |
# +Z the default |
| 11102 |
;; |
| 11103 |
*) |
| 11104 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 11105 |
;; |
| 11106 |
esac |
| 11107 |
;; |
| 11108 |
|
| 11109 |
*) |
| 11110 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 11111 |
;; |
| 11112 |
esac |
| 11113 |
else |
| 11114 |
# PORTME Check for flag to pass linker flags through the system compiler. |
| 11115 |
case $host_os in |
| 11116 |
aix*) |
| 11117 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 11118 |
if test "$host_cpu" = ia64; then |
| 11119 |
# AIX 5 now supports IA64 processor |
| 11120 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 11121 |
else |
| 11122 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
| 11123 |
fi |
| 11124 |
;; |
| 11125 |
darwin*) |
| 11126 |
# PIC is the default on this platform |
| 11127 |
# Common symbols not allowed in MH_DYLIB files |
| 11128 |
case $cc_basename in |
| 11129 |
xlc*) |
| 11130 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' |
| 11131 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 11132 |
;; |
| 11133 |
esac |
| 11134 |
;; |
| 11135 |
|
| 11136 |
mingw* | pw32* | os2*) |
| 11137 |
# This hack is so that the source file can tell whether it is being |
| 11138 |
# built for inclusion in a dll (and should export symbols for example). |
| 11139 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
| 11140 |
;; |
| 11141 |
|
| 11142 |
hpux9* | hpux10* | hpux11*) |
| 11143 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 11144 |
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but |
| 11145 |
# not for PA HP-UX. |
| 11146 |
case $host_cpu in |
| 11147 |
hppa*64*|ia64*) |
| 11148 |
# +Z the default |
| 11149 |
;; |
| 11150 |
*) |
| 11151 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
| 11152 |
;; |
| 11153 |
esac |
| 11154 |
# Is there a better lt_prog_compiler_static that works with the bundled CC? |
| 11155 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' |
| 11156 |
;; |
| 11157 |
|
| 11158 |
irix5* | irix6* | nonstopux*) |
| 11159 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 11160 |
# PIC (with -KPIC) is the default. |
| 11161 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 11162 |
;; |
| 11163 |
|
| 11164 |
newsos6) |
| 11165 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 11166 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 11167 |
;; |
| 11168 |
|
| 11169 |
linux* | k*bsd*-gnu) |
| 11170 |
case $cc_basename in |
| 11171 |
icc* | ecc*) |
| 11172 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 11173 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 11174 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 11175 |
;; |
| 11176 |
pgcc* | pgf77* | pgf90* | pgf95*) |
| 11177 |
# Portland Group compilers (*not* the Pentium gcc compiler, |
| 11178 |
# which looks to be a dead project) |
| 11179 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 11180 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' |
| 11181 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 11182 |
;; |
| 11183 |
ccc*) |
| 11184 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 11185 |
# All Alpha code is PIC. |
| 11186 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 11187 |
;; |
| 11188 |
esac |
| 11189 |
;; |
| 11190 |
|
| 11191 |
osf3* | osf4* | osf5*) |
| 11192 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 11193 |
# All OSF/1 code is PIC. |
| 11194 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 11195 |
;; |
| 11196 |
|
| 11197 |
solaris*) |
| 11198 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 11199 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 11200 |
case $cc_basename in |
| 11201 |
f77* | f90* | f95*) |
| 11202 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; |
| 11203 |
*) |
| 11204 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; |
| 11205 |
esac |
| 11206 |
;; |
| 11207 |
|
| 11208 |
sunos4*) |
| 11209 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
| 11210 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
| 11211 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 11212 |
;; |
| 11213 |
|
| 11214 |
sysv4 | sysv4.2uw2* | sysv4.3*) |
| 11215 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 11216 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 11217 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 11218 |
;; |
| 11219 |
|
| 11220 |
sysv4*MP*) |
| 11221 |
if test -d /usr/nec ;then |
| 11222 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' |
| 11223 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 11224 |
fi |
| 11225 |
;; |
| 11226 |
|
| 11227 |
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) |
| 11228 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 11229 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 11230 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 11231 |
;; |
| 11232 |
|
| 11233 |
unicos*) |
| 11234 |
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 11235 |
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
| 11236 |
;; |
| 11237 |
|
| 11238 |
uts4*) |
| 11239 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 11240 |
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 11241 |
;; |
| 11242 |
|
| 11243 |
*) |
| 11244 |
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
| 11245 |
;; |
| 11246 |
esac |
| 11247 |
fi |
| 11248 |
]) |
| 11249 |
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) |
| 11250 |
|
| 11251 |
# |
| 11252 |
# Check to make sure the PIC flag actually works. |
| 11253 |
# |
| 11254 |
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then |
| 11255 |
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], |
| 11256 |
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), |
| 11257 |
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], |
| 11258 |
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in |
| 11259 |
"" | " "*) ;; |
| 11260 |
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; |
| 11261 |
esac], |
| 11262 |
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
| 11263 |
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) |
| 11264 |
fi |
| 11265 |
case $host_os in |
| 11266 |
# For platforms which do not support PIC, -DPIC is meaningless: |
| 11267 |
*djgpp*) |
| 11268 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
| 11269 |
;; |
| 11270 |
*) |
| 11271 |
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" |
| 11272 |
;; |
| 11273 |
esac |
| 11274 |
|
| 11275 |
# |
| 11276 |
# Check to make sure the static flag actually works. |
| 11277 |
# |
| 11278 |
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" |
| 11279 |
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], |
| 11280 |
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), |
| 11281 |
$lt_tmp_static_flag, |
| 11282 |
[], |
| 11283 |
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) |
| 11284 |
]) |
| 11285 |
|
| 11286 |
|
| 11287 |
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) |
| 11288 |
# ------------------------------------ |
| 11289 |
# See if the linker supports building shared libraries. |
| 11290 |
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], |
| 11291 |
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
| 11292 |
ifelse([$1],[CXX],[ |
| 11293 |
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
| 11294 |
case $host_os in |
| 11295 |
aix4* | aix5*) |
| 11296 |
# If we're using GNU nm, then we don't want the "-C" option. |
| 11297 |
# -C means demangle to AIX nm, but means don't demangle with GNU nm |
| 11298 |
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then |
| 11299 |
_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' |
| 11300 |
else |
| 11301 |
_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' |
| 11302 |
fi |
| 11303 |
;; |
| 11304 |
pw32*) |
| 11305 |
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" |
| 11306 |
;; |
| 11307 |
cygwin* | mingw*) |
| 11308 |
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' |
| 11309 |
;; |
| 11310 |
linux* | k*bsd*-gnu) |
| 11311 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=no |
| 11312 |
;; |
| 11313 |
*) |
| 11314 |
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
| 11315 |
;; |
| 11316 |
esac |
| 11317 |
],[ |
| 11318 |
runpath_var= |
| 11319 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)= |
| 11320 |
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
| 11321 |
_LT_AC_TAGVAR(archive_cmds, $1)= |
| 11322 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)= |
| 11323 |
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= |
| 11324 |
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= |
| 11325 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
| 11326 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
| 11327 |
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)= |
| 11328 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
| 11329 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= |
| 11330 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
| 11331 |
_LT_AC_TAGVAR(hardcode_direct, $1)=no |
| 11332 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
| 11333 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
| 11334 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown |
| 11335 |
_LT_AC_TAGVAR(hardcode_automatic, $1)=no |
| 11336 |
_LT_AC_TAGVAR(module_cmds, $1)= |
| 11337 |
_LT_AC_TAGVAR(module_expsym_cmds, $1)= |
| 11338 |
_LT_AC_TAGVAR(always_export_symbols, $1)=no |
| 11339 |
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
| 11340 |
# include_expsyms should be a list of space-separated symbols to be *always* |
| 11341 |
# included in the symbol list |
| 11342 |
_LT_AC_TAGVAR(include_expsyms, $1)= |
| 11343 |
# exclude_expsyms can be an extended regexp of symbols to exclude |
| 11344 |
# it will be wrapped by ` (' and `)$', so one must not match beginning or |
| 11345 |
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
| 11346 |
# as well as any symbol that contains `d'. |
| 11347 |
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" |
| 11348 |
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
| 11349 |
# platforms (ab)use it in PIC code, but their linkers get confused if |
| 11350 |
# the symbol is explicitly referenced. Since portable code cannot |
| 11351 |
# rely on this symbol name, it's probably fine to never include it in |
| 11352 |
# preloaded symbol tables. |
| 11353 |
extract_expsyms_cmds= |
| 11354 |
# Just being paranoid about ensuring that cc_basename is set. |
| 11355 |
_LT_CC_BASENAME([$compiler]) |
| 11356 |
case $host_os in |
| 11357 |
cygwin* | mingw* | pw32*) |
| 11358 |
# FIXME: the MSVC++ port hasn't been tested in a loooong time |
| 11359 |
# When not using gcc, we currently assume that we are using |
| 11360 |
# Microsoft Visual C++. |
| 11361 |
if test "$GCC" != yes; then |
| 11362 |
with_gnu_ld=no |
| 11363 |
fi |
| 11364 |
;; |
| 11365 |
interix*) |
| 11366 |
# we just hope/assume this is gcc and not c89 (= MSVC++) |
| 11367 |
with_gnu_ld=yes |
| 11368 |
;; |
| 11369 |
openbsd*) |
| 11370 |
with_gnu_ld=no |
| 11371 |
;; |
| 11372 |
esac |
| 11373 |
|
| 11374 |
_LT_AC_TAGVAR(ld_shlibs, $1)=yes |
| 11375 |
if test "$with_gnu_ld" = yes; then |
| 11376 |
# If archive_cmds runs LD, not CC, wlarc should be empty |
| 11377 |
wlarc='${wl}' |
| 11378 |
|
| 11379 |
# Set some defaults for GNU ld with shared library support. These |
| 11380 |
# are reset later if shared libraries are not supported. Putting them |
| 11381 |
# here allows them to be overridden if necessary. |
| 11382 |
runpath_var=LD_RUN_PATH |
| 11383 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' |
| 11384 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
| 11385 |
# ancient GNU ld didn't support --whole-archive et. al. |
| 11386 |
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then |
| 11387 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
| 11388 |
else |
| 11389 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
| 11390 |
fi |
| 11391 |
supports_anon_versioning=no |
| 11392 |
case `$LD -v 2>/dev/null` in |
| 11393 |
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 |
| 11394 |
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... |
| 11395 |
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... |
| 11396 |
*\ 2.11.*) ;; # other 2.11 versions |
| 11397 |
*) supports_anon_versioning=yes ;; |
| 11398 |
esac |
| 11399 |
|
| 11400 |
# See if GNU ld supports shared libraries. |
| 11401 |
case $host_os in |
| 11402 |
aix3* | aix4* | aix5*) |
| 11403 |
# On AIX/PPC, the GNU linker is very broken |
| 11404 |
if test "$host_cpu" != ia64; then |
| 11405 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 11406 |
cat <<EOF 1>&2 |
| 11407 |
|
| 11408 |
*** Warning: the GNU linker, at least up to release 2.9.1, is reported |
| 11409 |
*** to be unable to reliably create shared libraries on AIX. |
| 11410 |
*** Therefore, libtool is disabling shared libraries support. If you |
| 11411 |
*** really care for shared libraries, you may want to modify your PATH |
| 11412 |
*** so that a non-GNU linker is found, and then restart. |
| 11413 |
|
| 11414 |
EOF |
| 11415 |
fi |
| 11416 |
;; |
| 11417 |
|
| 11418 |
amigaos*) |
| 11419 |
_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)' |
| 11420 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 11421 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 11422 |
|
| 11423 |
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
| 11424 |
# that the semantics of dynamic libraries on AmigaOS, at least up |
| 11425 |
# to version 4, is to share data among multiple programs linked |
| 11426 |
# with the same dynamic library. Since this doesn't match the |
| 11427 |
# behavior of shared libraries on other platforms, we can't use |
| 11428 |
# them. |
| 11429 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 11430 |
;; |
| 11431 |
|
| 11432 |
beos*) |
| 11433 |
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
| 11434 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 11435 |
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
| 11436 |
# support --undefined. This deserves some investigation. FIXME |
| 11437 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 11438 |
else |
| 11439 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 11440 |
fi |
| 11441 |
;; |
| 11442 |
|
| 11443 |
cygwin* | mingw* | pw32*) |
| 11444 |
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, |
| 11445 |
# as there is no search path for DLLs. |
| 11446 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 11447 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 11448 |
_LT_AC_TAGVAR(always_export_symbols, $1)=no |
| 11449 |
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
| 11450 |
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' |
| 11451 |
|
| 11452 |
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then |
| 11453 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' |
| 11454 |
# If the export-symbols file already is a .def file (1st line |
| 11455 |
# is EXPORTS), use it as is; otherwise, prepend... |
| 11456 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then |
| 11457 |
cp $export_symbols $output_objdir/$soname.def; |
| 11458 |
else |
| 11459 |
echo EXPORTS > $output_objdir/$soname.def; |
| 11460 |
cat $export_symbols >> $output_objdir/$soname.def; |
| 11461 |
fi~ |
| 11462 |
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' |
| 11463 |
else |
| 11464 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 11465 |
fi |
| 11466 |
;; |
| 11467 |
|
| 11468 |
interix3*) |
| 11469 |
_LT_AC_TAGVAR(hardcode_direct, $1)=no |
| 11470 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 11471 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
| 11472 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
| 11473 |
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. |
| 11474 |
# Instead, shared libraries are loaded at an image base (0x10000000 by |
| 11475 |
# default) and relocated if they conflict, which is a slow very memory |
| 11476 |
# consuming and fragmenting process. To avoid this, we pick a random, |
| 11477 |
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link |
| 11478 |
# time. Moving up from 0x10000000 also allows more sbrk(2) space. |
| 11479 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' |
| 11480 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' |
| 11481 |
;; |
| 11482 |
|
| 11483 |
linux* | k*bsd*-gnu) |
| 11484 |
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
| 11485 |
tmp_addflag= |
| 11486 |
case $cc_basename,$host_cpu in |
| 11487 |
pgcc*) # Portland Group C compiler |
| 11488 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' |
| 11489 |
tmp_addflag=' $pic_flag' |
| 11490 |
;; |
| 11491 |
pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers |
| 11492 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' |
| 11493 |
tmp_addflag=' $pic_flag -Mnomain' ;; |
| 11494 |
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 |
| 11495 |
tmp_addflag=' -i_dynamic' ;; |
| 11496 |
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 |
| 11497 |
tmp_addflag=' -i_dynamic -nofor_main' ;; |
| 11498 |
ifc* | ifort*) # Intel Fortran compiler |
| 11499 |
tmp_addflag=' -nofor_main' ;; |
| 11500 |
esac |
| 11501 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 11502 |
|
| 11503 |
if test $supports_anon_versioning = yes; then |
| 11504 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ |
| 11505 |
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ |
| 11506 |
$echo "local: *; };" >> $output_objdir/$libname.ver~ |
| 11507 |
$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' |
| 11508 |
fi |
| 11509 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=no |
| 11510 |
else |
| 11511 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 11512 |
fi |
| 11513 |
;; |
| 11514 |
|
| 11515 |
netbsd* | netbsdelf*-gnu) |
| 11516 |
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 11517 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
| 11518 |
wlarc= |
| 11519 |
else |
| 11520 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 11521 |
_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' |
| 11522 |
fi |
| 11523 |
;; |
| 11524 |
|
| 11525 |
solaris*) |
| 11526 |
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then |
| 11527 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 11528 |
cat <<EOF 1>&2 |
| 11529 |
|
| 11530 |
*** Warning: The releases 2.8.* of the GNU linker cannot reliably |
| 11531 |
*** create shared libraries on Solaris systems. Therefore, libtool |
| 11532 |
*** is disabling shared libraries support. We urge you to upgrade GNU |
| 11533 |
*** binutils to release 2.9.1 or newer. Another option is to modify |
| 11534 |
*** your PATH or compiler configuration so that the native linker is |
| 11535 |
*** used, and then restart. |
| 11536 |
|
| 11537 |
EOF |
| 11538 |
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
| 11539 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 11540 |
_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' |
| 11541 |
else |
| 11542 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 11543 |
fi |
| 11544 |
;; |
| 11545 |
|
| 11546 |
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) |
| 11547 |
case `$LD -v 2>&1` in |
| 11548 |
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) |
| 11549 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 11550 |
cat <<_LT_EOF 1>&2 |
| 11551 |
|
| 11552 |
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not |
| 11553 |
*** reliably create shared libraries on SCO systems. Therefore, libtool |
| 11554 |
*** is disabling shared libraries support. We urge you to upgrade GNU |
| 11555 |
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify |
| 11556 |
*** your PATH or compiler configuration so that the native linker is |
| 11557 |
*** used, and then restart. |
| 11558 |
|
| 11559 |
_LT_EOF |
| 11560 |
;; |
| 11561 |
*) |
| 11562 |
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
| 11563 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' |
| 11564 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' |
| 11565 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' |
| 11566 |
else |
| 11567 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 11568 |
fi |
| 11569 |
;; |
| 11570 |
esac |
| 11571 |
;; |
| 11572 |
|
| 11573 |
sunos4*) |
| 11574 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 11575 |
wlarc= |
| 11576 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 11577 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 11578 |
;; |
| 11579 |
|
| 11580 |
*) |
| 11581 |
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
| 11582 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
| 11583 |
_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' |
| 11584 |
else |
| 11585 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 11586 |
fi |
| 11587 |
;; |
| 11588 |
esac |
| 11589 |
|
| 11590 |
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then |
| 11591 |
runpath_var= |
| 11592 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
| 11593 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
| 11594 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
| 11595 |
fi |
| 11596 |
else |
| 11597 |
# PORTME fill in a description of your system's linker (not GNU ld) |
| 11598 |
case $host_os in |
| 11599 |
aix3*) |
| 11600 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 11601 |
_LT_AC_TAGVAR(always_export_symbols, $1)=yes |
| 11602 |
_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' |
| 11603 |
# Note: this linker hardcodes the directories in LIBPATH if there |
| 11604 |
# are no directories specified by -L. |
| 11605 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 11606 |
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then |
| 11607 |
# Neither direct hardcoding nor static linking is supported with a |
| 11608 |
# broken collect2. |
| 11609 |
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
| 11610 |
fi |
| 11611 |
;; |
| 11612 |
|
| 11613 |
aix4* | aix5*) |
| 11614 |
if test "$host_cpu" = ia64; then |
| 11615 |
# On IA64, the linker does run time linking by default, so we don't |
| 11616 |
# have to do anything special. |
| 11617 |
aix_use_runtimelinking=no |
| 11618 |
exp_sym_flag='-Bexport' |
| 11619 |
no_entry_flag="" |
| 11620 |
else |
| 11621 |
# If we're using GNU nm, then we don't want the "-C" option. |
| 11622 |
# -C means demangle to AIX nm, but means don't demangle with GNU nm |
| 11623 |
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then |
| 11624 |
_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' |
| 11625 |
else |
| 11626 |
_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' |
| 11627 |
fi |
| 11628 |
aix_use_runtimelinking=no |
| 11629 |
|
| 11630 |
# Test if we are trying to use run time linking or normal |
| 11631 |
# AIX style linking. If -brtl is somewhere in LDFLAGS, we |
| 11632 |
# need to do runtime linking. |
| 11633 |
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
| 11634 |
for ld_flag in $LDFLAGS; do |
| 11635 |
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then |
| 11636 |
aix_use_runtimelinking=yes |
| 11637 |
break |
| 11638 |
fi |
| 11639 |
done |
| 11640 |
;; |
| 11641 |
esac |
| 11642 |
|
| 11643 |
exp_sym_flag='-bexport' |
| 11644 |
no_entry_flag='-bnoentry' |
| 11645 |
fi |
| 11646 |
|
| 11647 |
# When large executables or shared objects are built, AIX ld can |
| 11648 |
# have problems creating the table of contents. If linking a library |
| 11649 |
# or program results in "error TOC overflow" add -mminimal-toc to |
| 11650 |
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
| 11651 |
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
| 11652 |
|
| 11653 |
_LT_AC_TAGVAR(archive_cmds, $1)='' |
| 11654 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 11655 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' |
| 11656 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 11657 |
|
| 11658 |
if test "$GCC" = yes; then |
| 11659 |
case $host_os in aix4.[[012]]|aix4.[[012]].*) |
| 11660 |
# We only want to do this on AIX 4.2 and lower, the check |
| 11661 |
# below for broken collect2 doesn't work under 4.3+ |
| 11662 |
collect2name=`${CC} -print-prog-name=collect2` |
| 11663 |
if test -f "$collect2name" && \ |
| 11664 |
strings "$collect2name" | grep resolve_lib_name >/dev/null |
| 11665 |
then |
| 11666 |
# We have reworked collect2 |
| 11667 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 11668 |
else |
| 11669 |
# We have old collect2 |
| 11670 |
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
| 11671 |
# It fails to find uninstalled libraries when the uninstalled |
| 11672 |
# path is not listed in the libpath. Setting hardcode_minus_L |
| 11673 |
# to unsupported forces relinking |
| 11674 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 11675 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 11676 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
| 11677 |
fi |
| 11678 |
;; |
| 11679 |
esac |
| 11680 |
shared_flag='-shared' |
| 11681 |
if test "$aix_use_runtimelinking" = yes; then |
| 11682 |
shared_flag="$shared_flag "'${wl}-G' |
| 11683 |
fi |
| 11684 |
else |
| 11685 |
# not using gcc |
| 11686 |
if test "$host_cpu" = ia64; then |
| 11687 |
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release |
| 11688 |
# chokes on -Wl,-G. The following line is correct: |
| 11689 |
shared_flag='-G' |
| 11690 |
else |
| 11691 |
if test "$aix_use_runtimelinking" = yes; then |
| 11692 |
shared_flag='${wl}-G' |
| 11693 |
else |
| 11694 |
shared_flag='${wl}-bM:SRE' |
| 11695 |
fi |
| 11696 |
fi |
| 11697 |
fi |
| 11698 |
|
| 11699 |
# It seems that -bexpall does not export symbols beginning with |
| 11700 |
# underscore (_), so it is better to generate a list of symbols to export. |
| 11701 |
_LT_AC_TAGVAR(always_export_symbols, $1)=yes |
| 11702 |
if test "$aix_use_runtimelinking" = yes; then |
| 11703 |
# Warning - without using the other runtime loading flags (-brtl), |
| 11704 |
# -berok will link without error, but may produce a broken library. |
| 11705 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' |
| 11706 |
# Determine the default libpath from the value encoded in an empty executable. |
| 11707 |
_LT_AC_SYS_LIBPATH_AIX |
| 11708 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
| 11709 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
| 11710 |
else |
| 11711 |
if test "$host_cpu" = ia64; then |
| 11712 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' |
| 11713 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" |
| 11714 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" |
| 11715 |
else |
| 11716 |
# Determine the default libpath from the value encoded in an empty executable. |
| 11717 |
_LT_AC_SYS_LIBPATH_AIX |
| 11718 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
| 11719 |
# Warning - without using the other run time loading flags, |
| 11720 |
# -berok will link without error, but may produce a broken library. |
| 11721 |
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' |
| 11722 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' |
| 11723 |
# Exported symbols can be pulled into shared objects from archives |
| 11724 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' |
| 11725 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
| 11726 |
# This is similar to how AIX traditionally builds its shared libraries. |
| 11727 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' |
| 11728 |
fi |
| 11729 |
fi |
| 11730 |
;; |
| 11731 |
|
| 11732 |
amigaos*) |
| 11733 |
_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)' |
| 11734 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 11735 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 11736 |
# see comment about different semantics on the GNU ld section |
| 11737 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 11738 |
;; |
| 11739 |
|
| 11740 |
bsdi[[45]]*) |
| 11741 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic |
| 11742 |
;; |
| 11743 |
|
| 11744 |
cygwin* | mingw* | pw32*) |
| 11745 |
# When not using gcc, we currently assume that we are using |
| 11746 |
# Microsoft Visual C++. |
| 11747 |
# hardcode_libdir_flag_spec is actually meaningless, as there is |
| 11748 |
# no search path for DLLs. |
| 11749 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' |
| 11750 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 11751 |
# Tell ltmain to make .lib files, not .a files. |
| 11752 |
libext=lib |
| 11753 |
# Tell ltmain to make .dll files, not .so files. |
| 11754 |
shrext_cmds=".dll" |
| 11755 |
# FIXME: Setting linknames here is a bad hack. |
| 11756 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
| 11757 |
# The linker will automatically build a .lib file if we build a DLL. |
| 11758 |
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' |
| 11759 |
# FIXME: Should let the user specify the lib program. |
| 11760 |
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' |
| 11761 |
_LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' |
| 11762 |
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
| 11763 |
;; |
| 11764 |
|
| 11765 |
darwin* | rhapsody*) |
| 11766 |
case $host_os in |
| 11767 |
rhapsody* | darwin1.[[012]]) |
| 11768 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' |
| 11769 |
;; |
| 11770 |
*) # Darwin 1.3 on |
| 11771 |
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then |
| 11772 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' |
| 11773 |
else |
| 11774 |
case ${MACOSX_DEPLOYMENT_TARGET} in |
| 11775 |
10.[[012]]) |
| 11776 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' |
| 11777 |
;; |
| 11778 |
10.*) |
| 11779 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' |
| 11780 |
;; |
| 11781 |
esac |
| 11782 |
fi |
| 11783 |
;; |
| 11784 |
esac |
| 11785 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 11786 |
_LT_AC_TAGVAR(hardcode_direct, $1)=no |
| 11787 |
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes |
| 11788 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
| 11789 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' |
| 11790 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 11791 |
if test "$GCC" = yes ; then |
| 11792 |
output_verbose_link_cmd='echo' |
| 11793 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' |
| 11794 |
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' |
| 11795 |
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds |
| 11796 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
| 11797 |
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
| 11798 |
else |
| 11799 |
case $cc_basename in |
| 11800 |
xlc*) |
| 11801 |
output_verbose_link_cmd='echo' |
| 11802 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' |
| 11803 |
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' |
| 11804 |
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds |
| 11805 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
| 11806 |
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
| 11807 |
;; |
| 11808 |
*) |
| 11809 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 11810 |
;; |
| 11811 |
esac |
| 11812 |
fi |
| 11813 |
;; |
| 11814 |
|
| 11815 |
dgux*) |
| 11816 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 11817 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 11818 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 11819 |
;; |
| 11820 |
|
| 11821 |
freebsd1*) |
| 11822 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 11823 |
;; |
| 11824 |
|
| 11825 |
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
| 11826 |
# support. Future versions do this automatically, but an explicit c++rt0.o |
| 11827 |
# does not break anything, and helps significantly (at the cost of a little |
| 11828 |
# extra space). |
| 11829 |
freebsd2.2*) |
| 11830 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' |
| 11831 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 11832 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 11833 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 11834 |
;; |
| 11835 |
|
| 11836 |
# Unfortunately, older versions of FreeBSD 2 do not have this feature. |
| 11837 |
freebsd2*) |
| 11838 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 11839 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 11840 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 11841 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 11842 |
;; |
| 11843 |
|
| 11844 |
# FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
| 11845 |
freebsd* | dragonfly*) |
| 11846 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' |
| 11847 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 11848 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 11849 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 11850 |
;; |
| 11851 |
|
| 11852 |
hpux9*) |
| 11853 |
if test "$GCC" = yes; then |
| 11854 |
_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' |
| 11855 |
else |
| 11856 |
_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' |
| 11857 |
fi |
| 11858 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
| 11859 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 11860 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 11861 |
|
| 11862 |
# hardcode_minus_L: Not really in the search PATH, |
| 11863 |
# but as the default location of the library. |
| 11864 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 11865 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
| 11866 |
;; |
| 11867 |
|
| 11868 |
hpux10*) |
| 11869 |
if test "$GCC" = yes -a "$with_gnu_ld" = no; then |
| 11870 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' |
| 11871 |
else |
| 11872 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' |
| 11873 |
fi |
| 11874 |
if test "$with_gnu_ld" = no; then |
| 11875 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
| 11876 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 11877 |
|
| 11878 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 11879 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
| 11880 |
|
| 11881 |
# hardcode_minus_L: Not really in the search PATH, |
| 11882 |
# but as the default location of the library. |
| 11883 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 11884 |
fi |
| 11885 |
;; |
| 11886 |
|
| 11887 |
hpux11*) |
| 11888 |
if test "$GCC" = yes -a "$with_gnu_ld" = no; then |
| 11889 |
case $host_cpu in |
| 11890 |
hppa*64*) |
| 11891 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 11892 |
;; |
| 11893 |
ia64*) |
| 11894 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' |
| 11895 |
;; |
| 11896 |
*) |
| 11897 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' |
| 11898 |
;; |
| 11899 |
esac |
| 11900 |
else |
| 11901 |
case $host_cpu in |
| 11902 |
hppa*64*) |
| 11903 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 11904 |
;; |
| 11905 |
ia64*) |
| 11906 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' |
| 11907 |
;; |
| 11908 |
*) |
| 11909 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' |
| 11910 |
;; |
| 11911 |
esac |
| 11912 |
fi |
| 11913 |
if test "$with_gnu_ld" = no; then |
| 11914 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
| 11915 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 11916 |
|
| 11917 |
case $host_cpu in |
| 11918 |
hppa*64*|ia64*) |
| 11919 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' |
| 11920 |
_LT_AC_TAGVAR(hardcode_direct, $1)=no |
| 11921 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 11922 |
;; |
| 11923 |
*) |
| 11924 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 11925 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
| 11926 |
|
| 11927 |
# hardcode_minus_L: Not really in the search PATH, |
| 11928 |
# but as the default location of the library. |
| 11929 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 11930 |
;; |
| 11931 |
esac |
| 11932 |
fi |
| 11933 |
;; |
| 11934 |
|
| 11935 |
irix5* | irix6* | nonstopux*) |
| 11936 |
if test "$GCC" = yes; then |
| 11937 |
_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' |
| 11938 |
else |
| 11939 |
_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' |
| 11940 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' |
| 11941 |
fi |
| 11942 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 11943 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 11944 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 11945 |
;; |
| 11946 |
|
| 11947 |
netbsd* | netbsdelf*-gnu) |
| 11948 |
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
| 11949 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
| 11950 |
else |
| 11951 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
| 11952 |
fi |
| 11953 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 11954 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 11955 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 11956 |
;; |
| 11957 |
|
| 11958 |
newsos6) |
| 11959 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 11960 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 11961 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 11962 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 11963 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 11964 |
;; |
| 11965 |
|
| 11966 |
openbsd*) |
| 11967 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 11968 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 11969 |
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
| 11970 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
| 11971 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' |
| 11972 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
| 11973 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
| 11974 |
else |
| 11975 |
case $host_os in |
| 11976 |
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) |
| 11977 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 11978 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 11979 |
;; |
| 11980 |
*) |
| 11981 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
| 11982 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
| 11983 |
;; |
| 11984 |
esac |
| 11985 |
fi |
| 11986 |
;; |
| 11987 |
|
| 11988 |
os2*) |
| 11989 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 11990 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 11991 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 11992 |
_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' |
| 11993 |
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
| 11994 |
;; |
| 11995 |
|
| 11996 |
osf3*) |
| 11997 |
if test "$GCC" = yes; then |
| 11998 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
| 11999 |
_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' |
| 12000 |
else |
| 12001 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
| 12002 |
_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' |
| 12003 |
fi |
| 12004 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 12005 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 12006 |
;; |
| 12007 |
|
| 12008 |
osf4* | osf5*) # as osf3* with the addition of -msym flag |
| 12009 |
if test "$GCC" = yes; then |
| 12010 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
| 12011 |
_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' |
| 12012 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
| 12013 |
else |
| 12014 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
| 12015 |
_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' |
| 12016 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ |
| 12017 |
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' |
| 12018 |
|
| 12019 |
# Both c and cxx compiler support -rpath directly |
| 12020 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
| 12021 |
fi |
| 12022 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
| 12023 |
;; |
| 12024 |
|
| 12025 |
solaris*) |
| 12026 |
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' |
| 12027 |
if test "$GCC" = yes; then |
| 12028 |
wlarc='${wl}' |
| 12029 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 12030 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 12031 |
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' |
| 12032 |
else |
| 12033 |
wlarc='' |
| 12034 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 12035 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
| 12036 |
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
| 12037 |
fi |
| 12038 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 12039 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 12040 |
case $host_os in |
| 12041 |
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
| 12042 |
*) |
| 12043 |
# The compiler driver will combine linker options so we |
| 12044 |
# cannot just pass the convience library names through |
| 12045 |
# without $wl, iff we do not link with $LD. |
| 12046 |
# Luckily, gcc supports the same syntax we need for Sun Studio. |
| 12047 |
# Supported since Solaris 2.6 (maybe 2.5.1?) |
| 12048 |
case $wlarc in |
| 12049 |
'') |
| 12050 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; |
| 12051 |
*) |
| 12052 |
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; |
| 12053 |
esac ;; |
| 12054 |
esac |
| 12055 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 12056 |
;; |
| 12057 |
|
| 12058 |
sunos4*) |
| 12059 |
if test "x$host_vendor" = xsequent; then |
| 12060 |
# Use $CC to link under sequent, because it throws in some extra .o |
| 12061 |
# files that make .init and .fini sections work. |
| 12062 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' |
| 12063 |
else |
| 12064 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' |
| 12065 |
fi |
| 12066 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 12067 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes |
| 12068 |
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
| 12069 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 12070 |
;; |
| 12071 |
|
| 12072 |
sysv4) |
| 12073 |
case $host_vendor in |
| 12074 |
sni) |
| 12075 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 12076 |
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? |
| 12077 |
;; |
| 12078 |
siemens) |
| 12079 |
## LD is ld it makes a PLAMLIB |
| 12080 |
## CC just makes a GrossModule. |
| 12081 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
| 12082 |
_LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' |
| 12083 |
_LT_AC_TAGVAR(hardcode_direct, $1)=no |
| 12084 |
;; |
| 12085 |
motorola) |
| 12086 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 12087 |
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie |
| 12088 |
;; |
| 12089 |
esac |
| 12090 |
runpath_var='LD_RUN_PATH' |
| 12091 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 12092 |
;; |
| 12093 |
|
| 12094 |
sysv4.3*) |
| 12095 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 12096 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 12097 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' |
| 12098 |
;; |
| 12099 |
|
| 12100 |
sysv4*MP*) |
| 12101 |
if test -d /usr/nec; then |
| 12102 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 12103 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 12104 |
runpath_var=LD_RUN_PATH |
| 12105 |
hardcode_runpath_var=yes |
| 12106 |
_LT_AC_TAGVAR(ld_shlibs, $1)=yes |
| 12107 |
fi |
| 12108 |
;; |
| 12109 |
|
| 12110 |
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) |
| 12111 |
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' |
| 12112 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 12113 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 12114 |
runpath_var='LD_RUN_PATH' |
| 12115 |
|
| 12116 |
if test "$GCC" = yes; then |
| 12117 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 12118 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 12119 |
else |
| 12120 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 12121 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 12122 |
fi |
| 12123 |
;; |
| 12124 |
|
| 12125 |
sysv5* | sco3.2v5* | sco5v6*) |
| 12126 |
# Note: We can NOT use -z defs as we might desire, because we do not |
| 12127 |
# link with -lc, and that would cause any symbols used from libc to |
| 12128 |
# always be unresolved, which means just about no library would |
| 12129 |
# ever link correctly. If we're not using GNU ld we use -z text |
| 12130 |
# though, which does catch some bad symbols but isn't as heavy-handed |
| 12131 |
# as -z defs. |
| 12132 |
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' |
| 12133 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' |
| 12134 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 12135 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 12136 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' |
| 12137 |
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' |
| 12138 |
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
| 12139 |
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' |
| 12140 |
runpath_var='LD_RUN_PATH' |
| 12141 |
|
| 12142 |
if test "$GCC" = yes; then |
| 12143 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 12144 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 12145 |
else |
| 12146 |
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 12147 |
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 12148 |
fi |
| 12149 |
;; |
| 12150 |
|
| 12151 |
uts4*) |
| 12152 |
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 12153 |
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 12154 |
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 12155 |
;; |
| 12156 |
|
| 12157 |
*) |
| 12158 |
_LT_AC_TAGVAR(ld_shlibs, $1)=no |
| 12159 |
;; |
| 12160 |
esac |
| 12161 |
fi |
| 12162 |
]) |
| 12163 |
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) |
| 12164 |
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no |
| 12165 |
|
| 12166 |
# |
| 12167 |
# Do we need to explicitly link libc? |
| 12168 |
# |
| 12169 |
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in |
| 12170 |
x|xyes) |
| 12171 |
# Assume -lc should be added |
| 12172 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
| 12173 |
|
| 12174 |
if test "$enable_shared" = yes && test "$GCC" = yes; then |
| 12175 |
case $_LT_AC_TAGVAR(archive_cmds, $1) in |
| 12176 |
*'~'*) |
| 12177 |
# FIXME: we may have to deal with multi-command sequences. |
| 12178 |
;; |
| 12179 |
'$CC '*) |
| 12180 |
# Test whether the compiler implicitly links with -lc since on some |
| 12181 |
# systems, -lgcc has to come before -lc. If gcc already passes -lc |
| 12182 |
# to ld, don't add -lc before -lgcc. |
| 12183 |
AC_MSG_CHECKING([whether -lc should be explicitly linked in]) |
| 12184 |
$rm conftest* |
| 12185 |
printf "$lt_simple_compile_test_code" > conftest.$ac_ext |
| 12186 |
|
| 12187 |
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then |
| 12188 |
soname=conftest |
| 12189 |
lib=conftest |
| 12190 |
libobjs=conftest.$ac_objext |
| 12191 |
deplibs= |
| 12192 |
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) |
| 12193 |
pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) |
| 12194 |
compiler_flags=-v |
| 12195 |
linker_flags=-v |
| 12196 |
verstring= |
| 12197 |
output_objdir=. |
| 12198 |
libname=conftest |
| 12199 |
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) |
| 12200 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)= |
| 12201 |
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) |
| 12202 |
then |
| 12203 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
| 12204 |
else |
| 12205 |
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
| 12206 |
fi |
| 12207 |
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag |
| 12208 |
else |
| 12209 |
cat conftest.err 1>&5 |
| 12210 |
fi |
| 12211 |
$rm conftest* |
| 12212 |
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) |
| 12213 |
;; |
| 12214 |
esac |
| 12215 |
fi |
| 12216 |
;; |
| 12217 |
esac |
| 12218 |
])# AC_LIBTOOL_PROG_LD_SHLIBS |
| 12219 |
|
| 12220 |
|
| 12221 |
# _LT_AC_FILE_LTDLL_C |
| 12222 |
# ------------------- |
| 12223 |
# Be careful that the start marker always follows a newline. |
| 12224 |
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ |
| 12225 |
# /* ltdll.c starts here */ |
| 12226 |
# #define WIN32_LEAN_AND_MEAN |
| 12227 |
# #include <windows.h> |
| 12228 |
# #undef WIN32_LEAN_AND_MEAN |
| 12229 |
# #include <stdio.h> |
| 12230 |
# |
| 12231 |
# #ifndef __CYGWIN__ |
| 12232 |
# # ifdef __CYGWIN32__ |
| 12233 |
# # define __CYGWIN__ __CYGWIN32__ |
| 12234 |
# # endif |
| 12235 |
# #endif |
| 12236 |
# |
| 12237 |
# #ifdef __cplusplus |
| 12238 |
# extern "C" { |
| 12239 |
# #endif |
| 12240 |
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); |
| 12241 |
# #ifdef __cplusplus |
| 12242 |
# } |
| 12243 |
# #endif |
| 12244 |
# |
| 12245 |
# #ifdef __CYGWIN__ |
| 12246 |
# #include <cygwin/cygwin_dll.h> |
| 12247 |
# DECLARE_CYGWIN_DLL( DllMain ); |
| 12248 |
# #endif |
| 12249 |
# HINSTANCE __hDllInstance_base; |
| 12250 |
# |
| 12251 |
# BOOL APIENTRY |
| 12252 |
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) |
| 12253 |
# { |
| 12254 |
# __hDllInstance_base = hInst; |
| 12255 |
# return TRUE; |
| 12256 |
# } |
| 12257 |
# /* ltdll.c ends here */ |
| 12258 |
])# _LT_AC_FILE_LTDLL_C |
| 12259 |
|
| 12260 |
|
| 12261 |
# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) |
| 12262 |
# --------------------------------- |
| 12263 |
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) |
| 12264 |
|
| 12265 |
|
| 12266 |
# old names |
| 12267 |
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) |
| 12268 |
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
| 12269 |
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) |
| 12270 |
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) |
| 12271 |
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) |
| 12272 |
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) |
| 12273 |
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) |
| 12274 |
|
| 12275 |
# This is just to silence aclocal about the macro not being used |
| 12276 |
ifelse([AC_DISABLE_FAST_INSTALL]) |
| 12277 |
|
| 12278 |
AC_DEFUN([LT_AC_PROG_GCJ], |
| 12279 |
[AC_CHECK_TOOL(GCJ, gcj, no) |
| 12280 |
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" |
| 12281 |
AC_SUBST(GCJFLAGS) |
| 12282 |
]) |
| 12283 |
|
| 12284 |
AC_DEFUN([LT_AC_PROG_RC], |
| 12285 |
[AC_CHECK_TOOL(RC, windres, no) |
| 12286 |
]) |
| 12287 |
|
| 12288 |
############################################################ |
| 12289 |
# NOTE: This macro has been submitted for inclusion into # |
| 12290 |
# GNU Autoconf as AC_PROG_SED. When it is available in # |
| 12291 |
# a released version of Autoconf we should remove this # |
| 12292 |
# macro and use it instead. # |
| 12293 |
############################################################ |
| 12294 |
# LT_AC_PROG_SED |
| 12295 |
# -------------- |
| 12296 |
# Check for a fully-functional sed program, that truncates |
| 12297 |
# as few characters as possible. Prefer GNU sed if found. |
| 12298 |
AC_DEFUN([LT_AC_PROG_SED], |
| 12299 |
[AC_MSG_CHECKING([for a sed that does not truncate output]) |
| 12300 |
AC_CACHE_VAL(lt_cv_path_SED, |
| 12301 |
[# Loop through the user's path and test for sed and gsed. |
| 12302 |
# Then use that list of sed's as ones to test for truncation. |
| 12303 |
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 12304 |
for as_dir in $PATH |
| 12305 |
do |
| 12306 |
IFS=$as_save_IFS |
| 12307 |
test -z "$as_dir" && as_dir=. |
| 12308 |
for lt_ac_prog in sed gsed; do |
| 12309 |
for ac_exec_ext in '' $ac_executable_extensions; do |
| 12310 |
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then |
| 12311 |
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" |
| 12312 |
fi |
| 12313 |
done |
| 12314 |
done |
| 12315 |
done |
| 12316 |
lt_ac_max=0 |
| 12317 |
lt_ac_count=0 |
| 12318 |
# Add /usr/xpg4/bin/sed as it is typically found on Solaris |
| 12319 |
# along with /bin/sed that truncates output. |
| 12320 |
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do |
| 12321 |
test ! -f $lt_ac_sed && continue |
| 12322 |
cat /dev/null > conftest.in |
| 12323 |
lt_ac_count=0 |
| 12324 |
echo $ECHO_N "0123456789$ECHO_C" >conftest.in |
| 12325 |
# Check for GNU sed and select it if it is found. |
| 12326 |
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then |
| 12327 |
lt_cv_path_SED=$lt_ac_sed |
| 12328 |
break |
| 12329 |
fi |
| 12330 |
while true; do |
| 12331 |
cat conftest.in conftest.in >conftest.tmp |
| 12332 |
mv conftest.tmp conftest.in |
| 12333 |
cp conftest.in conftest.nl |
| 12334 |
echo >>conftest.nl |
| 12335 |
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break |
| 12336 |
cmp -s conftest.out conftest.nl || break |
| 12337 |
# 10000 chars as input seems more than enough |
| 12338 |
test $lt_ac_count -gt 10 && break |
| 12339 |
lt_ac_count=`expr $lt_ac_count + 1` |
| 12340 |
if test $lt_ac_count -gt $lt_ac_max; then |
| 12341 |
lt_ac_max=$lt_ac_count |
| 12342 |
lt_cv_path_SED=$lt_ac_sed |
| 12343 |
fi |
| 12344 |
done |
| 12345 |
done |
| 12346 |
]) |
| 12347 |
SED=$lt_cv_path_SED |
| 12348 |
AC_MSG_RESULT([$SED]) |
| 12349 |
]) |
| 12350 |
|
| 12351 |
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) |
| 12352 |
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page |
| 12353 |
dnl also defines GSTUFF_PKG_ERRORS on error |
| 12354 |
AC_DEFUN([PKG_CHECK_MODULES], [ |
| 12355 |
succeeded=no |
| 12356 |
|
| 12357 |
if test -z "$PKG_CONFIG"; then |
| 12358 |
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
| 12359 |
fi |
| 12360 |
|
| 12361 |
if test "$PKG_CONFIG" = "no" ; then |
| 12362 |
echo "*** The pkg-config script could not be found. Make sure it is" |
| 12363 |
echo "*** in your path, or set the PKG_CONFIG environment variable" |
| 12364 |
echo "*** to the full path to pkg-config." |
| 12365 |
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." |
| 12366 |
else |
| 12367 |
PKG_CONFIG_MIN_VERSION=0.9.0 |
| 12368 |
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
| 12369 |
AC_MSG_CHECKING(for $2) |
| 12370 |
|
| 12371 |
if $PKG_CONFIG --exists "$2" ; then |
| 12372 |
AC_MSG_RESULT(yes) |
| 12373 |
succeeded=yes |
| 12374 |
|
| 12375 |
AC_MSG_CHECKING($1_CFLAGS) |
| 12376 |
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"` |
| 12377 |
AC_MSG_RESULT($$1_CFLAGS) |
| 12378 |
|
| 12379 |
AC_MSG_CHECKING($1_LIBS) |
| 12380 |
$1_LIBS=`$PKG_CONFIG --libs "$2"` |
| 12381 |
AC_MSG_RESULT($$1_LIBS) |
| 12382 |
else |
| 12383 |
$1_CFLAGS="" |
| 12384 |
$1_LIBS="" |
| 12385 |
## If we have a custom action on failure, don't print errors, but |
| 12386 |
## do set a variable so people can do so. |
| 12387 |
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` |
| 12388 |
ifelse([$4], ,echo $$1_PKG_ERRORS,) |
| 12389 |
fi |
| 12390 |
|
| 12391 |
AC_SUBST($1_CFLAGS) |
| 12392 |
AC_SUBST($1_LIBS) |
| 12393 |
else |
| 12394 |
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
| 12395 |
echo "*** See http://www.freedesktop.org/software/pkgconfig" |
| 12396 |
fi |
| 12397 |
fi |
| 12398 |
|
| 12399 |
if test $succeeded = yes; then |
| 12400 |
ifelse([$3], , :, [$3]) |
| 12401 |
else |
| 12402 |
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) |
| 12403 |
fi |
| 12404 |
]) |
| 12405 |
|
| 12406 |
|