~ubuntu-branches/ubuntu/karmic/knetfilter/karmic

« back to all changes in this revision

Viewing changes to acinclude.m4

  • Committer: Bazaar Package Importer
  • Author(s): Angel Ramos
  • Date: 2002-01-21 08:15:00 UTC
  • Revision ID: james.westby@ubuntu.com-20020121081500-poxwa9o2h1z4dlch
Tags: 2.2.0-4

Fixed problems with new libpng (Closes: #129982).

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
dnl Single-module modifications are best placed in configure.in for kdelibs
29
29
dnl and kdebase or configure.in.in if present.
30
30
 
 
31
dnl ------------------------------------------------------------------------
 
32
dnl Forward compatibility macros (make autoconf 2.13 look like 2.50),
 
33
dnl thanks to Raja R Harinath.
 
34
dnl ------------------------------------------------------------------------
 
35
dnl
 
36
ifdef([_AC_PATH_X_DIRECT],[],
 
37
   [AC_DEFUN([_AC_PATH_X_DIRECT],[AC_PATH_X_DIRECT])])
 
38
ifdef([_AC_PATH_X_XMKMF],[],
 
39
   [AC_DEFUN([_AC_PATH_X_XMKMF],[AC_PATH_X_XMKMF])])
31
40
 
32
41
dnl ------------------------------------------------------------------------
33
42
dnl Find a file (or one of more files in a list of dirs)
40
49
do
41
50
  for j in $1;
42
51
  do
 
52
    echo "configure: __oline__: $i/$j" >&AC_FD_CC
43
53
    if test -r "$i/$j"; then
 
54
      echo "taking that" >&AC_FD_CC
44
55
      $3=$i
45
56
      break 2
46
57
    fi
53
64
AC_DEFUN(KDE_FIND_PATH,
54
65
[
55
66
   AC_MSG_CHECKING([for $1])
56
 
   kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
57
 
 
58
 
   AC_CACHE_VAL(kde_cv_path_$kde_cache,
59
 
   [
60
 
     kde_cv_path="NONE"
61
 
     if test -n "$$2"; then
 
67
   if test -n "$$2"; then
62
68
        kde_cv_path="$$2";
63
 
     else
 
69
   else
 
70
        kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
 
71
 
 
72
        AC_CACHE_VAL(kde_cv_path_$kde_cache,
 
73
        [
 
74
        kde_cv_path="NONE"
64
75
        dirs="$3"
65
76
        kde_save_IFS=$IFS
66
77
        IFS=':'
83
94
                break
84
95
            fi
85
96
          fi
86
 
        done
87
 
 
88
 
     fi
89
 
 
90
 
     eval "kde_cv_path_$kde_cache=$kde_cv_path"
91
 
 
92
 
   ])
93
 
 
94
 
   eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
 
97
        done
 
98
 
 
99
        eval "kde_cv_path_$kde_cache=$kde_cv_path"
 
100
 
 
101
        ])
 
102
 
 
103
      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
 
104
 
 
105
   fi
 
106
 
95
107
   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
96
108
      AC_MSG_RESULT(not found)
97
109
      $4
143
155
   fi
144
156
 
145
157
   KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
146
 
   KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC="" ; KDE_UIC_ERROR_MESSAGE])
147
 
   if test -z "$UIC" ; then
148
 
     if test -z "$UIC_NOT_NEEDED" ; then
 
158
   if test -z "$UIC_NOT_NEEDED"; then
 
159
     KDE_FIND_PATH(uic, UIC, [$qt_bindirs], [UIC=""])
 
160
     if test -z "$UIC" ; then
 
161
       KDE_UIC_ERROR_MESSAGE
149
162
       exit 1
150
 
     else
151
 
       UIC="echo uic not available: "
152
163
     fi
 
164
   else
 
165
     UIC="echo uic not available: "
153
166
   fi
 
167
 
154
168
   AC_SUBST(MOC)
155
169
   AC_SUBST(UIC)
156
170
])
198
212
 
199
213
KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
200
214
kde_have_all_paths=yes
201
 
AC_LANG_CPLUSPLUS
202
215
 
203
216
KDE_SET_PATHS($kde_result)
204
217
 
222
235
        kde_bindir=\"$kde_bindir\" \
223
236
        kde_servicesdir=\"$kde_servicesdir\" \
224
237
        kde_servicetypesdir=\"$kde_servicetypesdir\" \
 
238
        kde_moduledir=\"$kde_moduledir\" \
225
239
        kde_result=$1"
226
240
])
227
241
 
274
288
  if test -z "$kde_servicetypesdir"; then
275
289
    kde_servicetypesdir='\${prefix}/share/servicetypes'
276
290
  fi
 
291
  if test -z "$kde_moduledir"; then
 
292
    kde_moduledir='\${exec_prefix}/lib/kde2'
 
293
  fi
277
294
 
278
295
  KDE_SET_PATHS(defaults)
279
296
 
297
314
   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
298
315
   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
299
316
   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
300
 
   test -z "$kde_servicetypesdir" || test "$kde_have_all_paths" != "yes"; then
 
317
   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
 
318
   test "$kde_have_all_paths" != "yes"; then
301
319
     kde_have_all_paths=no
302
320
  fi
303
321
])
304
322
 
 
323
AC_DEFUN(KDE_MISSING_PROG_ERROR,
 
324
[
 
325
    AC_MSG_ERROR([The important program $1 was not found!
 
326
Please check whether you installed KDE correctly.
 
327
])
 
328
])
 
329
 
305
330
AC_DEFUN(KDE_SUBST_PROGRAMS,
306
 
[AC_REQUIRE([AC_CREATE_KFSSTND])dnl
307
 
if test -z "$DCOPIDL"; then
308
 
  DCOPIDL='$(kde_bindir)/dcopidl'
309
 
fi
310
 
if test -z "$DCOPIDL2CPP"; then
311
 
  DCOPIDL2CPP='$(kde_bindir)/dcopidl2cpp'
312
 
fi
313
 
if test -z "$MCOPIDL"; then
314
 
  MCOPIDL='$(kde_bindir)/mcopidl'
315
 
fi
316
 
if test -z "$KDB2HTML"; then
317
 
  KDB2HTML='$(SHELL) $(kde_bindir)/kdb2html'
318
 
fi
319
 
 
320
 
if test -z "$ARTSCCONFIG"; then
321
 
  ARTSCCONFIG='$(SHELL) $(kde_bindir)/artsc-config'
322
 
fi              
323
 
 
324
 
DCOP_DEPENDENCIES='$(DCOPIDL)'
325
 
AC_SUBST(DCOPIDL)
326
 
AC_SUBST(DCOPIDL2CPP)
327
 
AC_SUBST(DCOP_DEPENDENCIES)
328
 
AC_SUBST(MCOPIDL)
329
 
AC_SUBST(KDB2HTML)
330
 
AC_SUBST(ARTSCCONFIG)
 
331
[
 
332
 
 
333
        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde2/bin /usr/kde/bin /usr/local/kde/bin"
 
334
        if test -n "$KDEDIRS"; then
 
335
           kde_save_IFS=$IFS
 
336
           IFS=:
 
337
           for dir in $KDEDIRS; do
 
338
                kde_default_bindirs="$dir/bin $kde_default_bindirs "
 
339
           done
 
340
           IFS=$kde_save_IFS
 
341
        fi
 
342
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
 
343
        KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
 
344
        KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
 
345
        KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(mcopidl)])
 
346
        KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(artsc-config)])
 
347
        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
 
348
        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
 
349
      
 
350
        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
 
351
            kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde2/share /opt/kde/share $prefix/share"
 
352
            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
 
353
            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
 
354
            if test "$KDE_XSL_STYLESHEET" = "NO"; then
 
355
                KDE_XSL_STYLESHEET=""
 
356
            else
 
357
                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
 
358
            fi
 
359
        fi
 
360
 
 
361
        DCOP_DEPENDENCIES='$(DCOPIDL)'
 
362
        AC_SUBST(DCOPIDL)
 
363
        AC_SUBST(DCOPIDL2CPP)
 
364
        AC_SUBST(DCOP_DEPENDENCIES)
 
365
        AC_SUBST(MCOPIDL)
 
366
        AC_SUBST(ARTSCCONFIG)
 
367
        AC_SUBST(KDECONFIG)
 
368
        AC_SUBST(MEINPROC)
 
369
        AC_SUBST(KDE_XSL_STYLESHEET)
 
370
 
 
371
        if test -x "$KDECONFIG"; then # it can be "compiled"
 
372
          kde_libs_prefix=`$KDECONFIG --prefix`
 
373
          if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
 
374
               AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
 
375
                          This means it has been moved since you installed it.
 
376
                          This won't work. Please recompile kdelibs for the new prefix.
 
377
                          ])
 
378
           fi
 
379
           kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
 
380
        else
 
381
           kde_libs_prefix='$(prefix)'
 
382
           kde_libs_htmldir='$(kde_htmldir)'
 
383
        fi
 
384
        AC_SUBST(kde_libs_prefix)
 
385
        AC_SUBST(kde_libs_htmldir)
331
386
])dnl
332
387
 
333
388
AC_DEFUN(AC_CREATE_KFSSTND,
336
391
 
337
392
AC_MSG_CHECKING([for KDE paths])
338
393
kde_result=""
339
 
 
340
394
kde_cached_paths=yes
341
395
AC_CACHE_VAL(kde_cv_all_paths,
342
396
[
343
397
  KDE_SET_DEFAULT_PATHS($1)
344
398
  kde_cached_paths=no
345
399
])
346
 
 
347
400
eval "$kde_cv_all_paths"
348
401
KDE_CHECK_PATHS_FOR_COMPLETENESS
349
402
if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
352
405
  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
353
406
  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir=
354
407
  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
355
 
  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_have_all_paths=
 
408
  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
 
409
  kde_have_all_paths=
356
410
  KDE_SET_DEFAULT_PATHS($1)
357
411
  eval "$kde_cv_all_paths"
358
412
  KDE_CHECK_PATHS_FOR_COMPLETENESS
373
427
bindir=$kde_bindir
374
428
 
375
429
KDE_SUBST_PROGRAMS
 
430
 
376
431
])
377
432
 
378
433
AC_DEFUN(AC_SUBST_KFSSTND,
391
446
AC_SUBST(kde_templatesdir)
392
447
AC_SUBST(kde_servicesdir)
393
448
AC_SUBST(kde_servicetypesdir)
 
449
AC_SUBST(kde_moduledir)
394
450
if test "$kde_qtver" = 1; then
395
451
  kde_minidir="$kde_icondir/mini"
396
452
else
407
463
[
408
464
   AC_LANG_C
409
465
   dnl Checks for libraries.
410
 
   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for FreeBSD
 
466
   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
 
467
   AC_SUBST(LIBUTIL)
 
468
   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
411
469
   AC_SUBST(LIBCOMPAT)
412
470
   kde_have_crypt=
413
471
   AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
421
479
   if test $kde_have_crypt = yes; then
422
480
      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
423
481
   fi
424
 
   AC_CHECK_KSIZE_T
 
482
   AC_CHECK_SOCKLEN_T
425
483
   AC_LANG_C
426
484
   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
427
485
   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
444
502
   fi
445
503
 
446
504
   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
447
 
   AC_CHECK_FUNC(shmat)
448
 
   if test $ac_cv_func_shmat = no; then
449
 
     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc")
450
 
   fi
 
505
   AC_CHECK_FUNC(shmat, ,
 
506
     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
 
507
   
 
508
   # Solaris 2.6 and others need -lresolv for res_init
 
509
   AC_CHECK_FUNCS(res_init, , [
 
510
     kde_libs_safe="$LIBS"
 
511
     LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
 
512
     AC_TRY_LINK(
 
513
[
 
514
#include <resolv.h>
 
515
],
 
516
 
517
res_init(); 
 
518
],
 
519
        LIBRESOLV="-lresolv"
 
520
        X_EXTRA_LIBS="$X_EXTRA_LIBS $LIBRESOLV"
 
521
        AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
 
522
     )
 
523
     LIBS=$kde_libs_safe
 
524
   ])
451
525
 
452
526
   LIBSOCKET="$X_EXTRA_LIBS"
453
527
   AC_SUBST(LIBSOCKET)
 
528
   AC_SUBST(LIBRESOLV)
454
529
   AC_SUBST(X_EXTRA_LIBS)
455
530
   AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
456
531
   AC_SUBST(LIBUCB)
466
541
 
467
542
   KDE_CHECK_TYPES
468
543
   KDE_CHECK_LIBDL
469
 
   AC_CHECK_BOOL
470
544
])
471
545
 
472
546
dnl ------------------------------------------------------------------------
498
572
ac_x_libraries=$kde_x_libraries
499
573
ac_x_includes=$kde_x_includes
500
574
 
501
 
AC_PATH_X_DIRECT
 
575
_AC_PATH_X_DIRECT
502
576
dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
503
577
dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
504
578
dnl location. The correct location is /usr/lib32 or an undefined value
505
579
dnl (the linker is smart enough to pick the correct default library).
506
580
dnl Things work just fine if you use just AC_PATH_X_DIRECT.
 
581
dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
 
582
dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
 
583
dnl x_includes should be left alone.
507
584
case "$host" in
508
585
mips-sgi-irix6*)
509
586
  ;;
 
587
*-*-solaris*)
 
588
  ;;
510
589
*)
511
 
  AC_PATH_X_XMKMF
 
590
  _AC_PATH_X_XMKMF
512
591
  if test -z "$ac_x_includes"; then
513
592
    ac_x_includes="."
514
593
  fi
541
620
kde_cv_have_x="have_x=yes \
542
621
         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
543
622
])dnl
 
623
 
544
624
eval "$kde_cv_have_x"
545
625
 
546
626
if test "$have_x" != yes; then
575
655
 
576
656
# Check for libraries that X11R6 Xt/Xaw programs need.
577
657
ac_save_LDFLAGS="$LDFLAGS"
578
 
test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
 
658
LDFLAGS="$LDFLAGS $X_LDFLAGS"
579
659
# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
580
660
# check for ICE first), but we must link in the order -lSM -lICE or
581
661
# we get undefined symbols.  So assume we have SM if we have ICE.
603
683
 
604
684
AC_TRY_LINK([
605
685
#include <stdio.h>
 
686
#ifdef STDC_HEADERS
 
687
# include <stdlib.h>
 
688
#endif
606
689
],
607
690
[
608
691
printf("hello Xext\n");
623
706
them either.])
624
707
fi
625
708
 
626
 
])
 
709
AC_MSG_CHECKING(for Xinerama)
 
710
 
 
711
 AC_ARG_WITH(xinerama,
 
712
  [  --with-xinerama        enable support for Xinerama ],
 
713
  [
 
714
    no_xinerama=no
 
715
  ], [
 
716
    no_xinerama=yes
 
717
  ]
 
718
)
 
719
 
 
720
kde_save_LDFLAGS="$LDFLAGS"
 
721
kde_save_CFLAGS="$CFLAGS"
 
722
kde_save_LIBS="$LIBS"
 
723
LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
 
724
CFLAGS="$CFLAGS -I$x_includes"
 
725
LIBS="-lXinerama -lXext"
 
726
 
 
727
if test "x$no_xinerama" = "xno"; then
 
728
 
 
729
  AC_CACHE_VAL(ac_cv_have_xinerama,
 
730
  [
 
731
          AC_TRY_LINK([#include <X11/Xlib.h>
 
732
                        #include <X11/extensions/Xinerama.h>],
 
733
                  [XineramaIsActive(NULL);],
 
734
                  [ac_cv_have_xinerama="yes"],
 
735
                  [ac_cv_have_xinerama="no"])
 
736
  ])
 
737
else
 
738
  ac_cv_have_xinerama=no;
 
739
fi
 
740
 
 
741
AC_MSG_RESULT($ac_cv_have_xinerama)
 
742
 
 
743
LIBXINERAMA=""
 
744
 
 
745
if test "$ac_cv_have_xinerama" = "yes"; then
 
746
  AC_DEFINE(HAVE_XINERAMA, 1, [Define if you want Xinerama support])
 
747
  LIBXINERAMA="-lXinerama"
 
748
fi
 
749
 
 
750
AC_SUBST(LIBXINERAMA)
 
751
 
 
752
LDFLAGS="$kde_save_LDFLAGS"
 
753
CFLAGS="$kde_save_CFLAGS"
 
754
LIBS="$kde_save_LIBS"
627
755
 
628
756
AC_LANG_RESTORE
 
757
 
629
758
])
630
759
 
631
760
AC_DEFUN(KDE_PRINT_QT_PROGRAM,
635
764
#include "confdefs.h"
636
765
#include <qglobal.h>
637
766
#include <qapplication.h>
638
 
#include <qapp.h>
639
 
#include <qobjcoll.h>
640
767
EOF
641
768
if test "$kde_qtver" = "2"; then
642
769
cat >> conftest.$ac_ext <<EOF
707
834
if test -z "$2"; then
708
835
  if test $kde_qtver = 2; then
709
836
    if test $kde_qtsubver -gt 0; then
710
 
      kde_qt_minversion=">= Qt 2.2.0 Beta2"
 
837
      kde_qt_minversion=">= Qt 2.2.2"
711
838
    else
712
839
      kde_qt_minversion=">= Qt 2.0.2"
713
840
    fi
721
848
if test -z "$3"; then
722
849
   if test $kde_qtver = 2; then
723
850
    if test $kde_qtsubver -gt 0; then
724
 
      kde_qt_verstring="QT_VERSION >= 220"
 
851
      kde_qt_verstring="QT_VERSION >= 222"
725
852
    else
726
853
      kde_qt_verstring="QT_VERSION >= 200"
727
854
    fi
802
929
[
803
930
AC_REQUIRE([K_PATH_X])
804
931
AC_REQUIRE([KDE_USE_QT])
 
932
 
 
933
dnl ------------------------------------------------------------------------
 
934
dnl Add configure flag to enable linking to MT version of Qt library.
 
935
dnl ------------------------------------------------------------------------
 
936
 
 
937
AC_ARG_ENABLE(
 
938
  mt,
 
939
  [  --enable-mt             link to threaded Qt (experimental)],
 
940
  kde_use_qt_mt=$enableval,
 
941
  kde_use_qt_mt=no
 
942
)
 
943
 
 
944
USING_QT_MT=""
 
945
 
 
946
dnl ------------------------------------------------------------------------
 
947
dnl If we got --enable-qt-mt then adjust some vars for the host.
 
948
dnl ------------------------------------------------------------------------
 
949
 
 
950
if test "x$kde_use_qt_mt" = "xyes"; then
 
951
 
 
952
  case $host in
 
953
  *-*-linux-*)
 
954
    if test "x$GCC" = "xyes"; then
 
955
      CPPFLAGS="$CPPFLAGS -DQT_THREAD_SUPPORT -pthread"
 
956
      X_EXTRA_LIBS="$X_EXTRA_LIBS -pthread"
 
957
    else
 
958
      AC_MSG_WARN([Compiler is not gcc. MT support disabled.])
 
959
    fi
 
960
    ;;
 
961
  *)
 
962
    AC_MSG_WARN([MT not yet supported on $host - disabled.])
 
963
    ;;
 
964
  esac
 
965
 
 
966
fi
 
967
 
805
968
kde_qt_was_given=yes
 
969
 
 
970
dnl ------------------------------------------------------------------------
 
971
dnl If we haven't been told how to link to Qt, we work it out for ourselves.
 
972
dnl ------------------------------------------------------------------------
 
973
 
 
974
if test -z "$LIBQT_GLOB"; then
 
975
 
 
976
  LIBQT_GLOB="libqt.*"
 
977
 
 
978
fi
 
979
 
806
980
if test -z "$LIBQT"; then
 
981
 
807
982
  LIBQT="-lqt"
 
983
  kde_int_qt="-lqt"
 
984
 
 
985
dnl ------------------------------------------------------------------------
 
986
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
 
987
dnl ------------------------------------------------------------------------
 
988
 
 
989
  if test "x$kde_use_qt_mt" = "xyes"; then
 
990
 
 
991
      case $host in
 
992
      *-*-linux-*)
 
993
        if test "x$GCC" = "xyes"; then
 
994
          LIBQT="-lqt-mt"
 
995
          kde_int_qt="-lqt-mt"
 
996
          LIBQT_GLOB="libqt-mt.*"
 
997
          USING_QT_MT="using -mt"
 
998
        fi
 
999
      ;;
 
1000
      esac
 
1001
  fi
 
1002
 
808
1003
  kde_qt_was_given=no
809
 
  kde_int_qt="-lqt"
 
1004
 
810
1005
else
811
1006
  kde_int_qt="$LIBQT"
812
1007
fi
 
1008
 
813
1009
if test $kde_qtver = 2; then
814
1010
 
815
1011
  AC_REQUIRE([AC_FIND_PNG])
851
1047
for dir in $kde_qt_dirs; do
852
1048
   qt_incdirs="$qt_incdirs $dir/include $dir"
853
1049
done
854
 
qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt $x_includes"
 
1050
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"
855
1051
if test ! "$ac_qt_includes" = "NO"; then
856
1052
   qt_incdirs="$ac_qt_includes $qt_incdirs"
857
1053
fi
877
1073
  # if the Qt was given, the chance is too big that libqt.* doesn't exist
878
1074
  qt_libdir=NONE
879
1075
  for dir in $qt_libdirs; do
880
 
    try="ls -1 $dir/libqt.*"
 
1076
    try="ls -1 $dir/${LIBQT_GLOB}"
881
1077
    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
882
1078
  done
883
1079
fi
937
1133
else
938
1134
  ac_cv_have_qt="have_qt=yes \
939
1135
    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
940
 
  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes])
 
1136
  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
941
1137
 
942
1138
  qt_libraries="$ac_qt_libraries"
943
1139
  qt_includes="$ac_qt_includes"
1043
1239
AC_CACHE_VAL(ac_cv_have_kde,
1044
1240
[#try to guess kde locations
1045
1241
 
 
1242
if test "$kde_qtver" = 1; then
 
1243
  kde_check_header="ksock.h"
 
1244
  kde_check_lib="libkdecore.la"
 
1245
else
 
1246
  kde_check_header="ksharedptr.h"
 
1247
  kde_check_lib="libkio.la"
 
1248
fi
 
1249
 
1046
1250
if test -z "$1"; then
1047
1251
 
1048
 
kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/kde/include /usr/include/kde /usr/include /opt/kde/include $x_includes $qt_includes"
 
1252
kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde2/include /opt/kde/include $x_includes $qt_includes"
1049
1253
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1050
1254
kde_incdirs="$ac_kde_includes $kde_incdirs"
1051
 
AC_FIND_FILE(ksock.h, $kde_incdirs, kde_incdir)
 
1255
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1052
1256
ac_kde_includes="$kde_incdir"
1053
1257
 
1054
 
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/ksock.h"; then
 
1258
if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
1055
1259
  AC_MSG_ERROR([
1056
1260
in the prefix, you've chosen, are no KDE headers installed. This will fail.
1057
1261
So, check this please and use another prefix!])
1058
1262
fi
1059
1263
 
1060
 
kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib /usr/X11R6/lib /opt/kde/lib /usr/X11R6/kde/lib"
 
1264
kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde2/lib /opt/kde/lib /usr/X11R6/kde/lib"
1061
1265
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib $KDEDIR $kde_libdirs"
1062
1266
kde_libdirs="$ac_kde_libraries $kde_libdirs"
1063
 
AC_FIND_FILE(libkdecore.la, $kde_libdirs, kde_libdir)
 
1267
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1064
1268
ac_kde_libraries="$kde_libdir"
1065
1269
 
1066
 
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/libkdecore.la"; then
 
1270
if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
1067
1271
AC_MSG_ERROR([
1068
1272
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
1069
1273
So, check this please and use another prefix!])
1114
1318
AC_SUBST(kde_libraries)
1115
1319
AC_SUBST(kde_includes)
1116
1320
 
1117
 
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes" ; then
 
1321
if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
1118
1322
 KDE_INCLUDES=""
1119
1323
else
1120
1324
 KDE_INCLUDES="-I$kde_includes"
1197
1401
AC_DEFUN(KDE_1_CHECK_PATH_HEADERS,
1198
1402
[
1199
1403
    AC_MSG_CHECKING([for KDE headers installed])
 
1404
    AC_LANG_SAVE
1200
1405
    AC_LANG_CPLUSPLUS
1201
1406
cat > conftest.$ac_ext <<EOF
 
1407
#ifdef STDC_HEADERS
 
1408
# include <stdlib.h>
 
1409
#endif
1202
1410
#include <stdio.h>
1203
1411
#include "confdefs.h"
1204
1412
#include <kapp.h>
1220
1428
    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
1221
1429
    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
1222
1430
    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
 
1431
    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
1223
1432
    return 0;
1224
1433
    }
1225
1434
EOF
1232
1441
Check, if you installed the KDE header files correctly.
1233
1442
For more details about this problem, look at the end of config.log.])
1234
1443
  fi
 
1444
 
 
1445
  AC_LANG_RESTORE
1235
1446
])
1236
1447
 
1237
1448
AC_DEFUN(KDE_CHECK_KDEQTADDON,
1369
1580
  KDE_CREATE_LIBS_ALIASES
1370
1581
])
1371
1582
 
1372
 
dnl slightly changed version of AC_CHECK_FUNC(setenv)
1373
 
dnl checks for unsetenv too
 
1583
dnl obsolete
1374
1584
AC_DEFUN(AC_CHECK_SETENV,
1375
 
[AC_MSG_CHECKING([for setenv])
1376
 
AC_CACHE_VAL(ac_cv_func_setenv,
1377
 
[AC_LANG_C
1378
 
AC_TRY_LINK(
1379
 
dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h>
1380
 
dnl which includes <sys/select.h> which contains a prototype for
1381
 
dnl select.  Similarly for bzero.
1382
 
[#include <assert.h>
1383
 
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
1384
 
extern "C"
1385
 
#endif
1386
 
])dnl
1387
 
[/* We use char because int might match the return type of a gcc2
1388
 
    builtin and then its argument prototype would still apply.  */
1389
 
#include <stdlib.h>
1390
 
], [
1391
 
/* The GNU C library defines this for functions which it implements
1392
 
    to always fail with ENOSYS.  Some functions are actually named
1393
 
    something starting with __ and the normal name is an alias.  */
1394
 
#if defined (__stub_$1) || defined (__stub___$1)
1395
 
choke me
1396
 
#else
1397
 
setenv("TEST", "alle", 1);
1398
 
#endif
1399
 
], eval "ac_cv_func_setenv=yes", eval "ac_cv_func_setenv=no")])
1400
 
 
1401
 
if test "$ac_cv_func_setenv" = "yes"; then
1402
 
  AC_MSG_RESULT(yes)
1403
 
  AC_DEFINE_UNQUOTED(HAVE_FUNC_SETENV, 1, [Define if you have setenv])
1404
 
else
1405
 
  AC_MSG_RESULT(no)
1406
 
fi
1407
 
 
1408
 
AC_MSG_CHECKING([for unsetenv])
1409
 
AC_CACHE_VAL(ac_cv_func_unsetenv,
1410
 
[AC_LANG_C
1411
 
AC_TRY_LINK(
1412
 
dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h>
1413
 
dnl which includes <sys/select.h> which contains a prototype for
1414
 
dnl select.  Similarly for bzero.
1415
 
[#include <assert.h>
1416
 
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
1417
 
extern "C"
1418
 
#endif
1419
 
])dnl
1420
 
[/* We use char because int might match the return type of a gcc2
1421
 
    builtin and then its argument prototype would still apply.  */
1422
 
#include <stdlib.h>
1423
 
], [
1424
 
/* The GNU C library defines this for functions which it implements
1425
 
    to always fail with ENOSYS.  Some functions are actually named
1426
 
    something starting with __ and the normal name is an alias.  */
1427
 
#if defined (__stub_$1) || defined (__stub___$1)
1428
 
choke me
1429
 
#else
1430
 
unsetenv("TEST");
1431
 
#endif
1432
 
], eval "ac_cv_func_unsetenv=yes", eval "ac_cv_func_unsetenv=no")])
1433
 
 
1434
 
if test "$ac_cv_func_unsetenv" = "yes"; then
1435
 
  AC_MSG_RESULT(yes)
1436
 
  AC_DEFINE_UNQUOTED(HAVE_FUNC_UNSETENV, 1, [Define if you have unsetenv])
1437
 
else
1438
 
  AC_MSG_RESULT(no)
1439
 
fi
 
1585
[
 
1586
   AC_OBSOLETE([$0], [; instead use AC_CHECK_FUNCS([setenv unsetenv])])dnl 
 
1587
   AC_CHECK_FUNCS([setenv unsetenv])
1440
1588
])
1441
1589
 
1442
1590
AC_DEFUN(AC_CHECK_GETDOMAINNAME,
1443
1591
[
1444
 
AC_LANG_CPLUSPLUS
1445
 
save_CXXFLAGS="$CXXFLAGS"
1446
 
if test "$GCC" = "yes"; then
1447
 
CXXFLAGS="$CXXFLAGS -pedantic-errors"
1448
 
fi
1449
1592
AC_MSG_CHECKING(for getdomainname)
1450
1593
AC_CACHE_VAL(ac_cv_func_getdomainname,
1451
1594
[
 
1595
AC_LANG_SAVE
 
1596
AC_LANG_CPLUSPLUS
 
1597
save_CXXFLAGS="$CXXFLAGS"
 
1598
kde_safe_LIBS="$LIBS"
 
1599
LIBS="$LIBS $X_EXTRA_LIBS"
 
1600
if test "$GCC" = "yes"; then
 
1601
CXXFLAGS="$CXXFLAGS -pedantic-errors"
 
1602
fi
1452
1603
AC_TRY_COMPILE([
1453
1604
#include <stdlib.h>
1454
1605
#include <unistd.h>
1459
1610
],
1460
1611
ac_cv_func_getdomainname=yes,
1461
1612
ac_cv_func_getdomainname=no)
 
1613
CXXFLAGS="$save_CXXFLAGS"
 
1614
LIBS=$kde_safe_LIBS
 
1615
AC_LANG_RESTORE
1462
1616
])
1463
1617
AC_MSG_RESULT($ac_cv_func_getdomainname)
 
1618
 
 
1619
AC_MSG_CHECKING([if getdomainname needs custom prototype])
 
1620
AC_CACHE_VAL(ac_cv_proto_getdomainname,
 
1621
[
 
1622
AC_LANG_SAVE
 
1623
AC_LANG_CPLUSPLUS
 
1624
if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
 
1625
  ac_cv_proto_getdomainname=no
 
1626
else
 
1627
  kde_safe_libs=$LIBS
 
1628
  LIBS="$LIBS $X_EXTRA_LIBS"
 
1629
  AC_TRY_LINK([
 
1630
#include <stdlib.h>
 
1631
#include <unistd.h>
 
1632
 
 
1633
extern "C" int getdomainname (char *, int);
 
1634
],
 
1635
[
 
1636
char buffer[200];
 
1637
getdomainname(buffer, 200);
 
1638
],
 
1639
  ac_cv_func_getdomainname=yes
 
1640
  ac_cv_proto_getdomainname=yes,
 
1641
  AC_MSG_RESULT([fatal error])
 
1642
  AC_MSG_ERROR([getdomainname unavailable]))
 
1643
fi
 
1644
LIBS=$kde_safe_libs
 
1645
AC_LANG_RESTORE
 
1646
])
 
1647
AC_MSG_RESULT($ac_cv_proto_getdomainname)
 
1648
 
1464
1649
if eval "test \"`echo $ac_cv_func_getdomainname`\" = yes"; then
1465
1650
  AC_DEFINE(HAVE_GETDOMAINNAME, 1, [Define if you have getdomainname])
1466
1651
fi
1467
 
CXXFLAGS="$save_CXXFLAGS"
 
1652
if eval "test \"`echo $ac_cv_proto_getdomainname`\" = no"; then
 
1653
  AC_DEFINE(HAVE_GETDOMAINNAME_PROTO, 1,
 
1654
  [Define if you have getdomainname prototype])
 
1655
fi
 
1656
 
1468
1657
])
1469
1658
 
1470
1659
AC_DEFUN(AC_CHECK_GETHOSTNAME,
1471
1660
[
1472
 
AC_LANG_CPLUSPLUS
1473
 
save_CXXFLAGS="$CXXFLAGS"
1474
 
if test "$GCC" = "yes"; then
1475
 
CXXFLAGS="$CXXFLAGS -pedantic-errors"
1476
 
fi
1477
1661
 
1478
1662
AC_MSG_CHECKING([for gethostname])
1479
1663
AC_CACHE_VAL(ac_cv_func_gethostname,
1480
1664
[
1481
 
AC_TRY_COMPILE([
 
1665
AC_LANG_SAVE
 
1666
AC_LANG_CPLUSPLUS
 
1667
save_CXXFLAGS="$CXXFLAGS"
 
1668
if test "$GCC" = "yes"; then
 
1669
CXXFLAGS="$CXXFLAGS -pedantic-errors"
 
1670
fi
 
1671
AC_TRY_LINK([
1482
1672
#include <stdlib.h>
1483
1673
#include <unistd.h>
1484
1674
],
1488
1678
],
1489
1679
ac_cv_func_gethostname=yes,
1490
1680
ac_cv_func_gethostname=no)
 
1681
CXXFLAGS="$save_CXXFLAGS"
 
1682
AC_LANG_RESTORE
1491
1683
])
1492
1684
AC_MSG_RESULT($ac_cv_func_gethostname)
1493
 
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
1494
 
  AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have getdomainname])
1495
 
fi
1496
 
CXXFLAGS="$save_CXXFLAGS"
 
1685
 
 
1686
AC_MSG_CHECKING([if gethostname needs custom prototype])
 
1687
AC_CACHE_VAL(ac_cv_proto_gethostname,
 
1688
[
 
1689
AC_LANG_SAVE
 
1690
AC_LANG_CPLUSPLUS
 
1691
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
 
1692
  ac_cv_proto_gethostname=no
 
1693
else
 
1694
  AC_TRY_LINK([
 
1695
#include <stdlib.h>
 
1696
#include <unistd.h>
 
1697
 
 
1698
extern "C" int gethostname (char *, int);
 
1699
],
 
1700
[
 
1701
char buffer[200];
 
1702
gethostname(buffer, 200);
 
1703
],
 
1704
  ac_cv_func_gethostname=yes
 
1705
  ac_cv_proto_gethostname=yes,
 
1706
  AC_MSG_RESULT([fatal error])
 
1707
  AC_MSG_ERROR(gethostname unavailable))
 
1708
fi
 
1709
AC_LANG_RESTORE
 
1710
])
 
1711
AC_MSG_RESULT($ac_cv_proto_gethostname)
 
1712
 
 
1713
if eval "test \"`echo $ac_cv_proto_gethostname`\" = no"; then
 
1714
  AC_DEFINE(HAVE_GETHOSTNAME_PROTO, 1,
 
1715
  [Define if you have gethostname prototype])
 
1716
fi
 
1717
if eval "test \"`echo $ac_cv_func_gethostname`\" = yes"; then
 
1718
  AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have gethostname])
 
1719
fi
1497
1720
])
1498
1721
 
1499
1722
AC_DEFUN(AC_CHECK_USLEEP,
1500
1723
[
1501
 
AC_LANG_CPLUSPLUS
1502
 
 
1503
1724
AC_MSG_CHECKING([for usleep])
1504
1725
AC_CACHE_VAL(ac_cv_func_usleep,
1505
1726
[
 
1727
AC_LANG_SAVE
 
1728
AC_LANG_CPLUSPLUS
1506
1729
ac_libs_safe="$LIBS"
1507
1730
LIBS="$LIBS $LIBUCB"
1508
1731
AC_TRY_LINK([
1514
1737
],
1515
1738
ac_cv_func_usleep=yes,
1516
1739
ac_cv_func_usleep=no)
 
1740
LIBS="$ac_libs_safe"
 
1741
AC_LANG_RESTORE
1517
1742
])
1518
1743
AC_MSG_RESULT($ac_cv_func_usleep)
1519
1744
if eval "test \"`echo $ac_cv_func_usleep`\" = yes"; then
1520
1745
  AC_DEFINE(HAVE_USLEEP, 1, [Define if you have the usleep function])
1521
1746
fi
1522
 
LIBS="$ac_libs_safe"
1523
1747
])
1524
1748
 
1525
1749
AC_DEFUN(AC_CHECK_RANDOM,
1526
1750
[
1527
 
AC_LANG_CPLUSPLUS
1528
 
 
1529
1751
AC_MSG_CHECKING([for random])
1530
1752
AC_CACHE_VAL(ac_cv_func_random,
1531
1753
[
 
1754
AC_LANG_SAVE
 
1755
AC_LANG_CPLUSPLUS
1532
1756
ac_libs_safe="$LIBS"
1533
1757
LIBS="$LIBS $LIBUCB"
1534
1758
AC_TRY_LINK([
1539
1763
],
1540
1764
ac_cv_func_random=yes,
1541
1765
ac_cv_func_random=no)
 
1766
LIBS="$ac_libs_safe"
 
1767
AC_LANG_RESTORE
1542
1768
])
1543
1769
AC_MSG_RESULT($ac_cv_func_random)
1544
1770
if eval "test \"`echo $ac_cv_func_random`\" = yes"; then
1545
1771
  AC_DEFINE(HAVE_RANDOM, 1, [Define if you have random])
1546
1772
fi
1547
 
LIBS="$ac_libs_safe"
1548
1773
])
1549
1774
 
1550
1775
AC_DEFUN(AC_FIND_GIF,
1585
1810
AC_LANG_C
1586
1811
ac_save_LIBS="$LIBS"
1587
1812
LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
 
1813
ac_save_CFLAGS="$CFLAGS"
 
1814
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
1588
1815
AC_TRY_LINK(
1589
1816
[/* Override any gcc2 internal prototype to avoid an error.  */
1590
1817
struct jpeg_decompress_struct;
1605
1832
            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
1606
1833
            eval "ac_cv_lib_jpeg_$1=no")
1607
1834
LIBS="$ac_save_LIBS"
 
1835
CFLAGS="$ac_save_CFLAGS"
1608
1836
])
1609
1837
 
1610
1838
if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
1623
1851
KDE_FIND_JPEG_HELPER(6b, 6b,
1624
1852
   KDE_FIND_JPEG_HELPER(normal, [],
1625
1853
    [
1626
 
dnl what to do, if the normal way fails:
1627
 
        if test -f "$kde_libraries/libjpeg.so"; then
1628
 
           test -f ./libjpegkde.so || $LN_S $kde_libraries/libjpeg.so ./libjpegkde.so
1629
 
           ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"
1630
 
        else if test -f "$kde_libraries/libjpeg.sl"; then
1631
 
           test -f ./libjpegkde.sl ||$LN_S $kde_libraries/libjpeg.sl ./libjpegkde.sl
1632
 
           ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"      
1633
 
        else if test -f "$kde_libraries/libjpeg.a"; then
1634
 
           test -f ./libjpegkde.a || $LN_S $kde_libraries/libjpeg.a ./libjpegkde.a
1635
 
           ac_cv_lib_jpeg="-L\${topdir} -ljpegkde"
1636
 
        else
1637
 
          ac_cv_lib_jpeg=
1638
 
        fi
1639
 
      fi
1640
 
   fi
1641
 
 
1642
 
   LIBJPEG=$ac_cv_lib_jpeg
1643
 
]))
 
1854
       LIBJPEG=
 
1855
    ]
 
1856
   )
 
1857
)
1644
1858
 
1645
1859
dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
1646
1860
dnl requires system dependent includes loaded before it)
1712
1926
 
1713
1927
AC_CACHE_VAL(kde_cv_libtiff_$1,
1714
1928
[
 
1929
AC_LANG_SAVE
1715
1930
AC_LANG_CPLUSPLUS
1716
1931
kde_save_LIBS="$LIBS"
1717
1932
LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
1731
1946
 
1732
1947
LIBS="$kde_save_LIBS"
1733
1948
CXXFLAGS="$kde_save_CXXFLAGS"
1734
 
 
 
1949
AC_LANG_RESTORE
1735
1950
])
1736
1951
 
1737
1952
if test "$kde_cv_libtiff_$1" = "no"; then
1802
2017
 
1803
2018
AC_DEFUN(AC_CHECK_BOOL,
1804
2019
[
1805
 
        AC_MSG_CHECKING([for bool])
1806
 
        AC_CACHE_VAL(ac_cv_have_bool,
1807
 
        [
1808
 
                AC_LANG_CPLUSPLUS
1809
 
                AC_TRY_COMPILE([],
1810
 
                 [bool aBool = true;],
1811
 
                 [ac_cv_have_bool="yes"],
1812
 
                 [ac_cv_have_bool="no"])
1813
 
        ]) dnl end AC_CHECK_VAL
1814
 
        AC_MSG_RESULT($ac_cv_have_bool)
1815
 
        if test "$ac_cv_have_bool" = "yes"; then
1816
 
                AC_DEFINE(HAVE_BOOL, 1, [Define if the C++ compiler supports BOOL])
1817
 
        fi
 
2020
  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
1818
2021
])
1819
2022
 
1820
2023
AC_DEFUN(AC_CHECK_GNU_EXTENSIONS,
1847
2050
 
1848
2051
AC_DEFUN(KDE_CHECK_COMPILER_FLAG,
1849
2052
[
1850
 
AC_REQUIRE([AC_CHECK_COMPILERS])
 
2053
dnl AC_REQUIRE([AC_CHECK_COMPILERS]) <- breaks with autoconf 2.50
1851
2054
AC_MSG_CHECKING(whether $CXX supports -$1)
1852
2055
kde_cache=`echo $1 | sed 'y%.=/+-%___p_%'`
1853
2056
AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
1872
2075
fi
1873
2076
])
1874
2077
 
1875
 
AC_DEFUN(KDE_PROG_CC_PG,
1876
 
[ AC_CACHE_CHECK(whether ${CC-cc} accepts -pg, kde_cv_prog_cc_pg,
1877
 
  [echo 'void f(){}' > conftest.c
1878
 
   if test -z "`${CC-cc} -pg -c conftest.c 2>&1`"; then
1879
 
     kde_cv_prog_cc_pg=yes
1880
 
   else
1881
 
     kde_cv_prog_cc_pg=no
1882
 
   fi
1883
 
   rm -f conftest*
1884
 
])])
 
2078
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
 
2079
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
 
2080
dnl it's all white-space separated
 
2081
AC_DEFUN(AC_REMOVE_FORBIDDEN,
 
2082
[ __val=$$1
 
2083
  __forbid=" $2 "
 
2084
  if test -n "$__val"; then
 
2085
    __new=""
 
2086
    ac_save_IFS=$IFS
 
2087
    IFS="       "
 
2088
    for i in $__val; do
 
2089
      case "$__forbid" in
 
2090
        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
 
2091
        *) # Careful to not add spaces, where there were none, because otherwise
 
2092
           # libtool gets confused, if we change e.g. CXX
 
2093
           if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
 
2094
      esac
 
2095
    done
 
2096
    IFS=$ac_save_IFS
 
2097
    $1=$__new
 
2098
  fi
 
2099
])
1885
2100
 
1886
 
AC_DEFUN(KDE_PROG_CXX_PG,
1887
 
[ AC_CACHE_CHECK(whether ${CXX-g++} accepts -pg, kde_cv_prog_cxx_pg,
1888
 
  [echo 'void f(){}' > conftest.cc
1889
 
   if test -z "`${CXX-g++} -pg -c conftest.cc 2>&1`"; then
1890
 
     kde_cv_prog_cxx_pg=yes
1891
 
   else
1892
 
     kde_cv_prog_cxx_pg=no
1893
 
   fi
1894
 
  rm -f conftest*
1895
 
])])
 
2101
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
 
2102
AC_DEFUN(AC_VALIDIFY_CXXFLAGS,
 
2103
[dnl
 
2104
 AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
 
2105
 AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
 
2106
])
1896
2107
 
1897
2108
AC_DEFUN(AC_CHECK_COMPILERS,
1898
2109
[
1899
 
  dnl this is somehow a fat lie, but prevents other macros from double checking
1900
 
  AC_PROVIDE([AC_PROG_CC])
1901
 
  AC_PROVIDE([AC_PROG_CPP])
1902
 
  AC_PROVIDE([AC_PROG_CXX])
1903
 
  AC_PROVIDE([AC_PROG_CXXCPP])
1904
 
 
1905
 
  AC_ARG_ENABLE(debug,[  --enable-debug          creates debugging code [default=no]],
 
2110
  AC_ARG_ENABLE(debug,[  --enable-debug          enables debug symbols [default=no]],
1906
2111
  [
1907
2112
   if test $enableval = "no"; dnl
1908
2113
     then
1912
2117
       kde_use_debug_code="yes"
1913
2118
       kde_use_debug_define=no
1914
2119
   fi
1915
 
  ], [kde_use_debug_code="no"
 
2120
  ], 
 
2121
    [kde_use_debug_code="no"
1916
2122
      kde_use_debug_define=no
1917
 
    ])
 
2123
  ])
 
2124
 
 
2125
  dnl Just for configure --help
 
2126
  AC_ARG_ENABLE(dummyoption,[  --disable-debug         disables debug output and debug symbols [default=no]],[],[])
1918
2127
 
1919
2128
  AC_ARG_ENABLE(strict,[  --enable-strict         compiles with strict compiler options (may not work!)],
1920
2129
   [
1926
2135
   ], [kde_use_strict_options="no"])
1927
2136
 
1928
2137
  AC_ARG_ENABLE(profile,[  --enable-profile        creates profiling infos [default=no]],
1929
 
     [kde_use_profiling=$enableval],
1930
 
     [kde_use_profiling="no"]
 
2138
    [kde_use_profiling=$enableval],
 
2139
    [kde_use_profiling="no"]
1931
2140
  )
1932
2141
 
1933
 
dnl this was AC_PROG_CC. I had to include it manualy, since I had to patch it
1934
 
  AC_MSG_CHECKING(for a C-Compiler)
1935
 
  dnl if there is one, print out. if not, don't matter
1936
 
  AC_MSG_RESULT($CC)
1937
 
 
1938
 
  if test -z "$CC"; then AC_CHECK_PROG(CC, gcc, gcc) fi
1939
 
  if test -z "$CC"; then AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) fi
1940
 
  if test -z "$CC"; then AC_CHECK_PROG(CC, xlc, xlc) fi
1941
 
  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
1942
 
 
1943
 
  AC_PROG_CC_WORKS
1944
 
  AC_PROG_CC_GNU
1945
 
 
1946
 
  if test $ac_cv_prog_gcc = yes; then
1947
 
    GCC=yes
1948
 
  else
1949
 
    GCC=
1950
 
  fi
1951
 
 
1952
 
  if test -z "$CFLAGS"; then
 
2142
  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
 
2143
  CFLAGS=" $CFLAGS"
 
2144
 
 
2145
  AC_PROG_CC 
 
2146
 
 
2147
  if test "$GCC" = "yes"; then
1953
2148
    if test "$kde_use_debug_code" = "yes"; then
1954
 
      AC_PROG_CC_G
1955
 
      if test $ac_cv_prog_cc_g = yes; then
1956
 
        CFLAGS="-g"
1957
 
        case $host in
1958
 
        *-*-linux-gnu)  
1959
 
           CFLAGS="$CFLAGS -ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE -D_BSD_SOURCE"
1960
 
         ;;
1961
 
        esac
1962
 
      fi
 
2149
      CFLAGS="-g -O2 $CFLAGS"
 
2150
      case $host in
 
2151
        *-*-linux-gnu)  
 
2152
          CFLAGS="-ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
 
2153
        ;;
 
2154
      esac
1963
2155
    else
1964
 
      if test "$GCC" = "yes"; then
1965
 
        CFLAGS="-O2"
1966
 
      else
1967
 
        CFLAGS=""
1968
 
      fi
1969
 
      if test "$kde_use_debug_define" = "yes"; then
1970
 
         CFLAGS="$CFLAGS -DNDEBUG"
1971
 
      fi
1972
 
    fi
1973
 
 
1974
 
    if test "$kde_use_profiling" = yes; then
1975
 
      KDE_PROG_CC_PG
1976
 
      if test "$kde_cv_prog_cc_pg" = yes; then
1977
 
        CFLAGS="$CFLAGS -pg"
1978
 
      fi
1979
 
    fi
1980
 
 
1981
 
    if test "$GCC" = "yes"; then
1982
 
     CFLAGS="$CFLAGS"
1983
 
 
1984
 
     if test "$kde_use_strict_options" = "yes"; then
1985
 
        CFLAGS="$CFLAGS -W -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
1986
 
     fi
1987
 
    fi
1988
 
 
 
2156
      CFLAGS="-O2 $CFLAGS"
 
2157
    fi
 
2158
  fi
 
2159
 
 
2160
  if test "$kde_use_debug_define" = "yes"; then
 
2161
    CFLAGS="-DNDEBUG $CFLAGS"
1989
2162
  fi
1990
2163
 
1991
2164
  case "$host" in
1992
 
  *-*-sysv4.2uw*) CFLAGS="$CFLAGS -D_UNIXWARE";;
 
2165
  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
 
2166
  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
1993
2167
  esac
1994
2168
 
1995
2169
  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
1996
2170
     LDFLAGS=""
1997
2171
  fi
1998
2172
 
1999
 
 
2000
 
dnl this is AC_PROG_CPP. I had to include it here, since autoconf checks
2001
 
dnl dependecies between AC_PROG_CPP and AC_PROG_CC (or is it automake?)
2002
 
 
2003
 
  AC_MSG_CHECKING(how to run the C preprocessor)
2004
 
  # On Suns, sometimes $CPP names a directory.
2005
 
  if test -n "$CPP" && test -d "$CPP"; then
2006
 
    CPP=
2007
 
  fi
2008
 
  if test -z "$CPP"; then
2009
 
  AC_CACHE_VAL(ac_cv_prog_CPP,
2010
 
  [  # This must be in double quotes, not single quotes, because CPP may get
2011
 
    # substituted into the Makefile and "${CC-cc}" will confuse make.
2012
 
    CPP="${CC-cc} -E"
2013
 
    # On the NeXT, cc -E runs the code through the compiler's parser,
2014
 
    # not just through cpp.
2015
 
    dnl Use a header file that comes with gcc, so configuring glibc
2016
 
    dnl with a fresh cross-compiler works.
2017
 
    AC_TRY_CPP([#include <assert.h>
2018
 
    Syntax Error], ,
2019
 
    CPP="${CC-cc} -E -traditional-cpp"
2020
 
    AC_TRY_CPP([#include <assert.h>
2021
 
    Syntax Error], , CPP=/lib/cpp))
2022
 
    ac_cv_prog_CPP="$CPP"])dnl
2023
 
    CPP="$ac_cv_prog_CPP"
2024
 
  else
2025
 
    ac_cv_prog_CPP="$CPP"
2026
 
  fi
2027
 
  AC_MSG_RESULT($CPP)
2028
 
  AC_SUBST(CPP)dnl
2029
 
 
2030
 
 
2031
 
  AC_MSG_CHECKING(for a C++-Compiler)
2032
 
  dnl if there is one, print out. if not, don't matter
2033
 
  AC_MSG_RESULT($CXX)
2034
 
 
2035
 
  if test -z "$CXX"; then AC_CHECK_PROG(CXX, g++, g++) fi
2036
 
  if test -z "$CXX"; then AC_CHECK_PROG(CXX, CC, CC) fi
2037
 
  if test -z "$CXX"; then AC_CHECK_PROG(CXX, xlC, xlC) fi
2038
 
  if test -z "$CXX"; then AC_CHECK_PROG(CXX, DCC, DCC) fi
2039
 
  test -z "$CXX" && AC_MSG_ERROR([no acceptable C++-compiler found in \$PATH])
2040
 
 
2041
 
  AC_PROG_CXX_WORKS
2042
 
  AC_PROG_CXX_GNU
2043
 
 
2044
 
  if test $ac_cv_prog_gxx = yes; then
2045
 
    GXX=yes
2046
 
  fi
2047
 
 
2048
 
  if test -z "$CXXFLAGS"; then
 
2173
  CXXFLAGS=" $CXXFLAGS"
 
2174
 
 
2175
  AC_PROG_CXX
 
2176
 
 
2177
  if test "$GXX" = "yes"; then
2049
2178
    if test "$kde_use_debug_code" = "yes"; then
2050
 
      AC_PROG_CXX_G
2051
 
      if test $ac_cv_prog_cxx_g = yes; then
2052
 
        CXXFLAGS="-g"
2053
 
        case $host in  dnl
2054
 
        *-*-linux-gnu)
2055
 
           CXXFLAGS="$CXXFLAGS -ansi -D_XOPEN_SOURCE -D_BSD_SOURCE -Wbad-function-cast -Wcast-align -Wundef -Wconversion"
2056
 
         ;;
2057
 
        esac
 
2179
      CXXFLAGS="-g -O2 -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings $CXXFLAGS"
 
2180
 
 
2181
      KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
 
2182
      KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
 
2183
      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
 
2184
 
 
2185
      case $host in  dnl
 
2186
      *-*-linux-gnu)
 
2187
        CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wbad-function-cast -Wcast-align -Wundef -Wconversion $CXXFLAGS"
 
2188
        ;;
 
2189
      esac
 
2190
 
 
2191
      if test "$kde_use_strict_options" = "yes"; then
 
2192
        CXXFLAGS="-Wcast-qual -Wbad-function-cast -Wshadow -Wcast-align $CXXFLAGS"
 
2193
      fi
 
2194
 
 
2195
      if test "$kde_very_strict" = "yes"; then
 
2196
        CXXFLAGS="-Wold-style-cast -Wredundant-decls -Wconversion $CXXFLAGS"
2058
2197
      fi
2059
2198
    else
2060
 
      if test "$GXX" = "yes"; then
2061
 
         CXXFLAGS="-O2"
2062
 
      fi
2063
 
      if test "$kde_use_debug_define" = "yes"; then
2064
 
         CXXFLAGS="$CXXFLAGS -DNDEBUG"
2065
 
      fi
2066
 
    fi
2067
 
 
2068
 
    if test "$kde_use_profiling" = yes; then
2069
 
      KDE_PROG_CXX_PG
2070
 
      if test "$kde_cv_prog_cxx_pg" = yes; then
2071
 
        CXXFLAGS="$CXXFLAGS -pg"
2072
 
      fi
2073
 
    fi
2074
 
 
2075
 
    KDE_CHECK_COMPILER_FLAG(fno-exceptions,
2076
 
        [
2077
 
          CXXFLAGS="$CXXFLAGS -fno-exceptions"
2078
 
        ])
2079
 
 
2080
 
dnl WABA: Nothing wrong with RTTI, keep it on.
2081
 
dnl    KDE_CHECK_COMPILER_FLAG(fno-rtti,
2082
 
dnl     [
2083
 
dnl       CXXFLAGS="$CXXFLAGS -fno-rtti"
2084
 
dnl     ])
2085
 
 
2086
 
    KDE_CHECK_COMPILER_FLAG(fno-check-new,
2087
 
        [
2088
 
          CXXFLAGS="$CXXFLAGS -fno-check-new"
2089
 
        ])
2090
 
 
2091
 
    if test "$GXX" = "yes"; then
2092
 
       CXXFLAGS="$CXXFLAGS"
2093
 
 
2094
 
       if test true || test "$kde_use_debug_code" = "yes"; then
2095
 
         CXXFLAGS="$CXXFLAGS -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
2096
 
 
2097
 
         KDE_CHECK_COMPILER_FLAG(Wno-long-long,
2098
 
         [
2099
 
           CXXFLAGS="$CXXFLAGS -Wno-long-long"
2100
 
         ])
2101
 
         KDE_CHECK_COMPILER_FLAG(fno-builtin,
2102
 
         [
2103
 
           CXXFLAGS="$CXXFLAGS -fno-builtin"
2104
 
         ])
2105
 
        
2106
 
       fi
2107
 
 
2108
 
       if test "$kde_use_strict_options" = "yes"; then
2109
 
        CXXFLAGS="$CXXFLAGS -Wcast-qual -Wbad-function-cast -Wshadow -Wcast-align"
2110
 
       fi
2111
 
 
2112
 
       if test "$kde_very_strict" = "yes"; then
2113
 
         CXXFLAGS="$CXXFLAGS -Wold-style-cast -Wredundant-decls -Wconversion"
2114
 
       fi
2115
 
    fi
2116
 
  fi
2117
 
 
2118
 
    KDE_CHECK_COMPILER_FLAG(fexceptions,
2119
 
        [
2120
 
          USE_EXCEPTIONS="-fexceptions"
2121
 
        ],
2122
 
          USE_EXCEPTIONS=
2123
 
        )
2124
 
    AC_SUBST(USE_EXCEPTIONS)
2125
 
 
2126
 
    KDE_CHECK_COMPILER_FLAG(frtti,
2127
 
        [
2128
 
          USE_RTTI="-frtti"
2129
 
        ],
2130
 
          USE_RTTI=
2131
 
        )
2132
 
    AC_SUBST(USE_RTTI)
2133
 
 
2134
 
    case "$host" in
2135
 
      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="$CXXFLAGS -D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS" ;;
2136
 
      *-*-sysv4.2uw*) CXXFLAGS="$CXXFLAGS -D_UNIXWARE";;
2137
 
    esac
2138
 
 
2139
 
    AC_MSG_CHECKING(how to run the C++ preprocessor)
2140
 
    if test -z "$CXXCPP"; then
2141
 
      AC_CACHE_VAL(ac_cv_prog_CXXCPP,
2142
 
      [
2143
 
         AC_LANG_SAVE[]dnl
2144
 
         AC_LANG_CPLUSPLUS[]dnl
2145
 
         CXXCPP="${CXX-g++} -E"
2146
 
         AC_TRY_CPP([#include <stdlib.h>], , CXXCPP=/lib/cpp)
2147
 
         ac_cv_prog_CXXCPP="$CXXCPP"
2148
 
         AC_LANG_RESTORE[]dnl
2149
 
     ])dnl
2150
 
     CXXCPP="$ac_cv_prog_CXXCPP"
2151
 
     fi
2152
 
    AC_MSG_RESULT($CXXCPP)
2153
 
    AC_SUBST(CXXCPP)dnl
2154
 
 
2155
 
    # the following is to allow programs, that are known to
2156
 
    # have problems when compiled with -O2
2157
 
    if test -n "$CXXFLAGS"; then
 
2199
      CXXFLAGS="-O2 $CXXFLAGS"
 
2200
    fi
 
2201
  fi
 
2202
 
 
2203
  if test "$kde_use_debug_define" = "yes"; then
 
2204
    CXXFLAGS="-DNDEBUG $CXXFLAGS"
 
2205
  fi  
 
2206
 
 
2207
  if test "$kde_use_profiling" = "yes"; then
 
2208
    KDE_CHECK_COMPILER_FLAG(pg,
 
2209
    [
 
2210
      CFLAGS="-pg $CFLAGS"
 
2211
      CXXFLAGS="-pg $CXXFLAGS"
 
2212
    ])
 
2213
  fi
 
2214
    
 
2215
  KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
 
2216
  KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
 
2217
  KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS= )
 
2218
  AC_SUBST(USE_EXCEPTIONS)
 
2219
  dnl obsolete macro - provided to keep things going
 
2220
  USE_RTTI=
 
2221
  AC_SUBST(USE_RTTI)
 
2222
 
 
2223
  case "$host" in
 
2224
      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
 
2225
      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
 
2226
      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
 
2227
      *-*-solaris*) 
 
2228
        if test "$GXX" = yes; then
 
2229
          libstdcpp=`$CXX -print-file-name=libstdc++.so`
 
2230
          if test ! -f $libstdcpp; then
 
2231
             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])
 
2232
          fi
 
2233
        fi
 
2234
        ;;
 
2235
  esac
 
2236
 
 
2237
  AC_VALIDIFY_CXXFLAGS
 
2238
 
 
2239
  AC_PROG_CXXCPP
 
2240
 
 
2241
  # the following is to allow programs, that are known to
 
2242
  # have problems when compiled with -O2
 
2243
  if test -n "$CXXFLAGS"; then
2158
2244
      kde_safe_IFS=$IFS
2159
2245
      IFS=" "
2160
2246
      NOOPT_CXXFLAGS=""
2161
2247
      for i in $CXXFLAGS; do
2162
 
        if test ! "$i" = "-O2"; then
2163
 
          NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i"
2164
 
        fi
 
2248
        case $i in
 
2249
          -O*)
 
2250
                ;;
 
2251
          *)
 
2252
                NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS $i"
 
2253
                ;;
 
2254
        esac
2165
2255
      done
2166
2256
      IFS=$kde_safe_IFS
2167
 
    fi
2168
 
    AC_SUBST(NOOPT_CXXFLAGS)
2169
 
 
2170
 
    KDE_CHECK_FINAL
2171
 
 
2172
 
    ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
2173
 
 
2174
 
    KDE_CXXFLAGS=
2175
 
    AC_SUBST(KDE_CXXFLAGS)
 
2257
  fi
 
2258
 
 
2259
  AC_SUBST(NOOPT_CXXFLAGS)
 
2260
 
 
2261
  KDE_CHECK_FINAL
 
2262
 
 
2263
  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
 
2264
 
 
2265
  KDE_CXXFLAGS=
 
2266
  AC_SUBST(KDE_CXXFLAGS)
2176
2267
])
2177
2268
 
2178
2269
AC_DEFUN(KDE_ADD_DEPENDENCIES,
2201
2292
 
2202
2293
LIBTOOL_SHELL="/bin/sh ./libtool"
2203
2294
#  LIBTOOL="$LIBTOOL --silent"
2204
 
KDE_PLUGIN="-avoid-version -module -no-undefined"
 
2295
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_RPATH)"
2205
2296
AC_SUBST(KDE_PLUGIN)
 
2297
 
 
2298
  AC_ARG_ENABLE(objprelink, [  --enable-objprelink     prelink apps (experimental, needs objprelink in path)],
 
2299
        kde_use_objprelink=$enableval, kde_use_objprelink=no)
 
2300
  if test "x$kde_use_objprelink" = "xyes"; then 
 
2301
      echo Patching libtool to run objprelink.
 
2302
      mv libtool libtool.orig
 
2303
      cat > libtool <<\EOF
 
2304
#! /bin/sh
 
2305
for n ; do case $n in
 
2306
  *.o)  test -r $n && echo objprelink $n && objprelink $n ;;
 
2307
  *.lo) m=`basename $n .lo`".o" && test -r $m && echo objprelink $m && objprelink $m 
 
2308
        m=".libs/$m" && test -r $m && echo objprelink $m && objprelink $m ;;
 
2309
esac; done
 
2310
EOF
 
2311
      cat >> libtool libtool.orig
 
2312
      rm libtool.orig
 
2313
      chmod a+x libtool
 
2314
  fi
2206
2315
])
2207
2316
 
2208
2317
AC_DEFUN(KDE_CHECK_TYPES,
2209
2318
[  AC_CHECK_SIZEOF(int, 4)dnl
2210
2319
  AC_CHECK_SIZEOF(long, 4)dnl
2211
2320
  AC_CHECK_SIZEOF(char *, 4)dnl
 
2321
  AC_CHECK_SIZEOF(char, 1)dnl
2212
2322
])dnl
2213
2323
 
2214
2324
AC_DEFUN(KDE_DO_IT_ALL,
2252
2362
])
2253
2363
 
2254
2364
dnl Check for the type of the third argument of getsockname
2255
 
AC_DEFUN(AC_CHECK_KSIZE_T,
2256
 
[AC_MSG_CHECKING(for the third argument of getsockname)
2257
 
AC_CACHE_VAL(ac_cv_ksize_t,
2258
 
AC_LANG_SAVE
2259
 
AC_LANG_CPLUSPLUS
2260
 
[AC_TRY_COMPILE([
 
2365
AC_DEFUN(AC_CHECK_SOCKLEN_T, [
 
2366
  AC_MSG_CHECKING(for socklen_t)
 
2367
  AC_CACHE_VAL(ac_cv_socklen_t, [
 
2368
    AC_LANG_SAVE
 
2369
    AC_LANG_CPLUSPLUS
 
2370
    AC_TRY_COMPILE([
2261
2371
#include <sys/types.h>
2262
2372
#include <sys/socket.h>
2263
 
],[
 
2373
      ],[
2264
2374
socklen_t a=0;
2265
2375
getsockname(0,(struct sockaddr*)0, &a);
2266
 
],
2267
 
ac_cv_ksize_t=socklen_t,
2268
 
ac_cv_ksize_t=)
2269
 
if test -z "$ac_cv_ksize_t"; then
2270
 
ac_safe_cxxflags="$CXXFLAGS"
2271
 
if test "$GCC" = "yes"; then
2272
 
  CXXFLAGS="-Werror $CXXFLAGS"
2273
 
fi
2274
 
AC_TRY_COMPILE([
 
2376
      ],
 
2377
      ac_cv_socklen_t=socklen_t,
 
2378
      AC_TRY_COMPILE([
2275
2379
#include <sys/types.h>
2276
2380
#include <sys/socket.h>
2277
 
],[
 
2381
        ],[
2278
2382
int a=0;
2279
2383
getsockname(0,(struct sockaddr*)0, &a);
2280
 
],
2281
 
ac_cv_ksize_t=int,
2282
 
ac_cv_ksize_t=size_t)
2283
 
CXXFLAGS="$ac_safe_cxxflags"
2284
 
fi
2285
 
AC_LANG_RESTORE
2286
 
])
2287
 
 
2288
 
if test -z "$ac_cv_ksize_t"; then
2289
 
  ac_cv_ksize_t=int
2290
 
fi
2291
 
 
2292
 
AC_MSG_RESULT($ac_cv_ksize_t)
2293
 
AC_DEFINE_UNQUOTED(ksize_t, $ac_cv_ksize_t,
2294
 
      [Define the type of the third argument for getsockname]
2295
 
)
 
2384
        ],
 
2385
        ac_cv_socklen_t=int,
 
2386
        ac_cv_socklen_t=size_t
 
2387
      )
 
2388
    )
 
2389
    AC_LANG_RESTORE
 
2390
  ])
 
2391
 
 
2392
  AC_MSG_RESULT($ac_cv_socklen_t)
 
2393
  if test "$ac_cv_socklen_t" != "socklen_t"; then
 
2394
    AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
 
2395
        [Define the real type of socklen_t])
 
2396
  fi
 
2397
  AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
2296
2398
 
2297
2399
])
2298
2400
 
2583
2685
    CFLAGS="$CFLAGS $X_INCLUDES"
2584
2686
    test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
2585
2687
    AC_TRY_LINK([
 
2688
        #include <X11/Xproto.h>
2586
2689
        #include <X11/X.h>
2587
2690
        #include <X11/Xlib.h>
2588
2691
        #include <X11/extensions/dpms.h>
2596
2699
            CFLAGS="$CFLAGS $X_INCLUDES"
2597
2700
            test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
2598
2701
            AC_TRY_LINK([
 
2702
                #include <X11/Xproto.h>
2599
2703
                #include <X11/X.h>
2600
2704
                #include <X11/Xlib.h>
2601
2705
                #include <X11/extensions/dpms.h>
2659
2763
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU -lX11 -lXext -lm $LIBSOCKET"
2660
2764
    CFLAGS="$CFLAGS $X_INCLUDES"
2661
2765
    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
2662
 
    AC_TRY_LINK([#include <GL/gl.h>], [],
 
2766
    AC_TRY_LINK([#include <GL/gl.h>
 
2767
#include <GL/glu.h>           
 
2768
], [],
2663
2769
        ac_cv_have_gl="mesa", ac_cv_have_gl="no")
2664
2770
    if test "x$ac_cv_have_gl" = "xno"; then
2665
2771
      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGL -lGLU -lX11 -lXext -lm $LIBSOCKET"
2666
2772
      CFLAGS="$ac_save_cflags $X_INCLUDES"
2667
2773
      test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
2668
 
      AC_TRY_LINK([#include <GL/gl.h>], [],
 
2774
      AC_TRY_LINK([#include <GL/gl.h>
 
2775
#include <GL/glu.h>
 
2776
], [],
2669
2777
          ac_cv_have_gl="yes", ac_cv_have_gl="no")
2670
2778
    fi
2671
2779
    LDFLAGS="$ac_save_ldflags"
2705
2813
 AC_SUBST(GLLIB)
2706
2814
])
2707
2815
 
2708
 
 dnl PAM pam
2709
 
 
2710
 
 dnl Should test for PAM (Pluggable Authentication Modules)
2711
 
 AC_DEFUN(AC_PATH_PAM_DIRECT,
2712
 
 [
2713
 
 test -z "$pam_direct_test_library" && pam_direct_test_library=pam
2714
 
 test -z "$pam_direct_test_include" && pam_direct_test_include=security/pam_appl.h
2715
 
 
2716
 
   for ac_dir in               \
2717
 
                               \
2718
 
     /usr/local/include        \
2719
 
     /usr/include              \
2720
 
     /usr/unsupported/include  \
2721
 
     /opt/include              \
2722
 
     /usr/pam/include          \
2723
 
     /usr/local/pam/include    \
2724
 
     /usr/lib/pam/include      \
2725
 
                              \
2726
 
     $extra_include            \
2727
 
     ; \
2728
 
   do
2729
 
     if test -r "$ac_dir/$pam_direct_test_include"; then
2730
 
       no_pam= ac_pam_includes=$ac_dir
2731
 
       break
2732
 
     fi
2733
 
   done
2734
 
 
2735
 
 # First see if replacing the include by lib works.
2736
 
 for ac_dir in `echo "$ac_pam_includes" | sed s/include/lib/` \
2737
 
                           \
2738
 
     /lib                  \
2739
 
     /usr/lib              \
2740
 
     /usr/local/lib        \
2741
 
     /usr/unsupported/lib  \
2742
 
     /lib/security         \
2743
 
     /usr/security/lib     \
2744
 
     $extra_lib            \
2745
 
     ; \
2746
 
 do
2747
 
   for ac_extension in a so sl; do
2748
 
     if test -r $ac_dir/lib${pam_direct_test_library}.$ac_extension; then
2749
 
       no_pam= ac_pam_libraries=$ac_dir
2750
 
       break 2
2751
 
     fi
2752
 
   done
2753
 
 done
2754
 
])
2755
 
 
2756
 
AC_DEFUN(AC_PATH_PAM,
2757
 
 [
 
2816
 
 
2817
 dnl shadow password and PAM magic - maintained by ossi@kde.org
 
2818
 
 
2819
AC_DEFUN(KDE_PAM, [
2758
2820
  AC_REQUIRE([KDE_CHECK_LIBDL])
2759
 
  AC_REQUIRE_CPP()dnl
2760
 
 
2761
 
  AC_CHECK_LIB(pam_misc, main, [PAM_MISC_LIB="-lpam_misc"
2762
 
               AC_DEFINE_UNQUOTED(HAVE_PAM_MISC, 1, [Define if you have a PAM implementation with the pam_misc library])], [], [-lpam $LIBDL])
2763
 
 
2764
 
 AC_MSG_CHECKING(for PAM)
2765
 
 AC_ARG_WITH(pam,
2766
 
[  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
2767
 
  [
2768
 
    if test "x$withval" = "xyes"; then
2769
 
      no_pam=
2770
 
      default_pam=yes
2771
 
    elif test "x$withval" = "xno"; then
2772
 
      no_pam=yes
2773
 
    else
2774
 
      no_pam=
2775
 
      pam_service="$withval"
2776
 
        if test -z "$pam_service"; then
2777
 
        default_pam=yes
2778
 
        else
2779
 
        default_pam=
2780
 
        fi
 
2821
 
 
2822
  AC_ARG_WITH(pam,
 
2823
    [  --with-pam[=ARG]        enable support for PAM: ARG=[yes|no|service name]],
 
2824
    [ if test "x$withval" = "xyes"; then
 
2825
        use_pam=yes
 
2826
        pam_service=kde
 
2827
      elif test "x$withval" = "xno"; then
 
2828
        use_pam=no
 
2829
      else
 
2830
        use_pam=yes
 
2831
        pam_service=$withval
2781
2832
      fi
2782
 
  ], no_pam=yes
2783
 
 )
2784
 
 
2785
 
 if test ! "$no_pam" = yes; then
2786
 
 
2787
 
 AC_CACHE_VAL(ac_cv_path_pam,
2788
 
 [
2789
 
 ac_pam_includes=NONE
2790
 
 ac_pam_libraries=NONE
2791
 
 if test -z "$pam_libraries"; then
2792
 
   pam_libraries=NONE
2793
 
 fi
2794
 
 if test -z "$pam_includes"; then
2795
 
   pam_includes=NONE
2796
 
 fi
2797
 
 
2798
 
 AC_PATH_PAM_DIRECT
2799
 
 
2800
 
 test "x$pam_includes" = xNONE && pam_includes=$ac_pam_includes
2801
 
 test "x$pam_libraries" = xNONE && pam_libraries=$ac_pam_libraries
2802
 
 
2803
 
 if test ! "x$pam_includes" = xNONE && test ! "x$pam_libraries" = xNONE; then
2804
 
   ac_pam_libs="-lpam $PAM_MISC_LIB $LIBDL"
2805
 
   ac_cv_path_pam="no_pam= ac_pam_includes=$ac_pam_includes ac_pam_libraries=$ac_pam_libraries ac_pam_libs=\"$ac_pam_libs\""
2806
 
 else
2807
 
   ac_cv_path_pam="no_pam=yes"
2808
 
 fi
2809
 
 ])
2810
 
 
2811
 
 eval "$ac_cv_path_pam"
2812
 
 
2813
 
 fi
2814
 
 
2815
 
 if test "$no_pam" = yes; then
2816
 
   AC_MSG_RESULT(no)
2817
 
 else
2818
 
   AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules); Redhat-Users!])
2819
 
   PAMLIBS="$ac_pam_libs"
2820
 
   test "x$pam_includes" = xNONE && pam_includes=$ac_pam_includes
2821
 
   test "x$pam_libraries" = xNONE && pam_libraries=$ac_pam_libraries
2822
 
   AC_MSG_RESULT([libraries $pam_libraries, headers $pam_includes])
2823
 
 if test "$default_pam" = yes; then
2824
 
   AC_MSG_RESULT(["default pam service name will be used"])
2825
 
 else
2826
 
   AC_DEFINE_UNQUOTED(KDE_PAM_SERVICE,"$pam_service", [Define to change the default name of the PAM service used by KDE])
2827
 
   AC_MSG_RESULT(["pam service name will be: " $pam_service])
2828
 
 fi
2829
 
dnl test whether struct pam_message is const (Linux) or not (Sun)
2830
 
   pam_appl_h="$ac_pam_includes/security/pam_appl.h"
2831
 
   AC_MSG_CHECKING(for const pam_message)
2832
 
   AC_EGREP_HEADER([struct pam_message],
2833
 
      $pam_appl_h,
2834
 
      [ AC_EGREP_HEADER([const struct pam_message],
2835
 
                        $pam_appl_h,
2836
 
                        [AC_MSG_RESULT(["const: Linux-type PAM"]) ],
2837
 
                        [AC_MSG_RESULT(["nonconst: Sun-type PAM"])
 
2833
      ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
 
2834
    ], [
 
2835
      AC_CACHE_VAL(ac_cv_path_pam,
 
2836
        [ use_pam=no
 
2837
          AC_CHECK_LIB(pam, pam_start,
 
2838
            [ AC_CHECK_HEADER(security/pam_appl.h, 
 
2839
                [ use_pam=yes
 
2840
                  pam_service=kde ]) 
 
2841
            ], , $LIBDL)
 
2842
          ac_cv_path_pam="use_pam=$use_pam pam_service=$pam_service"
 
2843
        ])
 
2844
    ])
 
2845
  eval "$ac_cv_path_pam"
 
2846
 
 
2847
  AC_MSG_CHECKING(for PAM)
 
2848
  if test "x$use_pam" = xno; then
 
2849
    AC_MSG_RESULT(no)
 
2850
    PAMLIBS=""
 
2851
  else
 
2852
    AC_MSG_RESULT(yes)
 
2853
    AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
 
2854
    PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
 
2855
 
 
2856
    dnl test whether struct pam_message is const (Linux) or not (Sun)
 
2857
    AC_MSG_CHECKING(for const pam_message)
 
2858
    AC_EGREP_HEADER([struct pam_message], security/pam_appl.h,
 
2859
      [ AC_EGREP_HEADER([const struct pam_message], security/pam_appl.h,
 
2860
                        [AC_MSG_RESULT([const: Linux-type PAM])],
 
2861
                        [AC_MSG_RESULT([nonconst: Sun-type PAM])
2838
2862
                        AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
2839
2863
                        )],
2840
 
       [AC_MSG_RESULT(["not found - assume const, Linux-type PAM"])]
2841
 
       )
2842
 
 fi
2843
 
 
2844
 
 if test "x$pam_libraries" != x && test "x$pam_libraries" != xNONE ; then
2845
 
     PAMLIBPATHS="-L$pam_libraries"
2846
 
 fi
2847
 
 if test "x$pam_includes" != x && test "x$pam_includes" != xNONE ; then
2848
 
     PAMINC="-I$pam_includes"
2849
 
 fi
2850
 
 
2851
 
 AC_SUBST(PAMINC)
2852
 
 AC_SUBST(PAMLIBS)
2853
 
 AC_SUBST(PAMLIBPATHS)
2854
 
 
 
2864
      [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
 
2865
  fi
 
2866
 
 
2867
  AC_SUBST(PAMLIBS)
 
2868
])
 
2869
 
 
2870
dnl DEF_PAM_SERVICE(arg name, full name, define name)
 
2871
AC_DEFUN(DEF_PAM_SERVICE, [
 
2872
  AC_ARG_WITH($1-pam,
 
2873
    [  --with-$1-pam=[val]    override PAM service from --with-pam for $2],
 
2874
    [ if test "x$use_pam" = xyes; then
 
2875
        $3_PAM_SERVICE="$withval"
 
2876
      else
 
2877
        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
 
2878
You may want to enforce it by using --with-pam.])
 
2879
      fi
 
2880
    ], 
 
2881
    [ if test "x$use_pam" = xyes; then
 
2882
        $3_PAM_SERVICE="$pam_service"
 
2883
      fi
 
2884
    ])
 
2885
    if test -n "$$3_PAM_SERVICE"; then
 
2886
      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
 
2887
      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
 
2888
    fi
 
2889
    AC_SUBST($3_PAM_SERVICE)
 
2890
])
 
2891
 
 
2892
AC_DEFUN(KDE_SHADOWPASSWD, [
 
2893
  AC_REQUIRE([KDE_PAM])
 
2894
 
 
2895
  AC_CHECK_LIB(shadow, getspent,
 
2896
    [ LIBSHADOW="-lshadow"
 
2897
      ac_use_shadow=yes
 
2898
    ],
 
2899
    [ dnl for UnixWare
 
2900
      AC_CHECK_LIB(gen, getspent, 
 
2901
        [ LIBGEN="-lgen"
 
2902
          ac_use_shadow=yes
 
2903
        ], 
 
2904
        [ AC_CHECK_FUNC(getspent, 
 
2905
            [ ac_use_shadow=yes ],
 
2906
            [ ac_use_shadow=no ])
 
2907
        ])
 
2908
    ])
 
2909
  AC_SUBST(LIBSHADOW)
 
2910
  AC_SUBST(LIBGEN)
 
2911
  
 
2912
  AC_MSG_CHECKING([for shadow passwords])
 
2913
 
 
2914
  AC_ARG_WITH(shadow,
 
2915
    [  --with-shadow              If you want shadow password support ],
 
2916
    [ if test "x$withval" != "xno"; then
 
2917
        use_shadow=yes
 
2918
      else
 
2919
        use_shadow=no
 
2920
      fi
 
2921
    ], [
 
2922
      use_shadow="$ac_use_shadow"
 
2923
    ])
 
2924
 
 
2925
  if test "x$use_shadow" = xyes; then
 
2926
    AC_MSG_RESULT(yes)
 
2927
    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
 
2928
  else
 
2929
    AC_MSG_RESULT(no)
 
2930
    LIBSHADOW=
 
2931
    LIBGEN=
 
2932
  fi
 
2933
 
 
2934
  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
 
2935
  dnl this still applies, if we could use it indirectly through pam.
 
2936
  if test "x$use_shadow" = xyes || 
 
2937
     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
 
2938
      case $host in
 
2939
      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
 
2940
        SETUIDFLAGS="-m 4755 -o root";;
 
2941
      *)
 
2942
        SETUIDFLAGS="-m 4755";;
 
2943
      esac
 
2944
  fi
 
2945
  AC_SUBST(SETUIDFLAGS)
 
2946
 
 
2947
])
 
2948
 
 
2949
AC_DEFUN(KDE_PASSWDLIBS, [
 
2950
  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
 
2951
  AC_REQUIRE([KDE_PAM])
 
2952
  AC_REQUIRE([KDE_SHADOWPASSWD])
 
2953
 
 
2954
  if test "x$use_pam" = "xyes"; then 
 
2955
    PASSWDLIBS="$PAMLIBS"
 
2956
  else
 
2957
    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
 
2958
  fi
 
2959
 
 
2960
  AC_SUBST(PASSWDLIBS)
2855
2961
])
2856
2962
 
2857
2963
AC_DEFUN(KDE_CHECK_LIBDL,
2884
2990
dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
2885
2991
dnl (MM)
2886
2992
AC_ARG_ENABLE(dlopen,
2887
 
[  --disable-dlopen        link staticly [default=no]] ,
 
2993
[  --disable-dlopen        link statically [default=no]] ,
2888
2994
enable_dlopen=$enableval,
2889
2995
enable_dlopen=yes)
2890
2996
 
3154
3260
    case $host_os in
3155
3261
        solaris*)
3156
3262
                KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
 
3263
                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
 
3264
                echo "Setting Solaris pthread compilation options"
3157
3265
                ;;
 
3266
        freebsd*)
 
3267
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
 
3268
                echo "Setting FreeBSD pthread compilation options"
 
3269
                ;;
 
3270
        aix*)
 
3271
                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
 
3272
                LIBPTHREAD="$LIBPTHREAD -lc_r"
 
3273
                echo "Setting AIX pthread compilation options"
 
3274
                ;;
 
3275
        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
 
3276
                USE_THREADS="$USE_THREADS -DPIC -fPIC"
 
3277
                echo "Setting Linux pthread compilation options"
 
3278
                ;;
3158
3279
        *)
3159
3280
                ;;
3160
3281
    esac
3232
3353
 
3233
3354
])
3234
3355
 
3235
 
AC_DEFUN(KDE_CHECK_PYTHON,
 
3356
AC_DEFUN(KDE_CHECK_PYTHON_DIR,
3236
3357
[
3237
 
AC_REQUIRE([KDE_CHECK_LIBDL])
3238
 
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
3239
 
 
3240
3358
AC_MSG_CHECKING([for Python directory])
3241
 
 
 
3359
 
3242
3360
AC_CACHE_VAL(kde_cv_pythondir,
3243
3361
[
3244
3362
  if test -z "$PYTHONDIR"; then
3247
3365
    kde_cv_pythondir="$PYTHONDIR"
3248
3366
  fi
3249
3367
])
3250
 
 
 
3368
 
3251
3369
AC_ARG_WITH(pythondir,
3252
3370
[  --with-pythondir=pythondir   use python installed in pythondir ],
3253
3371
[
3254
3372
  ac_python_dir=$withval
3255
3373
], ac_python_dir=$kde_cv_pythondir
3256
3374
)
3257
 
 
 
3375
 
3258
3376
AC_MSG_RESULT($ac_python_dir)
 
3377
])
 
3378
 
 
3379
AC_DEFUN(KDE_CHECK_PYTHON_INTERN,
 
3380
[
 
3381
AC_REQUIRE([KDE_CHECK_LIBDL])
 
3382
AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
 
3383
AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
3259
3384
 
3260
3385
if test -z "$1"; then
3261
3386
  version="1.5"
3271
3396
  AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
3272
3397
  python_incdir=$python_incdir/python$version
3273
3398
  if test ! -r $python_incdir/Python.h; then
3274
 
    AC_MSG_ERROR(Python.h not found.)
 
3399
    python_incdir=no
3275
3400
  fi
3276
3401
fi
3277
3402
 
3283
3408
  AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
3284
3409
  python_libdir=$python_libdir/python$version/config
3285
3410
  if test ! -r $python_libdir/libpython$version.a; then
3286
 
    AC_MSG_ERROR(libpython$version.a not found.)
 
3411
    python_libdir=no
3287
3412
  fi
3288
3413
fi
3289
3414
 
3290
3415
PYTHONLIB=-L$python_libdir
 
3416
kde_orig_LIBPYTHON=$LIBPYTHON
3291
3417
if test -z "$LIBPYTHON"; then
3292
 
LIBPYTHON=-lpython$version
3293
 
fi
3294
 
 
3295
 
AC_MSG_RESULT(header $python_incdir library $python_libdir)
3296
 
 
3297
 
dnl Note: this test is very weak
3298
 
kde_python_link_found=no
3299
 
KDE_TRY_LINK_PYTHON(normal)
3300
 
KDE_TRY_LINK_PYTHON(m, -lm)
3301
 
KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
3302
 
KDE_TRY_LINK_PYTHON(tcl, -ltcl)
3303
 
KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm], [],
 
3418
  LIBPYTHON=-lpython$version
 
3419
fi
 
3420
 
 
3421
python_libdirs="$ac_python_dir/lib /usr/lib /usr/local /usr/lib $kde_extra_libs"
 
3422
AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
 
3423
python_moddir=$python_moddir/python$version
 
3424
if test ! -r $python_moddir/copy.py; then
 
3425
  python_moddir=no
 
3426
fi
 
3427
 
 
3428
PYTHONMODDIR=$python_moddir
 
3429
 
 
3430
AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
 
3431
 
 
3432
if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
 
3433
   LIBPYTHON=$kde_orig_LIBPYTHON
 
3434
   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
 
3435
   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
 
3436
   $2
 
3437
else 
 
3438
  dnl Note: this test is very weak
 
3439
  kde_python_link_found=no
 
3440
  KDE_TRY_LINK_PYTHON(normal)
 
3441
  KDE_TRY_LINK_PYTHON(m, -lm)
 
3442
  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
 
3443
  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
 
3444
  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
 
3445
  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
 
3446
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
 
3447
  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
 
3448
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
 
3449
  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
3304
3450
        [AC_MSG_WARN([it seems, Python depends on another library.
3305
 
    Pleae use \"make LIBPTYHON='-lpython$version -lotherlib'\" to fix this
 
3451
    Pleae use \"make LIBPYTHON='-lpython$version -lotherlib'\" to fix this
3306
3452
    and contact the authors to let them know about this problem])
 
3453
 
3307
3454
        ])
3308
3455
 
3309
 
LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
3310
 
AC_SUBST(PYTHONINC)
3311
 
AC_SUBST(PYTHONLIB)
3312
 
AC_SUBST(LIBPYTHON)
3313
 
 
3314
 
])
3315
 
 
 
3456
  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
 
3457
  AC_SUBST(PYTHONINC)
 
3458
  AC_SUBST(PYTHONLIB)
 
3459
  AC_SUBST(LIBPYTHON)
 
3460
  AC_SUBST(PYTHONMODDIR)
 
3461
  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
 
3462
fi
 
3463
 
 
3464
])
 
3465
 
 
3466
 
 
3467
AC_DEFUN(KDE_CHECK_PYTHON,
 
3468
[
 
3469
  KDE_CHECK_PYTHON_INTERN("2.1", [KDE_CHECK_PYTHON_INTERN("2.0",
 
3470
        [ KDE_CHECK_PYTHON_INTERN($1, $2) ])
 
3471
  ])
 
3472
])
3316
3473
 
3317
3474
AC_DEFUN(KDE_CHECK_STL_SGI,
3318
3475
[
3355
3512
   AC_MSG_RESULT($kde_cv_stl_type_hp)
3356
3513
 
3357
3514
   if test "$kde_cv_stl_type_hp" = "yes"; then
3358
 
        AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by SGI])
 
3515
        AC_DEFINE_UNQUOTED(HAVE_HP_STL, 1, [Define if you have a STL implementation by HP])
3359
3516
   fi
3360
3517
])
3361
3518
 
3363
3520
[
3364
3521
    AC_LANG_SAVE
3365
3522
    AC_LANG_CPLUSPLUS
 
3523
    ac_save_CXXFLAGS="$CXXFLAGS"
 
3524
    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
3366
3525
    KDE_CHECK_STL_SGI
3367
3526
 
3368
3527
    if test "$kde_cv_stl_type_sgi" = "no"; then
3373
3532
       fi
3374
3533
    fi
3375
3534
 
 
3535
    CXXFLAGS="$ac_save_CXXFLAGS"
3376
3536
    AC_LANG_RESTORE
3377
3537
])
3378
3538
 
3467
3627
    done
3468
3628
    ])
3469
3629
 
3470
 
    AC_MSG_RESULT($kde_cv_utmp_file)
3471
3630
    if test "$kde_cv_utmp_file" != "no"; then
3472
3631
        AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
 
3632
        $1
 
3633
        AC_MSG_RESULT($kde_cv_utmp_file)
 
3634
    else
 
3635
        $2
 
3636
        AC_MSG_RESULT([non found])
3473
3637
    fi
3474
3638
])
3475
3639
 
3587
3751
[
3588
3752
AC_LANG_C
3589
3753
cat > conftest.$ac_ext <<EOF
 
3754
#ifdef STDC_HEADERS
 
3755
# include <stdlib.h>
 
3756
#endif
3590
3757
#include <stdio.h>
3591
3758
#include <sys/param.h>
3592
3759
#ifndef MAXPATHLEN
3672
3839
      with_fast_perl=$enableval, with_fast_perl=yes)
3673
3840
])
3674
3841
 
 
3842
AC_DEFUN(KDE_CONF_FILES,
 
3843
[
 
3844
  val=
 
3845
  if test -f $srcdir/configure.files ; then
 
3846
    val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
 
3847
  fi
 
3848
  CONF_FILES=
 
3849
  if test -n "$val" ; then
 
3850
    for i in $val ; do
 
3851
      CONF_FILES="$CONF_FILES $i"
 
3852
    done
 
3853
  fi
 
3854
  AC_SUBST(CONF_FILES)
 
3855
])dnl
 
3856
 
3675
3857
AC_DEFUN(KDE_SET_PREFIX,
3676
3858
[
 
3859
  unset CDPATH
3677
3860
  dnl make $KDEDIR the default for the installation
3678
3861
  AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
3679
3862
 
3682
3865
    ac_configure_args="$ac_configure_args --prefix $prefix"
3683
3866
  fi
3684
3867
  KDE_FAST_CONFIGURE
 
3868
  KDE_CONF_FILES
3685
3869
])
3686
3870
 
3687
3871
pushdef([AC_PROG_INSTALL],
3761
3945
KDE_LANG_CPLUSPLUS
3762
3946
])
3763
3947
 
 
3948
AC_DEFUN(KDE_CHECK_LONG_LONG,
 
3949
[
 
3950
AC_MSG_CHECKING(for long long)
 
3951
AC_CACHE_VAL(kde_cv_c_long_long,
 
3952
[
 
3953
  AC_LANG_SAVE
 
3954
  AC_LANG_CPLUSPLUS
 
3955
  AC_TRY_LINK([], [
 
3956
  long long foo = 0;
 
3957
  foo = foo+1;
 
3958
  ],
 
3959
  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
 
3960
])
 
3961
AC_MSG_RESULT($kde_cv_c_long_long)
 
3962
if test "$kde_cv_c_long_long" = yes; then
 
3963
   AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
 
3964
fi
 
3965
])
 
3966
 
 
3967
AC_DEFUN(KDE_CHECK_LIB,
 
3968
[
 
3969
     kde_save_LIBS="$LIBS"
 
3970
     LIBS="$LIBS $all_libraries"
 
3971
     case $host_os in
 
3972
      aix*) LIBS="-brtl $LIBS"
 
3973
        test "$GCC" = yes && LIBS="-Wl,$LIBS"
 
3974
        ;;
 
3975
     esac
 
3976
     AC_CHECK_LIB($1, $2, $3, $4, $5)
 
3977
     LIBS="$kde_save_LIBS"
 
3978
])
 
3979
 
 
3980
 
 
3981
 
 
3982
 
 
3983
AC_DEFUN(KDE_CHECK_INITGROUPS,
 
3984
 
3985
  AC_REQUIRE([AC_CANONICAL_HOST])
 
3986
  AC_CHECK_FUNCS(initgroups)
 
3987
  if test "x$ac_cv_func_initgroups" = "xyes"; then
 
3988
    case $host_os in
 
3989
      aix*) AC_LANG_SAVE
 
3990
            AC_LANG_CPLUSPLUS
 
3991
            AC_MSG_CHECKING([for initgroups prototype])
 
3992
            AC_CACHE_VAL(kde_cv_check_initgroups_proto,
 
3993
            [ AC_TRY_COMPILE(
 
3994
              [ #include <grp.h>
 
3995
              ],
 
3996
              [ char buffer[10];
 
3997
                gid_t id;
 
3998
                int x = initgroups(buffer,id);
 
3999
              ],
 
4000
              kde_cv_check_initgroups_proto=yes,
 
4001
              kde_cv_check_initgroups_proto=no)
 
4002
            ])
 
4003
            AC_MSG_RESULT($kde_cv_check_initgroups_proto)
 
4004
            AC_LANG_RESTORE
 
4005
            ;;
 
4006
      *)
 
4007
            kde_cv_check_initgroups_proto=yes
 
4008
            ;;
 
4009
    esac
 
4010
  else
 
4011
    kde_cv_check_initgroups_proto=no
 
4012
  fi
 
4013
  if test "x$kde_cv_check_initgroups_proto" = "xyes"; then
 
4014
    kde_check_initgroups_proto=1
 
4015
  else
 
4016
    kde_check_initgroups_proto=0
 
4017
  fi
 
4018
  AC_DEFINE_UNQUOTED(HAVE_INITGROUPS_PROTO,$kde_check_initgroups_proto,
 
4019
           [initgroups may exist but not its prototype (e.g. AIX<4.3.3:8)])
 
4020
])
 
4021
 
 
4022
 
 
4023
AC_DEFUN(KDE_CHECK_JAVA_DIR,
 
4024
[
 
4025
AC_MSG_CHECKING([for Java directory])
 
4026
 
 
4027
AC_ARG_WITH(java,
 
4028
[  --with-java=javadir     use java installed in javadir, --without-java disables ],
 
4029
[  ac_java_dir=$withval
 
4030
], ac_java_dir=""
 
4031
)
 
4032
 
 
4033
dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
 
4034
if test "x$ac_java_dir" = xno; then
 
4035
   kde_cv_java_bindir=no
 
4036
   kde_cv_java_includedir=no
 
4037
   kde_cv_java_libjvmdir=no
 
4038
   kde_cv_java_libhpidir=no
 
4039
else
 
4040
  if test "x$ac_java_dir" = x; then
 
4041
    dnl No option set -> look in $PATH
 
4042
    AC_CACHE_VAL(kde_cv_java_bindir,
 
4043
    [
 
4044
      dnl First look for javac in $PATH. If not found we'll look at the option.
 
4045
      KDE_FIND_PATH(javac, JAVAC, [], [])
 
4046
      if test -n "$JAVAC"; then
 
4047
          kde_cv_java_bindir=`echo $JAVAC | sed -e 's,/javac$,/,'`
 
4048
          dnl this substitution might not work - well, we test for jni.h below
 
4049
          kde_cv_java_includedir=`echo $kde_cv_java_bindir | sed -e 's,bin/$,include/,'`
 
4050
      else
 
4051
          kde_cv_java_bindir=no
 
4052
      fi
 
4053
    ])
 
4054
  else
 
4055
    dnl config option set
 
4056
    kde_cv_java_bindir=$ac_java_dir/bin
 
4057
    kde_cv_java_includedir=$ac_java_dir/include
 
4058
  fi
 
4059
fi
 
4060
 
 
4061
dnl Look for libjvm.so
 
4062
kde_cv_java_libjvmdir=`find $kde_cv_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
 
4063
dnl Look for libhpi.so and avoid green threads
 
4064
kde_cv_java_libhpidir=`find $kde_cv_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,'`
 
4065
 
 
4066
dnl At this point kde_cv_java_bindir and kde_cv_java_includedir are either set or "no"
 
4067
if test ! "x$kde_cv_java_bindir" = xno; then
 
4068
 
 
4069
  dnl Now check everything's fine under there
 
4070
 
 
4071
  if test ! -x "$kde_cv_java_bindir/javac"; then
 
4072
    AC_MSG_ERROR([javac not found under $kde_cv_java_bindir - it seems you passed a wrong --with-java.])
 
4073
  fi
 
4074
  if test ! -x "$kde_cv_java_bindir/javah"; then
 
4075
    AC_MSG_ERROR([javah not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
 
4076
  fi
 
4077
  if test ! -x "$kde_cv_java_bindir/jar"; then
 
4078
    AC_MSG_ERROR([jar not found under $kde_cv_java_bindir. javac was found though! Use --with-java or --without-java.])
 
4079
  fi
 
4080
  if test ! -r "$kde_cv_java_includedir/jni.h"; then
 
4081
    AC_MSG_ERROR([jni.h not found under $kde_cv_java_includedir. Use --with-java or --without-java.])
 
4082
  fi
 
4083
  if test ! -r "$kde_cv_java_libjvmdir/libjvm.so"; then
 
4084
    AC_MSG_ERROR([libjvm.so not found under $kde_cv_java_libjvmdir. Use --without-java.])
 
4085
  fi
 
4086
  if test ! -r "$kde_cv_java_libhpidir/libhpi.so"; then
 
4087
    AC_MSG_ERROR([libhpi.so not found under $kde_cv_java_libhpidir. Use --without-java.])
 
4088
  fi
 
4089
 
 
4090
  jni_includes="-I$kde_cv_java_includedir"
 
4091
  dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
 
4092
  dnl and under linux here..
 
4093
  test -d "$kde_cv_java_includedir/linux" && jni_includes="$jni_includes -I$kde_cv_java_includedir/linux"
 
4094
  test -d "$kde_cv_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_cv_java_includedir/genunix"
 
4095
 
 
4096
  dnl Check for JNI version
 
4097
  AC_LANG_SAVE
 
4098
  AC_LANG_CPLUSPLUS
 
4099
  ac_cxxflags_safe="$CXXFLAGS"
 
4100
  CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
 
4101
 
 
4102
  AC_TRY_COMPILE([
 
4103
#include <jni.h>
 
4104
            ],
 
4105
            [
 
4106
#ifndef JNI_VERSION_1_2
 
4107
Syntax Error
 
4108
#endif
 
4109
            ],[ 
 
4110
            ],[ AC_MSG_ERROR([Incorrect version of $kde_cv_java_includedir/jni.h.
 
4111
                  You need to have Java Development Kit (JDK) version 1.2. 
 
4112
        
 
4113
                  Use --with-java to specify another location.
 
4114
                  Use --without-java to configure without java support.
 
4115
                  Or download a newer JDK and try again. 
 
4116
                  See e.g. http://java.sun.com/products/jdk/1.2 ])
 
4117
            ])
 
4118
 
 
4119
  CXXFLAGS="$ac_cxxflags_safe"    
 
4120
  AC_LANG_RESTORE
 
4121
 
 
4122
  dnl All tests ok, inform and subst the variables
 
4123
  AC_MSG_RESULT([javac/javah/jar in $kde_cv_java_bindir, jni.h in $kde_cv_java_includedir])
 
4124
 
 
4125
  JAVAC=$kde_cv_java_bindir/javac
 
4126
  AC_SUBST(JAVAC)
 
4127
  JAVAH=$kde_cv_java_bindir/javah
 
4128
  AC_SUBST(JAVAH)
 
4129
  JAR=$kde_cv_java_bindir/jar
 
4130
  AC_SUBST(JAR)
 
4131
  AC_SUBST(jni_includes)
 
4132
  JVMLIBS="-L$kde_cv_java_libjvmdir -ljvm -L$kde_cv_java_libhpidir -lhpi"
 
4133
  AC_SUBST(JVMLIBS)
 
4134
fi
 
4135
])
3764
4136
## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
3765
 
## Copyright (C) 1996-1999,2000 Free Software Foundation, Inc.
 
4137
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
 
4138
## Free Software Foundation, Inc.
3766
4139
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3767
4140
##
3768
4141
## This program is free software; you can redistribute it and/or modify
3784
4157
## configuration script generated by Autoconf, you may include it under
3785
4158
## the same distribution terms that you use for the rest of that program.
3786
4159
 
3787
 
# serial 45 AC_PROG_LIBTOOL
3788
 
AC_DEFUN(AC_PROG_LIBTOOL,[AC_REQUIRE([_AC_PROG_LIBTOOL])
 
4160
# serial 46 AC_PROG_LIBTOOL
 
4161
AC_DEFUN([AC_PROG_LIBTOOL],
 
4162
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
3789
4163
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
3790
4164
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
3791
4165
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
3800
4174
    [AC_LIBTOOL_GCJ],
3801
4175
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
3802
4176
        [AC_LIBTOOL_GCJ],
 
4177
        [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
 
4178
          [AC_LIBTOOL_GCJ],
3803
4179
        [ifdef([AC_PROG_GCJ],
3804
4180
               [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
3805
4181
])])
3806
4182
         ifdef([A][M_PROG_GCJ],
3807
4183
               [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
3808
 
])])])])])
 
4184
])])
 
4185
         ifdef([LT_AC_PROG_GCJ],
 
4186
               [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
 
4187
])])])])])])
3809
4188
 
3810
 
AC_DEFUN(_AC_PROG_LIBTOOL,
 
4189
AC_DEFUN([_AC_PROG_LIBTOOL],
3811
4190
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
3812
4191
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
3813
4192
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
3817
4196
 
3818
4197
# Actually configure libtool.  ac_aux_dir is where install-sh is found.
3819
4198
AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
3820
 
MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 
4199
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3821
4200
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
3822
4201
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
3823
4202
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
3841
4220
exec 5>>./config.log
3842
4221
])
3843
4222
 
3844
 
AC_DEFUN(AC_LIBTOOL_SETUP,
 
4223
AC_DEFUN([AC_LIBTOOL_SETUP],
3845
4224
[AC_PREREQ(2.13)dnl
3846
4225
AC_REQUIRE([AC_ENABLE_SHARED])dnl
3847
4226
AC_REQUIRE([AC_ENABLE_STATIC])dnl
3860
4239
dnl
3861
4240
 
3862
4241
# Only perform the check for file, if the check method requires it
3863
 
case "$deplibs_check_method" in
 
4242
case $deplibs_check_method in
3864
4243
file_magic*)
3865
 
  if test "$file_magic_cmd" = '${MAGIC}'; then
 
4244
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3866
4245
    AC_PATH_MAGIC
3867
4246
  fi
3868
4247
  ;;
3876
4255
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
3877
4256
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
3878
4257
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
3879
 
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
3880
 
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
 
4258
test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
 
4259
test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
3881
4260
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
3882
4261
[libtool_flags="$libtool_flags --enable-dlopen"])
3883
4262
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
3895
4274
 
3896
4275
# Some flags need to be propagated to the compiler or linker for good
3897
4276
# libtool support.
3898
 
case "$host" in
 
4277
case $host in
3899
4278
*-*-irix6*)
3900
4279
  # Find out which ABI we are using.
3901
4280
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
3902
4281
  if AC_TRY_EVAL(ac_compile); then
3903
 
    case "`/usr/bin/file conftest.o`" in
 
4282
    case `/usr/bin/file conftest.$ac_objext` in
3904
4283
    *32-bit*)
3905
4284
      LD="${LD-ld} -32"
3906
4285
      ;;
3931
4310
  ;;
3932
4311
 
3933
4312
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
3934
 
[*-*-cygwin* | *-*-mingw*)
 
4313
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
3935
4314
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
3936
4315
  AC_CHECK_TOOL(AS, as, false)
3937
4316
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
3944
4323
      DllMain (0, 0, 0);],
3945
4324
      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
3946
4325
 
3947
 
  case "$host/$CC" in
 
4326
  case $host/$CC in
3948
4327
  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
3949
4328
    # old mingw systems require "-dll" to link a DLL, while more recent ones
3950
4329
    # require "-mdll"
3953
4332
    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
3954
4333
      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
3955
4334
    CFLAGS="$SAVE_CFLAGS" ;;
3956
 
  *-*-cygwin*)
 
4335
  *-*-cygwin* | *-*-pw32*)
3957
4336
    # cygwin systems need to pass --dll to the linker, and not link
3958
4337
    # crt.o which will require a WinMain@16 definition.
3959
4338
    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
3964
4343
])
3965
4344
 
3966
4345
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3967
 
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
 
4346
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3968
4347
 
3969
4348
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3970
 
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
 
4349
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3971
4350
 
3972
4351
# AC_ENABLE_SHARED - implement the --enable-shared flag
3973
4352
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3974
4353
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3975
4354
#   `yes'.
3976
 
AC_DEFUN(AC_ENABLE_SHARED, [dnl
3977
 
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
 
4355
AC_DEFUN([AC_ENABLE_SHARED],
 
4356
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3978
4357
AC_ARG_ENABLE(shared,
3979
4358
changequote(<<, >>)dnl
3980
4359
<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3981
4360
changequote([, ])dnl
3982
4361
[p=${PACKAGE-default}
3983
 
case "$enableval" in
 
4362
case $enableval in
3984
4363
yes) enable_shared=yes ;;
3985
4364
no) enable_shared=no ;;
3986
4365
*)
3999
4378
])
4000
4379
 
4001
4380
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
4002
 
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
4381
AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4003
4382
AC_ENABLE_SHARED(no)])
4004
4383
 
4005
4384
# AC_ENABLE_STATIC - implement the --enable-static flag
4006
4385
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
4007
4386
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
4008
4387
#   `yes'.
4009
 
AC_DEFUN(AC_ENABLE_STATIC, [dnl
4010
 
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
 
4388
AC_DEFUN([AC_ENABLE_STATIC],
 
4389
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
4011
4390
AC_ARG_ENABLE(static,
4012
4391
changequote(<<, >>)dnl
4013
4392
<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
4014
4393
changequote([, ])dnl
4015
4394
[p=${PACKAGE-default}
4016
 
case "$enableval" in
 
4395
case $enableval in
4017
4396
yes) enable_static=yes ;;
4018
4397
no) enable_static=no ;;
4019
4398
*)
4032
4411
])
4033
4412
 
4034
4413
# AC_DISABLE_STATIC - set the default static flag to --disable-static
4035
 
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
4414
AC_DEFUN([AC_DISABLE_STATIC],
 
4415
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4036
4416
AC_ENABLE_STATIC(no)])
4037
4417
 
4038
4418
 
4040
4420
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
4041
4421
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
4042
4422
#   `yes'.
4043
 
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
4044
 
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
 
4423
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
 
4424
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
4045
4425
AC_ARG_ENABLE(fast-install,
4046
4426
changequote(<<, >>)dnl
4047
4427
<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
4048
4428
changequote([, ])dnl
4049
4429
[p=${PACKAGE-default}
4050
 
case "$enableval" in
 
4430
case $enableval in
4051
4431
yes) enable_fast_install=yes ;;
4052
4432
no) enable_fast_install=no ;;
4053
4433
*)
4066
4446
])
4067
4447
 
4068
4448
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
4069
 
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
4449
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
 
4450
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4070
4451
AC_ENABLE_FAST_INSTALL(no)])
4071
4452
 
4072
4453
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
4073
4454
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
4074
4455
#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
4075
4456
#   `both'.
4076
 
AC_DEFUN(AC_LIBTOOL_PICMODE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
4457
AC_DEFUN([AC_LIBTOOL_PICMODE],
 
4458
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4077
4459
pic_mode=ifelse($#,1,$1,default)])
4078
4460
 
4079
4461
 
4080
4462
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
4081
 
AC_DEFUN(AC_PATH_TOOL_PREFIX,
 
4463
AC_DEFUN([AC_PATH_TOOL_PREFIX],
4082
4464
[AC_MSG_CHECKING([for $1])
4083
 
AC_CACHE_VAL(lt_cv_path_MAGIC,
4084
 
[case "$MAGIC" in
 
4465
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
4466
[case $MAGIC_CMD in
4085
4467
  /*)
4086
 
  lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
 
4468
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4087
4469
  ;;
4088
4470
  ?:/*)
4089
 
  ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
 
4471
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4090
4472
  ;;
4091
4473
  *)
4092
 
  ac_save_MAGIC="$MAGIC"
 
4474
  ac_save_MAGIC_CMD="$MAGIC_CMD"
4093
4475
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4094
4476
dnl $ac_dummy forces splitting on constant user-supplied paths.
4095
4477
dnl POSIX.2 word splitting is done only on the output of word expansions,
4098
4480
  for ac_dir in $ac_dummy; do
4099
4481
    test -z "$ac_dir" && ac_dir=.
4100
4482
    if test -f $ac_dir/$1; then
4101
 
      lt_cv_path_MAGIC="$ac_dir/$1"
 
4483
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4102
4484
      if test -n "$file_magic_test_file"; then
4103
 
        case "$deplibs_check_method" in
 
4485
        case $deplibs_check_method in
4104
4486
        "file_magic "*)
4105
4487
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4106
 
          MAGIC="$lt_cv_path_MAGIC"
 
4488
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4107
4489
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4108
4490
            egrep "$file_magic_regex" > /dev/null; then
4109
4491
            :
4127
4509
    fi
4128
4510
  done
4129
4511
  IFS="$ac_save_ifs"
4130
 
  MAGIC="$ac_save_MAGIC"
 
4512
  MAGIC_CMD="$ac_save_MAGIC_CMD"
4131
4513
  ;;
4132
4514
esac])
4133
 
MAGIC="$lt_cv_path_MAGIC"
4134
 
if test -n "$MAGIC"; then
4135
 
  AC_MSG_RESULT($MAGIC)
 
4515
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
4516
if test -n "$MAGIC_CMD"; then
 
4517
  AC_MSG_RESULT($MAGIC_CMD)
4136
4518
else
4137
4519
  AC_MSG_RESULT(no)
4138
4520
fi
4140
4522
 
4141
4523
 
4142
4524
# AC_PATH_MAGIC - find a file program which can recognise a shared library
4143
 
AC_DEFUN(AC_PATH_MAGIC,
 
4525
AC_DEFUN([AC_PATH_MAGIC],
4144
4526
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
4145
4527
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
4146
 
if test -z "$lt_cv_path_MAGIC"; then
 
4528
if test -z "$lt_cv_path_MAGIC_CMD"; then
4147
4529
  if test -n "$ac_tool_prefix"; then
4148
4530
    AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
4149
4531
  else
4150
 
    MAGIC=:
 
4532
    MAGIC_CMD=:
4151
4533
  fi
4152
4534
fi
4153
4535
])
4154
4536
 
4155
4537
 
4156
4538
# AC_PROG_LD - find the path to the GNU or non-GNU linker
4157
 
AC_DEFUN(AC_PROG_LD,
 
4539
AC_DEFUN([AC_PROG_LD],
4158
4540
[AC_ARG_WITH(gnu-ld,
4159
4541
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
4160
4542
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4162
4544
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4163
4545
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4164
4546
ac_prog=ld
4165
 
if test "$ac_cv_prog_gcc" = yes; then
 
4547
if test "$GCC" = yes; then
4166
4548
  # Check if gcc -print-prog-name=ld gives a path.
4167
4549
  AC_MSG_CHECKING([for ld used by GCC])
4168
4550
  case $host in
4172
4554
  *)
4173
4555
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4174
4556
  esac
4175
 
  case "$ac_prog" in
 
4557
  case $ac_prog in
4176
4558
    # Accept absolute paths.
4177
 
changequote(,)dnl
4178
 
    [\\/]* | [A-Za-z]:[\\/]*)
4179
 
      re_direlt='/[^/][^/]*/\.\./'
4180
 
changequote([,])dnl
 
4559
    [[\\/]* | [A-Za-z]:[\\/]*)]
 
4560
      re_direlt=['/[^/][^/]*/\.\./']
4181
4561
      # Canonicalize the path of ld
4182
4562
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4183
4563
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4199
4579
else
4200
4580
  AC_MSG_CHECKING([for non-GNU ld])
4201
4581
fi
4202
 
AC_CACHE_VAL(ac_cv_path_LD,
 
4582
AC_CACHE_VAL(lt_cv_path_LD,
4203
4583
[if test -z "$LD"; then
4204
4584
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4205
4585
  for ac_dir in $PATH; do
4206
4586
    test -z "$ac_dir" && ac_dir=.
4207
4587
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4208
 
      ac_cv_path_LD="$ac_dir/$ac_prog"
 
4588
      lt_cv_path_LD="$ac_dir/$ac_prog"
4209
4589
      # Check to see if the program is GNU ld.  I'd rather use --version,
4210
4590
      # but apparently some GNU ld's only accept -v.
4211
4591
      # Break only if it was the GNU/non-GNU ld that we prefer.
4212
 
      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
 
4592
      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4213
4593
        test "$with_gnu_ld" != no && break
4214
4594
      else
4215
4595
        test "$with_gnu_ld" != yes && break
4218
4598
  done
4219
4599
  IFS="$ac_save_ifs"
4220
4600
else
4221
 
  ac_cv_path_LD="$LD" # Let the user override the test with a path.
 
4601
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4222
4602
fi])
4223
 
LD="$ac_cv_path_LD"
 
4603
LD="$lt_cv_path_LD"
4224
4604
if test -n "$LD"; then
4225
4605
  AC_MSG_RESULT($LD)
4226
4606
else
4230
4610
AC_PROG_LD_GNU
4231
4611
])
4232
4612
 
4233
 
AC_DEFUN(AC_PROG_LD_GNU,
4234
 
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
 
4613
AC_DEFUN([AC_PROG_LD_GNU],
 
4614
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4235
4615
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4236
4616
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4237
 
  ac_cv_prog_gnu_ld=yes
 
4617
  lt_cv_prog_gnu_ld=yes
4238
4618
else
4239
 
  ac_cv_prog_gnu_ld=no
 
4619
  lt_cv_prog_gnu_ld=no
4240
4620
fi])
4241
 
with_gnu_ld=$ac_cv_prog_gnu_ld
 
4621
with_gnu_ld=$lt_cv_prog_gnu_ld
4242
4622
])
4243
4623
 
4244
4624
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4245
4625
#   -- PORTME Some linkers may need a different reload flag.
4246
 
AC_DEFUN(AC_PROG_LD_RELOAD_FLAG,
 
4626
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4247
4627
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4248
4628
[lt_cv_ld_reload_flag='-r'])
4249
4629
reload_flag=$lt_cv_ld_reload_flag
4252
4632
 
4253
4633
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4254
4634
#  -- PORTME fill in with the dynamic library characteristics
4255
 
AC_DEFUN(AC_DEPLIBS_CHECK_METHOD,
 
4635
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4256
4636
[AC_CACHE_CHECK([how to recognise dependant libraries],
4257
4637
lt_cv_deplibs_check_method,
4258
 
[lt_cv_file_magic_cmd='${MAGIC}'
 
4638
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4259
4639
lt_cv_file_magic_test_file=
4260
4640
lt_cv_deplibs_check_method='unknown'
4261
4641
# Need to set the preceding variable on all platforms that support
4269
4649
# If you have `file' or equivalent on your system and you're not sure
4270
4650
# whether `pass_all' will *always* work, you probably want this one.
4271
4651
 
4272
 
case "$host_os" in
4273
 
aix4*)
 
4652
case $host_os in
 
4653
aix*)
4274
4654
  lt_cv_deplibs_check_method=pass_all
4275
4655
  ;;
4276
4656
 
4279
4659
  ;;
4280
4660
 
4281
4661
bsdi4*)
4282
 
  changequote(,)dnl
4283
 
  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
4284
 
  changequote([, ])dnl
 
4662
  lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
4285
4663
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4286
4664
  lt_cv_file_magic_test_file=/shlib/libc.so
4287
4665
  ;;
4288
4666
 
4289
 
cygwin* | mingw*)
 
4667
cygwin* | mingw* |pw32*)
4290
4668
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4291
 
  lt_cv_file_magic_cmd='${OBJDUMP} -f'
 
4669
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
4670
  ;;
 
4671
 
 
4672
darwin* | rhapsody*)
 
4673
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
 
4674
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
4675
  case "$host_os" in
 
4676
  rhapsody* | darwin1.[012])
 
4677
    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
 
4678
    ;;
 
4679
  *) # Darwin 1.3 on
 
4680
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
 
4681
    ;;
 
4682
  esac
4292
4683
  ;;
4293
4684
 
4294
4685
freebsd* )
4295
4686
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4296
 
    case "$host_cpu" in
 
4687
    case $host_cpu in
4297
4688
    i*86 )
4298
 
      changequote(,)dnl
4299
 
      lt_cv_deplibs_check_method=='file_magic OpenBSD/i[3-9]86 demand paged shared library'
4300
 
      changequote([, ])dnl
 
4689
      # Not sure whether the presence of OpenBSD here was a mistake.
 
4690
      # Let's accept both of them until this is cleared up.
 
4691
      lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
4301
4692
      lt_cv_file_magic_cmd=/usr/bin/file
4302
4693
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4303
4694
      ;;
4311
4702
  lt_cv_deplibs_check_method=pass_all
4312
4703
  ;;
4313
4704
 
4314
 
hpux10.20*)
4315
 
  # TODO:  Does this work for hpux-11 too?
4316
 
  changequote(,)dnl
4317
 
  lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
4318
 
  changequote([, ])dnl
 
4705
hpux10.20*|hpux11*)
 
4706
  lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
4319
4707
  lt_cv_file_magic_cmd=/usr/bin/file
4320
4708
  lt_cv_file_magic_test_file=/usr/lib/libc.sl
4321
4709
  ;;
4322
4710
 
4323
4711
irix5* | irix6*)
4324
 
  case "$host_os" in
 
4712
  case $host_os in
4325
4713
  irix5*)
4326
4714
    # this will be overridden with pass_all, but let us keep it just in case
4327
4715
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4328
4716
    ;;
4329
4717
  *)
4330
 
    case "$LD" in
 
4718
    case $LD in
4331
4719
    *-32|*"-32 ") libmagic=32-bit;;
4332
4720
    *-n32|*"-n32 ") libmagic=N32;;
4333
4721
    *-64|*"-64 ") libmagic=64-bit;;
4334
4722
    *) libmagic=never-match;;
4335
4723
    esac
4336
4724
    # this will be overridden with pass_all, but let us keep it just in case
4337
 
    changequote(,)dnl
4338
 
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
4339
 
    changequote([, ])dnl
 
4725
    lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
4340
4726
    ;;
4341
4727
  esac
4342
4728
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4345
4731
 
4346
4732
# This must be Linux ELF.
4347
4733
linux-gnu*)
4348
 
  case "$host_cpu" in
4349
 
  alpha* | i*86 | powerpc* | sparc* | ia64* )
 
4734
  case $host_cpu in
 
4735
  alpha* | i*86 | powerpc* | sparc* | ia64* | s390* | m68k* | arm* | mips* | hppa* | sh* )
4350
4736
    lt_cv_deplibs_check_method=pass_all ;;
4351
4737
  *)
4352
4738
    # glibc up to 2.1.1 does not perform some relocations on ARM
4353
 
    changequote(,)dnl
4354
 
    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
4355
 
    changequote([, ])dnl
 
4739
    lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
4356
4740
  esac
4357
4741
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4358
4742
  ;;
4359
4743
 
4360
4744
netbsd*)
4361
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
4362
 
  else
4363
 
    changequote(,)dnl
4364
 
    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
4365
 
    changequote([, ])dnl
4366
 
    lt_cv_file_magic_cmd='/usr/bin/file -L'
4367
 
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4368
 
  fi
 
4745
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
4746
    [lt_cv_deplibs_check_method='file_magic NetBSD/[a-z0-9]* demand paged shared library']
 
4747
  else
 
4748
    [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object']
 
4749
  fi
 
4750
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
4751
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
4752
  ;;
 
4753
 
 
4754
openbsd* )
 
4755
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
4756
    case "$host_cpu" in
 
4757
    i*86 )
 
4758
      changequote(,)dnl
 
4759
      lt_cv_deplibs_check_method='file_magic OpenBSD/i[3-9]86 demand paged shared library'
 
4760
      changequote([, ])dnl
 
4761
      lt_cv_file_magic_cmd=/usr/bin/file
 
4762
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
4763
      ;;
 
4764
    esac
 
4765
  else
 
4766
    lt_cv_deplibs_check_method=pass_all
 
4767
  fi
 
4768
  ;;
 
4769
 
 
4770
newsos6)
 
4771
  [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
 
4772
  lt_cv_file_magic_cmd=/usr/bin/file
 
4773
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4369
4774
  ;;
4370
4775
 
4371
4776
osf3* | osf4* | osf5*)
4385
4790
  ;;
4386
4791
 
4387
4792
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4388
 
  case "$host_vendor" in
 
4793
  case $host_vendor in
4389
4794
  ncr)
4390
4795
    lt_cv_deplibs_check_method=pass_all
4391
4796
    ;;
4392
4797
  motorola)
4393
 
    changequote(,)dnl
4394
 
    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]'
4395
 
    changequote([, ])dnl
 
4798
    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]']
4396
4799
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4397
4800
    ;;
4398
4801
  esac
4405
4808
 
4406
4809
 
4407
4810
# AC_PROG_NM - find the path to a BSD-compatible name lister
4408
 
AC_DEFUN(AC_PROG_NM,
 
4811
AC_DEFUN([AC_PROG_NM],
4409
4812
[AC_MSG_CHECKING([for BSD-compatible nm])
4410
 
AC_CACHE_VAL(ac_cv_path_NM,
 
4813
AC_CACHE_VAL(lt_cv_path_NM,
4411
4814
[if test -n "$NM"; then
4412
4815
  # Let the user override the test.
4413
 
  ac_cv_path_NM="$NM"
 
4816
  lt_cv_path_NM="$NM"
4414
4817
else
4415
4818
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4416
4819
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4420
4823
      # Check to see if the nm accepts a BSD-compat flag.
4421
4824
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4422
4825
      #   nm: unknown option "B" ignored
4423
 
      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4424
 
        ac_cv_path_NM="$tmp_nm -B"
 
4826
      # Tru64's nm complains that /dev/null is an invalid object file
 
4827
      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
 
4828
        lt_cv_path_NM="$tmp_nm -B"
4425
4829
        break
4426
4830
      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4427
 
        ac_cv_path_NM="$tmp_nm -p"
 
4831
        lt_cv_path_NM="$tmp_nm -p"
4428
4832
        break
4429
4833
      else
4430
 
        ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
 
4834
        lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4431
4835
        continue # so that we can try to find one that supports BSD flags
4432
4836
      fi
4433
4837
    fi
4434
4838
  done
4435
4839
  IFS="$ac_save_ifs"
4436
 
  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
 
4840
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4437
4841
fi])
4438
 
NM="$ac_cv_path_NM"
 
4842
NM="$lt_cv_path_NM"
4439
4843
AC_MSG_RESULT([$NM])
4440
4844
])
4441
4845
 
4442
4846
# AC_CHECK_LIBM - check for math library
4443
 
AC_DEFUN(AC_CHECK_LIBM,
 
4847
AC_DEFUN([AC_CHECK_LIBM],
4444
4848
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4445
4849
LIBM=
4446
 
case "$host" in
4447
 
*-*-beos* | *-*-cygwin*)
 
4850
case $host in
 
4851
*-*-beos* | *-*-cygwin* | *-*-pw32*)
4448
4852
  # These system don't have libm
4449
4853
  ;;
4450
4854
*-ncr-sysv4.3*)
4467
4871
# '${top_srcdir}/' (note the single quotes!).  If your package is not
4468
4872
# flat and you're not using automake, define top_builddir and
4469
4873
# top_srcdir appropriately in the Makefiles.
4470
 
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4471
 
  case "$enable_ltdl_convenience" in
 
4874
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
 
4875
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
4876
  case $enable_ltdl_convenience in
4472
4877
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4473
4878
  "") enable_ltdl_convenience=yes
4474
4879
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4488
4893
# not flat and you're not using automake, define top_builddir and
4489
4894
# top_srcdir appropriately in the Makefiles.
4490
4895
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4491
 
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
4896
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
 
4897
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4492
4898
  AC_CHECK_LIB(ltdl, main,
4493
4899
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4494
4900
  [if test x"$enable_ltdl_install" = xno; then
4516
4922
                     [$2], [$3])])])
4517
4923
 
4518
4924
# AC_LIBTOOL_CXX - enable support for C++ libraries
4519
 
AC_DEFUN(AC_LIBTOOL_CXX,[AC_REQUIRE([_AC_LIBTOOL_CXX])])
4520
 
AC_DEFUN(_AC_LIBTOOL_CXX,
4521
 
[AC_REQUIRE([AC_PROG_LIBTOOL])
4522
 
AC_REQUIRE([AC_PROG_CXX])
 
4925
AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
 
4926
 
 
4927
AC_DEFUN([_AC_LIBTOOL_CXX],
 
4928
[AC_REQUIRE([AC_PROG_CXX])
4523
4929
AC_REQUIRE([AC_PROG_CXXCPP])
4524
4930
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
4525
4931
lt_save_CC="$CC"
4527
4933
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
4528
4934
dnl is set to the C++ compiler.
4529
4935
AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
4530
 
MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 
4936
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
4531
4937
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
4532
4938
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
4533
4939
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
4545
4951
])
4546
4952
 
4547
4953
# AC_LIBTOOL_GCJ - enable support for GCJ libraries
4548
 
AC_DEFUN(AC_LIBTOOL_GCJ,[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
4549
 
AC_DEFUN(_AC_LIBTOOL_GCJ,
 
4954
AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
 
4955
 
 
4956
AC_DEFUN([_AC_LIBTOOL_GCJ],
4550
4957
[AC_REQUIRE([AC_PROG_LIBTOOL])
4551
4958
AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
4552
4959
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
4553
 
    [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
4554
 
       [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
4555
 
         [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])
 
4960
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
 
4961
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
 
4962
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
 
4963
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
4556
4964
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
4557
4965
lt_save_CC="$CC"
4558
4966
lt_save_CFLAGS="$CFLAGS"
4559
4967
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
4560
4968
dnl is set to the C++ compiler.
4561
 
AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="" \
4562
 
MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 
4969
AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
 
4970
MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
4563
4971
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
4564
4972
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
4565
4973
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
4577
4985
])
4578
4986
 
4579
4987
dnl old names
4580
 
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
4581
 
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
4582
 
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
4583
 
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
4584
 
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
4585
 
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
4586
 
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
 
4988
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
 
4989
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
 
4990
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
 
4991
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
 
4992
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
 
4993
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
 
4994
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
4587
4995
 
4588
4996
dnl This is just to silence aclocal about the macro not being used
4589
4997
ifelse([AC_DISABLE_FAST_INSTALL])dnl
4590
4998
 
4591
 
ifdef([AM_PROG_GCJ],,[
4592
 
# Stolen from automake
4593
 
AC_DEFUN([AM_PROG_GCJ],[
4594
 
  AC_CHECK_PROGS(GCJ, gcj, gcj)
4595
 
  dnl Automake uses ``='' in the test below, it seems wrong
4596
 
  if test "x${GCJFLAGS+set}" != xset; then
4597
 
    GCJFLAGS="-g -O2"
4598
 
  fi
 
4999
AC_DEFUN([LT_AC_PROG_GCJ],
 
5000
[AC_CHECK_TOOL(GCJ, gcj, no)
 
5001
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
4599
5002
  AC_SUBST(GCJFLAGS)
4600
 
])])
 
5003
])