| 1 | dnl aclocal.m4 generated automatically by aclocal 1.4
|
|---|
| 2 |
|
|---|
| 3 | dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
|---|
| 4 | dnl This file is free software; the Free Software Foundation
|
|---|
| 5 | dnl gives unlimited permission to copy and/or distribute it,
|
|---|
| 6 | dnl with or without modifications, as long as this notice is preserved.
|
|---|
| 7 |
|
|---|
| 8 | dnl This program is distributed in the hope that it will be useful,
|
|---|
| 9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|---|
| 10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|---|
| 11 | dnl PARTICULAR PURPOSE.
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 | dnl This file is part of the KDE libraries/packages
|
|---|
| 15 | dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
|
|---|
| 16 | dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
|
|---|
| 17 |
|
|---|
| 18 | dnl This file is free software; you can redistribute it and/or
|
|---|
| 19 | dnl modify it under the terms of the GNU Library General Public
|
|---|
| 20 | dnl License as published by the Free Software Foundation; either
|
|---|
| 21 | dnl version 2 of the License, or (at your option) any later version.
|
|---|
| 22 |
|
|---|
| 23 | dnl This library is distributed in the hope that it will be useful,
|
|---|
| 24 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 25 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|---|
| 26 | dnl Library General Public License for more details.
|
|---|
| 27 |
|
|---|
| 28 | dnl You should have received a copy of the GNU Library General Public License
|
|---|
| 29 | dnl along with this library; see the file COPYING.LIB. If not, write to
|
|---|
| 30 | dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|---|
| 31 | dnl Boston, MA 02111-1307, USA.
|
|---|
| 32 |
|
|---|
| 33 | dnl IMPORTANT NOTE:
|
|---|
| 34 | dnl Please do not modify this file unless you expect your modifications to be
|
|---|
| 35 | dnl carried into every other module in the repository. If you decide that you
|
|---|
| 36 | dnl really want to modify it, contact coolo@kde.org mentioning that you have
|
|---|
| 37 | dnl and that the modified file should be committed to every module.
|
|---|
| 38 | dnl
|
|---|
| 39 | dnl Single-module modifications are best placed in configure.in for kdelibs
|
|---|
| 40 | dnl and kdebase or configure.in.in if present.
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 | dnl ------------------------------------------------------------------------
|
|---|
| 44 | dnl Find a file (or one of more files in a list of dirs)
|
|---|
| 45 | dnl ------------------------------------------------------------------------
|
|---|
| 46 | dnl
|
|---|
| 47 | AC_DEFUN(AC_FIND_FILE,
|
|---|
| 48 | [
|
|---|
| 49 | $3=NO
|
|---|
| 50 | for i in $2;
|
|---|
| 51 | do
|
|---|
| 52 | for j in $1;
|
|---|
| 53 | do
|
|---|
| 54 | if test -r "$i/$j"; then
|
|---|
| 55 | $3=$i
|
|---|
| 56 | break 2
|
|---|
| 57 | fi
|
|---|
| 58 | done
|
|---|
| 59 | done
|
|---|
| 60 | ])
|
|---|
| 61 |
|
|---|
| 62 | dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
|
|---|
| 63 | dnl if-not-found, test-parameter)
|
|---|
| 64 | AC_DEFUN(KDE_FIND_PATH,
|
|---|
| 65 | [
|
|---|
| 66 | AC_MSG_CHECKING([for $1])
|
|---|
| 67 | if test -n "$$2"; then
|
|---|
| 68 | kde_cv_path="$$2";
|
|---|
| 69 | else
|
|---|
| 70 | kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
|
|---|
| 71 |
|
|---|
| 72 | AC_CACHE_VAL(kde_cv_path_$kde_cache,
|
|---|
| 73 | [
|
|---|
| 74 | kde_cv_path="NONE"
|
|---|
| 75 | dirs="$3"
|
|---|
| 76 | kde_save_IFS=$IFS
|
|---|
| 77 | IFS=':'
|
|---|
| 78 | for dir in $PATH; do
|
|---|
| 79 | dirs="$dirs $dir"
|
|---|
| 80 | done
|
|---|
| 81 | IFS=$kde_save_IFS
|
|---|
| 82 |
|
|---|
| 83 | for dir in $dirs; do
|
|---|
| 84 | if test -x "$dir/$1"; then
|
|---|
| 85 | if test -n "$5"
|
|---|
| 86 | then
|
|---|
| 87 | evalstr="$dir/$1 $5 2>&1 "
|
|---|
| 88 | if eval $evalstr; then
|
|---|
| 89 | kde_cv_path="$dir/$1"
|
|---|
| 90 | break
|
|---|
| 91 | fi
|
|---|
| 92 | else
|
|---|
| 93 | kde_cv_path="$dir/$1"
|
|---|
| 94 | break
|
|---|
| 95 | fi
|
|---|
| 96 | fi
|
|---|
| 97 | done
|
|---|
| 98 |
|
|---|
| 99 | eval "kde_cv_path_$kde_cache=$kde_cv_path"
|
|---|
| 100 |
|
|---|
| 101 | ])
|
|---|
| 102 |
|
|---|
| 103 | eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
|
|---|
| 104 |
|
|---|
| 105 | fi
|
|---|
| 106 |
|
|---|
| 107 | if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
|
|---|
| 108 | AC_MSG_RESULT(not found)
|
|---|
| 109 | $4
|
|---|
| 110 | else
|
|---|
| 111 | AC_MSG_RESULT($kde_cv_path)
|
|---|
| 112 | $2=$kde_cv_path
|
|---|
| 113 |
|
|---|
| 114 | fi
|
|---|
| 115 | ])
|
|---|
| 116 |
|
|---|
| 117 | AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
|
|---|
| 118 | [
|
|---|
| 119 | AC_MSG_ERROR([No Qt meta object compiler (moc) found!
|
|---|
| 120 | Please check whether you installed Qt correctly.
|
|---|
| 121 | You need to have a running moc binary.
|
|---|
| 122 | configure tried to run $ac_cv_path_moc and the test didn't
|
|---|
| 123 | succeed. If configure shouldn't have tried this one, set
|
|---|
| 124 | the environment variable MOC to the right one before running
|
|---|
| 125 | configure.
|
|---|
| 126 | ])
|
|---|
| 127 | ])
|
|---|
| 128 |
|
|---|
| 129 | AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
|
|---|
| 130 | [
|
|---|
| 131 | AC_MSG_WARN([No Qt ui compiler (uic) found!
|
|---|
| 132 | Please check whether you installed Qt correctly.
|
|---|
| 133 | You need to have a running uic binary.
|
|---|
| 134 | configure tried to run $ac_cv_path_uic and the test didn't
|
|---|
| 135 | succeed. If configure shouldn't have tried this one, set
|
|---|
| 136 | the environment variable UIC to the right one before running
|
|---|
| 137 | configure.
|
|---|
| 138 | ])
|
|---|
| 139 | ])
|
|---|
| 140 |
|
|---|
| 141 | dnl ------------------------------------------------------------------------
|
|---|
| 142 | dnl Find the meta object compiler and the ui compiler in the PATH,
|
|---|
| 143 | dnl in $QTDIR/bin, and some more usual places
|
|---|
| 144 | dnl ------------------------------------------------------------------------
|
|---|
| 145 | dnl
|
|---|
| 146 | AC_DEFUN(AC_PATH_QT_MOC_UIC,
|
|---|
| 147 | [
|
|---|
| 148 | qt_bindirs=""
|
|---|
| 149 | for dir in $kde_qt_dirs; do
|
|---|
| 150 | qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
|
|---|
| 151 | done
|
|---|
| 152 | qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
|
|---|
| 153 | if test ! "$ac_qt_bindir" = "NO"; then
|
|---|
| 154 | qt_bindirs="$ac_qt_bindir $qt_bindirs"
|
|---|
| 155 | fi
|
|---|
| 156 |
|
|---|
| 157 | KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
|
|---|
| 158 | KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC="" ; KDE_UIC_ERROR_MESSAGE])
|
|---|
| 159 | if test -z "$UIC" ; then
|
|---|
| 160 | if test -z "$UIC_NOT_NEEDED" ; then
|
|---|
| 161 | exit 1
|
|---|
| 162 | else
|
|---|
| 163 | UIC="echo uic not available: "
|
|---|
| 164 | fi
|
|---|
| 165 | fi
|
|---|
| 166 | AC_SUBST(MOC)
|
|---|
| 167 | AC_SUBST(UIC)
|
|---|
| 168 | ])
|
|---|
| 169 |
|
|---|
| 170 | AC_DEFUN(KDE_1_CHECK_PATHS,
|
|---|
| 171 | [
|
|---|
| 172 | KDE_1_CHECK_PATH_HEADERS
|
|---|
| 173 |
|
|---|
| 174 | KDE_TEST_RPATH=
|
|---|
| 175 |
|
|---|
| 176 | if test -n "$USE_RPATH"; then
|
|---|
| 177 |
|
|---|
| 178 | if test -n "$kde_libraries"; then
|
|---|
| 179 | KDE_TEST_RPATH="-R $kde_libraries"
|
|---|
| 180 | fi
|
|---|
| 181 |
|
|---|
| 182 | if test -n "$qt_libraries"; then
|
|---|
| 183 | KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
|
|---|
| 184 | fi
|
|---|
| 185 |
|
|---|
| 186 | if test -n "$x_libraries"; then
|
|---|
| 187 | KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
|
|---|
| 188 | fi
|
|---|
| 189 |
|
|---|
| 190 | KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
|
|---|
| 191 | fi
|
|---|
| 192 |
|
|---|
| 193 | AC_MSG_CHECKING([for KDE libraries installed])
|
|---|
| 194 | 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'
|
|---|
| 195 |
|
|---|
| 196 | if AC_TRY_EVAL(ac_link) && test -s conftest; then
|
|---|
| 197 | AC_MSG_RESULT(yes)
|
|---|
| 198 | else
|
|---|
| 199 | AC_MSG_ERROR([your system fails at linking a small KDE application!
|
|---|
| 200 | Check, if your compiler is installed correctly and if you have used the
|
|---|
| 201 | same compiler to compile Qt and kdelibs as you did use now.
|
|---|
| 202 | For more details about this problem, look at the end of config.log.])
|
|---|
| 203 | fi
|
|---|
| 204 |
|
|---|
| 205 | if eval `KDEDIR= ./conftest 2>&5`; then
|
|---|
| 206 | kde_result=done
|
|---|
| 207 | else
|
|---|
| 208 | kde_result=problems
|
|---|
| 209 | fi
|
|---|
| 210 |
|
|---|
| 211 | KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
|
|---|
| 212 | kde_have_all_paths=yes
|
|---|
| 213 |
|
|---|
| 214 | KDE_SET_PATHS($kde_result)
|
|---|
| 215 |
|
|---|
| 216 | ])
|
|---|
| 217 |
|
|---|
| 218 | AC_DEFUN(KDE_SET_PATHS,
|
|---|
| 219 | [
|
|---|
| 220 | kde_cv_all_paths="kde_have_all_paths=\"yes\" \
|
|---|
| 221 | kde_htmldir=\"$kde_htmldir\" \
|
|---|
| 222 | kde_appsdir=\"$kde_appsdir\" \
|
|---|
| 223 | kde_icondir=\"$kde_icondir\" \
|
|---|
| 224 | kde_sounddir=\"$kde_sounddir\" \
|
|---|
| 225 | kde_datadir=\"$kde_datadir\" \
|
|---|
| 226 | kde_locale=\"$kde_locale\" \
|
|---|
| 227 | kde_cgidir=\"$kde_cgidir\" \
|
|---|
| 228 | kde_confdir=\"$kde_confdir\" \
|
|---|
| 229 | kde_mimedir=\"$kde_mimedir\" \
|
|---|
| 230 | kde_toolbardir=\"$kde_toolbardir\" \
|
|---|
| 231 | kde_wallpaperdir=\"$kde_wallpaperdir\" \
|
|---|
| 232 | kde_templatesdir=\"$kde_templatesdir\" \
|
|---|
| 233 | kde_bindir=\"$kde_bindir\" \
|
|---|
| 234 | kde_servicesdir=\"$kde_servicesdir\" \
|
|---|
| 235 | kde_servicetypesdir=\"$kde_servicetypesdir\" \
|
|---|
| 236 | kde_moduledir=\"$kde_moduledir\" \
|
|---|
| 237 | kde_result=$1"
|
|---|
| 238 | ])
|
|---|
| 239 |
|
|---|
| 240 | AC_DEFUN(KDE_SET_DEFAULT_PATHS,
|
|---|
| 241 | [
|
|---|
| 242 | if test "$1" = "default"; then
|
|---|
| 243 |
|
|---|
| 244 | if test -z "$kde_htmldir"; then
|
|---|
| 245 | kde_htmldir='\${prefix}/share/doc/HTML'
|
|---|
| 246 | fi
|
|---|
| 247 | if test -z "$kde_appsdir"; then
|
|---|
| 248 | kde_appsdir='\${prefix}/share/applnk'
|
|---|
| 249 | fi
|
|---|
| 250 | if test -z "$kde_icondir"; then
|
|---|
| 251 | kde_icondir='\${prefix}/share/icons'
|
|---|
| 252 | fi
|
|---|
| 253 | if test -z "$kde_sounddir"; then
|
|---|
| 254 | kde_sounddir='\${prefix}/share/sounds'
|
|---|
| 255 | fi
|
|---|
| 256 | if test -z "$kde_datadir"; then
|
|---|
| 257 | kde_datadir='\${prefix}/share/apps'
|
|---|
| 258 | fi
|
|---|
| 259 | if test -z "$kde_locale"; then
|
|---|
| 260 | kde_locale='\${prefix}/share/locale'
|
|---|
| 261 | fi
|
|---|
| 262 | if test -z "$kde_cgidir"; then
|
|---|
| 263 | kde_cgidir='\${exec_prefix}/cgi-bin'
|
|---|
| 264 | fi
|
|---|
| 265 | if test -z "$kde_confdir"; then
|
|---|
| 266 | kde_confdir='\${prefix}/share/config'
|
|---|
| 267 | fi
|
|---|
| 268 | if test -z "$kde_mimedir"; then
|
|---|
| 269 | kde_mimedir='\${prefix}/share/mimelnk'
|
|---|
| 270 | fi
|
|---|
| 271 | if test -z "$kde_toolbardir"; then
|
|---|
| 272 | kde_toolbardir='\${prefix}/share/toolbar'
|
|---|
| 273 | fi
|
|---|
| 274 | if test -z "$kde_wallpaperdir"; then
|
|---|
| 275 | kde_wallpaperdir='\${prefix}/share/wallpapers'
|
|---|
| 276 | fi
|
|---|
| 277 | if test -z "$kde_templatesdir"; then
|
|---|
| 278 | kde_templatesdir='\${prefix}/share/templates'
|
|---|
| 279 | fi
|
|---|
| 280 | if test -z "$kde_bindir"; then
|
|---|
| 281 | kde_bindir='\${exec_prefix}/bin'
|
|---|
| 282 | fi
|
|---|
| 283 | if test -z "$kde_servicesdir"; then
|
|---|
| 284 | kde_servicesdir='\${prefix}/share/services'
|
|---|
| 285 | fi
|
|---|
| 286 | if test -z "$kde_servicetypesdir"; then
|
|---|
| 287 | kde_servicetypesdir='\${prefix}/share/servicetypes'
|
|---|
| 288 | fi
|
|---|
| 289 | if test -z "$kde_moduledir"; then
|
|---|
| 290 | kde_moduledir='\${prefix}/lib/kde2'
|
|---|
| 291 | fi
|
|---|
| 292 |
|
|---|
| 293 | KDE_SET_PATHS(defaults)
|
|---|
| 294 |
|
|---|
| 295 | else
|
|---|
| 296 |
|
|---|
| 297 | if test $kde_qtver = 1; then
|
|---|
| 298 | AC_MSG_RESULT([compiling])
|
|---|
| 299 | KDE_1_CHECK_PATHS
|
|---|
| 300 | else
|
|---|
| 301 | AC_MSG_ERROR([path checking not yet supported for KDE 2])
|
|---|
| 302 | fi
|
|---|
| 303 |
|
|---|
| 304 | fi
|
|---|
| 305 | ])
|
|---|
| 306 |
|
|---|
| 307 | AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
|
|---|
| 308 | [ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
|
|---|
| 309 | test -z "$kde_icondir" || test -z "$kde_sounddir" ||
|
|---|
| 310 | test -z "$kde_datadir" || test -z "$kde_locale" ||
|
|---|
| 311 | test -z "$kde_cgidir" || test -z "$kde_confdir" ||
|
|---|
| 312 | test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
|
|---|
| 313 | test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
|
|---|
| 314 | test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
|
|---|
| 315 | test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
|
|---|
| 316 | test "$kde_have_all_paths" != "yes"; then
|
|---|
| 317 | kde_have_all_paths=no
|
|---|
| 318 | fi
|
|---|
| 319 | ])
|
|---|
| 320 |
|
|---|
| 321 | AC_DEFUN(KDE_MISSING_PROG_ERROR,
|
|---|
| 322 | [
|
|---|
| 323 | AC_MSG_ERROR([The important program $1 was not found!
|
|---|
| 324 | Please check whether you installed KDE correctly.
|
|---|
| 325 | ])
|
|---|
| 326 | ])
|
|---|
| 327 |
|
|---|
| 328 | AC_DEFUN(KDE_SUBST_PROGRAMS,
|
|---|
| 329 | [AC_REQUIRE([AC_CREATE_KFSSTND])dnl
|
|---|
| 330 |
|
|---|
| 331 | kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde2/bin /usr/kde/bin /usr/local/kde/bin"
|
|---|
| 332 | if test -n "$KDEDIRS"; then
|
|---|
| 333 | kde_save_IFS=$IFS
|
|---|
| 334 | IFS=:
|
|---|
| 335 | for dir in $KDEDIRS; do
|
|---|
| 336 | kde_default_bindirs="$dir/bin $kde_default_bindirs "
|
|---|
| 337 | done
|
|---|
| 338 | IFS=$kde_save_IFS
|
|---|
| 339 | fi
|
|---|
| 340 | kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
|
|---|
| 341 | KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
|
|---|
| 342 | KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
|
|---|
| 343 | KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(mcopidl)])
|
|---|
| 344 | KDE_FIND_PATH(kdb2html, KDB2HTML, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kdb2html)])
|
|---|
| 345 | KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(artsc-config)])
|
|---|
| 346 | KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)])
|
|---|
| 347 |
|
|---|
| 348 | DCOP_DEPENDENCIES='$(DCOPIDL)'
|
|---|
| 349 | AC_SUBST(DCOPIDL)
|
|---|
| 350 | AC_SUBST(DCOPIDL2CPP)
|
|---|
| 351 | AC_SUBST(DCOP_DEPENDENCIES)
|
|---|
| 352 | AC_SUBST(MCOPIDL)
|
|---|
| 353 | AC_SUBST(KDB2HTML)
|
|---|
| 354 | AC_SUBST(ARTSCCONFIG)
|
|---|
| 355 | AC_SUBST(KDECONFIG)
|
|---|
| 356 |
|
|---|
| 357 | if test -x "$KDECONFIG"; then # it can be "compiled"
|
|---|
| 358 | kde_libs_prefix=`$KDECONFIG --prefix`
|
|---|
| 359 | if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
|
|---|
| 360 | AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
|
|---|
| 361 | This means it has been moved since you installed it.
|
|---|
| 362 | This won't work. Please recompile kdelibs for the new prefix.
|
|---|
| 363 | ])
|
|---|
| 364 | fi
|
|---|
| 365 | kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
|
|---|
| 366 | else
|
|---|
| 367 | kde_libs_prefix='$(prefix)'
|
|---|
| 368 | kde_libs_htmldir='$(kde_htmldir)'
|
|---|
| 369 | fi
|
|---|
| 370 | AC_SUBST(kde_libs_prefix)
|
|---|
| 371 | AC_SUBST(kde_libs_htmldir)
|
|---|
| 372 | ])dnl
|
|---|
| 373 |
|
|---|
| 374 | AC_DEFUN(AC_CREATE_KFSSTND,
|
|---|
| 375 | [
|
|---|
| 376 | AC_REQUIRE([AC_CHECK_RPATH])
|
|---|
| 377 |
|
|---|
| 378 | AC_MSG_CHECKING([for KDE paths])
|
|---|
| 379 | kde_result=""
|
|---|
| 380 | kde_cached_paths=yes
|
|---|
| 381 | AC_CACHE_VAL(kde_cv_all_paths,
|
|---|
| 382 | [
|
|---|
| 383 | KDE_SET_DEFAULT_PATHS($1)
|
|---|
| 384 | kde_cached_paths=no
|
|---|
| 385 | ])
|
|---|
| 386 | eval "$kde_cv_all_paths"
|
|---|
| 387 | KDE_CHECK_PATHS_FOR_COMPLETENESS
|
|---|
| 388 | if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
|
|---|
| 389 | # wrong values were cached, may be, we can set better ones
|
|---|
| 390 | kde_result=
|
|---|
| 391 | kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
|
|---|
| 392 | kde_datadir= kde_locale= kde_cgidir= kde_confdir=
|
|---|
| 393 | kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
|
|---|
| 394 | kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
|
|---|
| 395 | kde_have_all_paths=
|
|---|
| 396 | KDE_SET_DEFAULT_PATHS($1)
|
|---|
| 397 | eval "$kde_cv_all_paths"
|
|---|
| 398 | KDE_CHECK_PATHS_FOR_COMPLETENESS
|
|---|
| 399 | kde_result="$kde_result (cache overridden)"
|
|---|
| 400 | fi
|
|---|
| 401 | if test "$kde_have_all_paths" = "no"; then
|
|---|
| 402 | AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
|
|---|
| 403 | Since it had compiled and linked before, it must be a strange problem on your system.
|
|---|
| 404 | Look at config.log for details. If you are not able to fix this, look at
|
|---|
| 405 | http://www.kde.org/faq/installation.html or any www.kde.org mirror.
|
|---|
| 406 | (If you're using an egcs version on Linux, you may update binutils!)
|
|---|
| 407 | ])
|
|---|
| 408 | else
|
|---|
| 409 | rm -f conftest*
|
|---|
| 410 | AC_MSG_RESULT($kde_result)
|
|---|
| 411 | fi
|
|---|
| 412 |
|
|---|
| 413 | bindir=$kde_bindir
|
|---|
| 414 |
|
|---|
| 415 | KDE_SUBST_PROGRAMS
|
|---|
| 416 |
|
|---|
| 417 | ])
|
|---|
| 418 |
|
|---|
| 419 | AC_DEFUN(AC_SUBST_KFSSTND,
|
|---|
| 420 | [
|
|---|
| 421 | AC_SUBST(kde_htmldir)
|
|---|
| 422 | AC_SUBST(kde_appsdir)
|
|---|
| 423 | AC_SUBST(kde_icondir)
|
|---|
| 424 | AC_SUBST(kde_sounddir)
|
|---|
| 425 | AC_SUBST(kde_datadir)
|
|---|
| 426 | AC_SUBST(kde_locale)
|
|---|
| 427 | AC_SUBST(kde_confdir)
|
|---|
| 428 | AC_SUBST(kde_mimedir)
|
|---|
| 429 | AC_SUBST(kde_wallpaperdir)
|
|---|
| 430 | AC_SUBST(kde_bindir)
|
|---|
| 431 | dnl for KDE 2
|
|---|
| 432 | AC_SUBST(kde_templatesdir)
|
|---|
| 433 | AC_SUBST(kde_servicesdir)
|
|---|
| 434 | AC_SUBST(kde_servicetypesdir)
|
|---|
| 435 | AC_SUBST(kde_moduledir)
|
|---|
| 436 | if test "$kde_qtver" = 1; then
|
|---|
| 437 | kde_minidir="$kde_icondir/mini"
|
|---|
| 438 | else
|
|---|
| 439 | # for KDE 1 - this breaks KDE2 apps using minidir, but
|
|---|
| 440 | # that's the plan ;-/
|
|---|
| 441 | kde_minidir="/dev/null"
|
|---|
| 442 | fi
|
|---|
| 443 | dnl AC_SUBST(kde_minidir)
|
|---|
| 444 | dnl AC_SUBST(kde_cgidir)
|
|---|
| 445 | dnl AC_SUBST(kde_toolbardir)
|
|---|
| 446 | ])
|
|---|
| 447 |
|
|---|
| 448 | AC_DEFUN(KDE_MISC_TESTS,
|
|---|
| 449 | [
|
|---|
| 450 | AC_LANG_C
|
|---|
| 451 | dnl Checks for libraries.
|
|---|
| 452 | AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for FreeBSD
|
|---|
| 453 | AC_SUBST(LIBCOMPAT)
|
|---|
| 454 | kde_have_crypt=
|
|---|
| 455 | AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
|
|---|
| 456 | AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
|
|---|
| 457 | AC_MSG_WARN([you have no crypt in either libcrypt or libc.
|
|---|
| 458 | You should install libcrypt from another source or configure with PAM
|
|---|
| 459 | support])
|
|---|
| 460 | kde_have_crypt=no
|
|---|
| 461 | ]))
|
|---|
| 462 | AC_SUBST(LIBCRYPT)
|
|---|
| 463 | if test $kde_have_crypt = yes; then
|
|---|
| 464 | AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
|
|---|
| 465 | fi
|
|---|
| 466 | AC_CHECK_KSIZE_T
|
|---|
| 467 | AC_LANG_C
|
|---|
| 468 | AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
|
|---|
| 469 | if test $ac_cv_lib_dnet_dnet_ntoa = no; then
|
|---|
| 470 | AC_CHECK_LIB(dnet_stub, dnet_ntoa,
|
|---|
| 471 | [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
|
|---|
| 472 | fi
|
|---|
| 473 | AC_CHECK_FUNC(inet_ntoa)
|
|---|
| 474 | if test $ac_cv_func_inet_ntoa = no; then
|
|---|
| 475 | AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
|
|---|
| 476 | fi
|
|---|
| 477 | AC_CHECK_FUNC(connect)
|
|---|
| 478 | if test $ac_cv_func_connect = no; then
|
|---|
| 479 | AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
|
|---|
| 480 | $X_EXTRA_LIBS)
|
|---|
| 481 | fi
|
|---|
| 482 |
|
|---|
| 483 | AC_CHECK_FUNC(remove)
|
|---|
| 484 | if test $ac_cv_func_remove = no; then
|
|---|
| 485 | AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
|
|---|
| 486 | fi
|
|---|
| 487 |
|
|---|
| 488 | # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
|
|---|
| 489 | AC_CHECK_FUNC(shmat, ,
|
|---|
| 490 | AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
|
|---|
| 491 |
|
|---|
| 492 | # Solaris 2.6 needs -lresolv for res_init
|
|---|
| 493 | AC_CHECK_FUNC(res_init, ,
|
|---|
| 494 | AC_CHECK_LIB(resolv, res_init, X_EXTRA_LIBS="$X_EXTRA_LIBS -lresolv"))
|
|---|
| 495 |
|
|---|
| 496 | LIBSOCKET="$X_EXTRA_LIBS"
|
|---|
| 497 | AC_SUBST(LIBSOCKET)
|
|---|
| 498 | AC_SUBST(X_EXTRA_LIBS)
|
|---|
| 499 | AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
|
|---|
| 500 | AC_SUBST(LIBUCB)
|
|---|
| 501 |
|
|---|
| 502 | case $host in dnl this *is* LynxOS specific
|
|---|
| 503 | *-*-lynxos* )
|
|---|
| 504 | AC_MSG_CHECKING([LynxOS header file wrappers])
|
|---|
| 505 | [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
|
|---|
| 506 | AC_MSG_RESULT(disabled)
|
|---|
| 507 | AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
|
|---|
| 508 | ;;
|
|---|
| 509 | esac
|
|---|
| 510 |
|
|---|
| 511 | KDE_CHECK_TYPES
|
|---|
| 512 | KDE_CHECK_LIBDL
|
|---|
| 513 | ])
|
|---|
| 514 |
|
|---|
| 515 | dnl ------------------------------------------------------------------------
|
|---|
| 516 | dnl Find the header files and libraries for X-Windows. Extended the
|
|---|
| 517 | dnl macro AC_PATH_X
|
|---|
| 518 | dnl ------------------------------------------------------------------------
|
|---|
| 519 | dnl
|
|---|
| 520 | AC_DEFUN(K_PATH_X,
|
|---|
| 521 | [
|
|---|
| 522 | AC_REQUIRE([AC_PROG_CPP])dnl
|
|---|
| 523 | AC_REQUIRE([KDE_MISC_TESTS])dnl
|
|---|
| 524 | AC_MSG_CHECKING(for X)
|
|---|
| 525 | AC_LANG_SAVE
|
|---|
| 526 | AC_LANG_C
|
|---|
| 527 | AC_CACHE_VAL(kde_cv_have_x,
|
|---|
| 528 | [# One or both of the vars are not set, and there is no cached value.
|
|---|
| 529 | if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
|
|---|
| 530 | kde_x_includes=NO
|
|---|
| 531 | else
|
|---|
| 532 | kde_x_includes=$x_includes
|
|---|
| 533 | fi
|
|---|
| 534 | if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
|
|---|
| 535 | kde_x_libraries=NO
|
|---|
| 536 | else
|
|---|
| 537 | kde_x_libraries=$x_libraries
|
|---|
| 538 | fi
|
|---|
| 539 |
|
|---|
| 540 | # below we use the standard autoconf calls
|
|---|
| 541 | ac_x_libraries=$kde_x_libraries
|
|---|
| 542 | ac_x_includes=$kde_x_includes
|
|---|
| 543 |
|
|---|
| 544 | AC_PATH_X_DIRECT
|
|---|
| 545 | dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
|
|---|
| 546 | dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
|
|---|
| 547 | dnl location. The correct location is /usr/lib32 or an undefined value
|
|---|
| 548 | dnl (the linker is smart enough to pick the correct default library).
|
|---|
| 549 | dnl Things work just fine if you use just AC_PATH_X_DIRECT.
|
|---|
| 550 | case "$host" in
|
|---|
| 551 | mips-sgi-irix6*)
|
|---|
| 552 | ;;
|
|---|
| 553 | *)
|
|---|
| 554 | AC_PATH_X_XMKMF
|
|---|
| 555 | if test -z "$ac_x_includes"; then
|
|---|
| 556 | ac_x_includes="."
|
|---|
| 557 | fi
|
|---|
| 558 | if test -z "$ac_x_libraries"; then
|
|---|
| 559 | ac_x_libraries="/usr/lib"
|
|---|
| 560 | fi
|
|---|
| 561 | esac
|
|---|
| 562 | #from now on we use our own again
|
|---|
| 563 |
|
|---|
| 564 | # when the user already gave --x-includes, we ignore
|
|---|
| 565 | # what the standard autoconf macros told us.
|
|---|
| 566 | if test "$kde_x_includes" = NO; then
|
|---|
| 567 | kde_x_includes=$ac_x_includes
|
|---|
| 568 | fi
|
|---|
| 569 |
|
|---|
| 570 | # for --x-libraries too
|
|---|
| 571 | if test "$kde_x_libraries" = NO; then
|
|---|
| 572 | kde_x_libraries=$ac_x_libraries
|
|---|
| 573 | fi
|
|---|
| 574 |
|
|---|
| 575 | if test "$kde_x_includes" = NO; then
|
|---|
| 576 | AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
|
|---|
| 577 | fi
|
|---|
| 578 |
|
|---|
| 579 | if test "$kde_x_libraries" = NO; then
|
|---|
| 580 | AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
|
|---|
| 581 | fi
|
|---|
| 582 |
|
|---|
| 583 | # Record where we found X for the cache.
|
|---|
| 584 | kde_cv_have_x="have_x=yes \
|
|---|
| 585 | kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
|
|---|
| 586 | ])dnl
|
|---|
| 587 | eval "$kde_cv_have_x"
|
|---|
| 588 |
|
|---|
| 589 | if test "$have_x" != yes; then
|
|---|
| 590 | AC_MSG_RESULT($have_x)
|
|---|
| 591 | no_x=yes
|
|---|
| 592 | else
|
|---|
| 593 | AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
|
|---|
| 594 | fi
|
|---|
| 595 |
|
|---|
| 596 | if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
|
|---|
| 597 | X_INCLUDES=""
|
|---|
| 598 | x_includes="."; dnl better than nothing :-
|
|---|
| 599 | else
|
|---|
| 600 | x_includes=$kde_x_includes
|
|---|
| 601 | X_INCLUDES="-I$x_includes"
|
|---|
| 602 | fi
|
|---|
| 603 |
|
|---|
| 604 | if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
|
|---|
| 605 | X_LDFLAGS=""
|
|---|
| 606 | x_libraries="/usr/lib"; dnl better than nothing :-
|
|---|
| 607 | else
|
|---|
| 608 | x_libraries=$kde_x_libraries
|
|---|
| 609 | X_LDFLAGS="-L$x_libraries"
|
|---|
| 610 | fi
|
|---|
| 611 | all_includes="$X_INCLUDES"
|
|---|
| 612 | all_libraries="$X_LDFLAGS"
|
|---|
| 613 |
|
|---|
| 614 | AC_SUBST(X_INCLUDES)
|
|---|
| 615 | AC_SUBST(X_LDFLAGS)
|
|---|
| 616 | AC_SUBST(x_libraries)
|
|---|
| 617 | AC_SUBST(x_includes)
|
|---|
| 618 |
|
|---|
| 619 | # Check for libraries that X11R6 Xt/Xaw programs need.
|
|---|
| 620 | ac_save_LDFLAGS="$LDFLAGS"
|
|---|
| 621 | LDFLAGS="$LDFLAGS $X_LDFLAGS"
|
|---|
| 622 | # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
|
|---|
| 623 | # check for ICE first), but we must link in the order -lSM -lICE or
|
|---|
| 624 | # we get undefined symbols. So assume we have SM if we have ICE.
|
|---|
| 625 | # These have to be linked with before -lX11, unlike the other
|
|---|
| 626 | # libraries we check for below, so use a different variable.
|
|---|
| 627 | # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
|
|---|
| 628 | AC_CHECK_LIB(ICE, IceConnectionNumber,
|
|---|
| 629 | [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
|
|---|
| 630 | AC_SUBST(LIBSM)
|
|---|
| 631 | LDFLAGS="$ac_save_LDFLAGS"
|
|---|
| 632 |
|
|---|
| 633 | AC_SUBST(X_PRE_LIBS)
|
|---|
| 634 |
|
|---|
| 635 | LIB_X11='-lX11 $(LIBSOCKET)'
|
|---|
| 636 | AC_SUBST(LIB_X11)
|
|---|
| 637 |
|
|---|
| 638 | AC_MSG_CHECKING(for libXext)
|
|---|
| 639 | AC_CACHE_VAL(kde_cv_have_libXext,
|
|---|
| 640 | [
|
|---|
| 641 | kde_ldflags_safe="$LDFLAGS"
|
|---|
| 642 | kde_libs_safe="$LIBS"
|
|---|
| 643 |
|
|---|
| 644 | LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
|
|---|
| 645 | LIBS="-lXext -lX11 $LIBSOCKET"
|
|---|
| 646 |
|
|---|
| 647 | AC_TRY_LINK([
|
|---|
| 648 | #include <stdio.h>
|
|---|
| 649 | ],
|
|---|
| 650 | [
|
|---|
| 651 | printf("hello Xext\n");
|
|---|
| 652 | ],
|
|---|
| 653 | kde_cv_have_libXext=yes,
|
|---|
| 654 | kde_cv_have_libXext=no
|
|---|
| 655 | )
|
|---|
| 656 |
|
|---|
| 657 | LDFLAGS=$kde_ldflags_safe
|
|---|
| 658 | LIBS=$kde_libs_safe
|
|---|
| 659 | ])
|
|---|
| 660 |
|
|---|
| 661 | AC_MSG_RESULT($kde_cv_have_libXext)
|
|---|
| 662 |
|
|---|
| 663 | if test "$kde_cv_have_libXext" = "no"; then
|
|---|
| 664 | AC_MSG_ERROR([We need a working libXext to proceed. Since configure
|
|---|
| 665 | can't find it itself, we stop here assuming that make wouldn't find
|
|---|
| 666 | them either.])
|
|---|
| 667 | fi
|
|---|
| 668 |
|
|---|
| 669 | ])
|
|---|
| 670 |
|
|---|
| 671 | AC_LANG_RESTORE
|
|---|
| 672 | ])
|
|---|
| 673 |
|
|---|
| 674 | AC_DEFUN(KDE_PRINT_QT_PROGRAM,
|
|---|
| 675 | [
|
|---|
| 676 | AC_REQUIRE([KDE_USE_QT])
|
|---|
| 677 | cat > conftest.$ac_ext <<EOF
|
|---|
| 678 | #include "confdefs.h"
|
|---|
| 679 | #include <qglobal.h>
|
|---|
| 680 | #include <qapplication.h>
|
|---|
| 681 | #include <qapp.h>
|
|---|
| 682 | #include <qobjcoll.h>
|
|---|
| 683 | EOF
|
|---|
| 684 | if test "$kde_qtver" = "2"; then
|
|---|
| 685 | cat >> conftest.$ac_ext <<EOF
|
|---|
| 686 | #include <qevent.h>
|
|---|
| 687 | #include <qstring.h>
|
|---|
| 688 | #include <qstyle.h>
|
|---|
| 689 | EOF
|
|---|
| 690 |
|
|---|
| 691 | if test $kde_qtsubver -gt 0; then
|
|---|
| 692 | cat >> conftest.$ac_ext <<EOF
|
|---|
| 693 | #include <qiconview.h>
|
|---|
| 694 | EOF
|
|---|
| 695 | fi
|
|---|
| 696 |
|
|---|
| 697 | fi
|
|---|
| 698 |
|
|---|
| 699 | echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
|
|---|
| 700 | cat >> conftest.$ac_ext <<EOF
|
|---|
| 701 | #error 1
|
|---|
| 702 | #endif
|
|---|
| 703 |
|
|---|
| 704 | int main() {
|
|---|
| 705 | EOF
|
|---|
| 706 | if test "$kde_qtver" = "2"; then
|
|---|
| 707 | cat >> conftest.$ac_ext <<EOF
|
|---|
| 708 | QStringList *t = new QStringList();
|
|---|
| 709 | EOF
|
|---|
| 710 | if test $kde_qtsubver -gt 0; then
|
|---|
| 711 | cat >> conftest.$ac_ext <<EOF
|
|---|
| 712 | QIconView iv(0);
|
|---|
| 713 | iv.setWordWrapIconText(false);
|
|---|
| 714 | QString s;
|
|---|
| 715 | s.setLatin1("Elvis is alive", 14);
|
|---|
| 716 | int magnolia = QEvent::Speech; /* new in 2.2 beta2 */
|
|---|
| 717 | EOF
|
|---|
| 718 | fi
|
|---|
| 719 | fi
|
|---|
| 720 | cat >> conftest.$ac_ext <<EOF
|
|---|
| 721 | return 0;
|
|---|
| 722 | }
|
|---|
| 723 | EOF
|
|---|
| 724 | ])
|
|---|
| 725 |
|
|---|
| 726 | AC_DEFUN(KDE_USE_QT,
|
|---|
| 727 | [
|
|---|
| 728 |
|
|---|
| 729 | if test -z "$1"; then
|
|---|
| 730 | kde_qtver=2
|
|---|
| 731 | kde_qtsubver=1
|
|---|
| 732 | else
|
|---|
| 733 | kde_qtsubver=`echo "$1" | sed -e 's#[0-9]\+\.\([0-9]\+\).*#\1#'`
|
|---|
| 734 | # following is the check if subversion isn´t found in passed argument
|
|---|
| 735 | if test "$kde_qtsubver" = "$1"; then
|
|---|
| 736 | kde_qtsubver=1
|
|---|
| 737 | fi
|
|---|
| 738 | kde_qtver=`echo "$1" | sed -e 's#^\([0-9]\+\)\..*#\1#'`
|
|---|
| 739 | if test "$kde_qtver" = "1"; then
|
|---|
| 740 | kde_qtsubver=42
|
|---|
| 741 | else
|
|---|
| 742 | # this is the version number fallback to 2.1, unless major version is 1 or 2
|
|---|
| 743 | if test "$kde_qtver" != "2"; then
|
|---|
| 744 | kde_qtver=2
|
|---|
| 745 | kde_qtsubver=1
|
|---|
| 746 | fi
|
|---|
| 747 | fi
|
|---|
| 748 | fi
|
|---|
| 749 |
|
|---|
| 750 | if test -z "$2"; then
|
|---|
| 751 | if test $kde_qtver = 2; then
|
|---|
| 752 | if test $kde_qtsubver -gt 0; then
|
|---|
| 753 | kde_qt_minversion=">= Qt 2.2.2"
|
|---|
| 754 | else
|
|---|
| 755 | kde_qt_minversion=">= Qt 2.0.2"
|
|---|
| 756 | fi
|
|---|
| 757 | else
|
|---|
| 758 | kde_qt_minversion=">= 1.42 and < 2.0"
|
|---|
| 759 | fi
|
|---|
| 760 | else
|
|---|
| 761 | kde_qt_minversion=$2
|
|---|
| 762 | fi
|
|---|
| 763 |
|
|---|
| 764 | if test -z "$3"; then
|
|---|
| 765 | if test $kde_qtver = 2; then
|
|---|
| 766 | if test $kde_qtsubver -gt 0; then
|
|---|
| 767 | kde_qt_verstring="QT_VERSION >= 222"
|
|---|
| 768 | else
|
|---|
| 769 | kde_qt_verstring="QT_VERSION >= 200"
|
|---|
| 770 | fi
|
|---|
| 771 | else
|
|---|
| 772 | kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
|
|---|
| 773 | fi
|
|---|
| 774 | else
|
|---|
| 775 | kde_qt_verstring=$3
|
|---|
| 776 | fi
|
|---|
| 777 |
|
|---|
| 778 | if test $kde_qtver = 2; then
|
|---|
| 779 | kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
|
|---|
| 780 | else
|
|---|
| 781 | kde_qt_dirs="$QTDIR /usr/lib/qt"
|
|---|
| 782 | fi
|
|---|
| 783 | ])
|
|---|
| 784 |
|
|---|
| 785 | AC_DEFUN(KDE_CHECK_QT_DIRECT,
|
|---|
| 786 | [
|
|---|
| 787 | AC_REQUIRE([KDE_USE_QT])
|
|---|
| 788 | AC_MSG_CHECKING([if Qt compiles without flags])
|
|---|
| 789 | AC_CACHE_VAL(kde_cv_qt_direct,
|
|---|
| 790 | [
|
|---|
| 791 | AC_LANG_SAVE
|
|---|
| 792 | AC_LANG_CPLUSPLUS
|
|---|
| 793 | ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
|
|---|
| 794 | ac_LIBRARY_PATH="$LIBRARY_PATH"
|
|---|
| 795 | ac_cxxflags_safe="$CXXFLAGS"
|
|---|
| 796 | ac_ldflags_safe="$LDFLAGS"
|
|---|
| 797 | ac_libs_safe="$LIBS"
|
|---|
| 798 |
|
|---|
| 799 | CXXFLAGS="$CXXFLAGS -I$qt_includes"
|
|---|
| 800 | LDFLAGS="$LDFLAGS $X_LDFLAGS"
|
|---|
| 801 | LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
|
|---|
| 802 | LD_LIBRARY_PATH=
|
|---|
| 803 | export LD_LIBRARY_PATH
|
|---|
| 804 | LIBRARY_PATH=
|
|---|
| 805 | export LIBRARY_PATH
|
|---|
| 806 |
|
|---|
| 807 | KDE_PRINT_QT_PROGRAM
|
|---|
| 808 |
|
|---|
| 809 | if AC_TRY_EVAL(ac_link) && test -s conftest; then
|
|---|
| 810 | kde_cv_qt_direct="yes"
|
|---|
| 811 | else
|
|---|
| 812 | kde_cv_qt_direct="no"
|
|---|
| 813 | echo "configure: failed program was:" >&AC_FD_CC
|
|---|
| 814 | cat conftest.$ac_ext >&AC_FD_CC
|
|---|
| 815 | fi
|
|---|
| 816 |
|
|---|
| 817 | rm -f conftest*
|
|---|
| 818 | CXXFLAGS="$ac_cxxflags_safe"
|
|---|
| 819 | LDFLAGS="$ac_ldflags_safe"
|
|---|
| 820 | LIBS="$ac_libs_safe"
|
|---|
| 821 |
|
|---|
| 822 | LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
|
|---|
| 823 | export LD_LIBRARY_PATH
|
|---|
| 824 | LIBRARY_PATH="$ac_LIBRARY_PATH"
|
|---|
| 825 | export LIBRARY_PATH
|
|---|
| 826 | AC_LANG_RESTORE
|
|---|
| 827 | ])
|
|---|
| 828 |
|
|---|
| 829 | if test "$kde_cv_qt_direct" = "yes"; then
|
|---|
| 830 | AC_MSG_RESULT(yes)
|
|---|
| 831 | $1
|
|---|
| 832 | else
|
|---|
| 833 | AC_MSG_RESULT(no)
|
|---|
| 834 | $2
|
|---|
| 835 | fi
|
|---|
| 836 | ])
|
|---|
| 837 |
|
|---|
| 838 | dnl ------------------------------------------------------------------------
|
|---|
| 839 | dnl Try to find the Qt headers and libraries.
|
|---|
| 840 | dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
|
|---|
| 841 | dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
|
|---|
| 842 | dnl ------------------------------------------------------------------------
|
|---|
| 843 | dnl
|
|---|
| 844 | AC_DEFUN(AC_PATH_QT_1_3,
|
|---|
| 845 | [
|
|---|
| 846 | AC_REQUIRE([K_PATH_X])
|
|---|
| 847 | AC_REQUIRE([KDE_USE_QT])
|
|---|
| 848 |
|
|---|
| 849 | dnl ------------------------------------------------------------------------
|
|---|
| 850 | dnl Add configure flag to enable linking to MT version of Qt library.
|
|---|
| 851 | dnl ------------------------------------------------------------------------
|
|---|
| 852 |
|
|---|
| 853 | AC_ARG_ENABLE(
|
|---|
| 854 | mt,
|
|---|
| 855 | [ --enable-mt link to threaded Qt (experimental)],
|
|---|
| 856 | kde_use_qt_mt=$enableval,
|
|---|
| 857 | kde_use_qt_mt=no
|
|---|
| 858 | )
|
|---|
| 859 |
|
|---|
| 860 | USING_QT_MT=""
|
|---|
| 861 |
|
|---|
| 862 | dnl ------------------------------------------------------------------------
|
|---|
| 863 | dnl If we got --enable-qt-mt then adjust some vars for the host.
|
|---|
| 864 | dnl ------------------------------------------------------------------------
|
|---|
| 865 |
|
|---|
| 866 | if test "x$kde_use_qt_mt" = "xyes"; then
|
|---|
| 867 |
|
|---|
| 868 | case $host in
|
|---|
| 869 | *-*-linux-*)
|
|---|
| 870 | if test "x$GCC" = "xyes"; then
|
|---|
| 871 | CPPFLAGS="$CPPFLAGS -DQT_THREAD_SUPPORT -pthread"
|
|---|
| 872 | X_EXTRA_LIBS="$X_EXTRA_LIBS -pthread"
|
|---|
| 873 | else
|
|---|
| 874 | AC_MSG_WARN([Compiler is not gcc. MT support disabled.])
|
|---|
| 875 | fi
|
|---|
| 876 | ;;
|
|---|
| 877 | *)
|
|---|
| 878 | AC_MSG_WARN([MT not yet supported on $host - disabled.])
|
|---|
| 879 | ;;
|
|---|
| 880 | esac
|
|---|
| 881 |
|
|---|
| 882 | fi
|
|---|
| 883 |
|
|---|
| 884 | kde_qt_was_given=yes
|
|---|
| 885 |
|
|---|
| 886 | dnl ------------------------------------------------------------------------
|
|---|
| 887 | dnl If we haven't been told how to link to Qt, we work it out for ourselves.
|
|---|
| 888 | dnl ------------------------------------------------------------------------
|
|---|
| 889 |
|
|---|
| 890 | if test -z "$LIBQT_GLOB"; then
|
|---|
| 891 |
|
|---|
| 892 | LIBQT_GLOB="libqt.*"
|
|---|
| 893 |
|
|---|
| 894 | fi
|
|---|
| 895 |
|
|---|
| 896 | if test -z "$LIBQT"; then
|
|---|
| 897 |
|
|---|
| 898 | LIBQT="-lqt"
|
|---|
| 899 | kde_int_qt="-lqt"
|
|---|
| 900 |
|
|---|
| 901 | dnl ------------------------------------------------------------------------
|
|---|
| 902 | dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
|
|---|
| 903 | dnl ------------------------------------------------------------------------
|
|---|
| 904 |
|
|---|
| 905 | if test "x$kde_use_qt_mt" = "xyes"; then
|
|---|
| 906 |
|
|---|
| 907 | case $host in
|
|---|
| 908 | *-*-linux-*)
|
|---|
| 909 | if test "x$GCC" = "xyes"; then
|
|---|
| 910 | LIBQT="-lqt-mt"
|
|---|
| 911 | kde_int_qt="-lqt-mt"
|
|---|
| 912 | LIBQT_GLOB="libqt-mt.*"
|
|---|
| 913 | USING_QT_MT="using -mt"
|
|---|
| 914 | fi
|
|---|
| 915 | ;;
|
|---|
| 916 | esac
|
|---|
| 917 | fi
|
|---|
| 918 |
|
|---|
| 919 | kde_qt_was_given=no
|
|---|
| 920 |
|
|---|
| 921 | else
|
|---|
| 922 | kde_int_qt="$LIBQT"
|
|---|
| 923 | fi
|
|---|
| 924 |
|
|---|
| 925 | if test $kde_qtver = 2; then
|
|---|
| 926 |
|
|---|
| 927 | AC_REQUIRE([AC_FIND_PNG])
|
|---|
| 928 | AC_REQUIRE([AC_FIND_JPEG])
|
|---|
| 929 | LIBQT="$LIBQT $LIBPNG $LIBJPEG"
|
|---|
| 930 | fi
|
|---|
| 931 |
|
|---|
| 932 | AC_MSG_CHECKING([for Qt])
|
|---|
| 933 |
|
|---|
| 934 | LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
|
|---|
| 935 | ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
|
|---|
| 936 | qt_libraries=""
|
|---|
| 937 | qt_includes=""
|
|---|
| 938 | AC_ARG_WITH(qt-dir,
|
|---|
| 939 | [ --with-qt-dir=DIR where the root of Qt is installed ],
|
|---|
| 940 | [ ac_qt_includes="$withval"/include
|
|---|
| 941 | ac_qt_libraries="$withval"/lib
|
|---|
| 942 | ac_qt_bindir="$withval"/bin
|
|---|
| 943 | ])
|
|---|
| 944 |
|
|---|
| 945 | AC_ARG_WITH(qt-includes,
|
|---|
| 946 | [ --with-qt-includes=DIR where the Qt includes are. ],
|
|---|
| 947 | [
|
|---|
| 948 | ac_qt_includes="$withval"
|
|---|
| 949 | ])
|
|---|
| 950 |
|
|---|
| 951 | kde_qt_libs_given=no
|
|---|
| 952 |
|
|---|
| 953 | AC_ARG_WITH(qt-libraries,
|
|---|
| 954 | [ --with-qt-libraries=DIR where the Qt library is installed.],
|
|---|
| 955 | [ ac_qt_libraries="$withval"
|
|---|
| 956 | kde_qt_libs_given=yes
|
|---|
| 957 | ])
|
|---|
| 958 |
|
|---|
| 959 | AC_CACHE_VAL(ac_cv_have_qt,
|
|---|
| 960 | [#try to guess Qt locations
|
|---|
| 961 |
|
|---|
| 962 | qt_incdirs=""
|
|---|
| 963 | for dir in $kde_qt_dirs; do
|
|---|
| 964 | qt_incdirs="$qt_incdirs $dir/include $dir"
|
|---|
| 965 | done
|
|---|
| 966 | qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt $x_includes"
|
|---|
| 967 | if test ! "$ac_qt_includes" = "NO"; then
|
|---|
| 968 | qt_incdirs="$ac_qt_includes $qt_incdirs"
|
|---|
| 969 | fi
|
|---|
| 970 |
|
|---|
| 971 | if test "$kde_qtver" = "2"; then
|
|---|
| 972 | kde_qt_header=qstyle.h
|
|---|
| 973 | else
|
|---|
| 974 | kde_qt_header=qglobal.h
|
|---|
| 975 | fi
|
|---|
| 976 |
|
|---|
| 977 | AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
|
|---|
| 978 | ac_qt_includes="$qt_incdir"
|
|---|
| 979 |
|
|---|
| 980 | qt_libdirs=""
|
|---|
| 981 | for dir in $kde_qt_dirs; do
|
|---|
| 982 | qt_libdirs="$qt_libdirs $dir/lib $dir"
|
|---|
| 983 | done
|
|---|
| 984 | qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
|
|---|
| 985 | if test ! "$ac_qt_libraries" = "NO"; then
|
|---|
| 986 | qt_libdir=$ac_qt_libraries
|
|---|
| 987 | else
|
|---|
| 988 | qt_libdirs="$ac_qt_libraries $qt_libdirs"
|
|---|
| 989 | # if the Qt was given, the chance is too big that libqt.* doesn't exist
|
|---|
| 990 | qt_libdir=NONE
|
|---|
| 991 | for dir in $qt_libdirs; do
|
|---|
| 992 | try="ls -1 $dir/${LIBQT_GLOB}"
|
|---|
| 993 | if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
|
|---|
| 994 | done
|
|---|
| 995 | fi
|
|---|
| 996 |
|
|---|
| 997 | ac_qt_libraries="$qt_libdir"
|
|---|
| 998 |
|
|---|
| 999 | AC_LANG_SAVE
|
|---|
| 1000 | AC_LANG_CPLUSPLUS
|
|---|
| 1001 |
|
|---|
| 1002 | ac_cxxflags_safe="$CXXFLAGS"
|
|---|
| 1003 | ac_ldflags_safe="$LDFLAGS"
|
|---|
| 1004 | ac_libs_safe="$LIBS"
|
|---|
| 1005 |
|
|---|
| 1006 | CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
|
|---|
| 1007 | LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS"
|
|---|
| 1008 | LIBS="$LIBS $LIBQT"
|
|---|
| 1009 |
|
|---|
| 1010 | KDE_PRINT_QT_PROGRAM
|
|---|
| 1011 |
|
|---|
| 1012 | if AC_TRY_EVAL(ac_link) && test -s conftest; then
|
|---|
| 1013 | rm -f conftest*
|
|---|
| 1014 | else
|
|---|
| 1015 | echo "configure: failed program was:" >&AC_FD_CC
|
|---|
| 1016 | cat conftest.$ac_ext >&AC_FD_CC
|
|---|
| 1017 | ac_qt_libraries="NO"
|
|---|
| 1018 | fi
|
|---|
| 1019 | rm -f conftest*
|
|---|
| 1020 | CXXFLAGS="$ac_cxxflags_safe"
|
|---|
| 1021 | LDFLAGS="$ac_ldflags_safe"
|
|---|
| 1022 | LIBS="$ac_libs_safe"
|
|---|
| 1023 |
|
|---|
| 1024 | AC_LANG_RESTORE
|
|---|
| 1025 | if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
|
|---|
| 1026 | ac_cv_have_qt="have_qt=no"
|
|---|
| 1027 | ac_qt_notfound=""
|
|---|
| 1028 | if test "$ac_qt_includes" = NO; then
|
|---|
| 1029 | if test "$ac_qt_libraries" = NO; then
|
|---|
| 1030 | ac_qt_notfound="(headers and libraries)";
|
|---|
| 1031 | else
|
|---|
| 1032 | ac_qt_notfound="(headers)";
|
|---|
| 1033 | fi
|
|---|
| 1034 | else
|
|---|
| 1035 | ac_qt_notfound="(libraries)";
|
|---|
| 1036 | fi
|
|---|
| 1037 |
|
|---|
| 1038 | AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
|
|---|
| 1039 | For more details about this problem, look at the end of config.log.])
|
|---|
| 1040 | else
|
|---|
| 1041 | have_qt="yes"
|
|---|
| 1042 | fi
|
|---|
| 1043 | ])
|
|---|
| 1044 |
|
|---|
| 1045 | eval "$ac_cv_have_qt"
|
|---|
| 1046 |
|
|---|
| 1047 | if test "$have_qt" != yes; then
|
|---|
| 1048 | AC_MSG_RESULT([$have_qt]);
|
|---|
| 1049 | else
|
|---|
| 1050 | ac_cv_have_qt="have_qt=yes \
|
|---|
| 1051 | ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
|
|---|
| 1052 | AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
|
|---|
| 1053 |
|
|---|
| 1054 | qt_libraries="$ac_qt_libraries"
|
|---|
| 1055 | qt_includes="$ac_qt_includes"
|
|---|
| 1056 | fi
|
|---|
| 1057 |
|
|---|
| 1058 | if test ! "$kde_qt_libs_given" = "yes"; then
|
|---|
| 1059 | KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
|
|---|
| 1060 | fi
|
|---|
| 1061 |
|
|---|
| 1062 | AC_SUBST(qt_libraries)
|
|---|
| 1063 | AC_SUBST(qt_includes)
|
|---|
| 1064 |
|
|---|
| 1065 | if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
|
|---|
| 1066 | QT_INCLUDES="";
|
|---|
| 1067 | else
|
|---|
| 1068 | QT_INCLUDES="-I$qt_includes"
|
|---|
| 1069 | all_includes="$QT_INCLUDES $all_includes"
|
|---|
| 1070 | fi
|
|---|
| 1071 |
|
|---|
| 1072 | if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
|
|---|
| 1073 | QT_LDFLAGS=""
|
|---|
| 1074 | else
|
|---|
| 1075 | QT_LDFLAGS="-L$qt_libraries"
|
|---|
| 1076 | all_libraries="$all_libraries $QT_LDFLAGS"
|
|---|
| 1077 | fi
|
|---|
| 1078 |
|
|---|
| 1079 | AC_SUBST(QT_INCLUDES)
|
|---|
| 1080 | AC_SUBST(QT_LDFLAGS)
|
|---|
| 1081 | AC_PATH_QT_MOC_UIC
|
|---|
| 1082 |
|
|---|
| 1083 | LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG) -lXext $(LIB_X11) $(LIBSM)'
|
|---|
| 1084 | AC_SUBST(LIB_QT)
|
|---|
| 1085 |
|
|---|
| 1086 | ])
|
|---|
| 1087 |
|
|---|
| 1088 | AC_DEFUN(AC_PATH_QT,
|
|---|
| 1089 | [
|
|---|
| 1090 | AC_PATH_QT_1_3
|
|---|
| 1091 | ])
|
|---|
| 1092 |
|
|---|
| 1093 | AC_DEFUN(KDE_CHECK_FINAL,
|
|---|
| 1094 | [
|
|---|
| 1095 | AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (experimental - needs lots of memory)],
|
|---|
| 1096 | kde_use_final=$enableval, kde_use_final=no)
|
|---|
| 1097 |
|
|---|
| 1098 | KDE_COMPILER_REPO
|
|---|
| 1099 | if test "x$kde_use_final" = "xyes"; then
|
|---|
| 1100 | KDE_USE_FINAL_TRUE=""
|
|---|
| 1101 | KDE_USE_FINAL_FALSE="#"
|
|---|
| 1102 | else
|
|---|
| 1103 | KDE_USE_FINAL_TRUE="#"
|
|---|
| 1104 | KDE_USE_FINAL_FALSE=""
|
|---|
| 1105 | fi
|
|---|
| 1106 | AC_SUBST(KDE_USE_FINAL_TRUE)
|
|---|
| 1107 | AC_SUBST(KDE_USE_FINAL_FALSE)
|
|---|
| 1108 |
|
|---|
| 1109 | AC_ARG_ENABLE(closure, [ --disable-closure don't delay template instantiation],
|
|---|
| 1110 | kde_use_closure=$enableval, kde_use_closure=yes)
|
|---|
| 1111 |
|
|---|
| 1112 | if test "x$kde_use_closure" = "xyes"; then
|
|---|
| 1113 | KDE_USE_CLOSURE_TRUE=""
|
|---|
| 1114 | KDE_USE_CLOSURE_FALSE="#"
|
|---|
| 1115 | # CXXFLAGS="$CXXFLAGS $REPO"
|
|---|
| 1116 | else
|
|---|
| 1117 | KDE_USE_CLOSURE_TRUE="#"
|
|---|
| 1118 | KDE_USE_CLOSURE_FALSE=""
|
|---|
| 1119 | fi
|
|---|
| 1120 | AC_SUBST(KDE_USE_CLOSURE_TRUE)
|
|---|
| 1121 | AC_SUBST(KDE_USE_CLOSURE_FALSE)
|
|---|
| 1122 | ])
|
|---|
| 1123 |
|
|---|
| 1124 | dnl ------------------------------------------------------------------------
|
|---|
| 1125 | dnl Now, the same with KDE
|
|---|
| 1126 | dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
|
|---|
| 1127 | dnl and $(kde_includes) will be the kdehdrlocation (if needed)
|
|---|
| 1128 | dnl ------------------------------------------------------------------------
|
|---|
| 1129 | dnl
|
|---|
| 1130 | AC_DEFUN(AC_BASE_PATH_KDE,
|
|---|
| 1131 | [
|
|---|
| 1132 | AC_PREREQ([2.13])
|
|---|
| 1133 | AC_REQUIRE([AC_PATH_QT])dnl
|
|---|
| 1134 | AC_CHECK_RPATH
|
|---|
| 1135 | AC_MSG_CHECKING([for KDE])
|
|---|
| 1136 |
|
|---|
| 1137 | if test "${prefix}" != NONE; then
|
|---|
| 1138 | kde_includes=${prefix}/include
|
|---|
| 1139 | ac_kde_includes=$prefix/include
|
|---|
| 1140 |
|
|---|
| 1141 | if test "${exec_prefix}" != NONE; then
|
|---|
| 1142 | kde_libraries=${exec_prefix}/lib
|
|---|
| 1143 | ac_kde_libraries=$exec_prefix/lib
|
|---|
| 1144 | else
|
|---|
| 1145 | kde_libraries=${prefix}/lib
|
|---|
| 1146 | ac_kde_libraries=$prefix/lib
|
|---|
| 1147 | fi
|
|---|
| 1148 | else
|
|---|
| 1149 | ac_kde_includes=
|
|---|
| 1150 | ac_kde_libraries=
|
|---|
| 1151 | kde_libraries=""
|
|---|
| 1152 | kde_includes=""
|
|---|
| 1153 | fi
|
|---|
| 1154 |
|
|---|
| 1155 | AC_CACHE_VAL(ac_cv_have_kde,
|
|---|
| 1156 | [#try to guess kde locations
|
|---|
| 1157 |
|
|---|
| 1158 | if test "$kde_qtver" = 1; then
|
|---|
| 1159 | kde_check_header="ksock.h"
|
|---|
| 1160 | kde_check_lib="libkdecore.la"
|
|---|
| 1161 | else
|
|---|
| 1162 | kde_check_header="ksharedptr.h"
|
|---|
| 1163 | kde_check_lib="libkio.la"
|
|---|
| 1164 | fi
|
|---|
| 1165 |
|
|---|
| 1166 | if test -z "$1"; then
|
|---|
| 1167 |
|
|---|
| 1168 | kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/kde/include /usr/include/kde /usr/include /opt/kde2/include /opt/kde/include $x_includes $qt_includes"
|
|---|
| 1169 | test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
|
|---|
| 1170 | kde_incdirs="$ac_kde_includes $kde_incdirs"
|
|---|
| 1171 | AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
|
|---|
| 1172 | ac_kde_includes="$kde_incdir"
|
|---|
| 1173 |
|
|---|
| 1174 | if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
|
|---|
| 1175 | AC_MSG_ERROR([
|
|---|
| 1176 | in the prefix, you've chosen, are no KDE headers installed. This will fail.
|
|---|
| 1177 | So, check this please and use another prefix!])
|
|---|
| 1178 | fi
|
|---|
| 1179 |
|
|---|
| 1180 | kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib /usr/X11R6/lib /opt/kde2/lib /opt/kde/lib /usr/X11R6/kde/lib"
|
|---|
| 1181 | test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs"
|
|---|
| 1182 | kde_libdirs="$ac_kde_libraries $kde_libdirs"
|
|---|
| 1183 | AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
|
|---|
| 1184 | ac_kde_libraries="$kde_libdir"
|
|---|
| 1185 |
|
|---|
| 1186 | if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
|
|---|
| 1187 | AC_MSG_ERROR([
|
|---|
| 1188 | in the prefix, you've chosen, are no KDE libraries installed. This will fail.
|
|---|
| 1189 | So, check this please and use another prefix!])
|
|---|
| 1190 | fi
|
|---|
| 1191 | ac_kde_libraries="$kde_libdir"
|
|---|
| 1192 |
|
|---|
| 1193 | if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO; then
|
|---|
| 1194 | ac_cv_have_kde="have_kde=no"
|
|---|
| 1195 | else
|
|---|
| 1196 | ac_cv_have_kde="have_kde=yes \
|
|---|
| 1197 | ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
|
|---|
| 1198 | fi
|
|---|
| 1199 |
|
|---|
| 1200 | else dnl test -z $1
|
|---|
| 1201 |
|
|---|
| 1202 | ac_cv_have_kde="have_kde=no"
|
|---|
| 1203 |
|
|---|
| 1204 | fi
|
|---|
| 1205 | ])dnl
|
|---|
| 1206 |
|
|---|
| 1207 | eval "$ac_cv_have_kde"
|
|---|
| 1208 |
|
|---|
| 1209 | if test "$have_kde" != "yes"; then
|
|---|
| 1210 | if test "${prefix}" = NONE; then
|
|---|
| 1211 | ac_kde_prefix="$ac_default_prefix"
|
|---|
| 1212 | else
|
|---|
| 1213 | ac_kde_prefix="$prefix"
|
|---|
| 1214 | fi
|
|---|
| 1215 | if test "$exec_prefix" = NONE; then
|
|---|
| 1216 | ac_kde_exec_prefix="$ac_kde_prefix"
|
|---|
| 1217 | AC_MSG_RESULT([will be installed in $ac_kde_prefix])
|
|---|
| 1218 | else
|
|---|
| 1219 | ac_kde_exec_prefix="$exec_prefix"
|
|---|
| 1220 | AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
|
|---|
| 1221 | fi
|
|---|
| 1222 |
|
|---|
| 1223 | kde_libraries="${ac_kde_exec_prefix}/lib"
|
|---|
| 1224 | kde_includes=${ac_kde_prefix}/include
|
|---|
| 1225 |
|
|---|
| 1226 | else
|
|---|
| 1227 | ac_cv_have_kde="have_kde=yes \
|
|---|
| 1228 | ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
|
|---|
| 1229 | AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
|
|---|
| 1230 |
|
|---|
| 1231 | kde_libraries="$ac_kde_libraries"
|
|---|
| 1232 | kde_includes="$ac_kde_includes"
|
|---|
| 1233 | fi
|
|---|
| 1234 | AC_SUBST(kde_libraries)
|
|---|
| 1235 | AC_SUBST(kde_includes)
|
|---|
| 1236 |
|
|---|
| 1237 | if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" ; then
|
|---|
| 1238 | KDE_INCLUDES=""
|
|---|
| 1239 | else
|
|---|
| 1240 | KDE_INCLUDES="-I$kde_includes"
|
|---|
| 1241 | all_includes="$KDE_INCLUDES $all_includes"
|
|---|
| 1242 | fi
|
|---|
| 1243 |
|
|---|
| 1244 | KDE_LDFLAGS="-L$kde_libraries"
|
|---|
| 1245 | if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
|
|---|
| 1246 | all_libraries="$all_libraries $KDE_LDFLAGS"
|
|---|
| 1247 | fi
|
|---|
| 1248 |
|
|---|
| 1249 | AC_SUBST(KDE_LDFLAGS)
|
|---|
| 1250 | AC_SUBST(KDE_INCLUDES)
|
|---|
| 1251 |
|
|---|
| 1252 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
|
|---|
| 1253 |
|
|---|
| 1254 | all_libraries="$all_libraries $USER_LDFLAGS"
|
|---|
| 1255 | all_includes="$all_includes $USER_INCLUDES"
|
|---|
| 1256 | AC_SUBST(all_includes)
|
|---|
| 1257 | AC_SUBST(all_libraries)
|
|---|
| 1258 |
|
|---|
| 1259 | AC_SUBST(AUTODIRS)
|
|---|
| 1260 | ])
|
|---|
| 1261 |
|
|---|
| 1262 | AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
|
|---|
| 1263 | [
|
|---|
| 1264 | AC_MSG_CHECKING(for extra includes)
|
|---|
| 1265 | AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR
|
|---|
| 1266 | adds non standard include paths],
|
|---|
| 1267 | kde_use_extra_includes="$withval",
|
|---|
| 1268 | kde_use_extra_includes=NONE
|
|---|
| 1269 | )
|
|---|
| 1270 | kde_extra_includes=
|
|---|
| 1271 | if test -n "$kde_use_extra_includes" && \
|
|---|
| 1272 | test "$kde_use_extra_includes" != "NONE"; then
|
|---|
| 1273 |
|
|---|
| 1274 | ac_save_ifs=$IFS
|
|---|
| 1275 | IFS=':'
|
|---|
| 1276 | for dir in $kde_use_extra_includes; do
|
|---|
| 1277 | kde_extra_includes="$kde_extra_includes $dir"
|
|---|
| 1278 | USER_INCLUDES="$USER_INCLUDES -I$dir"
|
|---|
| 1279 | done
|
|---|
| 1280 | IFS=$ac_save_ifs
|
|---|
| 1281 | kde_use_extra_includes="added"
|
|---|
| 1282 | else
|
|---|
| 1283 | kde_use_extra_includes="no"
|
|---|
| 1284 | fi
|
|---|
| 1285 | AC_SUBST(USER_INCLUDES)
|
|---|
| 1286 |
|
|---|
| 1287 | AC_MSG_RESULT($kde_use_extra_includes)
|
|---|
| 1288 |
|
|---|
| 1289 | kde_extra_libs=
|
|---|
| 1290 | AC_MSG_CHECKING(for extra libs)
|
|---|
| 1291 | AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths],
|
|---|
| 1292 | kde_use_extra_libs=$withval,
|
|---|
| 1293 | kde_use_extra_libs=NONE
|
|---|
| 1294 | )
|
|---|
| 1295 | if test -n "$kde_use_extra_libs" && \
|
|---|
| 1296 | test "$kde_use_extra_libs" != "NONE"; then
|
|---|
| 1297 |
|
|---|
| 1298 | ac_save_ifs=$IFS
|
|---|
| 1299 | IFS=':'
|
|---|
| 1300 | for dir in $kde_use_extra_libs; do
|
|---|
| 1301 | kde_extra_libs="$kde_extra_libs $dir"
|
|---|
| 1302 | KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
|
|---|
| 1303 | USER_LDFLAGS="$USER_LDFLAGS -L$dir"
|
|---|
| 1304 | done
|
|---|
| 1305 | IFS=$ac_save_ifs
|
|---|
| 1306 | kde_use_extra_libs="added"
|
|---|
| 1307 | else
|
|---|
| 1308 | kde_use_extra_libs="no"
|
|---|
| 1309 | fi
|
|---|
| 1310 |
|
|---|
| 1311 | AC_SUBST(USER_LDFLAGS)
|
|---|
| 1312 |
|
|---|
| 1313 | AC_MSG_RESULT($kde_use_extra_libs)
|
|---|
| 1314 |
|
|---|
| 1315 | ])
|
|---|
| 1316 |
|
|---|
| 1317 | AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
|
|---|
| 1318 | [
|
|---|
| 1319 | AC_MSG_CHECKING([for KDE headers installed])
|
|---|
| 1320 | AC_LANG_SAVE
|
|---|
| 1321 | AC_LANG_CPLUSPLUS
|
|---|
| 1322 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1323 | #include <stdio.h>
|
|---|
| 1324 | #include "confdefs.h"
|
|---|
| 1325 | #include <kapp.h>
|
|---|
| 1326 |
|
|---|
| 1327 | int main() {
|
|---|
| 1328 | printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
|
|---|
| 1329 | printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
|
|---|
| 1330 | printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
|
|---|
| 1331 | printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
|
|---|
| 1332 | printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
|
|---|
| 1333 | printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
|
|---|
| 1334 | printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
|
|---|
| 1335 | printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
|
|---|
| 1336 | printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
|
|---|
| 1337 | printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
|
|---|
| 1338 | printf("kde_wallpaperdir=\\"%s\\"\n",
|
|---|
| 1339 | KApplication::kde_wallpaperdir().data());
|
|---|
| 1340 | printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
|
|---|
| 1341 | printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
|
|---|
| 1342 | printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
|
|---|
| 1343 | printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
|
|---|
| 1344 | printf("kde_moduledir=\\"/tmp/dummy\\"\n");
|
|---|
| 1345 | return 0;
|
|---|
| 1346 | }
|
|---|
| 1347 | EOF
|
|---|
| 1348 |
|
|---|
| 1349 | ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
|
|---|
| 1350 | if AC_TRY_EVAL(ac_compile); then
|
|---|
| 1351 | AC_MSG_RESULT(yes)
|
|---|
| 1352 | else
|
|---|
| 1353 | AC_MSG_ERROR([your system is not able to compile a small KDE application!
|
|---|
| 1354 | Check, if you installed the KDE header files correctly.
|
|---|
| 1355 | For more details about this problem, look at the end of config.log.])
|
|---|
| 1356 | fi
|
|---|
| 1357 |
|
|---|
| 1358 | AC_LANG_RESTORE
|
|---|
| 1359 | ])
|
|---|
| 1360 |
|
|---|
| 1361 | AC_DEFUN(KDE_CHECK_KDEQTADDON,
|
|---|
| 1362 | [
|
|---|
| 1363 | AC_MSG_CHECKING(for kde-qt-addon)
|
|---|
| 1364 | AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
|
|---|
| 1365 | [
|
|---|
| 1366 | kde_ldflags_safe="$LDFLAGS"
|
|---|
| 1367 | kde_libs_safe="$LIBS"
|
|---|
| 1368 | kde_cxxflags_safe="$CXXFLAGS"
|
|---|
| 1369 |
|
|---|
| 1370 | LIBS="-lkde-qt-addon $LIBQT $LIBS"
|
|---|
| 1371 | CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
|
|---|
| 1372 | LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
|
|---|
| 1373 |
|
|---|
| 1374 | AC_TRY_LINK([
|
|---|
| 1375 | #include <qdom.h>
|
|---|
| 1376 | ],
|
|---|
| 1377 | [
|
|---|
| 1378 | QDomDocument doc;
|
|---|
| 1379 | ],
|
|---|
| 1380 | kde_cv_have_kdeqtaddon=yes,
|
|---|
| 1381 | kde_cv_have_kdeqtaddon=no
|
|---|
| 1382 | )
|
|---|
| 1383 |
|
|---|
| 1384 | LDFLAGS=$kde_ldflags_safe
|
|---|
| 1385 | LIBS=$kde_libs_safe
|
|---|
| 1386 | kde_cxxflags_safe="$CXXFLAGS"
|
|---|
| 1387 | ])
|
|---|
| 1388 |
|
|---|
| 1389 | AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
|
|---|
| 1390 |
|
|---|
| 1391 | if test "$kde_cv_have_kdeqtaddon" = "no"; then
|
|---|
| 1392 | AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
|
|---|
| 1393 | It is a separate package (and CVS module) named kde-qt-addon.])
|
|---|
| 1394 | fi
|
|---|
| 1395 | ])
|
|---|
| 1396 |
|
|---|
| 1397 | AC_DEFUN(KDE_CHECK_KIMGIO,
|
|---|
| 1398 | [
|
|---|
| 1399 | AC_REQUIRE([AC_BASE_PATH_KDE])
|
|---|
| 1400 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
|
|---|
| 1401 | AC_REQUIRE([AC_FIND_TIFF])
|
|---|
| 1402 | AC_REQUIRE([AC_FIND_JPEG])
|
|---|
| 1403 | AC_REQUIRE([AC_FIND_PNG])
|
|---|
| 1404 | AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
|
|---|
| 1405 |
|
|---|
| 1406 | if test "$1" = "existance"; then
|
|---|
| 1407 | AC_LANG_SAVE
|
|---|
| 1408 | AC_LANG_CPLUSPLUS
|
|---|
| 1409 | kde_save_LIBS="$LIBS"
|
|---|
| 1410 | LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
|
|---|
| 1411 | AC_CHECK_LIB(kimgio, kimgioRegister, [
|
|---|
| 1412 | LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
|
|---|
| 1413 | LIBS="$kde_save_LIBS"
|
|---|
| 1414 | AC_LANG_RESTORE
|
|---|
| 1415 | else
|
|---|
| 1416 | LIBKIMGIO_EXISTS=yes
|
|---|
| 1417 | fi
|
|---|
| 1418 |
|
|---|
| 1419 | if test "$LIBKIMGIO_EXISTS" = "yes"; then
|
|---|
| 1420 | LIB_KIMGIO='-lkimgio'
|
|---|
| 1421 | else
|
|---|
| 1422 | LIB_KIMGIO=''
|
|---|
| 1423 | fi
|
|---|
| 1424 | AC_SUBST(LIB_KIMGIO)
|
|---|
| 1425 | ])
|
|---|
| 1426 |
|
|---|
| 1427 | AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
|
|---|
| 1428 | [
|
|---|
| 1429 | AC_REQUIRE([KDE_MISC_TESTS])
|
|---|
| 1430 | AC_REQUIRE([KDE_CHECK_LIBDL])
|
|---|
| 1431 | AC_REQUIRE([K_PATH_X])
|
|---|
| 1432 |
|
|---|
| 1433 | if test $kde_qtver = 2; then
|
|---|
| 1434 | LIB_KDECORE='-lkdecore'
|
|---|
| 1435 | AC_SUBST(LIB_KDECORE)
|
|---|
| 1436 | LIB_KDEUI='-lkdeui'
|
|---|
| 1437 | AC_SUBST(LIB_KDEUI)
|
|---|
| 1438 | LIB_KFORMULA='-lkformula'
|
|---|
| 1439 | AC_SUBST(LIB_KFORMULA)
|
|---|
| 1440 | LIB_KIO='-lkio'
|
|---|
| 1441 | AC_SUBST(LIB_KIO)
|
|---|
| 1442 | LIB_KSYCOCA='-lksycoca'
|
|---|
| 1443 | AC_SUBST(LIB_KSYCOCA)
|
|---|
| 1444 | LIB_SMB='-lsmb'
|
|---|
| 1445 | AC_SUBST(LIB_SMB)
|
|---|
| 1446 | LIB_KFILE='-lkfile'
|
|---|
| 1447 | AC_SUBST(LIB_KFILE)
|
|---|
| 1448 | LIB_KAB='-lkab'
|
|---|
| 1449 | AC_SUBST(LIB_KAB)
|
|---|
| 1450 | LIB_KHTML='-lkhtml'
|
|---|
| 1451 | AC_SUBST(LIB_KHTML)
|
|---|
| 1452 | LIB_KSPELL='-lkspell'
|
|---|
| 1453 | AC_SUBST(LIB_KSPELL)
|
|---|
| 1454 | LIB_KPARTS='-lkparts'
|
|---|
| 1455 | AC_SUBST(LIB_KPARTS)
|
|---|
| 1456 | LIB_KWRITE='-lkwrite'
|
|---|
| 1457 | AC_SUBST(LIB_KWRITE)
|
|---|
| 1458 | else
|
|---|
| 1459 | LIB_KDECORE='-lkdecore -lXext $(LIB_QT)'
|
|---|
| 1460 | AC_SUBST(LIB_KDECORE)
|
|---|
| 1461 | LIB_KDEUI='-lkdeui $(LIB_KDECORE)'
|
|---|
| 1462 | AC_SUBST(LIB_KDEUI)
|
|---|
| 1463 | LIB_KFM='-lkfm $(LIB_KDECORE)'
|
|---|
| 1464 | AC_SUBST(LIB_KFM)
|
|---|
| 1465 | LIB_KFILE='-lkfile $(LIB_KFM) $(LIB_KDEUI)'
|
|---|
| 1466 | AC_SUBST(LIB_KFILE)
|
|---|
| 1467 | LIB_KAB='-lkab $(LIB_KIMGIO) $(LIB_KDECORE)'
|
|---|
| 1468 | AC_SUBST(LIB_KAB)
|
|---|
| 1469 | fi
|
|---|
| 1470 | ])
|
|---|
| 1471 |
|
|---|
| 1472 | AC_DEFUN(AC_PATH_KDE,
|
|---|
| 1473 | [
|
|---|
| 1474 | AC_BASE_PATH_KDE
|
|---|
| 1475 | AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install],
|
|---|
| 1476 | [
|
|---|
| 1477 | if test "$enableval" = "no";
|
|---|
| 1478 | then ac_use_path_checking="default"
|
|---|
| 1479 | else ac_use_path_checking=""
|
|---|
| 1480 | fi
|
|---|
| 1481 | ],
|
|---|
| 1482 | [
|
|---|
| 1483 | if test "$kde_qtver" = 1;
|
|---|
| 1484 | then ac_use_path_checking=""
|
|---|
| 1485 | else ac_use_path_checking="default"
|
|---|
| 1486 | fi
|
|---|
| 1487 | ]
|
|---|
| 1488 | )
|
|---|
| 1489 |
|
|---|
| 1490 | AC_CREATE_KFSSTND($ac_use_path_checking)
|
|---|
| 1491 |
|
|---|
| 1492 | AC_SUBST_KFSSTND
|
|---|
| 1493 | KDE_CREATE_LIBS_ALIASES
|
|---|
| 1494 | ])
|
|---|
| 1495 |
|
|---|
| 1496 | dnl obsolete
|
|---|
| 1497 | AC_DEFUN(AC_CHECK_SETENV,
|
|---|
| 1498 | [
|
|---|
| 1499 | AC_OBSOLETE([$0], [; instead use AC_CHECK_FUNCS([setenv unsetenv])])dnl
|
|---|
| 1500 | AC_CHECK_FUNCS([setenv unsetenv])
|
|---|
| 1501 | ])
|
|---|
| 1502 |
|
|---|
| 1503 | AC_DEFUN(AC_CHECK_GETDOMAINNAME,
|
|---|
| 1504 | [
|
|---|
| 1505 | AC_MSG_CHECKING(for getdomainname)
|
|---|
| 1506 | AC_CACHE_VAL(ac_cv_func_getdomainname,
|
|---|
| 1507 | [
|
|---|
| 1508 | AC_LANG_SAVE
|
|---|
| 1509 | AC_LANG_CPLUSPLUS
|
|---|
| 1510 | save_CXXFLAGS="$CXXFLAGS"
|
|---|
| 1511 | kde_safe_LIBS="$LIBS"
|
|---|
| 1512 | LIBS="$LIBS $X_EXTRA_LIBS"
|
|---|
| 1513 | if test "$GCC" = "yes"; then
|
|---|
| 1514 | CXXFLAGS="$CXXFLAGS -pedantic-errors"
|
|---|
| 1515 | fi
|
|---|
| 1516 | AC_TRY_COMPILE([
|
|---|
| 1517 | #include <stdlib.h>
|
|---|
| 1518 | #include <unistd.h>
|
|---|
| 1519 | ],
|
|---|
| 1520 | [
|
|---|
| 1521 | char buffer[200];
|
|---|
| 1522 | getdomainname(buffer, 200);
|
|---|
| 1523 | ],
|
|---|
| 1524 | ac_cv_func_getdomainname=yes,
|
|---|
| 1525 | ac_cv_func_getdomainname=no)
|
|---|
| 1526 | CXXFLAGS="$save_CXXFLAGS"
|
|---|
| 1527 | LIBS=$kde_safe_LIBS
|
|---|
| 1528 | AC_LANG_RESTORE
|
|---|
| 1529 | ])
|
|---|
| 1530 | AC_MSG_RESULT($ac_cv_func_getdomainname)
|
|---|
| 1531 |
|
|---|
| 1532 | AC_MSG_CHECKING([if getdomainname needs custom prototype])
|
|---|
| 1533 | AC_CACHE_VAL(ac_cv_proto_getdomainname,
|
|---|
| 1534 | [
|
|---|
| 1535 | AC_LANG_SAVE
|
|---|
| 1536 | AC_LANG_CPLUSPLUS
|
|---|
| 1537 | if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
|
|---|
| 1538 | ac_cv_proto_getdomainname=no
|
|---|
| 1539 | else
|
|---|
| 1540 | kde_safe_libs=$LIBS
|
|---|
| 1541 | LIBS="$LIBS $X_EXTRA_LIBS"
|
|---|
| 1542 | AC_TRY_LINK([
|
|---|
| 1543 | #include <stdlib.h>
|
|---|
| 1544 | #include <unistd.h>
|
|---|
| 1545 |
|
|---|
| 1546 | extern "C" int getdomainname (char *, int);
|
|---|
| 1547 | ],
|
|---|
| 1548 | [
|
|---|
| 1549 | char buffer[200];
|
|---|
| 1550 | getdomainname(buffer, 200);
|
|---|
| 1551 | ],
|
|---|
| 1552 | ac_cv_func_getdomainname=yes
|
|---|
| 1553 | ac_cv_proto_getdomainname=yes,
|
|---|
| 1554 | AC_MSG_RESULT([fatal error])
|
|---|
| 1555 | AC_MSG_ERROR([getdomainname unavailable]))
|
|---|
| 1556 | fi
|
|---|
| 1557 | LIBS=$kde_safe_libs
|
|---|
| 1558 | AC_LANG_RESTORE
|
|---|
| 1559 | ])
|
|---|
| 1560 | AC_MSG_RESULT($ac_cv_proto_getdomainname)
|
|---|
| 1561 |
|
|---|
| 1562 | if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
|
|---|
| 1563 | AC_DEFINE(HAVE_GETDOMAINNAME, 1, [Define if you have getdomainname])
|
|---|
| 1564 | fi
|
|---|
| 1565 | if eval "test \"`echo $ac_cv_proto_getdomainname`\" = no"; then
|
|---|
| 1566 | AC_DEFINE(HAVE_GETDOMAINNAME_PROTO, 1,
|
|---|
| 1567 | [Define if you have getdomainname prototype])
|
|---|
| 1568 | fi
|
|---|
| 1569 |
|
|---|
| 1570 | ])
|
|---|
| 1571 |
|
|---|
| 1572 | AC_DEFUN(AC_CHECK_GETHOSTNAME,
|
|---|
| 1573 | [
|
|---|
| 1574 |
|
|---|
| 1575 | AC_MSG_CHECKING([for gethostname])
|
|---|
| 1576 | AC_CACHE_VAL(ac_cv_func_gethostname,
|
|---|
| 1577 | [
|
|---|
| 1578 | AC_LANG_SAVE
|
|---|
| 1579 | AC_LANG_CPLUSPLUS
|
|---|
| 1580 | save_CXXFLAGS="$CXXFLAGS"
|
|---|
| 1581 | if test "$GCC" = "yes"; then
|
|---|
| 1582 | CXXFLAGS="$CXXFLAGS -pedantic-errors"
|
|---|
| 1583 | fi
|
|---|
| 1584 | AC_TRY_LINK([
|
|---|
| 1585 | #include <stdlib.h>
|
|---|
| 1586 | #include <unistd.h>
|
|---|
| 1587 | ],
|
|---|
| 1588 | [
|
|---|
| 1589 | char buffer[200];
|
|---|
| 1590 | gethostname(buffer, 200);
|
|---|
| 1591 | ],
|
|---|
| 1592 | ac_cv_func_gethostname=yes,
|
|---|
| 1593 | ac_cv_func_gethostname=no)
|
|---|
| 1594 | CXXFLAGS="$save_CXXFLAGS"
|
|---|
| 1595 | AC_LANG_RESTORE
|
|---|
| 1596 | ])
|
|---|
| 1597 | AC_MSG_RESULT($ac_cv_func_gethostname)
|
|---|
| 1598 |
|
|---|
| 1599 | AC_MSG_CHECKING([if gethostname needs custom prototype])
|
|---|
| 1600 | AC_CACHE_VAL(ac_cv_proto_gethostname,
|
|---|
| 1601 | [
|
|---|
| 1602 | AC_LANG_SAVE
|
|---|
| 1603 | AC_LANG_CPLUSPLUS
|
|---|
| 1604 | if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
|
|---|
| 1605 | ac_cv_proto_gethostname=no
|
|---|
| 1606 | else
|
|---|
| 1607 | AC_TRY_LINK([
|
|---|
| 1608 | #include <stdlib.h>
|
|---|
| 1609 | #include <unistd.h>
|
|---|
| 1610 |
|
|---|
| 1611 | extern "C" int gethostname (char *, int);
|
|---|
| 1612 | ],
|
|---|
| 1613 | [
|
|---|
| 1614 | char buffer[200];
|
|---|
| 1615 | gethostname(buffer, 200);
|
|---|
| 1616 | ],
|
|---|
| 1617 | ac_cv_func_gethostname=yes
|
|---|
| 1618 | ac_cv_proto_gethostname=yes,
|
|---|
| 1619 | AC_MSG_RESULT([fatal error])
|
|---|
| 1620 | AC_MSG_ERROR(gethostname unavailable))
|
|---|
| 1621 | fi
|
|---|
| 1622 | AC_LANG_RESTORE
|
|---|
| 1623 | ])
|
|---|
| 1624 | AC_MSG_RESULT($ac_cv_proto_gethostname)
|
|---|
| 1625 |
|
|---|
| 1626 | if eval "test \"`echo $ac_cv_proto_gethostname`\" = no"; then
|
|---|
| 1627 | AC_DEFINE(HAVE_GETHOSTNAME_PROTO, 1,
|
|---|
| 1628 | [Define if you have gethostname prototype])
|
|---|
| 1629 | fi
|
|---|
| 1630 | if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
|
|---|
| 1631 | AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have getdomainname])
|
|---|
| 1632 | fi
|
|---|
| 1633 | ])
|
|---|
| 1634 |
|
|---|
| 1635 | AC_DEFUN(AC_CHECK_USLEEP,
|
|---|
| 1636 | [
|
|---|
| 1637 | AC_MSG_CHECKING([for usleep])
|
|---|
| 1638 | AC_CACHE_VAL(ac_cv_func_usleep,
|
|---|
| 1639 | [
|
|---|
| 1640 | AC_LANG_SAVE
|
|---|
| 1641 | AC_LANG_CPLUSPLUS
|
|---|
| 1642 | ac_libs_safe="$LIBS"
|
|---|
| 1643 | LIBS="$LIBS $LIBUCB"
|
|---|
| 1644 | AC_TRY_LINK([
|
|---|
| 1645 | #include <stdlib.h>
|
|---|
| 1646 | #include <unistd.h>
|
|---|
| 1647 | ],
|
|---|
| 1648 | [
|
|---|
| 1649 | usleep(200);
|
|---|
| 1650 | ],
|
|---|
| 1651 | ac_cv_func_usleep=yes,
|
|---|
| 1652 | ac_cv_func_usleep=no)
|
|---|
| 1653 | LIBS="$ac_libs_safe"
|
|---|
| 1654 | AC_LANG_RESTORE
|
|---|
| 1655 | ])
|
|---|
| 1656 | AC_MSG_RESULT($ac_cv_func_usleep)
|
|---|
| 1657 | if eval "test \"`echo $ac_cv_func_usleep`\" = yes"; then
|
|---|
| 1658 | AC_DEFINE(HAVE_USLEEP, 1, [Define if you have the usleep function])
|
|---|
| 1659 | fi
|
|---|
| 1660 | ])
|
|---|
| 1661 |
|
|---|
| 1662 | AC_DEFUN(AC_CHECK_RANDOM,
|
|---|
| 1663 | [
|
|---|
| 1664 | AC_MSG_CHECKING([for random])
|
|---|
| 1665 | AC_CACHE_VAL(ac_cv_func_random,
|
|---|
| 1666 | [
|
|---|
| 1667 | AC_LANG_SAVE
|
|---|
| 1668 | AC_LANG_CPLUSPLUS
|
|---|
| 1669 | ac_libs_safe="$LIBS"
|
|---|
| 1670 | LIBS="$LIBS $LIBUCB"
|
|---|
| 1671 | AC_TRY_LINK([
|
|---|
| 1672 | #include <stdlib.h>
|
|---|
| 1673 | ],
|
|---|
| 1674 | [
|
|---|
| 1675 | random();
|
|---|
| 1676 | ],
|
|---|
| 1677 | ac_cv_func_random=yes,
|
|---|
| 1678 | ac_cv_func_random=no)
|
|---|
| 1679 | LIBS="$ac_libs_safe"
|
|---|
| 1680 | AC_LANG_RESTORE
|
|---|
| 1681 | ])
|
|---|
| 1682 | AC_MSG_RESULT($ac_cv_func_random)
|
|---|
| 1683 | if eval "test \"`echo $ac_cv_func_random`\" = yes"; then
|
|---|
| 1684 | AC_DEFINE(HAVE_RANDOM, 1, [Define if you have random])
|
|---|
| 1685 | fi
|
|---|
| 1686 | ])
|
|---|
| 1687 |
|
|---|
| 1688 | AC_DEFUN(AC_FIND_GIF,
|
|---|
| 1689 | [AC_MSG_CHECKING([for giflib])
|
|---|
| 1690 | AC_CACHE_VAL(ac_cv_lib_gif,
|
|---|
| 1691 | [ac_save_LIBS="$LIBS"
|
|---|
| 1692 | LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
|
|---|
| 1693 | AC_TRY_LINK(dnl
|
|---|
| 1694 | [
|
|---|
| 1695 | #ifdef __cplusplus
|
|---|
| 1696 | extern "C" {
|
|---|
| 1697 | #endif
|
|---|
| 1698 | int GifLastError(void);
|
|---|
| 1699 | #ifdef __cplusplus
|
|---|
| 1700 | }
|
|---|
| 1701 | #endif
|
|---|
| 1702 | /* We use char because int might match the return type of a gcc2
|
|---|
| 1703 | builtin and then its argument prototype would still apply. */
|
|---|
| 1704 | ],
|
|---|
| 1705 | [return GifLastError();],
|
|---|
| 1706 | eval "ac_cv_lib_gif=yes",
|
|---|
| 1707 | eval "ac_cv_lib_gif=no")
|
|---|
| 1708 | LIBS="$ac_save_LIBS"
|
|---|
| 1709 | ])dnl
|
|---|
| 1710 | if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
|
|---|
| 1711 | AC_MSG_RESULT(yes)
|
|---|
| 1712 | AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
|
|---|
| 1713 | else
|
|---|
| 1714 | AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
|
|---|
| 1715 | fi
|
|---|
| 1716 | ])
|
|---|
| 1717 |
|
|---|
| 1718 | AC_DEFUN(KDE_FIND_JPEG_HELPER,
|
|---|
| 1719 | [
|
|---|
| 1720 | AC_MSG_CHECKING([for libjpeg$2])
|
|---|
| 1721 | AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
|
|---|
| 1722 | [
|
|---|
| 1723 | AC_LANG_C
|
|---|
| 1724 | ac_save_LIBS="$LIBS"
|
|---|
| 1725 | LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
|
|---|
| 1726 | ac_save_CFLAGS="$CFLAGS"
|
|---|
| 1727 | CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
|
|---|
| 1728 | AC_TRY_LINK(
|
|---|
| 1729 | [/* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 1730 | struct jpeg_decompress_struct;
|
|---|
| 1731 | typedef struct jpeg_decompress_struct * j_decompress_ptr;
|
|---|
| 1732 | typedef int size_t;
|
|---|
| 1733 | #ifdef __cplusplus
|
|---|
| 1734 | extern "C" {
|
|---|
| 1735 | #endif
|
|---|
| 1736 | void jpeg_CreateDecompress(j_decompress_ptr cinfo,
|
|---|
| 1737 | int version, size_t structsize);
|
|---|
| 1738 | #ifdef __cplusplus
|
|---|
| 1739 | }
|
|---|
| 1740 | #endif
|
|---|
| 1741 | /* We use char because int might match the return type of a gcc2
|
|---|
| 1742 | builtin and then its argument prototype would still apply. */
|
|---|
| 1743 | ],
|
|---|
| 1744 | [jpeg_CreateDecompress(0L, 0, 0);],
|
|---|
| 1745 | eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
|
|---|
| 1746 | eval "ac_cv_lib_jpeg_$1=no")
|
|---|
| 1747 | LIBS="$ac_save_LIBS"
|
|---|
| 1748 | CFLAGS="$ac_save_CFLAGS"
|
|---|
| 1749 | ])
|
|---|
| 1750 |
|
|---|
| 1751 | if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
|
|---|
| 1752 | LIBJPEG="$ac_cv_lib_jpeg_$1"
|
|---|
| 1753 | AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
|
|---|
| 1754 | else
|
|---|
| 1755 | AC_MSG_RESULT(no)
|
|---|
| 1756 | $3
|
|---|
| 1757 | fi
|
|---|
| 1758 |
|
|---|
| 1759 | ])
|
|---|
| 1760 |
|
|---|
| 1761 | AC_DEFUN(AC_FIND_JPEG,
|
|---|
| 1762 | [
|
|---|
| 1763 | dnl first look for libraries
|
|---|
| 1764 | KDE_FIND_JPEG_HELPER(6b, 6b,
|
|---|
| 1765 | KDE_FIND_JPEG_HELPER(normal, [],
|
|---|
| 1766 | [
|
|---|
| 1767 | dnl what to do, if the normal way fails:
|
|---|
| 1768 | if test -f "$kde_libraries/libjpeg.so"; then
|
|---|
| 1769 | test -f ./libjpegkde.so || $LN_S $kde_libraries/libjpeg.so ./libjpegkde.so
|
|---|
| 1770 | ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"
|
|---|
| 1771 | else if test -f "$kde_libraries/libjpeg.sl"; then
|
|---|
| 1772 | test -f ./libjpegkde.sl ||$LN_S $kde_libraries/libjpeg.sl ./libjpegkde.sl
|
|---|
| 1773 | ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"
|
|---|
| 1774 | else if test -f "$kde_libraries/libjpeg.a"; then
|
|---|
| 1775 | test -f ./libjpegkde.a || $LN_S $kde_libraries/libjpeg.a ./libjpegkde.a
|
|---|
| 1776 | ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"
|
|---|
| 1777 | else
|
|---|
| 1778 | ac_cv_lib_jpeg=
|
|---|
| 1779 | fi
|
|---|
| 1780 | fi
|
|---|
| 1781 | fi
|
|---|
| 1782 |
|
|---|
| 1783 | LIBJPEG=$ac_cv_lib_jpeg
|
|---|
| 1784 | ]))
|
|---|
| 1785 |
|
|---|
| 1786 | dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
|
|---|
| 1787 | dnl requires system dependent includes loaded before it)
|
|---|
| 1788 | jpeg_incdirs="/usr/include /usr/local/include $kde_extra_includes"
|
|---|
| 1789 | AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
|
|---|
| 1790 | test "x$jpeg_incdir" = xNO && jpeg_incdir=
|
|---|
| 1791 |
|
|---|
| 1792 | dnl if headers _and_ libraries are missing, this is no error, and we
|
|---|
| 1793 | dnl continue with a warning (the user will get no jpeg support in khtml)
|
|---|
| 1794 | dnl if only one is missing, it means a configuration error, but we still
|
|---|
| 1795 | dnl only warn
|
|---|
| 1796 | if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
|
|---|
| 1797 | AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
|
|---|
| 1798 | else
|
|---|
| 1799 | if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
|
|---|
| 1800 | AC_MSG_WARN([
|
|---|
| 1801 | There is an installation error in jpeg support. You seem to have only one
|
|---|
| 1802 | of either the headers _or_ the libraries installed. You may need to either
|
|---|
| 1803 | provide correct --with-extra-... options, or the development package of
|
|---|
| 1804 | libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
|
|---|
| 1805 | Disabling JPEG support.
|
|---|
| 1806 | ])
|
|---|
| 1807 | else
|
|---|
| 1808 | AC_MSG_WARN([libjpeg not found. disable JPEG support.])
|
|---|
| 1809 | fi
|
|---|
| 1810 | jpeg_incdir=
|
|---|
| 1811 | LIBJPEG=
|
|---|
| 1812 | fi
|
|---|
| 1813 |
|
|---|
| 1814 | AC_SUBST(LIBJPEG)
|
|---|
| 1815 | ])
|
|---|
| 1816 |
|
|---|
| 1817 | AC_DEFUN(AC_FIND_ZLIB,
|
|---|
| 1818 | [
|
|---|
| 1819 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
|
|---|
| 1820 | AC_MSG_CHECKING([for libz])
|
|---|
| 1821 | AC_CACHE_VAL(ac_cv_lib_z,
|
|---|
| 1822 | [
|
|---|
| 1823 | AC_LANG_C
|
|---|
| 1824 | kde_save_LIBS="$LIBS"
|
|---|
| 1825 | LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
|
|---|
| 1826 | kde_save_CFLAGS="$CFLAGS"
|
|---|
| 1827 | CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
|
|---|
| 1828 | AC_TRY_LINK(dnl
|
|---|
| 1829 | [
|
|---|
| 1830 | #include<zlib.h>
|
|---|
| 1831 | ],
|
|---|
| 1832 | [return (zlibVersion() == ZLIB_VERSION); ],
|
|---|
| 1833 | eval "ac_cv_lib_z='-lz'",
|
|---|
| 1834 | eval "ac_cv_lib_z=no")
|
|---|
| 1835 | LIBS="$kde_save_LIBS"
|
|---|
| 1836 | CFLAGS="$kde_save_CFLAGS"
|
|---|
| 1837 | ])dnl
|
|---|
| 1838 | if test ! "$ac_cv_lib_z" = no; then
|
|---|
| 1839 | AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
|
|---|
| 1840 | LIBZ="$ac_cv_lib_z"
|
|---|
| 1841 | AC_SUBST(LIBZ)
|
|---|
| 1842 | AC_MSG_RESULT($ac_cv_lib_z)
|
|---|
| 1843 | else
|
|---|
| 1844 | AC_MSG_ERROR(not found. Check your installation and look into config.log)
|
|---|
| 1845 | LIBZ=""
|
|---|
| 1846 | AC_SUBST(LIBZ)
|
|---|
| 1847 | fi
|
|---|
| 1848 | ])
|
|---|
| 1849 |
|
|---|
| 1850 | AC_DEFUN(KDE_TRY_TIFFLIB,
|
|---|
| 1851 | [
|
|---|
| 1852 | AC_MSG_CHECKING([for libtiff $1])
|
|---|
| 1853 |
|
|---|
| 1854 | AC_CACHE_VAL(kde_cv_libtiff_$1,
|
|---|
| 1855 | [
|
|---|
| 1856 | AC_LANG_SAVE
|
|---|
| 1857 | AC_LANG_CPLUSPLUS
|
|---|
| 1858 | kde_save_LIBS="$LIBS"
|
|---|
| 1859 | LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
|
|---|
| 1860 | kde_save_CXXFLAGS="$CXXFLAGS"
|
|---|
| 1861 | CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
|
|---|
| 1862 |
|
|---|
| 1863 | AC_TRY_LINK(dnl
|
|---|
| 1864 | [
|
|---|
| 1865 | #include<tiffio.h>
|
|---|
| 1866 | ],
|
|---|
| 1867 | [return (TIFFOpen( "", "r") == 0); ],
|
|---|
| 1868 | [
|
|---|
| 1869 | kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
|
|---|
| 1870 | ], [
|
|---|
| 1871 | kde_cv_libtiff_$1=no
|
|---|
| 1872 | ])
|
|---|
| 1873 |
|
|---|
| 1874 | LIBS="$kde_save_LIBS"
|
|---|
| 1875 | CXXFLAGS="$kde_save_CXXFLAGS"
|
|---|
| 1876 | AC_LANG_RESTORE
|
|---|
| 1877 | ])
|
|---|
| 1878 |
|
|---|
| 1879 | if test "$kde_cv_libtiff_$1" = "no"; then
|
|---|
| 1880 | AC_MSG_RESULT(no)
|
|---|
| 1881 | LIBTIFF=""
|
|---|
| 1882 | $3
|
|---|
| 1883 | else
|
|---|
| 1884 | LIBTIFF="$kde_cv_libtiff_$1"
|
|---|
| 1885 | AC_MSG_RESULT(yes)
|
|---|
| 1886 | AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
|
|---|
| 1887 | $2
|
|---|
| 1888 | fi
|
|---|
| 1889 |
|
|---|
| 1890 | ])
|
|---|
| 1891 |
|
|---|
| 1892 | AC_DEFUN(AC_FIND_TIFF,
|
|---|
| 1893 | [
|
|---|
| 1894 | AC_REQUIRE([K_PATH_X])
|
|---|
| 1895 | AC_REQUIRE([AC_FIND_ZLIB])
|
|---|
| 1896 | AC_REQUIRE([AC_FIND_JPEG])
|
|---|
| 1897 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
|
|---|
| 1898 |
|
|---|
| 1899 | KDE_TRY_TIFFLIB(tiff, [],
|
|---|
| 1900 | KDE_TRY_TIFFLIB(tiff34))
|
|---|
| 1901 |
|
|---|
| 1902 | AC_SUBST(LIBTIFF)
|
|---|
| 1903 | ])
|
|---|
| 1904 |
|
|---|
| 1905 |
|
|---|
| 1906 | AC_DEFUN(AC_FIND_PNG,
|
|---|
| 1907 | [
|
|---|
| 1908 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
|
|---|
| 1909 | AC_REQUIRE([AC_FIND_ZLIB])
|
|---|
| 1910 | AC_MSG_CHECKING([for libpng])
|
|---|
| 1911 | AC_CACHE_VAL(ac_cv_lib_png,
|
|---|
| 1912 | [
|
|---|
| 1913 | kde_save_LIBS="$LIBS"
|
|---|
| 1914 | LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
|
|---|
| 1915 | kde_save_CFLAGS="$CFLAGS"
|
|---|
| 1916 | CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
|
|---|
| 1917 | AC_LANG_C
|
|---|
| 1918 | AC_TRY_LINK(dnl
|
|---|
| 1919 | [
|
|---|
| 1920 | #include<png.h>
|
|---|
| 1921 | ],
|
|---|
| 1922 | [
|
|---|
| 1923 | png_structp png_ptr = png_create_read_struct( /* image ptr */
|
|---|
| 1924 | PNG_LIBPNG_VER_STRING, 0, 0, 0 );
|
|---|
| 1925 | return( png_ptr != 0 );
|
|---|
| 1926 | ],
|
|---|
| 1927 | eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
|
|---|
| 1928 | eval "ac_cv_lib_png=no"
|
|---|
| 1929 | )
|
|---|
| 1930 | LIBS="$kde_save_LIBS"
|
|---|
| 1931 | CFLAGS="$kde_save_CFLAGS"
|
|---|
| 1932 | ])dnl
|
|---|
| 1933 | if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
|
|---|
| 1934 | AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
|
|---|
| 1935 | LIBPNG="$ac_cv_lib_png"
|
|---|
| 1936 | AC_SUBST(LIBPNG)
|
|---|
| 1937 | AC_MSG_RESULT($ac_cv_lib_png)
|
|---|
| 1938 | else
|
|---|
| 1939 | AC_MSG_RESULT(no)
|
|---|
| 1940 | LIBPNG=""
|
|---|
| 1941 | AC_SUBST(LIBPNG)
|
|---|
| 1942 | fi
|
|---|
| 1943 | ])
|
|---|
| 1944 |
|
|---|
| 1945 | AC_DEFUN(AC_CHECK_BOOL,
|
|---|
| 1946 | [
|
|---|
| 1947 | AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
|
|---|
| 1948 | ])
|
|---|
| 1949 |
|
|---|
| 1950 | AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
|
|---|
| 1951 | [
|
|---|
| 1952 | AC_MSG_CHECKING(if you need GNU extensions)
|
|---|
| 1953 | AC_CACHE_VAL(ac_cv_gnu_extensions,
|
|---|
| 1954 | [
|
|---|
| 1955 | cat > conftest.c << EOF
|
|---|
| 1956 | #include <features.h>
|
|---|
| 1957 |
|
|---|
| 1958 | #ifdef __GNU_LIBRARY__
|
|---|
| 1959 | yes
|
|---|
| 1960 | #endif
|
|---|
| 1961 | EOF
|
|---|
| 1962 |
|
|---|
| 1963 | if (eval "$ac_cpp conftest.c") 2>&5 |
|
|---|
| 1964 | egrep "yes" >/dev/null 2>&1; then
|
|---|
| 1965 | rm -rf conftest*
|
|---|
| 1966 | ac_cv_gnu_extensions=yes
|
|---|
| 1967 | else
|
|---|
| 1968 | ac_cv_gnu_extensions=no
|
|---|
| 1969 | fi
|
|---|
| 1970 | ])
|
|---|
| 1971 |
|
|---|
| 1972 | AC_MSG_RESULT($ac_cv_gnu_extensions)
|
|---|
| 1973 | if test "$ac_cv_gnu_extensions" = "yes"; then
|
|---|
| 1974 | AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
|
|---|
| 1975 | fi
|
|---|
| 1976 | ])
|
|---|
| 1977 |
|
|---|
| 1978 | AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
|
|---|
| 1979 | [
|
|---|
| 1980 | AC_REQUIRE([AC_CHECK_COMPILERS])
|
|---|
| 1981 | AC_MSG_CHECKING(whether $CXX supports -$1)
|
|---|
| 1982 | kde_cache=`echo $1 | sed 'y%.=/+-%___p_%'`
|
|---|
| 1983 | AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
|
|---|
| 1984 | [
|
|---|
| 1985 | echo 'int main() { return 0; }' >conftest.cc
|
|---|
| 1986 | eval "kde_cv_prog_cxx_$kde_cache=no"
|
|---|
| 1987 | if test -z "`$CXX -$1 -c conftest.cc 2>&1`"; then
|
|---|
| 1988 | if test -z "`$CXX -$1 -o conftest conftest.o 2>&1`"; then
|
|---|
| 1989 | eval "kde_cv_prog_cxx_$kde_cache=yes"
|
|---|
| 1990 | fi
|
|---|
| 1991 | fi
|
|---|
| 1992 | rm -f conftest*
|
|---|
| 1993 | ])
|
|---|
| 1994 | if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
|
|---|
| 1995 | AC_MSG_RESULT(yes)
|
|---|
| 1996 | :
|
|---|
| 1997 | $2
|
|---|
| 1998 | else
|
|---|
| 1999 | AC_MSG_RESULT(no)
|
|---|
| 2000 | :
|
|---|
| 2001 | $3
|
|---|
| 2002 | fi
|
|---|
| 2003 | ])
|
|---|
| 2004 |
|
|---|
| 2005 | AC_DEFUN(KDE_PROG_CC_PG,
|
|---|
| 2006 | [ AC_CACHE_CHECK(whether ${CC-cc} accepts -pg, kde_cv_prog_cc_pg,
|
|---|
| 2007 | [echo 'void f(){}' > conftest.c
|
|---|
| 2008 | if test -z "`${CC-cc} -pg -c conftest.c 2>&1`"; then
|
|---|
| 2009 | kde_cv_prog_cc_pg=yes
|
|---|
| 2010 | else
|
|---|
| 2011 | kde_cv_prog_cc_pg=no
|
|---|
| 2012 | fi
|
|---|
| 2013 | rm -f conftest*
|
|---|
| 2014 | ])])
|
|---|
| 2015 |
|
|---|
| 2016 | AC_DEFUN(KDE_PROG_CXX_PG,
|
|---|
| 2017 | [ AC_CACHE_CHECK(whether ${CXX-g++} accepts -pg, kde_cv_prog_cxx_pg,
|
|---|
| 2018 | [echo 'void f(){}' > conftest.cc
|
|---|
| 2019 | if test -z "`${CXX-g++} -pg -c conftest.cc 2>&1`"; then
|
|---|
| 2020 | kde_cv_prog_cxx_pg=yes
|
|---|
| 2021 | else
|
|---|
| 2022 | kde_cv_prog_cxx_pg=no
|
|---|
| 2023 | fi
|
|---|
| 2024 | rm -f conftest*
|
|---|
| 2025 | ])])
|
|---|
| 2026 |
|
|---|
| 2027 | dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
|
|---|
| 2028 | dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
|
|---|
| 2029 | dnl it's all white-space separated
|
|---|
| 2030 | AC_DEFUN(AC_REMOVE_FORBIDDEN,
|
|---|
| 2031 | [ __val=$$1
|
|---|
| 2032 | __forbid=" $2 "
|
|---|
| 2033 | if test -n "$__val"; then
|
|---|
| 2034 | __new=""
|
|---|
| 2035 | ac_save_IFS=$IFS
|
|---|
| 2036 | IFS=" "
|
|---|
| 2037 | for i in $__val; do
|
|---|
| 2038 | case "$__forbid" in
|
|---|
| 2039 | *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
|
|---|
| 2040 | *) # Careful to not add spaces, where there were none, because otherwise
|
|---|
| 2041 | # libtool gets confused, if we change e.g. CXX
|
|---|
| 2042 | if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
|
|---|
| 2043 | esac
|
|---|
| 2044 | done
|
|---|
| 2045 | IFS=$ac_save_IFS
|
|---|
| 2046 | $1=$__new
|
|---|
| 2047 | fi
|
|---|
| 2048 | ])
|
|---|
| 2049 |
|
|---|
| 2050 | dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
|
|---|
| 2051 | AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
|
|---|
| 2052 | [dnl
|
|---|
| 2053 | AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
|
|---|
| 2054 | AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
|
|---|
| 2055 | ])
|
|---|
| 2056 |
|
|---|
| 2057 | AC_DEFUN(AC_CHECK_COMPILERS,
|
|---|
| 2058 | [
|
|---|
| 2059 | dnl this is somehow a fat lie, but prevents other macros from double checking
|
|---|
| 2060 | AC_PROVIDE([AC_PROG_CC])
|
|---|
| 2061 | AC_PROVIDE([AC_PROG_CPP])
|
|---|
| 2062 | AC_PROVIDE([AC_PROG_CXX])
|
|---|
| 2063 | AC_PROVIDE([AC_PROG_CXXCPP])
|
|---|
| 2064 |
|
|---|
| 2065 | AC_ARG_ENABLE(debug,[ --enable-debug enables debug symbols [default=no]],
|
|---|
| 2066 | [
|
|---|
| 2067 | if test $enableval = "no"; dnl
|
|---|
| 2068 | then
|
|---|
| 2069 | kde_use_debug_code="no"
|
|---|
| 2070 | kde_use_debug_define=yes
|
|---|
| 2071 | else
|
|---|
| 2072 | kde_use_debug_code="yes"
|
|---|
| 2073 | kde_use_debug_define=no
|
|---|
| 2074 | fi
|
|---|
| 2075 | ], [kde_use_debug_code="no"
|
|---|
| 2076 | kde_use_debug_define=no
|
|---|
| 2077 | ])
|
|---|
| 2078 | dnl Just for configure --help
|
|---|
| 2079 | AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
|
|---|
| 2080 |
|
|---|
| 2081 | AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
|
|---|
| 2082 | [
|
|---|
| 2083 | if test $enableval = "no"; then
|
|---|
| 2084 | kde_use_strict_options="no"
|
|---|
| 2085 | else
|
|---|
| 2086 | kde_use_strict_options="yes"
|
|---|
| 2087 | fi
|
|---|
| 2088 | ], [kde_use_strict_options="no"])
|
|---|
| 2089 |
|
|---|
| 2090 | AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
|
|---|
| 2091 | [kde_use_profiling=$enableval],
|
|---|
| 2092 | [kde_use_profiling="no"]
|
|---|
| 2093 | )
|
|---|
| 2094 |
|
|---|
| 2095 | dnl this was AC_PROG_CC. I had to include it manualy, since I had to patch it
|
|---|
| 2096 | AC_MSG_CHECKING(for a C-Compiler)
|
|---|
| 2097 | dnl if there is one, print out. if not, don't matter
|
|---|
| 2098 | AC_MSG_RESULT($CC)
|
|---|
| 2099 |
|
|---|
| 2100 | if test -z "$CC"; then AC_CHECK_PROG(CC, gcc, gcc) fi
|
|---|
| 2101 | if test -z "$CC"; then AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) fi
|
|---|
| 2102 | if test -z "$CC"; then AC_CHECK_PROG(CC, xlc, xlc) fi
|
|---|
| 2103 | test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
|---|
| 2104 |
|
|---|
| 2105 | AC_PROG_CC_WORKS
|
|---|
| 2106 | AC_PROG_CC_GNU
|
|---|
| 2107 |
|
|---|
| 2108 | if test $ac_cv_prog_gcc = yes; then
|
|---|
| 2109 | GCC=yes
|
|---|
| 2110 | else
|
|---|
| 2111 | GCC=
|
|---|
| 2112 | fi
|
|---|
| 2113 |
|
|---|
| 2114 | USER_CFLAGS=$CFLAGS
|
|---|
| 2115 | CFLAGS=
|
|---|
| 2116 |
|
|---|
| 2117 | if test -z "$CFLAGS"; then
|
|---|
| 2118 | if test "$kde_use_debug_code" = "yes"; then
|
|---|
| 2119 | AC_PROG_CC_G
|
|---|
| 2120 | if test $ac_cv_prog_cc_g = yes; then
|
|---|
| 2121 | CFLAGS="-g"
|
|---|
| 2122 | case $host in
|
|---|
| 2123 | *-*-linux-gnu)
|
|---|
| 2124 | CFLAGS="$CFLAGS -ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE -D_BSD_SOURCE"
|
|---|
| 2125 | ;;
|
|---|
| 2126 | esac
|
|---|
| 2127 | fi
|
|---|
| 2128 | else
|
|---|
| 2129 | if test "$GCC" = "yes"; then
|
|---|
| 2130 | CFLAGS="-O2"
|
|---|
| 2131 | else
|
|---|
| 2132 | CFLAGS=""
|
|---|
| 2133 | fi
|
|---|
| 2134 | if test "$kde_use_debug_define" = "yes"; then
|
|---|
| 2135 | CFLAGS="$CFLAGS -DNDEBUG"
|
|---|
| 2136 | dnl damn buggy compilers :-(
|
|---|
| 2137 | dnl if test "$GCC" = "yes"; then
|
|---|
| 2138 | dnl CFLAGS="$CFLAGS -fomit-frame-pointer"
|
|---|
| 2139 | dnl CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
|
|---|
| 2140 | dnl fi
|
|---|
| 2141 | fi
|
|---|
| 2142 | fi
|
|---|
| 2143 |
|
|---|
| 2144 | if test "$kde_use_profiling" = yes; then
|
|---|
| 2145 | KDE_PROG_CC_PG
|
|---|
| 2146 | if test "$kde_cv_prog_cc_pg" = yes; then
|
|---|
| 2147 | CFLAGS="$CFLAGS -pg"
|
|---|
| 2148 | fi
|
|---|
| 2149 | fi
|
|---|
| 2150 |
|
|---|
| 2151 | if test "$GCC" = "yes"; then
|
|---|
| 2152 | CFLAGS="$CFLAGS"
|
|---|
| 2153 |
|
|---|
| 2154 | if test "$kde_use_strict_options" = "yes"; then
|
|---|
| 2155 | CFLAGS="$CFLAGS -W -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
|
|---|
| 2156 | fi
|
|---|
| 2157 | fi
|
|---|
| 2158 |
|
|---|
| 2159 | fi
|
|---|
| 2160 |
|
|---|
| 2161 | case "$host" in
|
|---|
| 2162 | *-*-sysv4.2uw*) CFLAGS="$CFLAGS -D_UNIXWARE";;
|
|---|
| 2163 | *-*-sysv5uw7*) CFLAGS="$CFLAGS -D_UNIXWARE7";;
|
|---|
| 2164 | esac
|
|---|
| 2165 |
|
|---|
| 2166 | if test -n "$USER_CFLAGS"; then
|
|---|
| 2167 | CFLAGS="$CFLAGS $USER_CFLAGS"
|
|---|
| 2168 | fi
|
|---|
| 2169 |
|
|---|
| 2170 | if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
|
|---|
| 2171 | LDFLAGS=""
|
|---|
| 2172 | fi
|
|---|
| 2173 |
|
|---|
| 2174 |
|
|---|
| 2175 | dnl this is AC_PROG_CPP. I had to include it here, since autoconf checks
|
|---|
| 2176 | dnl dependecies between AC_PROG_CPP and AC_PROG_CC (or is it automake?)
|
|---|
| 2177 |
|
|---|
| 2178 | AC_MSG_CHECKING(how to run the C preprocessor)
|
|---|
| 2179 | # On Suns, sometimes $CPP names a directory.
|
|---|
| 2180 | if test -n "$CPP" && test -d "$CPP"; then
|
|---|
| 2181 | CPP=
|
|---|
| 2182 | fi
|
|---|
| 2183 | if test -z "$CPP"; then
|
|---|
| 2184 | AC_CACHE_VAL(ac_cv_prog_CPP,
|
|---|
| 2185 | [ # This must be in double quotes, not single quotes, because CPP may get
|
|---|
| 2186 | # substituted into the Makefile and "${CC-cc}" will confuse make.
|
|---|
| 2187 | CPP="${CC-cc} -E"
|
|---|
| 2188 | # On the NeXT, cc -E runs the code through the compiler's parser,
|
|---|
| 2189 | # not just through cpp.
|
|---|
| 2190 | dnl Use a header file that comes with gcc, so configuring glibc
|
|---|
| 2191 | dnl with a fresh cross-compiler works.
|
|---|
| 2192 | AC_TRY_CPP([#include <assert.h>
|
|---|
| 2193 | Syntax Error], ,
|
|---|
| 2194 | CPP="${CC-cc} -E -traditional-cpp"
|
|---|
| 2195 | AC_TRY_CPP([#include <assert.h>
|
|---|
| 2196 | Syntax Error], , CPP=/lib/cpp))
|
|---|
| 2197 | ac_cv_prog_CPP="$CPP"])dnl
|
|---|
| 2198 | CPP="$ac_cv_prog_CPP"
|
|---|
| 2199 | else
|
|---|
| 2200 | ac_cv_prog_CPP="$CPP"
|
|---|
| 2201 | fi
|
|---|
| 2202 | AC_MSG_RESULT($CPP)
|
|---|
| 2203 | AC_SUBST(CPP)dnl
|
|---|
| 2204 |
|
|---|
| 2205 |
|
|---|
| 2206 | AC_MSG_CHECKING(for a C++-Compiler)
|
|---|
| 2207 | dnl if there is one, print out. if not, don't matter
|
|---|
| 2208 | AC_MSG_RESULT($CXX)
|
|---|
| 2209 |
|
|---|
| 2210 | if test -z "$CXX"; then AC_CHECK_PROG(CXX, g++, g++) fi
|
|---|
| 2211 | if test -z "$CXX"; then AC_CHECK_PROG(CXX, CC, CC) fi
|
|---|
| 2212 | if test -z "$CXX"; then AC_CHECK_PROG(CXX, xlC, xlC) fi
|
|---|
| 2213 | if test -z "$CXX"; then AC_CHECK_PROG(CXX, DCC, DCC) fi
|
|---|
| 2214 | test -z "$CXX" && AC_MSG_ERROR([no acceptable C++-compiler found in \$PATH])
|
|---|
| 2215 |
|
|---|
| 2216 | AC_PROG_CXX_WORKS
|
|---|
| 2217 | AC_PROG_CXX_GNU
|
|---|
| 2218 |
|
|---|
| 2219 | if test $ac_cv_prog_gxx = yes; then
|
|---|
| 2220 | GXX=yes
|
|---|
| 2221 | fi
|
|---|
| 2222 |
|
|---|
| 2223 | USER_CXXFLAGS=$CXXFLAGS
|
|---|
| 2224 | CXXFLAGS=""
|
|---|
| 2225 |
|
|---|
| 2226 | if test -z "$CXXFLAGS"; then
|
|---|
| 2227 | if test "$kde_use_debug_code" = "yes"; then
|
|---|
| 2228 | AC_PROG_CXX_G
|
|---|
| 2229 | if test $ac_cv_prog_cxx_g = yes; then
|
|---|
| 2230 | CXXFLAGS="-g"
|
|---|
| 2231 | case $host in dnl
|
|---|
| 2232 | *-*-linux-gnu)
|
|---|
| 2233 | CXXFLAGS="$CXXFLAGS -ansi -D_XOPEN_SOURCE -D_BSD_SOURCE -Wbad-function-cast -Wcast-align -Wundef -Wconversion"
|
|---|
| 2234 | ;;
|
|---|
| 2235 | esac
|
|---|
| 2236 | fi
|
|---|
| 2237 | else
|
|---|
| 2238 | if test "$GXX" = "yes"; then
|
|---|
| 2239 | CXXFLAGS="-O2"
|
|---|
| 2240 | fi
|
|---|
| 2241 | if test "$kde_use_debug_define" = "yes"; then
|
|---|
| 2242 | CXXFLAGS="$CXXFLAGS -DNDEBUG"
|
|---|
| 2243 | fi
|
|---|
| 2244 | fi
|
|---|
| 2245 |
|
|---|
| 2246 | if test "$kde_use_profiling" = yes; then
|
|---|
| 2247 | KDE_PROG_CXX_PG
|
|---|
| 2248 | if test "$kde_cv_prog_cxx_pg" = yes; then
|
|---|
| 2249 | CXXFLAGS="$CXXFLAGS -pg"
|
|---|
| 2250 | fi
|
|---|
| 2251 | fi
|
|---|
| 2252 |
|
|---|
| 2253 | KDE_CHECK_COMPILER_FLAG(fno-exceptions,
|
|---|
| 2254 | [
|
|---|
| 2255 | CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
|---|
| 2256 | ])
|
|---|
| 2257 |
|
|---|
| 2258 | dnl WABA: Nothing wrong with RTTI, keep it on.
|
|---|
| 2259 | dnl KDE_CHECK_COMPILER_FLAG(fno-rtti,
|
|---|
| 2260 | dnl [
|
|---|
| 2261 | dnl CXXFLAGS="$CXXFLAGS -fno-rtti"
|
|---|
| 2262 | dnl ])
|
|---|
| 2263 |
|
|---|
| 2264 | KDE_CHECK_COMPILER_FLAG(fno-check-new,
|
|---|
| 2265 | [
|
|---|
| 2266 | CXXFLAGS="$CXXFLAGS -fno-check-new"
|
|---|
| 2267 | ])
|
|---|
| 2268 |
|
|---|
| 2269 | if test "$GXX" = "yes"; then
|
|---|
| 2270 | CXXFLAGS="$CXXFLAGS"
|
|---|
| 2271 |
|
|---|
| 2272 | if test true || test "$kde_use_debug_code" = "yes"; then
|
|---|
| 2273 | CXXFLAGS="$CXXFLAGS -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
|
|---|
| 2274 |
|
|---|
| 2275 | KDE_CHECK_COMPILER_FLAG(Wno-long-long,
|
|---|
| 2276 | [
|
|---|
| 2277 | CXXFLAGS="$CXXFLAGS -Wno-long-long"
|
|---|
| 2278 | ])
|
|---|
| 2279 | KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,
|
|---|
| 2280 | [
|
|---|
| 2281 | CXXFLAGS="$CXXFLAGS -Wnon-virtual-dtor"
|
|---|
| 2282 | ])
|
|---|
| 2283 | KDE_CHECK_COMPILER_FLAG(fno-builtin,
|
|---|
| 2284 | [
|
|---|
| 2285 | CXXFLAGS="$CXXFLAGS -fno-builtin"
|
|---|
| 2286 | ])
|
|---|
| 2287 |
|
|---|
| 2288 | fi
|
|---|
| 2289 |
|
|---|
| 2290 | if test "$kde_use_strict_options" = "yes"; then
|
|---|
| 2291 | CXXFLAGS="$CXXFLAGS -Wcast-qual -Wbad-function-cast -Wshadow -Wcast-align"
|
|---|
| 2292 | fi
|
|---|
| 2293 |
|
|---|
| 2294 | if test "$kde_very_strict" = "yes"; then
|
|---|
| 2295 | CXXFLAGS="$CXXFLAGS -Wold-style-cast -Wredundant-decls -Wconversion"
|
|---|
| 2296 | fi
|
|---|
| 2297 | fi
|
|---|
| 2298 | fi
|
|---|
| 2299 |
|
|---|
| 2300 | KDE_CHECK_COMPILER_FLAG(fexceptions,
|
|---|
| 2301 | [
|
|---|
| 2302 | USE_EXCEPTIONS="-fexceptions"
|
|---|
| 2303 | ],
|
|---|
| 2304 | USE_EXCEPTIONS=
|
|---|
| 2305 | )
|
|---|
| 2306 | AC_SUBST(USE_EXCEPTIONS)
|
|---|
| 2307 |
|
|---|
| 2308 | KDE_CHECK_COMPILER_FLAG(frtti,
|
|---|
| 2309 | [
|
|---|
| 2310 | USE_RTTI="-frtti"
|
|---|
| 2311 | ],
|
|---|
| 2312 | USE_RTTI=
|
|---|
| 2313 | )
|
|---|
| 2314 | AC_SUBST(USE_RTTI)
|
|---|
| 2315 |
|
|---|
| 2316 | case "$host" in
|
|---|
| 2317 | *-*-irix*) test "$GXX" = yes && CXXFLAGS="$CXXFLAGS -D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS" ;;
|
|---|
| 2318 | *-*-sysv4.2uw*) CXXFLAGS="$CXXFLAGS -D_UNIXWARE";;
|
|---|
| 2319 | *-*-sysv5uw7*) CXXFLAGS="$CXXFLAGS -D_UNIXWARE7";;
|
|---|
| 2320 | *-*-solaris*)
|
|---|
| 2321 | if test "$GXX" = yes; then
|
|---|
| 2322 | libstdcpp=`gcc -print-file-name=libstdc++.so`
|
|---|
| 2323 | if test ! -f $libstdcpp; then
|
|---|
| 2324 | 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])
|
|---|
| 2325 | fi
|
|---|
| 2326 | fi
|
|---|
| 2327 | ;;
|
|---|
| 2328 | esac
|
|---|
| 2329 |
|
|---|
| 2330 | if test -n "$USER_CXXFLAGS"; then
|
|---|
| 2331 | CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
|
|---|
| 2332 | fi
|
|---|
| 2333 |
|
|---|
| 2334 | AC_VALIDIFY_CXXFLAGS
|
|---|
| 2335 |
|
|---|
| 2336 | AC_MSG_CHECKING(how to run the C++ preprocessor)
|
|---|
| 2337 | if test -z "$CXXCPP"; then
|
|---|
| 2338 | AC_CACHE_VAL(ac_cv_prog_CXXCPP,
|
|---|
| 2339 | [
|
|---|
| 2340 | AC_LANG_SAVE[]dnl
|
|---|
| 2341 | AC_LANG_CPLUSPLUS[]dnl
|
|---|
| 2342 | CXXCPP="${CXX-g++} -E"
|
|---|
| 2343 | AC_TRY_CPP([#include <stdlib.h>], , CXXCPP=/lib/cpp)
|
|---|
| 2344 | ac_cv_prog_CXXCPP="$CXXCPP"
|
|---|
| 2345 | AC_LANG_RESTORE[]dnl
|
|---|
| 2346 | ])dnl
|
|---|
| 2347 | CXXCPP="$ac_cv_prog_CXXCPP"
|
|---|
| 2348 | fi
|
|---|
| 2349 | AC_MSG_RESULT($CXXCPP)
|
|---|
| 2350 | AC_SUBST(CXXCPP)dnl
|
|---|
| 2351 |
|
|---|
| 2352 | # the following is to allow programs, that are known to
|
|---|
| 2353 | # have problems when compiled with -O2
|
|---|
| 2354 | if test -n "$CXXFLAGS"; then
|
|---|
| 2355 | kde_safe_IFS=$IFS
|
|---|
| 2356 | IFS=" "
|
|---|
| 2357 | NOOPT_CXXFLAGS=""
|
|---|
| 2358 | for i in $CXXFLAGS; do
|
|---|
| 2359 | case $i in
|
|---|
| 2360 | -O*)
|
|---|
| 2361 | ;;
|
|---|
| 2362 | *)
|
|---|
| 2363 | NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i"
|
|---|
| 2364 | ;;
|
|---|
| 2365 | esac
|
|---|
| 2366 | done
|
|---|
| 2367 | IFS=$kde_safe_IFS
|
|---|
| 2368 | fi
|
|---|
| 2369 | AC_SUBST(NOOPT_CXXFLAGS)
|
|---|
| 2370 |
|
|---|
| 2371 | KDE_CHECK_FINAL
|
|---|
| 2372 |
|
|---|
| 2373 | ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
|
|---|
| 2374 |
|
|---|
| 2375 | KDE_CXXFLAGS=
|
|---|
| 2376 | AC_SUBST(KDE_CXXFLAGS)
|
|---|
| 2377 | ])
|
|---|
| 2378 |
|
|---|
| 2379 | AC_DEFUN(KDE_ADD_DEPENDENCIES,
|
|---|
| 2380 | [
|
|---|
| 2381 | [A]M_DEPENDENCIES(CC)
|
|---|
| 2382 | [A]M_DEPENDENCIES(CXX)
|
|---|
| 2383 | ])
|
|---|
| 2384 |
|
|---|
| 2385 | dnl just a wrapper to clean up configure.in
|
|---|
| 2386 | AC_DEFUN(KDE_PROG_LIBTOOL,
|
|---|
| 2387 | [
|
|---|
| 2388 | AC_REQUIRE([AC_CHECK_COMPILERS])
|
|---|
| 2389 | AC_REQUIRE([AC_ENABLE_SHARED])
|
|---|
| 2390 | AC_REQUIRE([AC_ENABLE_STATIC])
|
|---|
| 2391 |
|
|---|
| 2392 | AC_REQUIRE([AC_LIBTOOL_DLOPEN])
|
|---|
| 2393 |
|
|---|
| 2394 | AC_LANG_SAVE
|
|---|
| 2395 | AC_LANG_C
|
|---|
| 2396 | AC_OBJEXT
|
|---|
| 2397 | AC_EXEEXT
|
|---|
| 2398 | AC_LANG_RESTORE
|
|---|
| 2399 |
|
|---|
| 2400 | AM_PROG_LIBTOOL
|
|---|
| 2401 | AC_LIBTOOL_CXX
|
|---|
| 2402 |
|
|---|
| 2403 | LIBTOOL_SHELL="/bin/sh ./libtool"
|
|---|
| 2404 | # LIBTOOL="$LIBTOOL --silent"
|
|---|
| 2405 | KDE_PLUGIN="-avoid-version -module -no-undefined"
|
|---|
| 2406 | AC_SUBST(KDE_PLUGIN)
|
|---|
| 2407 | ])
|
|---|
| 2408 |
|
|---|
| 2409 | AC_DEFUN(KDE_CHECK_TYPES,
|
|---|
| 2410 | [ AC_CHECK_SIZEOF(int, 4)dnl
|
|---|
| 2411 | AC_CHECK_SIZEOF(long, 4)dnl
|
|---|
| 2412 | AC_CHECK_SIZEOF(char *, 4)dnl
|
|---|
| 2413 | ])dnl
|
|---|
| 2414 |
|
|---|
| 2415 | AC_DEFUN(KDE_DO_IT_ALL,
|
|---|
| 2416 | [
|
|---|
| 2417 | AC_CANONICAL_SYSTEM
|
|---|
| 2418 | AC_ARG_PROGRAM
|
|---|
| 2419 | AM_INIT_AUTOMAKE($1, $2)
|
|---|
| 2420 | AM_DISABLE_LIBRARIES
|
|---|
| 2421 | AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
|
|---|
| 2422 | AC_CHECK_COMPILERS
|
|---|
| 2423 | KDE_PROG_LIBTOOL
|
|---|
| 2424 | AM_KDE_WITH_NLS
|
|---|
| 2425 | AC_PATH_KDE
|
|---|
| 2426 | ])
|
|---|
| 2427 |
|
|---|
| 2428 | AC_DEFUN(AC_CHECK_RPATH,
|
|---|
| 2429 | [
|
|---|
| 2430 | AC_MSG_CHECKING(for rpath)
|
|---|
| 2431 | AC_ARG_ENABLE(rpath,
|
|---|
| 2432 | [ --disable-rpath do not use the rpath feature of ld],
|
|---|
| 2433 | USE_RPATH=$enableval, USE_RPATH=yes)
|
|---|
| 2434 |
|
|---|
| 2435 | if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
|
|---|
| 2436 |
|
|---|
| 2437 | KDE_RPATH="-R \$(kde_libraries)"
|
|---|
| 2438 |
|
|---|
| 2439 | if test -n "$qt_libraries"; then
|
|---|
| 2440 | KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
|
|---|
| 2441 | fi
|
|---|
| 2442 | dnl $x_libraries is set to /usr/lib in case
|
|---|
| 2443 | if test -n "$X_LDFLAGS"; then
|
|---|
| 2444 | KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
|
|---|
| 2445 | fi
|
|---|
| 2446 | if test -n "$KDE_EXTRA_RPATH"; then
|
|---|
| 2447 | KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
|
|---|
| 2448 | fi
|
|---|
| 2449 | fi
|
|---|
| 2450 | AC_SUBST(KDE_EXTRA_RPATH)
|
|---|
| 2451 | AC_SUBST(KDE_RPATH)
|
|---|
| 2452 | AC_MSG_RESULT($USE_RPATH)
|
|---|
| 2453 | ])
|
|---|
| 2454 |
|
|---|
| 2455 | dnl Check for the type of the third argument of getsockname
|
|---|
| 2456 | AC_DEFUN(AC_CHECK_KSIZE_T,
|
|---|
| 2457 | [AC_MSG_CHECKING(for the third argument of getsockname)
|
|---|
| 2458 | AC_CACHE_VAL(ac_cv_ksize_t,
|
|---|
| 2459 | AC_LANG_SAVE
|
|---|
| 2460 | AC_LANG_CPLUSPLUS
|
|---|
| 2461 | [AC_TRY_COMPILE([
|
|---|
| 2462 | #include <sys/types.h>
|
|---|
| 2463 | #include <sys/socket.h>
|
|---|
| 2464 | ],[
|
|---|
| 2465 | socklen_t a=0;
|
|---|
| 2466 | getsockname(0,(struct sockaddr*)0, &a);
|
|---|
| 2467 | ],
|
|---|
| 2468 | ac_cv_ksize_t=socklen_t,
|
|---|
| 2469 | ac_cv_ksize_t=)
|
|---|
| 2470 | if test -z "$ac_cv_ksize_t"; then
|
|---|
| 2471 | ac_safe_cxxflags="$CXXFLAGS"
|
|---|
| 2472 | if test "$GCC" = "yes"; then
|
|---|
| 2473 | CXXFLAGS="-Werror $CXXFLAGS"
|
|---|
| 2474 | fi
|
|---|
| 2475 | AC_TRY_COMPILE([
|
|---|
| 2476 | #include <sys/types.h>
|
|---|
| 2477 | #include <sys/socket.h>
|
|---|
| 2478 | ],[
|
|---|
| 2479 | int a=0;
|
|---|
| 2480 | getsockname(0,(struct sockaddr*)0, &a);
|
|---|
| 2481 | ],
|
|---|
| 2482 | ac_cv_ksize_t=int,
|
|---|
| 2483 | ac_cv_ksize_t=size_t)
|
|---|
| 2484 | CXXFLAGS="$ac_safe_cxxflags"
|
|---|
| 2485 | fi
|
|---|
| 2486 | AC_LANG_RESTORE
|
|---|
| 2487 | ])
|
|---|
| 2488 |
|
|---|
| 2489 | if test -z "$ac_cv_ksize_t"; then
|
|---|
| 2490 | ac_cv_ksize_t=int
|
|---|
| 2491 | fi
|
|---|
| 2492 |
|
|---|
| 2493 | AC_MSG_RESULT($ac_cv_ksize_t)
|
|---|
| 2494 | AC_DEFINE_UNQUOTED(ksize_t, $ac_cv_ksize_t,
|
|---|
| 2495 | [Define the type of the third argument for getsockname]
|
|---|
| 2496 | )
|
|---|
| 2497 |
|
|---|
| 2498 | ])
|
|---|
| 2499 |
|
|---|
| 2500 | dnl This is a merge of some macros out of the gettext aclocal.m4
|
|---|
| 2501 | dnl since we don't need anything, I took the things we need
|
|---|
| 2502 | dnl the copyright for them is:
|
|---|
| 2503 | dnl >
|
|---|
| 2504 | dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
|---|
| 2505 | dnl This Makefile.in is free software; the Free Software Foundation
|
|---|
| 2506 | dnl gives unlimited permission to copy and/or distribute it,
|
|---|
| 2507 | dnl with or without modifications, as long as this notice is preserved.
|
|---|
| 2508 |
|
|---|
| 2509 | dnl This program is distributed in the hope that it will be useful,
|
|---|
| 2510 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|---|
| 2511 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|---|
| 2512 | dnl PARTICULAR PURPOSE.
|
|---|
| 2513 | dnl >
|
|---|
| 2514 | dnl for this file it is relicensed under LGPL
|
|---|
| 2515 |
|
|---|
| 2516 | AC_DEFUN(AM_KDE_WITH_NLS,
|
|---|
| 2517 | [
|
|---|
| 2518 | dnl If we use NLS figure out what method
|
|---|
| 2519 |
|
|---|
| 2520 | AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
|
|---|
| 2521 | [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
|
|---|
| 2522 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
|---|
| 2523 |
|
|---|
| 2524 | if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
|
|---|
| 2525 | AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
|
|---|
| 2526 | GMSGFMT=":"
|
|---|
| 2527 | fi
|
|---|
| 2528 | MSGFMT=$GMSGFMT
|
|---|
| 2529 | AC_SUBST(GMSGFMT)
|
|---|
| 2530 | AC_SUBST(MSGFMT)
|
|---|
| 2531 |
|
|---|
| 2532 | AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
|
|---|
| 2533 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
|---|
| 2534 |
|
|---|
| 2535 | dnl Test whether we really found GNU xgettext.
|
|---|
| 2536 | if test "$XGETTEXT" != ":"; then
|
|---|
| 2537 | dnl If it is no GNU xgettext we define it as : so that the
|
|---|
| 2538 | dnl Makefiles still can work.
|
|---|
| 2539 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
|---|
| 2540 | : ;
|
|---|
| 2541 | else
|
|---|
| 2542 | AC_MSG_RESULT(
|
|---|
| 2543 | [found xgettext programs is not GNU xgettext; ignore it])
|
|---|
| 2544 | XGETTEXT=":"
|
|---|
| 2545 | fi
|
|---|
| 2546 | fi
|
|---|
| 2547 | AC_SUBST(XGETTEXT)
|
|---|
| 2548 |
|
|---|
| 2549 | ])
|
|---|
| 2550 |
|
|---|
| 2551 | # Search path for a program which passes the given test.
|
|---|
| 2552 | # Ulrich Drepper <drepper@cygnus.com>, 1996.
|
|---|
| 2553 |
|
|---|
| 2554 | # serial 1
|
|---|
| 2555 | # Stephan Kulow: I appended a _KDE against name conflicts
|
|---|
| 2556 |
|
|---|
| 2557 | dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
|
|---|
| 2558 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
|---|
| 2559 | AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
|
|---|
| 2560 | [# Extract the first word of "$2", so it can be a program name with args.
|
|---|
| 2561 | set dummy $2; ac_word=[$]2
|
|---|
| 2562 | AC_MSG_CHECKING([for $ac_word])
|
|---|
| 2563 | AC_CACHE_VAL(ac_cv_path_$1,
|
|---|
| 2564 | [case "[$]$1" in
|
|---|
| 2565 | /*)
|
|---|
| 2566 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
|
|---|
| 2567 | ;;
|
|---|
| 2568 | *)
|
|---|
| 2569 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
|---|
| 2570 | for ac_dir in ifelse([$5], , $PATH, [$5]); do
|
|---|
| 2571 | test -z "$ac_dir" && ac_dir=.
|
|---|
| 2572 | if test -f $ac_dir/$ac_word; then
|
|---|
| 2573 | if [$3]; then
|
|---|
| 2574 | ac_cv_path_$1="$ac_dir/$ac_word"
|
|---|
| 2575 | break
|
|---|
| 2576 | fi
|
|---|
| 2577 | fi
|
|---|
| 2578 | done
|
|---|
| 2579 | IFS="$ac_save_ifs"
|
|---|
| 2580 | dnl If no 4th arg is given, leave the cache variable unset,
|
|---|
| 2581 | dnl so AC_PATH_PROGS will keep looking.
|
|---|
| 2582 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
|
|---|
| 2583 | ])dnl
|
|---|
| 2584 | ;;
|
|---|
| 2585 | esac])dnl
|
|---|
| 2586 | $1="$ac_cv_path_$1"
|
|---|
| 2587 | if test -n "[$]$1"; then
|
|---|
| 2588 | AC_MSG_RESULT([$]$1)
|
|---|
| 2589 | else
|
|---|
| 2590 | AC_MSG_RESULT(no)
|
|---|
| 2591 | fi
|
|---|
| 2592 | AC_SUBST($1)dnl
|
|---|
| 2593 | ])
|
|---|
| 2594 |
|
|---|
| 2595 |
|
|---|
| 2596 | # Check whether LC_MESSAGES is available in <locale.h>.
|
|---|
| 2597 | # Ulrich Drepper <drepper@cygnus.com>, 1995.
|
|---|
| 2598 |
|
|---|
| 2599 | # serial 1
|
|---|
| 2600 |
|
|---|
| 2601 | AC_DEFUN(AM_LC_MESSAGES,
|
|---|
| 2602 | [if test $ac_cv_header_locale_h = yes; then
|
|---|
| 2603 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
|---|
| 2604 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
|---|
| 2605 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
|---|
| 2606 | if test $am_cv_val_LC_MESSAGES = yes; then
|
|---|
| 2607 | AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
|
|---|
| 2608 | fi
|
|---|
| 2609 | fi])
|
|---|
| 2610 |
|
|---|
| 2611 | dnl From Jim Meyering.
|
|---|
| 2612 | dnl FIXME: migrate into libit.
|
|---|
| 2613 |
|
|---|
| 2614 | AC_DEFUN(AM_FUNC_OBSTACK,
|
|---|
| 2615 | [AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
|
|---|
| 2616 | [AC_TRY_LINK([#include "obstack.h"],
|
|---|
| 2617 | [struct obstack *mem;obstack_free(mem,(char *) 0)],
|
|---|
| 2618 | am_cv_func_obstack=yes,
|
|---|
| 2619 | am_cv_func_obstack=no)])
|
|---|
| 2620 | if test $am_cv_func_obstack = yes; then
|
|---|
| 2621 | AC_DEFINE(HAVE_OBSTACK)
|
|---|
| 2622 | else
|
|---|
| 2623 | LIBOBJS="$LIBOBJS obstack.o"
|
|---|
| 2624 | fi
|
|---|
| 2625 | ])
|
|---|
| 2626 |
|
|---|
| 2627 | dnl From Jim Meyering. Use this if you use the GNU error.[ch].
|
|---|
| 2628 | dnl FIXME: Migrate into libit
|
|---|
| 2629 |
|
|---|
| 2630 | AC_DEFUN(AM_FUNC_ERROR_AT_LINE,
|
|---|
| 2631 | [AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
|
|---|
| 2632 | [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
|
|---|
| 2633 | am_cv_lib_error_at_line=yes,
|
|---|
| 2634 | am_cv_lib_error_at_line=no)])
|
|---|
| 2635 | if test $am_cv_lib_error_at_line = no; then
|
|---|
| 2636 | LIBOBJS="$LIBOBJS error.o"
|
|---|
| 2637 | fi
|
|---|
| 2638 | AC_SUBST(LIBOBJS)dnl
|
|---|
| 2639 | ])
|
|---|
| 2640 |
|
|---|
| 2641 | # Macro to add for using GNU gettext.
|
|---|
| 2642 | # Ulrich Drepper <drepper@cygnus.com>, 1995.
|
|---|
| 2643 |
|
|---|
| 2644 | # serial 1
|
|---|
| 2645 | # Stephan Kulow: I put a KDE in it to avoid name conflicts
|
|---|
| 2646 |
|
|---|
| 2647 | AC_DEFUN(AM_KDE_GNU_GETTEXT,
|
|---|
| 2648 | [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
|---|
| 2649 | AC_REQUIRE([AC_PROG_RANLIB])dnl
|
|---|
| 2650 | AC_REQUIRE([AC_HEADER_STDC])dnl
|
|---|
| 2651 | AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
|---|
| 2652 | AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
|---|
| 2653 | AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
|---|
| 2654 | AC_REQUIRE([AC_FUNC_MMAP])dnl
|
|---|
| 2655 | AC_REQUIRE([AM_KDE_WITH_NLS])dnl
|
|---|
| 2656 | AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h string.h values.h alloca.h])
|
|---|
| 2657 | AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
|
|---|
| 2658 | __argz_count __argz_stringify __argz_next])
|
|---|
| 2659 |
|
|---|
| 2660 | AC_MSG_CHECKING(for stpcpy)
|
|---|
| 2661 | AC_CACHE_VAL(kde_cv_func_stpcpy,
|
|---|
| 2662 | [
|
|---|
| 2663 | kde_safe_cxxflags=$CXXFLAGS
|
|---|
| 2664 | CXXFLAGS="-Wmissing-prototypes -Werror"
|
|---|
| 2665 | AC_LANG_SAVE
|
|---|
| 2666 | AC_LANG_CPLUSPLUS
|
|---|
| 2667 | AC_TRY_COMPILE([
|
|---|
| 2668 | #include <string.h>
|
|---|
| 2669 | ],
|
|---|
| 2670 | [
|
|---|
| 2671 | char buffer[200];
|
|---|
| 2672 | stpcpy(buffer, buffer);
|
|---|
| 2673 | ],
|
|---|
| 2674 | kde_cv_func_stpcpy=yes,
|
|---|
| 2675 | kde_cv_func_stpcpy=no)
|
|---|
| 2676 | AC_LANG_RESTORE
|
|---|
| 2677 | CXXFLAGS=$kde_safe_cxxflags
|
|---|
| 2678 | ])
|
|---|
| 2679 | AC_MSG_RESULT($kde_cv_func_stpcpy)
|
|---|
| 2680 | if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
|
|---|
| 2681 | AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
|
|---|
| 2682 | fi
|
|---|
| 2683 |
|
|---|
| 2684 | AM_LC_MESSAGES
|
|---|
| 2685 |
|
|---|
| 2686 | if test "x$CATOBJEXT" != "x"; then
|
|---|
| 2687 | if test "x$ALL_LINGUAS" = "x"; then
|
|---|
| 2688 | LINGUAS=
|
|---|
| 2689 | else
|
|---|
| 2690 | AC_MSG_CHECKING(for catalogs to be installed)
|
|---|
| 2691 | NEW_LINGUAS=
|
|---|
| 2692 | for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
|---|
| 2693 | case "$ALL_LINGUAS" in
|
|---|
| 2694 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
|
|---|
| 2695 | esac
|
|---|
| 2696 | done
|
|---|
| 2697 | LINGUAS=$NEW_LINGUAS
|
|---|
| 2698 | AC_MSG_RESULT($LINGUAS)
|
|---|
| 2699 | fi
|
|---|
| 2700 |
|
|---|
| 2701 | dnl Construct list of names of catalog files to be constructed.
|
|---|
| 2702 | if test -n "$LINGUAS"; then
|
|---|
| 2703 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
|---|
| 2704 | fi
|
|---|
| 2705 | fi
|
|---|
| 2706 |
|
|---|
| 2707 | ])
|
|---|
| 2708 |
|
|---|
| 2709 | AC_DEFUN(AC_HAVE_XPM,
|
|---|
| 2710 | [AC_REQUIRE_CPP()dnl
|
|---|
| 2711 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
|
|---|
| 2712 |
|
|---|
| 2713 | test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
|
|---|
| 2714 | test -z "$XPM_INCLUDE" && XPM_INCLUDE=
|
|---|
| 2715 |
|
|---|
| 2716 | AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM tests],
|
|---|
| 2717 | xpm_test=$withval, xpm_test="yes")
|
|---|
| 2718 | if test "x$xpm_test" = xno; then
|
|---|
| 2719 | ac_cv_have_xpm=no
|
|---|
| 2720 | else
|
|---|
| 2721 | AC_MSG_CHECKING(for XPM)
|
|---|
| 2722 | AC_CACHE_VAL(ac_cv_have_xpm,
|
|---|
| 2723 | [
|
|---|
| 2724 | AC_LANG_C
|
|---|
| 2725 | ac_save_ldflags="$LDFLAGS"
|
|---|
| 2726 | ac_save_cflags="$CFLAGS"
|
|---|
| 2727 | LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
|
|---|
| 2728 | CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
|
|---|
| 2729 | test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
|
|---|
| 2730 | AC_TRY_LINK([#include <X11/xpm.h>],[],
|
|---|
| 2731 | ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
|
|---|
| 2732 | LDFLAGS="$ac_save_ldflags"
|
|---|
| 2733 | CFLAGS="$ac_save_cflags"
|
|---|
| 2734 | ])dnl
|
|---|
| 2735 |
|
|---|
| 2736 | if test "$ac_cv_have_xpm" = no; then
|
|---|
| 2737 | AC_MSG_RESULT(no)
|
|---|
| 2738 | XPM_LDFLAGS=""
|
|---|
| 2739 | XPMINC=""
|
|---|
| 2740 | $2
|
|---|
| 2741 | else
|
|---|
| 2742 | AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
|
|---|
| 2743 | if test "$XPM_LDFLAGS" = ""; then
|
|---|
| 2744 | XPMLIB='-lXpm $(LIB_X11)'
|
|---|
| 2745 | else
|
|---|
| 2746 | XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
|
|---|
| 2747 | fi
|
|---|
| 2748 | if test "$XPM_INCLUDE" = ""; then
|
|---|
| 2749 | XPMINC=""
|
|---|
| 2750 | else
|
|---|
| 2751 | XPMINC="-I$XPM_INCLUDE"
|
|---|
| 2752 | fi
|
|---|
| 2753 | AC_MSG_RESULT(yes)
|
|---|
| 2754 | $1
|
|---|
| 2755 | fi
|
|---|
| 2756 | fi
|
|---|
| 2757 | AC_SUBST(XPMINC)
|
|---|
| 2758 | AC_SUBST(XPMLIB)
|
|---|
| 2759 | ])
|
|---|
| 2760 |
|
|---|
| 2761 | AC_DEFUN(AC_HAVE_DPMS,
|
|---|
| 2762 | [AC_REQUIRE_CPP()dnl
|
|---|
| 2763 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
|
|---|
| 2764 |
|
|---|
| 2765 | test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
|
|---|
| 2766 | test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
|
|---|
| 2767 | DPMS_LIB=
|
|---|
| 2768 |
|
|---|
| 2769 | AC_ARG_WITH(dpms, [ --without-dpms disable DPMS power saving],
|
|---|
| 2770 | dpms_test=$withval, dpms_test="yes")
|
|---|
| 2771 | if test "x$dpms_test" = xno; then
|
|---|
| 2772 | ac_cv_have_dpms=no
|
|---|
| 2773 | else
|
|---|
| 2774 | AC_MSG_CHECKING(for DPMS)
|
|---|
| 2775 | dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
|
|---|
| 2776 | dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
|
|---|
| 2777 | AC_CACHE_VAL(ac_cv_have_dpms,
|
|---|
| 2778 | [
|
|---|
| 2779 | AC_LANG_C
|
|---|
| 2780 | ac_save_ldflags="$LDFLAGS"
|
|---|
| 2781 | ac_save_cflags="$CFLAGS"
|
|---|
| 2782 | ac_save_libs="$LIBS"
|
|---|
| 2783 | LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
|
|---|
| 2784 | CFLAGS="$CFLAGS $X_INCLUDES"
|
|---|
| 2785 | test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
|
|---|
| 2786 | AC_TRY_LINK([
|
|---|
| 2787 | #include <X11/Xproto.h>
|
|---|
| 2788 | #include <X11/X.h>
|
|---|
| 2789 | #include <X11/Xlib.h>
|
|---|
| 2790 | #include <X11/extensions/dpms.h>
|
|---|
| 2791 | int foo_test_dpms()
|
|---|
| 2792 | { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
|
|---|
| 2793 | ac_cv_have_dpms="yes", [
|
|---|
| 2794 | LDFLAGS="$ac_save_ldflags"
|
|---|
| 2795 | CFLAGS="$ac_save_cflags"
|
|---|
| 2796 | LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
|
|---|
| 2797 | LIBS="$LIBS -lXdpms"
|
|---|
| 2798 | CFLAGS="$CFLAGS $X_INCLUDES"
|
|---|
| 2799 | test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
|
|---|
| 2800 | AC_TRY_LINK([
|
|---|
| 2801 | #include <X11/Xproto.h>
|
|---|
| 2802 | #include <X11/X.h>
|
|---|
| 2803 | #include <X11/Xlib.h>
|
|---|
| 2804 | #include <X11/extensions/dpms.h>
|
|---|
| 2805 | int foo_test_dpms()
|
|---|
| 2806 | { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
|
|---|
| 2807 | [
|
|---|
| 2808 | ac_cv_have_dpms="-lXdpms"
|
|---|
| 2809 | ],ac_cv_have_dpms="no")
|
|---|
| 2810 | ])
|
|---|
| 2811 | LDFLAGS="$ac_save_ldflags"
|
|---|
| 2812 | CFLAGS="$ac_save_cflags"
|
|---|
| 2813 | LIBS="$ac_save_libs"
|
|---|
| 2814 | ])dnl
|
|---|
| 2815 |
|
|---|
| 2816 | if test "$ac_cv_have_dpms" = no; then
|
|---|
| 2817 | AC_MSG_RESULT(no)
|
|---|
| 2818 | DPMS_LDFLAGS=""
|
|---|
| 2819 | DPMSINC=""
|
|---|
| 2820 | $2
|
|---|
| 2821 | else
|
|---|
| 2822 | AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
|
|---|
| 2823 | if test "$ac_cv_have_dpms" = "-lXdpms"; then
|
|---|
| 2824 | DPMS_LIB="-lXdpms"
|
|---|
| 2825 | fi
|
|---|
| 2826 | if test "$DPMS_LDFLAGS" = ""; then
|
|---|
| 2827 | DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
|
|---|
| 2828 | else
|
|---|
| 2829 | DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
|
|---|
| 2830 | fi
|
|---|
| 2831 | if test "$DPMS_INCLUDE" = ""; then
|
|---|
| 2832 | DPMSINC=""
|
|---|
| 2833 | else
|
|---|
| 2834 | DPMSINC="-I$DPMS_INCLUDE"
|
|---|
| 2835 | fi
|
|---|
| 2836 | AC_MSG_RESULT(yes)
|
|---|
| 2837 | $1
|
|---|
| 2838 | fi
|
|---|
| 2839 | fi
|
|---|
| 2840 | AC_SUBST(DPMSINC)
|
|---|
| 2841 | AC_SUBST(DPMSLIB)
|
|---|
| 2842 | ])
|
|---|
| 2843 |
|
|---|
| 2844 | AC_DEFUN(AC_HAVE_GL,
|
|---|
| 2845 | [AC_REQUIRE_CPP()dnl
|
|---|
| 2846 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
|
|---|
| 2847 |
|
|---|
| 2848 | test -z "$GL_LDFLAGS" && GL_LDFLAGS=
|
|---|
| 2849 | test -z "$GL_INCLUDE" && GL_INCLUDE=
|
|---|
| 2850 |
|
|---|
| 2851 | AC_ARG_WITH(gl, [ --without-gl disable 3D GL modes],
|
|---|
| 2852 | gl_test=$withval, gl_test="yes")
|
|---|
| 2853 | if test "x$gl_test" = xno; then
|
|---|
| 2854 | ac_cv_have_gl=no
|
|---|
| 2855 | else
|
|---|
| 2856 | AC_MSG_CHECKING(for GL)
|
|---|
| 2857 | AC_CACHE_VAL(ac_cv_have_gl,
|
|---|
| 2858 | [
|
|---|
| 2859 | AC_LANG_C
|
|---|
| 2860 | ac_save_ldflags="$LDFLAGS"
|
|---|
| 2861 | ac_save_cflags="$CFLAGS"
|
|---|
| 2862 | LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU -lX11 -lXext -lm $LIBSOCKET"
|
|---|
| 2863 | CFLAGS="$CFLAGS $X_INCLUDES"
|
|---|
| 2864 | test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
|
|---|
| 2865 | AC_TRY_LINK([#include <GL/gl.h>
|
|---|
| 2866 | #include <GL/glu.h>
|
|---|
| 2867 | ], [],
|
|---|
| 2868 | ac_cv_have_gl="mesa", ac_cv_have_gl="no")
|
|---|
| 2869 | if test "x$ac_cv_have_gl" = "xno"; then
|
|---|
| 2870 | LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU -lX11 -lXext -lm $LIBSOCKET"
|
|---|
| 2871 | CFLAGS="$ac_save_cflags $X_INCLUDES"
|
|---|
| 2872 | test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
|
|---|
| 2873 | AC_TRY_LINK([#include <GL/gl.h>
|
|---|
| 2874 | #include <GL/glu.h>
|
|---|
| 2875 | ], [],
|
|---|
| 2876 | ac_cv_have_gl="yes", ac_cv_have_gl="no")
|
|---|
| 2877 | fi
|
|---|
| 2878 | LDFLAGS="$ac_save_ldflags"
|
|---|
| 2879 | CFLAGS="$ac_save_cflags"
|
|---|
| 2880 | ])dnl
|
|---|
| 2881 |
|
|---|
| 2882 | if test "$ac_cv_have_gl" = "no"; then
|
|---|
| 2883 | AC_MSG_RESULT(no)
|
|---|
| 2884 | GL_LDFLAGS=""
|
|---|
| 2885 | GLINC=""
|
|---|
| 2886 | $2
|
|---|
| 2887 | else
|
|---|
| 2888 | AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
|
|---|
| 2889 | if test "$GL_LDFLAGS" = ""; then
|
|---|
| 2890 | if test "$ac_cv_have_gl" = "mesa"; then
|
|---|
| 2891 | GLLIB='-lMesaGL -lMesaGLU $(LIB_X11)'
|
|---|
| 2892 | else
|
|---|
| 2893 | GLLIB='-lGL -lGLU $(LIB_X11)'
|
|---|
| 2894 | fi
|
|---|
| 2895 | else
|
|---|
| 2896 | if test "$ac_cv_have_gl" = "mesa"; then
|
|---|
| 2897 | GLLIB="$GL_LDFLAGS -lMesaGL -lMesaGLU "'$(LIB_X11)'
|
|---|
| 2898 | else
|
|---|
| 2899 | GLLIB="$GL_LDFLAGS -lGL -lGLU "'$(LIB_X11)'
|
|---|
| 2900 | fi
|
|---|
| 2901 | fi
|
|---|
| 2902 | if test "$GL_INCLUDE" = ""; then
|
|---|
| 2903 | GLINC=""
|
|---|
| 2904 | else
|
|---|
| 2905 | GLINC="-I$GL_INCLUDE"
|
|---|
| 2906 | fi
|
|---|
| 2907 | AC_MSG_RESULT($ac_cv_have_gl)
|
|---|
| 2908 | $1
|
|---|
| 2909 | fi
|
|---|
| 2910 | fi
|
|---|
| 2911 | AC_SUBST(GLINC)
|
|---|
| 2912 | AC_SUBST(GLLIB)
|
|---|
| 2913 | ])
|
|---|
| 2914 |
|
|---|
| 2915 | dnl PAM pam
|
|---|
| 2916 |
|
|---|
| 2917 | dnl Should test for PAM (Pluggable Authentication Modules)
|
|---|
| 2918 | AC_DEFUN(AC_PATH_PAM_DIRECT,
|
|---|
| 2919 | [
|
|---|
| 2920 | test -z "$pam_direct_test_library" && pam_direct_test_library=pam
|
|---|
| 2921 | test -z "$pam_direct_test_include" && pam_direct_test_include=security/pam_appl.h
|
|---|
| 2922 |
|
|---|
| 2923 | for ac_dir in \
|
|---|
| 2924 | \
|
|---|
| 2925 | /usr/local/include \
|
|---|
| 2926 | /usr/include \
|
|---|
| 2927 | /usr/unsupported/include \
|
|---|
| 2928 | /opt/include \
|
|---|
| 2929 | /usr/pam/include \
|
|---|
| 2930 | /usr/local/pam/include \
|
|---|
| 2931 | /usr/lib/pam/include \
|
|---|
| 2932 | \
|
|---|
| 2933 | $extra_include \
|
|---|
| 2934 | ; \
|
|---|
| 2935 | do
|
|---|
| 2936 | if test -r "$ac_dir/$pam_direct_test_include"; then
|
|---|
| 2937 | no_pam= ac_pam_includes=$ac_dir
|
|---|
| 2938 | break
|
|---|
| 2939 | fi
|
|---|
| 2940 | done
|
|---|
| 2941 |
|
|---|
| 2942 | # First see if replacing the include by lib works.
|
|---|
| 2943 | for ac_dir in `echo "$ac_pam_includes" | sed s/include/lib/` \
|
|---|
| 2944 | \
|
|---|
| 2945 | /lib \
|
|---|
| 2946 | /usr/lib \
|
|---|
| 2947 | /usr/local/lib \
|
|---|
| 2948 | /usr/unsupported/lib \
|
|---|
| 2949 | /lib/security \
|
|---|
| 2950 | /usr/security/lib \
|
|---|
| 2951 | $extra_lib \
|
|---|
| 2952 | ; \
|
|---|
| 2953 | do
|
|---|
| 2954 | for ac_extension in a so sl; do
|
|---|
| 2955 | if test -r $ac_dir/lib${pam_direct_test_library}.$ac_extension; then
|
|---|
| 2956 | no_pam= ac_pam_libraries=$ac_dir
|
|---|
| 2957 | break 2
|
|---|
| 2958 | fi
|
|---|
| 2959 | done
|
|---|
| 2960 | done
|
|---|
| 2961 | ])
|
|---|
| 2962 |
|
|---|
| 2963 | AC_DEFUN(AC_PATH_PAM,
|
|---|
| 2964 | [
|
|---|
| 2965 | AC_REQUIRE([KDE_CHECK_LIBDL])
|
|---|
| 2966 | AC_REQUIRE_CPP()dnl
|
|---|
| 2967 |
|
|---|
| 2968 | dnl AC_CHECK_LIB(pam_misc, main, [PAM_MISC_LIB="-lpam_misc"
|
|---|
| 2969 | dnl AC_DEFINE_UNQUOTED(HAVE_PAM_MISC, 1, [Define if you have a PAM implementation with the pam_misc library])], [], [-lpam $LIBDL])
|
|---|
| 2970 |
|
|---|
| 2971 | AC_MSG_CHECKING(for PAM)
|
|---|
| 2972 | AC_ARG_WITH(pam,
|
|---|
| 2973 | [ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]],
|
|---|
| 2974 | [
|
|---|
| 2975 | if test "x$withval" = "xyes"; then
|
|---|
| 2976 | no_pam=
|
|---|
| 2977 | default_pam=yes
|
|---|
| 2978 | elif test "x$withval" = "xno"; then
|
|---|
| 2979 | no_pam=yes
|
|---|
| 2980 | else
|
|---|
| 2981 | no_pam=
|
|---|
| 2982 | pam_service="$withval"
|
|---|
| 2983 | if test -z "$pam_service"; then
|
|---|
| 2984 | default_pam=yes
|
|---|
| 2985 | else
|
|---|
| 2986 | default_pam=
|
|---|
| 2987 | fi
|
|---|
| 2988 | fi
|
|---|
| 2989 | ], no_pam=yes
|
|---|
| 2990 | )
|
|---|
| 2991 |
|
|---|
| 2992 | if test ! "$no_pam" = yes; then
|
|---|
| 2993 |
|
|---|
| 2994 | AC_CACHE_VAL(ac_cv_path_pam,
|
|---|
| 2995 | [
|
|---|
| 2996 | ac_pam_includes=NONE
|
|---|
| 2997 | ac_pam_libraries=NONE
|
|---|
| 2998 | if test -z "$pam_libraries"; then
|
|---|
| 2999 | pam_libraries=NONE
|
|---|
| 3000 | fi
|
|---|
| 3001 | if test -z "$pam_includes"; then
|
|---|
| 3002 | pam_includes=NONE
|
|---|
| 3003 | fi
|
|---|
| 3004 |
|
|---|
| 3005 | AC_PATH_PAM_DIRECT
|
|---|
| 3006 |
|
|---|
| 3007 | test "x$pam_includes" = xNONE && pam_includes=$ac_pam_includes
|
|---|
| 3008 | test "x$pam_libraries" = xNONE && pam_libraries=$ac_pam_libraries
|
|---|
| 3009 |
|
|---|
| 3010 | if test ! "x$pam_includes" = xNONE && test ! "x$pam_libraries" = xNONE; then
|
|---|
| 3011 | ac_pam_libs="-lpam $PAM_MISC_LIB $LIBDL"
|
|---|
| 3012 | ac_cv_path_pam="no_pam= ac_pam_includes=$ac_pam_includes ac_pam_libraries=$ac_pam_libraries ac_pam_libs=\"$ac_pam_libs\""
|
|---|
| 3013 | else
|
|---|
| 3014 | ac_cv_path_pam="no_pam=yes"
|
|---|
| 3015 | fi
|
|---|
| 3016 | ])
|
|---|
| 3017 |
|
|---|
| 3018 | eval "$ac_cv_path_pam"
|
|---|
| 3019 |
|
|---|
| 3020 | fi
|
|---|
| 3021 |
|
|---|
| 3022 | if test "$no_pam" = yes; then
|
|---|
| 3023 | AC_MSG_RESULT(no)
|
|---|
| 3024 | else
|
|---|
| 3025 | AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules); Redhat-Users!])
|
|---|
| 3026 | PAMLIBS="$ac_pam_libs"
|
|---|
| 3027 | test "x$pam_includes" = xNONE && pam_includes=$ac_pam_includes
|
|---|
| 3028 | test "x$pam_libraries" = xNONE && pam_libraries=$ac_pam_libraries
|
|---|
| 3029 | AC_MSG_RESULT([libraries $pam_libraries, headers $pam_includes])
|
|---|
| 3030 | if test "$default_pam" = yes; then
|
|---|
| 3031 | AC_MSG_RESULT(["default pam service name will be used"])
|
|---|
| 3032 | else
|
|---|
| 3033 | AC_DEFINE_UNQUOTED(KDE_PAM_SERVICE,"$pam_service", [Define to change the default name of the PAM service used by KDE])
|
|---|
| 3034 | AC_MSG_RESULT(["pam service name will be: " $pam_service])
|
|---|
| 3035 | fi
|
|---|
| 3036 | dnl test whether struct pam_message is const (Linux) or not (Sun)
|
|---|
| 3037 | pam_appl_h="$ac_pam_includes/security/pam_appl.h"
|
|---|
| 3038 | AC_MSG_CHECKING(for const pam_message)
|
|---|
| 3039 | AC_EGREP_HEADER([struct pam_message],
|
|---|
| 3040 | $pam_appl_h,
|
|---|
| 3041 | [ AC_EGREP_HEADER([const struct pam_message],
|
|---|
| 3042 | $pam_appl_h,
|
|---|
| 3043 | [AC_MSG_RESULT(["const: Linux-type PAM"]) ],
|
|---|
| 3044 | [AC_MSG_RESULT(["nonconst: Sun-type PAM"])
|
|---|
| 3045 | AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
|
|---|
| 3046 | )],
|
|---|
| 3047 | [AC_MSG_RESULT(["not found - assume const, Linux-type PAM"])]
|
|---|
| 3048 | )
|
|---|
| 3049 | fi
|
|---|
| 3050 |
|
|---|
| 3051 | if test "x$pam_libraries" != x && test "x$pam_libraries" != xNONE ; then
|
|---|
| 3052 | PAMLIBPATHS="-L$pam_libraries"
|
|---|
| 3053 | fi
|
|---|
| 3054 | if test "x$pam_includes" != x && test "x$pam_includes" != xNONE ; then
|
|---|
| 3055 | PAMINC="-I$pam_includes"
|
|---|
| 3056 | fi
|
|---|
| 3057 |
|
|---|
| 3058 | AC_SUBST(PAMINC)
|
|---|
| 3059 | AC_SUBST(PAMLIBS)
|
|---|
| 3060 | AC_SUBST(PAMLIBPATHS)
|
|---|
| 3061 |
|
|---|
| 3062 | ])
|
|---|
| 3063 |
|
|---|
| 3064 | AC_DEFUN(KDE_CHECK_LIBDL,
|
|---|
| 3065 | [
|
|---|
| 3066 | AC_CHECK_LIB(dl, dlopen, [
|
|---|
| 3067 | LIBDL="-ldl"
|
|---|
| 3068 | ac_cv_have_dlfcn=yes
|
|---|
| 3069 | ])
|
|---|
| 3070 |
|
|---|
| 3071 | AC_CHECK_LIB(dld, shl_unload, [
|
|---|
| 3072 | LIBDL="-ldld"
|
|---|
| 3073 | ac_cv_have_shload=yes
|
|---|
| 3074 | ])
|
|---|
| 3075 |
|
|---|
| 3076 | AC_SUBST(LIBDL)
|
|---|
| 3077 | ])
|
|---|
| 3078 |
|
|---|
| 3079 | AC_DEFUN(KDE_CHECK_DLOPEN,
|
|---|
| 3080 | [
|
|---|
| 3081 | KDE_CHECK_LIBDL
|
|---|
| 3082 | AC_CHECK_HEADERS(dlfcn.h dl.h)
|
|---|
| 3083 | if test "$ac_cv_header_dlfcn_h" = "no"; then
|
|---|
| 3084 | ac_cv_have_dlfcn=no
|
|---|
| 3085 | fi
|
|---|
| 3086 |
|
|---|
| 3087 | if test "$ac_cv_header_dl_h" = "no"; then
|
|---|
| 3088 | ac_cv_have_shload=no
|
|---|
| 3089 | fi
|
|---|
| 3090 |
|
|---|
| 3091 | dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
|
|---|
| 3092 | dnl (MM)
|
|---|
| 3093 | AC_ARG_ENABLE(dlopen,
|
|---|
| 3094 | [ --disable-dlopen link statically [default=no]] ,
|
|---|
| 3095 | enable_dlopen=$enableval,
|
|---|
| 3096 | enable_dlopen=yes)
|
|---|
| 3097 |
|
|---|
| 3098 | # override the user's opinion, if we know it better ;)
|
|---|
| 3099 | if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
|
|---|
| 3100 | enable_dlopen=no
|
|---|
| 3101 | fi
|
|---|
| 3102 |
|
|---|
| 3103 | if test "$ac_cv_have_dlfcn" = "yes"; then
|
|---|
| 3104 | AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
|
|---|
| 3105 | fi
|
|---|
| 3106 |
|
|---|
| 3107 | if test "$ac_cv_have_shload" = "yes"; then
|
|---|
| 3108 | AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
|
|---|
| 3109 | fi
|
|---|
| 3110 |
|
|---|
| 3111 | if test "$enable_dlopen" = no ; then
|
|---|
| 3112 | test -n "$1" && eval $1
|
|---|
| 3113 | else
|
|---|
| 3114 | test -n "$2" && eval $2
|
|---|
| 3115 | fi
|
|---|
| 3116 |
|
|---|
| 3117 | ])
|
|---|
| 3118 |
|
|---|
| 3119 | AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
|
|---|
| 3120 | [
|
|---|
| 3121 | KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
|
|---|
| 3122 | KDE_PROG_LIBTOOL
|
|---|
| 3123 | AC_MSG_CHECKING([dynamic loading])
|
|---|
| 3124 | eval "`egrep '^build_libtool_libs=' libtool`"
|
|---|
| 3125 | if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
|
|---|
| 3126 | dynamic_loading=yes
|
|---|
| 3127 | AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
|
|---|
| 3128 | else
|
|---|
| 3129 | dynamic_loading=no
|
|---|
| 3130 | fi
|
|---|
| 3131 | AC_MSG_RESULT($dynamic_loading)
|
|---|
| 3132 | if test "$dynamic_loading" = "yes"; then
|
|---|
| 3133 | $1
|
|---|
| 3134 | else
|
|---|
| 3135 | $2
|
|---|
| 3136 | fi
|
|---|
| 3137 | ])
|
|---|
| 3138 |
|
|---|
| 3139 | AC_DEFUN(KDE_ADD_INCLUDES,
|
|---|
| 3140 | [
|
|---|
| 3141 | if test -z "$1"; then
|
|---|
| 3142 | test_include="Pix.h"
|
|---|
| 3143 | else
|
|---|
| 3144 | test_include="$1"
|
|---|
| 3145 | fi
|
|---|
| 3146 |
|
|---|
| 3147 | AC_MSG_CHECKING([for libg++ ($test_include)])
|
|---|
| 3148 |
|
|---|
| 3149 | AC_CACHE_VAL(kde_cv_libgpp_includes,
|
|---|
| 3150 | [
|
|---|
| 3151 | kde_cv_libgpp_includes=no
|
|---|
| 3152 |
|
|---|
| 3153 | for ac_dir in \
|
|---|
| 3154 | \
|
|---|
| 3155 | /usr/include/g++ \
|
|---|
| 3156 | /usr/include \
|
|---|
| 3157 | /usr/unsupported/include \
|
|---|
| 3158 | /opt/include \
|
|---|
| 3159 | $extra_include \
|
|---|
| 3160 | ; \
|
|---|
| 3161 | do
|
|---|
| 3162 | if test -r "$ac_dir/$test_include"; then
|
|---|
| 3163 | kde_cv_libgpp_includes=$ac_dir
|
|---|
| 3164 | break
|
|---|
| 3165 | fi
|
|---|
| 3166 | done
|
|---|
| 3167 | ])
|
|---|
| 3168 |
|
|---|
| 3169 | AC_MSG_RESULT($kde_cv_libgpp_includes)
|
|---|
| 3170 | if test "$kde_cv_libgpp_includes" != "no"; then
|
|---|
| 3171 | all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
|
|---|
| 3172 | fi
|
|---|
| 3173 | ])
|
|---|
| 3174 | ])
|
|---|
| 3175 |
|
|---|
| 3176 |
|
|---|
| 3177 | AC_DEFUN(KDE_CHECK_MICO,
|
|---|
| 3178 | [
|
|---|
| 3179 | AC_REQUIRE([KDE_CHECK_LIBDL])
|
|---|
| 3180 | AC_REQUIRE([KDE_MISC_TESTS])
|
|---|
| 3181 | AC_MSG_CHECKING(for MICO)
|
|---|
| 3182 |
|
|---|
| 3183 | if test -z "$MICODIR"; then
|
|---|
| 3184 | kde_micodir=/usr/local
|
|---|
| 3185 | else
|
|---|
| 3186 | kde_micodir="$MICODIR"
|
|---|
| 3187 | fi
|
|---|
| 3188 |
|
|---|
| 3189 | AC_ARG_WITH(micodir,
|
|---|
| 3190 | [ --with-micodir=micodir where mico is installed ],
|
|---|
| 3191 | kde_micodir=$withval,
|
|---|
| 3192 | kde_micodir=$kde_micodir
|
|---|
| 3193 | )
|
|---|
| 3194 |
|
|---|
| 3195 | AC_CACHE_VAL(kde_cv_mico_incdir,
|
|---|
| 3196 | [
|
|---|
| 3197 | mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
|
|---|
| 3198 | AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
|
|---|
| 3199 |
|
|---|
| 3200 | ])
|
|---|
| 3201 | kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
|
|---|
| 3202 |
|
|---|
| 3203 | if test ! -r $kde_micodir/include/CORBA.h; then
|
|---|
| 3204 | AC_MSG_ERROR([No CORBA.h found, specify another micodir])
|
|---|
| 3205 | fi
|
|---|
| 3206 |
|
|---|
| 3207 | AC_MSG_RESULT($kde_micodir)
|
|---|
| 3208 |
|
|---|
| 3209 | MICO_INCLUDES=-I$kde_micodir/include
|
|---|
| 3210 | AC_SUBST(MICO_INCLUDES)
|
|---|
| 3211 | MICO_LDFLAGS=-L$kde_micodir/lib
|
|---|
| 3212 | AC_SUBST(MICO_LDFLAGS)
|
|---|
| 3213 | micodir=$kde_micodir
|
|---|
| 3214 | AC_SUBST(micodir)
|
|---|
| 3215 |
|
|---|
| 3216 | AC_MSG_CHECKING([for MICO version])
|
|---|
| 3217 | AC_CACHE_VAL(kde_cv_mico_version,
|
|---|
| 3218 | [
|
|---|
| 3219 | AC_LANG_C
|
|---|
| 3220 | cat >conftest.$ac_ext <<EOF
|
|---|
| 3221 | #include <stdio.h>
|
|---|
| 3222 | #include <mico/version.h>
|
|---|
| 3223 | int main() {
|
|---|
| 3224 |
|
|---|
| 3225 | printf("MICO_VERSION=%s\n",MICO_VERSION);
|
|---|
| 3226 | return (0);
|
|---|
| 3227 | }
|
|---|
| 3228 | EOF
|
|---|
| 3229 | ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
|
|---|
| 3230 | if AC_TRY_EVAL(ac_compile); then
|
|---|
| 3231 | if eval `./conftest 2>&5`; then
|
|---|
| 3232 | kde_cv_mico_version=$MICO_VERSION
|
|---|
| 3233 | else
|
|---|
| 3234 | AC_MSG_ERROR([your system is not able to execute a small application to
|
|---|
| 3235 | find MICO version! Check $kde_micodir/include/mico/version.h])
|
|---|
| 3236 | fi
|
|---|
| 3237 | else
|
|---|
| 3238 | AC_MSG_ERROR([your system is not able to compile a small application to
|
|---|
| 3239 | find MICO version! Check $kde_micodir/include/mico/version.h])
|
|---|
| 3240 | fi
|
|---|
| 3241 | ])
|
|---|
| 3242 |
|
|---|
| 3243 | dnl installed MICO version
|
|---|
| 3244 | mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
|
|---|
| 3245 | mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
|
|---|
| 3246 | mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
|
|---|
| 3247 |
|
|---|
| 3248 | if test "x$1" = "x"; then
|
|---|
| 3249 | req_version="2.3.0"
|
|---|
| 3250 | else
|
|---|
| 3251 | req_version=$1
|
|---|
| 3252 | fi
|
|---|
| 3253 |
|
|---|
| 3254 | dnl required MICO version
|
|---|
| 3255 | req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
|
|---|
| 3256 | req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
|
|---|
| 3257 | req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
|
|---|
| 3258 |
|
|---|
| 3259 | if test "$mico_v_maj" -lt "$req_v_maj" || \
|
|---|
| 3260 | ( test "$mico_v_maj" -eq "$req_v_maj" && \
|
|---|
| 3261 | test "$mico_v_mid" -lt "$req_v_mid" ) || \
|
|---|
| 3262 | ( test "$mico_v_mid" -eq "$req_v_mid" && \
|
|---|
| 3263 | test "$mico_v_min" -lt "$req_v_min" )
|
|---|
| 3264 |
|
|---|
| 3265 | then
|
|---|
| 3266 | AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
|
|---|
| 3267 | at least is required. You should upgrade MICO.])
|
|---|
| 3268 | else
|
|---|
| 3269 | AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
|
|---|
| 3270 | fi
|
|---|
| 3271 |
|
|---|
| 3272 | LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
|
|---|
| 3273 | AC_SUBST(LIBMICO)
|
|---|
| 3274 | if test -z "$IDL"; then
|
|---|
| 3275 | IDL='$(kde_bindir)/cuteidl'
|
|---|
| 3276 | fi
|
|---|
| 3277 | AC_SUBST(IDL)
|
|---|
| 3278 | IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
|
|---|
| 3279 | AC_SUBST(IDL_DEPENDENCIES)
|
|---|
| 3280 |
|
|---|
| 3281 | idldir="\$(includedir)/idl"
|
|---|
| 3282 | AC_SUBST(idldir)
|
|---|
| 3283 |
|
|---|
| 3284 | ])
|
|---|
| 3285 |
|
|---|
| 3286 | AC_DEFUN(KDE_CHECK_MINI_STL,
|
|---|
| 3287 | [
|
|---|
| 3288 | AC_REQUIRE([KDE_CHECK_MICO])
|
|---|
| 3289 |
|
|---|
| 3290 | AC_MSG_CHECKING(if we use mico's mini-STL)
|
|---|
| 3291 | AC_CACHE_VAL(kde_cv_have_mini_stl,
|
|---|
| 3292 | [
|
|---|
| 3293 | AC_LANG_SAVE
|
|---|
| 3294 | AC_LANG_CPLUSPLUS
|
|---|
| 3295 | kde_save_cxxflags="$CXXFLAGS"
|
|---|
| 3296 | CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
|
|---|
| 3297 | AC_TRY_COMPILE(
|
|---|
| 3298 | [
|
|---|
| 3299 | #include <mico/config.h>
|
|---|
| 3300 | ],
|
|---|
| 3301 | [
|
|---|
| 3302 | #ifdef HAVE_MINI_STL
|
|---|
| 3303 | #error "nothing"
|
|---|
| 3304 | #endif
|
|---|
| 3305 | ],
|
|---|
| 3306 | kde_cv_have_mini_stl=no,
|
|---|
| 3307 | kde_cv_have_mini_stl=yes)
|
|---|
| 3308 | CXXFLAGS="$kde_save_cxxflags"
|
|---|
| 3309 | AC_LANG_RESTORE
|
|---|
| 3310 | ])
|
|---|
| 3311 |
|
|---|
| 3312 | if test "x$kde_cv_have_mini_stl" = "xyes"; then
|
|---|
| 3313 | AC_MSG_RESULT(yes)
|
|---|
| 3314 | $1
|
|---|
| 3315 | else
|
|---|
| 3316 | AC_MSG_RESULT(no)
|
|---|
| 3317 | $2
|
|---|
| 3318 | fi
|
|---|
| 3319 | ])
|
|---|
| 3320 |
|
|---|
| 3321 | ])
|
|---|
| 3322 |
|
|---|
| 3323 |
|
|---|
| 3324 | AC_DEFUN(KDE_CHECK_LIBPTHREAD,
|
|---|
| 3325 | [
|
|---|
| 3326 | AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
|
|---|
| 3327 | AC_SUBST(LIBPTHREAD)
|
|---|
| 3328 | ])
|
|---|
| 3329 |
|
|---|
| 3330 | AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
|
|---|
| 3331 | [
|
|---|
| 3332 | AC_ARG_ENABLE(kernel-threads, [ --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
|
|---|
| 3333 | kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
|
|---|
| 3334 |
|
|---|
| 3335 | if test "$kde_use_kernthreads" = "yes"; then
|
|---|
| 3336 | ac_save_CXXFLAGS="$CXXFLAGS"
|
|---|
| 3337 | ac_save_CFLAGS="$CXXFLAGS"
|
|---|
| 3338 | CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
|
|---|
| 3339 | CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
|
|---|
| 3340 | AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
|
|---|
| 3341 | CXXFLAGS="$ac_save_CXXFLAGS"
|
|---|
| 3342 | CFLAGS="$ac_save_CFLAGS"
|
|---|
| 3343 | if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
|
|---|
| 3344 | kde_use_kernthreads=no
|
|---|
| 3345 | else
|
|---|
| 3346 | dnl Add proper -I and -l statements
|
|---|
| 3347 | AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
|
|---|
| 3348 | if test "x$LIBPTHREAD" = "x"; then
|
|---|
| 3349 | kde_use_kernthreads=no
|
|---|
| 3350 | else
|
|---|
| 3351 | USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
|
|---|
| 3352 | fi
|
|---|
| 3353 | fi
|
|---|
| 3354 | else
|
|---|
| 3355 | USE_THREADS=""
|
|---|
| 3356 | if test -z "$LIBPTHREAD"; then
|
|---|
| 3357 | KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
|
|---|
| 3358 | fi
|
|---|
| 3359 | fi
|
|---|
| 3360 |
|
|---|
| 3361 | case $host_os in
|
|---|
| 3362 | solaris*)
|
|---|
| 3363 | KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
|
|---|
| 3364 | CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS"
|
|---|
| 3365 | echo "Setting Solaris pthread compilation options"
|
|---|
| 3366 | ;;
|
|---|
| 3367 | freebsd*)
|
|---|
| 3368 | CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
|
|---|
| 3369 | echo "Setting FreeBSD pthread compilation options"
|
|---|
| 3370 | ;;
|
|---|
| 3371 | aix*)
|
|---|
| 3372 | CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
|
|---|
| 3373 | LIBPTHREAD="$LIBPTHREAD -lc_r"
|
|---|
| 3374 | echo "Setting AIX pthread compilation options"
|
|---|
| 3375 | ;;
|
|---|
| 3376 | linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
|
|---|
| 3377 | USE_THREADS="$USE_THREADS -DPIC -fPIC"
|
|---|
| 3378 | echo "Setting Linux pthread compilation options"
|
|---|
| 3379 | ;;
|
|---|
| 3380 | *)
|
|---|
| 3381 | ;;
|
|---|
| 3382 | esac
|
|---|
| 3383 | AC_SUBST(USE_THREADS)
|
|---|
| 3384 | AC_SUBST(LIBPTHREAD)
|
|---|
| 3385 | ])
|
|---|
| 3386 |
|
|---|
| 3387 | AC_DEFUN(KDE_CHECK_THREADING,
|
|---|
| 3388 | [
|
|---|
| 3389 | AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
|
|---|
| 3390 | AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
|
|---|
| 3391 | dnl default is yes if libpthread is found and no if no libpthread is available
|
|---|
| 3392 | if test -z "$LIBPTHREAD"; then
|
|---|
| 3393 | kde_check_threading_default=no
|
|---|
| 3394 | else
|
|---|
| 3395 | kde_check_threading_default=yes
|
|---|
| 3396 | fi
|
|---|
| 3397 | AC_ARG_ENABLE(threading, [ --disable-threading disables threading even if libpthread found ],
|
|---|
| 3398 | kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
|
|---|
| 3399 |
|
|---|
| 3400 | if test "x$kde_use_threading" = "xyes"; then
|
|---|
| 3401 | AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
|
|---|
| 3402 | fi
|
|---|
| 3403 | ])
|
|---|
| 3404 |
|
|---|
| 3405 | AC_DEFUN(KDE_TRY_LINK_PYTHON,
|
|---|
| 3406 | [
|
|---|
| 3407 | if test "$kde_python_link_found" = no; then
|
|---|
| 3408 |
|
|---|
| 3409 | if test "$1" = normal; then
|
|---|
| 3410 | AC_MSG_CHECKING(if a Python application links)
|
|---|
| 3411 | else
|
|---|
| 3412 | AC_MSG_CHECKING(if Python depends on $2)
|
|---|
| 3413 | fi
|
|---|
| 3414 |
|
|---|
| 3415 | AC_CACHE_VAL(kde_cv_try_link_python_$1,
|
|---|
| 3416 | [
|
|---|
| 3417 | AC_LANG_SAVE
|
|---|
| 3418 | AC_LANG_C
|
|---|
| 3419 | kde_save_cflags="$CFLAGS"
|
|---|
| 3420 | CFLAGS="$CFLAGS $PYTHONINC"
|
|---|
| 3421 | kde_save_libs="$LIBS"
|
|---|
| 3422 | LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
|
|---|
| 3423 | kde_save_ldflags="$LDFLAGS"
|
|---|
| 3424 | LDFLAGS="$LDFLAGS $PYTHONLIB"
|
|---|
| 3425 |
|
|---|
| 3426 | AC_TRY_LINK(
|
|---|
| 3427 | [
|
|---|
| 3428 | #include <Python.h>
|
|---|
| 3429 | ],[
|
|---|
| 3430 | PySys_SetArgv(1, 0);
|
|---|
| 3431 | ],
|
|---|
| 3432 | [kde_cv_try_link_python_$1=yes],
|
|---|
| 3433 | [kde_cv_try_link_python_$1=no]
|
|---|
| 3434 | )
|
|---|
| 3435 | CFLAGS="$kde_save_cflags"
|
|---|
| 3436 | LIBS="$kde_save_libs"
|
|---|
| 3437 | LDFLAGS="$kde_save_ldflags"
|
|---|
| 3438 | ])
|
|---|
| 3439 |
|
|---|
| 3440 | if test "$kde_cv_try_link_python_$1" = "yes"; then
|
|---|
| 3441 | AC_MSG_RESULT(yes)
|
|---|
| 3442 | kde_python_link_found=yes
|
|---|
| 3443 | if test ! "$1" = normal; then
|
|---|
| 3444 | LIBPYTHON="$LIBPYTHON $2"
|
|---|
| 3445 | fi
|
|---|
| 3446 | $3
|
|---|
| 3447 | else
|
|---|
| 3448 | AC_MSG_RESULT(no)
|
|---|
| 3449 | $4
|
|---|
| 3450 | fi
|
|---|
| 3451 | AC_LANG_RESTORE
|
|---|
| 3452 |
|
|---|
| 3453 | fi
|
|---|
| 3454 |
|
|---|
| 3455 | ])
|
|---|
| 3456 |
|
|---|
| 3457 | AC_DEFUN(KDE_CHECK_PYTHON,
|
|---|
| 3458 | [
|
|---|
| 3459 | AC_REQUIRE([KDE_CHECK_LIBDL])
|
|---|
| 3460 | AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
|
|---|
| 3461 |
|
|---|
| 3462 | AC_MSG_CHECKING([for Python directory])
|
|---|
| 3463 |
|
|---|
| 3464 | AC_CACHE_VAL(kde_cv_pythondir,
|
|---|
| 3465 | [
|
|---|
| 3466 | if test -z "$PYTHONDIR"; then
|
|---|
| 3467 | kde_cv_pythondir=/usr/local
|
|---|
| 3468 | else
|
|---|
| 3469 | kde_cv_pythondir="$PYTHONDIR"
|
|---|
| 3470 | fi
|
|---|
| 3471 | ])
|
|---|
| 3472 |
|
|---|
| 3473 | AC_ARG_WITH(pythondir,
|
|---|
| 3474 | [ --with-pythondir=pythondir use python installed in pythondir ],
|
|---|
| 3475 | [
|
|---|
| 3476 | ac_python_dir=$withval
|
|---|
| 3477 | ], ac_python_dir=$kde_cv_pythondir
|
|---|
| 3478 | )
|
|---|
| 3479 |
|
|---|
| 3480 | AC_MSG_RESULT($ac_python_dir)
|
|---|
| 3481 |
|
|---|
| 3482 | if test -z "$1"; then
|
|---|
| 3483 | version="1.5"
|
|---|
| 3484 | else
|
|---|
| 3485 | version="$1"
|
|---|
| 3486 | fi
|
|---|
| 3487 |
|
|---|
| 3488 | AC_MSG_CHECKING([for Python$version])
|
|---|
| 3489 |
|
|---|
| 3490 | python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
|
|---|
| 3491 | AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
|
|---|
| 3492 | if test ! -r $python_incdir/Python.h; then
|
|---|
| 3493 | AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
|
|---|
| 3494 | python_incdir=$python_incdir/python$version
|
|---|
| 3495 | if test ! -r $python_incdir/Python.h; then
|
|---|
| 3496 | AC_MSG_ERROR(Python.h not found.)
|
|---|
| 3497 | fi
|
|---|
| 3498 | fi
|
|---|
| 3499 |
|
|---|
| 3500 | PYTHONINC=-I$python_incdir
|
|---|
| 3501 |
|
|---|
| 3502 | python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
|
|---|
| 3503 | AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
|
|---|
| 3504 | if test ! -r $python_libdir/libpython$version.a; then
|
|---|
| 3505 | AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
|
|---|
| 3506 | python_libdir=$python_libdir/python$version/config
|
|---|
| 3507 | if test ! -r $python_libdir/libpython$version.a; then
|
|---|
| 3508 | AC_MSG_ERROR(libpython$version.a not found.)
|
|---|
| 3509 | fi
|
|---|
| 3510 | fi
|
|---|
| 3511 |
|
|---|
| 3512 | PYTHONLIB=-L$python_libdir
|
|---|
| 3513 | if test -z "$LIBPYTHON"; then
|
|---|
| 3514 | LIBPYTHON=-lpython$version
|
|---|
| 3515 | fi
|
|---|
| 3516 |
|
|---|
| 3517 | python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
|
|---|
| 3518 | AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
|
|---|
| 3519 | python_moddir=$python_moddir/python$version
|
|---|
| 3520 | if test ! -r $python_moddir/copy.py; then
|
|---|
| 3521 | AC_MSG_ERROR(python module directory not found.)
|
|---|
| 3522 | fi
|
|---|
| 3523 |
|
|---|
| 3524 | PYTHONMODDIR=$python_moddir
|
|---|
| 3525 |
|
|---|
| 3526 | AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
|
|---|
| 3527 |
|
|---|
| 3528 | dnl Note: this test is very weak
|
|---|
| 3529 | kde_python_link_found=no
|
|---|
| 3530 | KDE_TRY_LINK_PYTHON(normal)
|
|---|
| 3531 | KDE_TRY_LINK_PYTHON(m, -lm)
|
|---|
| 3532 | KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
|
|---|
| 3533 | KDE_TRY_LINK_PYTHON(tcl, -ltcl)
|
|---|
| 3534 | KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm], [],
|
|---|
| 3535 | [AC_MSG_WARN([it seems, Python depends on another library.
|
|---|
| 3536 | Pleae use \"make LIBPTYHON='-lpython$version -lotherlib'\" to fix this
|
|---|
| 3537 | and contact the authors to let them know about this problem])
|
|---|
| 3538 | ])
|
|---|
| 3539 |
|
|---|
| 3540 | LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
|
|---|
| 3541 | AC_SUBST(PYTHONINC)
|
|---|
| 3542 | AC_SUBST(PYTHONLIB)
|
|---|
| 3543 | AC_SUBST(LIBPYTHON)
|
|---|
| 3544 | AC_SUBST(PYTHONMODDIR)
|
|---|
| 3545 |
|
|---|
| 3546 | ])
|
|---|
| 3547 |
|
|---|
| 3548 |
|
|---|
| 3549 | AC_DEFUN(KDE_CHECK_STL_SGI,
|
|---|
| 3550 | [
|
|---|
| 3551 | AC_MSG_CHECKING([if STL implementation is SGI like])
|
|---|
| 3552 | AC_CACHE_VAL(kde_cv_stl_type_sgi,
|
|---|
| 3553 | [
|
|---|
| 3554 | AC_TRY_COMPILE([
|
|---|
| 3555 | #include <string>
|
|---|
| 3556 | using namespace std;
|
|---|
| 3557 | ],[
|
|---|
| 3558 | string astring="Hallo Welt.";
|
|---|
| 3559 | astring.erase(0, 6); // now astring is "Welt"
|
|---|
| 3560 | return 0;
|
|---|
| 3561 | ], kde_cv_stl_type_sgi=yes,
|
|---|
| 3562 | kde_cv_stl_type_sgi=no)
|
|---|
| 3563 | ])
|
|---|
| 3564 |
|
|---|
| 3565 | AC_MSG_RESULT($kde_cv_stl_type_sgi)
|
|---|
| 3566 |
|
|---|
| 3567 | if test "$kde_cv_stl_type_sgi" = "yes"; then
|
|---|
| 3568 | AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
|
|---|
| 3569 | fi
|
|---|
| 3570 | ])
|
|---|
| 3571 |
|
|---|
| 3572 | AC_DEFUN(KDE_CHECK_STL_HP,
|
|---|
| 3573 | [
|
|---|
| 3574 | AC_MSG_CHECKING([if STL implementation is HP like])
|
|---|
| 3575 | AC_CACHE_VAL(kde_cv_stl_type_hp,
|
|---|
| 3576 | [
|
|---|
| 3577 | AC_TRY_COMPILE([
|
|---|
| 3578 | #include <string>
|
|---|
| 3579 | using namespace std;
|
|---|
| 3580 | ],[
|
|---|
| 3581 | string astring="Hello World";
|
|---|
| 3582 | astring.remove(0, 6); // now astring is "World"
|
|---|
| 3583 | return 0;
|
|---|
| 3584 | ], kde_cv_stl_type_hp=yes,
|
|---|
| 3585 | kde_cv_stl_type_hp=no)
|
|---|
| 3586 | ])
|
|---|
| 3587 | AC_MSG_RESULT($kde_cv_stl_type_hp)
|
|---|
| 3588 |
|
|---|
| 3589 | if test "$kde_cv_stl_type_hp" = "yes"; then
|
|---|
| 3590 | AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by SGI])
|
|---|
| 3591 | fi
|
|---|
| 3592 | ])
|
|---|
| 3593 |
|
|---|
| 3594 | AC_DEFUN(KDE_CHECK_STL,
|
|---|
| 3595 | [
|
|---|
| 3596 | AC_LANG_SAVE
|
|---|
| 3597 | AC_LANG_CPLUSPLUS
|
|---|
| 3598 | ac_save_CXXFLAGS="$CXXFLAGS"
|
|---|
| 3599 | CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
|
|---|
| 3600 | KDE_CHECK_STL_SGI
|
|---|
| 3601 |
|
|---|
| 3602 | if test "$kde_cv_stl_type_sgi" = "no"; then
|
|---|
| 3603 | KDE_CHECK_STL_HP
|
|---|
| 3604 |
|
|---|
| 3605 | if test "$kde_cv_stl_type_hp" = "no"; then
|
|---|
| 3606 | AC_MSG_ERROR("no known STL type found")
|
|---|
| 3607 | fi
|
|---|
| 3608 | fi
|
|---|
| 3609 |
|
|---|
| 3610 | CXXFLAGS="$ac_save_CXXFLAGS"
|
|---|
| 3611 | AC_LANG_RESTORE
|
|---|
| 3612 | ])
|
|---|
| 3613 |
|
|---|
| 3614 | AC_DEFUN(AC_FIND_QIMGIO,
|
|---|
| 3615 | [AC_REQUIRE([AC_FIND_JPEG])
|
|---|
| 3616 | AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
|
|---|
| 3617 | AC_MSG_CHECKING([for qimgio])
|
|---|
| 3618 | AC_CACHE_VAL(ac_cv_lib_qimgio,
|
|---|
| 3619 | [
|
|---|
| 3620 | AC_LANG_SAVE
|
|---|
| 3621 | AC_LANG_CPLUSPLUS
|
|---|
| 3622 | ac_save_LIBS="$LIBS"
|
|---|
| 3623 | ac_save_CXXFLAGS="$CXXFLAGS"
|
|---|
| 3624 | LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
|
|---|
| 3625 | CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
|
|---|
| 3626 | AC_TRY_RUN(dnl
|
|---|
| 3627 | [
|
|---|
| 3628 | #include <qimageio.h>
|
|---|
| 3629 | #include <qstring.h>
|
|---|
| 3630 | int main() {
|
|---|
| 3631 | QString t = "hallo";
|
|---|
| 3632 | t.fill('t');
|
|---|
| 3633 | qInitImageIO();
|
|---|
| 3634 | }
|
|---|
| 3635 | ],
|
|---|
| 3636 | ac_cv_lib_qimgio=yes,
|
|---|
| 3637 | ac_cv_lib_qimgio=no,
|
|---|
| 3638 | ac_cv_lib_qimgio=no)
|
|---|
| 3639 | LIBS="$ac_save_LIBS"
|
|---|
| 3640 | CXXFLAGS="$ac_save_CXXFLAGS"
|
|---|
| 3641 | AC_LANG_RESTORE
|
|---|
| 3642 | ])dnl
|
|---|
| 3643 | if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
|
|---|
| 3644 | LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
|
|---|
| 3645 | AC_MSG_RESULT(yes)
|
|---|
| 3646 | AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
|
|---|
| 3647 | AC_SUBST(LIBQIMGIO)
|
|---|
| 3648 | else
|
|---|
| 3649 | AC_MSG_RESULT(not found)
|
|---|
| 3650 | fi
|
|---|
| 3651 | ])
|
|---|
| 3652 |
|
|---|
| 3653 | AC_DEFUN(KDE_CHECK_ANSI,
|
|---|
| 3654 | [
|
|---|
| 3655 | ])
|
|---|
| 3656 |
|
|---|
| 3657 | AC_DEFUN(KDE_CHECK_INSURE,
|
|---|
| 3658 | [
|
|---|
| 3659 | AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
|
|---|
| 3660 | [
|
|---|
| 3661 | if test $enableval = "no"; dnl
|
|---|
| 3662 | then ac_use_insure="no"
|
|---|
| 3663 | else ac_use_insure="yes"
|
|---|
| 3664 | fi
|
|---|
| 3665 | ], [ac_use_insure="no"])
|
|---|
| 3666 |
|
|---|
| 3667 | AC_MSG_CHECKING(if we will use Insure++ to debug)
|
|---|
| 3668 | AC_MSG_RESULT($ac_use_insure)
|
|---|
| 3669 | if test "$ac_use_insure" = "yes"; dnl
|
|---|
| 3670 | then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
|
|---|
| 3671 | fi
|
|---|
| 3672 | ])
|
|---|
| 3673 |
|
|---|
| 3674 | AC_DEFUN(AM_DISABLE_LIBRARIES,
|
|---|
| 3675 | [
|
|---|
| 3676 | AC_PROVIDE([AM_ENABLE_STATIC])
|
|---|
| 3677 | AC_PROVIDE([AM_ENABLE_SHARED])
|
|---|
| 3678 | enable_static=no
|
|---|
| 3679 | enable_shared=yes
|
|---|
| 3680 | ])
|
|---|
| 3681 |
|
|---|
| 3682 |
|
|---|
| 3683 | AC_DEFUN(AC_CHECK_UTMP_FILE,
|
|---|
| 3684 | [
|
|---|
| 3685 | AC_MSG_CHECKING([for utmp file])
|
|---|
| 3686 |
|
|---|
| 3687 | AC_CACHE_VAL(kde_cv_utmp_file,
|
|---|
| 3688 | [
|
|---|
| 3689 | kde_cv_utmp_file=no
|
|---|
| 3690 |
|
|---|
| 3691 | for ac_file in \
|
|---|
| 3692 | \
|
|---|
| 3693 | /var/run/utmp \
|
|---|
| 3694 | /var/adm/utmp \
|
|---|
| 3695 | /etc/utmp \
|
|---|
| 3696 | ; \
|
|---|
| 3697 | do
|
|---|
| 3698 | if test -r "$ac_file"; then
|
|---|
| 3699 | kde_cv_utmp_file=$ac_file
|
|---|
| 3700 | break
|
|---|
| 3701 | fi
|
|---|
| 3702 | done
|
|---|
| 3703 | ])
|
|---|
| 3704 |
|
|---|
| 3705 | if test "$kde_cv_utmp_file" != "no"; then
|
|---|
| 3706 | AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
|
|---|
| 3707 | $1
|
|---|
| 3708 | AC_MSG_RESULT($kde_cv_utmp_file)
|
|---|
| 3709 | else
|
|---|
| 3710 | $2
|
|---|
| 3711 | AC_MSG_RESULT([non found])
|
|---|
| 3712 | fi
|
|---|
| 3713 | ])
|
|---|
| 3714 |
|
|---|
| 3715 |
|
|---|
| 3716 | AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
|
|---|
| 3717 | [
|
|---|
| 3718 |
|
|---|
| 3719 | DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
|
|---|
| 3720 |
|
|---|
| 3721 | if test ! -s $srcdir/subdirs; then
|
|---|
| 3722 | dnl Note: Makefile.common creates subdirs, so this is just a fallback
|
|---|
| 3723 | TOPSUBDIRS=""
|
|---|
| 3724 | files=`cd $srcdir && ls -1`
|
|---|
| 3725 | dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
|
|---|
| 3726 | for i in $dirs; do
|
|---|
| 3727 | echo $i >> $srcdir/subdirs
|
|---|
| 3728 | done
|
|---|
| 3729 | fi
|
|---|
| 3730 |
|
|---|
| 3731 | if test -s $srcdir/inst-apps; then
|
|---|
| 3732 | ac_topsubdirs="`cat $srcdir/inst-apps`"
|
|---|
| 3733 | else
|
|---|
| 3734 | ac_topsubdirs="`cat $srcdir/subdirs`"
|
|---|
| 3735 | fi
|
|---|
| 3736 |
|
|---|
| 3737 | for i in $ac_topsubdirs; do
|
|---|
| 3738 | AC_MSG_CHECKING([if $i should be compiled])
|
|---|
| 3739 | if test -d $srcdir/$i; then
|
|---|
| 3740 | install_it="yes"
|
|---|
| 3741 | for j in $DO_NOT_COMPILE; do
|
|---|
| 3742 | if test $i = $j; then
|
|---|
| 3743 | install_it="no"
|
|---|
| 3744 | fi
|
|---|
| 3745 | done
|
|---|
| 3746 | else
|
|---|
| 3747 | install_it="no"
|
|---|
| 3748 | fi
|
|---|
| 3749 | AC_MSG_RESULT($install_it)
|
|---|
| 3750 | if test $install_it = "yes"; then
|
|---|
| 3751 | TOPSUBDIRS="$TOPSUBDIRS $i"
|
|---|
| 3752 | fi
|
|---|
| 3753 | done
|
|---|
| 3754 |
|
|---|
| 3755 | AC_SUBST(TOPSUBDIRS)
|
|---|
| 3756 | ])
|
|---|
| 3757 |
|
|---|
| 3758 | AC_DEFUN(KDE_CHECK_NAMESPACES,
|
|---|
| 3759 | [
|
|---|
| 3760 | AC_MSG_CHECKING(whether C++ compiler supports namespaces)
|
|---|
| 3761 | AC_LANG_SAVE
|
|---|
| 3762 | AC_LANG_CPLUSPLUS
|
|---|
| 3763 | AC_TRY_COMPILE([
|
|---|
| 3764 | ],
|
|---|
| 3765 | [
|
|---|
| 3766 | namespace Foo {
|
|---|
| 3767 | extern int i;
|
|---|
| 3768 | namespace Bar {
|
|---|
| 3769 | extern int i;
|
|---|
| 3770 | }
|
|---|
| 3771 | }
|
|---|
| 3772 |
|
|---|
| 3773 | int Foo::i = 0;
|
|---|
| 3774 | int Foo::Bar::i = 1;
|
|---|
| 3775 | ],[
|
|---|
| 3776 | AC_MSG_RESULT(yes)
|
|---|
| 3777 | AC_DEFINE(HAVE_NAMESPACES)
|
|---|
| 3778 | ], [
|
|---|
| 3779 | AC_MSG_RESULT(no)
|
|---|
| 3780 | ])
|
|---|
| 3781 | AC_LANG_RESTORE
|
|---|
| 3782 | ])
|
|---|
| 3783 |
|
|---|
| 3784 | AC_DEFUN(KDE_CHECK_NEWLIBS,
|
|---|
| 3785 | [
|
|---|
| 3786 |
|
|---|
| 3787 | ])
|
|---|
| 3788 |
|
|---|
| 3789 | dnl ------------------------------------------------------------------------
|
|---|
| 3790 | dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
|
|---|
| 3791 | dnl ------------------------------------------------------------------------
|
|---|
| 3792 | dnl
|
|---|
| 3793 | AC_DEFUN(AC_CHECK_S_ISSOCK,
|
|---|
| 3794 | [
|
|---|
| 3795 | AC_MSG_CHECKING(for S_ISSOCK)
|
|---|
| 3796 | AC_CACHE_VAL(ac_cv_have_s_issock,
|
|---|
| 3797 | [
|
|---|
| 3798 | AC_LANG_SAVE
|
|---|
| 3799 | AC_LANG_C
|
|---|
| 3800 | AC_TRY_LINK(
|
|---|
| 3801 | [
|
|---|
| 3802 | #include <sys/stat.h>
|
|---|
| 3803 | ],
|
|---|
| 3804 | [
|
|---|
| 3805 | struct stat buff;
|
|---|
| 3806 | int b = S_ISSOCK( buff.st_mode );
|
|---|
| 3807 | ],
|
|---|
| 3808 | ac_cv_have_s_issock=yes,
|
|---|
| 3809 | ac_cv_have_s_issock=no)
|
|---|
| 3810 | AC_LANG_RESTORE
|
|---|
| 3811 | ])
|
|---|
| 3812 | AC_MSG_RESULT($ac_cv_have_s_issock)
|
|---|
| 3813 | if test "$ac_cv_have_s_issock" = "yes"; then
|
|---|
| 3814 | AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
|
|---|
| 3815 | fi
|
|---|
| 3816 | ])
|
|---|
| 3817 |
|
|---|
| 3818 | dnl ------------------------------------------------------------------------
|
|---|
| 3819 | dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
|
|---|
| 3820 | dnl ------------------------------------------------------------------------
|
|---|
| 3821 | dnl
|
|---|
| 3822 | AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
|
|---|
| 3823 | [
|
|---|
| 3824 | AC_MSG_CHECKING(for MAXPATHLEN)
|
|---|
| 3825 | AC_CACHE_VAL(ac_cv_maxpathlen,
|
|---|
| 3826 | [
|
|---|
| 3827 | AC_LANG_C
|
|---|
| 3828 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3829 | #include <stdio.h>
|
|---|
| 3830 | #include <sys/param.h>
|
|---|
| 3831 | #ifndef MAXPATHLEN
|
|---|
| 3832 | #define MAXPATHLEN 1024
|
|---|
| 3833 | #endif
|
|---|
| 3834 |
|
|---|
| 3835 | KDE_HELLO MAXPATHLEN
|
|---|
| 3836 |
|
|---|
| 3837 | EOF
|
|---|
| 3838 |
|
|---|
| 3839 | ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
|
|---|
| 3840 |
|
|---|
| 3841 | if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
|
|---|
| 3842 | ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
|
|---|
| 3843 | else
|
|---|
| 3844 | ac_cv_maxpathlen=1024
|
|---|
| 3845 | fi
|
|---|
| 3846 |
|
|---|
| 3847 | rm conftest.*
|
|---|
| 3848 |
|
|---|
| 3849 | ])
|
|---|
| 3850 | AC_MSG_RESULT($ac_cv_maxpathlen)
|
|---|
| 3851 | AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
|
|---|
| 3852 | ])
|
|---|
| 3853 |
|
|---|
| 3854 | dnl -------------------------------------------------------------------------
|
|---|
| 3855 | dnl See if the compiler supports a template repository bero@redhat.de
|
|---|
| 3856 | dnl -------------------------------------------------------------------------
|
|---|
| 3857 | AC_DEFUN(KDE_COMPILER_REPO,
|
|---|
| 3858 | [
|
|---|
| 3859 | REPO=""
|
|---|
| 3860 | NOREPO=""
|
|---|
| 3861 |
|
|---|
| 3862 | KDE_CHECK_COMPILER_FLAG(frepo,
|
|---|
| 3863 | [
|
|---|
| 3864 | REPO="-frepo"
|
|---|
| 3865 | NOREPO="-fno-repo"
|
|---|
| 3866 | ])
|
|---|
| 3867 |
|
|---|
| 3868 | if test -z "$REPO"; then
|
|---|
| 3869 | KDE_CHECK_COMPILER_FLAG(instances=explicit,
|
|---|
| 3870 | [
|
|---|
| 3871 | REPO="-instances=explicit"
|
|---|
| 3872 | NOREPO="-instances=extern"
|
|---|
| 3873 | ])
|
|---|
| 3874 | fi
|
|---|
| 3875 |
|
|---|
| 3876 | if test -n "$REPO"; then
|
|---|
| 3877 | AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
|
|---|
| 3878 | [C++ compiler supports template repository])
|
|---|
| 3879 | $1
|
|---|
| 3880 | fi
|
|---|
| 3881 |
|
|---|
| 3882 | AC_SUBST(REPO)
|
|---|
| 3883 | AC_SUBST(NOREPO)
|
|---|
| 3884 | ])
|
|---|
| 3885 |
|
|---|
| 3886 | AC_DEFUN(KDE_CHECK_HEADER,
|
|---|
| 3887 | [
|
|---|
| 3888 | AC_LANG_SAVE
|
|---|
| 3889 | kde_safe_cppflags=$CPPFLAGS
|
|---|
| 3890 | CPPFLAGS="$CPPFLAGS $all_includes"
|
|---|
| 3891 | AC_LANG_CPLUSPLUS
|
|---|
| 3892 | AC_CHECK_HEADER($1, $2, $3)
|
|---|
| 3893 | CPPFLAGS=$kde_safe_cppflags
|
|---|
| 3894 | AC_LANG_RESTORE
|
|---|
| 3895 | ])
|
|---|
| 3896 |
|
|---|
| 3897 | AC_DEFUN(KDE_CHECK_QWSPRITEFIELD,
|
|---|
| 3898 | [
|
|---|
| 3899 | KDE_CHECK_HEADER(QwSpriteField.h, ,
|
|---|
| 3900 | [
|
|---|
| 3901 | AC_MSG_WARN([you don't have QwSpriteField.h somewhere. Please install
|
|---|
| 3902 | QwSpriteField out of kdesupport.])
|
|---|
| 3903 | $1
|
|---|
| 3904 | ])
|
|---|
| 3905 | ])
|
|---|
| 3906 |
|
|---|
| 3907 | AC_DEFUN(KDE_FAST_CONFIGURE,
|
|---|
| 3908 | [
|
|---|
| 3909 | dnl makes configure fast (needs perl)
|
|---|
| 3910 | AC_ARG_ENABLE(fast-perl, [ --disable-fast-perl disable fast Makefile generation (needs perl)],
|
|---|
| 3911 | with_fast_perl=$enableval, with_fast_perl=yes)
|
|---|
| 3912 | ])
|
|---|
| 3913 |
|
|---|
| 3914 | AC_DEFUN(KDE_CONF_FILES,
|
|---|
| 3915 | [
|
|---|
| 3916 | val=
|
|---|
| 3917 | if test -f $srcdir/configure.files ; then
|
|---|
| 3918 | val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
|
|---|
| 3919 | fi
|
|---|
| 3920 | CONF_FILES=
|
|---|
| 3921 | if test -n "$val" ; then
|
|---|
| 3922 | for i in $val ; do
|
|---|
| 3923 | CONF_FILES="$CONF_FILES $i"
|
|---|
| 3924 | done
|
|---|
| 3925 | fi
|
|---|
| 3926 | AC_SUBST(CONF_FILES)
|
|---|
| 3927 | ])dnl
|
|---|
| 3928 |
|
|---|
| 3929 | AC_DEFUN(KDE_SET_PREFIX,
|
|---|
| 3930 | [
|
|---|
| 3931 | unset CDPATH
|
|---|
| 3932 | dnl make $KDEDIR the default for the installation
|
|---|
| 3933 | AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
|
|---|
| 3934 |
|
|---|
| 3935 | if test "x$prefix" = "xNONE"; then
|
|---|
| 3936 | prefix=$ac_default_prefix
|
|---|
| 3937 | ac_configure_args="$ac_configure_args --prefix $prefix"
|
|---|
| 3938 | fi
|
|---|
| 3939 | KDE_FAST_CONFIGURE
|
|---|
| 3940 | KDE_CONF_FILES
|
|---|
| 3941 | ])
|
|---|
| 3942 |
|
|---|
| 3943 | pushdef([AC_PROG_INSTALL],
|
|---|
| 3944 | [
|
|---|
| 3945 | dnl our own version, testing for a -p flag
|
|---|
| 3946 | popdef([AC_PROG_INSTALL])
|
|---|
| 3947 | dnl as AC_PROG_INSTALL works as it works we first have
|
|---|
| 3948 | dnl to save if the user didn't specify INSTALL, as the
|
|---|
| 3949 | dnl autoconf one overwrites INSTALL and we have no chance to find
|
|---|
| 3950 | dnl out afterwards
|
|---|
| 3951 | test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
|
|---|
| 3952 | test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
|
|---|
| 3953 | test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
|
|---|
| 3954 | AC_PROG_INSTALL
|
|---|
| 3955 |
|
|---|
| 3956 | if test -z "$kde_save_INSTALL_given" ; then
|
|---|
| 3957 | # OK, user hasn't given any INSTALL, autoconf found one for us
|
|---|
| 3958 | # now we test, if it supports the -p flag
|
|---|
| 3959 | AC_MSG_CHECKING(for -p flag to install)
|
|---|
| 3960 | rm -f confinst.$$.* > /dev/null 2>&1
|
|---|
| 3961 | echo "Testtest" > confinst.$$.orig
|
|---|
| 3962 | ac_res=no
|
|---|
| 3963 | if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
|
|---|
| 3964 | if test -f confinst.$$.new ; then
|
|---|
| 3965 | # OK, -p seems to do no harm to install
|
|---|
| 3966 | INSTALL="${INSTALL} -p"
|
|---|
| 3967 | ac_res=yes
|
|---|
| 3968 | fi
|
|---|
| 3969 | fi
|
|---|
| 3970 | rm -f confinst.$$.*
|
|---|
| 3971 | AC_MSG_RESULT($ac_res)
|
|---|
| 3972 | fi
|
|---|
| 3973 | dnl the following tries to resolve some signs and wonders coming up
|
|---|
| 3974 | dnl with different autoconf/automake versions
|
|---|
| 3975 | dnl e.g.:
|
|---|
| 3976 | dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
|
|---|
| 3977 | dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
|
|---|
| 3978 | dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
|
|---|
| 3979 | dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
|
|---|
| 3980 | dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
|
|---|
| 3981 | dnl install-@DIR@PROGRAMS targets to explicitly use that flag
|
|---|
| 3982 | dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
|
|---|
| 3983 | dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
|
|---|
| 3984 | dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
|
|---|
| 3985 | dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
|
|---|
| 3986 | dnl automake (due to broken Makefile.am or whatever) to install programs,
|
|---|
| 3987 | dnl and so does not see the -s flag in automake > 1.4
|
|---|
| 3988 | dnl to clean up that mess we:
|
|---|
| 3989 | dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
|
|---|
| 3990 | dnl which cleans KDE's program with automake > 1.4;
|
|---|
| 3991 | dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
|
|---|
| 3992 | dnl with automake<=1.4
|
|---|
| 3993 | dnl note that dues to this sometimes two '-s' flags are used (if KDE
|
|---|
| 3994 | dnl properly uses install-@DIR@PROGRAMS, but I don't care
|
|---|
| 3995 | dnl
|
|---|
| 3996 | dnl And to all this comes, that I even can't write in comments variable
|
|---|
| 3997 | dnl names used by automake, because it is so stupid to think I wanted to
|
|---|
| 3998 | dnl _use_ them, therefor I have written A_M_... instead of AM_
|
|---|
| 3999 | dnl hmm, I wanted to say something ... ahh yes: Arghhh.
|
|---|
| 4000 |
|
|---|
| 4001 | if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
|
|---|
| 4002 | INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
|
|---|
| 4003 | fi
|
|---|
| 4004 | if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
|
|---|
| 4005 | INSTALL_SCRIPT='${INSTALL}'
|
|---|
| 4006 | fi
|
|---|
| 4007 | ])dnl
|
|---|
| 4008 |
|
|---|
| 4009 | AC_DEFUN(KDE_LANG_CPLUSPLUS,
|
|---|
| 4010 | [AC_LANG_CPLUSPLUS
|
|---|
| 4011 | ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
|
|---|
| 4012 | pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
|
|---|
| 4013 | ])
|
|---|
| 4014 |
|
|---|
| 4015 | pushdef([AC_LANG_CPLUSPLUS],
|
|---|
| 4016 | [popdef([AC_LANG_CPLUSPLUS])
|
|---|
| 4017 | KDE_LANG_CPLUSPLUS
|
|---|
| 4018 | ])
|
|---|
| 4019 |
|
|---|
| 4020 | AC_DEFUN(KDE_CHECK_LONG_LONG,
|
|---|
| 4021 | [
|
|---|
| 4022 | AC_MSG_CHECKING(for long long)
|
|---|
| 4023 | AC_CACHE_VAL(kde_cv_c_long_long,
|
|---|
| 4024 | [
|
|---|
| 4025 | AC_LANG_SAVE
|
|---|
| 4026 | AC_LANG_CPLUSPLUS
|
|---|
| 4027 | AC_TRY_LINK([], [
|
|---|
| 4028 | long long foo = 0;
|
|---|
| 4029 | foo = foo+1;
|
|---|
| 4030 | ],
|
|---|
| 4031 | kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
|
|---|
| 4032 | ])
|
|---|
| 4033 | AC_MSG_RESULT($kde_cv_c_long_long)
|
|---|
| 4034 | if test "$kde_cv_c_long_long" = yes; then
|
|---|
| 4035 | AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
|
|---|
| 4036 | fi
|
|---|
| 4037 | ])
|
|---|
| 4038 |
|
|---|
| 4039 |
|
|---|
| 4040 | # serial 46 AC_PROG_LIBTOOL
|
|---|
| 4041 | AC_DEFUN([AC_PROG_LIBTOOL],
|
|---|
| 4042 | [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
|
|---|
| 4043 | dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
|
|---|
| 4044 | dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
|
|---|
| 4045 | AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
|---|
| 4046 | [AC_LIBTOOL_CXX],
|
|---|
| 4047 | [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
|
|---|
| 4048 | ])])
|
|---|
| 4049 |
|
|---|
| 4050 | dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
|
|---|
| 4051 | dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
|
|---|
| 4052 | dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
|
|---|
| 4053 | AC_PROVIDE_IFELSE([AC_PROG_GCJ],
|
|---|
| 4054 | [AC_LIBTOOL_GCJ],
|
|---|
| 4055 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
|
|---|
| 4056 | [AC_LIBTOOL_GCJ],
|
|---|
| 4057 | [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
|
|---|
| 4058 | [AC_LIBTOOL_GCJ],
|
|---|
| 4059 | [ifdef([AC_PROG_GCJ],
|
|---|
| 4060 | [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
|
|---|
| 4061 | ])])
|
|---|
| 4062 | ifdef([A][M_PROG_GCJ],
|
|---|
| 4063 | [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
|
|---|
| 4064 | ])])
|
|---|
| 4065 | ifdef([LT_AC_PROG_GCJ],
|
|---|
| 4066 | [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
|
|---|
| 4067 | ])])])])])])
|
|---|
| 4068 |
|
|---|
| 4069 | AC_DEFUN([_AC_PROG_LIBTOOL],
|
|---|
| 4070 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
|---|
| 4071 | AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
|
|---|
| 4072 | AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
|
|---|
| 4073 |
|
|---|
| 4074 | # Save cache, so that ltconfig can load it
|
|---|
| 4075 | AC_CACHE_SAVE
|
|---|
| 4076 |
|
|---|
| 4077 | # Actually configure libtool. ac_aux_dir is where install-sh is found.
|
|---|
| 4078 | AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
|---|
| 4079 | MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
|---|
| 4080 | LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
|
|---|
| 4081 | AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
|
|---|
| 4082 | objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
|
|---|
| 4083 | deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
|
|---|
| 4084 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
|---|
| 4085 | $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|
|---|
| 4086 | || AC_MSG_ERROR([libtool configure failed])
|
|---|
| 4087 |
|
|---|
| 4088 | # Reload cache, that may have been modified by ltconfig
|
|---|
| 4089 | AC_CACHE_LOAD
|
|---|
| 4090 |
|
|---|
| 4091 | # This can be used to rebuild libtool when needed
|
|---|
| 4092 | LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
|
|---|
| 4093 |
|
|---|
| 4094 | # Always use our own libtool.
|
|---|
| 4095 | LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
|---|
| 4096 | AC_SUBST(LIBTOOL)dnl
|
|---|
| 4097 |
|
|---|
| 4098 | # Redirect the config.log output again, so that the ltconfig log is not
|
|---|
| 4099 | # clobbered by the next message.
|
|---|
| 4100 | exec 5>>./config.log
|
|---|
| 4101 | ])
|
|---|
| 4102 |
|
|---|
| 4103 | AC_DEFUN([AC_LIBTOOL_SETUP],
|
|---|
| 4104 | [AC_PREREQ(2.13)dnl
|
|---|
| 4105 | AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
|---|
| 4106 | AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
|---|
| 4107 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
|---|
| 4108 | AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
|---|
| 4109 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
|---|
| 4110 | AC_REQUIRE([AC_PROG_CC])dnl
|
|---|
| 4111 | AC_REQUIRE([AC_PROG_LD])dnl
|
|---|
| 4112 | AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
|
|---|
| 4113 | AC_REQUIRE([AC_PROG_NM])dnl
|
|---|
| 4114 | AC_REQUIRE([AC_PROG_LN_S])dnl
|
|---|
| 4115 | AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
|
|---|
| 4116 | # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
|
|---|
| 4117 | AC_REQUIRE([AC_OBJEXT])dnl
|
|---|
| 4118 | AC_REQUIRE([AC_EXEEXT])dnl
|
|---|
| 4119 | dnl
|
|---|
| 4120 |
|
|---|
| 4121 | # Only perform the check for file, if the check method requires it
|
|---|
| 4122 | case "$deplibs_check_method" in
|
|---|
| 4123 | file_magic*)
|
|---|
| 4124 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then
|
|---|
| 4125 | AC_PATH_MAGIC
|
|---|
| 4126 | fi
|
|---|
| 4127 | ;;
|
|---|
| 4128 | esac
|
|---|
| 4129 |
|
|---|
| 4130 | AC_CHECK_TOOL(RANLIB, ranlib, :)
|
|---|
| 4131 | AC_CHECK_TOOL(STRIP, strip, :)
|
|---|
| 4132 |
|
|---|
| 4133 | # Check for any special flags to pass to ltconfig.
|
|---|
| 4134 | libtool_flags="--cache-file=$cache_file"
|
|---|
| 4135 | test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
|---|
| 4136 | test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
|---|
| 4137 | test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
|---|
| 4138 | test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
|
|---|
| 4139 | test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
|---|
| 4140 | ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
|---|
| 4141 | [libtool_flags="$libtool_flags --enable-dlopen"])
|
|---|
| 4142 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
|---|
| 4143 | [libtool_flags="$libtool_flags --enable-win32-dll"])
|
|---|
| 4144 | AC_ARG_ENABLE(libtool-lock,
|
|---|
| 4145 | [ --disable-libtool-lock avoid locking (might break parallel builds)])
|
|---|
| 4146 | test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
|---|
| 4147 | test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
|---|
| 4148 |
|
|---|
| 4149 | AC_ARG_WITH(pic,
|
|---|
| 4150 | [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
|
|---|
| 4151 | pic_mode="$withval", pic_mode=default)
|
|---|
| 4152 | test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
|
|---|
| 4153 | test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
|
|---|
| 4154 |
|
|---|
| 4155 | # Some flags need to be propagated to the compiler or linker for good
|
|---|
| 4156 | # libtool support.
|
|---|
| 4157 | case "$host" in
|
|---|
| 4158 | *-*-irix6*)
|
|---|
| 4159 | # Find out which ABI we are using.
|
|---|
| 4160 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
|---|
| 4161 | if AC_TRY_EVAL(ac_compile); then
|
|---|
| 4162 | case "`/usr/bin/file conftest.$ac_objext`" in
|
|---|
| 4163 | *32-bit*)
|
|---|
| 4164 | LD="${LD-ld} -32"
|
|---|
| 4165 | ;;
|
|---|
| 4166 | *N32*)
|
|---|
| 4167 | LD="${LD-ld} -n32"
|
|---|
| 4168 | ;;
|
|---|
| 4169 | *64-bit*)
|
|---|
| 4170 | LD="${LD-ld} -64"
|
|---|
| 4171 | ;;
|
|---|
| 4172 | esac
|
|---|
| 4173 | fi
|
|---|
| 4174 | rm -rf conftest*
|
|---|
| 4175 | ;;
|
|---|
| 4176 |
|
|---|
| 4177 | *-*-sco3.2v5*)
|
|---|
| 4178 | # On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
|---|
| 4179 | SAVE_CFLAGS="$CFLAGS"
|
|---|
| 4180 | CFLAGS="$CFLAGS -belf"
|
|---|
| 4181 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
|---|
| 4182 | [AC_LANG_SAVE
|
|---|
| 4183 | AC_LANG_C
|
|---|
| 4184 | AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
|
|---|
| 4185 | AC_LANG_RESTORE])
|
|---|
| 4186 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
|---|
| 4187 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
|---|
| 4188 | CFLAGS="$SAVE_CFLAGS"
|
|---|
| 4189 | fi
|
|---|
| 4190 | ;;
|
|---|
| 4191 |
|
|---|
| 4192 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
|---|
| 4193 | [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
|
|---|
| 4194 | AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
|---|
| 4195 | AC_CHECK_TOOL(AS, as, false)
|
|---|
| 4196 | AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
|---|
| 4197 |
|
|---|
| 4198 | # recent cygwin and mingw systems supply a stub DllMain which the user
|
|---|
| 4199 | # can override, but on older systems we have to supply one
|
|---|
| 4200 | AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
|
|---|
| 4201 | [AC_TRY_LINK([],
|
|---|
| 4202 | [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
|
|---|
| 4203 | DllMain (0, 0, 0);],
|
|---|
| 4204 | [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
|
|---|
| 4205 |
|
|---|
| 4206 | case "$host/$CC" in
|
|---|
| 4207 | *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
|
|---|
| 4208 | # old mingw systems require "-dll" to link a DLL, while more recent ones
|
|---|
| 4209 | # require "-mdll"
|
|---|
| 4210 | SAVE_CFLAGS="$CFLAGS"
|
|---|
| 4211 | CFLAGS="$CFLAGS -mdll"
|
|---|
| 4212 | AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
|
|---|
| 4213 | [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
|
|---|
| 4214 | CFLAGS="$SAVE_CFLAGS" ;;
|
|---|
| 4215 | *-*-cygwin* | *-*-pw32*)
|
|---|
| 4216 | # cygwin systems need to pass --dll to the linker, and not link
|
|---|
| 4217 | # crt.o which will require a WinMain@16 definition.
|
|---|
| 4218 | lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
|
|---|
| 4219 | esac
|
|---|
| 4220 | ;;
|
|---|
| 4221 | ])
|
|---|
| 4222 | esac
|
|---|
| 4223 | ])
|
|---|
| 4224 |
|
|---|
| 4225 | # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
|---|
| 4226 | AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
|---|
| 4227 |
|
|---|
| 4228 | # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
|---|
| 4229 | AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
|---|
| 4230 |
|
|---|
| 4231 | # AC_ENABLE_SHARED - implement the --enable-shared flag
|
|---|
| 4232 | # Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
|---|
| 4233 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
|---|
| 4234 | # `yes'.
|
|---|
| 4235 | AC_DEFUN([AC_ENABLE_SHARED],
|
|---|
| 4236 | [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
|---|
| 4237 | AC_ARG_ENABLE(shared,
|
|---|
| 4238 | changequote(<<, >>)dnl
|
|---|
| 4239 | << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
|---|
| 4240 | changequote([, ])dnl
|
|---|
| 4241 | [p=${PACKAGE-default}
|
|---|
| 4242 | case "$enableval" in
|
|---|
| 4243 | yes) enable_shared=yes ;;
|
|---|
| 4244 | no) enable_shared=no ;;
|
|---|
| 4245 | *)
|
|---|
| 4246 | enable_shared=no
|
|---|
| 4247 | # Look at the argument we got. We use all the common list separators.
|
|---|
| 4248 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
|---|
| 4249 | for pkg in $enableval; do
|
|---|
| 4250 | if test "X$pkg" = "X$p"; then
|
|---|
| 4251 | enable_shared=yes
|
|---|
| 4252 | fi
|
|---|
| 4253 | done
|
|---|
| 4254 | IFS="$ac_save_ifs"
|
|---|
| 4255 | ;;
|
|---|
| 4256 | esac],
|
|---|
| 4257 | enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
|---|
| 4258 | ])
|
|---|
| 4259 |
|
|---|
| 4260 | # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
|---|
| 4261 | AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
|---|
| 4262 | AC_ENABLE_SHARED(no)])
|
|---|
| 4263 |
|
|---|
| 4264 | # AC_ENABLE_STATIC - implement the --enable-static flag
|
|---|
| 4265 | # Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
|---|
| 4266 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
|---|
| 4267 | # `yes'.
|
|---|
| 4268 | AC_DEFUN([AC_ENABLE_STATIC],
|
|---|
| 4269 | [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
|---|
| 4270 | AC_ARG_ENABLE(static,
|
|---|
| 4271 | changequote(<<, >>)dnl
|
|---|
| 4272 | << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
|---|
| 4273 | changequote([, ])dnl
|
|---|
| 4274 | [p=${PACKAGE-default}
|
|---|
| 4275 | case "$enableval" in
|
|---|
| 4276 | yes) enable_static=yes ;;
|
|---|
| 4277 | no) enable_static=no ;;
|
|---|
| 4278 | *)
|
|---|
| 4279 | enable_static=no
|
|---|
| 4280 | # Look at the argument we got. We use all the common list separators.
|
|---|
| 4281 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
|---|
| 4282 | for pkg in $enableval; do
|
|---|
| 4283 | if test "X$pkg" = "X$p"; then
|
|---|
| 4284 | enable_static=yes
|
|---|
| 4285 | fi
|
|---|
| 4286 | done
|
|---|
| 4287 | IFS="$ac_save_ifs"
|
|---|
| 4288 | ;;
|
|---|
| 4289 | esac],
|
|---|
| 4290 | enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
|---|
| 4291 | ])
|
|---|
| 4292 |
|
|---|
| 4293 | # AC_DISABLE_STATIC - set the default static flag to --disable-static
|
|---|
| 4294 | AC_DEFUN([AC_DISABLE_STATIC],
|
|---|
| 4295 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
|---|
| 4296 | AC_ENABLE_STATIC(no)])
|
|---|
| 4297 |
|
|---|
| 4298 |
|
|---|
| 4299 | # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
|---|
| 4300 | # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
|---|
| 4301 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
|---|
| 4302 | # `yes'.
|
|---|
| 4303 | AC_DEFUN([AC_ENABLE_FAST_INSTALL],
|
|---|
| 4304 | [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
|---|
| 4305 | AC_ARG_ENABLE(fast-install,
|
|---|
| 4306 | changequote(<<, >>)dnl
|
|---|
| 4307 | << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
|---|
| 4308 | changequote([, ])dnl
|
|---|
| 4309 | [p=${PACKAGE-default}
|
|---|
| 4310 | case "$enableval" in
|
|---|
| 4311 | yes) enable_fast_install=yes ;;
|
|---|
| 4312 | no) enable_fast_install=no ;;
|
|---|
| 4313 | *)
|
|---|
| 4314 | enable_fast_install=no
|
|---|
| 4315 | # Look at the argument we got. We use all the common list separators.
|
|---|
| 4316 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
|---|
| 4317 | for pkg in $enableval; do
|
|---|
| 4318 | if test "X$pkg" = "X$p"; then
|
|---|
| 4319 | enable_fast_install=yes
|
|---|
| 4320 | fi
|
|---|
| 4321 | done
|
|---|
| 4322 | IFS="$ac_save_ifs"
|
|---|
| 4323 | ;;
|
|---|
| 4324 | esac],
|
|---|
| 4325 | enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
|---|
| 4326 | ])
|
|---|
| 4327 |
|
|---|
| 4328 | # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
|
|---|
| 4329 | AC_DEFUN([AC_DISABLE_FAST_INSTALL],
|
|---|
| 4330 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
|---|
| 4331 | AC_ENABLE_FAST_INSTALL(no)])
|
|---|
| 4332 |
|
|---|
| 4333 | # AC_LIBTOOL_PICMODE - implement the --with-pic flag
|
|---|
| 4334 | # Usage: AC_LIBTOOL_PICMODE[(MODE)]
|
|---|
| 4335 | # Where MODE is either `yes' or `no'. If omitted, it defaults to
|
|---|
| 4336 | # `both'.
|
|---|
| 4337 | AC_DEFUN([AC_LIBTOOL_PICMODE],
|
|---|
| 4338 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
|---|
| 4339 | pic_mode=ifelse($#,1,$1,default)])
|
|---|
| 4340 |
|
|---|
| 4341 |
|
|---|
| 4342 | # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
|
|---|
| 4343 | AC_DEFUN([AC_PATH_TOOL_PREFIX],
|
|---|
| 4344 | [AC_MSG_CHECKING([for $1])
|
|---|
| 4345 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
|
|---|
| 4346 | [case "$MAGIC_CMD" in
|
|---|
| 4347 | /*)
|
|---|
| 4348 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
|
|---|
| 4349 | ;;
|
|---|
| 4350 | ?:/*)
|
|---|
| 4351 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
|
|---|
| 4352 | ;;
|
|---|
| 4353 | *)
|
|---|
| 4354 | ac_save_MAGIC_CMD="$MAGIC_CMD"
|
|---|
| 4355 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
|---|
| 4356 | dnl $ac_dummy forces splitting on constant user-supplied paths.
|
|---|
| 4357 | dnl POSIX.2 word splitting is done only on the output of word expansions,
|
|---|
| 4358 | dnl not every word. This closes a longstanding sh security hole.
|
|---|
| 4359 | ac_dummy="ifelse([$2], , $PATH, [$2])"
|
|---|
| 4360 | for ac_dir in $ac_dummy; do
|
|---|
| 4361 | test -z "$ac_dir" && ac_dir=.
|
|---|
| 4362 | if test -f $ac_dir/$1; then
|
|---|
| 4363 | lt_cv_path_MAGIC_CMD="$ac_dir/$1"
|
|---|
| 4364 | if test -n "$file_magic_test_file"; then
|
|---|
| 4365 | case "$deplibs_check_method" in
|
|---|
| 4366 | "file_magic "*)
|
|---|
| 4367 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
|
|---|
| 4368 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
|
|---|
| 4369 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
|
|---|
| 4370 | egrep "$file_magic_regex" > /dev/null; then
|
|---|
| 4371 | :
|
|---|
| 4372 | else
|
|---|
| 4373 | cat <<EOF 1>&2
|
|---|
| 4374 |
|
|---|
| 4375 | *** Warning: the command libtool uses to detect shared libraries,
|
|---|
| 4376 | *** $file_magic_cmd, produces output that libtool cannot recognize.
|
|---|
| 4377 | *** The result is that libtool may fail to recognize shared libraries
|
|---|
| 4378 | *** as such. This will affect the creation of libtool libraries that
|
|---|
| 4379 | *** depend on shared libraries, but programs linked with such libtool
|
|---|
| 4380 | *** libraries will work regardless of this problem. Nevertheless, you
|
|---|
| 4381 | *** may want to report the problem to your system manager and/or to
|
|---|
| 4382 | *** bug-libtool@gnu.org
|
|---|
| 4383 |
|
|---|
| 4384 | EOF
|
|---|
| 4385 | fi ;;
|
|---|
| 4386 | esac
|
|---|
| 4387 | fi
|
|---|
| 4388 | break
|
|---|
| 4389 | fi
|
|---|
| 4390 | done
|
|---|
| 4391 | IFS="$ac_save_ifs"
|
|---|
| 4392 | MAGIC_CMD="$ac_save_MAGIC_CMD"
|
|---|
| 4393 | ;;
|
|---|
| 4394 | esac])
|
|---|
| 4395 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
|
|---|
| 4396 | if test -n "$MAGIC_CMD"; then
|
|---|
| 4397 | AC_MSG_RESULT($MAGIC_CMD)
|
|---|
| 4398 | else
|
|---|
| 4399 | AC_MSG_RESULT(no)
|
|---|
| 4400 | fi
|
|---|
| 4401 | ])
|
|---|
| 4402 |
|
|---|
| 4403 |
|
|---|
| 4404 | # AC_PATH_MAGIC - find a file program which can recognise a shared library
|
|---|
| 4405 | AC_DEFUN([AC_PATH_MAGIC],
|
|---|
| 4406 | [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
|
|---|
| 4407 | AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
|
|---|
| 4408 | if test -z "$lt_cv_path_MAGIC_CMD"; then
|
|---|
| 4409 | if test -n "$ac_tool_prefix"; then
|
|---|
| 4410 | AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
|
|---|
| 4411 | else
|
|---|
| 4412 | MAGIC_CMD=:
|
|---|
| 4413 | fi
|
|---|
| 4414 | fi
|
|---|
| 4415 | ])
|
|---|
| 4416 |
|
|---|
| 4417 |
|
|---|
| 4418 | # AC_PROG_LD - find the path to the GNU or non-GNU linker
|
|---|
| 4419 | AC_DEFUN([AC_PROG_LD],
|
|---|
| 4420 | [AC_ARG_WITH(gnu-ld,
|
|---|
| 4421 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
|---|
| 4422 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
|---|
| 4423 | AC_REQUIRE([AC_PROG_CC])dnl
|
|---|
| 4424 | AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
|---|
| 4425 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
|---|
| 4426 | ac_prog=ld
|
|---|
| 4427 | if test "$GCC" = yes; then
|
|---|
| 4428 | # Check if gcc -print-prog-name=ld gives a path.
|
|---|
| 4429 | AC_MSG_CHECKING([for ld used by GCC])
|
|---|
| 4430 | case $host in
|
|---|
| 4431 | *-*-mingw*)
|
|---|
| 4432 | # gcc leaves a trailing carriage return which upsets mingw
|
|---|
| 4433 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
|---|
| 4434 | *)
|
|---|
| 4435 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
|---|
| 4436 | esac
|
|---|
| 4437 | case "$ac_prog" in
|
|---|
| 4438 | # Accept absolute paths.
|
|---|
| 4439 | changequote(,)dnl
|
|---|
| 4440 | [\\/]* | [A-Za-z]:[\\/]*)
|
|---|
| 4441 | re_direlt='/[^/][^/]*/\.\./'
|
|---|
| 4442 | changequote([,])dnl
|
|---|
| 4443 | # Canonicalize the path of ld
|
|---|
| 4444 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
|---|
| 4445 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
|---|
| 4446 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
|---|
| 4447 | done
|
|---|
| 4448 | test -z "$LD" && LD="$ac_prog"
|
|---|
| 4449 | ;;
|
|---|
| 4450 | "")
|
|---|
| 4451 | # If it fails, then pretend we aren't using GCC.
|
|---|
| 4452 | ac_prog=ld
|
|---|
| 4453 | ;;
|
|---|
| 4454 | *)
|
|---|
| 4455 | # If it is relative, then search for the first ld in PATH.
|
|---|
| 4456 | with_gnu_ld=unknown
|
|---|
| 4457 | ;;
|
|---|
| 4458 | esac
|
|---|
| 4459 | elif test "$with_gnu_ld" = yes; then
|
|---|
| 4460 | AC_MSG_CHECKING([for GNU ld])
|
|---|
| 4461 | else
|
|---|
| 4462 | AC_MSG_CHECKING([for non-GNU ld])
|
|---|
| 4463 | fi
|
|---|
| 4464 | AC_CACHE_VAL(lt_cv_path_LD,
|
|---|
| 4465 | [if test -z "$LD"; then
|
|---|
| 4466 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
|---|
| 4467 | for ac_dir in $PATH; do
|
|---|
| 4468 | test -z "$ac_dir" && ac_dir=.
|
|---|
| 4469 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
|---|
| 4470 | lt_cv_path_LD="$ac_dir/$ac_prog"
|
|---|
| 4471 | # Check to see if the program is GNU ld. I'd rather use --version,
|
|---|
| 4472 | # but apparently some GNU ld's only accept -v.
|
|---|
| 4473 | # Break only if it was the GNU/non-GNU ld that we prefer.
|
|---|
| 4474 | if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
|---|
| 4475 | test "$with_gnu_ld" != no && break
|
|---|
| 4476 | else
|
|---|
| 4477 | test "$with_gnu_ld" != yes && break
|
|---|
| 4478 | fi
|
|---|
| 4479 | fi
|
|---|
| 4480 | done
|
|---|
| 4481 | IFS="$ac_save_ifs"
|
|---|
| 4482 | else
|
|---|
| 4483 | lt_cv_path_LD="$LD" # Let the user override the test with a path.
|
|---|
| 4484 | fi])
|
|---|
| 4485 | LD="$lt_cv_path_LD"
|
|---|
| 4486 | if test -n "$LD"; then
|
|---|
| 4487 | AC_MSG_RESULT($LD)
|
|---|
| 4488 | else
|
|---|
| 4489 | AC_MSG_RESULT(no)
|
|---|
| 4490 | fi
|
|---|
| 4491 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
|---|
| 4492 | AC_PROG_LD_GNU
|
|---|
| 4493 | ])
|
|---|
| 4494 |
|
|---|
| 4495 | AC_DEFUN([AC_PROG_LD_GNU],
|
|---|
| 4496 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
|
|---|
| 4497 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
|---|
| 4498 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
|---|
| 4499 | lt_cv_prog_gnu_ld=yes
|
|---|
| 4500 | else
|
|---|
| 4501 | lt_cv_prog_gnu_ld=no
|
|---|
| 4502 | fi])
|
|---|
| 4503 | with_gnu_ld=$lt_cv_prog_gnu_ld
|
|---|
| 4504 | ])
|
|---|
| 4505 |
|
|---|
| 4506 | # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
|
|---|
| 4507 | # -- PORTME Some linkers may need a different reload flag.
|
|---|
| 4508 | AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
|
|---|
| 4509 | [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
|
|---|
| 4510 | [lt_cv_ld_reload_flag='-r'])
|
|---|
| 4511 | reload_flag=$lt_cv_ld_reload_flag
|
|---|
| 4512 | test -n "$reload_flag" && reload_flag=" $reload_flag"
|
|---|
| 4513 | ])
|
|---|
| 4514 |
|
|---|
| 4515 | # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
|
|---|
| 4516 | # -- PORTME fill in with the dynamic library characteristics
|
|---|
| 4517 | AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
|
|---|
| 4518 | [AC_CACHE_CHECK([how to recognise dependant libraries],
|
|---|
| 4519 | lt_cv_deplibs_check_method,
|
|---|
| 4520 | [lt_cv_file_magic_cmd='$MAGIC_CMD'
|
|---|
| 4521 | lt_cv_file_magic_test_file=
|
|---|
| 4522 | lt_cv_deplibs_check_method='unknown'
|
|---|
| 4523 | # Need to set the preceding variable on all platforms that support
|
|---|
| 4524 | # interlibrary dependencies.
|
|---|
| 4525 | # 'none' -- dependencies not supported.
|
|---|
| 4526 | # `unknown' -- same as none, but documents that we really don't know.
|
|---|
| 4527 | # 'pass_all' -- all dependencies passed with no checks.
|
|---|
| 4528 | # 'test_compile' -- check by making test program.
|
|---|
| 4529 | # 'file_magic [regex]' -- check by looking for files in library path
|
|---|
| 4530 | # which responds to the $file_magic_cmd with a given egrep regex.
|
|---|
| 4531 | # If you have `file' or equivalent on your system and you're not sure
|
|---|
| 4532 | # whether `pass_all' will *always* work, you probably want this one.
|
|---|
| 4533 |
|
|---|
| 4534 | case "$host_os" in
|
|---|
| 4535 | aix4*)
|
|---|
| 4536 | lt_cv_deplibs_check_method=pass_all
|
|---|
| 4537 | ;;
|
|---|
| 4538 |
|
|---|
| 4539 | beos*)
|
|---|
| 4540 | lt_cv_deplibs_check_method=pass_all
|
|---|
| 4541 | ;;
|
|---|
| 4542 |
|
|---|
| 4543 | bsdi4*)
|
|---|
| 4544 | changequote(,)dnl
|
|---|
| 4545 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
|
|---|
| 4546 | changequote([, ])dnl
|
|---|
| 4547 | lt_cv_file_magic_cmd='/usr/bin/file -L'
|
|---|
| 4548 | lt_cv_file_magic_test_file=/shlib/libc.so
|
|---|
| 4549 | ;;
|
|---|
| 4550 |
|
|---|
| 4551 | cygwin* | mingw* |pw32*)
|
|---|
| 4552 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
|
|---|
| 4553 | lt_cv_file_magic_cmd='$OBJDUMP -f'
|
|---|
| 4554 | ;;
|
|---|
| 4555 |
|
|---|
| 4556 | darwin* | rhapsody*)
|
|---|
| 4557 | lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
|
|---|
| 4558 | lt_cv_file_magic_cmd=/usr/bin/file
|
|---|
| 4559 | lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
|
|---|
| 4560 | ;;
|
|---|
| 4561 |
|
|---|
| 4562 | freebsd* )
|
|---|
| 4563 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
|---|
| 4564 | case "$host_cpu" in
|
|---|
| 4565 | i*86 )
|
|---|
| 4566 | # Not sure whether the presence of OpenBSD here was a mistake.
|
|---|
| 4567 | # Let's accept both of them until this is cleared up.
|
|---|
| 4568 | changequote(,)dnl
|
|---|
| 4569 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
|
|---|
| 4570 | changequote([, ])dnl
|
|---|
| 4571 | lt_cv_file_magic_cmd=/usr/bin/file
|
|---|
| 4572 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
|
|---|
| 4573 | ;;
|
|---|
| 4574 | esac
|
|---|
| 4575 | else
|
|---|
| 4576 | lt_cv_deplibs_check_method=pass_all
|
|---|
| 4577 | fi
|
|---|
| 4578 | ;;
|
|---|
| 4579 |
|
|---|
| 4580 | gnu*)
|
|---|
| 4581 | lt_cv_deplibs_check_method=pass_all
|
|---|
| 4582 | ;;
|
|---|
| 4583 |
|
|---|
| 4584 | hpux10.20*|hpux11*)
|
|---|
| 4585 | # TODO: Does this work for hpux-11 too?
|
|---|
| 4586 | changequote(,)dnl
|
|---|
| 4587 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
|
|---|
| 4588 | changequote([, ])dnl
|
|---|
| 4589 | lt_cv_file_magic_cmd=/usr/bin/file
|
|---|
| 4590 | lt_cv_file_magic_test_file=/usr/lib/libc.sl
|
|---|
| 4591 | ;;
|
|---|
| 4592 |
|
|---|
| 4593 | irix5* | irix6*)
|
|---|
| 4594 | case "$host_os" in
|
|---|
| 4595 | irix5*)
|
|---|
| 4596 | # this will be overridden with pass_all, but let us keep it just in case
|
|---|
| 4597 | lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
|
|---|
| 4598 | ;;
|
|---|
| 4599 | *)
|
|---|
| 4600 | case "$LD" in
|
|---|
| 4601 | *-32|*"-32 ") libmagic=32-bit;;
|
|---|
| 4602 | *-n32|*"-n32 ") libmagic=N32;;
|
|---|
| 4603 | *-64|*"-64 ") libmagic=64-bit;;
|
|---|
| 4604 | *) libmagic=never-match;;
|
|---|
| 4605 | esac
|
|---|
| 4606 | # this will be overridden with pass_all, but let us keep it just in case
|
|---|
| 4607 | changequote(,)dnl
|
|---|
| 4608 | lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
|
|---|
| 4609 | changequote([, ])dnl
|
|---|
| 4610 | ;;
|
|---|
| 4611 | esac
|
|---|
| 4612 | lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
|
|---|
| 4613 | lt_cv_deplibs_check_method=pass_all
|
|---|
| 4614 | ;;
|
|---|
| 4615 |
|
|---|
| 4616 | # This must be Linux ELF.
|
|---|
| 4617 | linux-gnu*)
|
|---|
| 4618 | case "$host_cpu" in
|
|---|
| 4619 | alpha* | i*86 | powerpc* | sparc* | ia64* | s390* )
|
|---|
| 4620 | lt_cv_deplibs_check_method=pass_all ;;
|
|---|
| 4621 | *)
|
|---|
| 4622 | # glibc up to 2.1.1 does not perform some relocations on ARM
|
|---|
| 4623 | changequote(,)dnl
|
|---|
| 4624 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
|
|---|
| 4625 | changequote([, ])dnl
|
|---|
| 4626 | esac
|
|---|
| 4627 | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
|---|
| 4628 | ;;
|
|---|
| 4629 |
|
|---|
| 4630 | netbsd*)
|
|---|
| 4631 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
|---|
| 4632 | [lt_cv_deplibs_check_method='file_magic NetBSD/[a-z0-9]* demand paged shared library']
|
|---|
| 4633 | else
|
|---|
| 4634 | [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object']
|
|---|
| 4635 | fi
|
|---|
| 4636 | lt_cv_file_magic_cmd='/usr/bin/file -L'
|
|---|
| 4637 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
|
|---|
| 4638 | ;;
|
|---|
| 4639 |
|
|---|
| 4640 | openbsd* )
|
|---|
| 4641 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
|---|
| 4642 | case "$host_cpu" in
|
|---|
| 4643 | i*86 )
|
|---|
| 4644 | changequote(,)dnl
|
|---|
| 4645 | lt_cv_deplibs_check_method='file_magic OpenBSD/i[3-9]86 demand paged shared library'
|
|---|
| 4646 | changequote([, ])dnl
|
|---|
| 4647 | lt_cv_file_magic_cmd=/usr/bin/file
|
|---|
| 4648 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
|
|---|
| 4649 | ;;
|
|---|
| 4650 | esac
|
|---|
| 4651 | else
|
|---|
| 4652 | lt_cv_deplibs_check_method=pass_all
|
|---|
| 4653 | fi
|
|---|
| 4654 | ;;
|
|---|
| 4655 |
|
|---|
| 4656 | newsos6)
|
|---|
| 4657 | [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
|
|---|
| 4658 | lt_cv_file_magic_cmd=/usr/bin/file
|
|---|
| 4659 | lt_cv_file_magic_test_file=/usr/lib/libnls.so
|
|---|
| 4660 | ;;
|
|---|
| 4661 |
|
|---|
| 4662 | osf3* | osf4* | osf5*)
|
|---|
| 4663 | # this will be overridden with pass_all, but let us keep it just in case
|
|---|
| 4664 | lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
|
|---|
| 4665 | lt_cv_file_magic_test_file=/shlib/libc.so
|
|---|
| 4666 | lt_cv_deplibs_check_method=pass_all
|
|---|
| 4667 | ;;
|
|---|
| 4668 |
|
|---|
| 4669 | sco3.2v5*)
|
|---|
| 4670 | lt_cv_deplibs_check_method=pass_all
|
|---|
| 4671 | ;;
|
|---|
| 4672 |
|
|---|
| 4673 | solaris*)
|
|---|
| 4674 | lt_cv_deplibs_check_method=pass_all
|
|---|
| 4675 | lt_cv_file_magic_test_file=/lib/libc.so
|
|---|
| 4676 | ;;
|
|---|
| 4677 |
|
|---|
| 4678 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
|---|
| 4679 | case "$host_vendor" in
|
|---|
| 4680 | ncr)
|
|---|
| 4681 | lt_cv_deplibs_check_method=pass_all
|
|---|
| 4682 | ;;
|
|---|
| 4683 | motorola)
|
|---|
| 4684 | changequote(,)dnl
|
|---|
| 4685 | 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]'
|
|---|
| 4686 | changequote([, ])dnl
|
|---|
| 4687 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
|
|---|
| 4688 | ;;
|
|---|
| 4689 | esac
|
|---|
| 4690 | ;;
|
|---|
| 4691 | esac
|
|---|
| 4692 | ])
|
|---|
| 4693 | file_magic_cmd=$lt_cv_file_magic_cmd
|
|---|
| 4694 | deplibs_check_method=$lt_cv_deplibs_check_method
|
|---|
| 4695 | ])
|
|---|
| 4696 |
|
|---|
| 4697 |
|
|---|
| 4698 | # AC_PROG_NM - find the path to a BSD-compatible name lister
|
|---|
| 4699 | AC_DEFUN([AC_PROG_NM],
|
|---|
| 4700 | [AC_MSG_CHECKING([for BSD-compatible nm])
|
|---|
| 4701 | AC_CACHE_VAL(lt_cv_path_NM,
|
|---|
| 4702 | [if test -n "$NM"; then
|
|---|
| 4703 | # Let the user override the test.
|
|---|
| 4704 | lt_cv_path_NM="$NM"
|
|---|
| 4705 | else
|
|---|
| 4706 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
|---|
| 4707 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
|---|
| 4708 | test -z "$ac_dir" && ac_dir=.
|
|---|
| 4709 | tmp_nm=$ac_dir/${ac_tool_prefix}nm
|
|---|
| 4710 | if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
|
|---|
| 4711 | # Check to see if the nm accepts a BSD-compat flag.
|
|---|
| 4712 | # Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
|---|
| 4713 | # nm: unknown option "B" ignored
|
|---|
| 4714 | # Tru64's nm complains that /dev/null is an invalid object file
|
|---|
| 4715 | if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
|
|---|
| 4716 | lt_cv_path_NM="$tmp_nm -B"
|
|---|
| 4717 | break
|
|---|
| 4718 | elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
|---|
| 4719 | lt_cv_path_NM="$tmp_nm -p"
|
|---|
| 4720 | break
|
|---|
| 4721 | else
|
|---|
| 4722 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
|
|---|
| 4723 | continue # so that we can try to find one that supports BSD flags
|
|---|
| 4724 | fi
|
|---|
| 4725 | fi
|
|---|
| 4726 | done
|
|---|
| 4727 | IFS="$ac_save_ifs"
|
|---|
| 4728 | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
|
|---|
| 4729 | fi])
|
|---|
| 4730 | NM="$lt_cv_path_NM"
|
|---|
| 4731 | AC_MSG_RESULT([$NM])
|
|---|
| 4732 | ])
|
|---|
| 4733 |
|
|---|
| 4734 | # AC_CHECK_LIBM - check for math library
|
|---|
| 4735 | AC_DEFUN([AC_CHECK_LIBM],
|
|---|
| 4736 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
|---|
| 4737 | LIBM=
|
|---|
| 4738 | case "$host" in
|
|---|
| 4739 | *-*-beos* | *-*-cygwin* | *-*-pw32*)
|
|---|
| 4740 | # These system don't have libm
|
|---|
| 4741 | ;;
|
|---|
| 4742 | *-ncr-sysv4.3*)
|
|---|
| 4743 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
|---|
| 4744 | AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
|---|
| 4745 | ;;
|
|---|
| 4746 | *)
|
|---|
| 4747 | AC_CHECK_LIB(m, main, LIBM="-lm")
|
|---|
| 4748 | ;;
|
|---|
| 4749 | esac
|
|---|
| 4750 | ])
|
|---|
| 4751 |
|
|---|
| 4752 | # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
|---|
| 4753 | # the libltdl convenience library and INCLTDL to the include flags for
|
|---|
| 4754 | # the libltdl header and adds --enable-ltdl-convenience to the
|
|---|
| 4755 | # configure arguments. Note that LIBLTDL and INCLTDL are not
|
|---|
| 4756 | # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
|
|---|
| 4757 | # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
|
|---|
| 4758 | # with '${top_builddir}/' and INCLTDL will be prefixed with
|
|---|
| 4759 | # '${top_srcdir}/' (note the single quotes!). If your package is not
|
|---|
| 4760 | # flat and you're not using automake, define top_builddir and
|
|---|
| 4761 | # top_srcdir appropriately in the Makefiles.
|
|---|
| 4762 | AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
|
|---|
| 4763 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
|---|
| 4764 | case "$enable_ltdl_convenience" in
|
|---|
| 4765 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
|---|
| 4766 | "") enable_ltdl_convenience=yes
|
|---|
| 4767 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
|---|
| 4768 | esac
|
|---|
| 4769 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
|
|---|
| 4770 | INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
|
|---|
| 4771 | ])
|
|---|
| 4772 |
|
|---|
| 4773 | # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
|---|
| 4774 | # the libltdl installable library and INCLTDL to the include flags for
|
|---|
| 4775 | # the libltdl header and adds --enable-ltdl-install to the configure
|
|---|
| 4776 | # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
|
|---|
| 4777 | # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
|
|---|
| 4778 | # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
|
|---|
| 4779 | # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
|
|---|
| 4780 | # with '${top_srcdir}/' (note the single quotes!). If your package is
|
|---|
| 4781 | # not flat and you're not using automake, define top_builddir and
|
|---|
| 4782 | # top_srcdir appropriately in the Makefiles.
|
|---|
| 4783 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
|---|
| 4784 | AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
|
|---|
| 4785 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
|---|
| 4786 | AC_CHECK_LIB(ltdl, main,
|
|---|
| 4787 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
|---|
| 4788 | [if test x"$enable_ltdl_install" = xno; then
|
|---|
| 4789 | AC_MSG_WARN([libltdl not installed, but installation disabled])
|
|---|
| 4790 | else
|
|---|
| 4791 | enable_ltdl_install=yes
|
|---|
| 4792 | fi
|
|---|
| 4793 | ])
|
|---|
| 4794 | if test x"$enable_ltdl_install" = x"yes"; then
|
|---|
| 4795 | ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
|---|
| 4796 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
|
|---|
| 4797 | INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
|
|---|
| 4798 | else
|
|---|
| 4799 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
|---|
| 4800 | LIBLTDL="-lltdl"
|
|---|
| 4801 | INCLTDL=
|
|---|
| 4802 | fi
|
|---|
| 4803 | ])
|
|---|
| 4804 |
|
|---|
| 4805 | # If this macro is not defined by Autoconf, define it here.
|
|---|
| 4806 | ifdef([AC_PROVIDE_IFELSE],
|
|---|
| 4807 | [],
|
|---|
| 4808 | [define([AC_PROVIDE_IFELSE],
|
|---|
| 4809 | [ifdef([AC_PROVIDE_$1],
|
|---|
| 4810 | [$2], [$3])])])
|
|---|
| 4811 |
|
|---|
| 4812 | # AC_LIBTOOL_CXX - enable support for C++ libraries
|
|---|
| 4813 | AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
|
|---|
| 4814 |
|
|---|
| 4815 | AC_DEFUN([_AC_LIBTOOL_CXX],
|
|---|
| 4816 | [AC_REQUIRE([AC_PROG_CXX])
|
|---|
| 4817 | AC_REQUIRE([AC_PROG_CXXCPP])
|
|---|
| 4818 | LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
|
|---|
| 4819 | lt_save_CC="$CC"
|
|---|
| 4820 | lt_save_CFLAGS="$CFLAGS"
|
|---|
| 4821 | dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
|
|---|
| 4822 | dnl is set to the C++ compiler.
|
|---|
| 4823 | AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
|
|---|
| 4824 | MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
|---|
| 4825 | LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
|
|---|
| 4826 | AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
|
|---|
| 4827 | objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
|
|---|
| 4828 | deplibs_check_method="$deplibs_check_method" \
|
|---|
| 4829 | file_magic_cmd="$file_magic_cmd" \
|
|---|
| 4830 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
|
|---|
| 4831 | --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
|
|---|
| 4832 | || AC_MSG_ERROR([libtool tag configuration failed])
|
|---|
| 4833 | CC="$lt_save_CC"
|
|---|
| 4834 | CFLAGS="$lt_save_CFLAGS"
|
|---|
| 4835 |
|
|---|
| 4836 | # Redirect the config.log output again, so that the ltconfig log is not
|
|---|
| 4837 | # clobbered by the next message.
|
|---|
| 4838 | exec 5>>./config.log
|
|---|
| 4839 | ])
|
|---|
| 4840 |
|
|---|
| 4841 | # AC_LIBTOOL_GCJ - enable support for GCJ libraries
|
|---|
| 4842 | AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
|
|---|
| 4843 |
|
|---|
| 4844 | AC_DEFUN([_AC_LIBTOOL_GCJ],
|
|---|
| 4845 | [AC_REQUIRE([AC_PROG_LIBTOOL])
|
|---|
| 4846 | AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
|
|---|
| 4847 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
|
|---|
| 4848 | [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
|
|---|
| 4849 | [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
|
|---|
| 4850 | [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
|
|---|
| 4851 | [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
|
|---|
| 4852 | LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
|
|---|
| 4853 | lt_save_CC="$CC"
|
|---|
| 4854 | lt_save_CFLAGS="$CFLAGS"
|
|---|
| 4855 | dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
|
|---|
| 4856 | dnl is set to the C++ compiler.
|
|---|
| 4857 | AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
|
|---|
| 4858 | MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
|---|
| 4859 | LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
|
|---|
| 4860 | AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
|
|---|
| 4861 | objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
|
|---|
| 4862 | deplibs_check_method="$deplibs_check_method" \
|
|---|
| 4863 | file_magic_cmd="$file_magic_cmd" \
|
|---|
| 4864 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
|
|---|
| 4865 | --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
|
|---|
| 4866 | || AC_MSG_ERROR([libtool tag configuration failed])
|
|---|
| 4867 | CC="$lt_save_CC"
|
|---|
| 4868 | CFLAGS="$lt_save_CFLAGS"
|
|---|
| 4869 |
|
|---|
| 4870 | # Redirect the config.log output again, so that the ltconfig log is not
|
|---|
| 4871 | # clobbered by the next message.
|
|---|
| 4872 | exec 5>>./config.log
|
|---|
| 4873 | ])
|
|---|
| 4874 |
|
|---|
| 4875 | dnl old names
|
|---|
| 4876 | AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
|
|---|
| 4877 | AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
|---|
| 4878 | AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
|---|
| 4879 | AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
|---|
| 4880 | AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
|---|
| 4881 | AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
|
|---|
| 4882 | AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
|
|---|
| 4883 |
|
|---|
| 4884 | dnl This is just to silence aclocal about the macro not being used
|
|---|
| 4885 | ifelse([AC_DISABLE_FAST_INSTALL])dnl
|
|---|
| 4886 |
|
|---|
| 4887 | AC_DEFUN([LT_AC_PROG_GCJ],
|
|---|
| 4888 | [AC_CHECK_TOOL(GCJ, gcj, no)
|
|---|
| 4889 | test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
|
|---|
| 4890 | AC_SUBST(GCJFLAGS)
|
|---|
| 4891 | ])
|
|---|
| 4892 |
|
|---|
| 4893 | # Do all the work for Automake. This macro actually does too much --
|
|---|
| 4894 | # some checks are only needed if your package does certain things.
|
|---|
| 4895 | # But this isn't really a big deal.
|
|---|
| 4896 |
|
|---|
| 4897 | # serial 1
|
|---|
| 4898 |
|
|---|
| 4899 | dnl Usage:
|
|---|
| 4900 | dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
|---|
| 4901 |
|
|---|
| 4902 | AC_DEFUN(AM_INIT_AUTOMAKE,
|
|---|
| 4903 | [AC_REQUIRE([AC_PROG_INSTALL])
|
|---|
| 4904 | PACKAGE=[$1]
|
|---|
| 4905 | AC_SUBST(PACKAGE)
|
|---|
| 4906 | VERSION=[$2]
|
|---|
| 4907 | AC_SUBST(VERSION)
|
|---|
| 4908 | dnl test to see if srcdir already configured
|
|---|
| 4909 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
|---|
| 4910 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
|---|
| 4911 | fi
|
|---|
| 4912 | ifelse([$3],,
|
|---|
| 4913 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
|---|
| 4914 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
|---|
| 4915 | AC_REQUIRE([AM_SANITY_CHECK])
|
|---|
| 4916 | AC_REQUIRE([AC_ARG_PROGRAM])
|
|---|
| 4917 | dnl FIXME This is truly gross.
|
|---|
| 4918 | missing_dir=`cd $ac_aux_dir && pwd`
|
|---|
| 4919 | AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
|---|
| 4920 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
|---|
| 4921 | AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
|---|
| 4922 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
|---|
| 4923 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
|---|
| 4924 | AC_REQUIRE([AC_PROG_MAKE_SET])])
|
|---|
| 4925 |
|
|---|
| 4926 | #
|
|---|
| 4927 | # Check to make sure that the build environment is sane.
|
|---|
| 4928 | #
|
|---|
| 4929 |
|
|---|
| 4930 | AC_DEFUN(AM_SANITY_CHECK,
|
|---|
| 4931 | [AC_MSG_CHECKING([whether build environment is sane])
|
|---|
| 4932 | # Just in case
|
|---|
| 4933 | sleep 1
|
|---|
| 4934 | echo timestamp > conftestfile
|
|---|
| 4935 | # Do `set' in a subshell so we don't clobber the current shell's
|
|---|
| 4936 | # arguments. Must try -L first in case configure is actually a
|
|---|
| 4937 | # symlink; some systems play weird games with the mod time of symlinks
|
|---|
| 4938 | # (eg FreeBSD returns the mod time of the symlink's containing
|
|---|
| 4939 | # directory).
|
|---|
| 4940 | if (
|
|---|
| 4941 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
|
|---|
| 4942 | if test "[$]*" = "X"; then
|
|---|
| 4943 | # -L didn't work.
|
|---|
| 4944 | set X `ls -t $srcdir/configure conftestfile`
|
|---|
| 4945 | fi
|
|---|
| 4946 | if test "[$]*" != "X $srcdir/configure conftestfile" \
|
|---|
| 4947 | && test "[$]*" != "X conftestfile $srcdir/configure"; then
|
|---|
| 4948 |
|
|---|
| 4949 | # If neither matched, then we have a broken ls. This can happen
|
|---|
| 4950 | # if, for instance, CONFIG_SHELL is bash and it inherits a
|
|---|
| 4951 | # broken ls alias from the environment. This has actually
|
|---|
| 4952 | # happened. Such a system could not be considered "sane".
|
|---|
| 4953 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
|---|
| 4954 | alias in your environment])
|
|---|
| 4955 | fi
|
|---|
| 4956 |
|
|---|
| 4957 | test "[$]2" = conftestfile
|
|---|
| 4958 | )
|
|---|
| 4959 | then
|
|---|
| 4960 | # Ok.
|
|---|
| 4961 | :
|
|---|
| 4962 | else
|
|---|
| 4963 | AC_MSG_ERROR([newly created file is older than distributed files!
|
|---|
| 4964 | Check your system clock])
|
|---|
| 4965 | fi
|
|---|
| 4966 | rm -f conftest*
|
|---|
| 4967 | AC_MSG_RESULT(yes)])
|
|---|
| 4968 |
|
|---|
| 4969 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
|---|
| 4970 | dnl The program must properly implement --version.
|
|---|
| 4971 | AC_DEFUN(AM_MISSING_PROG,
|
|---|
| 4972 | [AC_MSG_CHECKING(for working $2)
|
|---|
| 4973 | # Run test in a subshell; some versions of sh will print an error if
|
|---|
| 4974 | # an executable is not found, even if stderr is redirected.
|
|---|
| 4975 | # Redirect stdin to placate older versions of autoconf. Sigh.
|
|---|
| 4976 | if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
|---|
| 4977 | $1=$2
|
|---|
| 4978 | AC_MSG_RESULT(found)
|
|---|
| 4979 | else
|
|---|
| 4980 | $1="$3/missing $2"
|
|---|
| 4981 | AC_MSG_RESULT(missing)
|
|---|
| 4982 | fi
|
|---|
| 4983 | AC_SUBST($1)])
|
|---|
| 4984 |
|
|---|
| 4985 | # Like AC_CONFIG_HEADER, but automatically create stamp file.
|
|---|
| 4986 |
|
|---|
| 4987 | AC_DEFUN(AM_CONFIG_HEADER,
|
|---|
| 4988 | [AC_PREREQ([2.12])
|
|---|
| 4989 | AC_CONFIG_HEADER([$1])
|
|---|
| 4990 | dnl When config.status generates a header, we must update the stamp-h file.
|
|---|
| 4991 | dnl This file resides in the same directory as the config header
|
|---|
| 4992 | dnl that is generated. We must strip everything past the first ":",
|
|---|
| 4993 | dnl and everything past the last "/".
|
|---|
| 4994 | AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
|
|---|
| 4995 | ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
|
|---|
| 4996 | <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
|
|---|
| 4997 | <<am_indx=1
|
|---|
| 4998 | for am_file in <<$1>>; do
|
|---|
| 4999 | case " <<$>>CONFIG_HEADERS " in
|
|---|
| 5000 | *" <<$>>am_file "*<<)>>
|
|---|
| 5001 | echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
|
|---|
| 5002 | ;;
|
|---|
| 5003 | esac
|
|---|
| 5004 | am_indx=`expr "<<$>>am_indx" + 1`
|
|---|
| 5005 | done<<>>dnl>>)
|
|---|
| 5006 | changequote([,]))])
|
|---|
| 5007 |
|
|---|