1
dnl aclocal.m4 generated automatically by aclocal 1.4-p6
3
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4
dnl This file is free software; the Free Software Foundation
5
dnl gives unlimited permission to copy and/or distribute it,
6
dnl with or without modifications, as long as this notice is preserved.
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.
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)
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.
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.
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.
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.
39
dnl Single-module modifications are best placed in configure.in for kdelibs
40
dnl and kdebase or configure.in.in if present.
42
dnl ------------------------------------------------------------------------
43
dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
44
dnl thanks to Raja R Harinath.
45
dnl ------------------------------------------------------------------------
47
ifdef([_AC_PATH_X_XMKMF],[],
48
[AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
49
ifdef([AC_OUTPUT_SUBDIRS],[],
50
[AC_DEFUN([AC_OUTPUT_SUBDIRS],[subdirs=$1; _AC_OUTPUT_SUBDIRS])])
53
dnl Internal subroutine of AC_PATH_X.
54
dnl Set ac_x_includes and/or ac_x_libraries.
55
AC_DEFUN(KDE_PATH_X_DIRECT,
56
[if test "$ac_x_includes" = NO; then
57
# Guess where to find include files, by looking for this one X11 .h file.
58
test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
60
# First, try using that file with no special directory specified.
61
AC_TRY_CPP([#include <$x_direct_test_include>],
62
[# We can compile using X headers with no special include directory.
64
[# Look for the header file in a standard set of common directories.
65
# Check X11 before X11Rn because it is often a symlink to the current release.
77
/usr/local/X11/include \
78
/usr/local/X11R6/include \
79
/usr/local/X11R5/include \
80
/usr/local/X11R4/include \
82
/usr/local/include/X11 \
83
/usr/local/include/X11R6 \
84
/usr/local/include/X11R5 \
85
/usr/local/include/X11R4 \
89
/usr/XFree86/include/X11 \
93
/usr/unsupported/include \
95
/usr/local/x11r5/include \
96
/usr/lpp/Xamples/include \
98
/usr/openwin/include \
99
/usr/openwin/share/include \
102
if test -r "$ac_dir/$x_direct_test_include"; then
103
ac_x_includes=$ac_dir
107
fi # $ac_x_includes = NO
109
if test "$ac_x_libraries" = NO; then
110
# Check for the libraries.
112
test -z "$x_direct_test_library" && x_direct_test_library=Xt
113
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
115
# See if we find them without any special options.
116
# Don't add to $LIBS permanently.
118
LIBS="-l$x_direct_test_library $LIBS"
119
AC_TRY_LINK(, [${x_direct_test_function}()],
120
[LIBS="$ac_save_LIBS"
121
# We can link X programs with no special library path.
123
[LIBS="$ac_save_LIBS"
124
# First see if replacing the include by lib works.
125
# Check X11 before X11Rn because it is often a symlink to the current release.
126
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
138
/usr/local/X11R6/lib \
139
/usr/local/X11R5/lib \
140
/usr/local/X11R4/lib \
143
/usr/local/lib/X11R6 \
144
/usr/local/lib/X11R5 \
145
/usr/local/lib/X11R4 \
149
/usr/XFree86/lib/X11 \
153
/usr/unsupported/lib \
155
/usr/local/x11r5/lib \
156
/usr/lpp/Xamples/lib \
160
/usr/openwin/share/lib \
163
dnl Don't even attempt the hair of trying to link an X program!
164
for ac_extension in a so sl; do
165
if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
166
ac_x_libraries=$ac_dir
171
fi # $ac_x_libraries = NO
175
dnl ------------------------------------------------------------------------
176
dnl Find a file (or one of more files in a list of dirs)
177
dnl ------------------------------------------------------------------------
179
AC_DEFUN(AC_FIND_FILE,
186
echo "configure: __oline__: $i/$j" >&AC_FD_CC
187
if test -r "$i/$j"; then
188
echo "taking that" >&AC_FD_CC
196
dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
197
dnl if-not-found, test-parameter)
198
AC_DEFUN(KDE_FIND_PATH,
200
AC_MSG_CHECKING([for $1])
201
if test -n "$$2"; then
204
kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
206
AC_CACHE_VAL(kde_cv_path_$kde_cache,
218
if test -x "$dir/$1"; then
221
evalstr="$dir/$1 $5 2>&1 "
222
if eval $evalstr; then
223
kde_cv_path="$dir/$1"
227
kde_cv_path="$dir/$1"
233
eval "kde_cv_path_$kde_cache=$kde_cv_path"
237
eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
241
if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
242
AC_MSG_RESULT(not found)
245
AC_MSG_RESULT($kde_cv_path)
251
AC_DEFUN(KDE_MOC_ERROR_MESSAGE,
253
AC_MSG_ERROR([No Qt meta object compiler (moc) found!
254
Please check whether you installed Qt correctly.
255
You need to have a running moc binary.
256
configure tried to run $ac_cv_path_moc and the test didn't
257
succeed. If configure shouldn't have tried this one, set
258
the environment variable MOC to the right one before running
263
AC_DEFUN(KDE_UIC_ERROR_MESSAGE,
265
AC_MSG_WARN([No Qt ui compiler (uic) found!
266
Please check whether you installed Qt correctly.
267
You need to have a running uic binary.
268
configure tried to run $ac_cv_path_uic and the test didn't
269
succeed. If configure shouldn't have tried this one, set
270
the environment variable UIC to the right one before running
275
dnl ------------------------------------------------------------------------
276
dnl Find the meta object compiler and the ui compiler in the PATH,
277
dnl in $QTDIR/bin, and some more usual places
278
dnl ------------------------------------------------------------------------
280
AC_DEFUN(AC_PATH_QT_MOC_UIC,
283
for dir in $kde_qt_dirs; do
284
qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
286
qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
287
if test ! "$ac_qt_bindir" = "NO"; then
288
qt_bindirs="$ac_qt_bindir $qt_bindirs"
291
KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
292
if test -z "$UIC_NOT_NEEDED"; then
293
KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC=""])
294
if test -z "$UIC" ; then
295
KDE_UIC_ERROR_MESSAGE
299
UIC="echo uic not available: "
306
if test $kde_qtver = 3; then
313
AC_DEFUN(KDE_1_CHECK_PATHS,
315
KDE_1_CHECK_PATH_HEADERS
319
if test -n "$USE_RPATH"; then
321
if test -n "$kde_libraries"; then
322
KDE_TEST_RPATH="-R $kde_libraries"
325
if test -n "$qt_libraries"; then
326
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
329
if test -n "$x_libraries"; then
330
KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
333
KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
336
AC_MSG_CHECKING([for KDE libraries installed])
337
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'
339
if AC_TRY_EVAL(ac_link) && test -s conftest; then
342
AC_MSG_ERROR([your system fails at linking a small KDE application!
343
Check, if your compiler is installed correctly and if you have used the
344
same compiler to compile Qt and kdelibs as you did use now.
345
For more details about this problem, look at the end of config.log.])
348
if eval `KDEDIR= ./conftest 2>&5`; then
354
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
355
kde_have_all_paths=yes
357
KDE_SET_PATHS($kde_result)
361
AC_DEFUN(KDE_SET_PATHS,
363
kde_cv_all_paths="kde_have_all_paths=\"yes\" \
364
kde_htmldir=\"$kde_htmldir\" \
365
kde_appsdir=\"$kde_appsdir\" \
366
kde_icondir=\"$kde_icondir\" \
367
kde_sounddir=\"$kde_sounddir\" \
368
kde_datadir=\"$kde_datadir\" \
369
kde_locale=\"$kde_locale\" \
370
kde_cgidir=\"$kde_cgidir\" \
371
kde_confdir=\"$kde_confdir\" \
372
kde_mimedir=\"$kde_mimedir\" \
373
kde_toolbardir=\"$kde_toolbardir\" \
374
kde_wallpaperdir=\"$kde_wallpaperdir\" \
375
kde_templatesdir=\"$kde_templatesdir\" \
376
kde_bindir=\"$kde_bindir\" \
377
kde_servicesdir=\"$kde_servicesdir\" \
378
kde_servicetypesdir=\"$kde_servicetypesdir\" \
379
kde_moduledir=\"$kde_moduledir\" \
380
kde_styledir=\"$kde_styledir\" \
381
kde_widgetdir=\"$kde_widgetdir\" \
385
AC_DEFUN(KDE_SET_DEFAULT_PATHS,
387
if test "$1" = "default"; then
389
if test -z "$kde_htmldir"; then
390
kde_htmldir='\${prefix}/share/doc/HTML'
392
if test -z "$kde_appsdir"; then
393
kde_appsdir='\${prefix}/share/applnk'
395
if test -z "$kde_icondir"; then
396
kde_icondir='\${prefix}/share/icons'
398
if test -z "$kde_sounddir"; then
399
kde_sounddir='\${prefix}/share/sounds'
401
if test -z "$kde_datadir"; then
402
kde_datadir='\${prefix}/share/apps'
404
if test -z "$kde_locale"; then
405
kde_locale='\${prefix}/share/locale'
407
if test -z "$kde_cgidir"; then
408
kde_cgidir='\${exec_prefix}/cgi-bin'
410
if test -z "$kde_confdir"; then
411
kde_confdir='\${prefix}/share/config'
413
if test -z "$kde_mimedir"; then
414
kde_mimedir='\${prefix}/share/mimelnk'
416
if test -z "$kde_toolbardir"; then
417
kde_toolbardir='\${prefix}/share/toolbar'
419
if test -z "$kde_wallpaperdir"; then
420
kde_wallpaperdir='\${prefix}/share/wallpapers'
422
if test -z "$kde_templatesdir"; then
423
kde_templatesdir='\${prefix}/share/templates'
425
if test -z "$kde_bindir"; then
426
kde_bindir='\${exec_prefix}/bin'
428
if test -z "$kde_servicesdir"; then
429
kde_servicesdir='\${prefix}/share/services'
431
if test -z "$kde_servicetypesdir"; then
432
kde_servicetypesdir='\${prefix}/share/servicetypes'
434
if test -z "$kde_moduledir"; then
435
if test "$kde_qtver" = "2"; then
436
kde_moduledir='\${exec_prefix}/lib/kde2'
438
kde_moduledir='\${exec_prefix}/lib/kde3'
441
if test -z "$kde_styledir"; then
442
kde_styledir='\${exec_prefix}/lib/kde3/plugins/styles'
444
if test -z "$kde_widgetdir"; then
445
kde_widgetdir='\${exec_prefix}/lib/kde3/plugins/designer'
448
KDE_SET_PATHS(defaults)
452
if test $kde_qtver = 1; then
453
AC_MSG_RESULT([compiling])
456
AC_MSG_ERROR([path checking not yet supported for KDE 2])
462
AC_DEFUN(KDE_CHECK_PATHS_FOR_COMPLETENESS,
463
[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
464
test -z "$kde_icondir" || test -z "$kde_sounddir" ||
465
test -z "$kde_datadir" || test -z "$kde_locale" ||
466
test -z "$kde_cgidir" || test -z "$kde_confdir" ||
467
test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
468
test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
469
test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
470
test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
471
test -z "$kde_styledir" || test -z "kde_widgetdir"
472
test "x$kde_have_all_paths" != "xyes"; then
473
kde_have_all_paths=no
477
AC_DEFUN(KDE_MISSING_PROG_ERROR,
479
AC_MSG_ERROR([The important program $1 was not found!
480
Please check whether you installed KDE correctly.
484
AC_DEFUN(KDE_SUBST_PROGRAMS,
487
kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
488
if test -n "$KDEDIRS"; then
491
for dir in $KDEDIRS; do
492
kde_default_bindirs="$dir/bin $kde_default_bindirs "
496
kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
497
KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
498
KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
499
KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(mcopidl)])
500
KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(artsc-config)])
501
KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
502
KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
504
if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then
505
kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
506
test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
507
AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
508
if test "$KDE_XSL_STYLESHEET" = "NO"; then
509
KDE_XSL_STYLESHEET=""
511
KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
515
DCOP_DEPENDENCIES='$(DCOPIDL)'
517
AC_SUBST(DCOPIDL2CPP)
518
AC_SUBST(DCOP_DEPENDENCIES)
520
AC_SUBST(ARTSCCONFIG)
523
AC_SUBST(KDE_XSL_STYLESHEET)
525
if test -x "$KDECONFIG"; then # it can be "compiled"
526
kde_libs_prefix=`$KDECONFIG --prefix`
527
if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
528
AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
529
This means it has been moved since you installed it.
530
This won't work. Please recompile kdelibs for the new prefix.
533
kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
535
kde_libs_prefix='$(prefix)'
536
kde_libs_htmldir='$(kde_htmldir)'
538
AC_SUBST(kde_libs_prefix)
539
AC_SUBST(kde_libs_htmldir)
542
AC_DEFUN(AC_CREATE_KFSSTND,
544
AC_REQUIRE([AC_CHECK_RPATH])
546
AC_MSG_CHECKING([for KDE paths])
549
AC_CACHE_VAL(kde_cv_all_paths,
551
KDE_SET_DEFAULT_PATHS($1)
554
eval "$kde_cv_all_paths"
555
KDE_CHECK_PATHS_FOR_COMPLETENESS
556
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
557
# wrong values were cached, may be, we can set better ones
559
kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
560
kde_datadir= kde_locale= kde_cgidir= kde_confdir=
561
kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
562
kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
566
KDE_SET_DEFAULT_PATHS($1)
567
eval "$kde_cv_all_paths"
568
KDE_CHECK_PATHS_FOR_COMPLETENESS
569
kde_result="$kde_result (cache overridden)"
571
if test "$kde_have_all_paths" = "no"; then
572
AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
573
Since it had compiled and linked before, it must be a strange problem on your system.
574
Look at config.log for details. If you are not able to fix this, look at
575
http://www.kde.org/faq/installation.html or any www.kde.org mirror.
576
(If you're using an egcs version on Linux, you may update binutils!)
580
AC_MSG_RESULT($kde_result)
589
AC_DEFUN(AC_SUBST_KFSSTND,
591
AC_SUBST(kde_htmldir)
592
AC_SUBST(kde_appsdir)
593
AC_SUBST(kde_icondir)
594
AC_SUBST(kde_sounddir)
595
AC_SUBST(kde_datadir)
597
AC_SUBST(kde_confdir)
598
AC_SUBST(kde_mimedir)
599
AC_SUBST(kde_wallpaperdir)
602
AC_SUBST(kde_templatesdir)
603
AC_SUBST(kde_servicesdir)
604
AC_SUBST(kde_servicetypesdir)
605
AC_SUBST(kde_moduledir)
606
AC_SUBST(kde_styledir)
607
AC_SUBST(kde_widgetdir)
608
if test "$kde_qtver" = 1; then
609
kde_minidir="$kde_icondir/mini"
611
# for KDE 1 - this breaks KDE2 apps using minidir, but
612
# that's the plan ;-/
613
kde_minidir="/dev/null"
615
dnl AC_SUBST(kde_minidir)
616
dnl AC_SUBST(kde_cgidir)
617
dnl AC_SUBST(kde_toolbardir)
620
AC_DEFUN(KDE_MISC_TESTS,
623
dnl Checks for libraries.
624
AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD
626
AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
629
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
630
AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
631
AC_MSG_WARN([you have no crypt in either libcrypt or libc.
632
You should install libcrypt from another source or configure with PAM
637
if test $kde_have_crypt = yes; then
638
AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
642
AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
643
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
644
AC_CHECK_LIB(dnet_stub, dnet_ntoa,
645
[X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
647
AC_CHECK_FUNC(inet_ntoa)
648
if test $ac_cv_func_inet_ntoa = no; then
649
AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
651
AC_CHECK_FUNC(connect)
652
if test $ac_cv_func_connect = no; then
653
AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
657
AC_CHECK_FUNC(remove)
658
if test $ac_cv_func_remove = no; then
659
AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
662
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
663
AC_CHECK_FUNC(shmat, ,
664
AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
666
# Solaris 2.6 and others need -lresolv for res_init
667
AC_CHECK_FUNCS(res_init, , [
668
kde_libs_safe="$LIBS"
669
LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
678
X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
679
AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
684
LIBSOCKET="$X_EXTRA_LIBS"
687
AC_SUBST(X_EXTRA_LIBS)
688
AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
691
case $host in dnl this *is* LynxOS specific
693
AC_MSG_CHECKING([LynxOS header file wrappers])
694
[CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
695
AC_MSG_RESULT(disabled)
696
AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
704
dnl ------------------------------------------------------------------------
705
dnl Find the header files and libraries for X-Windows. Extended the
707
dnl ------------------------------------------------------------------------
711
AC_REQUIRE([KDE_MISC_TESTS])dnl
715
[ --enable-embedded link to Qt-embedded, don't use X],
716
kde_use_qt_emb=$enableval,
722
[ --enable-qtopia link to Qt-embedded, link to the Qtopia Environment],
723
kde_use_qt_emb_palm=$enableval,
724
kde_use_qt_emb_palm=no
727
if test "$kde_use_qt_emb" = "no"; then
729
AC_MSG_CHECKING(for X)
732
AC_CACHE_VAL(kde_cv_have_x,
733
[# One or both of the vars are not set, and there is no cached value.
734
if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
737
kde_x_includes=$x_includes
739
if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
742
kde_x_libraries=$x_libraries
745
# below we use the standard autoconf calls
746
ac_x_libraries=$kde_x_libraries
747
ac_x_includes=$kde_x_includes
750
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
751
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
752
dnl location. The correct location is /usr/lib32 or an undefined value
753
dnl (the linker is smart enough to pick the correct default library).
754
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
755
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
756
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
757
dnl x_includes should be left alone.
765
if test -z "$ac_x_includes"; then
768
if test -z "$ac_x_libraries"; then
769
ac_x_libraries="/usr/lib"
772
#from now on we use our own again
774
# when the user already gave --x-includes, we ignore
775
# what the standard autoconf macros told us.
776
if test "$kde_x_includes" = NO; then
777
kde_x_includes=$ac_x_includes
780
# for --x-libraries too
781
if test "$kde_x_libraries" = NO; then
782
kde_x_libraries=$ac_x_libraries
785
if test "$kde_x_includes" = NO; then
786
AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
789
if test "$kde_x_libraries" = NO; then
790
AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
793
# Record where we found X for the cache.
794
kde_cv_have_x="have_x=yes \
795
kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
798
eval "$kde_cv_have_x"
800
if test "$have_x" != yes; then
801
AC_MSG_RESULT($have_x)
804
AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
807
if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
809
x_includes="."; dnl better than nothing :-
811
x_includes=$kde_x_includes
812
X_INCLUDES="-I$x_includes"
815
if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
817
x_libraries="/usr/lib"; dnl better than nothing :-
819
x_libraries=$kde_x_libraries
820
X_LDFLAGS="-L$x_libraries"
822
all_includes="$X_INCLUDES"
823
all_libraries="$X_LDFLAGS"
827
AC_SUBST(x_libraries)
830
# Check for libraries that X11R6 Xt/Xaw programs need.
831
ac_save_LDFLAGS="$LDFLAGS"
832
LDFLAGS="$LDFLAGS $X_LDFLAGS"
833
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
834
# check for ICE first), but we must link in the order -lSM -lICE or
835
# we get undefined symbols. So assume we have SM if we have ICE.
836
# These have to be linked with before -lX11, unlike the other
837
# libraries we check for below, so use a different variable.
838
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
839
AC_CHECK_LIB(ICE, IceConnectionNumber,
840
[LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
842
LDFLAGS="$ac_save_LDFLAGS"
846
LIB_X11='-lX11 $(LIBSOCKET)'
849
AC_MSG_CHECKING(for libXext)
850
AC_CACHE_VAL(kde_cv_have_libXext,
852
kde_ldflags_safe="$LDFLAGS"
853
kde_libs_safe="$LIBS"
855
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
856
LIBS="-lXext -lX11 $LIBSOCKET"
865
printf("hello Xext\n");
867
kde_cv_have_libXext=yes,
868
kde_cv_have_libXext=no
871
LDFLAGS=$kde_ldflags_safe
875
AC_MSG_RESULT($kde_cv_have_libXext)
877
if test "$kde_cv_have_libXext" = "no"; then
878
AC_MSG_ERROR([We need a working libXext to proceed. Since configure
879
can't find it itself, we stop here assuming that make wouldn't find
883
AC_MSG_CHECKING(for Xinerama)
885
AC_ARG_WITH(xinerama,
886
[ --with-xinerama enable support for Xinerama ],
894
kde_save_LDFLAGS="$LDFLAGS"
895
kde_save_CFLAGS="$CFLAGS"
896
kde_save_LIBS="$LIBS"
897
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
898
CFLAGS="$CFLAGS -I$x_includes"
899
LIBS="-lXinerama -lXext"
901
if test "x$no_xinerama" = "xno"; then
903
AC_CACHE_VAL(ac_cv_have_xinerama,
905
AC_TRY_LINK([#include <X11/Xlib.h>
906
#include <X11/extensions/Xinerama.h>],
907
[XineramaIsActive(NULL);],
908
[ac_cv_have_xinerama="yes"],
909
[ac_cv_have_xinerama="no"])
912
ac_cv_have_xinerama=no;
915
AC_MSG_RESULT($ac_cv_have_xinerama)
919
if test "$ac_cv_have_xinerama" = "yes"; then
920
AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
921
LIBXINERAMA="-lXinerama"
924
AC_SUBST(LIBXINERAMA)
926
LDFLAGS="$kde_save_LDFLAGS"
927
CFLAGS="$kde_save_CFLAGS"
928
LIBS="$kde_save_LIBS"
934
dnl We're using QT Embedded
935
CXXFLAGS="$CXXFLAGS -fno-rtti -DQWS"
936
CFLAGS="$CFLAGS -DQWS"
937
LDFLAGS="$LDFLAGS -DQWS"
938
QTE_NORTTI="-fno-rtti -DQWS"
953
AC_SUBST(x_libraries)
963
AC_DEFUN(KDE_PRINT_QT_PROGRAM,
965
AC_REQUIRE([KDE_USE_QT])
966
cat > conftest.$ac_ext <<EOF
967
#include "confdefs.h"
969
#include <qapplication.h>
971
if test "$kde_qtver" = "2"; then
972
cat >> conftest.$ac_ext <<EOF
978
if test $kde_qtsubver -gt 0; then
979
cat >> conftest.$ac_ext <<EOF
980
#include <qiconview.h>
985
if test "$kde_qtver" = "3"; then
986
cat >> conftest.$ac_ext <<EOF
988
#include <qstylefactory.h>
989
#include <private/qucomextra_p.h>
993
echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
994
cat >> conftest.$ac_ext <<EOF
1000
if test "$kde_qtver" = "2"; then
1001
cat >> conftest.$ac_ext <<EOF
1002
QStringList *t = new QStringList();
1005
if test $kde_qtsubver -gt 0; then
1006
cat >> conftest.$ac_ext <<EOF
1008
iv.setWordWrapIconText(false);
1010
s.setLatin1("Elvis is alive", 14);
1014
if test "$kde_qtver" = "3"; then
1015
cat >> conftest.$ac_ext <<EOF
1016
(void)QStyleFactory::create(QString::null);
1017
QCursor c(Qt::WhatsThisCursor);
1020
cat >> conftest.$ac_ext <<EOF
1026
AC_DEFUN(KDE_USE_QT,
1028
if test -z "$1"; then
1032
kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1033
# following is the check if subversion isn�t found in passed argument
1034
if test "$kde_qtsubver" = "$1"; then
1037
kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
1038
if test "$kde_qtver" = "1"; then
1043
if test -z "$2"; then
1044
if test "$kde_qtver" = "2"; then
1045
if test $kde_qtsubver -gt 0; then
1046
kde_qt_minversion=">= Qt 2.2.2"
1048
kde_qt_minversion=">= Qt 2.0.2"
1051
if test "$kde_qtver" = "3"; then
1052
kde_qt_minversion=">= Qt 3.0.1"
1054
if test "$kde_qtver" = "1"; then
1055
kde_qt_minversion=">= 1.42 and < 2.0"
1058
kde_qt_minversion=$2
1061
if test -z "$3"; then
1062
if test $kde_qtver = 3; then
1063
kde_qt_verstring="QT_VERSION >= 301"
1065
if test $kde_qtver = 2; then
1066
if test $kde_qtsubver -gt 0; then
1067
kde_qt_verstring="QT_VERSION >= 222"
1069
kde_qt_verstring="QT_VERSION >= 200"
1072
if test $kde_qtver = 1; then
1073
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1079
if test $kde_qtver = 3; then
1080
kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt"
1082
if test $kde_qtver = 2; then
1083
kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
1085
if test $kde_qtver = 1; then
1086
kde_qt_dirs="$QTDIR /usr/lib/qt"
1090
AC_DEFUN(KDE_CHECK_QT_DIRECT,
1092
AC_REQUIRE([KDE_USE_QT])
1093
AC_MSG_CHECKING([if Qt compiles without flags])
1094
AC_CACHE_VAL(kde_cv_qt_direct,
1098
ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
1099
ac_LIBRARY_PATH="$LIBRARY_PATH"
1100
ac_cxxflags_safe="$CXXFLAGS"
1101
ac_ldflags_safe="$LDFLAGS"
1102
ac_libs_safe="$LIBS"
1104
CXXFLAGS="$CXXFLAGS -I$qt_includes"
1105
LDFLAGS="$LDFLAGS $X_LDFLAGS"
1106
if test "x$kde_use_qt_emb" != "xyes"; then
1107
LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
1109
LIBS="$LIBQT $LIBSOCKET"
1112
export LD_LIBRARY_PATH
1116
KDE_PRINT_QT_PROGRAM
1118
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1119
kde_cv_qt_direct="yes"
1121
kde_cv_qt_direct="no"
1122
echo "configure: failed program was:" >&AC_FD_CC
1123
cat conftest.$ac_ext >&AC_FD_CC
1127
CXXFLAGS="$ac_cxxflags_safe"
1128
LDFLAGS="$ac_ldflags_safe"
1129
LIBS="$ac_libs_safe"
1131
LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
1132
export LD_LIBRARY_PATH
1133
LIBRARY_PATH="$ac_LIBRARY_PATH"
1138
if test "$kde_cv_qt_direct" = "yes"; then
1147
dnl ------------------------------------------------------------------------
1148
dnl Try to find the Qt headers and libraries.
1149
dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
1150
dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
1151
dnl ------------------------------------------------------------------------
1153
AC_DEFUN(AC_PATH_QT_1_3,
1155
AC_REQUIRE([K_PATH_X])
1156
AC_REQUIRE([KDE_USE_QT])
1158
dnl ------------------------------------------------------------------------
1159
dnl Add configure flag to enable linking to MT version of Qt library.
1160
dnl ------------------------------------------------------------------------
1164
[ --disable-mt link to non-threaded Qt (deprecated)],
1165
kde_use_qt_mt=$enableval,
1167
if test $kde_qtver = 3; then
1177
dnl ------------------------------------------------------------------------
1178
dnl If we not get --disable-qt-mt then adjust some vars for the host.
1179
dnl ------------------------------------------------------------------------
1183
if test "x$kde_use_qt_mt" = "xyes"; then
1185
if test "x$kde_use_threading" = "xyes"; then
1186
CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
1187
KDE_MT_LDFLAGS="$USE_THREADS"
1188
KDE_MT_LIBS="$LIBPTHREAD"
1193
AC_SUBST(KDE_MT_LDFLAGS)
1194
AC_SUBST(KDE_MT_LIBS)
1196
kde_qt_was_given=yes
1198
dnl ------------------------------------------------------------------------
1199
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
1200
dnl ------------------------------------------------------------------------
1201
if test -z "$LIBQT_GLOB"; then
1202
if test "x$kde_use_qt_emb" = "xyes"; then
1203
LIBQT_GLOB="libqte.*"
1205
LIBQT_GLOB="libqt.*"
1209
if test -z "$LIBQT"; then
1210
dnl ------------------------------------------------------------
1211
dnl If we got --enable-embedded then adjust the Qt library name.
1212
dnl ------------------------------------------------------------
1213
if test "x$kde_use_qt_emb" = "xyes"; then
1219
kde_int_qt="-l$qtlib"
1225
if test -z "$LIBQPE"; then
1226
dnl ------------------------------------------------------------
1227
dnl If we got --enable-palmtop then add -lqpe to the link line
1228
dnl ------------------------------------------------------------
1229
if test "x$kde_use_qt_emb" = "xyes"; then
1230
if test "x$kde_use_qt_emb_palm" = "xyes"; then
1240
dnl ------------------------------------------------------------------------
1241
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1242
dnl ------------------------------------------------------------------------
1244
if test "x$kde_use_qt_mt" = "xyes"; then
1245
if test -z "$LIBQT"; then
1247
kde_int_qt="-l$qtlib-mt"
1250
kde_int_qt="$qtlib-mt"
1252
LIBQT_GLOB="lib$qtlib-mt.*"
1253
USING_QT_MT="using -mt"
1258
if test $kde_qtver != 1; then
1260
AC_REQUIRE([AC_FIND_PNG])
1261
AC_REQUIRE([AC_FIND_JPEG])
1262
LIBQT="$LIBQT $LIBPNG $LIBJPEG"
1265
if test $kde_qtver = 3; then
1266
AC_REQUIRE([KDE_CHECK_LIBDL])
1267
LIBQT="$LIBQT $LIBDL"
1270
AC_MSG_CHECKING([for Qt])
1272
if test "x$kde_use_qt_emb" != "xyes"; then
1273
LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
1275
ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
1279
[ --with-qt-dir=DIR where the root of Qt is installed ],
1280
[ ac_qt_includes="$withval"/include
1281
ac_qt_libraries="$withval"/lib
1282
ac_qt_bindir="$withval"/bin
1285
AC_ARG_WITH(qt-includes,
1286
[ --with-qt-includes=DIR where the Qt includes are. ],
1288
ac_qt_includes="$withval"
1291
kde_qt_libs_given=no
1293
AC_ARG_WITH(qt-libraries,
1294
[ --with-qt-libraries=DIR where the Qt library is installed.],
1295
[ ac_qt_libraries="$withval"
1296
kde_qt_libs_given=yes
1299
AC_CACHE_VAL(ac_cv_have_qt,
1300
[#try to guess Qt locations
1303
for dir in $kde_qt_dirs; do
1304
qt_incdirs="$qt_incdirs $dir/include $dir"
1306
qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 $x_includes"
1307
if test ! "$ac_qt_includes" = "NO"; then
1308
qt_incdirs="$ac_qt_includes $qt_incdirs"
1311
if test "$kde_qtver" != "1"; then
1312
kde_qt_header=qstyle.h
1314
kde_qt_header=qglobal.h
1317
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
1318
ac_qt_includes="$qt_incdir"
1321
for dir in $kde_qt_dirs; do
1322
qt_libdirs="$qt_libdirs $dir/lib $dir"
1324
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
1325
if test ! "$ac_qt_libraries" = "NO"; then
1326
qt_libdir=$ac_qt_libraries
1328
qt_libdirs="$ac_qt_libraries $qt_libdirs"
1329
# if the Qt was given, the chance is too big that libqt.* doesn't exist
1331
for dir in $qt_libdirs; do
1332
try="ls -1 $dir/${LIBQT_GLOB}"
1333
if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
1337
ac_qt_libraries="$qt_libdir"
1342
ac_cxxflags_safe="$CXXFLAGS"
1343
ac_ldflags_safe="$LDFLAGS"
1344
ac_libs_safe="$LIBS"
1346
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
1347
LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
1348
LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
1350
KDE_PRINT_QT_PROGRAM
1352
if AC_TRY_EVAL(ac_link) && test -s conftest; then
1355
echo "configure: failed program was:" >&AC_FD_CC
1356
cat conftest.$ac_ext >&AC_FD_CC
1357
ac_qt_libraries="NO"
1360
CXXFLAGS="$ac_cxxflags_safe"
1361
LDFLAGS="$ac_ldflags_safe"
1362
LIBS="$ac_libs_safe"
1365
if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
1366
ac_cv_have_qt="have_qt=no"
1369
if test "$ac_qt_includes" = NO; then
1370
if test "$ac_qt_libraries" = NO; then
1371
ac_qt_notfound="(headers and libraries)";
1373
ac_qt_notfound="(headers)";
1376
if test "x$kde_use_qt_mt" = "xyes"; then
1378
Make sure that you have compiled Qt with thread support!"
1379
ac_qt_notfound="(library $qtlib-mt)";
1381
ac_qt_notfound="(library $qtlib)";
1385
AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
1386
For more details about this problem, look at the end of config.log.$missing_qt_mt])
1392
eval "$ac_cv_have_qt"
1394
if test "$have_qt" != yes; then
1395
AC_MSG_RESULT([$have_qt]);
1397
ac_cv_have_qt="have_qt=yes \
1398
ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
1399
AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
1401
qt_libraries="$ac_qt_libraries"
1402
qt_includes="$ac_qt_includes"
1405
if test ! "$kde_qt_libs_given" = "yes"; then
1406
KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
1409
AC_SUBST(qt_libraries)
1410
AC_SUBST(qt_includes)
1412
if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
1415
QT_INCLUDES="-I$qt_includes"
1416
all_includes="$QT_INCLUDES $all_includes"
1419
if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
1422
QT_LDFLAGS="-L$qt_libraries"
1423
all_libraries="$all_libraries $QT_LDFLAGS"
1425
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1427
AC_SUBST(QT_INCLUDES)
1428
AC_SUBST(QT_LDFLAGS)
1431
if test "x$kde_use_qt_emb" != "xyes"; then
1432
LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG) -lXext $(LIB_X11) $(LIBSM)'
1434
LIB_QT="$kde_int_qt "'$(LIBPNG) $(LIBJPEG)'
1436
test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
1444
AC_DEFUN(AC_PATH_QT,
1449
AC_DEFUN(KDE_CHECK_FINAL,
1451
AC_ARG_ENABLE(final, [ --enable-final build size optimized apps (experimental - needs lots of memory)],
1452
kde_use_final=$enableval, kde_use_final=no)
1455
if test "x$kde_use_final" = "xyes"; then
1456
KDE_USE_FINAL_TRUE=""
1457
KDE_USE_FINAL_FALSE="#"
1459
KDE_USE_FINAL_TRUE="#"
1460
KDE_USE_FINAL_FALSE=""
1462
AC_SUBST(KDE_USE_FINAL_TRUE)
1463
AC_SUBST(KDE_USE_FINAL_FALSE)
1465
AC_ARG_ENABLE(closure, [ --disable-closure don't delay template instantiation],
1466
kde_use_closure=$enableval, kde_use_closure=yes)
1468
if test "x$kde_use_closure" = "xyes"; then
1469
KDE_USE_CLOSURE_TRUE=""
1470
KDE_USE_CLOSURE_FALSE="#"
1471
# CXXFLAGS="$CXXFLAGS $REPO"
1473
KDE_USE_CLOSURE_TRUE="#"
1474
KDE_USE_CLOSURE_FALSE=""
1476
AC_SUBST(KDE_USE_CLOSURE_TRUE)
1477
AC_SUBST(KDE_USE_CLOSURE_FALSE)
1480
dnl ------------------------------------------------------------------------
1481
dnl Now, the same with KDE
1482
dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
1483
dnl and $(kde_includes) will be the kdehdrlocation (if needed)
1484
dnl ------------------------------------------------------------------------
1486
AC_DEFUN(AC_BASE_PATH_KDE,
1489
AC_REQUIRE([AC_PATH_QT])dnl
1491
AC_MSG_CHECKING([for KDE])
1493
if test "${prefix}" != NONE; then
1494
kde_includes=${prefix}/include
1495
ac_kde_includes=$prefix/include
1497
if test "${exec_prefix}" != NONE; then
1498
kde_libraries=${exec_prefix}/lib
1499
ac_kde_libraries=$exec_prefix/lib
1501
kde_libraries=${prefix}/lib
1502
ac_kde_libraries=$prefix/lib
1511
AC_CACHE_VAL(ac_cv_have_kde,
1512
[#try to guess kde locations
1514
if test "$kde_qtver" = 1; then
1515
kde_check_header="ksock.h"
1516
kde_check_lib="libkdecore.la"
1518
kde_check_header="ksharedptr.h"
1519
kde_check_lib="libkio.la"
1522
if test -z "$1"; then
1524
kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
1525
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1526
kde_incdirs="$ac_kde_includes $kde_incdirs"
1527
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1528
ac_kde_includes="$kde_incdir"
1530
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1532
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1533
So, check this please and use another prefix!])
1536
kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib"
1537
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs"
1538
kde_libdirs="$ac_kde_libraries $kde_libdirs"
1539
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1540
ac_kde_libraries="$kde_libdir"
1542
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1544
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1545
So, check this please and use another prefix!])
1547
ac_kde_libraries="$kde_libdir"
1549
if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO; then
1550
ac_cv_have_kde="have_kde=no"
1552
ac_cv_have_kde="have_kde=yes \
1553
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1558
ac_cv_have_kde="have_kde=no"
1563
eval "$ac_cv_have_kde"
1565
if test "$have_kde" != "yes"; then
1566
if test "${prefix}" = NONE; then
1567
ac_kde_prefix="$ac_default_prefix"
1569
ac_kde_prefix="$prefix"
1571
if test "$exec_prefix" = NONE; then
1572
ac_kde_exec_prefix="$ac_kde_prefix"
1573
AC_MSG_RESULT([will be installed in $ac_kde_prefix])
1575
ac_kde_exec_prefix="$exec_prefix"
1576
AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
1579
kde_libraries="${ac_kde_exec_prefix}/lib"
1580
kde_includes=${ac_kde_prefix}/include
1583
ac_cv_have_kde="have_kde=yes \
1584
ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1585
AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
1587
kde_libraries="$ac_kde_libraries"
1588
kde_includes="$ac_kde_includes"
1590
AC_SUBST(kde_libraries)
1591
AC_SUBST(kde_includes)
1593
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" || test "$kde_includes" = "/usr/include"; then
1596
KDE_INCLUDES="-I$kde_includes"
1597
all_includes="$KDE_INCLUDES $all_includes"
1600
KDE_LDFLAGS="-L$kde_libraries"
1601
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then
1602
all_libraries="$all_libraries $KDE_LDFLAGS"
1605
AC_SUBST(KDE_LDFLAGS)
1606
AC_SUBST(KDE_INCLUDES)
1608
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1610
all_libraries="$all_libraries $USER_LDFLAGS"
1611
all_includes="$all_includes $USER_INCLUDES"
1612
AC_SUBST(all_includes)
1613
AC_SUBST(all_libraries)
1618
AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
1620
AC_MSG_CHECKING(for extra includes)
1621
AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR
1622
adds non standard include paths],
1623
kde_use_extra_includes="$withval",
1624
kde_use_extra_includes=NONE
1627
if test -n "$kde_use_extra_includes" && \
1628
test "$kde_use_extra_includes" != "NONE"; then
1632
for dir in $kde_use_extra_includes; do
1633
kde_extra_includes="$kde_extra_includes $dir"
1634
USER_INCLUDES="$USER_INCLUDES -I$dir"
1637
kde_use_extra_includes="added"
1639
kde_use_extra_includes="no"
1641
AC_SUBST(USER_INCLUDES)
1643
AC_MSG_RESULT($kde_use_extra_includes)
1646
AC_MSG_CHECKING(for extra libs)
1647
AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths],
1648
kde_use_extra_libs=$withval,
1649
kde_use_extra_libs=NONE
1651
if test -n "$kde_use_extra_libs" && \
1652
test "$kde_use_extra_libs" != "NONE"; then
1656
for dir in $kde_use_extra_libs; do
1657
kde_extra_libs="$kde_extra_libs $dir"
1658
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
1659
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
1662
kde_use_extra_libs="added"
1664
kde_use_extra_libs="no"
1667
AC_SUBST(USER_LDFLAGS)
1669
AC_MSG_RESULT($kde_use_extra_libs)
1673
AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
1675
AC_MSG_CHECKING([for KDE headers installed])
1678
cat > conftest.$ac_ext <<EOF
1680
# include <stdlib.h>
1683
#include "confdefs.h"
1687
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
1688
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
1689
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
1690
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
1691
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
1692
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
1693
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
1694
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
1695
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
1696
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
1697
printf("kde_wallpaperdir=\\"%s\\"\n",
1698
KApplication::kde_wallpaperdir().data());
1699
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
1700
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1701
printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1702
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
1703
printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1704
printf("kde_styledir=\\"/tmp/dummy\\"\n");
1705
printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
1710
ac_compile='${CXX-g++} -c $CXXFLAGS $all_includes $CPPFLAGS conftest.$ac_ext'
1711
if AC_TRY_EVAL(ac_compile); then
1714
AC_MSG_ERROR([your system is not able to compile a small KDE application!
1715
Check, if you installed the KDE header files correctly.
1716
For more details about this problem, look at the end of config.log.])
1722
AC_DEFUN(KDE_CHECK_KDEQTADDON,
1724
AC_MSG_CHECKING(for kde-qt-addon)
1725
AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
1727
kde_ldflags_safe="$LDFLAGS"
1728
kde_libs_safe="$LIBS"
1729
kde_cxxflags_safe="$CXXFLAGS"
1731
LIBS="-lkde-qt-addon $LIBQT $LIBS"
1732
CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
1733
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
1741
kde_cv_have_kdeqtaddon=yes,
1742
kde_cv_have_kdeqtaddon=no
1745
LDFLAGS=$kde_ldflags_safe
1747
kde_cxxflags_safe="$CXXFLAGS"
1750
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
1752
if test "$kde_cv_have_kdeqtaddon" = "no"; then
1753
AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
1754
It is a separate package (and CVS module) named kde-qt-addon.])
1758
AC_DEFUN(KDE_CHECK_KIMGIO,
1760
AC_REQUIRE([AC_BASE_PATH_KDE])
1761
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
1762
AC_REQUIRE([AC_FIND_TIFF])
1763
AC_REQUIRE([AC_FIND_JPEG])
1764
AC_REQUIRE([AC_FIND_PNG])
1765
AC_REQUIRE([KDE_CREATE_LIBS_ALIASES])
1767
if test "$1" = "existance"; then
1770
kde_save_LIBS="$LIBS"
1771
LIBS="$LIBS $all_libraries $LIBJPEG $LIBTIFF $LIBPNG $LIBQT -lm"
1772
AC_CHECK_LIB(kimgio, kimgioRegister, [
1773
LIBKIMGIO_EXISTS=yes],LIBKIMGIO_EXISTS=no)
1774
LIBS="$kde_save_LIBS"
1777
LIBKIMGIO_EXISTS=yes
1780
if test "$LIBKIMGIO_EXISTS" = "yes"; then
1781
LIB_KIMGIO='-lkimgio'
1785
AC_SUBST(LIB_KIMGIO)
1788
AC_DEFUN(KDE_CREATE_LIBS_ALIASES,
1790
AC_REQUIRE([KDE_MISC_TESTS])
1791
AC_REQUIRE([KDE_CHECK_LIBDL])
1792
AC_REQUIRE([K_PATH_X])
1794
if test $kde_qtver = 3; then
1795
LIB_KDECORE='-lkdecore'
1796
AC_SUBST(LIB_KDECORE)
1807
LIB_KSPELL='-lkspell'
1808
AC_SUBST(LIB_KSPELL)
1809
LIB_KPARTS='-lkparts'
1810
AC_SUBST(LIB_KPARTS)
1811
LIB_KDEPRINT='-lkdeprint'
1812
AC_SUBST(LIB_KDEPRINT)
1813
# these are for backward compatibility
1815
AC_SUBST(LIB_KSYCOCA)
1818
elif test $kde_qtver = 2; then
1819
LIB_KDECORE='-lkdecore'
1820
AC_SUBST(LIB_KDECORE)
1825
LIB_KSYCOCA='-lksycoca'
1826
AC_SUBST(LIB_KSYCOCA)
1835
LIB_KSPELL='-lkspell'
1836
AC_SUBST(LIB_KSPELL)
1837
LIB_KPARTS='-lkparts'
1838
AC_SUBST(LIB_KPARTS)
1839
LIB_KDEPRINT='-lkdeprint'
1840
AC_SUBST(LIB_KDEPRINT)
1842
LIB_KDECORE='-lkdecore -lXext $(LIB_QT)'
1843
AC_SUBST(LIB_KDECORE)
1844
LIB_KDEUI='-lkdeui $(LIB_KDECORE)'
1846
LIB_KFM='-lkfm $(LIB_KDECORE)'
1848
LIB_KFILE='-lkfile $(LIB_KFM) $(LIB_KDEUI)'
1850
LIB_KAB='-lkab $(LIB_KIMGIO) $(LIB_KDECORE)'
1855
AC_DEFUN(AC_PATH_KDE,
1858
AC_ARG_ENABLE(path-check, [ --disable-path-check don't try to find out, where to install],
1860
if test "$enableval" = "no";
1861
then ac_use_path_checking="default"
1862
else ac_use_path_checking=""
1866
if test "$kde_qtver" = 1;
1867
then ac_use_path_checking=""
1868
else ac_use_path_checking="default"
1873
AC_CREATE_KFSSTND($ac_use_path_checking)
1876
KDE_CREATE_LIBS_ALIASES
1880
AC_DEFUN(AC_CHECK_SETENV,
1882
AC_OBSOLETE([$0], [; instead use AC_CHECK_FUNCS([setenv unsetenv])])dnl
1883
AC_CHECK_FUNCS([setenv unsetenv])
1886
AC_DEFUN(AC_CHECK_GETDOMAINNAME,
1888
AC_MSG_CHECKING(for getdomainname)
1889
AC_CACHE_VAL(ac_cv_func_getdomainname,
1893
save_CXXFLAGS="$CXXFLAGS"
1894
kde_safe_LIBS="$LIBS"
1895
LIBS="$LIBS $X_EXTRA_LIBS"
1896
if test "$GCC" = "yes"; then
1897
CXXFLAGS="$CXXFLAGS -pedantic-errors"
1905
getdomainname(buffer, 200);
1907
ac_cv_func_getdomainname=yes,
1908
ac_cv_func_getdomainname=no)
1909
CXXFLAGS="$save_CXXFLAGS"
1913
AC_MSG_RESULT($ac_cv_func_getdomainname)
1915
AC_MSG_CHECKING([if getdomainname needs custom prototype])
1916
AC_CACHE_VAL(ac_cv_proto_getdomainname,
1920
if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
1921
ac_cv_proto_getdomainname=no
1924
LIBS="$LIBS $X_EXTRA_LIBS"
1929
extern "C" int getdomainname (char *, int);
1933
getdomainname(buffer, 200);
1935
ac_cv_func_getdomainname=yes
1936
ac_cv_proto_getdomainname=yes,
1937
AC_MSG_RESULT([fatal error])
1938
AC_MSG_ERROR([getdomainname unavailable]))
1943
AC_MSG_RESULT($ac_cv_proto_getdomainname)
1945
if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
1946
AC_DEFINE(HAVE_GETDOMAINNAME, 1, [Define if you have getdomainname])
1948
if eval "test \"`echo $ac_cv_proto_getdomainname`\" = no"; then
1949
AC_DEFINE(HAVE_GETDOMAINNAME_PROTO, 1,
1950
[Define if you have getdomainname prototype])
1955
AC_DEFUN(AC_CHECK_GETHOSTNAME,
1958
AC_MSG_CHECKING([for gethostname])
1959
AC_CACHE_VAL(ac_cv_func_gethostname,
1963
save_CXXFLAGS="$CXXFLAGS"
1964
if test "$GCC" = "yes"; then
1965
CXXFLAGS="$CXXFLAGS -pedantic-errors"
1973
gethostname(buffer, 200);
1975
ac_cv_func_gethostname=yes,
1976
ac_cv_func_gethostname=no)
1977
CXXFLAGS="$save_CXXFLAGS"
1980
AC_MSG_RESULT($ac_cv_func_gethostname)
1982
AC_MSG_CHECKING([if gethostname needs custom prototype])
1983
AC_CACHE_VAL(ac_cv_proto_gethostname,
1987
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
1988
ac_cv_proto_gethostname=no
1994
extern "C" int gethostname (char *, int);
1998
gethostname(buffer, 200);
2000
ac_cv_func_gethostname=yes
2001
ac_cv_proto_gethostname=yes,
2002
AC_MSG_RESULT([fatal error])
2003
AC_MSG_ERROR(gethostname unavailable))
2007
AC_MSG_RESULT($ac_cv_proto_gethostname)
2009
if eval "test \"`echo $ac_cv_proto_gethostname`\" = no"; then
2010
AC_DEFINE(HAVE_GETHOSTNAME_PROTO, 1,
2011
[Define if you have gethostname prototype])
2013
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
2014
AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have gethostname])
2018
AC_DEFUN(AC_CHECK_USLEEP,
2020
AC_MSG_CHECKING([for usleep])
2021
AC_CACHE_VAL(ac_cv_func_usleep,
2025
ac_libs_safe="$LIBS"
2026
LIBS="$LIBS $LIBUCB"
2034
ac_cv_func_usleep=yes,
2035
ac_cv_func_usleep=no)
2036
LIBS="$ac_libs_safe"
2039
AC_MSG_RESULT($ac_cv_func_usleep)
2040
if eval "test \"`echo $ac_cv_func_usleep`\" = yes"; then
2041
AC_DEFINE(HAVE_USLEEP, 1, [Define if you have the usleep function])
2045
AC_DEFUN(AC_CHECK_RANDOM,
2047
AC_MSG_CHECKING([for random])
2048
AC_CACHE_VAL(ac_cv_func_random,
2052
ac_libs_safe="$LIBS"
2053
LIBS="$LIBS $LIBUCB"
2060
ac_cv_func_random=yes,
2061
ac_cv_func_random=no)
2062
LIBS="$ac_libs_safe"
2065
AC_MSG_RESULT($ac_cv_func_random)
2066
if eval "test \"`echo $ac_cv_func_random`\" = yes"; then
2067
AC_DEFINE(HAVE_RANDOM, 1, [Define if you have random])
2071
AC_DEFUN(AC_FIND_GIF,
2072
[AC_MSG_CHECKING([for giflib])
2073
AC_CACHE_VAL(ac_cv_lib_gif,
2074
[ac_save_LIBS="$LIBS"
2075
if test "x$kde_use_qt_emb" != "xyes"; then
2076
LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
2078
LIBS="$all_libraries -lgif"
2085
int GifLastError(void);
2089
/* We use char because int might match the return type of a gcc2
2090
builtin and then its argument prototype would still apply. */
2092
[return GifLastError();],
2093
eval "ac_cv_lib_gif=yes",
2094
eval "ac_cv_lib_gif=no")
2095
LIBS="$ac_save_LIBS"
2097
if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
2099
AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
2101
AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
2105
AC_DEFUN(KDE_FIND_JPEG_HELPER,
2107
AC_MSG_CHECKING([for libjpeg$2])
2108
AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
2111
ac_save_LIBS="$LIBS"
2112
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
2113
ac_save_CFLAGS="$CFLAGS"
2114
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2116
[/* Override any gcc2 internal prototype to avoid an error. */
2117
struct jpeg_decompress_struct;
2118
typedef struct jpeg_decompress_struct * j_decompress_ptr;
2123
void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2124
int version, size_t structsize);
2128
/* We use char because int might match the return type of a gcc2
2129
builtin and then its argument prototype would still apply. */
2131
[jpeg_CreateDecompress(0L, 0, 0);],
2132
eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2133
eval "ac_cv_lib_jpeg_$1=no")
2134
LIBS="$ac_save_LIBS"
2135
CFLAGS="$ac_save_CFLAGS"
2138
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
2139
LIBJPEG="$ac_cv_lib_jpeg_$1"
2140
AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
2148
AC_DEFUN(AC_FIND_JPEG,
2150
dnl first look for libraries
2151
KDE_FIND_JPEG_HELPER(6b, 6b,
2152
KDE_FIND_JPEG_HELPER(normal, [],
2159
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
2160
dnl requires system dependent includes loaded before it)
2161
jpeg_incdirs="/usr/include /usr/local/include $kde_extra_includes"
2162
AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
2163
test "x$jpeg_incdir" = xNO && jpeg_incdir=
2165
dnl if headers _and_ libraries are missing, this is no error, and we
2166
dnl continue with a warning (the user will get no jpeg support in khtml)
2167
dnl if only one is missing, it means a configuration error, but we still
2169
if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
2170
AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
2172
if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
2174
There is an installation error in jpeg support. You seem to have only one
2175
of either the headers _or_ the libraries installed. You may need to either
2176
provide correct --with-extra-... options, or the development package of
2177
libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
2178
Disabling JPEG support.
2181
AC_MSG_WARN([libjpeg not found. disable JPEG support.])
2190
AC_DEFUN(AC_FIND_ZLIB,
2192
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2193
AC_MSG_CHECKING([for libz])
2194
AC_CACHE_VAL(ac_cv_lib_z,
2197
kde_save_LIBS="$LIBS"
2198
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
2199
kde_save_CFLAGS="$CFLAGS"
2200
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2205
[return (zlibVersion() == ZLIB_VERSION); ],
2206
eval "ac_cv_lib_z='-lz'",
2207
eval "ac_cv_lib_z=no")
2208
LIBS="$kde_save_LIBS"
2209
CFLAGS="$kde_save_CFLAGS"
2211
if test ! "$ac_cv_lib_z" = no; then
2212
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
2215
AC_MSG_RESULT($ac_cv_lib_z)
2217
AC_MSG_ERROR(not found. Check your installation and look into config.log)
2223
AC_DEFUN(KDE_TRY_TIFFLIB,
2225
AC_MSG_CHECKING([for libtiff $1])
2227
AC_CACHE_VAL(kde_cv_libtiff_$1,
2231
kde_save_LIBS="$LIBS"
2232
if test "x$kde_use_qt_emb" != "xyes"; then
2233
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
2235
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
2237
kde_save_CXXFLAGS="$CXXFLAGS"
2238
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2244
[return (TIFFOpen( "", "r") == 0); ],
2246
kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
2248
kde_cv_libtiff_$1=no
2251
LIBS="$kde_save_LIBS"
2252
CXXFLAGS="$kde_save_CXXFLAGS"
2256
if test "$kde_cv_libtiff_$1" = "no"; then
2261
LIBTIFF="$kde_cv_libtiff_$1"
2263
AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
2269
AC_DEFUN(AC_FIND_TIFF,
2271
AC_REQUIRE([K_PATH_X])
2272
AC_REQUIRE([AC_FIND_ZLIB])
2273
AC_REQUIRE([AC_FIND_JPEG])
2274
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2276
KDE_TRY_TIFFLIB(tiff, [],
2277
KDE_TRY_TIFFLIB(tiff34))
2283
AC_DEFUN(AC_FIND_PNG,
2285
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
2286
AC_REQUIRE([AC_FIND_ZLIB])
2287
AC_MSG_CHECKING([for libpng])
2288
AC_CACHE_VAL(ac_cv_lib_png,
2290
kde_save_LIBS="$LIBS"
2291
if test "x$kde_use_qt_emb" != "xyes"; then
2292
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
2294
LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
2296
kde_save_CFLAGS="$CFLAGS"
2297
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2304
png_structp png_ptr = png_create_read_struct( /* image ptr */
2305
PNG_LIBPNG_VER_STRING, 0, 0, 0 );
2306
return( png_ptr != 0 );
2308
eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
2309
eval "ac_cv_lib_png=no"
2311
LIBS="$kde_save_LIBS"
2312
CFLAGS="$kde_save_CFLAGS"
2314
if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
2315
AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
2316
LIBPNG="$ac_cv_lib_png"
2318
AC_MSG_RESULT($ac_cv_lib_png)
2326
AC_DEFUN(AC_CHECK_BOOL,
2328
AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
2331
AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
2333
AC_MSG_CHECKING(if you need GNU extensions)
2334
AC_CACHE_VAL(ac_cv_gnu_extensions,
2336
cat > conftest.c << EOF
2337
#include <features.h>
2339
#ifdef __GNU_LIBRARY__
2344
if (eval "$ac_cpp conftest.c") 2>&5 |
2345
egrep "yes" >/dev/null 2>&1; then
2347
ac_cv_gnu_extensions=yes
2349
ac_cv_gnu_extensions=no
2353
AC_MSG_RESULT($ac_cv_gnu_extensions)
2354
if test "$ac_cv_gnu_extensions" = "yes"; then
2355
AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
2359
AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
2361
AC_MSG_CHECKING(whether $CXX supports -$1)
2362
kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
2363
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
2367
save_CXXFLAGS="$CXXFLAGS"
2368
CXXFLAGS="$CXXFLAGS -$1"
2369
AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
2370
CXXFLAGS="$save_CXXFLAGS"
2373
if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
2384
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2385
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2386
dnl it's all white-space separated
2387
AC_DEFUN(AC_REMOVE_FORBIDDEN,
2390
if test -n "$__val"; then
2396
*" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
2397
*) # Careful to not add spaces, where there were none, because otherwise
2398
# libtool gets confused, if we change e.g. CXX
2399
if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
2407
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2408
AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
2410
if test "x$kde_use_qt_emb" != "xyes"; then
2411
AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
2412
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
2414
AC_REMOVE_FORBIDDEN(CXX, [-rpath])
2415
AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
2419
AC_DEFUN(AC_CHECK_COMPILERS,
2421
AC_ARG_ENABLE(debug,[ --enable-debug[=ARG] enables debug symbols (yes|no|full) [default=no]],
2425
kde_use_debug_code="yes"
2426
kde_use_debug_define=no
2429
kde_use_debug_code="full"
2430
kde_use_debug_define=no
2433
kde_use_debug_code="no"
2434
kde_use_debug_define=yes
2438
[kde_use_debug_code="no"
2439
kde_use_debug_define=no
2442
dnl Just for configure --help
2443
AC_ARG_ENABLE(dummyoption,[ --disable-debug disables debug output and debug symbols [default=no]],[],[])
2445
AC_ARG_ENABLE(strict,[ --enable-strict compiles with strict compiler options (may not work!)],
2447
if test $enableval = "no"; then
2448
kde_use_strict_options="no"
2450
kde_use_strict_options="yes"
2452
], [kde_use_strict_options="no"])
2454
AC_ARG_ENABLE(warnings,[ --enable-warnings compiles with -Wall and similiar],
2456
if test $enableval = "no"; then
2457
kde_use_warnings="no"
2459
kde_use_warnings="yes"
2461
], [kde_use_warnings="no"])
2463
dnl enable warnings for debug build
2464
if test "$kde_use_debug_code" != "no"; then
2465
kde_use_warnings=yes
2468
AC_ARG_ENABLE(profile,[ --enable-profile creates profiling infos [default=no]],
2469
[kde_use_profiling=$enableval],
2470
[kde_use_profiling="no"]
2473
dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
2480
if test "$GCC" = "yes"; then
2481
if test "$kde_use_debug_code" != "no"; then
2482
if test $kde_use_debug_code = "full"; then
2483
CFLAGS="-g3 $CFLAGS"
2485
CFLAGS="-g -O2 $CFLAGS"
2488
CFLAGS="-O2 $CFLAGS"
2492
if test "$kde_use_debug_define" = "yes"; then
2493
CFLAGS="-DNDEBUG $CFLAGS"
2498
*-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
2499
*-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
2502
if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
2506
CXXFLAGS=" $CXXFLAGS"
2510
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
2511
if test "$kde_use_debug_code" != "no"; then
2512
if test "$CXX" = "KCC"; then
2513
CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
2515
if test "$kde_use_debug_code" = "full"; then
2516
CXXFLAGS="-g3 $CXXFLAGS"
2518
CXXFLAGS="-g -O2 $CXXFLAGS"
2521
KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
2523
dnl convenience compiler flags
2524
KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
2525
AC_SUBST(WOVERLOADED_VIRTUAL)
2527
if test "$CXX" = "KCC"; then
2528
CXXFLAGS="+K3 $CXXFLAGS"
2530
CXXFLAGS="-O2 $CXXFLAGS"
2535
if test "$kde_use_debug_define" = "yes"; then
2536
CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
2539
if test "$kde_use_profiling" = "yes"; then
2540
KDE_CHECK_COMPILER_FLAG(pg,
2542
CFLAGS="-pg $CFLAGS"
2543
CXXFLAGS="-pg $CXXFLAGS"
2547
if test "$kde_use_warnings" = "yes"; then
2548
if test "$GCC" = "yes"; then
2551
CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
2552
CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion $CXXFLAGS"
2555
CXXFLAGS="-Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
2556
KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
2557
KDE_CHECK_COMPILER_FLAG(Wbad-function-cast,[CXXFLAGS="-Wbad-function-cast $CXXFLAGS"])
2558
KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
2559
KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
2563
if test "$GCC" = "yes" && test "$kde_use_strict_options" = "yes"; then
2564
CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
2567
if test "$GXX" = "yes"; then
2568
KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
2569
KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
2570
KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
2572
if test "$CXX" = "KCC"; then
2573
dnl unfortunately we currently cannot disable exception support in KCC
2574
dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
2575
dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
2576
dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS= )
2578
AC_ARG_ENABLE(pch,[ --enable-pch enables precompiled header support (currently only KCC) [default=no]],
2580
kde_use_pch=$enableval
2583
if test "$kde_use_pch" = "yes"; then
2584
dnl TODO: support --pch-dir!
2585
KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
2586
dnl the below works (but the dir must exist), but it's
2587
dnl useless for a whole package.
2588
dnl The are precompiled headers for each source file, so when compiling
2589
dnl from scratch, it doesn't make a difference, and they take up
2590
dnl around ~5Mb _per_ sourcefile.
2591
dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
2592
dnl [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
2594
dnl this flag controls inlining. by default KCC inlines in optimisation mode
2595
dnl all implementations that are defined inside the class {} declaration.
2596
dnl because of templates-compatibility with broken gcc compilers, this
2597
dnl can cause excessive inlining. This flag limits it to a sane level
2598
KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
2599
KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
2600
KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
2601
KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
2602
dnl Some source files are shared between multiple executables
2603
dnl (or libraries) and some of those need template instantiations.
2604
dnl In that case KCC needs to compile those sources with
2605
dnl --one_instantiation_per_object. To make it easy for us we compile
2606
dnl _all_ objects with that flag (--one_per is a shorthand).
2607
KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
2609
AC_SUBST(USE_EXCEPTIONS)
2610
dnl obsolete macro - provided to keep things going
2615
*-*-irix*) test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
2616
*-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
2617
*-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
2619
if test "$GXX" = yes; then
2620
libstdcpp=`$CXX -print-file-name=libstdc++.so`
2621
if test ! -f $libstdcpp; then
2622
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])
2628
AC_VALIDIFY_CXXFLAGS
2632
# the following is to allow programs, that are known to
2633
# have problems when compiled with -O2
2634
if test -n "$CXXFLAGS"; then
2638
for i in $CXXFLAGS; do
2643
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i"
2650
if test -n "$CFLAGS"; then
2654
for i in $CFLAGS; do
2659
NOOPT_CFLAGS="$NOOPT_CFLAGS $i"
2666
if test "x$kde_use_qt_emb" = "xyes"; then
2667
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS -fno-rtti -DQWS"
2670
AC_SUBST(NOOPT_CXXFLAGS)
2671
AC_SUBST(NOOPT_CFLAGS)
2675
ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
2678
AC_SUBST(KDE_CXXFLAGS)
2681
AC_DEFUN(KDE_ADD_DEPENDENCIES,
2683
[A]M_DEPENDENCIES(CC)
2684
[A]M_DEPENDENCIES(CXX)
2687
dnl just a wrapper to clean up configure.in
2688
AC_DEFUN(KDE_PROG_LIBTOOL,
2690
AC_REQUIRE([AC_CHECK_COMPILERS])
2691
AC_REQUIRE([AC_ENABLE_SHARED])
2692
AC_REQUIRE([AC_ENABLE_STATIC])
2694
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
2705
LIBTOOL_SHELL="/bin/sh ./libtool"
2706
# LIBTOOL="$LIBTOOL --silent"
2707
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
2708
AC_SUBST(KDE_PLUGIN)
2711
AC_DEFUN(KDE_CHECK_TYPES,
2712
[ AC_CHECK_SIZEOF(int, 4)dnl
2713
AC_CHECK_SIZEOF(long, 4)dnl
2714
AC_CHECK_SIZEOF(char *, 4)dnl
2715
AC_CHECK_SIZEOF(char, 1)dnl
2718
AC_DEFUN(KDE_DO_IT_ALL,
2722
AM_INIT_AUTOMAKE($1, $2)
2723
AM_DISABLE_LIBRARIES
2724
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
2731
AC_DEFUN(AC_CHECK_RPATH,
2733
AC_MSG_CHECKING(for rpath)
2734
AC_ARG_ENABLE(rpath,
2735
[ --disable-rpath do not use the rpath feature of ld],
2736
USE_RPATH=$enableval, USE_RPATH=yes)
2738
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
2740
KDE_RPATH="-R \$(kde_libraries)"
2742
if test -n "$qt_libraries"; then
2743
KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
2745
dnl $x_libraries is set to /usr/lib in case
2746
if test -n "$X_LDFLAGS"; then
2747
KDE_RPATH="$KDE_RPATH -R \$(x_libraries)"
2749
if test -n "$KDE_EXTRA_RPATH"; then
2750
KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
2753
AC_SUBST(KDE_EXTRA_RPATH)
2755
AC_MSG_RESULT($USE_RPATH)
2758
dnl Check for the type of the third argument of getsockname
2759
AC_DEFUN(AC_CHECK_SOCKLEN_T, [
2760
AC_MSG_CHECKING(for socklen_t)
2761
AC_CACHE_VAL(ac_cv_socklen_t, [
2765
#include <sys/types.h>
2766
#include <sys/socket.h>
2769
getsockname(0,(struct sockaddr*)0, &a);
2771
ac_cv_socklen_t=socklen_t,
2773
#include <sys/types.h>
2774
#include <sys/socket.h>
2777
getsockname(0,(struct sockaddr*)0, &a);
2779
ac_cv_socklen_t=int,
2780
ac_cv_socklen_t=size_t
2786
AC_MSG_RESULT($ac_cv_socklen_t)
2787
if test "$ac_cv_socklen_t" != "socklen_t"; then
2788
AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
2789
[Define the real type of socklen_t])
2791
AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
2795
dnl This is a merge of some macros out of the gettext aclocal.m4
2796
dnl since we don't need anything, I took the things we need
2797
dnl the copyright for them is:
2799
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
2800
dnl This Makefile.in is free software; the Free Software Foundation
2801
dnl gives unlimited permission to copy and/or distribute it,
2802
dnl with or without modifications, as long as this notice is preserved.
2804
dnl This program is distributed in the hope that it will be useful,
2805
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
2806
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
2807
dnl PARTICULAR PURPOSE.
2809
dnl for this file it is relicensed under LGPL
2811
AC_DEFUN(AM_KDE_WITH_NLS,
2813
dnl If we use NLS figure out what method
2815
AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
2816
[test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
2817
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
2819
if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
2820
AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
2827
AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
2828
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
2830
dnl Test whether we really found GNU xgettext.
2831
if test "$XGETTEXT" != ":"; then
2832
dnl If it is no GNU xgettext we define it as : so that the
2833
dnl Makefiles still can work.
2834
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2838
[found xgettext programs is not GNU xgettext; ignore it])
2846
# Search path for a program which passes the given test.
2847
# Ulrich Drepper <drepper@cygnus.com>, 1996.
2850
# Stephan Kulow: I appended a _KDE against name conflicts
2852
dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
2853
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2854
AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
2855
[# Extract the first word of "$2", so it can be a program name with args.
2856
set dummy $2; ac_word=[$]2
2857
AC_MSG_CHECKING([for $ac_word])
2858
AC_CACHE_VAL(ac_cv_path_$1,
2861
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2864
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2865
for ac_dir in ifelse([$5], , $PATH, [$5]); do
2866
test -z "$ac_dir" && ac_dir=.
2867
if test -f $ac_dir/$ac_word; then
2869
ac_cv_path_$1="$ac_dir/$ac_word"
2875
dnl If no 4th arg is given, leave the cache variable unset,
2876
dnl so AC_PATH_PROGS will keep looking.
2877
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2882
if test -n "[$]$1"; then
2883
AC_MSG_RESULT([$]$1)
2891
# Check whether LC_MESSAGES is available in <locale.h>.
2892
# Ulrich Drepper <drepper@cygnus.com>, 1995.
2896
AC_DEFUN(AM_LC_MESSAGES,
2897
[if test $ac_cv_header_locale_h = yes; then
2898
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
2899
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
2900
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
2901
if test $am_cv_val_LC_MESSAGES = yes; then
2902
AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
2906
dnl From Jim Meyering.
2907
dnl FIXME: migrate into libit.
2909
AC_DEFUN([AM_FUNC_OBSTACK],
2910
[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
2911
[AC_TRY_LINK([#include "obstack.h"],
2912
[struct obstack *mem;obstack_free(mem,(char *) 0)],
2913
am_cv_func_obstack=yes,
2914
am_cv_func_obstack=no)])
2915
if test $am_cv_func_obstack = yes; then
2916
AC_DEFINE(HAVE_OBSTACK)
2918
LIBOBJS="$LIBOBJS obstack.o"
2922
dnl From Jim Meyering. Use this if you use the GNU error.[ch].
2923
dnl FIXME: Migrate into libit
2925
AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
2926
[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
2927
[AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
2928
am_cv_lib_error_at_line=yes,
2929
am_cv_lib_error_at_line=no)])
2930
if test $am_cv_lib_error_at_line = no; then
2931
LIBOBJS="$LIBOBJS error.o"
2933
AC_SUBST(LIBOBJS)dnl
2936
# Macro to add for using GNU gettext.
2937
# Ulrich Drepper <drepper@cygnus.com>, 1995.
2940
# Stephan Kulow: I put a KDE in it to avoid name conflicts
2942
AC_DEFUN(AM_KDE_GNU_GETTEXT,
2943
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2944
AC_REQUIRE([AC_PROG_RANLIB])dnl
2945
AC_REQUIRE([AC_HEADER_STDC])dnl
2946
AC_REQUIRE([AC_TYPE_OFF_T])dnl
2947
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
2948
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
2949
AC_REQUIRE([AC_FUNC_MMAP])dnl
2950
AC_REQUIRE([AM_KDE_WITH_NLS])dnl
2951
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h string.h values.h alloca.h])
2952
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
2953
__argz_count __argz_stringify __argz_next])
2955
AC_MSG_CHECKING(for stpcpy)
2956
AC_CACHE_VAL(kde_cv_func_stpcpy,
2958
kde_safe_cxxflags=$CXXFLAGS
2959
CXXFLAGS="-Wmissing-prototypes -Werror"
2967
stpcpy(buffer, buffer);
2969
kde_cv_func_stpcpy=yes,
2970
kde_cv_func_stpcpy=no)
2972
CXXFLAGS=$kde_safe_cxxflags
2974
AC_MSG_RESULT($kde_cv_func_stpcpy)
2975
if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
2976
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
2981
if test "x$CATOBJEXT" != "x"; then
2982
if test "x$ALL_LINGUAS" = "x"; then
2985
AC_MSG_CHECKING(for catalogs to be installed)
2987
for lang in ${LINGUAS=$ALL_LINGUAS}; do
2988
case "$ALL_LINGUAS" in
2989
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2992
LINGUAS=$NEW_LINGUAS
2993
AC_MSG_RESULT($LINGUAS)
2996
dnl Construct list of names of catalog files to be constructed.
2997
if test -n "$LINGUAS"; then
2998
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3004
AC_DEFUN(AC_HAVE_XPM,
3005
[AC_REQUIRE_CPP()dnl
3006
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3008
test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
3009
test -z "$XPM_INCLUDE" && XPM_INCLUDE=
3011
AC_ARG_WITH(xpm, [ --without-xpm disable color pixmap XPM tests],
3012
xpm_test=$withval, xpm_test="yes")
3013
if test "x$xpm_test" = xno; then
3016
AC_MSG_CHECKING(for XPM)
3017
AC_CACHE_VAL(ac_cv_have_xpm,
3020
ac_save_ldflags="$LDFLAGS"
3021
ac_save_cflags="$CFLAGS"
3022
if test "x$kde_use_qt_emb" != "xyes"; then
3023
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
3025
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
3027
CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
3028
test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
3029
AC_TRY_LINK([#include <X11/xpm.h>],[],
3030
ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
3031
LDFLAGS="$ac_save_ldflags"
3032
CFLAGS="$ac_save_cflags"
3035
if test "$ac_cv_have_xpm" = no; then
3041
AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
3042
if test "$XPM_LDFLAGS" = ""; then
3043
XPMLIB='-lXpm $(LIB_X11)'
3045
XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
3047
if test "$XPM_INCLUDE" = ""; then
3050
XPMINC="-I$XPM_INCLUDE"
3060
AC_DEFUN(AC_HAVE_DPMS,
3061
[AC_REQUIRE_CPP()dnl
3062
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3064
test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
3065
test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
3068
AC_ARG_WITH(dpms, [ --without-dpms disable DPMS power saving],
3069
dpms_test=$withval, dpms_test="yes")
3070
if test "x$dpms_test" = xno; then
3073
AC_MSG_CHECKING(for DPMS)
3074
dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
3075
dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
3076
AC_CACHE_VAL(ac_cv_have_dpms,
3078
if test "x$kde_use_qt_emb" = "xyes"; then
3080
ac_cv_have_dpms="no"
3083
ac_save_ldflags="$LDFLAGS"
3084
ac_save_cflags="$CFLAGS"
3085
ac_save_libs="$LIBS"
3086
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3087
CFLAGS="$CFLAGS $X_INCLUDES"
3088
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3090
#include <X11/Xproto.h>
3092
#include <X11/Xlib.h>
3093
#include <X11/extensions/dpms.h>
3095
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3096
ac_cv_have_dpms="yes", [
3097
LDFLAGS="$ac_save_ldflags"
3098
CFLAGS="$ac_save_cflags"
3099
LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3100
LIBS="$LIBS -lXdpms"
3101
CFLAGS="$CFLAGS $X_INCLUDES"
3102
test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3104
#include <X11/Xproto.h>
3106
#include <X11/Xlib.h>
3107
#include <X11/extensions/dpms.h>
3109
{ return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3111
ac_cv_have_dpms="-lXdpms"
3112
],ac_cv_have_dpms="no")
3114
LDFLAGS="$ac_save_ldflags"
3115
CFLAGS="$ac_save_cflags"
3116
LIBS="$ac_save_libs"
3120
if test "$ac_cv_have_dpms" = no; then
3126
AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
3127
if test "$ac_cv_have_dpms" = "-lXdpms"; then
3130
if test "$DPMS_LDFLAGS" = ""; then
3131
DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
3133
DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
3135
if test "$DPMS_INCLUDE" = ""; then
3138
DPMSINC="-I$DPMS_INCLUDE"
3148
AC_DEFUN(AC_HAVE_GL,
3149
[AC_REQUIRE_CPP()dnl
3150
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3152
test -z "$GL_LDFLAGS" && GL_LDFLAGS=
3153
test -z "$GL_INCLUDE" && GL_INCLUDE=
3155
AC_ARG_WITH(gl, [ --without-gl disable 3D GL modes],
3156
gl_test=$withval, gl_test="yes")
3157
if test "x$kde_use_qt_emb" = "xyes"; then
3158
# GL and Qt Embedded is a no-go for now.
3160
elif test "x$gl_test" = xno; then
3163
AC_MSG_CHECKING(for GL)
3164
AC_CACHE_VAL(ac_cv_have_gl,
3167
ac_save_ldflags="$LDFLAGS"
3168
ac_save_cflags="$CFLAGS"
3169
LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
3170
test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3171
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3172
CFLAGS="$CFLAGS $X_INCLUDES"
3173
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3174
AC_TRY_LINK([#include <GL/gl.h>
3177
ac_cv_have_gl="mesa", ac_cv_have_gl="no")
3178
if test "x$ac_cv_have_gl" = "xno"; then
3179
LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU"
3180
test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3181
LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3182
CFLAGS="$ac_save_cflags $X_INCLUDES"
3183
test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3184
AC_TRY_LINK([#include <GL/gl.h>
3187
ac_cv_have_gl="yes", ac_cv_have_gl="no")
3189
LDFLAGS="$ac_save_ldflags"
3190
CFLAGS="$ac_save_cflags"
3193
if test "$ac_cv_have_gl" = "no"; then
3199
AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3200
if test "$GL_LDFLAGS" = ""; then
3201
if test "$ac_cv_have_gl" = "mesa"; then
3202
GLLIB='-lMesaGL -lMesaGLU $(LIB_X11)'
3204
GLLIB='-lGL -lGLU $(LIB_X11)'
3207
if test "$ac_cv_have_gl" = "mesa"; then
3208
GLLIB="$GL_LDFLAGS -lMesaGL -lMesaGLU "'$(LIB_X11)'
3210
GLLIB="$GL_LDFLAGS -lGL -lGLU "'$(LIB_X11)'
3213
if test "$GL_INCLUDE" = ""; then
3216
GLINC="-I$GL_INCLUDE"
3218
AC_MSG_RESULT($ac_cv_have_gl)
3227
dnl shadow password and PAM magic - maintained by ossi@kde.org
3230
AC_REQUIRE([KDE_CHECK_LIBDL])
3233
[ --with-pam[=ARG] enable support for PAM: ARG=[yes|no|service name]],
3234
[ if test "x$withval" = "xyes"; then
3237
elif test "x$withval" = "xno"; then
3241
pam_service=$withval
3243
ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
3245
AC_CACHE_VAL(ac_cv_path_pam,
3247
AC_CHECK_LIB(pam, pam_start,
3248
[ AC_CHECK_HEADER(security/pam_appl.h,
3252
ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
3255
eval "$ac_cv_path_pam"
3257
AC_MSG_CHECKING(for PAM)
3258
if test "x$use_pam" = xno; then
3263
AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
3264
PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
3266
dnl test whether struct pam_message is const (Linux) or not (Sun)
3267
AC_MSG_CHECKING(for const pam_message)
3268
AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
3269
[ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
3270
[AC_MSG_RESULT([const: Linux-type PAM])],
3271
[AC_MSG_RESULT([nonconst: Sun-type PAM])
3272
AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
3274
[AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
3280
dnl DEF_PAM_SERVICE(arg name, full name, define name)
3281
AC_DEFUN(DEF_PAM_SERVICE, [
3283
[ --with-$1-pam=[val] override PAM service from --with-pam for $2],
3284
[ if test "x$use_pam" = xyes; then
3285
$3_PAM_SERVICE="$withval"
3287
AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
3288
You may want to enforce it by using --with-pam.])
3291
[ if test "x$use_pam" = xyes; then
3292
$3_PAM_SERVICE="$pam_service"
3295
if test -n "$$3_PAM_SERVICE"; then
3296
AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
3297
AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
3299
AC_SUBST($3_PAM_SERVICE)
3302
AC_DEFUN(KDE_SHADOWPASSWD, [
3303
AC_REQUIRE([KDE_PAM])
3305
AC_CHECK_LIB(shadow, getspent,
3306
[ LIBSHADOW="-lshadow"
3310
AC_CHECK_LIB(gen, getspent,
3314
[ AC_CHECK_FUNC(getspent,
3315
[ ac_use_shadow=yes ],
3316
[ ac_use_shadow=no ])
3322
AC_MSG_CHECKING([for shadow passwords])
3325
[ --with-shadow If you want shadow password support ],
3326
[ if test "x$withval" != "xno"; then
3332
use_shadow="$ac_use_shadow"
3335
if test "x$use_shadow" = xyes; then
3337
AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
3344
dnl finally make the relevant binaries setuid root, if we have shadow passwds.
3345
dnl this still applies, if we could use it indirectly through pam.
3346
if test "x$use_shadow" = xyes ||
3347
( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
3349
*-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
3350
SETUIDFLAGS="-m 4755 -o root";;
3352
SETUIDFLAGS="-m 4755";;
3355
AC_SUBST(SETUIDFLAGS)
3359
AC_DEFUN(KDE_PASSWDLIBS, [
3360
AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
3361
AC_REQUIRE([KDE_PAM])
3362
AC_REQUIRE([KDE_SHADOWPASSWD])
3364
if test "x$use_pam" = "xyes"; then
3365
PASSWDLIBS="$PAMLIBS"
3367
PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
3370
dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
3371
dnl /etc/master.passwd holds the actual passwords. /etc/master.passwd requires
3372
dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
3373
dnl may need to read /etc/master.passwd).
3376
SETUIDFLAGS="-m 4755 -o root"
3382
AC_SUBST(PASSWDLIBS)
3385
AC_DEFUN(KDE_CHECK_LIBDL,
3387
AC_CHECK_LIB(dl, dlopen, [
3389
ac_cv_have_dlfcn=yes
3392
AC_CHECK_LIB(dld, shl_unload, [
3394
ac_cv_have_shload=yes
3400
AC_DEFUN(KDE_CHECK_DLOPEN,
3403
AC_CHECK_HEADERS(dlfcn.h dl.h)
3404
if test "$ac_cv_header_dlfcn_h" = "no"; then
3408
if test "$ac_cv_header_dl_h" = "no"; then
3409
ac_cv_have_shload=no
3412
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
3414
AC_ARG_ENABLE(dlopen,
3415
[ --disable-dlopen link statically [default=no]] ,
3416
enable_dlopen=$enableval,
3419
# override the user's opinion, if we know it better ;)
3420
if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
3424
if test "$ac_cv_have_dlfcn" = "yes"; then
3425
AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
3428
if test "$ac_cv_have_shload" = "yes"; then
3429
AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
3432
if test "$enable_dlopen" = no ; then
3433
test -n "$1" && eval $1
3435
test -n "$2" && eval $2
3440
AC_DEFUN(KDE_CHECK_DYNAMIC_LOADING,
3442
KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
3444
AC_MSG_CHECKING([dynamic loading])
3445
eval "`egrep '^build_libtool_libs=' libtool`"
3446
if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
3448
AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
3452
AC_MSG_RESULT($dynamic_loading)
3453
if test "$dynamic_loading" = "yes"; then
3460
AC_DEFUN(KDE_ADD_INCLUDES,
3462
if test -z "$1"; then
3463
test_include="Pix.h"
3468
AC_MSG_CHECKING([for libg++ ($test_include)])
3470
AC_CACHE_VAL(kde_cv_libgpp_includes,
3472
kde_cv_libgpp_includes=no
3478
/usr/unsupported/include \
3483
if test -r "$ac_dir/$test_include"; then
3484
kde_cv_libgpp_includes=$ac_dir
3490
AC_MSG_RESULT($kde_cv_libgpp_includes)
3491
if test "$kde_cv_libgpp_includes" != "no"; then
3492
all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
3498
AC_DEFUN(KDE_CHECK_MICO,
3500
AC_REQUIRE([KDE_CHECK_LIBDL])
3501
AC_REQUIRE([KDE_MISC_TESTS])
3502
AC_MSG_CHECKING(for MICO)
3504
if test -z "$MICODIR"; then
3505
kde_micodir=/usr/local
3507
kde_micodir="$MICODIR"
3510
AC_ARG_WITH(micodir,
3511
[ --with-micodir=micodir where mico is installed ],
3512
kde_micodir=$withval,
3513
kde_micodir=$kde_micodir
3516
AC_CACHE_VAL(kde_cv_mico_incdir,
3518
mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
3519
AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
3522
kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
3524
if test ! -r $kde_micodir/include/CORBA.h; then
3525
AC_MSG_ERROR([No CORBA.h found, specify another micodir])
3528
AC_MSG_RESULT($kde_micodir)
3530
MICO_INCLUDES=-I$kde_micodir/include
3531
AC_SUBST(MICO_INCLUDES)
3532
MICO_LDFLAGS=-L$kde_micodir/lib
3533
AC_SUBST(MICO_LDFLAGS)
3534
micodir=$kde_micodir
3537
AC_MSG_CHECKING([for MICO version])
3538
AC_CACHE_VAL(kde_cv_mico_version,
3541
cat >conftest.$ac_ext <<EOF
3543
#include <mico/version.h>
3546
printf("MICO_VERSION=%s\n",MICO_VERSION);
3550
ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
3551
if AC_TRY_EVAL(ac_compile); then
3552
if eval `./conftest 2>&5`; then
3553
kde_cv_mico_version=$MICO_VERSION
3555
AC_MSG_ERROR([your system is not able to execute a small application to
3556
find MICO version! Check $kde_micodir/include/mico/version.h])
3559
AC_MSG_ERROR([your system is not able to compile a small application to
3560
find MICO version! Check $kde_micodir/include/mico/version.h])
3564
dnl installed MICO version
3565
mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
3566
mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
3567
mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
3569
if test "x$1" = "x"; then
3575
dnl required MICO version
3576
req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
3577
req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
3578
req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
3580
if test "$mico_v_maj" -lt "$req_v_maj" || \
3581
( test "$mico_v_maj" -eq "$req_v_maj" && \
3582
test "$mico_v_mid" -lt "$req_v_mid" ) || \
3583
( test "$mico_v_mid" -eq "$req_v_mid" && \
3584
test "$mico_v_min" -lt "$req_v_min" )
3587
AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
3588
at least is required. You should upgrade MICO.])
3590
AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
3593
LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
3595
if test -z "$IDL"; then
3596
IDL='$(kde_bindir)/cuteidl'
3599
IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
3600
AC_SUBST(IDL_DEPENDENCIES)
3602
idldir="\$(includedir)/idl"
3607
AC_DEFUN(KDE_CHECK_MINI_STL,
3609
AC_REQUIRE([KDE_CHECK_MICO])
3611
AC_MSG_CHECKING(if we use mico's mini-STL)
3612
AC_CACHE_VAL(kde_cv_have_mini_stl,
3616
kde_save_cxxflags="$CXXFLAGS"
3617
CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
3620
#include <mico/config.h>
3623
#ifdef HAVE_MINI_STL
3627
kde_cv_have_mini_stl=no,
3628
kde_cv_have_mini_stl=yes)
3629
CXXFLAGS="$kde_save_cxxflags"
3633
if test "x$kde_cv_have_mini_stl" = "xyes"; then
3645
AC_DEFUN(KDE_CHECK_LIBPTHREAD,
3647
AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
3648
AC_SUBST(LIBPTHREAD)
3651
AC_DEFUN(KDE_CHECK_PTHREAD_OPTION,
3653
AC_ARG_ENABLE(kernel-threads, [ --enable-kernel-threads Enable the use of the LinuxThreads port on FreeBSD/i386 only.],
3654
kde_use_kernthreads=$enableval, kde_use_kernthreads=no)
3656
if test "$kde_use_kernthreads" = "yes"; then
3657
ac_save_CXXFLAGS="$CXXFLAGS"
3658
ac_save_CFLAGS="$CXXFLAGS"
3659
CXXFLAGS="-I/usr/local/include/pthread/linuxthreads $CXXFLAGS"
3660
CFLAGS="-I/usr/local/include/pthread/linuxthreads $CFLAGS"
3661
AC_CHECK_HEADERS(pthread/linuxthreads/pthread.h)
3662
CXXFLAGS="$ac_save_CXXFLAGS"
3663
CFLAGS="$ac_save_CFLAGS"
3664
if test "$ac_cv_header_pthread_linuxthreads_pthread_h" = "no"; then
3665
kde_use_kernthreads=no
3667
dnl Add proper -I and -l statements
3668
AC_CHECK_LIB(lthread, pthread_join, [LIBPTHREAD="-llthread -llgcc_r"]) dnl for FreeBSD
3669
if test "x$LIBPTHREAD" = "x"; then
3670
kde_use_kernthreads=no
3672
USE_THREADS="-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads"
3677
if test -z "$LIBPTHREAD"; then
3678
KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-pthread"] )
3684
KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
3685
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
3688
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3691
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
3692
LIBPTHREAD="$LIBPTHREAD -lc_r"
3694
linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
3695
if test "$CXX" = "KCC"; then
3696
CXXFLAGS="$CXXFLAGS --thread_safe"
3697
NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
3703
AC_SUBST(USE_THREADS)
3704
AC_SUBST(LIBPTHREAD)
3707
AC_DEFUN(KDE_CHECK_THREADING,
3709
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
3710
AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
3711
dnl default is yes if libpthread is found and no if no libpthread is available
3712
if test -z "$LIBPTHREAD"; then
3713
if test -z "$USE_THREADS"; then
3714
kde_check_threading_default=no
3716
kde_check_threading_default=yes
3719
kde_check_threading_default=yes
3721
AC_ARG_ENABLE(threading, [ --disable-threading disables threading even if libpthread found ],
3722
kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
3723
if test "x$kde_use_threading" = "xyes"; then
3724
AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
3728
AC_DEFUN(KDE_TRY_LINK_PYTHON,
3730
if test "$kde_python_link_found" = no; then
3732
if test "$1" = normal; then
3733
AC_MSG_CHECKING(if a Python application links)
3735
AC_MSG_CHECKING(if Python depends on $2)
3738
AC_CACHE_VAL(kde_cv_try_link_python_$1,
3742
kde_save_cflags="$CFLAGS"
3743
CFLAGS="$CFLAGS $PYTHONINC"
3744
kde_save_libs="$LIBS"
3745
LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
3746
kde_save_ldflags="$LDFLAGS"
3747
LDFLAGS="$LDFLAGS $PYTHONLIB"
3753
PySys_SetArgv(1, 0);
3755
[kde_cv_try_link_python_$1=yes],
3756
[kde_cv_try_link_python_$1=no]
3758
CFLAGS="$kde_save_cflags"
3759
LIBS="$kde_save_libs"
3760
LDFLAGS="$kde_save_ldflags"
3763
if test "$kde_cv_try_link_python_$1" = "yes"; then
3765
kde_python_link_found=yes
3766
if test ! "$1" = normal; then
3767
LIBPYTHON="$LIBPYTHON $2"
3780
AC_DEFUN(KDE_CHECK_PYTHON_DIR,
3782
AC_MSG_CHECKING([for Python directory])
3784
AC_CACHE_VAL(kde_cv_pythondir,
3786
if test -z "$PYTHONDIR"; then
3787
kde_cv_pythondir=/usr/local
3789
kde_cv_pythondir="$PYTHONDIR"
3793
AC_ARG_WITH(pythondir,
3794
[ --with-pythondir=pythondir use python installed in pythondir ],
3796
ac_python_dir=$withval
3797
], ac_python_dir=$kde_cv_pythondir
3800
AC_MSG_RESULT($ac_python_dir)
3803
AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
3805
AC_REQUIRE([KDE_CHECK_LIBDL])
3806
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
3807
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
3809
if test -z "$1"; then
3815
AC_MSG_CHECKING([for Python$version])
3817
python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
3818
AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
3819
if test ! -r $python_incdir/Python.h; then
3820
AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
3821
python_incdir=$python_incdir/python$version
3822
if test ! -r $python_incdir/Python.h; then
3827
PYTHONINC=-I$python_incdir
3829
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
3830
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
3831
if test ! -r $python_libdir/libpython$version.a; then
3832
AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
3833
python_libdir=$python_libdir/python$version/config
3834
if test ! -r $python_libdir/libpython$version.a; then
3839
PYTHONLIB=-L$python_libdir
3840
kde_orig_LIBPYTHON=$LIBPYTHON
3841
if test -z "$LIBPYTHON"; then
3842
LIBPYTHON=-lpython$version
3845
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
3846
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
3847
python_moddir=$python_moddir/python$version
3848
if test ! -r $python_moddir/copy.py; then
3852
PYTHONMODDIR=$python_moddir
3854
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
3856
if test x$python_incdir = xno || test x$python_libdir = xno || test x$python_moddir = xno; then
3857
LIBPYTHON=$kde_orig_LIBPYTHON
3858
test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
3859
test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
3862
dnl Note: this test is very weak
3863
kde_python_link_found=no
3864
KDE_TRY_LINK_PYTHON(normal)
3865
KDE_TRY_LINK_PYTHON(m, -lm)
3866
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
3867
KDE_TRY_LINK_PYTHON(tcl, -ltcl)
3868
KDE_TRY_LINK_PYTHON(db2, -ldb2)
3869
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
3870
KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
3871
KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
3872
KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
3873
KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
3874
KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
3875
KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
3876
[AC_MSG_WARN([it seems, Python depends on another library.
3877
Pleae set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
3878
and contact the authors to let them know about this problem])
3881
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
3885
AC_SUBST(PYTHONMODDIR)
3886
AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
3892
AC_DEFUN(KDE_CHECK_PYTHON,
3894
KDE_CHECK_PYTHON_INTERN("2.1", [KDE_CHECK_PYTHON_INTERN("2.0",
3895
[ KDE_CHECK_PYTHON_INTERN($1, $2) ])
3899
AC_DEFUN(KDE_CHECK_STL_SGI,
3901
AC_MSG_CHECKING([if STL implementation is SGI like])
3902
AC_CACHE_VAL(kde_cv_stl_type_sgi,
3906
using namespace std;
3908
string astring="Hallo Welt.";
3909
astring.erase(0, 6); // now astring is "Welt"
3911
], kde_cv_stl_type_sgi=yes,
3912
kde_cv_stl_type_sgi=no)
3915
AC_MSG_RESULT($kde_cv_stl_type_sgi)
3917
if test "$kde_cv_stl_type_sgi" = "yes"; then
3918
AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
3922
AC_DEFUN(KDE_CHECK_STL_HP,
3924
AC_MSG_CHECKING([if STL implementation is HP like])
3925
AC_CACHE_VAL(kde_cv_stl_type_hp,
3929
using namespace std;
3931
string astring="Hello World";
3932
astring.remove(0, 6); // now astring is "World"
3934
], kde_cv_stl_type_hp=yes,
3935
kde_cv_stl_type_hp=no)
3937
AC_MSG_RESULT($kde_cv_stl_type_hp)
3939
if test "$kde_cv_stl_type_hp" = "yes"; then
3940
AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
3944
AC_DEFUN(KDE_CHECK_STL,
3948
ac_save_CXXFLAGS="$CXXFLAGS"
3949
CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
3952
if test "$kde_cv_stl_type_sgi" = "no"; then
3955
if test "$kde_cv_stl_type_hp" = "no"; then
3956
AC_MSG_ERROR("no known STL type found - did you forget to install libstdc++[-devel] ?")
3960
CXXFLAGS="$ac_save_CXXFLAGS"
3964
AC_DEFUN(AC_FIND_QIMGIO,
3965
[AC_REQUIRE([AC_FIND_JPEG])
3966
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
3967
AC_MSG_CHECKING([for qimgio])
3968
AC_CACHE_VAL(ac_cv_lib_qimgio,
3972
ac_save_LIBS="$LIBS"
3973
ac_save_CXXFLAGS="$CXXFLAGS"
3974
LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
3975
CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
3978
#include <qimageio.h>
3979
#include <qstring.h>
3981
QString t = "hallo";
3986
ac_cv_lib_qimgio=yes,
3987
ac_cv_lib_qimgio=no,
3988
ac_cv_lib_qimgio=no)
3989
LIBS="$ac_save_LIBS"
3990
CXXFLAGS="$ac_save_CXXFLAGS"
3993
if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
3994
LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
3996
AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
3999
AC_MSG_RESULT(not found)
4003
AC_DEFUN(KDE_CHECK_ANSI,
4007
AC_DEFUN(KDE_CHECK_INSURE,
4009
AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
4011
if test $enableval = "no"; dnl
4012
then ac_use_insure="no"
4013
else ac_use_insure="yes"
4015
], [ac_use_insure="no"])
4017
AC_MSG_CHECKING(if we will use Insure++ to debug)
4018
AC_MSG_RESULT($ac_use_insure)
4019
if test "$ac_use_insure" = "yes"; dnl
4020
then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
4024
AC_DEFUN(AM_DISABLE_LIBRARIES,
4026
AC_PROVIDE([AM_ENABLE_STATIC])
4027
AC_PROVIDE([AM_ENABLE_SHARED])
4033
AC_DEFUN(AC_CHECK_UTMP_FILE,
4035
AC_MSG_CHECKING([for utmp file])
4037
AC_CACHE_VAL(kde_cv_utmp_file,
4048
if test -r "$ac_file"; then
4049
kde_cv_utmp_file=$ac_file
4055
if test "$kde_cv_utmp_file" != "no"; then
4056
AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
4058
AC_MSG_RESULT($kde_cv_utmp_file)
4061
AC_MSG_RESULT([non found])
4066
AC_DEFUN(KDE_CREATE_SUBDIRSLIST,
4069
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
4071
if test ! -s $srcdir/subdirs; then
4072
dnl Note: Makefile.common creates subdirs, so this is just a fallback
4074
files=`cd $srcdir && ls -1`
4075
dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4077
echo $i >> $srcdir/subdirs
4081
if test -s $srcdir/inst-apps; then
4082
ac_topsubdirs="`cat $srcdir/inst-apps`"
4084
ac_topsubdirs="`cat $srcdir/subdirs`"
4087
for i in $ac_topsubdirs; do
4088
AC_MSG_CHECKING([if $i should be compiled])
4089
if test -d $srcdir/$i; then
4091
for j in $DO_NOT_COMPILE; do
4092
if test $i = $j; then
4099
AC_MSG_RESULT($install_it)
4100
if test $install_it = "yes"; then
4101
TOPSUBDIRS="$TOPSUBDIRS $i"
4105
AC_SUBST(TOPSUBDIRS)
4108
AC_DEFUN(KDE_CHECK_NAMESPACES,
4110
AC_MSG_CHECKING(whether C++ compiler supports namespaces)
4124
int Foo::Bar::i = 1;
4127
AC_DEFINE(HAVE_NAMESPACES)
4134
AC_DEFUN(KDE_CHECK_NEWLIBS,
4139
dnl ------------------------------------------------------------------------
4140
dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
4141
dnl ------------------------------------------------------------------------
4143
AC_DEFUN(AC_CHECK_S_ISSOCK,
4145
AC_MSG_CHECKING(for S_ISSOCK)
4146
AC_CACHE_VAL(ac_cv_have_s_issock,
4152
#include <sys/stat.h>
4156
int b = S_ISSOCK( buff.st_mode );
4158
ac_cv_have_s_issock=yes,
4159
ac_cv_have_s_issock=no)
4162
AC_MSG_RESULT($ac_cv_have_s_issock)
4163
if test "$ac_cv_have_s_issock" = "yes"; then
4164
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
4168
dnl ------------------------------------------------------------------------
4169
dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
4170
dnl ------------------------------------------------------------------------
4172
AC_DEFUN(AC_CHECK_KDEMAXPATHLEN,
4174
AC_MSG_CHECKING(for MAXPATHLEN)
4175
AC_CACHE_VAL(ac_cv_maxpathlen,
4178
cat > conftest.$ac_ext <<EOF
4180
# include <stdlib.h>
4183
#include <sys/param.h>
4185
#define MAXPATHLEN 1024
4188
KDE_HELLO MAXPATHLEN
4192
ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
4194
if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
4195
ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
4197
ac_cv_maxpathlen=1024
4203
AC_MSG_RESULT($ac_cv_maxpathlen)
4204
AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
4207
dnl -------------------------------------------------------------------------
4208
dnl See if the compiler supports a template repository bero@redhat.de
4209
dnl -------------------------------------------------------------------------
4210
AC_DEFUN(KDE_COMPILER_REPO,
4215
KDE_CHECK_COMPILER_FLAG(frepo,
4221
if test -z "$REPO"; then
4222
KDE_CHECK_COMPILER_FLAG(instances=explicit,
4224
REPO="-instances=explicit"
4225
NOREPO="-instances=extern"
4229
if test -n "$REPO"; then
4230
AC_DEFINE_UNQUOTED(HAVE_TEMPLATE_REPOSITORY, 1,
4231
[C++ compiler supports template repository])
4239
AC_DEFUN(KDE_CHECK_HEADER,
4242
kde_safe_cppflags=$CPPFLAGS
4243
CPPFLAGS="$CPPFLAGS $all_includes"
4245
AC_CHECK_HEADER($1, $2, $3)
4246
CPPFLAGS=$kde_safe_cppflags
4250
AC_DEFUN(KDE_FAST_CONFIGURE,
4252
dnl makes configure fast (needs perl)
4253
AC_ARG_ENABLE(fast-perl, [ --disable-fast-perl disable fast Makefile generation (needs perl)],
4254
with_fast_perl=$enableval, with_fast_perl=yes)
4257
AC_DEFUN(KDE_CONF_FILES,
4260
if test -f $srcdir/configure.files ; then
4261
val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
4264
if test -n "$val" ; then
4266
CONF_FILES="$CONF_FILES $i"
4269
AC_SUBST(CONF_FILES)
4272
AC_DEFUN(KDE_SET_PREFIX,
4275
dnl make $KDEDIR the default for the installation
4276
AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
4278
if test "x$prefix" = "xNONE"; then
4279
prefix=$ac_default_prefix
4280
ac_configure_args="$ac_configure_args --prefix $prefix"
4286
pushdef([AC_PROG_INSTALL],
4288
dnl our own version, testing for a -p flag
4289
popdef([AC_PROG_INSTALL])
4290
dnl as AC_PROG_INSTALL works as it works we first have
4291
dnl to save if the user didn't specify INSTALL, as the
4292
dnl autoconf one overwrites INSTALL and we have no chance to find
4294
test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
4295
test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
4296
test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
4299
if test -z "$kde_save_INSTALL_given" ; then
4300
# OK, user hasn't given any INSTALL, autoconf found one for us
4301
# now we test, if it supports the -p flag
4302
AC_MSG_CHECKING(for -p flag to install)
4303
rm -f confinst.$$.* > /dev/null 2>&1
4304
echo "Testtest" > confinst.$$.orig
4306
if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
4307
if test -f confinst.$$.new ; then
4308
# OK, -p seems to do no harm to install
4309
INSTALL="${INSTALL} -p"
4314
AC_MSG_RESULT($ac_res)
4316
dnl the following tries to resolve some signs and wonders coming up
4317
dnl with different autoconf/automake versions
4319
dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
4320
dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
4321
dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
4322
dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
4323
dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
4324
dnl install-@DIR@PROGRAMS targets to explicitly use that flag
4325
dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
4326
dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
4327
dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
4328
dnl *sometimes KDE does not use the install-@DIR@PROGRAM targets from
4329
dnl automake (due to broken Makefile.am or whatever) to install programs,
4330
dnl and so does not see the -s flag in automake > 1.4
4331
dnl to clean up that mess we:
4332
dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
4333
dnl which cleans KDE's program with automake > 1.4;
4334
dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
4335
dnl with automake<=1.4
4336
dnl note that dues to this sometimes two '-s' flags are used (if KDE
4337
dnl properly uses install-@DIR@PROGRAMS, but I don't care
4339
dnl And to all this comes, that I even can't write in comments variable
4340
dnl names used by automake, because it is so stupid to think I wanted to
4341
dnl _use_ them, therefor I have written A_M_... instead of AM_
4342
dnl hmm, I wanted to say something ... ahh yes: Arghhh.
4344
if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
4345
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
4347
if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
4348
INSTALL_SCRIPT='${INSTALL}'
4352
AC_DEFUN(KDE_LANG_CPLUSPLUS,
4354
ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
4355
pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
4358
pushdef([AC_LANG_CPLUSPLUS],
4359
[popdef([AC_LANG_CPLUSPLUS])
4363
AC_DEFUN(KDE_CHECK_LONG_LONG,
4365
AC_MSG_CHECKING(for long long)
4366
AC_CACHE_VAL(kde_cv_c_long_long,
4374
kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
4377
AC_MSG_RESULT($kde_cv_c_long_long)
4378
if test "$kde_cv_c_long_long" = yes; then
4379
AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
4383
AC_DEFUN(KDE_CHECK_LIB,
4385
kde_save_LIBS="$LIBS"
4386
LIBS="$LIBS $all_libraries"
4388
aix*) LIBS="-brtl $LIBS"
4389
test "$GCC" = yes && LIBS="-Wl,$LIBS"
4392
AC_CHECK_LIB($1, $2, $3, $4, $5)
4393
LIBS="$kde_save_LIBS"
4399
AC_DEFUN(KDE_CHECK_INITGROUPS,
4401
AC_REQUIRE([AC_CANONICAL_HOST])
4402
AC_CHECK_FUNCS(initgroups)
4403
if test "x$ac_cv_func_initgroups" = "xyes"; then
4407
AC_MSG_CHECKING([for initgroups prototype])
4408
AC_CACHE_VAL(kde_cv_check_initgroups_proto,
4414
int x = initgroups(buffer,id);
4416
kde_cv_check_initgroups_proto=yes,
4417
kde_cv_check_initgroups_proto=no)
4419
AC_MSG_RESULT($kde_cv_check_initgroups_proto)
4423
kde_cv_check_initgroups_proto=yes
4427
kde_cv_check_initgroups_proto=no
4429
if test "x$kde_cv_check_initgroups_proto" = "xyes"; then
4430
kde_check_initgroups_proto=1
4432
kde_check_initgroups_proto=0
4434
AC_DEFINE_UNQUOTED(HAVE_INITGROUPS_PROTO,$kde_check_initgroups_proto,
4435
[initgroups may exist but not its prototype (e.g. AIX<4.3.3:8)])
4439
AC_DEFUN(KDE_CHECK_JAVA_DIR,
4441
AC_MSG_CHECKING([for Java directory])
4444
[ --with-java=javadir use java installed in javadir, --without-java disables ],
4445
[ ac_java_dir=$withval
4449
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
4450
if test "x$ac_java_dir" = xno; then
4451
kde_cv_java_bindir=no
4452
kde_cv_java_includedir=no
4453
kde_java_libjvmdir=no
4454
kde_java_libhpidir=no
4456
if test "x$ac_java_dir" = x; then
4457
dnl No option set -> look in $PATH
4458
AC_CACHE_VAL(kde_cv_java_bindir,
4460
dnl First look for javac in $PATH. If not found we'll look at the option.
4461
KDE_FIND_PATH(javac, JAVAC, [], [])
4462
if test -n "$JAVAC"; then
4463
kde_cv_java_bindir=`echo $JAVAC | sed -e 's,/javac$,/,'`
4464
dnl this substitution might not work - well, we test for jni.h below
4465
kde_cv_java_includedir=`echo $kde_cv_java_bindir | sed -e 's,bin/$,include/,'`
4467
kde_cv_java_bindir=no
4471
dnl config option set
4472
kde_cv_java_bindir=$ac_java_dir/bin
4473
kde_cv_java_includedir=$ac_java_dir/include
4477
dnl At this point kde_cv_java_bindir and kde_cv_java_includedir are either set or "no"
4478
if test ! "x$kde_cv_java_bindir" = xno; then
4480
dnl Look for libjvm.so
4481
kde_java_libjvmdir=`find $kde_cv_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
4482
dnl Look for libhpi.so and avoid green threads
4483
kde_java_libhpidir=`find $kde_cv_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,'`
4485
dnl Now check everything's fine under there
4487
if test ! -x "$kde_cv_java_bindir/javac"; then
4488
AC_MSG_ERROR([javac not found under $kde_cv_java_bindir - it seems you passed a wrong --with-java.])
4490
if test ! -x "$kde_cv_java_bindir/javah"; then
4491
AC_MSG_ERROR([javah not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
4493
if test ! -x "$kde_cv_java_bindir/jar"; then
4494
AC_MSG_ERROR([jar not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
4496
if test ! -r "$kde_cv_java_includedir/jni.h"; then
4497
AC_MSG_ERROR([jni.h not found under $kde_cv_java_includedir. Use --with-java or --without-java.])
4499
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
4500
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
4502
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
4503
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
4506
jni_includes="-I$kde_cv_java_includedir"
4507
dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
4508
dnl and under linux here..
4509
test -d "$kde_cv_java_includedir/linux" && jni_includes="$jni_includes -I$kde_cv_java_includedir/linux"
4510
test -d "$kde_cv_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_cv_java_includedir/genunix"
4512
dnl Check for JNI version
4515
ac_cxxflags_safe="$CXXFLAGS"
4516
CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
4522
#ifndef JNI_VERSION_1_2
4525
],[ kde_jni_works=yes ],
4526
[ kde_jni_works=no ])
4528
if test $kde_jni_works = no; then
4529
AC_MSG_ERROR([Incorrect version of $kde_cv_java_includedir/jni.h.
4530
You need to have Java Development Kit (JDK) version 1.2.
4532
Use --with-java to specify another location.
4533
Use --without-java to configure without java support.
4534
Or download a newer JDK and try again.
4535
See e.g. http://java.sun.com/products/jdk/1.2 ])
4538
CXXFLAGS="$ac_cxxflags_safe"
4541
dnl All tests ok, inform and subst the variables
4542
AC_MSG_RESULT([javac/javah/jar in $kde_cv_java_bindir, jni.h in $kde_cv_java_includedir])
4544
JAVAC=$kde_cv_java_bindir/javac
4546
JAVAH=$kde_cv_java_bindir/javah
4548
JAR=$kde_cv_java_bindir/jar
4550
AC_SUBST(jni_includes)
4551
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_cv_java_libhpidir -lhpi"
4556
dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
4557
dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
4558
dnl big packages, m4_foreach is dog-slow. So use our own version of
4559
dnl it. (matz@kde.org)
4560
m4_define([mm_foreach],
4561
[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
4562
m4_define([mm_car], [[$1]])
4563
m4_define([mm_car2], [[$@]])
4564
m4_define([_mm_foreach],
4565
[m4_if(m4_quote($2), [], [],
4566
[m4_define([$1], [mm_car($2)])$3[]_mm_foreach([$1],
4567
mm_car2(m4_shift($2)),
4569
m4_define([AC_FOREACH],
4570
[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
4572
AC_DEFUN(KDE_NEED_FLEX,
4574
AC_REQUIRE([AM_PROG_LEX])
4575
if test -z "$LEXLIB"; then
4576
AC_MSG_ERROR([You need to have flex installed.])
4581
AC_DEFUN(AC_PATH_QTOPIA,
4583
dnl TODO: use AC_CACHE_VAL
4585
if test -z "$1"; then
4590
qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
4591
qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
4592
qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
4595
qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
4596
qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
4598
AC_REQUIRE([AC_PATH_QT])
4600
AC_MSG_CHECKING([for Qtopia])
4603
AC_SUBST(LIB_QTOPIA)
4605
kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
4609
AC_ARG_WITH(qtopia-dir,
4610
[ --with-qtopia-dir=DIR where the root of Qtopia is installed ],
4611
[ ac_qtopia_incdir="$withval"/include] )
4614
for dir in $kde_qtopia_dirs; do
4615
qtopia_incdirs="$qtopia_incdirs $dir/include"
4618
if test ! "$ac_qtopia_incdir" = "NO"; then
4619
qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
4623
AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
4624
ac_qtopia_incdir="$qtopia_incdir"
4626
if test -z "$qtopia_incdir"; then
4627
AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
4630
qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
4631
qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
4632
qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
4634
qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
4635
qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
4636
if test "$qtopia_ver" -lt "$qtopia_minver"; then
4637
AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
4644
ac_cxxflags_safe="$CXXFLAGS"
4645
ac_ldflags_safe="$LDFLAGS"
4646
ac_libs_safe="$LIBS"
4648
CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
4649
LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
4650
LIBS="$LIBS $LIB_QTOPIA $LIBQT"
4652
cat > conftest.$ac_ext <<EOF
4653
#include "confdefs.h"
4654
#include <qpe/qpeapplication.h>
4655
#include <qpe/version.h>
4657
int main( int argc, char **argv )
4659
QPEApplication app( argc, argv );
4664
if AC_TRY_EVAL(ac_link) && test -s conftest; then
4668
AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
4669
the end of config.log])
4672
CXXFLAGS="$ac_cxxflags_safe"
4673
LDFLAGS="$ac_ldflags_safe"
4674
LIBS="$ac_libs_safe"
4678
QTOPIA_INCLUDES="-I$qtopia_incdir"
4679
AC_SUBST(QTOPIA_INCLUDES)
4681
AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
4685
# serial 46 AC_PROG_LIBTOOL
4686
AC_DEFUN([AC_PROG_LIBTOOL],
4687
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
4688
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
4689
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
4690
AC_PROVIDE_IFELSE([AC_PROG_CXX],
4692
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
4695
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
4696
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
4697
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
4698
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
4700
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
4702
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
4704
[ifdef([AC_PROG_GCJ],
4705
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
4707
ifdef([A][M_PROG_GCJ],
4708
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
4710
ifdef([LT_AC_PROG_GCJ],
4711
[define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
4714
AC_DEFUN([_AC_PROG_LIBTOOL],
4715
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
4716
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
4717
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
4719
# Save cache, so that ltconfig can load it
4722
# Actually configure libtool. ac_aux_dir is where install-sh is found.
4723
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
4724
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
4725
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
4726
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
4727
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
4728
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
4729
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
4730
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
4731
|| AC_MSG_ERROR([libtool configure failed])
4733
# Reload cache, that may have been modified by ltconfig
4736
# This can be used to rebuild libtool when needed
4737
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
4739
# Always use our own libtool.
4740
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
4741
AC_SUBST(LIBTOOL)dnl
4743
# Redirect the config.log output again, so that the ltconfig log is not
4744
# clobbered by the next message.
4745
exec 5>>./config.log
4748
AC_DEFUN([AC_LIBTOOL_SETUP],
4750
AC_REQUIRE([AC_ENABLE_SHARED])dnl
4751
AC_REQUIRE([AC_ENABLE_STATIC])dnl
4752
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
4753
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4754
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4755
AC_REQUIRE([AC_PROG_CC])dnl
4756
AC_REQUIRE([AC_PROG_LD])dnl
4757
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
4758
AC_REQUIRE([AC_PROG_NM])dnl
4759
AC_REQUIRE([AC_PROG_LN_S])dnl
4760
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
4761
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
4762
AC_REQUIRE([AC_OBJEXT])dnl
4763
AC_REQUIRE([AC_EXEEXT])dnl
4766
# Only perform the check for file, if the check method requires it
4767
case $deplibs_check_method in
4769
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4775
AC_CHECK_TOOL(RANLIB, ranlib, :)
4776
AC_CHECK_TOOL(STRIP, strip, :)
4778
# Check for any special flags to pass to ltconfig.
4779
libtool_flags="--cache-file=$cache_file"
4780
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
4781
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
4782
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
4783
test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
4784
test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
4785
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
4786
[libtool_flags="$libtool_flags --enable-dlopen"])
4787
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
4788
[libtool_flags="$libtool_flags --enable-win32-dll"])
4789
AC_ARG_ENABLE(libtool-lock,
4790
[ --disable-libtool-lock avoid locking (might break parallel builds)])
4791
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
4792
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
4795
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
4796
pic_mode="$withval", pic_mode=default)
4797
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
4798
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
4800
# Some flags need to be propagated to the compiler or linker for good
4804
# Find out which ABI we are using.
4805
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
4806
if AC_TRY_EVAL(ac_compile); then
4807
case `/usr/bin/file conftest.$ac_objext` in
4823
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
4824
SAVE_CFLAGS="$CFLAGS"
4825
CFLAGS="$CFLAGS -belf"
4826
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
4829
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
4831
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4832
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4833
CFLAGS="$SAVE_CFLAGS"
4837
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
4838
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
4839
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
4840
AC_CHECK_TOOL(AS, as, false)
4841
AC_CHECK_TOOL(OBJDUMP, objdump, false)
4843
# recent cygwin and mingw systems supply a stub DllMain which the user
4844
# can override, but on older systems we have to supply one
4845
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
4847
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4848
DllMain (0, 0, 0);],
4849
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
4852
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4853
# old mingw systems require "-dll" to link a DLL, while more recent ones
4855
SAVE_CFLAGS="$CFLAGS"
4856
CFLAGS="$CFLAGS -mdll"
4857
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
4858
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
4859
CFLAGS="$SAVE_CFLAGS" ;;
4860
*-*-cygwin* | *-*-pw32*)
4861
# cygwin systems need to pass --dll to the linker, and not link
4862
# crt.o which will require a WinMain@16 definition.
4863
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4870
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
4871
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
4873
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
4874
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
4876
# AC_ENABLE_SHARED - implement the --enable-shared flag
4877
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
4878
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4880
AC_DEFUN([AC_ENABLE_SHARED],
4881
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
4882
AC_ARG_ENABLE(shared,
4883
changequote(<<, >>)dnl
4884
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
4885
changequote([, ])dnl
4886
[p=${PACKAGE-default}
4888
yes) enable_shared=yes ;;
4889
no) enable_shared=no ;;
4892
# Look at the argument we got. We use all the common list separators.
4893
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4894
for pkg in $enableval; do
4895
if test "X$pkg" = "X$p"; then
4902
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
4905
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
4906
AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4907
AC_ENABLE_SHARED(no)])
4909
# AC_ENABLE_STATIC - implement the --enable-static flag
4910
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
4911
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4913
AC_DEFUN([AC_ENABLE_STATIC],
4914
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
4915
AC_ARG_ENABLE(static,
4916
changequote(<<, >>)dnl
4917
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
4918
changequote([, ])dnl
4919
[p=${PACKAGE-default}
4921
yes) enable_static=yes ;;
4922
no) enable_static=no ;;
4925
# Look at the argument we got. We use all the common list separators.
4926
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4927
for pkg in $enableval; do
4928
if test "X$pkg" = "X$p"; then
4935
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
4938
# AC_DISABLE_STATIC - set the default static flag to --disable-static
4939
AC_DEFUN([AC_DISABLE_STATIC],
4940
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4941
AC_ENABLE_STATIC(no)])
4944
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
4945
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
4946
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4948
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
4949
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
4950
AC_ARG_ENABLE(fast-install,
4951
changequote(<<, >>)dnl
4952
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
4953
changequote([, ])dnl
4954
[p=${PACKAGE-default}
4956
yes) enable_fast_install=yes ;;
4957
no) enable_fast_install=no ;;
4959
enable_fast_install=no
4960
# Look at the argument we got. We use all the common list separators.
4961
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4962
for pkg in $enableval; do
4963
if test "X$pkg" = "X$p"; then
4964
enable_fast_install=yes
4970
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
4973
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
4974
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
4975
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4976
AC_ENABLE_FAST_INSTALL(no)])
4978
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
4979
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
4980
# Where MODE is either `yes' or `no'. If omitted, it defaults to
4982
AC_DEFUN([AC_LIBTOOL_PICMODE],
4983
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4984
pic_mode=ifelse($#,1,$1,default)])
4987
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
4988
AC_DEFUN([AC_PATH_TOOL_PREFIX],
4989
[AC_MSG_CHECKING([for $1])
4990
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4993
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4996
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4999
ac_save_MAGIC_CMD="$MAGIC_CMD"
5000
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5001
dnl $ac_dummy forces splitting on constant user-supplied paths.
5002
dnl POSIX.2 word splitting is done only on the output of word expansions,
5003
dnl not every word. This closes a longstanding sh security hole.
5004
ac_dummy="ifelse([$2], , $PATH, [$2])"
5005
for ac_dir in $ac_dummy; do
5006
test -z "$ac_dir" && ac_dir=.
5007
if test -f $ac_dir/$1; then
5008
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5009
if test -n "$file_magic_test_file"; then
5010
case $deplibs_check_method in
5012
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
5013
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5014
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5015
egrep "$file_magic_regex" > /dev/null; then
5020
*** Warning: the command libtool uses to detect shared libraries,
5021
*** $file_magic_cmd, produces output that libtool cannot recognize.
5022
*** The result is that libtool may fail to recognize shared libraries
5023
*** as such. This will affect the creation of libtool libraries that
5024
*** depend on shared libraries, but programs linked with such libtool
5025
*** libraries will work regardless of this problem. Nevertheless, you
5026
*** may want to report the problem to your system manager and/or to
5027
*** bug-libtool@gnu.org
5037
MAGIC_CMD="$ac_save_MAGIC_CMD"
5040
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5041
if test -n "$MAGIC_CMD"; then
5042
AC_MSG_RESULT($MAGIC_CMD)
5049
# AC_PATH_MAGIC - find a file program which can recognise a shared library
5050
AC_DEFUN([AC_PATH_MAGIC],
5051
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
5052
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
5053
if test -z "$lt_cv_path_MAGIC_CMD"; then
5054
if test -n "$ac_tool_prefix"; then
5055
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
5063
# AC_PROG_LD - find the path to the GNU or non-GNU linker
5064
AC_DEFUN([AC_PROG_LD],
5065
[AC_ARG_WITH(gnu-ld,
5066
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
5067
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
5068
AC_REQUIRE([AC_PROG_CC])dnl
5069
AC_REQUIRE([AC_CANONICAL_HOST])dnl
5070
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5072
if test "$GCC" = yes; then
5073
# Check if gcc -print-prog-name=ld gives a path.
5074
AC_MSG_CHECKING([for ld used by GCC])
5077
# gcc leaves a trailing carriage return which upsets mingw
5078
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5080
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5083
# Accept absolute paths.
5084
[[\\/]* | [A-Za-z]:[\\/]*)]
5085
re_direlt=['/[^/][^/]*/\.\./']
5086
# Canonicalize the path of ld
5087
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
5088
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5089
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
5091
test -z "$LD" && LD="$ac_prog"
5094
# If it fails, then pretend we aren't using GCC.
5098
# If it is relative, then search for the first ld in PATH.
5102
elif test "$with_gnu_ld" = yes; then
5103
AC_MSG_CHECKING([for GNU ld])
5105
AC_MSG_CHECKING([for non-GNU ld])
5107
AC_CACHE_VAL(lt_cv_path_LD,
5108
[if test -z "$LD"; then
5109
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
5110
for ac_dir in $PATH; do
5111
test -z "$ac_dir" && ac_dir=.
5112
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5113
lt_cv_path_LD="$ac_dir/$ac_prog"
5114
# Check to see if the program is GNU ld. I'd rather use --version,
5115
# but apparently some GNU ld's only accept -v.
5116
# Break only if it was the GNU/non-GNU ld that we prefer.
5117
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
5118
test "$with_gnu_ld" != no && break
5120
test "$with_gnu_ld" != yes && break
5126
lt_cv_path_LD="$LD" # Let the user override the test with a path.
5129
if test -n "$LD"; then
5134
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5138
AC_DEFUN([AC_PROG_LD_GNU],
5139
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5140
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
5141
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
5142
lt_cv_prog_gnu_ld=yes
5144
lt_cv_prog_gnu_ld=no
5146
with_gnu_ld=$lt_cv_prog_gnu_ld
5149
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
5150
# -- PORTME Some linkers may need a different reload flag.
5151
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
5152
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
5153
[lt_cv_ld_reload_flag='-r'])
5154
reload_flag=$lt_cv_ld_reload_flag
5155
test -n "$reload_flag" && reload_flag=" $reload_flag"
5158
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
5159
# -- PORTME fill in with the dynamic library characteristics
5160
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
5161
[AC_CACHE_CHECK([how to recognise dependant libraries],
5162
lt_cv_deplibs_check_method,
5163
[lt_cv_file_magic_cmd='$MAGIC_CMD'
5164
lt_cv_file_magic_test_file=
5165
lt_cv_deplibs_check_method='unknown'
5166
# Need to set the preceding variable on all platforms that support
5167
# interlibrary dependencies.
5168
# 'none' -- dependencies not supported.
5169
# `unknown' -- same as none, but documents that we really don't know.
5170
# 'pass_all' -- all dependencies passed with no checks.
5171
# 'test_compile' -- check by making test program.
5172
# 'file_magic [regex]' -- check by looking for files in library path
5173
# which responds to the $file_magic_cmd with a given egrep regex.
5174
# If you have `file' or equivalent on your system and you're not sure
5175
# whether `pass_all' will *always* work, you probably want this one.
5179
lt_cv_deplibs_check_method=pass_all
5183
lt_cv_deplibs_check_method=pass_all
5187
lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
5188
lt_cv_file_magic_cmd='/usr/bin/file -L'
5189
lt_cv_file_magic_test_file=/shlib/libc.so
5192
cygwin* | mingw* |pw32*)
5193
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5194
lt_cv_file_magic_cmd='$OBJDUMP -f'
5197
darwin* | rhapsody*)
5198
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
5199
lt_cv_file_magic_cmd='/usr/bin/file -L'
5201
rhapsody* | darwin1.[012])
5202
lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
5205
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
5211
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5214
# Not sure whether the presence of OpenBSD here was a mistake.
5215
# Let's accept both of them until this is cleared up.
5216
lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
5217
lt_cv_file_magic_cmd=/usr/bin/file
5218
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5222
lt_cv_deplibs_check_method=pass_all
5227
lt_cv_deplibs_check_method=pass_all
5231
lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
5232
lt_cv_file_magic_cmd=/usr/bin/file
5233
lt_cv_file_magic_test_file=/usr/lib/libc.sl
5239
# this will be overridden with pass_all, but let us keep it just in case
5240
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
5244
*-32|*"-32 ") libmagic=32-bit;;
5245
*-n32|*"-n32 ") libmagic=N32;;
5246
*-64|*"-64 ") libmagic=64-bit;;
5247
*) libmagic=never-match;;
5249
# this will be overridden with pass_all, but let us keep it just in case
5250
lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
5253
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
5254
lt_cv_deplibs_check_method=pass_all
5257
# This must be Linux ELF.
5260
alpha* | i*86 | powerpc* | sparc* | ia64* | s390* | m68k* | arm* | mips* | hppa* | sh* )
5261
lt_cv_deplibs_check_method=pass_all ;;
5263
# glibc up to 2.1.1 does not perform some relocations on ARM
5264
lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
5266
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
5270
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5271
[lt_cv_deplibs_check_method='file_magic NetBSD/[a-z0-9]* demand paged shared library']
5273
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object']
5275
lt_cv_file_magic_cmd='/usr/bin/file -L'
5276
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5280
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5284
lt_cv_deplibs_check_method='file_magic OpenBSD/i[3-9]86 demand paged shared library'
5285
changequote([, ])dnl
5286
lt_cv_file_magic_cmd=/usr/bin/file
5287
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5291
lt_cv_deplibs_check_method=pass_all
5296
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
5297
lt_cv_file_magic_cmd=/usr/bin/file
5298
lt_cv_file_magic_test_file=/usr/lib/libnls.so
5301
osf3* | osf4* | osf5*)
5302
# this will be overridden with pass_all, but let us keep it just in case
5303
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
5304
lt_cv_file_magic_test_file=/shlib/libc.so
5305
lt_cv_deplibs_check_method=pass_all
5309
lt_cv_deplibs_check_method=pass_all
5313
lt_cv_deplibs_check_method=pass_all
5314
lt_cv_file_magic_test_file=/lib/libc.so
5317
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5318
case $host_vendor in
5320
lt_cv_deplibs_check_method=pass_all
5323
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]']
5324
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5330
file_magic_cmd=$lt_cv_file_magic_cmd
5331
deplibs_check_method=$lt_cv_deplibs_check_method
5335
# AC_PROG_NM - find the path to a BSD-compatible name lister
5336
AC_DEFUN([AC_PROG_NM],
5337
[AC_MSG_CHECKING([for BSD-compatible nm])
5338
AC_CACHE_VAL(lt_cv_path_NM,
5339
[if test -n "$NM"; then
5340
# Let the user override the test.
5343
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
5344
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
5345
test -z "$ac_dir" && ac_dir=.
5346
tmp_nm=$ac_dir/${ac_tool_prefix}nm
5347
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
5348
# Check to see if the nm accepts a BSD-compat flag.
5349
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
5350
# nm: unknown option "B" ignored
5351
# Tru64's nm complains that /dev/null is an invalid object file
5352
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
5353
lt_cv_path_NM="$tmp_nm -B"
5355
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
5356
lt_cv_path_NM="$tmp_nm -p"
5359
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5360
continue # so that we can try to find one that supports BSD flags
5365
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
5368
AC_MSG_RESULT([$NM])
5371
# AC_CHECK_LIBM - check for math library
5372
AC_DEFUN([AC_CHECK_LIBM],
5373
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5376
*-*-beos* | *-*-cygwin* | *-*-pw32*)
5377
# These system don't have libm
5380
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5381
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
5384
AC_CHECK_LIB(m, main, LIBM="-lm")
5389
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
5390
# the libltdl convenience library and INCLTDL to the include flags for
5391
# the libltdl header and adds --enable-ltdl-convenience to the
5392
# configure arguments. Note that LIBLTDL and INCLTDL are not
5393
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
5394
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
5395
# with '${top_builddir}/' and INCLTDL will be prefixed with
5396
# '${top_srcdir}/' (note the single quotes!). If your package is not
5397
# flat and you're not using automake, define top_builddir and
5398
# top_srcdir appropriately in the Makefiles.
5399
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
5400
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5401
case $enable_ltdl_convenience in
5402
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
5403
"") enable_ltdl_convenience=yes
5404
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
5406
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
5407
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
5410
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
5411
# the libltdl installable library and INCLTDL to the include flags for
5412
# the libltdl header and adds --enable-ltdl-install to the configure
5413
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
5414
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
5415
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
5416
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
5417
# with '${top_srcdir}/' (note the single quotes!). If your package is
5418
# not flat and you're not using automake, define top_builddir and
5419
# top_srcdir appropriately in the Makefiles.
5420
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
5421
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
5422
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5423
AC_CHECK_LIB(ltdl, main,
5424
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
5425
[if test x"$enable_ltdl_install" = xno; then
5426
AC_MSG_WARN([libltdl not installed, but installation disabled])
5428
enable_ltdl_install=yes
5431
if test x"$enable_ltdl_install" = x"yes"; then
5432
ac_configure_args="$ac_configure_args --enable-ltdl-install"
5433
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
5434
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
5436
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
5442
# If this macro is not defined by Autoconf, define it here.
5443
ifdef([AC_PROVIDE_IFELSE],
5445
[define([AC_PROVIDE_IFELSE],
5446
[ifdef([AC_PROVIDE_$1],
5449
# AC_LIBTOOL_CXX - enable support for C++ libraries
5450
AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
5452
AC_DEFUN([_AC_LIBTOOL_CXX],
5453
[AC_REQUIRE([AC_PROG_CXX])
5454
AC_REQUIRE([AC_PROG_CXXCPP])
5455
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
5457
lt_save_CFLAGS="$CFLAGS"
5458
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
5459
dnl is set to the C++ compiler.
5460
AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
5461
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
5462
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
5463
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
5464
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
5465
deplibs_check_method="$deplibs_check_method" \
5466
file_magic_cmd="$file_magic_cmd" \
5467
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
5468
--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
5469
|| AC_MSG_ERROR([libtool tag configuration failed])
5471
CFLAGS="$lt_save_CFLAGS"
5473
# Redirect the config.log output again, so that the ltconfig log is not
5474
# clobbered by the next message.
5475
exec 5>>./config.log
5478
# AC_LIBTOOL_GCJ - enable support for GCJ libraries
5479
AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
5481
AC_DEFUN([_AC_LIBTOOL_GCJ],
5482
[AC_REQUIRE([AC_PROG_LIBTOOL])
5483
AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
5484
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
5485
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
5486
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
5487
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
5488
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
5489
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
5491
lt_save_CFLAGS="$CFLAGS"
5492
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
5493
dnl is set to the C++ compiler.
5494
AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
5495
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
5496
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
5497
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
5498
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
5499
deplibs_check_method="$deplibs_check_method" \
5500
file_magic_cmd="$file_magic_cmd" \
5501
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
5502
--build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
5503
|| AC_MSG_ERROR([libtool tag configuration failed])
5505
CFLAGS="$lt_save_CFLAGS"
5507
# Redirect the config.log output again, so that the ltconfig log is not
5508
# clobbered by the next message.
5509
exec 5>>./config.log
5513
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
5514
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
5515
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
5516
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
5517
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
5518
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
5519
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
5521
dnl This is just to silence aclocal about the macro not being used
5522
ifelse([AC_DISABLE_FAST_INSTALL])dnl
5524
AC_DEFUN([LT_AC_PROG_GCJ],
5525
[AC_CHECK_TOOL(GCJ, gcj, no)
5526
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5530
# Do all the work for Automake. This macro actually does too much --
5531
# some checks are only needed if your package does certain things.
5532
# But this isn't really a big deal.
5537
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
5539
AC_DEFUN([AM_INIT_AUTOMAKE],
5540
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
5541
AC_REQUIRE([AC_PROG_INSTALL])
5546
dnl test to see if srcdir already configured
5547
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
5548
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
5551
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
5552
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
5553
AC_REQUIRE([AM_SANITY_CHECK])
5554
AC_REQUIRE([AC_ARG_PROGRAM])
5555
dnl FIXME This is truly gross.
5556
missing_dir=`cd $ac_aux_dir && pwd`
5557
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
5558
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
5559
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
5560
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
5561
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
5562
AC_REQUIRE([AC_PROG_MAKE_SET])])
5564
# Copyright 2002 Free Software Foundation, Inc.
5566
# This program is free software; you can redistribute it and/or modify
5567
# it under the terms of the GNU General Public License as published by
5568
# the Free Software Foundation; either version 2, or (at your option)
5569
# any later version.
1
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
# 2005 Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
5571
9
# This program is distributed in the hope that it will be useful,
5572
# but WITHOUT ANY WARRANTY; without even the implied warranty of
5573
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5574
# GNU General Public License for more details.
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
5576
# You should have received a copy of the GNU General Public License
5577
# along with this program; if not, write to the Free Software
5578
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
14
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
16
# This file is free software; the Free Software Foundation
17
# gives unlimited permission to copy and/or distribute it,
18
# with or without modifications, as long as this notice is preserved.
5580
20
# AM_AUTOMAKE_VERSION(VERSION)
5581
21
# ----------------------------
5582
22
# Automake X.Y traces this macro to ensure aclocal.m4 has been
5583
23
# generated from the m4 files accompanying Automake X.Y.
5584
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
24
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
5586
26
# AM_SET_CURRENT_AUTOMAKE_VERSION
5587
27
# -------------------------------
5588
28
# Call AM_AUTOMAKE_VERSION so it can be traced.
5589
29
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
5590
30
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
5591
[AM_AUTOMAKE_VERSION([1.4-p6])])
5594
# Check to make sure that the build environment is sane.
31
[AM_AUTOMAKE_VERSION([1.9.6])])
33
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
35
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
37
# This file is free software; the Free Software Foundation
38
# gives unlimited permission to copy and/or distribute it,
39
# with or without modifications, as long as this notice is preserved.
41
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
42
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
43
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
45
# Of course, Automake must honor this variable whenever it calls a
46
# tool from the auxiliary directory. The problem is that $srcdir (and
47
# therefore $ac_aux_dir as well) can be either absolute or relative,
48
# depending on how configure is run. This is pretty annoying, since
49
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
50
# source directory, any form will work fine, but in subdirectories a
51
# relative path needs to be adjusted first.
54
# fails when called from a subdirectory if $ac_aux_dir is relative
55
# $top_srcdir/$ac_aux_dir/missing
56
# fails if $ac_aux_dir is absolute,
57
# fails when called from a subdirectory in a VPATH build with
58
# a relative $ac_aux_dir
60
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
61
# are both prefixed by $srcdir. In an in-source build this is usually
62
# harmless because $srcdir is `.', but things will broke when you
63
# start a VPATH build or use an absolute $srcdir.
65
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
66
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
67
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
68
# and then we would define $MISSING as
69
# MISSING="\${SHELL} $am_aux_dir/missing"
70
# This will work as long as MISSING is not called from configure, because
71
# unfortunately $(top_srcdir) has no meaning in configure.
72
# However there are other variables, like CC, which are often used in
73
# configure, and could therefore not use this "fixed" $ac_aux_dir.
75
# Another solution, used here, is to always expand $ac_aux_dir to an
76
# absolute PATH. The drawback is that using absolute paths prevent a
77
# configured tree to be moved without reconfiguration.
79
AC_DEFUN([AM_AUX_DIR_EXPAND],
80
[dnl Rely on autoconf to set up CDPATH properly.
82
# expand $ac_aux_dir to an absolute path
83
am_aux_dir=`cd $ac_aux_dir && pwd`
86
# AM_CONDITIONAL -*- Autoconf -*-
88
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
89
# Free Software Foundation, Inc.
91
# This file is free software; the Free Software Foundation
92
# gives unlimited permission to copy and/or distribute it,
93
# with or without modifications, as long as this notice is preserved.
97
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
98
# -------------------------------------
99
# Define a conditional.
100
AC_DEFUN([AM_CONDITIONAL],
102
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
103
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
113
AC_CONFIG_COMMANDS_PRE(
114
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
115
AC_MSG_ERROR([[conditional "$1" was never defined.
116
Usually this means the macro was only invoked conditionally.]])
120
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
121
# Free Software Foundation, Inc.
123
# This file is free software; the Free Software Foundation
124
# gives unlimited permission to copy and/or distribute it,
125
# with or without modifications, as long as this notice is preserved.
129
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
130
# written in clear, in which case automake, when reading aclocal.m4,
131
# will think it sees a *use*, and therefore will trigger all it's
132
# C support machinery. Also note that it means that autoscan, seeing
133
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
136
# _AM_DEPENDENCIES(NAME)
137
# ----------------------
138
# See how the compiler implements dependency checking.
139
# NAME is "CC", "CXX", "GCJ", or "OBJC".
140
# We try a few techniques and use that to set a single cache variable.
142
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
143
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
144
# dependency, and given that the user is not expected to run this macro,
145
# just rely on AC_PROG_CC.
146
AC_DEFUN([_AM_DEPENDENCIES],
147
[AC_REQUIRE([AM_SET_DEPDIR])dnl
148
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
149
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
150
AC_REQUIRE([AM_DEP_TRACK])dnl
152
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
153
[$1], CXX, [depcc="$CXX" am_compiler_list=],
154
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
155
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
156
[depcc="$$1" am_compiler_list=])
158
AC_CACHE_CHECK([dependency style of $depcc],
159
[am_cv_$1_dependencies_compiler_type],
160
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
161
# We make a subdir and do the tests there. Otherwise we can end up
162
# making bogus files that we don't know about and never remove. For
163
# instance it was reported that on HP-UX the gcc test will end up
164
# making a dummy file named `D' -- because `-MD' means `put the output
167
# Copy depcomp to subdir because otherwise we won't find it if we're
168
# using a relative directory.
169
cp "$am_depcomp" conftest.dir
171
# We will build objects and dependencies in a subdirectory because
172
# it helps to detect inapplicable dependency modes. For instance
173
# both Tru64's cc and ICC support -MD to output dependencies as a
174
# side effect of compilation, but ICC will put the dependencies in
175
# the current directory while Tru64 will put them in the object
179
am_cv_$1_dependencies_compiler_type=none
180
if test "$am_compiler_list" = ""; then
181
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
183
for depmode in $am_compiler_list; do
184
# Setup a source with many dependencies, because some compilers
185
# like to wrap large dependency lists on column 80 (with \), and
186
# we should not choose a depcomp mode which is confused by this.
188
# We need to recreate these files for each test, as the compiler may
189
# overwrite some of them when testing with obscure command lines.
190
# This happens at least with the AIX C compiler.
192
for i in 1 2 3 4 5 6; do
193
echo '#include "conftst'$i'.h"' >> sub/conftest.c
194
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
195
# Solaris 8's {/usr,}/bin/sh.
196
touch sub/conftst$i.h
198
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
202
# after this tag, mechanisms are not by side-effect, so they'll
203
# only be used when explicitly requested
204
if test "x$enable_dependency_tracking" = xyes; then
212
# We check with `-c' and `-o' for the sake of the "dashmstdout"
213
# mode. It turns out that the SunPro C++ compiler does not properly
214
# handle `-M -o', and we need to detect this.
215
if depmode=$depmode \
216
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
217
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
218
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
219
>/dev/null 2>conftest.err &&
220
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
221
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
222
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
223
# icc doesn't choke on unknown options, it will just issue warnings
224
# or remarks (even with -Werror). So we grep stderr for any message
225
# that says an option was ignored or not supported.
226
# When given -MP, icc 7.0 and 7.1 complain thusly:
227
# icc: Command line warning: ignoring option '-M'; no argument required
228
# The diagnosis changed in icc 8.0:
229
# icc: Command line remark: option '-MP' not supported
230
if (grep 'ignoring option' conftest.err ||
231
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
232
am_cv_$1_dependencies_compiler_type=$depmode
241
am_cv_$1_dependencies_compiler_type=none
244
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
245
AM_CONDITIONAL([am__fastdep$1], [
246
test "x$enable_dependency_tracking" != xno \
247
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
253
# Choose a directory name for dependency files.
254
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
255
AC_DEFUN([AM_SET_DEPDIR],
256
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
257
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
263
AC_DEFUN([AM_DEP_TRACK],
264
[AC_ARG_ENABLE(dependency-tracking,
265
[ --disable-dependency-tracking speeds up one-time build
266
--enable-dependency-tracking do not reject slow dependency extractors])
267
if test "x$enable_dependency_tracking" != xno; then
268
am_depcomp="$ac_aux_dir/depcomp"
271
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
272
AC_SUBST([AMDEPBACKSLASH])
275
# Generate code to set up dependency tracking. -*- Autoconf -*-
277
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
278
# Free Software Foundation, Inc.
280
# This file is free software; the Free Software Foundation
281
# gives unlimited permission to copy and/or distribute it,
282
# with or without modifications, as long as this notice is preserved.
286
# _AM_OUTPUT_DEPENDENCY_COMMANDS
287
# ------------------------------
288
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
289
[for mf in $CONFIG_FILES; do
290
# Strip MF so we end up with the name of the file.
291
mf=`echo "$mf" | sed -e 's/:.*$//'`
292
# Check whether this is an Automake generated Makefile or not.
293
# We used to match only the files named `Makefile.in', but
294
# some people rename them; so instead we look at the file content.
295
# Grep'ing the first line is not enough: some people post-process
296
# each Makefile.in and add a new line on top of each file to say so.
297
# So let's grep whole file.
298
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
299
dirpart=`AS_DIRNAME("$mf")`
303
# Extract the definition of DEPDIR, am__include, and am__quote
304
# from the Makefile without running `make'.
305
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
306
test -z "$DEPDIR" && continue
307
am__include=`sed -n 's/^am__include = //p' < "$mf"`
308
test -z "am__include" && continue
309
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
310
# When using ansi2knr, U may be empty or an underscore; expand it
311
U=`sed -n 's/^U = //p' < "$mf"`
312
# Find all dependency output files, they are included files with
313
# $(DEPDIR) in their names. We invoke sed twice because it is the
314
# simplest approach to changing $(DEPDIR) to its actual value in the
316
for file in `sed -n "
317
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
318
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
319
# Make sure the directory exists.
320
test -f "$dirpart/$file" && continue
321
fdir=`AS_DIRNAME(["$file"])`
322
AS_MKDIR_P([$dirpart/$fdir])
323
# echo "creating $dirpart/$file"
324
echo '# dummy' > "$dirpart/$file"
327
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
330
# AM_OUTPUT_DEPENDENCY_COMMANDS
331
# -----------------------------
332
# This macro should only be invoked once -- use via AC_REQUIRE.
334
# This code is only required when automatic dependency tracking
335
# is enabled. FIXME. This creates each `.P' file that we will
336
# need in order to bootstrap the dependency handling code.
337
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
338
[AC_CONFIG_COMMANDS([depfiles],
339
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
340
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
343
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
344
# Free Software Foundation, Inc.
346
# This file is free software; the Free Software Foundation
347
# gives unlimited permission to copy and/or distribute it,
348
# with or without modifications, as long as this notice is preserved.
352
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
353
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
355
# Do all the work for Automake. -*- Autoconf -*-
357
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
358
# Free Software Foundation, Inc.
360
# This file is free software; the Free Software Foundation
361
# gives unlimited permission to copy and/or distribute it,
362
# with or without modifications, as long as this notice is preserved.
366
# This macro actually does too much. Some checks are only needed if
367
# your package does certain things. But this isn't really a big deal.
369
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
370
# AM_INIT_AUTOMAKE([OPTIONS])
371
# -----------------------------------------------
372
# The call with PACKAGE and VERSION arguments is the old style
373
# call (pre autoconf-2.50), which is being phased out. PACKAGE
374
# and VERSION should now be passed to AC_INIT and removed from
375
# the call to AM_INIT_AUTOMAKE.
376
# We support both call styles for the transition. After
377
# the next Automake release, Autoconf can make the AC_INIT
378
# arguments mandatory, and then we can depend on a new Autoconf
379
# release and drop the old call support.
380
AC_DEFUN([AM_INIT_AUTOMAKE],
381
[AC_PREREQ([2.58])dnl
382
dnl Autoconf wants to disallow AM_ names. We explicitly allow
383
dnl the ones we care about.
384
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
385
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
386
AC_REQUIRE([AC_PROG_INSTALL])dnl
387
# test to see if srcdir already configured
388
if test "`cd $srcdir && pwd`" != "`pwd`" &&
389
test -f $srcdir/config.status; then
390
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
393
# test whether we have cygpath
394
if test -z "$CYGPATH_W"; then
395
if (cygpath --version) >/dev/null 2>/dev/null; then
396
CYGPATH_W='cygpath -w'
401
AC_SUBST([CYGPATH_W])
403
# Define the identity of the package.
404
dnl Distinguish between old-style and new-style calls.
406
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
407
AC_SUBST([PACKAGE], [$1])dnl
408
AC_SUBST([VERSION], [$2])],
409
[_AM_SET_OPTIONS([$1])dnl
410
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
411
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
413
_AM_IF_OPTION([no-define],,
414
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
415
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
417
# Some tools Automake needs.
418
AC_REQUIRE([AM_SANITY_CHECK])dnl
419
AC_REQUIRE([AC_ARG_PROGRAM])dnl
420
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
421
AM_MISSING_PROG(AUTOCONF, autoconf)
422
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
423
AM_MISSING_PROG(AUTOHEADER, autoheader)
424
AM_MISSING_PROG(MAKEINFO, makeinfo)
426
AM_PROG_INSTALL_STRIP
427
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
428
# We need awk for the "check" target. The system "awk" is bad on
430
AC_REQUIRE([AC_PROG_AWK])dnl
431
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
432
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
433
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
434
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
435
[_AM_PROG_TAR([v7])])])
436
_AM_IF_OPTION([no-dependencies],,
437
[AC_PROVIDE_IFELSE([AC_PROG_CC],
438
[_AM_DEPENDENCIES(CC)],
439
[define([AC_PROG_CC],
440
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
441
AC_PROVIDE_IFELSE([AC_PROG_CXX],
442
[_AM_DEPENDENCIES(CXX)],
443
[define([AC_PROG_CXX],
444
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
449
# When config.status generates a header, we must update the stamp-h file.
450
# This file resides in the same directory as the config header
451
# that is generated. The stamp files are numbered to have different names.
453
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
454
# loop where config.status creates the headers, so we can generate
455
# our stamp files there.
456
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
457
[# Compute $1's index in $config_headers.
459
for _am_header in $config_headers :; do
464
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
467
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
469
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
471
# This file is free software; the Free Software Foundation
472
# gives unlimited permission to copy and/or distribute it,
473
# with or without modifications, as long as this notice is preserved.
477
# Define $install_sh.
478
AC_DEFUN([AM_PROG_INSTALL_SH],
479
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
480
install_sh=${install_sh-"$am_aux_dir/install-sh"}
481
AC_SUBST(install_sh)])
483
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
485
# This file is free software; the Free Software Foundation
486
# gives unlimited permission to copy and/or distribute it,
487
# with or without modifications, as long as this notice is preserved.
491
# Check whether the underlying file-system supports filenames
492
# with a leading dot. For instance MS-DOS doesn't.
493
AC_DEFUN([AM_SET_LEADING_DOT],
494
[rm -rf .tst 2>/dev/null
495
mkdir .tst 2>/dev/null
496
if test -d .tst; then
501
rmdir .tst 2>/dev/null
502
AC_SUBST([am__leading_dot])])
504
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
505
# Free Software Foundation, Inc.
507
# This file is free software; the Free Software Foundation
508
# gives unlimited permission to copy and/or distribute it,
509
# with or without modifications, as long as this notice is preserved.
515
# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
516
# "missing" invocation, for better error output.
517
AC_DEFUN([AM_PROG_LEX],
519
AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
520
AC_REQUIRE([AC_PROG_LEX])dnl
521
if test "$LEX" = :; then
522
LEX=${am_missing_run}flex
525
# Check to see how 'make' treats includes. -*- Autoconf -*-
527
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
529
# This file is free software; the Free Software Foundation
530
# gives unlimited permission to copy and/or distribute it,
531
# with or without modifications, as long as this notice is preserved.
537
# Check to see how make treats includes.
538
AC_DEFUN([AM_MAKE_INCLUDE],
539
[am_make=${MAKE-make}
540
cat > confinc << 'END'
545
# If we don't find an include directive, just comment out the code.
546
AC_MSG_CHECKING([for style of include used by $am_make])
550
# First try GNU make style include.
551
echo "include confinc" > confmf
552
# We grep out `Entering directory' and `Leaving directory'
553
# messages which can occur if `w' ends up in MAKEFLAGS.
554
# In particular we don't look at `^make:' because GNU make might
555
# be invoked under some other name (usually "gmake"), in which
556
# case it prints its new name instead of `make'.
557
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
562
# Now try BSD make style include.
563
if test "$am__include" = "#"; then
564
echo '.include "confinc"' > confmf
565
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
571
AC_SUBST([am__include])
572
AC_SUBST([am__quote])
573
AC_MSG_RESULT([$_am_result])
577
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
579
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
580
# Free Software Foundation, Inc.
582
# This file is free software; the Free Software Foundation
583
# gives unlimited permission to copy and/or distribute it,
584
# with or without modifications, as long as this notice is preserved.
588
# AM_MISSING_PROG(NAME, PROGRAM)
589
# ------------------------------
590
AC_DEFUN([AM_MISSING_PROG],
591
[AC_REQUIRE([AM_MISSING_HAS_RUN])
592
$1=${$1-"${am_missing_run}$2"}
598
# Define MISSING if not defined so far and test if it supports --run.
599
# If it does, set am_missing_run to use it, otherwise, to nothing.
600
AC_DEFUN([AM_MISSING_HAS_RUN],
601
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
602
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
603
# Use eval to expand $SHELL
604
if eval "$MISSING --run true"; then
605
am_missing_run="$MISSING --run "
608
AC_MSG_WARN([`missing' script is too old or missing])
612
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
614
# This file is free software; the Free Software Foundation
615
# gives unlimited permission to copy and/or distribute it,
616
# with or without modifications, as long as this notice is preserved.
620
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
622
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
623
# created by `make install' are always world readable, even if the
624
# installer happens to have an overly restrictive umask (e.g. 077).
625
# This was a mistake. There are at least two reasons why we must not
627
# - it causes special bits like SGID to be ignored,
628
# - it may be too restrictive (some setups expect 775 directories).
630
# Do not use -m 0755 and let people choose whatever they expect by
633
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
634
# Some implementations (such as Solaris 8's) are not thread-safe: if a
635
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
636
# concurrently, both version can detect that a/ is missing, but only
637
# one can create it and the other will error out. Consequently we
638
# restrict ourselves to GNU make (using the --version option ensures
640
AC_DEFUN([AM_PROG_MKDIR_P],
641
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
642
# We used to keeping the `.' as first argument, in order to
643
# allow $(mkdir_p) to be used without argument. As in
644
# $(mkdir_p) $(somedir)
645
# where $(somedir) is conditionally defined. However this is wrong
647
# 1. if the package is installed by a user who cannot write `.'
648
# make install will fail,
649
# 2. the above comment should most certainly read
650
# $(mkdir_p) $(DESTDIR)$(somedir)
651
# so it does not work when $(somedir) is undefined and
653
# To support the latter case, we have to write
654
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
655
# so the `.' trick is pointless.
656
mkdir_p='mkdir -p --'
658
# On NextStep and OpenStep, the `mkdir' command does not
659
# recognize any option. It will interpret all options as
660
# directories to create, and then abort because `.' already
662
for d in ./-p ./--version;
664
test -d $d && rmdir $d
666
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
667
if test -f "$ac_aux_dir/mkinstalldirs"; then
668
mkdir_p='$(mkinstalldirs)'
670
mkdir_p='$(install_sh) -d'
673
AC_SUBST([mkdir_p])])
675
# Helper functions for option handling. -*- Autoconf -*-
677
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
679
# This file is free software; the Free Software Foundation
680
# gives unlimited permission to copy and/or distribute it,
681
# with or without modifications, as long as this notice is preserved.
685
# _AM_MANGLE_OPTION(NAME)
686
# -----------------------
687
AC_DEFUN([_AM_MANGLE_OPTION],
688
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
690
# _AM_SET_OPTION(NAME)
691
# ------------------------------
692
# Set option NAME. Presently that only means defining a flag for this option.
693
AC_DEFUN([_AM_SET_OPTION],
694
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
696
# _AM_SET_OPTIONS(OPTIONS)
697
# ----------------------------------
698
# OPTIONS is a space-separated list of Automake options.
699
AC_DEFUN([_AM_SET_OPTIONS],
700
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
702
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
703
# -------------------------------------------
704
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
705
AC_DEFUN([_AM_IF_OPTION],
706
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
708
# Check to make sure that the build environment is sane. -*- Autoconf -*-
710
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
711
# Free Software Foundation, Inc.
713
# This file is free software; the Free Software Foundation
714
# gives unlimited permission to copy and/or distribute it,
715
# with or without modifications, as long as this notice is preserved.
5597
721
AC_DEFUN([AM_SANITY_CHECK],
5598
722
[AC_MSG_CHECKING([whether build environment is sane])
5601
echo timestamp > conftestfile
725
echo timestamp > conftest.file
5602
726
# Do `set' in a subshell so we don't clobber the current shell's
5603
727
# arguments. Must try -L first in case configure is actually a
5604
728
# symlink; some systems play weird games with the mod time of symlinks
5605
729
# (eg FreeBSD returns the mod time of the symlink's containing
5608
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
5609
if test "[$]*" = "X"; then
732
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
733
if test "$[*]" = "X"; then
5610
734
# -L didn't work.
5611
set X `ls -t $srcdir/configure conftestfile`
735
set X `ls -t $srcdir/configure conftest.file`
5613
if test "[$]*" != "X $srcdir/configure conftestfile" \
5614
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
738
if test "$[*]" != "X $srcdir/configure conftest.file" \
739
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
5616
741
# If neither matched, then we have a broken ls. This can happen
5617
742
# if, for instance, CONFIG_SHELL is bash and it inherits a